| | |
| | | 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()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | 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(); |
| | | }); |
| | | }); |
| | | } |
| | |
| | | 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)) { |
| | |
| | | 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()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | |
| | | 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(); |
| | | }); |
| | | }); |
| | | } |
| | |
| | | }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(); |
| | | } |
| | | }*/ |
| | | } |
| | | } |