| | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.DEFAULT_SYNC_ATTR_LIST; |
| | |
| | | //获取分类信息 |
| | | try { |
| | | libray = classVO.getLibrary(); |
| | | CodeClassifyVO codeClassifyVO = getClassfy(classVO); |
| | | CodeClassifyVO codeClassifyVO = getClassfy(classVO,libray); |
| | | log.info("end:分类查询完毕"); |
| | | //获取分类模板信息 |
| | | if(codeClassifyVO==null || StringUtils.isBlank(codeClassifyVO.getOid())){ |
| | |
| | | DockingSystemConfig dockingSystemConfig= checkIspass(finalSystemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue(),codeClassifyVO.getOid()); |
| | | if(dockingSystemConfig==null){ |
| | | errorid[0] ="101"; |
| | | throw new Throwable("系统标识为【"+ finalSystemId +"】,集成分类为【+codeClassifyVO.getName()】以上分类,"+sysIntegrationPushTypeEnum.ACCPET_APPCODE.getText()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | throw new Throwable("系统标识为【"+ finalSystemId +"】,集成分类为【"+codeClassifyVO.getName()+"】以上分类,"+sysIntegrationPushTypeEnum.ACCPET_APPCODE.getText()+"接口配置已停用或者未配置,请联系编码管理员!"); |
| | | } |
| | | isCodeOrGroupCode="true".equals(dockingSystemConfig.getIsGroupCodeFlag())?true:false; |
| | | } |
| | |
| | | //获取分类信息 |
| | | try { |
| | | String libray = classVO.getLibrary(); |
| | | CodeClassifyVO codeClassifyVO = getClassfy(classVO); |
| | | CodeClassifyVO codeClassifyVO = getClassfy(classVO,libray); |
| | | if(codeClassifyVO==null || StringUtils.isBlank(codeClassifyVO.getOid())){ |
| | | objerrorCode="100"; |
| | | throw new Throwable ("根据传输的分类,未获取到分类信息"); |
| | |
| | | * 查询校验分类信息 |
| | | * @param classfyVO |
| | | */ |
| | | private CodeClassifyVO getClassfy(ClassfyVO classfyVO) throws Throwable{ |
| | | private CodeClassifyVO getClassfy(ClassfyVO classfyVO,String libray) throws Throwable{ |
| | | CodeClassifyVO classifyVO = new CodeClassifyVO(); |
| | | try { |
| | | String classCode = classfyVO.getClassCode(); |
| | |
| | | if (StringUtils.isNotBlank(classfyVO.getClassCode())) { |
| | | Map<String, String> conditionMap = new HashMap<>(); |
| | | List<CodeClassify> codeClassifyList = classifyService.selectByWrapper(Wrappers.<CodeClassify>query().lambda().eq(CodeClassify::getId, classCode)); |
| | | final CodeClassify[] newCodeClassify = {new CodeClassify()}; |
| | | if (!CollectionUtils.isEmpty(codeClassifyList)) { |
| | | CodeClassify classifyDO = codeClassifyList.get(0); |
| | | //将DTO转换为DO |
| | | codeClassifyList.stream().forEach(codeClassify -> { |
| | | CodeClassifyVO codeClassifyVO= classifyService.getTopClassifyVO(codeClassify.getOid()); |
| | | if(codeClassifyVO.getId().equals(libray)){ |
| | | newCodeClassify[0] =codeClassify; |
| | | } |
| | | }); |
| | | classifyVO = new CodeClassifyVO(); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(classifyDO, classifyVO); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(newCodeClassify[0], classifyVO); |
| | | //将DTO转换为DO |
| | | if(StringUtils.isBlank(classifyVO.getOid())){ |
| | | throw new Throwable("根据分类代号未查询到相应的分类信息"); |
| | | throw new Throwable("申请编码的分类:【"+classCode+"】不属于库节点【"+libray+"】,请检查参数分类节点/库节点信息是否匹配"); |
| | | } |
| | | }else{ |
| | | throw new Throwable("根据分类代号未查询到相应的分类信息"); |
| | |
| | | } |
| | | }catch (Throwable e){ |
| | | objerrorCode="100"; |
| | | new Throwable("获取分类信息失败:"+e.getMessage()); |
| | | throw new Throwable("获取分类信息失败:"+e.getMessage()); |
| | | } |
| | | return classifyVO; |
| | | } |