From 426cad0dd0eef1aefb59c6aaa2e2a2448773dc0b Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期一, 24 七月 2023 17:29:24 +0800
Subject: [PATCH] 1、修改查询按钮时的条件,使用编码来查询。 2、增加申请编码时增加设置默认的租户编码。 3、对传入in('条件sql拼接报错问题进行了修改。 4、模板的启用前进行了对分类启用状态的一个判断工作。

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 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 f19ae9b..42ddcd0 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
@@ -3,7 +3,6 @@
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.nacos.common.utils.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.vci.file.util.VciZipUtil;
 import com.vci.ubcs.code.bo.AttributeValue;
 import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO;
 import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO;
@@ -21,6 +20,7 @@
 import com.vci.ubcs.code.vo.webserviceModel.attrmap.DataObjectVO;
 import com.vci.ubcs.code.vo.webserviceModel.attrmap.RowDatas;
 import com.vci.ubcs.code.vo.webserviceModel.result.xml.XMLResultDataObjectDetailDO;
+import com.vci.ubcs.file.util.VciZipUtil;
 import com.vci.ubcs.omd.feign.IBtmTypeClient;
 import com.vci.ubcs.omd.feign.IWebSecretClient;
 import com.vci.ubcs.omd.vo.BtmTypeVO;
@@ -1489,6 +1489,15 @@
 		conditionMap.put("codeclsfpath","*" + exportAttrDTO.getCodeClassifyOid() + "*");
 		conditionMap.put("lastr", "1");
 		conditionMap.put("lastv", "1");
+
+		// 鏌ヨ鍑鸿〃鍚�
+
+
+		String countSql = "select count(*) from " + VciBaseUtil.getTableName(btmTypeId) +" 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 +1511,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 +2194,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 +3302,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 +4299,5 @@
 			}
 		}
 	}
+
 }

--
Gitblit v1.9.3