From 3aae81075a18a11d6b605c7583eb03b75366b466 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 18 四月 2024 00:08:52 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java index 102c534..1a03985 100644 --- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java @@ -19,6 +19,7 @@ import com.vci.ubcs.starter.web.util.VciBaseUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.map.CaseInsensitiveMap; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; @@ -98,6 +99,12 @@ */ @Autowired(required = false) private IDockingPreMetaAttrService dockingPreMetaAttrService; + + /** + * 闆嗗洟灞炴�ф睜鏄犲皠鏈嶅姟 + */ + @Autowired(required = false) + private IGroupAttrPoolMappingService groupAttrPoolMappingService; @Autowired(required = false) private IMdmEngineClient mdmEngineClient; @@ -182,6 +189,7 @@ writeValueAsString = mp.writeValueAsString(dataObject); dockingPreApplyForm.setContent(writeValueAsString); } catch (JsonProcessingException e) { + throw new ServiceException("淇敼鐢宠鍗曟暟鎹椂杞崲鍑洪敊锛屽師鍥�"+e.getMessage()); } Date date = new Date(); dockingPreApplyForm.setLastModifyTime(date); @@ -202,6 +210,7 @@ writeValueAsString = mp.writeValueAsString(dataObject); dockingPreApplyForm.setContent(writeValueAsString); } catch (JsonProcessingException e) { + throw new ServiceException("鏂板鐢宠鍗曟暟鎹椂鏁版嵁杞崲鍑洪敊锛屽師鍥�"+e.getMessage()); } Date date = new Date(); dockingPreApplyForm.setCreateTime(date); @@ -402,12 +411,12 @@ } }); } else { + Date date = new Date(); editDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> { dockingPreApplyForm.setCode("2"); dockingPreApplyForm.setMsg("淇敼锛�" + msg); dockingPreApplyForm.setContent(""); dockingPreApplyForm.setGroupCode(""); - Date date = new Date(); dockingPreApplyForm.setLastModifyTime(date); dockingPreApplyForm.setTs(date); dockingPreApplyForm.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); @@ -418,7 +427,6 @@ dockingPreApplyForm.setMsg("淇敼锛�" + msg); dockingPreApplyForm.setContent(""); dockingPreApplyForm.setGroupCode(""); - Date date = new Date(); dockingPreApplyForm.setCreateTime(date); dockingPreApplyForm.setLastModifyTime(date); dockingPreApplyForm.setTs(date); @@ -671,15 +679,15 @@ return R.fail("鍚屾闆嗗洟妯″瀷淇℃伅寮�鍏冲凡鍏抽棴"); } VciBaseUtil.alertNotNull(operationType,"闆嗘垚鎿嶄綔绫诲瀷"); - try { + try{ if(operationType.equals("all")){ return queryMdmModel(); }else{ VciBaseUtil.alertNotNull(classifyId,"闆嗗洟鍒嗙被涓婚敭"); return queryClassModel(classifyId); } - } catch (Throwable e) { - throw new VciBaseException(e.getMessage()); + }catch(Throwable e) { + throw new VciBaseException(e.getMessage()); } } @@ -748,8 +756,7 @@ * @param jclassObject * @throws Throwable */ - private void getVilewMode(DockingClassifyVO jclassObject, List<DockingClassifyViewVO> list) - throws Throwable { + private void getVilewMode(DockingClassifyVO jclassObject, List<DockingClassifyViewVO> list) throws Throwable { String nodeLinkName = jclassObject.getNodeLinkName(); try { String jclassId = com.alibaba.cloud.commons.lang.StringUtils.isBlank(jclassObject.getId())?"":jclassObject.getId(); @@ -785,8 +792,10 @@ } // 鑾峰彇妯″瀷瑙嗗浘涓嬬殑灞炴�ч泦 // String oid = jviewModelObject.getOid(); - List<DockingPreMetaAttr>allDockingPreMetaAttrList=new ArrayList<>(); + List<DockingPreMetaAttr> allDockingPreMetaAttrList = new ArrayList<>(); getMetaAttrObject(metaList, jclassId, jviewModelObject, "root",allDockingPreMetaAttrList); + //淇濆瓨闆嗗洟灞炴�у埌闆嗗洟灞炴�ф睜鏄犲皠琛ㄤ腑 + groupAttrPoolMappingService.saveDistinctGroupAttr(allDockingPreMetaAttrList); //淇濆瓨妯″瀷瑙嗗浘灞炴�� dockingPreMetaAttrService.saveOrUpdateBatch(allDockingPreMetaAttrList); //淇濆瓨妯″瀷瑙嗗浘 @@ -858,9 +867,7 @@ }else{ allDockingPreMetaAttrList.add(dockingPreMetaAttr); } - } - } catch (Throwable e) { e.printStackTrace(); log.error("缁勭粐妯″瀷瑙嗗浘"+ jviewModelObject.getViewName() -- Gitblit v1.9.3