ludc
2024-04-16 b181dbc0898bfb4dd8f34dfd3c3961b4499720f1
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()