From 5ec2f793898d4bbfd37f73b11688aeab9cc04cf2 Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期二, 13 六月 2023 17:54:20 +0800
Subject: [PATCH] 1、以前一些表名是写固定的,现在调业务类型服务进行获取的表名
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 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 8bc42d2..dbbc176 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
@@ -8,6 +8,7 @@
import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO;
import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO;
import com.vci.ubcs.code.constant.FrameWorkDefaultValueConstant;
+import com.vci.ubcs.code.constant.MdmBtmTypeConstant;
import com.vci.ubcs.code.dto.CodeDeleteBatchDTO;
import com.vci.ubcs.code.dto.CodeOrderDTO;
import com.vci.ubcs.code.dto.datapush.BaseModelDTO;
@@ -636,9 +637,10 @@
//娌℃湁闄愬埗鍒嗙被锛屼絾鏄竴涓ā鏉垮彧鍙兘鍦ㄤ竴涓笟鍔$被鍨嬮噷闈紝鎵�浠ョ洿鎺ユ煡璇㈣繖涓笟鍔$被鍨嬪嵆鍙�
if (!CollectionUtils.isEmpty(conditionMap)) {
- //琛ㄩ渶瑕佹敼
// final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "};
- final String[] sql = {"select count(*) from pl_code_wupin t where 1 = 1 "};
+ R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getTopClassifyVO().getBtmtypeid()));
+// String referTable = VciBaseUtil.getTableName(referVO.getReferType());
+ final String[] sql = {"select count(*) from "+ listR.getData().get(0).getTableName() +" t where 1 = 1 "};
conditionMap.forEach((key, value) -> {
sql[0] += " and " + key + " = " + value;
});
@@ -1733,9 +1735,7 @@
}
whereSql += " and ( t.secretGrade <= " + userSecret + ") ";
}
- //瑕佹敼锛岃〃鏄庤幏鍙栨湁闂
// String tableName = VciBaseUtil.getTableName(btmType);
-// String tableName = "pl_code_wupin";
R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
// String referTable = VciBaseUtil.getTableName(referVO.getReferType());
String tableName = listR.getData().get(0).getTableName();
@@ -2185,10 +2185,13 @@
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)
- conditionMap.put("t."+CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from pl_code_classify where lcstatus='" + FrameWorkDefaultValueConstant.FRAMEWORK_DATA_ENABLED +
- "' start with parentCodeClassifyOid = '" + codeClassifyOid + "' CONNECT BY PRIOR OID = parentCodeClassifyOid )");
+
+ conditionMap.put("t."+CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from "+
+ btmTypeClient.selectByIdCollection(Collections.singletonList(MdmBtmTypeConstant.CODE_CLASSIFY))
+ .getData().get(0).getTableName() +" where lcstatus='" + FrameWorkDefaultValueConstant
+ .FRAMEWORK_DATA_ENABLED + "' start with parentCodeClassifyOid = '" + codeClassifyOid +
+ "' CONNECT BY PRIOR OID = parentCodeClassifyOid )");
}
conditionMap.put("t.lastr", "1");
conditionMap.put("t.lastv", "1");
--
Gitblit v1.9.3