xiejun
2025-01-22 d9183aa80ae17d36b79dda48c6b1d7fa22a80ee3
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeMdmInfaceImpl.java
@@ -331,8 +331,8 @@
            //object.setCode(masterData.getOrDefault(currentClassifyConfig.get().getSourceCodeKey(),"").toString());//编码
            if(!CollectionUtils.isEmpty(sourceCodeKeyList)) {
               sourceCodeKeyList.stream().forEach(codekey -> {
                  if (StringUtils.isNotBlank(masterData.getOrDefault(currentClassifyConfig.get().getSourceCodeKey(), "").toString())) {
                     object.setCode(masterData.getOrDefault(currentClassifyConfig.get().getSourceCodeKey(), "").toString());//编码
                  if (StringUtils.isNotBlank(masterData.getOrDefault(codekey, "").toString())) {
                     object.setCode(masterData.getOrDefault(codekey, "").toString());//编码
                  }
               });
            }
@@ -369,7 +369,7 @@
         ApplyDatasVO editDatasVO = new ApplyDatasVO();
         if (!CollectionUtils.isEmpty(cboList)) {
            //根据MDM编码去判断数据是否重复.
            Map<String, ClientBusinessObject> oldpplyDataVOMap = cboList.stream().filter(data -> data != null && StringUtils.isNotBlank(data.getAttributeValue(targetCodeKey))).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue(targetCodeKey).toLowerCase(Locale.ROOT), t -> t));
            Map<String, ClientBusinessObject> oldpplyDataVOMap = cboList.stream().filter(data -> data != null && StringUtils.isNotBlank(data.getAttributeValue(targetCodeKey))).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue(targetCodeKey), t -> t));
            //数据库不存在的
            List<ApplyDataVO> applyApplyDataVOList = applyDataVOList.stream().filter(cbo -> {
               String code = cbo.getCode();
@@ -380,6 +380,8 @@
            List<ApplyDataVO> editApplyDataVOList = applyDataVOList.stream().filter(cbo -> {
               String code = cbo.getCode();
               if (oldpplyDataVOMap.containsKey(code)) {
                  ClientBusinessObject object=   oldpplyDataVOMap.get(code);
                  cbo.setCode(object.getId());
                  cbo.setOperate("update");
               }
               return oldpplyDataVOMap.containsKey(code);
@@ -494,7 +496,7 @@
                  mesg="集成系统:【"+systemCode+"】申请编码失败:" + e.getMessage();
                  mesg = e.getMessage();
                  e.printStackTrace();
                  throw new ServiceException(e.getMessage());
               //   throw new ServiceException(e.getMessage());
               } finally {
                  XMLResultDataObjectDetailDO x = new XMLResultDataObjectDetailDO();
                  x.setId(rowData.getOid());
@@ -711,6 +713,7 @@
                     String dataValue = sourceKeyValueMap.get(sourceKey);
                     if (attrMapConfigMap.containsKey(sourceKey)) {
                        String targetKey = attrMapConfigMap.get(sourceKey);
                        log.info("xxxxx属性映射值:sourceKey【"+sourceKey+"】——》+targetKey---》"+targetKey+":"+dataValue);
                        keyValueMap.put(targetKey, StringUtils.isBlank(dataValue)?"":dataValue);
                     }
                  });