| | |
| | | //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());//编码 |
| | | } |
| | | }); |
| | | } |
| | |
| | | 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(); |
| | |
| | | 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); |
| | |
| | | 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()); |
| | |
| | | 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); |
| | | } |
| | | }); |