xiejun
2023-09-05 eeeee637b25f37ebc0c7336bb78a7533c704f976
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -213,7 +213,8 @@
               String operation="";
               if(CODE_CHECKCONFIG) {
                  //校验是否配置
                  DockingSystemConfig dockingSystemConfig= checkIspass(finalSystemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue(),codeClassifyVO.getOid());
                  DockingSystemConfig dockingSystemConfig=null;
                  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()+"接口配置已停用或者未配置,请联系编码管理员!");
@@ -878,7 +879,7 @@
         resultStr = object.toString();
      }
      try {    //记录日志
         this.saveLogs(systemId, systemId, data, resultStr, issucess, msg, "queryClassify");
         this.saveLogs(systemId, systemId, data, resultStr, issucess, msg, "queryData");
      }catch (Throwable e){
         e.printStackTrace();
      }
@@ -1330,7 +1331,7 @@
      }
      try {
         //记录日志
         this.saveLogs(systemId, systemId, data, resultStr, issucess, msg, "queryClassify");
         this.saveLogs(systemId, systemId, data, resultStr, issucess, msg, "queryClassifyRule");
      }catch (Throwable e){
         e.printStackTrace();
      }
@@ -1589,6 +1590,7 @@
      dockingLoge.setParamString(parmaData);//参数信息
      dockingLoge.setReturnString(result);//返回信息
      dockingLoge.setType(operation);//日志操作类型
      dockingLoge.setCreateTime(new Date());
      if(isSucess) {
         dockingLoge.setInterfaceStatus("true");//接口集成状态
      }else{
@@ -1677,7 +1679,6 @@
    */
   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);
      DockingSystemConfig dockingSystemConfig=null;
      CodeClassifyVO codeClassifyVO= classifyService.getObjectByOid(classOid);
      classOid=codeClassifyVO.getOid();
      //根据类型去查询需要集成的分类或者数据
@@ -1687,16 +1688,16 @@
      queryWrapper.eq(DockingSystemConfig::getDataFlowType,type);
      queryWrapper.eq(DockingSystemConfig::getPushType,operationType);
      if(StringUtils.isNotBlank(classOid)){
         queryWrapper.in(DockingSystemConfig::getClassifyId,classOid);
         queryWrapper.in(DockingSystemConfig::getClassifyOid,classOid);
      }
      List<DockingSystemConfig> dockingSystemConfigList=   dockingSystemConfigList=dockingSystemConfigService.list(queryWrapper);
      if(!CollectionUtils.isEmpty(dockingSystemConfigList)){
         dockingSystemConfig=dockingSystemConfigList.get(0);
       return   dockingSystemConfigList.get(0);
      }else{
         if(StringUtils.isNotBlank(codeClassifyVO.getParentCodeClassifyOid())) {
            checkIspass(systemId, type, operationType, codeClassifyVO.getParentCodeClassifyOid());
            return checkIspass(systemId, type, operationType, codeClassifyVO.getParentCodeClassifyOid());
         }
      }
      return dockingSystemConfig;
      return dockingSystemConfigList.get(0);
   }
}