田源
2023-12-04 39f59f013c74c4a2a5b35df4f4b389659610a219
Merge remote-tracking branch 'origin/master'
已修改18个文件
已重命名3个文件
已添加3个文件
1021 ■■■■■ 文件已修改
Source/UBCS-WEB/src/views/code/code.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowModelController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feign/IMdmInterJtClient.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeAndGroupCodeAttrMappingDTO.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeAndGroupCodeAttrRnageDTO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/ExecGroupCodePortDataDTO.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/标准修订(跨年).json 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/标准系列修订(跨年).json 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/标准系列申请.json 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feigh/MdmInterJtClient.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrMappingService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/DockingPreAttrMappingServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeAllCodeController.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeFixedValueController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/CodeAllCodeMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeClassifyService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmIOService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java 566 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeALlCodeMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/code/code.vue
@@ -2784,7 +2784,6 @@
    },
    /** æ–°å¢žåŸºç¡€ç æ®µ*/
    async saveOrEditBasicCode() {
      this.isLoadingSecCodeAddBtn = true;
      if (
        this.selectionList[0].oid == null ||
        this.selectionList[0].oid == ""
@@ -2792,9 +2791,12 @@
        this.$message.warning("缺失必要参数,请重新选择编码规则后再试!");
        return;
      }
      if (!this.checkForm()) {
        return;
      }
      this.isLoadingSecCodeAddBtn = true;
      this.form.pkCodeRule = this.selectionList[0].oid;
      if (this.form.oid == "" || this.form.oid == null) {
        if (this.checkForm()) {
          await addSave(this.form).then(
            () => {
              this.$message({
@@ -2811,7 +2813,6 @@
              window.console.log(error);
            }
          );
        }
      } else {
        // å¯èƒ½å‚照引用的业务类型会发生改变所以这儿直接对referConfig的json进行改变
        if (
@@ -2825,7 +2826,7 @@
          // let referValueInfo = JSON.parse(this.form.referValueInfo);
          // referValueInfo.referType = this.form.referBtmId;
        }
        let oldBasicSec = this.selectionBasicList.at(-1);
        let oldBasicSec = this.selectionBasicList.slice(-1)[0];
        let secType = this.form.secType;
        Vue.set(this.form, 'isClearValue', false);
        if ((oldBasicSec.secType == "codefixedsec" || oldBasicSec.secType === "codeclassifysec") && oldBasicSec.secType != secType) {
@@ -3066,7 +3067,7 @@
      if (!this.tipsMessage(this.selectionBasicList)) {
        return;
      }
      if (this.selectionList.at(-1).lcStatus != "Editing") {
      if (this.selectionList.slice(-1)[0].lcStatus != "Editing") {
        this.$message.warning('编码规则状态不是"编辑中",不允许删除码段!');
        return;
      }
@@ -3212,7 +3213,7 @@
    },
    /** åŸºç¡€ç æ®µåˆ·æ–°æ—¶æŸ¥è¯¢*/
    refreshChangeBasicSec() {
      this.loadBasic(this.selectionList.at(-1));
      this.loadBasic(this.selectionList.slice(-1)[0]);
    },
    /** æ“ä½œåŸºç¡€ç æ®µä¸­æœç´¢æ¸…空等按钮的显示/隐藏*/
    hideBasicTable(hideBoolean) {
@@ -3288,7 +3289,7 @@
    },
    /** ç æ®µç±»åž‹æ”¹å˜æ—¶ï¼Œå¢žåŠ å¯¹åº”çš„form表单中的属性*/
    changeSectypeFormItems(row) {
      console.log(row)
      //console.log(row)
      if (
        func.isEmpty(this.enumParam.secTypeList) ||
        this.enumParam.secTypeList.length == 0
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/controller/FlowModelController.java
@@ -18,19 +18,15 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.vci.ubcs.flow.core.utils.TaskUtil;
import com.vci.ubcs.flow.engine.entity.FlowModel;
import com.vci.ubcs.flow.engine.service.FlowEngineService;
import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.launch.constant.FlowConstant;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
Source/UBCS/ubcs-service-api/ubcs-applyjtcodeservice-api/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feign/IMdmInterJtClient.java
@@ -2,12 +2,15 @@
import com.vci.ubcs.code.applyjtcodeservice.vo.DockingClassifyModelAttrVO;
import com.vci.ubcs.code.applyjtcodeservice.vo.DockingPreAttrMappingVO;
import com.vci.ubcs.code.applyjtcodeservice.vo.DockingReturnStoreVO;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/****
@@ -24,6 +27,7 @@
    String RETURNGROUPCODE = API_PREFIX + "/getApplyGroupCode";
    String PUBMDMMODEL = API_PREFIX + "/pubMdmModel";
    String RECEIVE_EDITAPPLY =API_PREFIX + "/receiveEditApply";
    String LIST_MAPPING=API_PREFIX + "/listMapping";
    /***
     * å°†é›†å›¢ç”³è¯·æˆåŠŸçš„ç¼–ç å­˜å…¥ç›¸å…³æ•°æ®ä¹‹ä¸­
@@ -34,6 +38,13 @@
    @GetMapping(APPLYGROUPCODE)
    public R applyGroupCode(@RequestParam("oids")String oids,@RequestParam("btmName")String btmName);
    /***
     *
     * @param codeClassifyOid
     * @return
     */
    @GetMapping(LIST_MAPPING)
    public R<List<DockingPreAttrMappingVO>> list_mapping(@RequestParam("codeClassifyOid")String codeClassifyOid);
    /***
     * é›†å›¢ç¼–码数据修改
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeAndGroupCodeAttrMappingDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
package com.vci.ubcs.code.dto;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/***
 * é›†å›¢åŸŸå±žæ€§æ˜ å°„关系
 */
@Data
public class CodeAndGroupCodeAttrMappingDTO {
    /***
     * é»˜è®¤å€¼
     */
    private String defaultValue;
    /***
     *属性id
     */
    private String metaListId;
    /***
     * æºå±žæ€§å†…部名称
     */
    private String sourceAttrKey;
    /***
     * æºå±žæ€§åç§°
     */
    private String sourceAttrName;
    /**
     * ç›®æ ‡å±žæ€§oid
     */
    private String targetAttrId;
    /***
     * ç›®æ ‡å±žæ€§å†…部名称
     */
    private String targetAttrKey;
    /***
     * ç›®æ ‡å±žæ€§åç§°
     */
    private String targetAttrName;
    List<CodeAndGroupCodeAttrRnageDTO> codeAndGroupCodeAttrRnageDTOList;
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/CodeAndGroupCodeAttrRnageDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package com.vci.ubcs.code.dto;
import lombok.Data;
@Data
public class CodeAndGroupCodeAttrRnageDTO {
    /***
     *属性id
     */
    private String metaListId;
    /**
     * å±žæ€§æžšä¸¾æ˜¾ç¤ºåç§°
     */
    private  String numText;
    /**
     * å±žæ€§æžšä¸¾å†…部名称
     */
    private String numTextValue;
    /**
     * æºå±žæ€§æžšä¸¾æ˜¾ç¤ºåç§°
     */
    private  String targetNumText;
    /**
     * æºå±žæ€§æžšä¸¾å†…部名称
     */
    private String targetNumTextValue;
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/dto/ExecGroupCodePortDataDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package com.vci.ubcs.code.dto;
import lombok.Data;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@Data
public class ExecGroupCodePortDataDTO {
    /***
     * sheet名称
     */
    private String sheetName;
    /***
     * åŽŸå§‹å­—æ®µ
     */
    private LinkedList<String> fieldList=new LinkedList<>();
    /**
     * æ•°æ®é›†æˆ
     */
    private List<Map<String,String>> dataList=new ArrayList<>();
    /***
     * åˆ—名
     */
    private LinkedList<String> colName=new LinkedList<>();
    /***
     * é›†å›¢å±žæ€§ä¸Žç¼–码属性映射关系
     */
    private List<CodeAndGroupCodeAttrMappingDTO> codeAttrMapGroupAttrDTOS=new ArrayList<>();
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/±ê×¼ÐÞ¶©(¿çÄê).json
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/±ê׼ϵÁÐÐÞ¶©£¨¿çÄ꣩.json
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/±ê׼ϵÁÐÉêÇë.json
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feigh/MdmInterJtClient.java
@@ -56,8 +56,10 @@
     * é›†å›¢åˆ†ç±»ç”³è¯·å•服务
     */
    private final IDockingPreClassifyService dockingPreClassifyService;
    /***
     * å±žæ€§æ˜ å°„服务
     */
    private final IDockingPreAttrMappingService dockingPreAttrMappingService;
    /**
     * é›†å›¢å–值范围申请单服务
     */
@@ -81,6 +83,22 @@
            return R.fail("集团码申请失败:"+e.getMessage());
        }
    }
    /***
     * æŸ¥è¯¢é›†å›¢å±žæ€§æ˜ å°„
     * @param codeClassifyOid:编码分类oid
     * @return
     */
    @Override
    public R<List<DockingPreAttrMappingVO>> list_mapping(String codeClassifyOid) {
        List<DockingPreAttrMapping> dockingPreAttrMappings=    dockingPreAttrMappingService.selectByWrapper(Wrappers.<DockingPreAttrMapping>query().lambda().eq(DockingPreAttrMapping::getTargetClassifyId,codeClassifyOid));
        List<DockingPreAttrMappingVO> dockingPreAttrMappingVOList=new ArrayList<>();
        if(!CollectionUtils.isEmpty(dockingPreAttrMappings)){
            dockingPreAttrMappingVOList=dockingPreAttrMappingService.dockingPreAttrMappingDO2VOS(dockingPreAttrMappings,true);
        }
        return R.data(dockingPreAttrMappingVOList);
    }
    /***
     * ç”³è¯·é›†å›¢ç¼–码数据维护
     * @return
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/IDockingPreAttrMappingService.java
@@ -8,6 +8,7 @@
import com.vci.ubcs.starter.exception.VciBaseException;
import org.springblade.core.tool.api.R;
import java.util.Collection;
import java.util.List;
/**
@@ -51,4 +52,12 @@
     * @return
     */
    public R search(DokingAttributeSerchVO dokingAttributeSerchVO);
    /***
     * è½¬æ¢é›†å›¢å±žæ€§æ˜ å°„配置
     * @param dockingPreAttrMappings
     * @param contain æ˜¯å¦æŸ¥åŽ†å²æ•°æ®
     * @return
     */
    List<DockingPreAttrMappingVO> dockingPreAttrMappingDO2VOS(Collection<DockingPreAttrMapping> dockingPreAttrMappings, boolean contain);
}
Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/DockingPreAttrMappingServiceImpl.java
@@ -242,7 +242,8 @@
     * @param dockingPreAttrMappings
     * @return
     */
    private List<DockingPreAttrMappingVO> dockingPreAttrMappingDO2VOS(Collection<DockingPreAttrMapping> dockingPreAttrMappings,boolean contain) {
    @Override
    public List<DockingPreAttrMappingVO> dockingPreAttrMappingDO2VOS(Collection<DockingPreAttrMapping> dockingPreAttrMappings,boolean contain) {
        List<DockingPreAttrMappingVO> dockingPreAttrMappingVOList=new ArrayList<>();
            dockingPreAttrMappingVOList=DockingPreAttrMappingWrapper.build().entityVOs(dockingPreAttrMappings);
            if(CollectionUtils.isEmpty(dockingPreAttrMappingVOList)){
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeAllCodeController.java
@@ -33,7 +33,12 @@
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.rmi.ServerException;
import java.util.HashMap;
import java.util.Map;
/**
 * å…¨éƒ¨ç å€¼ æŽ§åˆ¶å™¨
@@ -59,6 +64,76 @@
        CodeAllCode detail = CodeAllcodeService.getOne(Condition.getQueryWrapper(CodeAllcode));
        return R.data(CodeAllcodeWrapper.build().entityVO(detail));
    }
    @GetMapping("/testdata")
    @ResponseBody
    public Map test(String clientId,String clientSecret) throws Exception {
        Map<Object,Object> test = new HashMap<>();
        test.put("success",true);
        test.put("message","");
        test.put("show",true);
        test.put("code",200);
        Map<Object,Object> test2 = new HashMap<>();
        test2.put("access_token","168a31ad-6540-4f45-98d9-ec241959c3e4");
        test2.put("refresh_token","cc554d4c-66ec-469d-9baf-799e579214ff");
        test2.put("openid","181****6777");
        test2.put("userNo","zhangsan");
        test2.put("token_type","bearer");
        test2.put("expires_in",2801);
        test2.put("userCode","1fsdsff");
        test2.put("adUserNo","zhangsan1");
        test.put("data",test2);
//        Map<Object,Object> test = new HashMap<>();
//        test.put("success",true);
//        test.put("message","");
//        test.put("show",true);
//        test.put("code",200);
//        Map<Object,Object> test2 = new HashMap<>();
//        test2.put("token","168a31ad-6540-4f45-98d9-ec241959c3e4");
//        test2.put("expire","3600");
//        test.put("data",test2);
        return test;
    }
    @PostMapping("/todoAdd")
    @ResponseBody
    public Map todoAdd(@RequestHeader("token")String token,@RequestBody Map<String,String> map) throws Exception {
//        Map<Object,Object> test = new HashMap<>();
//        test.put("success",true);
//        test.put("message","");
//        test.put("show",true);
//        test.put("code",200);
//        Map<Object,Object> test2 = new HashMap<>();
//        test2.put("access_token","168a31ad-6540-4f45-98d9-ec241959c3e4");
//        test2.put("refresh_token","cc554d4c-66ec-469d-9baf-799e579214ff");
//        test2.put("openid","181****6777");
//        test2.put("userNo","zhangsan");
//        test2.put("token_type","bearer");
//        test2.put("expires_in",2801);
//        test2.put("userCode","1");
//        test2.put("adUserNo","zhangsan1");
//        test.put("data",test2);
//        Map<Object,Object> test = new HashMap<>();
//        test.put("success",true);
//        test.put("message","");
//        test.put("show",true);
//        test.put("code",200);
//        Map<Object,Object> test2 = new HashMap<>();
//        test2.put("token","168a31ad-6540-4f45-98d9-ec241959c3e4");
//        test2.put("expire","3600");
//        test.put("data",test2);
        Map<Object,Object> test = new HashMap<>();
        test.put("success",true);
        test.put("message","");
        test.put("show",true);
        test.put("code",200);
        Map<Object,Object> test2 = new HashMap<>();
        test2.put("mid","78b57ce0-2222-46b8-81c4-0f661254db97");
        test2.put("id","437");
        test.put("data",test2);
        return test;
    }
    /**
     * å…¨éƒ¨ç å€¼ åˆ†é¡µ
     */
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeClassifyController.java
@@ -358,4 +358,11 @@
        CodeClassifyVO codeClassifyVO = codeClassifyService.getObjectByClsfNamePath(clsfNamePath);
        return R.data(codeClassifyVO);
    }
    /**
     * æµæ°´ä¾èµ–生成
     */
    @GetMapping("/flowingDependencyGen")
    public R flowingDependencyGen(String classifyOid)  {
        return codeClassifyService.flowingDependencyGen(classifyOid);
    }
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeFixedValueController.java
@@ -132,7 +132,7 @@
            dtoList.add(codeFixedValueDTO);
        }
        String codefixedsecoid = (String) param.get("codeFixedSecOid");
        VciBaseUtil.alertNotNull(dtoList,"码值对象集合",codefixedsecoid,"固定码段的主键");
        VciBaseUtil.alertNotNull(codefixedsecoid,"固定码段的主键");
        if (CollectionUtils.isEmpty(dtoList)){
            return R.status(codeFixedValueService.batchDeleteBySecOid(codefixedsecoid));
        }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java
@@ -90,6 +90,72 @@
     * @param response å“åº”对象
     * @throws IOException æŠ›å‡ºå¼‚常
     */
    @GetMapping("/downloadExcelBatchEdit")
    @VciBusinessLog(operateName = "下载批量申请编码的导入模板")
    public void downloadImportExcelBatchEdit(String codeClassifyOid, HttpServletResponse response) throws IOException{
        String excelName = mdmIOService.downloadImportExcelBatchEdit(codeClassifyOid);
        try {
            ControllerUtil.writeFileToResponse(response,excelName);
        } catch (Throwable e) {
            //如果出错,把错误信息写到text
            String msg = LangBaseUtil.getErrorMsg(e);
            if(StringUtils.isBlank(msg)){
                msg = "未知错误";
            }
            ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null);
        }
    }
    /**
     * å¯¼å…¥æ‰¹é‡ç¼–辑数据
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file æ–‡ä»¶çš„内容
     */
    @VciBusinessLog(operateName = "导入批量编辑数据")
    @PostMapping("/batchImportEdit")
    public R batchImportEdit(String codeClassifyOid, String classifyAttr,MultipartFile file,HttpServletResponse response) throws Throwable {
        String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + file.getOriginalFilename();
        File file1 = new File(excelFileName);
        try {
            file.transferTo(new File(excelFileName));
            CodeImProtRusultVO codeImProtRusultVO =mdmIOService.batchImportEdit(codeClassifyOid, classifyAttr,file1);
            if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())||StringUtils.isNotBlank(codeImProtRusultVO.getRedisUuid())){
                //放到map里
                R result = R.fail("导入失败");
                if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())) {
                    String filedUUid = ControllerUtil.putErrorFile(codeImProtRusultVO.getFilePath());
                    codeImProtRusultVO.setFileOid(filedUUid);
                }
                result.setData(codeImProtRusultVO);
                return result;
            }else {
                return R.success("操作成功!");
            }
        }catch (Throwable e) {
            logger.error("导入错误",e);
            String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt";
            LocalFileUtil.writeContentToFile(LangBaseUtil.getErrorMsg(e),errorFile);
            String uuid=ControllerUtil.putErrorFile(errorFile);
            CodeImProtRusultVO codeImProtRusultVO =new CodeImProtRusultVO();
            codeImProtRusultVO.setRedisUuid("");
            codeImProtRusultVO.setFileOid(uuid);
            codeImProtRusultVO.setFilePath(errorFile);
            R r = R.fail("导入失败");
            r.setData(codeImProtRusultVO);
            return r;
        }finally {
            file1.delete();
        }
    }
    /**
     * ä¸‹è½½æ‰¹é‡ç”³è¯·çš„导入模板
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param response å“åº”对象
     * @throws IOException æŠ›å‡ºå¼‚常
     */
    @GetMapping("/downloadTopImportExcel")
    @VciBusinessLog(operateName = "下载批量申请编码的导入模板")
    public void downloadTopImportExcel(String codeClassifyOid,HttpServletResponse response) throws IOException{
@@ -312,7 +378,7 @@
            s = engineService.addSaveCode(orderDTO);
            saveLogUtil.operateLog("编码申请",false,orderDTO.toString());
        }catch (Exception e){
            saveLogUtil.operateLog("编码申请",true,e.getMessage());
            saveLogUtil.operateLog("编码申请",true,e.toString());
            throw e;
        }
        return R.success(s);
@@ -779,9 +845,9 @@
    @GetMapping("/exportGroupCodeExcel")
    @VciBusinessLog(operateName = "导出集团码")
    public void exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{
        String excelName = mdmIOService.createImportExcel(codeClassifyOid,false);
        try {
            ControllerUtil.writeFileToResponse(response,excelName);
            String excelName = mdmIOService.exportGroupCodeExcel(codeClassifyOid);
        } catch (Throwable e) {
            //如果出错,把错误信息写到text
            String msg = LangBaseUtil.getErrorMsg(e);
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/CodeAllCodeMapper.java
@@ -20,9 +20,11 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.vci.ubcs.code.entity.CodeAllCode;
import com.vci.ubcs.code.vo.pagemodel.CodeAllCodeVO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
 * å…¨éƒ¨ç å€¼ Mapper æŽ¥å£
@@ -41,5 +43,14 @@
     */
    List<CodeAllCodeVO> selectCodeAllCodePage(IPage page, CodeAllCodeVO codeAllCode);
    /**
     * åˆ†ç»„统计最大流水值
     *
     * @param codeClassifyOid
     * @return
     */
//    @MapKey("OID")
    List<CodeAllCode> selectGroupByClassify(@Param("codeClassifyOid") String codeClassifyOid,@Param("replaceString") String replaceString);
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeClassifyService.java
@@ -305,4 +305,8 @@
     */
    String selectLeafByParentClassifyOid(String topOid, String currentOid);
    /**
     * æµæ°´ä¾èµ–生成
     */
    R flowingDependencyGen(String classifyOid);
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmIOService.java
@@ -1,5 +1,6 @@
package com.vci.ubcs.code.service;
import com.google.protobuf.ServiceException;
import com.vci.ubcs.code.dto.CodeExportAttrDTO;
import com.vci.ubcs.code.dto.CodeOrderDTO;
import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO;
@@ -26,6 +27,13 @@
     * @return excel的文件地址
     */
    String createImportExcel(String codeClassifyOid,boolean isHistory);
    /**
     * ç”Ÿæˆæ‰¹é‡ä¿®æ”¹å¯¼å…¥çš„æ–‡ä»¶
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @return excel的文件地址
     */
    String downloadImportExcelBatchEdit(String codeClassifyOid);
    /**
     * ç”Ÿæˆå¯¼å…¥çš„æ–‡ä»¶
@@ -59,6 +67,15 @@
     * @return æœ‰é”™è¯¯ä¿¡æ¯çš„excel
     */
    CodeImProtRusultVO batchImportHistoryData(String codeClassifyOid,String classifyAttr, File file) throws Throwable;
    /**
     * å¯¼å…¥æ‰¹é‡ç¼–辑数据
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file excel文件的信息
     * @return æœ‰é”™è¯¯ä¿¡æ¯çš„excel
     */
    CodeImProtRusultVO batchImportEdit(String codeClassifyOid,String classifyAttr, File file) throws Throwable;
    /***
     * ä»Žredis缓存里获取到导入的数据
@@ -119,4 +136,11 @@
     * @param operationType
     */
    void sendApplyGroupcode(List<String> idList,String btmName,String operationType);
    /***
     * å¯¼å‡ºé›†å›¢ç æ¨¡æ¿
     * @param classOid
     * @return
     */
    String exportGroupCodeExcel(String classOid) throws ServiceException;
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -10,17 +10,16 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.sun.org.apache.bcel.internal.generic.NEW;
import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO;
import com.vci.ubcs.code.entity.CodeClassify;
import com.vci.ubcs.code.entity.CodeClassifyTemplate;
import com.vci.ubcs.code.entity.*;
import com.vci.ubcs.code.enumpack.FrameworkDataLCStatus;
import com.vci.ubcs.code.mapper.CodeClassifyMapper;
import com.vci.ubcs.code.mapper.CodeClassifyTemplateMapper;
import com.vci.ubcs.code.mapper.CommonsMapper;
import com.vci.ubcs.code.mapper.*;
import com.vci.ubcs.code.po.CodeClassifyPO;
import com.vci.ubcs.code.service.ICodeClassifyService;
import com.vci.ubcs.code.service.ICodeKeyAttrRepeatService;
import com.vci.ubcs.code.service.ICodeRuleService;
import com.vci.ubcs.code.vo.pagemodel.CodeAllCodeVO;
import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO;
import com.vci.ubcs.code.vo.pagemodel.CodeKeyAttrRepeatRuleVO;
import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO;
@@ -62,6 +61,7 @@
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
@@ -106,6 +106,15 @@
    @Resource
    private ICodeKeyAttrRepeatService iCodeKeyattrrepeatService;
    @Resource
    private CodeAllCodeMapper codeAllCodeMapper;
    @Resource
    private CodeSerialValueMapper codeSerialValueMapper;
    @Resource
    private CodeBasicSecMapper codeBasicSecMapper;
    /**
     * ä¸Šçº§èŠ‚ç‚¹çš„å±žæ€§åç§°
     */
@@ -683,6 +692,49 @@
        return oids;
    }
    /**
     * æµæ°´ä¾èµ–生成
     */
    @Override
    public R flowingDependencyGen(String classifyOid) {
        //查询此分类下面的所有分类
        List<CodeClassify>  codeClassifyList=codeClassifyMapper.selectAllClassifyByOid(classifyOid,AuthUtil.getTenantId(),null);
        //查询码值表,获取最大流水
        List<CodeAllCode> codeAllCodeVOS = codeAllCodeMapper.selectGroupByClassify("'" + codeClassifyList.stream()
            .map(classfiy -> classfiy.getOid()).collect(Collectors.joining("','")) + "'","'${sav}'");
        //往流水表里面加数据,有则更新,无则添加数据。
        for (CodeAllCode codeAllCodeVO : codeAllCodeVOS) {
            QueryWrapper<CodeBasicSec> secWrapper = new QueryWrapper<>();
            secWrapper.eq("PKCODERULE",codeAllCodeVO.getCodeRuleOid());
            secWrapper.eq("SECTYPE","codeserialsec");
            CodeBasicSec codeBasicSec = codeBasicSecMapper.selectOne(secWrapper);
            QueryWrapper<CodeSerialValue> wrapper = new QueryWrapper<>();
            wrapper.eq("codeRuleOid",codeAllCodeVO.getCodeRuleOid());
            wrapper.eq("serialUnit",codeAllCodeVO.getSerialUnit());
            wrapper.eq("codeSecOid",codeBasicSec.getOid());
            CodeSerialValue codeSerialValue = codeSerialValueMapper.selectOne(wrapper);
            if(codeSerialValue == null){
                CodeSerialValue newSerialValue = new CodeSerialValue();
                DefaultAttrAssimtUtil.addDefaultAttrAssimt(newSerialValue,"codeserialvalue");
                newSerialValue.setCodeRuleOid(codeAllCodeVO.getCodeRuleOid());
                newSerialValue.setCodeSecOid(codeBasicSec.getOid());
                newSerialValue.setSerialUnit(codeAllCodeVO.getSerialUnit());
                newSerialValue.setMaxSerial(codeAllCodeVO.getUnFillSerial());
                newSerialValue.setLctid("defaultLC");
                newSerialValue.setLcStatus("Exist");
                codeSerialValueMapper.insert(newSerialValue);
            }else{
                codeSerialValue.setMaxSerial(codeAllCodeVO.getUnFillSerial());
                codeSerialValue.setLastModifyTime(new Date());
                codeSerialValue.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId()));
                codeSerialValue.setTs(new Date());
                codeSerialValueMapper.updateById(codeSerialValue);
            }
        }
        return R.success("操作成功!");
    }
    /***
     * æ ¹æ®åˆ†ç±»æè¿°å¤‡æ³¨å’Œåº“节点查询分类信息
     * @param desc
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -465,7 +465,7 @@
            );
        }catch (Exception e){
            // æ’入更改日志记录
            saveLogUtil.operateLog(CodeDefaultLC.getTextByValue(baseModelDTO.getLcStatus()),true,e.getMessage());
            saveLogUtil.operateLog(CodeDefaultLC.getTextByValue(baseModelDTO.getLcStatus()),true,e.toString());
            throw e;
        }
    }
@@ -3113,7 +3113,7 @@
            saveLogUtil.operateLog("数据更改",false, StringUtil.format("{}\n修改为:\n{}",JSON.toJSONString(Collections.singletonList(oldCbo)),JSON.toJSONString(Collections.singletonList(cbo))));
        } catch (Exception vciError) {
            // è®°å½•数据更改报错时的日志
            saveLogUtil.operateLog("数据更改",true,vciError.getMessage());
            saveLogUtil.operateLog("数据更改",true,vciError.toString());
            throw new VciBaseException("数据更改保存出错了", new String[0], vciError);
        }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -3,14 +3,17 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.common.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.protobuf.ServiceException;
import com.vci.ubcs.code.applyjtcodeservice.entity.DockingPreAttrMapping;
import com.vci.ubcs.code.applyjtcodeservice.feign.IMdmInterJtClient;
import com.vci.ubcs.code.applyjtcodeservice.vo.DockingPreAttrMappingVO;
import com.vci.ubcs.code.bo.AttributeValue;
import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO;
import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO;
import com.vci.ubcs.code.dto.CodeExportAttrDTO;
import com.vci.ubcs.code.dto.CodeOrderDTO;
import com.vci.ubcs.code.constant.MdmEngineConstant;
import com.vci.ubcs.code.dto.*;
import com.vci.ubcs.code.entity.CodeAllCode;
import com.vci.ubcs.code.enumpack.CodeDefaultLC;
import com.vci.ubcs.code.enumpack.CodeLevelTypeEnum;
@@ -48,6 +51,7 @@
import com.vci.ubcs.starter.web.util.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import oracle.sql.TIMESTAMP;
import org.apache.commons.collections4.map.HashedMap;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@@ -56,6 +60,7 @@
import org.apache.poi.ss.usermodel.RichTextString;
import org.apache.poi.ss.usermodel.Workbook;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
@@ -66,10 +71,18 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -484,6 +497,122 @@
    }
    /**
     * ç”Ÿæˆæ‰¹é‡ä¿®æ”¹å¯¼å…¥çš„æ–‡ä»¶
     *
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @return excel的文件地址
     */
    @Override
    public String downloadImportExcelBatchEdit(String codeClassifyOid) {
        List<CodeClassifyTemplateVO> templateVOList=new ArrayList<>();
        VciBaseUtil.alertNotNull("导出模板","导出的配置",codeClassifyOid,"主题库分类的主键");
        CodeClassifyVO codeClassifyVO = classifyService.getObjectByOid(codeClassifyOid);
        templateVOList= templateService.childTemplates(codeClassifyOid);
        WriteExcelOption eo = new WriteExcelOption();
        eo.setAppend(true);
        //增加模板的信息导入
        LinkedList<WriteExcelData> tempEDList = new LinkedList<>();
        tempEDList.add(new WriteExcelData(0,0,"编号"));
        for(int j=0;j<templateVOList.size();j++){
            CodeClassifyTemplateVO  templateVO=templateVOList.get(j);
            CodeClassifyTemplateVO codeClassifyTemplateVO = new CodeClassifyTemplateVO();
            BeanUtils.copyProperties(templateVO,codeClassifyTemplateVO);
            //组合格式的不导入,
            // æžšä¸¾çš„æä¾›åºåˆ—的选择
            //时间全部统一为yyyy-MM-dd HH:mm:ss
            //参照的自行输入名称
            //分类注入的不用,都是导入后自动处理的
            //编码,状态等字段不导入
            List<CodeClassifyTemplateAttrVO> codeClassifyTemplateAttrVOList=codeClassifyTemplateVO.getAttributes();
            if(!CollectionUtils.isEmpty(codeClassifyTemplateAttrVOList)) {
                if (CollectionUtils.isEmpty(codeClassifyTemplateAttrVOList)) {
                    throw new VciBaseException("模板没有配置属性");
                }
            }
            List<CodeClassifyTemplateAttrVO> templateAttrVOS = codeClassifyTemplateAttrVOList.stream().filter(s ->
                !DEFAULT_ATTR_LIST.contains(s.getId())
                    && StringUtils.isBlank(s.getComponentRule())
                    && StringUtils.isBlank(s.getClassifyInvokeAttr())
                    && (VciBaseUtil.getBoolean(s.getFormDisplayFlag()))
            ).collect(Collectors.toList());
            if (CollectionUtils.isEmpty(templateAttrVOS)) {
                throw new VciBaseException("模板没有配置任何【表单显示】为【是】的属性");
            }
//            List<CodeClassifyTemplateAttrVO> idAttrVOList = codeClassifyTemplateVO.getAttributes().stream().filter(s -> s.getId().equalsIgnoreCase(CODE_FIELD)).collect(Collectors.toList());
            LinkedList<WriteExcelData> excelDataList = new LinkedList<>();
            Workbook workbook = new HSSFWorkbook();
//            if(isHistory){
            excelDataList.add(new WriteExcelData(0,0,"编码(id)",""));
//                excelDataList.add(new WriteExcelData(0,1,"码段宽度",""));
//            excelDataList.add(new WriteExcelData(0,1,!CollectionUtils.isEmpty(idAttrVOList)?idAttrVOList.get(0).getName():"企业编码",idAttrVOList.get(0).getId()));
//            }
            for (int i = 0; i < templateAttrVOS.size(); i++) {
                CodeClassifyTemplateAttrVO attrVO = templateAttrVOS.get(i);
                Object text = attrVO.getName();
                text = exportKeyAndRequired(workbook,attrVO,text);
                int colIndex = 1 + i;
                WriteExcelData excelData = new WriteExcelData(0, colIndex, text,attrVO.getId());
                if(StringUtils.isNotBlank(attrVO.getCodeDateFormat())
                    || VciFieldTypeEnum.VTDateTime.name().equalsIgnoreCase(attrVO.getAttributeDataType())
                    || VciFieldTypeEnum.VTDate.name().equalsIgnoreCase(attrVO.getAttributeDataType())
                    ||VciFieldTypeEnum.VTTime.name().equalsIgnoreCase(attrVO.getAttributeDataType())){
                    excelData.setDateFormat(VciDateUtil.DateTimeFormat);
                }
                if(text instanceof RichTextString){
                    excelData.setFontColor(String.valueOf(HSSFColor.HSSFColorPredefined.RED.getIndex()));
                }
                excelDataList.add(excelData);
                if(StringUtils.isNotBlank(attrVO.getEnumString()) || StringUtils.isNotBlank(attrVO.getEnumId())){
                    //添加数据有效性
                    List<String> enumValueList = new ArrayList<>();
                    enumValueList.add("");
                    List<KeyValue> valueList = engineService.listComboboxItems(attrVO);
                    if(!CollectionUtils.isEmpty(valueList)){
                        valueList.stream().forEach(kv->{
                            enumValueList.add(kv.getValue());
                        });
                    }
                    //默认加1万条
                    WriteExcelData ed = new WriteExcelData(1,colIndex,"");
                    ed.setRowTo(100);
                    ed.setColTo(colIndex);
                    ed.setValidation(true);
                    ed.setValidationDataList(enumValueList);
                    ed.setValidationErrorMsg("请在序列中选择正确的值");
                    excelDataList.add(ed);
                }
                if(VciFieldTypeEnum.VTBoolean.name().equalsIgnoreCase(attrVO.getAttributeDataType())){
                    List<String> booleanList = new ArrayList<>();
                    booleanList.add("是");
                    booleanList.add("否");
                    //默认加1万条
                    WriteExcelData ed = new WriteExcelData(1,colIndex,"");
                    ed.setRowTo(100);
                    ed.setColTo(colIndex);
                    ed.setValidation(true);
                    ed.setValidationDataList(booleanList);
                    ed.setValidationErrorMsg("请在序列中选择正确的值");
                    excelDataList.add(ed);
                }
            }
            eo.addSheetDataList(j+templateVO.getName(),excelDataList);
            tempEDList.add(new WriteExcelData(j+1,0,templateVO.getOid()));
            tempEDList.add(new WriteExcelData(j+1,1,templateVO.getId()));
            tempEDList.add(new WriteExcelData(j+1,2,templateVO.getName()));
        }
        String excelName = LocalFileUtil.getDefaultTempFolder() + File.separator + codeClassifyVO.getName() + ("_属性批量修改模板.xls");
        eo.addSheetDataList(templateVOList.size()+"模板信息【请勿删除或移动】",tempEDList);
        ExcelUtil.writeDataToFile(excelName,eo);
        return excelName;
    }
    /**
     * èŽ·å–ç æ®µå®½åº¦
     * @param codeClassifyOid
     * @return
@@ -843,7 +972,7 @@
                }
                // å•次导入数量限制
                if(sheetDataSetList.get(i).getRowData().size() > IMPORT_DATA_LIMIT){
                    throw new ServiceException("为了保证系统的稳定性,请一次不要导入超过"+IMPORT_DATA_LIMIT+"条的数据");
                    throw new ServiceException(StringUtil.format("为了保证系统的稳定性,请一次不要导入超过{}条的数据",IMPORT_DATA_LIMIT));
                }
                //历史导入的时候不处理编码
                //----逻辑内容----
@@ -1141,11 +1270,145 @@
            }
            return codeImProtRusultVO;
        }catch (Exception e){
            saveLogUtil.operateLog("历史数据导入",true,e.getMessage());
            saveLogUtil.operateLog("历史数据导入",true,e.toString());
            throw e;
        }
    }
    /**
     * å¯¼å…¥æ‰¹é‡ç¼–辑数据
     *
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file            excel文件的信息
     * @return æœ‰é”™è¯¯ä¿¡æ¯çš„excel
     */
    @Override
    public CodeImProtRusultVO batchImportEdit(String codeClassifyOid, String classifyAttr,File file) throws  Throwable{
        VciBaseUtil.alertNotNull(codeClassifyOid,"分类的主键");
        ReadExcelOption reo = new ReadExcelOption();
        reo.setReadAllSheet(true);
        List<SheetDataSet> sheetDataSetList = ExcelUtil.readDataObjectFromExcel(file,null,reo);
        if (sheetDataSetList.size() > LIMIT + 1) {
            throw new VciBaseException("为了保证系统的稳定性,请一次不要导入超过1万条的数据");
        }
        boolean isExport=false;
        Map<String,List<WriteExcelData>> shetNameMap=new HashMap<>();
        for(int i=0;i<sheetDataSetList.size()-1;i++) {
            if (CollectionUtils.isEmpty(sheetDataSetList) || CollectionUtils.isEmpty(sheetDataSetList.get(i).getRowData())
                || sheetDataSetList.get(i).getRowData().size() < 1) {
                continue;
            }
            // å•次导入数量限制
            if(sheetDataSetList.get(i).getRowData().size() > IMPORT_DATA_LIMIT){
                throw new ServiceException("为了保证系统的稳定性,请一次不要导入超过"+IMPORT_DATA_LIMIT+"条的数据");
            }
            //查询分类和模板
            CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(codeClassifyOid);
            //先找到每一行的标题,然后根据标题来获取对应的属性
            SheetDataSet dataSet = sheetDataSetList.get(i);
            List<SheetRowData> rowDataList = dataSet.getRowData();
            //找第一行,为了找标题
            CodeClassifyTemplateVO templateVO ;
            //都转换完了。需要批量检查
            //找所有的分类路径,需要校验路径是否正确,是否都在当前的分类的下级
            List<CodeClassifyVO> childClassifyVOs = classifyService.listChildrenClassify(codeClassifyOid, true, classifyAttr, true);
            Map<String/**路径**/, CodeClassifyVO> pathMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getPath().startsWith("#") ? s.getPath().substring(1) : s.getPath(), t -> t));
            List<String> titleRowData = dataSet.getColName();
            Map<String, String> errorMap = new ConcurrentHashMap<>();
            pathMap.put("#current#",classifyFullInfo.getCurrentClassifyVO());
            try {
                titleRowData.add("分类路径");
                List<CodeClassifyTemplateVO> templateVOList= checkSamesTemplate(titleRowData,sheetDataSetList,i,pathMap,errorMap);
                titleRowData.remove(titleRowData.size()-1);
                templateVO= templateVOList.get(0);
            }catch (Throwable e){
                throw  new VciBaseException(e.getMessage());
            }
            CodeClassifyTemplateVO finalTemplateVO = templateVO;
            List<SheetRowData> needowDataList = rowDataList.stream().filter(cbo -> {
                String rowIndex = cbo.getRowIndex();
                return !errorMap.containsKey(rowIndex);
            }).collect(Collectors.toList());
            //这里不除去默认的属性
            List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes();
            Map<Integer/**列号**/, String/**字段的名称**/> fieldIndexMap = new HashMap<>();
            Map<String/**中文名称**/, String/**英文名称**/> attrNameIdMap = attrVOS.stream().collect(Collectors.toMap(s -> s.getName(), t -> t.getId()));
            fieldIndexMap.put(0,"id");
            getFieldIndexMap(titleRowData, attrNameIdMap, fieldIndexMap);
            //先不用管属性是否都存在,先转换一下数据
            CodeOrderDTO orderDTO = new CodeOrderDTO();
            for (SheetRowData sheetRowData : needowDataList) {
                //查询数据
                Map<String, String> conditionMap = new HashMap<>();
                conditionMap.put("t.id", sheetRowData.getData().get(0));
                conditionMap.put("t.lastv", "1");
                CodeTemplateAttrSqlBO sqlBO = mdmEngineService.getSqlByTemplateVO(classifyFullInfo.getTopClassifyVO().getBtmTypeId(), templateVO, conditionMap, new PageHelper(-1));
                //我们使用和业务类型的来查询
                List<Map> cbosB = commonsMapper.selectBySql(sqlBO.getSqlUnPage());
                if(cbosB.size() == 0){
                    throw  new ServiceException("编码:"+ sheetRowData.getData().get(0) + ",未能查询到相关数据。");
                }
                excelToCboEdit(fieldIndexMap, sheetRowData, orderDTO, cbosB.get(0));
                orderDTO.setCopyFromVersion(orderDTO.getOid());
                orderDTO.setOid(null);
                try {
                    mdmEngineService.upSaveCode(orderDTO);
                    List<Map> newCbos = commonsMapper.selectBySql(sqlBO.getSqlUnPage());
                    //对码值表进行处理替换创建数据的oid
                    QueryWrapper<CodeAllCode> wrapper = new QueryWrapper<>();
                    wrapper.eq("CREATECODEOID",orderDTO.getCopyFromVersion());
                    List<CodeAllCode> codeAllCodes = codeAllCodeService.selectByWrapper(wrapper);
                    codeAllCodes.get(0).setCreateCodeOid(newCbos.get(0).get("OID").toString());
                    codeAllCodes.get(0).setLastModifyTime(new Date());
                    codeAllCodes.get(0).setTs(new Date());
                    codeAllCodes.get(0).setLastModifier(AuthUtil.getUser().getUserName());
                    codeAllCodeService.updateBatchById(codeAllCodes);
                } catch (Throwable e) {
                    log.error("批量产生编码的时候出错了", e);
//                thisCbos.stream().forEach(cbo -> {
//                    String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                    errorMap.put(sheetRowData.getRowIndex(), ";系统错误,存储数据的时候出错了:"+e.getMessage());
//                });
                }
            }
            if (errorMap.size() > 0) {
                isExport = true;
            }
            createWriteExcelData(rowDataList, errorMap, new ArrayList<>(), titleRowData, shetNameMap, finalTemplateVO);
        }
        String excelFileName="";
        if(isExport&&!CollectionUtils.isEmpty(shetNameMap)) {
            excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误信息.xls";
            WriteExcelOption eo = new WriteExcelOption();
            shetNameMap.forEach((shetName, errorDataList) -> {
                eo.addSheetDataList(shetName, errorDataList);
            });
            try {
                new File(excelFileName).createNewFile();
            } catch (IOException e) {
                throw new VciBaseException(LangBaseUtil.getErrorMsg(e));
            }
            ExcelUtil.writeDataToFile(excelFileName, eo);
        }
        CodeImProtRusultVO codeImProtRusultVO=new CodeImProtRusultVO();
        if(StringUtils.isNotBlank(excelFileName)) {
            codeImProtRusultVO.setFilePath(excelFileName);
            codeImProtRusultVO.setFileOid("");
            saveLogUtil.operateLog("数据批量更改",true, StringUtil.format("错误信息:{}",JSON.toJSONString(shetNameMap)) );
        }else{
            saveLogUtil.operateLog("数据批量更改",false, StringUtil.format("导入成功总数为:{}",
                sheetDataSetList.size()-1));
        }
        return codeImProtRusultVO;
    }
    /*private void converBaseModels(List<ClientBusinessObject> clientBusinessObjects,List<BaseModel>dataCBOList){
        clientBusinessObjects.stream().forEach(clientBusinessObject -> {
            BaseModel baseModel=new BaseModel();
@@ -1456,7 +1719,7 @@
            }
            saveLogUtil.operateLog("批量申请编码",false, StringUtil.format("批量导入申请成功共{}条数据,生成的码值如下【{}】",codeList.size(),codeList));
        }catch (Exception e){
            saveLogUtil.operateLog("批量申请编码",true,e.getMessage());
            saveLogUtil.operateLog("批量申请编码",true,e.toString());
            throw e;
        }
        return uuid;
@@ -3288,6 +3551,106 @@
    }
    /**
     * excel转换为cbo的对象
     * @param fieldIndexMap å­—段的位置
     * @param rowDataList excel里的行数据
     * @param orderDTO æ•´ç†çš„æ•°æ®
     * @param map æ•°æ®çš„列表
     */
    private void excelToCboEdit(Map<Integer,String> fieldIndexMap,SheetRowData rowDataList,
                            CodeOrderDTO orderDTO,
                            Map map){
        rowDataList.getData().forEach((index,value)->{
                String field = fieldIndexMap.get(index);
                if (StringUtils.isBlank(field)) {
                    throw new VciBaseException("第" + (index + 1) + "列的标题在系统中不存在");
                }
                map.put(field,value);
            });
        try {
//            for (Map map : cbos) {
//            Object obj = CodeOrderDTO.class.newInstance();
            BeanInfo beanInfo = Introspector.getBeanInfo(orderDTO.getClass());
            PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyDescriptor property : propertyDescriptors) {
                Method setter = property.getWriteMethod();
                if (setter != null) {
                    //oracle的时间为TIMESTAMP的,需要进行转换成data,否则将报错
                    if (map.get(property.getName().toUpperCase()) instanceof TIMESTAMP) {
                        LocalDateTime localDateTime = ((TIMESTAMP) map.get(property.getName().toUpperCase())).toLocalDateTime();
                        ZoneId zoneId = ZoneId.systemDefault();
                        ZonedDateTime zdt = localDateTime.atZone(zoneId);
                        Date date = Date.from(zdt.toInstant());
                        setter.invoke(orderDTO, date);
                        map.remove(property.getName().toUpperCase());
                    } //oracle的数字为BigDecimal的,需要进行转换成Integer,否则将报错
                    else if (map.get(property.getName().toUpperCase()) instanceof BigDecimal
                        && ("Integer").equals(setter.getParameterTypes()[0].getSimpleName())) {
                        setter.invoke(orderDTO, ((BigDecimal) map.get(property.getName().toUpperCase())).intValue());
                        map.remove(property.getName().toUpperCase());
                    } else if (map.containsKey(property.getName().toUpperCase())) {
                        if(setter.getParameterTypes()[0].getSimpleName().equals("String")){
                            setter.invoke(orderDTO, map.get(property.getName().toUpperCase()) == null ? null:String.valueOf(map.get(property.getName().toUpperCase())));
                        }else{
                            setter.invoke(orderDTO, map.get(property.getName().toUpperCase()));
                        }
                        map.remove(property.getName().toUpperCase());
                    }
                }
            }
            for (Object key : map.keySet()) {
                map.put(key, map.get(key) == null ? null : String.valueOf(map.get(key)));
            }
        } catch (Exception e) {
            throw new VciBaseException("查询失败:" + e.getMessage());
        }
//        Iterator<Map.Entry<String, String>> iterator = cbos.entrySet().iterator();
//
//        Map.Entry<String, String> entry;
//        while (iterator.hasNext()) {
//            entry = iterator.next();
////            if (WebUtil.isDefaultField(entry.getKey())) {
//                Object obj = BaseModel.class.newInstance();
//                BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass());
//                PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
//                for (PropertyDescriptor property : propertyDescriptors) {
//                    Method setter = property.getWriteMethod();
//                    if (setter != null) {
//                        //oracle的时间为TIMESTAMP的,需要进行转换成data,否则将报错
//                        if (map.get(property.getName().toUpperCase()) instanceof TIMESTAMP) {
//                            LocalDateTime localDateTime = ((TIMESTAMP) map.get(property.getName().toUpperCase())).toLocalDateTime();
//                            ZoneId zoneId = ZoneId.systemDefault();
//                            ZonedDateTime zdt = localDateTime.atZone(zoneId);
//                            Date date = Date.from(zdt.toInstant());
//                            setter.invoke(obj, date);
//                            map.remove(property.getName().toUpperCase());
//                        } //oracle的数字为BigDecimal的,需要进行转换成Integer,否则将报错
//                        else if (map.get(property.getName().toUpperCase()) instanceof BigDecimal
//                            && ("Integer").equals(setter.getParameterTypes()[0].getSimpleName())) {
//                            setter.invoke(obj, ((BigDecimal) map.get(property.getName().toUpperCase())).intValue());
//                            map.remove(property.getName().toUpperCase());
//                        } else if (map.containsKey(property.getName().toUpperCase())) {
//                            if(setter.getParameterTypes()[0].getSimpleName().equals("String")){
//                                setter.invoke(obj, map.get(property.getName().toUpperCase()) == null ? null:String.valueOf(map.get(property.getName().toUpperCase())));
//                            }else{
//                                setter.invoke(obj, map.get(property.getName().toUpperCase()));
//                            }
//                            map.remove(property.getName().toUpperCase());
//                        }
//                    }
//                }
//                WebUtil.setValueToField(entry.getKey(), orderDTO, entry.getValue());
//                iterator.remove();
////            }
//        }
        orderDTO.setData(map);
    }
    /**
     * æ£€æŸ¥æ ¡éªŒè§„则没有通过的内容
     * @param attrVOS éœ€è¦æ ¡éªŒçš„属性
     * @param dataList æ•°æ®çš„列表
@@ -3861,6 +4224,7 @@
                        } else {
                            Map<String, String> classifyDataMap = VciBaseUtil.objectToMapString(classifyVO);
                            String value = classifyDataMap.getOrDefault(attrVO.getClassifyInvokeAttr(), "");
                            log.error("================================当前分类注入的value值为:==========================",value);
                            cbo.setAttributeValue(attrId, value);
                        }
                    } catch (Throwable e) {
@@ -4605,4 +4969,196 @@
        }
    }
    /***
     * @param codeClassifyOid
     * @return
     */
    @Override
    public String exportGroupCodeExcel(String codeClassifyOid) throws ServiceException {
        VciBaseUtil.alertNotNull(codeClassifyOid,"主题库分类的主键");
        CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(codeClassifyOid);
        CodeClassifyVO codeClassifyVO= classifyFullInfo.getCurrentClassifyVO();
        //获取最新的模板
        CodeClassifyTemplateVO templateVO = engineService.getUsedTemplateByClassifyOid(codeClassifyOid);
        LinkedList<String> colName=new LinkedList<>();//列头
        LinkedList<String> fieldList=new LinkedList<>();//列字段
        ExecGroupCodePortDataDTO execGroupCodePortDataDTO=new ExecGroupCodePortDataDTO();
        createExportGroupCodeMapConfig(templateVO,execGroupCodePortDataDTO);//组织数据
        if(!CollectionUtils.isEmpty(execGroupCodePortDataDTO.getCodeAttrMapGroupAttrDTOS())){
            throw new ServiceException("集团属性映射未配置");
        }
        fieldList=execGroupCodePortDataDTO.getFieldList();
        List<Map<String,String>>dataList=new ArrayList<>();
        getDatas(classifyFullInfo,templateVO,fieldList,dataList);
        execGroupCodePortDataDTO.setDataList(dataList);//放数据
        execGroupCodePortDataDTO.setSheetName(codeClassifyVO.getName()+"集团码导入模板");
        String tempFolder = LocalFileUtil.getDefaultTempFolder();
        String excelName = tempFolder + File.separator +
            classifyFullInfo.getCurrentClassifyVO().getId() + "_" + classifyFullInfo.getCurrentClassifyVO().getName() + "_集团码导出模板.xls";
        try {
            new File(excelName).createNewFile();
        } catch (Throwable e) {
            throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[]{excelName}, e);
        }
        LinkedList<String> finalFieldList = fieldList;
        Map<String, CodeClassifyTemplateAttrVO> attrVOMap = templateVO.getAttributes().stream().filter(s-> finalFieldList.contains(s.getId().toLowerCase(Locale.ROOT))).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        List<WriteExcelData> excelDataList = new ArrayList<>();
        Workbook workbook = new HSSFWorkbook();
        List<CodeAndGroupCodeAttrMappingDTO>  codeAndGroupCodeAttrMappingDTOList=    execGroupCodePortDataDTO.getCodeAttrMapGroupAttrDTOS();
        Map<String, CodeAndGroupCodeAttrMappingDTO> jAttrVOMap = codeAndGroupCodeAttrMappingDTOList.stream().filter(s-> finalFieldList.contains(s.getTargetAttrKey().toLowerCase(Locale.ROOT))).collect(Collectors.toMap(s -> s.getTargetAttrKey().toLowerCase(Locale.ROOT), t -> t));
        WriteExcelData codeExcelData = new WriteExcelData(0, 0, "企业编码");
        WriteExcelData groupExcelData = new WriteExcelData(0, 1, "集团码");
        excelDataList.add(codeExcelData);
        excelDataList.add(groupExcelData);
        for (int i = 0; i < fieldList.size(); i++) {
            String attrId=fieldList.get(i);
            if(attrId.equals(CODE_FIELD)||attrId.equals(CODE_GROUP_FIELD)){
                continue;
            }
            if (attrVOMap.containsKey(attrId)) {
                CodeClassifyTemplateAttrVO attrVO = attrVOMap.get(attrId);
                //Object text = attrVO.getName();
                CodeAndGroupCodeAttrMappingDTO codeAttrMappingDTO = jAttrVOMap.get(attrId);
                Object text = codeAttrMappingDTO.getSourceAttrName();
                text = exportKeyAndRequired(workbook, attrVO, text);
                WriteExcelData excelData = new WriteExcelData(0, i, text);
                if (text instanceof RichTextString) {
                    excelData.setFontColor(String.valueOf(HSSFColor.HSSFColorPredefined.RED.getIndex()));
                }
                excelDataList.add(excelData);
            }
        }
        final Integer[] rowIndex = {0};
        dataList.stream().forEach(data -> {
            rowIndex[0]++;
            String id=data.getOrDefault("id", "");
            excelDataList.add(new WriteExcelData(rowIndex[0], 0, id));
            String groupCode=data.getOrDefault("groupcode", "");
            excelDataList.add(new WriteExcelData(rowIndex[0], 1, groupCode));
            List<String> newFieldList = finalFieldList.stream().filter(e -> !e.equals("id") &&!e.equals("groupcode")).collect(Collectors.toList());
            for (int i = 0; i < newFieldList.size(); i++) {
                String attrId = newFieldList.get(i).toLowerCase(Locale.ROOT);
                if(attrId.equals("id")){
                }else if(attrId.equals("groupcode")){
                }else{
                    if (attrVOMap.containsKey(attrId)) {
                        CodeClassifyTemplateAttrVO attrVO = attrVOMap.get(attrId);
                        if (StringUtils.isNotBlank(attrVO.getEnumId()) || StringUtils.isNotBlank(attrVO.getEnumString())) {
                            attrId = attrId + "Text";
                        }
                        if (StringUtils.isNotBlank(attrVO.getReferBtmId()) || StringUtils.isNotBlank(attrVO.getReferConfig())) {
                            attrId = attrId + "name";
                        }
                        if (VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(attrId)) {
                            attrId = VciQueryWrapperForDO.LC_STATUS_FIELD_TEXT.toLowerCase(Locale.ROOT);
                        }
                        excelDataList.add(new WriteExcelData(rowIndex[0], i+2, data.getOrDefault(attrId, "")));
                    }
                }
            }
        });
        WriteExcelOption excelOption = new WriteExcelOption();
        excelOption.addSheetDataList(execGroupCodePortDataDTO.getSheetName(),excelDataList);
        //增加模板的信息导入
        LinkedList<WriteExcelData> tempEDList = new LinkedList<>();
        tempEDList.add(new WriteExcelData(0,0,"模板主键"));
        tempEDList.add(new WriteExcelData(0,1,"模板代号"));
        tempEDList.add(new WriteExcelData(0,2,"模板名称"));
        tempEDList.add(new WriteExcelData(1,0,templateVO.getOid()));
        tempEDList.add(new WriteExcelData(1,1,templateVO.getId()));
        tempEDList.add(new WriteExcelData(1,2,templateVO.getName()));
        excelOption.addSheetDataList("模板信息【请勿删除或移动】",tempEDList);
        ExcelUtil.writeDataToFile(excelName, excelOption);
        log.info("文件路径"+excelName);
        return excelName;
    }
    /***
     * é›†å›¢å¯¼å‡ºæ¨¡æ¿å±žæ€§æ˜ å°„信息获取
     * @param templateVO
     * @param execGroupCodePortDataDTO
     */
    private void createExportGroupCodeMapConfig(CodeClassifyTemplateVO templateVO,ExecGroupCodePortDataDTO execGroupCodePortDataDTO){
        String classOid=templateVO.getCodeclassifyoid();
        String templateOid=templateVO.getOid();
        R r=mdmInterJtClient.list_mapping(classOid);
        if(r.isSuccess()){
            List<DockingPreAttrMappingVO>dockingPreAttrMappingVOList= (List<DockingPreAttrMappingVO>) r.getData();
            List<CodeAndGroupCodeAttrMappingDTO> codeAttrMapGroupAttrDTOS=new ArrayList<>();
            LinkedList<String> fieldList=new LinkedList<>();
            LinkedList<String> colNameList=new LinkedList<>();
            dockingPreAttrMappingVOList.stream().forEach(dockingPreAttrMappingVO -> {
                CodeAndGroupCodeAttrMappingDTO codeAndGroupCodeAttrMappingDTO=new CodeAndGroupCodeAttrMappingDTO();
                if(StringUtils.isNotBlank(dockingPreAttrMappingVO.getTargetAttrId())){
                    codeAndGroupCodeAttrMappingDTO.setDefaultValue(dockingPreAttrMappingVO.getDefaultValue());
                    codeAndGroupCodeAttrMappingDTO.setMetaListId(dockingPreAttrMappingVO.getMetaListId());
                    codeAndGroupCodeAttrMappingDTO.setSourceAttrKey(dockingPreAttrMappingVO.getSourceAttrKey());
                    codeAndGroupCodeAttrMappingDTO.setSourceAttrName(dockingPreAttrMappingVO.getSourceAttrName());
                    codeAndGroupCodeAttrMappingDTO.setTargetAttrId(dockingPreAttrMappingVO.getTargetAttrId());
                    codeAndGroupCodeAttrMappingDTO.setTargetAttrKey(dockingPreAttrMappingVO.getTargetAttrKey());
                    codeAndGroupCodeAttrMappingDTO.setTargetAttrName(dockingPreAttrMappingVO.getTargetAttrName());
                    fieldList.add(dockingPreAttrMappingVO.getTargetAttrKey());
                    colNameList.add(dockingPreAttrMappingVO.getSourceAttrName());
                }
                codeAttrMapGroupAttrDTOS.add(codeAndGroupCodeAttrMappingDTO);
            });
            execGroupCodePortDataDTO.setCodeAttrMapGroupAttrDTOS(codeAttrMapGroupAttrDTOS);
            execGroupCodePortDataDTO.setFieldList(fieldList);
            execGroupCodePortDataDTO.setColName(colNameList);
        }
    }
    /***
     * æŸ¥è¯¢æœªæœ‰é›†å›¢ç çš„æ•°æ®
     * @param classifyFullInfo
     * @param templateVO
     * @param selectFieldList
     * @param dataList
     */
    private void getDatas(CodeClassifyFullInfoBO classifyFullInfo,CodeClassifyTemplateVO templateVO,LinkedList<String> selectFieldList,List<Map<String,String>>dataList){
        //先查询数据
        String btmTypeId = classifyFullInfo.getTopClassifyVO().getBtmTypeId();
        String codeClassifyOid=classifyFullInfo.getCurrentClassifyVO().getOid();
        Map<String, String> conditionMap = new HashMap<>();
        if(conditionMap == null){
            conditionMap = new HashMap<>();
        }
        if(conditionMap.containsKey(VciQueryWrapperForDO.OID_FIELD)){
            conditionMap.put(VciQueryWrapperForDO.OID_FIELD,QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(conditionMap.get(VciQueryWrapperForDO.OID_FIELD)) + ")");
        }
        conditionMap.put("codeclsfpath","*" + codeClassifyOid + "*");
        conditionMap.put("groupcode_null", "null");
        conditionMap.put("lastr", "1");
        conditionMap.put("lastv", "1");
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Arrays.asList(btmTypeId));
        String tableName = "";
        if(listR.isSuccess() && !listR.getData().isEmpty()){
            tableName = Func.isNotBlank(listR.getData().get(0).getTableName()) ? listR.getData().get(0).getTableName():VciBaseUtil.getTableName(btmTypeId);
        }else{
            tableName = VciBaseUtil.getTableName(btmTypeId);
        }
        PageHelper pageHelper = new PageHelper();
        pageHelper.setLimit(1000000);
        pageHelper.setPage(1);
        pageHelper.addDefaultDesc("createTime");
        DataGrid<Map<String, String>> dataGrid = engineService.queryGrid(btmTypeId, templateVO, conditionMap, pageHelper);
        //转换数据
        if(!CollectionUtils.isEmpty(dataGrid.getData())){
            dataList.addAll(dataGrid.getData());
        }
        //封装查询出来的数据
        engineService.wrapperData(dataList, templateVO, selectFieldList,false);
        //modify by weidy@2022-09-27
        //因为在列表和表单的显示的时候,我们的开关类型页面会处理,但是在导出的时候,我们需要将true和false都替换成中文
        engineService.wrapperBoolean(dataList,templateVO);
        log.info("导出模板的数据条目数:"+dataList.size());
    }
}
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeALlCodeMapper.xml
@@ -9,5 +9,17 @@
    <select id="selectCodeAllCodePage" resultMap="CodeAllcodeResultMap">
        select * from PL_CODE_ALLCODE
    </select>
    <select id="selectGroupByClassify" resultMap="CodeAllcodeResultMap">
        select codeClassifyOid,
               codeRuleOid,
               serialUnit,
               max(unFillSerial) unFillSerial
        from (select codeClassifyOid,
                     codeRuleOid,
                     serialUnit,
                     to_number(replace(unFillSerial, ${replaceString}, '')) unFillSerial
              from PL_CODE_ALLCODE where codeClassifyOid in (${codeClassifyOid}))
        group by codeClassifyOid, codeRuleOid, serialUnit
    </select>
</mapper>
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -559,12 +559,6 @@
            connect by prior codeclassify0.PARENTCODECLASSIFYOID = codeclassify0.oid
    </select>
    <select id="selectStartWithCurrentOid" resultMap="plCodeClassifyResultMap">
        select * from <include refid="tableName"/>
                          start with oid = #{oid}
        connect by prior oid = parentcodeclassifyoid;
    </select>
    <update id="batchUpdateLcStatus" parameterType="java.util.List">
        BEGIN
        <foreach collection="records" item="item" index="index" separator=";">