From d9183aa80ae17d36b79dda48c6b1d7fa22a80ee3 Mon Sep 17 00:00:00 2001
From: xiejun <xiejun@vci-tech.com>
Date: 星期三, 22 一月 2025 11:20:41 +0800
Subject: [PATCH] 现场型号代号/人员/组织接口调试

---
 Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/RevisionRuleServiceImpl.java |   60 +++++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 37 insertions(+), 23 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/RevisionRuleServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/RevisionRuleServiceImpl.java
index 9741d8a..2c098e3 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/RevisionRuleServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/RevisionRuleServiceImpl.java
@@ -1,6 +1,7 @@
 package com.vci.ubcs.omd.service.impl;
 
 import com.alibaba.cloud.commons.lang.StringUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -18,11 +19,9 @@
 import com.vci.ubcs.omd.wrapper.BtmTypeWrapper;
 import com.vci.ubcs.omd.wrapper.RevisionRuleWrapper;
 import com.vci.ubcs.starter.exception.VciBaseException;
-import com.vci.ubcs.starter.util.Map2MPJLambdaUtil;
 import com.vci.ubcs.starter.util.MybatisParameterUtil;
+import com.vci.ubcs.starter.util.UBCSCondition;
 import com.vci.ubcs.starter.web.constant.RegExpConstant;
-import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject;
-import com.vci.ubcs.starter.web.pagemodel.PageHelper;
 import com.vci.ubcs.starter.web.util.BeanUtil;
 import com.vci.ubcs.starter.web.util.VciBaseUtil;
 import org.springblade.core.mp.support.Condition;
@@ -36,6 +35,7 @@
 import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
+import java.sql.Wrapper;
 import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -148,8 +148,7 @@
 	@Override
 	public List<RevisionRuleVO> listRevisionRuleByIdCollection(Collection<String> revisionRuleIdCollection) throws VciBaseException {
 		VciBaseUtil.alertNotNull(revisionRuleIdCollection,"鑻辨枃鍚嶇О闆嗗悎");
-//		return RevisionRuleWrapper.build().listVO(list(MybatisParameterUtil.cutInParameter(Wrappers.<RevisionRule>query().lambda(),RevisionRule::getId, Collections.singletonList(revisionRuleIdCollection))));
-		List<RevisionRule> list = baseMapper.selectList(Wrappers.<RevisionRule>query().lambda().in(RevisionRule::getId, revisionRuleIdCollection));
+		List<RevisionRule> list = baseMapper.selectByIdIgnoreCase(revisionRuleIdCollection);
 		return RevisionRuleWrapper.build().listVO(list);
 	}
 
@@ -382,7 +381,7 @@
 		//妫�鏌ヤ笟鍔$被鍨�
 		Collection<Collection<String>> oidCollections = VciBaseUtil.switchCollectionForOracleIn(oidCollection);
 		for(Collection<String> oids : oidCollections) {
-			MPJLambdaWrapper<BtmType> join = Map2MPJLambdaUtil.getMPJLambdaWrapper(new BtmType())
+			MPJLambdaWrapper<BtmType> join = UBCSCondition.getMPJLambdaWrapper(new BtmType())
 				.join("join", RevisionRule.class, RevisionRule::getId, BtmType::getRevisionRuleId)
 				.in(RevisionRule::getOid, oids);
 			Long count = btmTypeMapper.selectCount(join);
@@ -404,7 +403,7 @@
 	public List<BtmTypeVO> listRevisionRuleUsedInfo(String pkRevisionRule) throws VciBaseException {
 		VciBaseUtil.alertNotNull(pkRevisionRule,"鐗堟湰瑙勫垯瀵硅薄鐨勪富閿�");
 		List<BtmType> result = btmTypeMapper.selectList(
-			Map2MPJLambdaUtil.getMPJLambdaWrapper(new BtmType())
+			UBCSCondition.getMPJLambdaWrapper(new BtmType())
 				.join("join", RevisionRule.class, RevisionRule::getId, BtmType::getRevisionRuleId)
 				.eq(RevisionRule::getOid, pkRevisionRule));
 		return BtmTypeWrapper.build().listEntityVO(result);
@@ -513,7 +512,6 @@
 		return "";
 	}
 
-
 	/**
 	 * 鏇挎崲鍓嶇紑鍜屽悗缂�
 	 * @param ruleValue 褰撳墠鐗堟湰鐨勫��
@@ -540,24 +538,40 @@
 	/**
 	 * 鍒嗛〉鏌ヨ
 	 *
-	 * @param baseQueryObject 鏌ヨ瀵硅薄
+	 * @param condition 鏌ヨ瀵硅薄
+	 * @param query 鍒嗛〉瀵硅薄
 	 * @return 鏌ヨ缁撴灉
 	 * @throws VciBaseException 鏌ヨ鍑洪敊鏃舵姏鍑哄紓甯�
 	 */
 	@Override
-	public IPage<RevisionRuleVO> pageQueryVO(BaseQueryObject baseQueryObject) throws VciBaseException {
-		Map<String, String> conditionMap = baseQueryObject.getConditionMap();
-		if (conditionMap == null){
-			conditionMap = new HashMap<>();
-		}
-		PageHelper pageHelper = baseQueryObject.getPageHelper();
-		Query query = new Query();
-		query.setCurrent(pageHelper.getPage());
-		query.setSize(pageHelper.getLimit());
-		query.setAscs(pageHelper.getSort());
-		RevisionRule queryConditionObj = new RevisionRule();
-		BeanMap beanMap = BeanMap.create(queryConditionObj);
-		beanMap.putAll(conditionMap);
-		return RevisionRuleWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(query),Condition.getQueryWrapper(queryConditionObj).lambda().orderByAsc(RevisionRule::getId)));
+	public IPage<RevisionRuleVO> pageQueryVO(Map<String, Object> condition, Query query) throws VciBaseException {
+		return RevisionRuleWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(query),Condition.getQueryWrapper(condition,RevisionRule.class).lambda().orderByAsc(RevisionRule::getId)));
 	}
+
+	/**
+	 * 鏌ョ湅搴旂敤鑼冨洿
+	 *
+	 * @param id id
+	 * @return 鎵ц缁撴灉
+	 */
+	@Override
+	public List<BtmTypeVO> getApplyRange(String id) {
+		VciBaseUtil.alertNotNull(id,"鐗堟湰瑙勫垯鑻辨枃鍚嶇О");
+		return BtmTypeWrapper.build().listEntityVO(btmTypeMapper.selectList(Wrappers.<BtmType>query().lambda().eq(BtmType::getRevisionRuleId,id)));
+	}
+
+	/**
+	 * 鏍规嵁id鑾峰彇鐗堟湰瑙勫垯
+	 * @param id
+	 * @return
+	 */
+	@Override
+	public RevisionRuleVO getReversionRuleById(String id) {
+		LambdaQueryWrapper<RevisionRule> wrapper = Wrappers.<RevisionRule>query()
+			.lambda().eq(RevisionRule::getId, id)
+			.last("limit 1");
+		RevisionRule revisionRule = baseMapper.selectOne(wrapper);
+		return RevisionRuleWrapper.build().entityVO(revisionRule);
+	}
+
 }

--
Gitblit v1.9.3