From c98617764afe0ee4e64ebb7b3af6845aeaeeea12 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期一, 28 八月 2023 15:15:10 +0800
Subject: [PATCH] 最大流水号
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 44 ++++++++++++++++++++++++++++++--------------
1 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
index da89285..35949f6 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -36,6 +36,7 @@
import com.vci.ubcs.starter.revision.model.TreeQueryObject;
import com.vci.ubcs.starter.revision.model.TreeWrapperOptions;
import com.vci.ubcs.starter.revision.service.RevisionModelUtil;
+import com.vci.ubcs.starter.util.MdmBtmTypeConstant;
import com.vci.ubcs.starter.util.UBCSSqlKeyword;
import com.vci.ubcs.starter.web.constant.QueryOptionConstant;
import com.vci.ubcs.starter.web.constant.RegExpConstant;
@@ -423,6 +424,9 @@
cbo.setCreator(String.valueOf(AuthUtil.getUser().getUserId()));
cbo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId()));
cbo.setTenantId(AuthUtil.getTenantId());
+ if(StringUtils.isNotBlank(orderDTO.getLcStatus())||StringUtils.isNotBlank(orderDTO.getData().get("lcStatus"))){
+ cbo.setLcStatus(StringUtils.isNotBlank(orderDTO.getLcStatus())?orderDTO.getLcStatus():orderDTO.getData().get("lcStatus"));
+ }
// //TODO:鍥犱负榛樿鐨勫睘鎬ч兘涓嶆嫹璐濓紝鐩墠闆嗗洟鐮佸彨name锛屽苟娌℃湁浠嶥TO鎷疯礉鍒癱bo閲屻�傚鍔犱竴涓崟鐙鐞嗭紝浠ュ悗鍐嶇湅瑕佷笉瑕佽皟鏁�
cbo.setName(orderDTO.getName() == null ? "" : orderDTO.getName());
// //end -- modify by lihang @20220407
@@ -550,7 +554,10 @@
String value = null;
if (VciQueryWrapperForDO.BASIC_FIELD_MAP.containsKey(attrId)) {
value = WebUtil.getStringValueFromObject(WebUtil.getValueFromField(WebUtil.getFieldForObject(attrId, orderDTO.getClass()).getName(), orderDTO));
- } else {
+ if(StringUtils.isBlank(value)){
+ value = orderDTO.getData().getOrDefault(attrId, "");
+ }
+ } else {
//璇存槑鏄嚜琛岄厤缃殑
//鍓嶇蹇呴』瑕佷紶閫掑皬鍐欑殑灞炴��
value = orderDTO.getData().getOrDefault(attrId, "");
@@ -659,7 +666,11 @@
}
final String[] sql = {"select count(*) from " + listR.getData().get(0).getTableName() + " t where 1 = 1 "};
conditionMap.forEach((key, value) -> {
- sql[0] += " and " + key + " = " + value;
+ if(StringUtils.isBlank(value)||value.equals(QueryOptionConstant.ISNULL)) {
+ sql[0] += " and " + key + " is null";
+ }else{
+ sql[0] += " and " + key + " = " + value;
+ }
});
if (StringUtils.isNotBlank(orderDTO.getOid())) {
//淇敼鐨勬椂鍊欙紝闇�瑕佹帓闄よ嚜宸�
@@ -680,10 +691,9 @@
/**
* 鏍¢獙鍏抽敭灞炴��
*
- * @param classifyFullInfo 鍒嗙被鐨勫叏閮ㄤ俊鎭�
- * @param templateVO 妯℃澘鐨勫唴瀹癸紝蹇呴』鍖呭惈妯℃澘灞炴��
* @param orderDTO 缂栫爜鐢宠鐨勭浉鍏崇殑淇℃伅
*/
+ @Override
public List<Map> checkKeyAttrOnOrderFordatas(CodeOrderDTO orderDTO) {
List<Map>dataList=new ArrayList<>();
CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid());
@@ -758,7 +768,7 @@
boolean ignoreSpace = trim || trimAll;
if (StringUtils.isBlank(value)) {
//涓虹┖鐨勬椂鍊欙紝涓嶈兘鐢≦ueryOperation.ISNULL锛屽钩鍙颁笉鐭ラ亾鍟ユ椂鍊欎笉澶勭悊杩欑浜�
- conditionMap.put("t." + attrId, "null");
+ conditionMap.put("t." + attrId, QueryOptionConstant.ISNULL);
} else {
if (keyRuleVO != null) {
String queryKey = "";
@@ -794,8 +804,12 @@
queryValue = String.format(temp, "'" + (trim ? value.trim() : value) + "'");
conditionMap.put(queryKey, queryValue);
} else {
- //涓虹┖鐨勬椂鍊欎笉浠h〃涓嶆牎楠岋紝鍙槸涓嶅幓闄ょ浉鍏崇殑淇℃伅
- conditionMap.put("t." + attrId, "'" +value+ "'");
+ if(StringUtils.isNotBlank(value)) {
+ //涓虹┖鐨勬椂鍊欎笉浠h〃涓嶆牎楠岋紝鍙槸涓嶅幓闄ょ浉鍏崇殑淇℃伅
+ conditionMap.put("t." + attrId, "'" + value + "'");
+ }else{
+ conditionMap.put("t." + attrId, QueryOptionConstant.ISNULL);
+ }
}
}
}
@@ -1355,7 +1369,7 @@
uiFormReferVO.setTableConfig(uiTableConfigVO);
// 绛涢�夋潯浠�
HashMap<String, String> whereMap = new HashMap<>();
- if(!codeReferConfig.getCodeSrchCondConfigVOS().isEmpty()){
+ if(!CollectionUtils.isEmpty(codeReferConfig.getCodeSrchCondConfigVOS())){
codeReferConfig.getCodeSrchCondConfigVOS().stream().forEach(srch->{
whereMap.put(srch.getFilterField()+srch.getFilterType(),srch.getFilterValue());
});
@@ -2448,16 +2462,18 @@
if (conditionMap == null) {
conditionMap = new HashMap<>();
}
- //pageHelper.addDefaultDesc("createTime");
- pageHelper.addDefaultDesc("id");
+ pageHelper.addDefaultDesc("createTime");
+// pageHelper.addDefaultDesc("id");
if (!classifyService.checkHasChild(codeClassifyOid)) {
conditionMap.put("t." + CODE_CLASSIFY_OID_FIELD, codeClassifyOid);
} else {
// conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY)
-
+ List<BtmTypeVO> classifyData = btmTypeClient.selectByIdCollection(Collections.singletonList(MdmBtmTypeConstant.CODE_CLASSIFY)).getData();
+ if(Func.isEmpty(classifyData)){
+ throw new ServiceException("涓氬姟绫诲瀷閰嶇疆涓嶄竴鑷达紝璇蜂慨鏀硅嫳鏂囧悕绉颁负"+MdmBtmTypeConstant.CODE_CLASSIFY);
+ }
conditionMap.put("t." + CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from " +
- btmTypeClient.selectByIdCollection(Collections.singletonList("classify"))
- .getData().get(0).getTableName() + " where lcstatus='" + FrameWorkDefaultValueConstant
+ classifyData.get(0).getTableName() + " where lcstatus='" + FrameWorkDefaultValueConstant
.FRAMEWORK_DATA_ENABLED + "' start with parentCodeClassifyOid = '" + codeClassifyOid +
"' CONNECT BY PRIOR OID = parentCodeClassifyOid )");
}
@@ -2723,7 +2739,7 @@
CodeClassifyFullInfoBO fullInfo = classifyService.getClassifyFullInfo(codeClassifyOid);
return getCodeRuleByClassifyFullInfo(fullInfo);
}
- //鎴戜滑鏌ヨ缂栫爜瑙勫垯
+ //鏌ヨ缂栫爜瑙勫垯
return ruleService.getObjectHasSecByOid(codeRuleOid);
}
--
Gitblit v1.9.3