From 5da45630af37d2ac9541cfbad2aede0f88c4a9b5 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 21 二月 2024 15:55:31 +0800
Subject: [PATCH] 接口基本信息:参数对象 header对象调取接口呈现
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 41 ++++++++++++++++++++++++++++++-----------
1 files changed, 30 insertions(+), 11 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 525198e..2881a32 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
@@ -12,6 +12,7 @@
import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO;
import com.vci.ubcs.code.dto.*;
import com.vci.ubcs.code.entity.CodeAllCode;
+import com.vci.ubcs.code.entity.CodeSynonym;
import com.vci.ubcs.code.enumpack.*;
import com.vci.ubcs.code.lifecycle.CodeAllCodeLC;
import com.vci.ubcs.code.mapper.CommonsMapper;
@@ -97,7 +98,6 @@
@Slf4j
public class MdmIOServiceImpl implements MdmIOService {
-
/**
* 瀛楁
*/
@@ -164,36 +164,45 @@
@Autowired
private ICodeKeyAttrRepeatService keyRuleService;
+ @Autowired ICodeSynonymService codeSynonymService;
+
/**
* 鍏紡鐨勬湇鍔�
*/
@Autowired
private FormulaServiceImpl formulaService;
+
/**
* 瑙勫垯鐨勬湇鍔�
*/
@Autowired
private ICodeRuleService ruleService;
+
/**
* 涓氬姟绫诲瀷鐨勬湇鍔�
*/
@Autowired
private IBtmTypeClient btmTypeClient;
+
/***
* 鐢宠闆嗗洟缂栫爜鏈嶅姟
*/
@Resource
private IMdmInterJtClient mdmInterJtClient;
+
/***
* 瀵嗙骇鏈嶅姟
*/
@Resource
private IWebSecretClient secretService;
+
/**
* 鏃ュ織淇濆瓨宸ュ叿绫�
*/
@Autowired
private SaveLogUtil saveLogUtil;
+
+
/**
* 瀹㈡埛鐜板満excel涓鸿�佺増鏈紝瀵煎嚭鐨勬�绘暟闄愬埗涓�65535
@@ -959,9 +968,7 @@
//鏈�鍚庡紕缁勫悎瑙勫垯
batchSwitchComponentAttrOnOrder(attrVOS,allCboList);
-
Map<String, ClientBusinessObject> rowIndexCboMap = allCboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue((IMPORT_ROW_INDEX)), t -> t));
-
List<ClientBusinessObject> needSaveCboList = allCboList.stream().filter(cbo -> {
String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
@@ -971,6 +978,7 @@
Map<String,String>resembleMap=new HashMap<>();
List<DataResembleVO> dataResembleVOS=new ArrayList<>();
String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmTypeId();
+ //鐩镐技椤规煡璇㈣鍒�
bathcResembleQuery(codeClassifyOid,templateVO,needSaveCboList,resembleMap,btmtypeid,dataResembleVOS);
if(resembleMap.size()>0) {
if(!CollectionUtils.isEmpty(dataResembleVOS)) {
@@ -1280,6 +1288,7 @@
Map<String, String> resembleMap = new HashMap<>();
List<DataResembleVO> dataResembleVOS = new ArrayList<>();
String btmtypeid = classifyFullInfo.getTopClassifyVO().getBtmTypeId();
+ // 鐩镐技椤规煡璇�
bathcResembleQuery(templateVO.getCodeclassifyoid(), templateVO, needSaveCboList, resembleMap, btmtypeid, dataResembleVOS);
if (resembleMap.size() > 0) {
if (!CollectionUtils.isEmpty(dataResembleVOS)) {
@@ -1287,6 +1296,7 @@
createRedisDatas(uuid + "-resemble", templateVO, rowIndexCboMap, dataSet, fieldIndexMap, resembleMap, false);
}
}
+
//鐢熸垚class缂撳瓨
Map<String, String> rowIndexClsOidMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue((IMPORT_ROW_INDEX)), t -> t.getAttributeValue(CODE_CLASSIFY_OID_FIELD)));
createRedisByCodeClassify(uuid + "-class",templateVO,dataSet,fieldIndexMap,true);
@@ -1759,6 +1769,7 @@
Map<String,String>resembleMap=new HashMap<>();
List<DataResembleVO> dataResembleVOS=new ArrayList<>();
String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmTypeId();
+ //鐩镐技椤规煡璇�
bathcResembleQuery(orderDTO.getCodeClassifyOid(),templateVO,needSaveCboList,resembleMap,btmtypeid,dataResembleVOS);
if(resembleMap.size()>0) {
isCreateUUid=true;
@@ -4382,7 +4393,16 @@
CodeKeyAttrRepeatVO keyRuleVO = keyRuleService.getRuleByClassifyFullInfo(classifyFullInfo);
//娉ㄦ剰鐨勬槸keyRuleVO鍙兘涓虹┖锛岃〃绀轰笉浣跨敤瑙勫垯鎺у埗
//鑾峰彇鎵�鏈夌殑鍏抽敭灞炴��
- Map<String/**灞炴�х殑缂栧彿**/, CodeClassifyTemplateAttrVO> ketAttrMap = templateVO.getAttributes().stream().filter(s -> VciBaseUtil.getBoolean(s.getKeyAttrFlag())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+ Map<String/**灞炴�х殑缂栧彿**/, CodeClassifyTemplateAttrVO> keyAttrMap = templateVO.getAttributes().stream().filter(s -> VciBaseUtil.getBoolean(s.getKeyAttrFlag())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+
+ // TODO:2024-02-01 鍏堣幏鍙栭厤缃簡杩戜箟璇嶆煡璇㈣鍒欑殑灞炴�э紝涓嶅悓浜庡叧閿睘鎬э紝璁剧疆浜嗚繎涔夎瘝鏌ヨ瑙勫垯鐨勫睘鎬у彲鑳芥槸澶氭潯涓嶅悓鐨勮繎涔夎瘝鏌ヨ瑙勫垯
+// Map<String, CodeClassifyTemplateAttrVO> sysonymAttrMaps = templateVO.getAttributes().stream().filter(item -> Func.isNotBlank(item.getSysonymRuleOids())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
+ //鏈夐厤缃繎涔夎瘝鏌ヨ瑙勫垯灞炴��
+// Map<String, List<CodeSynonym>> codeSynonymMaps = new HashMap<>();
+// if(!sysonymAttrMaps.isEmpty()){
+// // 鏌ヨ杩戜箟璇嶈鍒�
+// codeSynonymMaps = codeSynonymService.getCodeSynonymByOids(sysonymAttrMaps);
+// }
boolean trimAll =keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnoreallspaceflag());
//鍏ㄩ儴鍘荤┖鐨勪紭鍏堢骇澶т簬鍘荤┖
@@ -4394,15 +4414,13 @@
CodeImportResultVO resultVO = new CodeImportResultVO();
resultVO.setKeyAttrRuleInfo(String.format(keyRuleVO ==null?"":"鏌ヨ瑙勫垯锛氬幓闄ょ┖鏍�--{0},蹇界暐澶у皬鍐�--{1},蹇界暐鍏ㄥ崐瑙�--{2},蹇界暐鍏ㄩ儴绌烘牸--{3}",
new String[]{trim?"鏄�":"鍚�",ignoreCase?"鏄�":"鍚�",ignoreWidth?"鏄�":"鍚�",trimAll?"鏄�":"鍚�"}));
- //resultVO.setSelfRepeatRowIndexList(getSelfRepeatRowIndex(ketAttrMap,cboList,keyRuleVO));
- getSelfRepeatRowIndex(ketAttrMap,cboList,keyRuleVO,resultVO);
+ //resultVO.setSelfRepeatRowIndexList(getSelfRepeatRowIndex(keyAttrMap,cboList,keyRuleVO));
+ getSelfRepeatRowIndex(keyAttrMap,cboList,keyRuleVO,resultVO);
if(!CollectionUtils.isEmpty(resultVO.getSelfRepeatRowIndexList())){
//鎴戜滑绉婚櫎鏈韩閲嶅鐨勬暟鎹�
cboList = cboList.stream().filter(s->!resultVO.getSelfRepeatRowIndexList().contains(s.getAttributeValue(IMPORT_ROW_INDEX))).collect(Collectors.toList());
}
//2.鍒ゆ柇鍏抽敭灞炴�у湪绯荤粺閲屾槸鍚﹂噸澶�
- //鍥犱负鏁版嵁閲忓緢澶э紝鎵�浠ュ緱鎯冲姙娉曞苟琛�
- //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
Map<String,List<BaseModel>> indexTODataMap=new ConcurrentHashMap<>();
// 鏌ヨ涓嶉渶瑕佸弬涓庡叧閿睘鎬ф牎楠岀殑闄よ嚜宸变互澶栫殑鎵�鏈夊垎绫籵id
final String isParticipateCheckOids = classifyService.selectLeafByParentClassifyOid(classifyFullInfo.getTopClassifyVO().getOid(), classifyFullInfo.getCurrentClassifyVO().getOid());
@@ -4416,7 +4434,7 @@
//姣忚閮藉緱鏌ヨ.濡傛灉鍏朵腑鍑虹幇浜嗛敊璇紝鎴戜滑灏辩洿鎺ユ姏鍑哄紓甯革紝鍏朵綑鐨勬樉绀�
//VciBaseUtil.setCurrentUserSessionInfo(sessionInfo);
Map<String, String> conditionMap = new HashMap<>();
- ketAttrMap.forEach((attrId, attrVO) -> {
+ keyAttrMap.forEach((attrId, attrVO) -> {
String value =cbo.getAttributeValue(attrId.toLowerCase(Locale.ROOT));
if (value == null) {
value = "";
@@ -4424,12 +4442,13 @@
value= value.replace(REQUIRED_CHAR,SPECIAL_CHAR);
engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
});
- if (!CollectionUtils.isEmpty(ketAttrMap)) {
+ if (!CollectionUtils.isEmpty(keyAttrMap)) {
// 娣诲姞涓嶅弬涓庡叧閿睘鎬ф牎楠岀殑鍒嗙被oid鍒ゆ柇
if(Func.isNotBlank(isParticipateCheckOids)){
conditionMap.put("t.codeclsfid",QueryOptionConstant.NOTIN+isParticipateCheckOids);
}
- if(isEdit){//濡傛灉鏄洿鏀瑰垯闇�鎺掗櫎绯荤粺鏈韩
+ //濡傛灉鏄洿鏀瑰垯闇�鎺掗櫎绯荤粺鏈韩
+ if(isEdit){
conditionMap.put("t.id",QueryOptionConstant.NOTEQUAL+cbo.getId());
}
conditionMap.put("t.lastr", "1");
--
Gitblit v1.9.3