田源
2025-03-05 be30e17e3c7685a54f761bf3a03487308c939270
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -38,7 +38,10 @@
import com.vci.ubcs.code.webService.annotation.VciWebservice;
import com.vci.ubcs.code.webService.config.AttributeMapConfig;
import com.vci.ubcs.code.webService.config.PersonAndDeptConfig;
import com.vci.ubcs.omd.cache.EnumCache;
import com.vci.ubcs.omd.feign.IBtmTypeClient;
import com.vci.ubcs.omd.feign.IDictClient;
import com.vci.ubcs.omd.feign.IEnumClient;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.revision.model.TreeQueryObject;
@@ -941,29 +944,29 @@
                        orderDTO.setSecDTOList(codeOrderSecDTOList);//存储编码
                        orderDTO.setData(rowData.getFiledValue());
                        String code = engineService.addSaveCodeNotauthUser(orderDTO,false);
                     /*if(StringUtils.isNotBlank(code)) {
                        //rowData.setCode(code);
                        StringBuffer sqlsb = new StringBuffer();
                        sqlsb.append(" select * from ");
                        sqlsb.append(tableName);
                        sqlsb.append(" where 1=1 ");
                        sqlsb.append(" and lastr=1 and lastv=1");
                        sqlsb.append(" and id in (");
                        sqlsb.append(VciBaseUtil.toInSql(code));
                        sqlsb.append(")");
                        List<Map<String, String>> newDataMapList = commonsMapper.queryByOnlySqlForMap(sqlsb.toString());
                        if (!CollectionUtils.isEmpty(newDataMapList)) {
                           String oid = StringUtils.isBlank(newDataMapList.get(0).get("OID")) ? "" : newDataMapList.get(0).get("OID");
                           List<String> oidList = new ArrayList<>();
                           oidList.add(oid);
                           //如果有申请就去调用申请集团码
                           if (isPersonApplyGroupCode) {
                              mdmIOService.sendApplyGroupcode(oidList, templateVO.getBtmTypeId(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue());
                              success.set(true);
                              mesg = "数据保存成功,等待申请集团码";
                        /*if(StringUtils.isNotBlank(code)) {
                           //rowData.setCode(code);
                           StringBuffer sqlsb = new StringBuffer();
                           sqlsb.append(" select * from ");
                           sqlsb.append(tableName);
                           sqlsb.append(" where 1=1 ");
                           sqlsb.append(" and lastr=1 and lastv=1");
                           sqlsb.append(" and id in (");
                           sqlsb.append(VciBaseUtil.toInSql(code));
                           sqlsb.append(")");
                           List<Map<String, String>> newDataMapList = commonsMapper.queryByOnlySqlForMap(sqlsb.toString());
                           if (!CollectionUtils.isEmpty(newDataMapList)) {
                              String oid = StringUtils.isBlank(newDataMapList.get(0).get("OID")) ? "" : newDataMapList.get(0).get("OID");
                              List<String> oidList = new ArrayList<>();
                              oidList.add(oid);
                              //如果有申请就去调用申请集团码
                              if (isPersonApplyGroupCode) {
                                 mdmIOService.sendApplyGroupcode(oidList, templateVO.getBtmTypeId(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue());
                                 success.set(true);
                                 mesg = "数据保存成功,等待申请集团码";
                              }
                           }
                        }
                     }*/
                        }*/
                     } catch (Exception e) {
                        log.error( "部门数据接收失败:",e);
                        mesg=e.getMessage();
@@ -2423,8 +2426,13 @@
      return codeOrderSecDTOList;
   }
   /***
   /**
    * 根据传入的参数信息校验码段规则
    * @param SectionVOList
    * @param ruleVO
    * @param classifyFullInfo
    * @return
    * @throws Throwable
    */
   private List<CodeOrderSecDTO> getRuleCodeOrderSecDTOs(List<SectionVO> SectionVOList,CodeRuleVO ruleVO,CodeClassifyFullInfoBO classifyFullInfo) throws Throwable{
      List<CodeBasicSecVO>  codeBasicSecVOS= ruleVO.getSecVOList();
@@ -2440,6 +2448,9 @@
      //   String newSecName=codeBasicSecVO.getName();
         String classifySecOid= codeBasicSecVO.getOid();
         String message="";
         //#NaN?表示码值为空的场景
         String nullSymbol = EnumCache.getValue("nullSymbol", "NULL");
         nullSymbol = Func.isBlank(nullSymbol) ? "#NaN?":nullSymbol;
         if (!sectype.equals(CodeSecTypeEnum.CODE_SERIAL_SEC.getValue())) {
            String name = codeBasicSecVO.getName();
            String sectypeText = codeBasicSecVO.getSecTypeText();
@@ -2456,8 +2467,8 @@
                  List<CodeClassifyValue> codeClassifyValueDOList = codeClassifyValueService.list(Wrappers.<CodeClassifyValue>query().lambda().eq(CodeClassifyValue::getCodeClassifySecOid,classifySecOid));
                  if (!CollectionUtils.isEmpty(codeClassifyValueDOList)) {
                     Map<String, CodeClassifyValue> codeClassifyValueDOMap = codeClassifyValueDOList.stream().collect(Collectors.toMap(s -> s.getId(), t -> t, (o1, o2) -> o2));
                     if(codeClassifyValueDOMap.containsKey(sectypeValue)){
                        CodeClassifyValue codeClassifyValue=   codeClassifyValueDOMap.get(sectypeValue);
                     if(codeClassifyValueDOMap.containsKey(sectypeValue) || nullSymbol.equals(sectypeValue)){
                        CodeClassifyValue codeClassifyValue = codeClassifyValueDOMap.get(sectypeValue);
                        sectypeValue=codeClassifyValue.getOid();
                     }else {
                        //throw new Throwable("传入的分类码段:【" + name + " 值:" + sectypeValue + "】,不符合当前分类层级代号");