| | |
| | | //校验是否配置 |
| | | 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()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | resultStr= transferResultXMl(xmlResultSystemVO,dataType); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | StringWriter sw = new StringWriter(); |
| | | PrintWriter pw = new PrintWriter(sw); |
| | | e.printStackTrace(pw);//将出错的栈信息输出到printWriter中 |
| | | pw.flush(); |
| | | sw.flush(); |
| | | msg="申请编码失败:"+e.getMessage(); |
| | | /* XMLResultSystemVO XMLResultSystemVO=new XMLResultSystemVO(); |
| | | XMLResultSystemVO.setErrorid(errorid); |
| | |
| | | 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(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()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | //校验是否配置 |
| | | 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()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | }catch (Throwable e){ |
| | | objerrorCode="1"; |
| | | e.printStackTrace(); |
| | | throw new Throwable("MDM集成属性配置文件读取失败"); |
| | | throw new Throwable("集成系统标识为:【"+systemId+"】,分类库为:【"+libray+"】的集成属性配置文件读取失败"); |
| | | } |
| | | LinkedList<String> rowNameList=new LinkedList<>(); |
| | | LinkedHashMap<String,Integer> filedIndexMap=new LinkedHashMap<>(); |
| | |
| | | }catch (Throwable e){ |
| | | objerrorCode="1"; |
| | | e.printStackTrace(); |
| | | throw new Throwable("MDM集成属性配置文件读取失败"); |
| | | throw new Throwable("集成系统标识为:【"+systemId+"】,分类库为:【"+libray+"】的集成属性配置文件读取失败"); |
| | | } |
| | | 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(); |
| | | } |
| | | }*/ |
| | | } |
| | | } |