| | |
| | | systemId = interParameterVO.getData().getSystemId(); |
| | | UserVO userVo = interParameterVO.getData().getUser(); |
| | | //免密登录申请token,request中添加用户信息 |
| | | |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(Locale.ROOT),this.getRequest()); |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(Locale.ROOT), this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid[0] ="1"; |
| | | throw new Throwable("用户鉴权失败."); |
| | | } |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | | InterParameterVO finalInterParameterVO = interParameterVO; |
| | | //这是账号信息 |
| | |
| | | //校验是否配置 |
| | | DockingSystemConfig dockingSystemConfig=null; |
| | | dockingSystemConfig=checkIspass(finalSystemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue(),codeClassifyVO.getOid()); |
| | | if(dockingSystemConfig==null){ |
| | | if(dockingSystemConfig==null||StringUtils.isBlank(dockingSystemConfig.getOid())){ |
| | | errorid[0] ="101"; |
| | | throw new Throwable("系统标识为【"+ finalSystemId +"】,集成分类为【"+codeClassifyVO.getName()+"】以上分类,"+sysIntegrationPushTypeEnum.ACCPET_APPCODE.getText()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO); |
| | | }); |
| | | }else{ |
| | | |
| | | XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO(); |
| | | xmlResultDataObjectDetailDO.setCode(""); |
| | | xmlResultDataObjectDetailDO.setId(""); |
| | |
| | | resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO); |
| | | } |
| | | e.printStackTrace(); |
| | | log.error(e.getMessage()); |
| | | }finally { |
| | | XMLResultClassfyVO resultClassfyVO = new XMLResultClassfyVO(); |
| | | resultClassfyVO.setClassCode(classVO.getClassCode()); |
| | |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | msg="申请编码失败:"+e.getMessage(); |
| | | log.error(msg); |
| | | /* XMLResultSystemVO XMLResultSystemVO=new XMLResultSystemVO(); |
| | | XMLResultSystemVO.setErrorid(errorid); |
| | | XMLResultSystemVO.setMsg("申请编码失败:->"+e.getMessage()); |
| | |
| | | if(!CollectionUtils.isEmpty(resultClassfyVOList)) { |
| | | resultClassfyVOList.stream().forEach(xMLResultClassfyVO -> { |
| | | xMLResultClassfyVO.getObjects().stream().forEach(objec -> { |
| | | if (!(objec.getErrorid().equals("0") || objec.getErrorid().equals("204"))) { |
| | | if (!(objec.getErrorid().equals("0")||objec.getErrorid().equals("201") ||objec.getErrorid().equals("205")|| objec.getErrorid().equals("204"))) { |
| | | issucess[0] = false; |
| | | msg=objec.getMsg(); |
| | | } |
| | | msg=objec.getMsg(); |
| | | }); |
| | | }); |
| | | } |
| | |
| | | this.saveLogs(systemId, systemId, data, resultStr, issucess[0], msg, "applyCode"); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | log.info("返回参数:"+resultStr); |
| | |
| | | if(personData==null){ |
| | | throw new Throwable("传入参数为null"); |
| | | } |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemCode.toLowerCase(Locale.ROOT),this.getRequest()); |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemCode.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | masterDataList = personData.getMasterData(); |
| | | String personLibrary = personAndDeptConfig.getPersonLibrary(); |
| | | if (StringUtils.isBlank(personLibrary)) { |
| | |
| | | ApplyDatasVO applyDatasVO=new ApplyDatasVO(); |
| | | ApplyDatasVO editDatasVO=new ApplyDatasVO(); |
| | | if(!CollectionUtils.isEmpty(cboList)){ |
| | | Map<String,ClientBusinessObject> oldpplyDataVOMap= cboList.stream().filter(data -> data != null && StringUtils.isNotBlank(data.getId())).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | Map<String,ClientBusinessObject> oldpplyDataVOMap = cboList.stream().filter(data -> data != null && StringUtils.isNotBlank(data.getId())).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | //数据库不存在的 |
| | | List<ApplyDataVO> applyApplyDataVOList = applyDataVOList.stream().filter(cbo -> { |
| | | String code =cbo.getCode(); |
| | |
| | | throw new Throwable("传入参数为null"); |
| | | } |
| | | systemCode=orgData.getSystemCode(); |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemCode.toLowerCase(),this.getRequest()); |
| | | |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemCode.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | orgMasterDataList = orgData.getMasterData(); |
| | | String personLibrary = personAndDeptConfig.getPersonLibrary(); |
| | | if (StringUtils.isBlank(personLibrary)) { |
| | |
| | | UserVO userVo = interParameterVO.getData().getUser(); |
| | | //免密登录申请token,request中添加用户信息 |
| | | //passwordFreeLoginService.pwdFreeLoginByBoolean(userVo.getUserName(),this.getRequest()); |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(Locale.ROOT),this.getRequest()); |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid = "1"; |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | | InterParameterVO finalInterParameterVO = interParameterVO; |
| | | //这是账号信息 |
| | |
| | | if(CODE_CHECKCONFIG) { |
| | | //校验是否配置 |
| | | DockingSystemConfig dockingSystemConfig= checkIspass(finalSystemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getValue(),codeClassifyVO.getOid()); |
| | | if(dockingSystemConfig==null){ |
| | | if(dockingSystemConfig==null||StringUtils.isBlank(dockingSystemConfig.getOid())){ |
| | | objerrorCode ="101"; |
| | | throw new Throwable("系统标识为【"+ finalSystemId +"】,集成分类为【"+codeClassifyVO.getName()+"】以上分类,"+sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getText()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | if(!CollectionUtils.isEmpty(resultClassfyVOList)) { |
| | | resultClassfyVOList.stream().forEach(xMLResultClassfyVO -> { |
| | | xMLResultClassfyVO.getObjects().stream().forEach(objec -> { |
| | | if (!(objec.getErrorid().equals("0") || objec.getErrorid().equals("204"))) { |
| | | if (!(objec.getErrorid().equals("0")||objec.getErrorid().equals("201") ||objec.getErrorid().equals("205")|| objec.getErrorid().equals("204"))) { |
| | | issucess[0] = false; |
| | | msg=objec.getMsg(); |
| | | } |
| | | msg=objec.getMsg(); |
| | | }); |
| | | }); |
| | | } |
| | |
| | | systemId=queryData.getSystemId(); |
| | | //免密登录申请token,request中添加用户信息 |
| | | //passwordFreeLoginService.pwdFreeLoginByBoolean(userVo.getUserName(),this.getRequest()); |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid = "1"; |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | |
| | | QueryLibraryVO libraryVO= queryData.getLibrary(); |
| | | String libId= libraryVO.getId(); |
| | |
| | | UserVO userVo=condtionsVO.getUser(); |
| | | //免密登录申请token,request中添加用户信息 |
| | | //passwordFreeLoginService.pwdFreeLoginByBoolean(userVo.getUserName(),this.getRequest()); |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid = "1"; |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | CondtionVO condtionVO= condtionsVO.getCondtion(); |
| | | SessionInfo sessionInfo = new SessionInfo(); |
| | | sessionInfo.setUserId(userVo.getUserName()); |
| | |
| | | if(CODE_CHECKCONFIG) { |
| | | //校验是否配置 |
| | | DockingSystemConfig dockingSystemConfig= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getValue(),currentCodeClassify[0].getOid()); |
| | | if(dockingSystemConfig==null){ |
| | | if(dockingSystemConfig==null||StringUtils.isBlank(dockingSystemConfig.getOid())){ |
| | | errorid ="101"; |
| | | throw new Throwable("系统标识为【"+ systemId +"】,集成分类为【"+currentCodeClassify[0].getName()+"】以上分类,"+sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getText()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | systemId=queryData.getSystemId(); |
| | | //免密登录申请token,request中添加用户信息 |
| | | //passwordFreeLoginService.pwdFreeLoginByBoolean(userVo.getUserName(),this.getRequest()); |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid = "1"; |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | |
| | | QueryLibraryVO libraryVO= queryData.getLibrary(); |
| | | String libId= libraryVO.getId(); |
| | |
| | | UserVO userVo = applyBZParamVO.getData().getUser(); |
| | | //免密登录申请token,request中添加用户信息 |
| | | //passwordFreeLoginService.pwdFreeLoginByBoolean(userVo.getUserName(), this.getRequest()); |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | try { |
| | | passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(),this.getRequest()); |
| | | }catch (Throwable e){ |
| | | errorid[0] = "1"; |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | //这是账号信息 |
| | | SessionInfo sessionInfo = new SessionInfo(); |
| | | sessionInfo.setUserId(userVo.getUserName()); |
| | |
| | | //校验是否配置 |
| | | DockingSystemConfig dockingSystemConfig=null; |
| | | dockingSystemConfig=checkIspass(finalSystemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue(),codeClassifyVO.getOid()); |
| | | if(dockingSystemConfig==null){ |
| | | if(dockingSystemConfig==null||StringUtils.isBlank(dockingSystemConfig.getOid())){ |
| | | errorid[0] ="101"; |
| | | throw new Throwable("系统标识为【"+ finalSystemId +"】,集成分类为【"+codeClassifyVO.getName()+"】以上分类,"+sysIntegrationPushTypeEnum.ACCPET_APPCODE.getText()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | codeBZApplyDTO.setLastModifier(applyBZDataVO.getEditor()); |
| | | codeBZApplyDTO.setLcStatus(applyBZDataVO.getStatus()); |
| | | ApplyBZDatasVO newApplyBZDatasVO=new ApplyBZDatasVO(); |
| | | applyBZDataVO.setProp(proppertyVOList); |
| | | newApplyBZDatasVO.setObject(Arrays.asList(applyBZDataVO)); |
| | | log.info("end:数据组织完毕"); |
| | | this.getConfigDatas(finalSystemId, finalLibray, newApplyBZDatasVO, attrVOS, dataObjectVO); |
| | |
| | | if(!CollectionUtils.isEmpty(resultClassfyVOList)) { |
| | | resultClassfyVOList.stream().forEach(xMLResultClassfyVO -> { |
| | | xMLResultClassfyVO.getObjects().stream().forEach(objec -> { |
| | | if (!(objec.getErrorid().equals("0") || objec.getErrorid().equals("204"))) { |
| | | if (!(objec.getErrorid().equals("0")||objec.getErrorid().equals("201")||objec.getErrorid().equals("205") || objec.getErrorid().equals("204"))) { |
| | | issucess[0] = false; |
| | | msg=objec.getMsg(); |
| | | } |
| | | msg=objec.getMsg(); |
| | | }); |
| | | }); |
| | | } |
| | |
| | | return clientBusinessObjectList; |
| | | } |
| | | |
| | | |
| | | private List<CodeOrderSecDTO> getRuleCodeOrderSecDTOsBZ(CodeRuleVO ruleVO,CodeClassifyFullInfoBO classifyFullInfo){ |
| | | List<CodeBasicSecVO> codeBasicSecVOS= ruleVO.getSecVOList(); |
| | | List<CodeOrderSecDTO> codeOrderSecDTOList=new ArrayList<>(); |
| | |
| | | } |
| | | return codeOrderSecDTOList; |
| | | } |
| | | |
| | | |
| | | /*** |
| | | * 根据传入的参数信息校验码段规则 |
| | |
| | | return codeOrderSecDTOList; |
| | | } |
| | | |
| | | /*** |
| | | * 读取属性映射配置信息 |
| | | * @param systemId |
| | | * @param libray |
| | | * @param applyDatasVO |
| | | * @param codeClassifyTemplateAttrVOList |
| | | * @param dataObjectVO |
| | | * @throws Throwable |
| | | */ |
| | | public void getConfigDatas(String systemId,String libray, ApplyBZDatasVO applyDatasVO,List<CodeClassifyTemplateAttrVO> codeClassifyTemplateAttrVOList,DataObjectVO dataObjectVO) throws Throwable { |
| | | |
| | | LinkedHashMap<String,LinkedHashMap<String,String>> dataKeyValueMap=new LinkedHashMap<>(); |
| | | //如果将数据转换成所需要的数据对象 |
| | | Map<String, String> attrMapConfigMap=new HashMap<>(); |
| | | Map<String, String> propMaps=new HashMap<>(); |
| | | try { |
| | | log.info("开始读取系统配置文件 start"); |
| | | Map<String, String> stringStringMap=attributeMapConfig.getSystem_attrmap(); |
| | | log.info("集成系统属性映射配置文件条目数-》"+stringStringMap.size()); |
| | | //stringStringMap.put("RLM","D:\\RLM.xml"); |
| | | if(!CollectionUtils.isEmpty(stringStringMap)) { |
| | | log.info("开始读取系统配置文件 start"); |
| | | Map<String, String> stringStringMap=attributeMapConfig.getSystem_attrmap(); |
| | | log.info("集成系统属性映射配置文件条目数-》"+stringStringMap.size()); |
| | | //stringStringMap.put("RLM","D:\\RLM.xml"); |
| | | if(!CollectionUtils.isEmpty(stringStringMap)) { |
| | | List<LibraryClsfDO> libraryClsfDOList=new ArrayList<>(); |
| | | try { |
| | | log.info("info:需要读取配置文件"); |
| | | LibraryDO libraryDO = gennerAttrMapUtil.getNewInstance().gennerAttrMapBySystem(systemId, stringStringMap); |
| | | List<LibraryClsfDO> libraryClsfDOList = libraryDO.getClsf(); |
| | | if(!CollectionUtils.isEmpty(libraryClsfDOList)) { |
| | | Map<String, List<ClsfAttrMappingDO>> libPropMaps = libraryClsfDOList.stream().collect(Collectors.toMap(LibraryClsfDO::getLibrary, LibraryClsfDO::getProp, (key1, key2) -> key2)); |
| | | log.info("根据参数:libray:-》" + libray + "从配置文件中找对应属性映射配置"); |
| | | String path=stringStringMap.get(systemId); |
| | | if (libPropMaps.containsKey(libray.toUpperCase(Locale.ROOT))) { |
| | | log.info("根据参数:libray:-》" + libray + "匹配到相应的属性映射信息"); |
| | | List<ClsfAttrMappingDO> clsfAttrMappingDOList = libPropMaps.get(libray.toUpperCase(Locale.ROOT)); |
| | | propMaps = clsfAttrMappingDOList.stream().collect(Collectors.toMap(ClsfAttrMappingDO::getSourceKey, ClsfAttrMappingDO::getTargetKey, (key1, key2) -> key2)); |
| | | log.info("根据参数:libray:-》" + libray + "匹配到相应的属性映射信息,属性映射条目数+" + clsfAttrMappingDOList.size()); |
| | | }else{ |
| | | throw new Throwable("根据系统标识【"+systemId+"】找到对应的配置文件:【"+path+"】,但未获取到对应的库【"+libray+"】属性映射信息配置"); |
| | | } |
| | | } |
| | | libraryClsfDOList = libraryDO.getClsf(); |
| | | } catch (Throwable e) { |
| | | objerrorCode = "1"; |
| | | e.printStackTrace(); |
| | | throw new Throwable("集成系统标识为:【" + systemId + "】,分类库为:【" + libray + "】的集成属性配置文件读取失败"); |
| | | } |
| | | log.info("根据参数:libray:-》"+libray+"从配置文件中找对应属性映射配置 end "); |
| | | }catch (Throwable e){ |
| | | objerrorCode="1"; |
| | | e.printStackTrace(); |
| | | throw new Throwable("MDM集成属性配置文件读取失败"); |
| | | // String path = stringStringMap.get(systemId); |
| | | // 忽略key大小写,获取配置的映射文件路径 |
| | | String path = VciBaseUtil.getMapStrValueIgnoreCase(stringStringMap,systemId); |
| | | if (!CollectionUtils.isEmpty(libraryClsfDOList)) { |
| | | Map<String, List<ClsfAttrMappingDO>> libPropMaps = libraryClsfDOList.stream().collect(Collectors.toMap(LibraryClsfDO::getLibrary, LibraryClsfDO::getProp, (key1, key2) -> key2)); |
| | | log.info("根据参数:libray:-》" + libray + "从配置文件中找对应属性映射配置"); |
| | | if (libPropMaps.containsKey(libray.toUpperCase(Locale.ROOT))) { |
| | | log.info("根据参数:libray:-》" + libray + "匹配到相应的属性映射信息"); |
| | | List<ClsfAttrMappingDO> clsfAttrMappingDOList = libPropMaps.get(libray.toUpperCase(Locale.ROOT)); |
| | | propMaps = clsfAttrMappingDOList.stream().collect(Collectors.toMap(ClsfAttrMappingDO::getSourceKey, ClsfAttrMappingDO::getTargetKey, (key1, key2) -> key2)); |
| | | log.info("根据参数:libray:-》" + libray + "匹配到相应的属性映射信息,属性映射条目数+" + clsfAttrMappingDOList.size()); |
| | | } else { |
| | | objerrorCode = "1"; |
| | | throw new Throwable("根据系统标识【" + systemId + "】找到对应的配置文件:【" + path + "】,但未获取到对应的库【" + libray + "】属性映射信息配置"); |
| | | } |
| | | }else{ |
| | | objerrorCode = "1"; |
| | | throw new Throwable("根据系统标识【" + systemId + "】找到对应的配置文件:【" + path + "】,但未获取到对应的库【" + libray + "】属性映射信息配置"); |
| | | } |
| | | }else{ |
| | | objerrorCode = "1"; |
| | | throw new Throwable("未获取到集成属性映射系统配置信息"); |
| | | } |
| | | log.info("根据参数:libray:-》"+libray+"从配置文件中找对应属性映射配置 end "); |
| | | LinkedList<String> rowNameList=new LinkedList<>(); |
| | | LinkedHashMap<String,Integer> filedIndexMap=new LinkedHashMap<>(); |
| | | //根据分类模板组织数据 |
| | |
| | | } |
| | | |
| | | /*** |
| | | * 根据属性映射转换编码所需字段 |
| | | * 读取属性映射配置信息 |
| | | * @param systemId |
| | | * @param libray |
| | | * @param applyDatasVO |
| | | * @param codeClassifyTemplateAttrVOList |
| | | * @param dataObjectVO |
| | | * @throws Throwable |
| | | */ |
| | | public void getConfigDatas(String systemId,String libray, ApplyDatasVO applyDatasVO,List<CodeClassifyTemplateAttrVO> codeClassifyTemplateAttrVOList,DataObjectVO dataObjectVO) throws Throwable { |
| | | |
| | |
| | | //如果将数据转换成所需要的数据对象 |
| | | Map<String, String> attrMapConfigMap=new HashMap<>(); |
| | | Map<String, String> propMaps=new HashMap<>(); |
| | | try { |
| | | log.info("开始读取系统配置文件 start"); |
| | | Map<String, String> stringStringMap=attributeMapConfig.getSystem_attrmap(); |
| | | log.info("集成系统属性映射配置文件条目数-》"+stringStringMap.size()); |
| | | //stringStringMap.put("RLM","D:\\RLM.xml"); |
| | | if(!CollectionUtils.isEmpty(stringStringMap)) { |
| | | log.info("开始读取系统配置文件 start"); |
| | | Map<String, String> stringStringMap=attributeMapConfig.getSystem_attrmap(); |
| | | log.info("集成系统属性映射配置文件条目数-》"+stringStringMap.size()); |
| | | //stringStringMap.put("RLM","D:\\RLM.xml"); |
| | | if(!CollectionUtils.isEmpty(stringStringMap)) { |
| | | List<LibraryClsfDO> libraryClsfDOList=new ArrayList<>(); |
| | | try { |
| | | log.info("info:需要读取配置文件"); |
| | | LibraryDO libraryDO = gennerAttrMapUtil.getNewInstance().gennerAttrMapBySystem(systemId, stringStringMap); |
| | | List<LibraryClsfDO> libraryClsfDOList = libraryDO.getClsf(); |
| | | if(!CollectionUtils.isEmpty(libraryClsfDOList)) { |
| | | Map<String, List<ClsfAttrMappingDO>> libPropMaps = libraryClsfDOList.stream().collect(Collectors.toMap(LibraryClsfDO::getLibrary, LibraryClsfDO::getProp, (key1, key2) -> key2)); |
| | | log.info("根据参数:libray:-》" + libray + "从配置文件中找对应属性映射配置"); |
| | | String path=stringStringMap.get(systemId); |
| | | if (libPropMaps.containsKey(libray.toUpperCase(Locale.ROOT))) { |
| | | log.info("根据参数:libray:-》" + libray + "匹配到相应的属性映射信息"); |
| | | List<ClsfAttrMappingDO> clsfAttrMappingDOList = libPropMaps.get(libray.toUpperCase(Locale.ROOT)); |
| | | propMaps = clsfAttrMappingDOList.stream().collect(Collectors.toMap(ClsfAttrMappingDO::getSourceKey, ClsfAttrMappingDO::getTargetKey, (key1, key2) -> key2)); |
| | | log.info("根据参数:libray:-》" + libray + "匹配到相应的属性映射信息,属性映射条目数+" + clsfAttrMappingDOList.size()); |
| | | }else{ |
| | | throw new Throwable("根据系统标识【"+systemId+"】找到对应的配置文件:【"+path+"】,但未获取到对应的库【"+libray+"】属性映射信息配置"); |
| | | } |
| | | } |
| | | libraryClsfDOList = libraryDO.getClsf(); |
| | | } catch (Throwable e) { |
| | | objerrorCode = "1"; |
| | | e.printStackTrace(); |
| | | throw new Throwable("集成系统标识为:【" + systemId + "】,分类库为:【" + libray + "】的集成属性配置文件读取失败"); |
| | | } |
| | | log.info("根据参数:libray:-》"+libray+"从配置文件中找对应属性映射配置 end "); |
| | | }catch (Throwable e){ |
| | | objerrorCode="1"; |
| | | e.printStackTrace(); |
| | | throw new Throwable("MDM集成属性配置文件读取失败"); |
| | | // String path = stringStringMap.get(systemId); |
| | | // 忽略key大小写,获取配置的映射文件路径 |
| | | String path = VciBaseUtil.getMapStrValueIgnoreCase(stringStringMap,systemId); |
| | | if (!CollectionUtils.isEmpty(libraryClsfDOList)) { |
| | | Map<String, List<ClsfAttrMappingDO>> libPropMaps = libraryClsfDOList.stream().collect(Collectors.toMap(LibraryClsfDO::getLibrary, LibraryClsfDO::getProp, (key1, key2) -> key2)); |
| | | log.info("根据参数:libray:-》" + libray + "从配置文件中找对应属性映射配置"); |
| | | if (libPropMaps.containsKey(libray.toUpperCase(Locale.ROOT))) { |
| | | log.info("根据参数:libray:-》" + libray + "匹配到相应的属性映射信息"); |
| | | List<ClsfAttrMappingDO> clsfAttrMappingDOList = libPropMaps.get(libray.toUpperCase(Locale.ROOT)); |
| | | propMaps = clsfAttrMappingDOList.stream().collect(Collectors.toMap(ClsfAttrMappingDO::getSourceKey, ClsfAttrMappingDO::getTargetKey, (key1, key2) -> key2)); |
| | | log.info("根据参数:libray:-》" + libray + "匹配到相应的属性映射信息,属性映射条目数+" + clsfAttrMappingDOList.size()); |
| | | } else { |
| | | objerrorCode = "1"; |
| | | throw new Throwable("根据系统标识【" + systemId + "】找到对应的配置文件:【" + path + "】,但未获取到对应的库【" + libray + "】属性映射信息配置"); |
| | | } |
| | | }else{ |
| | | objerrorCode = "1"; |
| | | throw new Throwable("根据系统标识【" + systemId + "】找到对应的配置文件:【" + path + "】,但未获取到对应的库【" + libray + "】属性映射信息配置"); |
| | | } |
| | | }else{ |
| | | objerrorCode = "1"; |
| | | throw new Throwable("未获取到集成属性映射系统配置信息"); |
| | | } |
| | | log.info("根据参数:libray:-》"+libray+"从配置文件中找对应属性映射配置 end "); |
| | | LinkedList<String> rowNameList=new LinkedList<>(); |
| | | LinkedHashMap<String,Integer> filedIndexMap=new LinkedHashMap<>(); |
| | | //根据分类模板组织数据 |
| | |
| | | */ |
| | | private DockingSystemConfig checkIspass(String systemId,String type,String operationType,String classOid){ |
| | | log.info("systemId:"+systemId+",type:"+SysIntegrationDataFlowTypeEnum.getTextByValue(type)+",operationType:"+sysIntegrationPushTypeEnum.getTextByValue(operationType)+",classOid:"+classOid); |
| | | CodeClassifyVO codeClassifyVO= classifyService.getObjectByOid(classOid); |
| | | classOid=codeClassifyVO.getOid(); |
| | | //CodeClassifyVO codeClassifyVO= classifyService.getObjectByOid(classOid); |
| | | List<CodeClassify> codeClassifyList= classifyService.selectAllLevelParentByOid(classOid); |
| | | List<String> classifyOids=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(codeClassifyList)) { |
| | | classifyOids = codeClassifyList.stream().map(CodeClassify::getOid).collect(Collectors.toList()); |
| | | }else{ |
| | | return null; |
| | | } |
| | | //classOid=codeClassifyVO.getOid(); |
| | | //根据类型去查询需要集成的分类或者数据 |
| | | LambdaQueryWrapper<DockingSystemConfig> queryWrapper = Wrappers.<DockingSystemConfig>lambdaQuery(); |
| | | queryWrapper.eq(DockingSystemConfig::getUsedFlag, MdmDuckingConstant.SEND_FLAG_TRUE); |
| | |
| | | queryWrapper.eq(DockingSystemConfig::getDataFlowType,type); |
| | | queryWrapper.eq(DockingSystemConfig::getPushType,operationType); |
| | | if(StringUtils.isNotBlank(classOid)){ |
| | | queryWrapper.in(DockingSystemConfig::getClassifyOid,classOid); |
| | | queryWrapper.in(DockingSystemConfig::getClassifyOid,classifyOids); |
| | | } |
| | | List<DockingSystemConfig> dockingSystemConfigList=new ArrayList<>(); |
| | | dockingSystemConfigList= dockingSystemConfigList=dockingSystemConfigService.list(queryWrapper); |
| | | if(!CollectionUtils.isEmpty(dockingSystemConfigList)){ |
| | | return dockingSystemConfigList.get(0); |
| | | }else{ |
| | | return null; |
| | | } |
| | | /*if(!CollectionUtils.isEmpty(dockingSystemConfigList)){ |
| | | return dockingSystemConfigList.get(0); |
| | | }else{ |
| | | if(StringUtils.isNotBlank(codeClassifyVO.getParentCodeClassifyOid())) { |
| | |
| | | return dockingSystemConfigList.get(0); |
| | | }else{ |
| | | return new DockingSystemConfig(); |
| | | } |
| | | }*/ |
| | | } |
| | | } |