From ca2df0e483405adbe9ca93b3c3e85cca1664ec46 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期三, 09 八月 2023 17:48:59 +0800
Subject: [PATCH] 流程处理时业务数据的保存
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 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 1a3e472..3072649 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;
@@ -1489,6 +1490,20 @@
conditionMap.put("codeclsfpath","*" + exportAttrDTO.getCodeClassifyOid() + "*");
conditionMap.put("lastr", "1");
conditionMap.put("lastv", "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() + "%'";
+
//鍏堟煡璇㈡�绘暟
int total = 0;
if(exportAttrDTO.getEndPage()!=null && exportAttrDTO.getEndPage()>0
@@ -1502,10 +1517,11 @@
thisPage.setOrder(exportAttrDTO.getOrder());
thisPage.addDefaultDesc("createTime");
- //total += boService.queryCount(btmTypeId, conditionMap);
+ total += commonsMapper.queryCountBySql(countSql);
}
}else{
- //total=boService.queryCount(btmTypeId, conditionMap);
+
+ total = commonsMapper.queryCountBySql(countSql);
}
List<String> selectFieldList = new ArrayList<>();
if(!CollectionUtils.isEmpty(exportAttrDTO.getAttrIdIndexMap())){
@@ -2184,7 +2200,7 @@
String tableName ="";
try {
R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId());
- if(r.getCode()!=200) {
+ if(!r.isSuccess()) {
throw new Throwable(r.getMsg());
}
BtmTypeVO btmTypeVO = r.getData();
@@ -3292,7 +3308,7 @@
String tableName ="";
try {
R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId());
- if(r.getCode()!=200) {
+ if(!r.isSuccess()) {
throw new Throwable(r.getMsg());
}
BtmTypeVO btmTypeVO = r.getData();
@@ -4289,4 +4305,5 @@
}
}
}
+
}
--
Gitblit v1.9.3