From a19d26e88360c9760b2286bac4dfb1710fd2fa21 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期六, 12 八月 2023 13:33:58 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
index 4f6b09d..0bd2aaa 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -52,6 +52,7 @@
 import org.apache.poi.ss.usermodel.Workbook;
 import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -1492,7 +1493,15 @@
 		conditionMap.put("lastr", "1");
 		conditionMap.put("lastv", "1");
 
-		String countSql = "select count(*) from " + VciBaseUtil.getTableName(btmTypeId) +" where 1=1" +
+		R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Arrays.asList(btmTypeId));
+		String tableName = "";
+		if(listR.isSuccess() && !listR.getData().isEmpty()){
+			tableName = Func.isNotBlank(listR.getData().get(0).getTableName()) ? listR.getData().get(0).getTableName():VciBaseUtil.getTableName(btmTypeId);
+		}else{
+			tableName = VciBaseUtil.getTableName(btmTypeId);
+		}
+
+		String countSql = "select count(*) from " + tableName +" where 1=1" +
 			" and lastr = '1'" +
 			" and lastv='1'" +
 			" and codeclsfpath like '%" + exportAttrDTO.getCodeClassifyOid() + "%'";

--
Gitblit v1.9.3