ludc
2023-09-18 de9b95a2f14d42bcde076aeb32f1e1c4396b67f4
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -2329,12 +2329,17 @@
      sb.append(" where 1=1 ");
      sb.append(" and lastr=1 and lastv=1" );
      if(isCodeOrGroupCode) {
         sb.append(" and groupcode in (");
         sb.append(" and ( groupcode in (");
         sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0])));
         sb.append(")");
         sb.append(" or id in (");
         sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0])));
         sb.append("))");
      }else{
         sb.append(" and id in (");
         sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0])));
         sb.append(")");
      }
      sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0])));
      sb.append(")");
      List<Map<String,String>> dataMapList=commonsMapper.queryByOnlySqlForMap(sb.toString());
      List<ClientBusinessObject> cboList=   ChangeMapTOClientBusinessObjects(dataMapList);
@@ -2424,7 +2429,7 @@
               List<CodeAllCode>newCodeAllCodeList= codeAllCodeService.selectByWrapper(Wrappers.<CodeAllCode>query().lambda().eq(CodeAllCode::getCreateCodeOid, cbo.getOid()));
               log.info("codeCbos size:" + newCodeAllCodeList.size());
               if (!CollectionUtils.isEmpty(newCodeAllCodeList)) {
                  CodeAllCode codeCbo = codeAllCodeList.get(0);
                  CodeAllCode codeCbo = newCodeAllCodeList.get(0);
                  log.info("codeCbos code:" + codeCbo.getId());
                  codeCbo.setLcStatus(CodeDefaultLC.TASK_BACK.getValue());
                  codeAllCodeList.add(codeCbo);
@@ -2489,6 +2494,9 @@
            //是否调用集团接口申请接口
            if(isCodeOrGroupCode){
               List<String> IdList=resultDataObjectDetailDOs.stream().filter(xMLResultDataObjectDetailDO-> com.alibaba.cloud.commons.lang.StringUtils.isNotBlank(xMLResultDataObjectDetailDO.getId())).map(XMLResultDataObjectDetailDO::getId).distinct().collect(Collectors.toList());
               if(!CollectionUtils.isEmpty(IdList)) {
                  this.sendApplyGroupcode(IdList, classifyFullInfo.getTopClassifyVO().getBtmTypeId(),sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getValue());
               }
@@ -2616,7 +2624,21 @@
      //没有限制分类,但是一个模板只可能在一个业务类型里面,所以直接查询这个业务类型即可
      if (!CollectionUtils.isEmpty(conditionMap)) {
         final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmTypeId()) + " t where 1 = 1 "};
         String tableName="";
         R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId());
         if(r.isSuccess()) {
            BtmTypeVO btmTypeVO = r.getData();
            if (btmTypeVO != null) {
               tableName = btmTypeVO.getTableName();
            }
         }
         if (StringUtils.isBlank(tableName)) {
            String errormsg="根据业务类型为查询到相关业务表";
            errorMap.put(orderDTO.getId(),errorMap.getOrDefault(orderDTO.getId(),"")+errormsg);
            return;
         }
         final String[] sql = {"select count(*) from " + tableName + " t where 1 = 1 "};
         conditionMap.forEach((key, value) -> {
            if(StringUtils.isBlank(value)||value.equals(QueryOptionConstant.ISNULL)){
               sql[0] += " and " + key + " is null ";
@@ -2836,6 +2858,9 @@
         ClientBusinessObject sysDataObject= codeSystemObjectMap.get(code);
         if(isCodeOrGroupCode){
            code=sysDataObject.getAttributeValue("GROUPCODE");
            if(StringUtils.isBlank(code)){
               code=sysDataObject.getId();
            }
         }
         CodeOrderDTO orderDTO = new CodeOrderDTO();
         if(codeDataMap.containsKey(code)){
@@ -2844,11 +2869,7 @@
            orderDTO.setCodeClassifyOid(codeClassifyVO.getOid());//分类主键
            orderDTO.setOid(sysDataObject.getOid());//数据oid
            orderDTO.setLcStatus(rowDatas.getStatus());//状态
            if(isCodeOrGroupCode){
               orderDTO.setId(sysDataObject.getId());
            }else{
               orderDTO.setId(code);
            }
            orderDTO.setId(code);
            orderDTO.setTs(sysDataObject.getTs());
            orderDTO.setBtmname(codeClassifyVO.getBtmname());//业务类型
            orderDTO.setDescription("集成调用:更新");//数据描述