ludc
2023-07-14 7602a824e39e19260ae32bb45e799e6ce43300ac
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -2,15 +2,15 @@
import com.alibaba.cloud.commons.lang.StringUtils;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.vci.ubcs.code.constant.MdmBtmTypeConstant;
import com.vci.ubcs.code.dto.CodeBasicSecDTO;
import com.vci.ubcs.code.entity.CodeBasicSec;
import com.vci.ubcs.code.entity.CodeClassifyValue;
import com.vci.ubcs.code.entity.CodeFixedValue;
import com.vci.ubcs.code.entity.*;
import com.vci.ubcs.code.enumpack.*;
import com.vci.ubcs.code.lifecycle.CodeRuleLC;
import com.vci.ubcs.code.mapper.CodeBasicSecMapper;
@@ -24,19 +24,26 @@
import com.vci.ubcs.code.wrapper.CodeBasicSecWrapper;
import com.vci.ubcs.omd.cache.EnumCache;
import com.vci.ubcs.omd.enums.EnumEnum;
import com.vci.ubcs.starter.enumpack.CodeTableNameEnum;
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.revision.service.RevisionModelUtil;
import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil;
import com.vci.ubcs.starter.util.UBCSCondition;
import com.vci.ubcs.starter.util.UBCSSqlKeyword;
import com.vci.ubcs.starter.web.enumpck.NewAppConstantEnum;
import com.vci.ubcs.starter.web.enumpck.OsCodeFillTypeEnum;
import com.vci.ubcs.starter.web.pagemodel.KeyValue;
import com.vci.ubcs.starter.web.pagemodel.UIFormReferVO;
import com.vci.ubcs.starter.web.pagemodel.*;
import com.vci.ubcs.starter.web.util.BeanUtilForVCI;
import com.vci.ubcs.starter.web.util.VciBaseUtil;
import com.vci.ubcs.starter.web.util.WebUtil;
import com.vci.ubcs.system.entity.DictBiz;
import com.vci.ubcs.system.feign.IDictBizClient;
import org.springblade.core.log.exception.ServiceException;
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.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
@@ -108,19 +115,27 @@
   /**
    * 查询所有的码段基础信息
    *
    * @param page 查询条件
    * @param codeBasicSecVO   分页和排序
    * @param conditionMap 查询条件
    * @param query 分页对象
    * @return 执行结果
    * @throws VciBaseException 查询条件和分页出错的时候会抛出异常
    */
   @Override
   public IPage<CodeBasicSecVO> gridCodeBasicSec(IPage<CodeBasicSecVO> page, CodeBasicSecVO codeBasicSecVO) throws VciBaseException {
      if(Func.isEmpty(codeBasicSecVO.getPkCodeRule()) || Func.isBlank(codeBasicSecVO.getPkCodeRule())){
   public IPage<CodeBasicSecVO> gridCodeBasicSec(Query query, Map<String,Object> conditionMap) throws ServiceException {
      if(Func.isEmpty(Func.isEmpty(conditionMap.get(CodeTableNameEnum.PL_CODE_BASICSEC.getText()+".pkCodeRule")))){
         return null;
      }
      List<CodeBasicSec> codeBasicSecs = codeBasicSecMapper.selectCodeBasicSecPage(page, codeBasicSecVO);
      return page.setRecords(CodeBasicSecWrapper.build().listVO(codeBasicSecs));
      // 联表查询 ,设置表别名,表别名默认就采用表名小写,配置高级查询的时候就需要根据这个来对where条件进行配置
      MPJLambdaWrapper<CodeBasicSec> mpjLambdaWrapper = new MPJLambdaWrapper<>(CodeBasicSec.class, CodeTableNameEnum.PL_CODE_BASICSEC.getText())
         .selectAll(CodeBasicSec.class)
         .selectAs(CodeClassify::getName, CodeBasicSec::getReferCodeClassifyOidName)
         .leftJoin(CodeClassify.class, CodeTableNameEnum.PL_CODE_CLASSIFY.getText(), CodeClassify::getOid, CodeBasicSec::getReferCodeClassifyOid)
         .leftJoin(CodeBasicSec.class,CodeTableNameEnum.PL_CODE_BASICSEC.getText()+1,CodeBasicSec::getOid,CodeBasicSec::getParentClassifySecOid
            ,ext->ext.selectAs(CodeBasicSec::getName,CodeBasicSec::getParentClassifySecText));
      // 添加where条件
      UBCSSqlKeyword.buildConditionByAs(conditionMap,mpjLambdaWrapper,CodeTableNameEnum.PL_CODE_BASICSEC.getText());
      IPage<CodeBasicSec> codeBasicSecIPage = codeBasicSecMapper.selectPage(UBCSCondition.getPage(query), mpjLambdaWrapper);
      return CodeBasicSecWrapper.build().pageVO(codeBasicSecIPage);
   }
   /**
@@ -130,7 +145,7 @@
    */
   @Override
   @Transactional(rollbackFor = Exception.class)
   public boolean batchDeleteSecByCodeRuleOid(String codeRuleOid) {
   public boolean batchDeleteSecByCodeRuleOid(String codeRuleOid) throws ServiceException {
      VciBaseUtil.alertNotNull(codeRuleOid,"编码规则主键");
      // 1、通过pkcoderule作为条件,先查询要删除基础码段
      List<CodeBasicSec> deleteList = this.codeBasicSecMapper.selectList(Wrappers.<CodeBasicSec>query().eq("pkcoderule", codeRuleOid));
@@ -148,8 +163,10 @@
         Set<String> fixedSecOidSet = fixedSecList.stream().map(CodeBasicSec::getOid).collect(Collectors.toSet());
         // 通过外键进行查询
         List<CodeFixedValue> fixedValueS = fixedValueMapper.selectList(Wrappers.<CodeFixedValue>query().lambda().in(CodeFixedValue::getCodeFixedSecOid,fixedSecOidSet));
         // 根据查询出来的id执行固定码段执行删除
         deletFlag = fixedValueMapper.deleteBatchIds(fixedValueS.stream().map(CodeFixedValue::getOid).collect(Collectors.toSet()))>0;
         if(!fixedValueS.isEmpty()){
            // 根据查询出来的id执行固定码段执行删除
            deletFlag = fixedValueMapper.deleteBatchIds(fixedValueS.stream().map(CodeFixedValue::getOid).collect(Collectors.toSet()))>0;
         }
      }
      // 4、再删除分类码段
      List<CodeBasicSec> classifySecList = deleteList.stream().filter(sec -> {
@@ -160,8 +177,10 @@
         Set<String> classifySecOidSet = classifySecList.stream().map(CodeBasicSec::getOid).collect(Collectors.toSet());
         // 通过外键进行查询
         List<CodeClassifyValue> fixedValueS = codeClassifyValueMapper.selectList(Wrappers.<CodeClassifyValue>query().lambda().in(CodeClassifyValue::getCodeClassifySecOid,classifySecOidSet));
         // 根据查询出来的主键id执行固定码段执行删除
         deletFlag = fixedValueMapper.deleteBatchIds(fixedValueS.stream().map(CodeClassifyValue::getOid).collect(Collectors.toSet()))>0;
         if(!fixedValueS.isEmpty()){
            // 根据查询出来的主键id执行固定码段执行删除
            deletFlag = fixedValueMapper.deleteBatchIds(fixedValueS.stream().map(CodeClassifyValue::getOid).collect(Collectors.toSet()))>0;
         }
      }
      return deletFlag;
   }
@@ -173,7 +192,7 @@
    * @return 有空的则传key-属性名 value-字段含义,没有空的则传 key-success value-true
    */
   @Override
   public KeyValue checkAttrNullableBySecType(CodeBasicSecDTO codeBasicSecDTO) {
   public KeyValue checkAttrNullableBySecType(CodeBasicSecDTO codeBasicSecDTO) throws ServiceException {
      VciBaseUtil.alertNotNull(codeBasicSecDTO.getSecType(), "码段分类");
      String secType = codeBasicSecDTO.getSecType();
      HashMap<String, String> attrMap = JSONObject.parseObject(JSONObject.toJSONString(codeBasicSecDTO), HashMap.class);
@@ -244,16 +263,17 @@
      //引用码段的时候,需要判断参照的信息是否正确
      if(CodeSecTypeEnum.CODE_REFER_SEC.getValue().equalsIgnoreCase(codeBasicSecDO.getSecType())){
         if(StringUtils.isBlank(codeBasicSecDO.getReferConfig())){
            throw new VciBaseException("引用码段的时候,需要填写 参照配置 的内容");
            throw new VciBaseException("引用码段的时候,需要填写 参照配置的内容");
         }
         try{
            //JSONObject.parseObject(codeBasicSecDO.getReferConfig(), UIFormReferVO.class);
            codeReferConfigVO = JSONObject.parseObject(codeBasicSecDO.getReferConfig(), CodeReferConfigVO.class);
            // 将参照配置进行持久化,给用户提供可可选择参照配置的方式
         }catch (Throwable e){
            throw new VciBaseException("引用码段的时候,参照配置的内容的格式不正确,",new String[0],e);
         }
         // 判断是否为引用码段,如果是应用码段的话,为了适配前端组件,这里要对表进行处理一下,按照以前的参照格式进行转换
         codeBasicSecDO.setReferValueInfo(referConfigToUIUiTable(codeReferConfigVO));
         if(codeReferConfigVO.getIsPersistence()=="true"){
            codeReferConfigService.insert(codeReferConfigVO);
         }
@@ -262,14 +282,59 @@
      //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
      if(StringUtils.isNotBlank(codeBasicSecDO.getCodeFillSeparator())){
         DictBiz dictBiz = new DictBiz();
         dictBiz.setCode(MdmBtmTypeConstant.CODE_BASIC_SEC);
         dictBiz.setDictKey("codefileseparator");
         dictBiz.setCode("codeFillSeparator");
         dictBiz.setDictKey(codeBasicSecDO.getCodeFillSeparator());
         dictBiz.setDictValue(codeBasicSecDO.getCodeFillSeparator());
         //从原来的charService(可输可选)更改为调用omd中的接口来实现
         iDictBizClient.getCheck(dictBiz);
         //charService.save(MdmBtmTypeConstant.CODE_BASIC_SEC,"codefileseparator",codeBasicSecDO.getCodeFillSeparator(),sessionInfo);
      }
      return resBoolean;
   }
   /**
    * 将referconfig转换为JSON格式的UIFormReferVO
    * @param codeReferConfig
    * @return
    */
   private String referConfigToUIUiTable(CodeReferConfigVO codeReferConfig){
      // 拷贝为以前的老对象
      UIReferConfigFormVO uiFormReferVO = new UIReferConfigFormVO();
      BeanUtil.copy(codeReferConfig,uiFormReferVO);
      // 表格的自定义定义
      UITableConfigVO uiTableConfigVO = new UITableConfigVO();
      uiTableConfigVO.setPage(new UITablePageVO(codeReferConfig.getLimit(),1));
      // 列表的列的信息转换
      List<TableColVO> uiTableFieldVOs = new ArrayList<>();
      // 快速查询列
      List<TableColVO> queryColumns = new ArrayList<>();
      if(!codeReferConfig.getCodeShowFieldConfigVOS().isEmpty()){
         codeReferConfig.getCodeShowFieldConfigVOS().stream().forEach(showField ->{
            TableColVO tableColVO = new TableColVO();
            BeanUtil.copy(showField,tableColVO);
            tableColVO.setSortField(showField.getAttrSortField());
            uiTableFieldVOs.add(tableColVO);
            if(showField.getIsQuery().equals("true")){
               queryColumns.add(tableColVO);
            }
         });
      }
      // 显示的列
      uiTableConfigVO.setCols(uiTableFieldVOs);
      // 快速查询列
      uiTableConfigVO.setQueryColumns(queryColumns);
      //set给表格配置属性
      uiFormReferVO.setTableConfig(uiTableConfigVO);
      // 筛选条件
      HashMap<String, String> whereMap = new HashMap<>();
      if(!codeReferConfig.getCodeSrchCondConfigVOS().isEmpty()){
         codeReferConfig.getCodeSrchCondConfigVOS().stream().forEach(srch->{
            whereMap.put(srch.getFilterField()+"_"+srch.getFilterType(),srch.getFilterValue());
         });
      }
      uiFormReferVO.setWhere(whereMap);
      return JSONObject.toJSONString(uiFormReferVO);
   }
   /**
@@ -302,25 +367,31 @@
            && StringUtils.isBlank(codeBasicSecDO.getCodeFillSeparator())){
            throw new VciBaseException("当补位方式为左补位或者右补位的时候,补位字符不能为空");
         }
         CodeReferConfigVO codeReferConfigVO = null;
         //引用码段的时候,需要判断参照的信息是否正确
         if(CodeSecTypeEnum.CODE_REFER_SEC.getValue().equalsIgnoreCase(codeBasicSecDO.getSecType())){
            if(StringUtils.isBlank(codeBasicSecDO.getReferConfig())){
               throw new VciBaseException("引用码段的时候,需要填写 参照配置 的内容");
               throw new VciBaseException("引用码段的时候,需要填写参照配置的内容");
            }
            try{
               JSONObject.parseObject(codeBasicSecDO.getReferConfig(), UIFormReferVO.class);
               // JSONObject.parseObject(codeBasicSecDO.getReferConfig(), UIFormReferVO.class);
               codeReferConfigVO = JSONObject.parseObject(codeBasicSecDO.getReferConfig(), CodeReferConfigVO.class);
            }catch (Throwable e){
               throw new VciBaseException("引用码段的时候,参照配置的内容的格式不正确,",new String[0],e);
            }
            // 判断是否为引用码段,如果是应用码段的话,为了适配前端组件,这里要对表进行处理一下,按照以前的参照格式进行转换
            codeBasicSecDO.setReferValueInfo(referConfigToUIUiTable(codeReferConfigVO));
            if(codeReferConfigVO.getIsPersistence()=="true"){
               codeReferConfigService.insert(codeReferConfigVO);
            }
         }
         revisionModelUtil.copyFromDTOIgnore(codeBasicSecDTO, codeBasicSecDO);
         resBoolean = codeBasicSecMapper.updateById(codeBasicSecDO)>0;
         //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
         if(StringUtils.isNotBlank(codeBasicSecDO.getCodeFillSeparator())){
            //这儿目前需要改 2023/4/24
            DictBiz dictBiz = new DictBiz();
            dictBiz.setCode(MdmBtmTypeConstant.CODE_BASIC_SEC);
            dictBiz.setDictKey("codefileseparator");
            dictBiz.setCode("codeFillSeparator");
            dictBiz.setDictKey(codeBasicSecDO.getCodeFillSeparator());
            dictBiz.setDictValue(codeBasicSecDO.getCodeFillSeparator());
            //从原来的charService(可输可选)更改为调用omd中的接口来实现
            iDictBizClient.getCheck(dictBiz);
@@ -336,7 +407,7 @@
    * @param secType 码段类型
    * @return 不可为空的字段集合
    */
   private Map<String, String> getNotNullableAttr(String secType) {
   private Map<String, String> getNotNullableAttr(String secType) throws ServiceException {
      Map<String, String> attrMap = new HashMap<>();
      if (CodeSecTypeEnum.CODE_ATTR_SEC.getValue().equalsIgnoreCase(secType)) {
         attrMap.put("name", "属性码段名称");
@@ -452,29 +523,29 @@
   /**
    * 参照码段基础信息列表
    *
    * @param codeBasicSecVO 查询条件
    * @param page   分页和排序
    * @param conditionMap 查询条件
    * @param query 分页和排序
    * @return 码段基础信息显示对象列表,生效的内容
    * @throws VciBaseException 查询条件和分页出错的时候会抛出异常
    */
   @Override
   public IPage<CodeBasicSecVO> refDataGridCodeBasicSec(IPage<CodeBasicSecVO> page, CodeBasicSecVO codeBasicSecVO) throws VciBaseException {
      return gridCodeBasicSec(page,codeBasicSecVO);
   public IPage<CodeBasicSecVO> refDataGridCodeBasicSec(Query query ,Map<String,Object> conditionMap) throws VciBaseException {
      return gridCodeBasicSec(query,conditionMap);
   }
   /**
    * 参照分类的码段
    * @param codeBasicSecVO 查询条件
    * @param page 分页的对象
    * @param conditionMap 查询条件
    * @param query 分页和排序
    * @return 码段的内容
    */
   @Override
   public IPage<CodeBasicSecVO> refDataGridClassifySec(IPage<CodeBasicSecVO> page, CodeBasicSecVO codeBasicSecVO) throws VciBaseException {
      if(Func.isEmpty(codeBasicSecVO.getPkCodeRule()) || Func.isBlank(codeBasicSecVO.getPkCodeRule())){
   public IPage<CodeBasicSecVO> refDataGridClassifySec(Query query ,Map<String,Object> conditionMap) throws VciBaseException {
      if(Func.isEmpty(conditionMap.get("pkCodeRule"))){
         return null;
      }
      codeBasicSecVO.setSecType(CodeSecTypeEnum.CODE_CLASSIFY_SEC.getValue());
      return refDataGridCodeBasicSec(page,codeBasicSecVO);
      conditionMap.put("secType",(CodeSecTypeEnum.CODE_CLASSIFY_SEC.getValue()));
      return refDataGridCodeBasicSec(query.setAscs("ordernum"),conditionMap);
   }
   /**
@@ -486,27 +557,30 @@
    */
   @Override
   @Transactional(rollbackFor = Exception.class)
   public R cloneCodeBasicSec(List<String> oidList, String pkCodeRule) {
   public R cloneCodeBasicSec(List<String> oidList, String pkCodeRule) throws ServiceException {
      boolean isLinked = checkIsLinked(pkCodeRule,null);
      if (isLinked) {
         return R.fail("编码规则已被引用,不允许编辑或删除");
      }
      List<CodeBasicSec> createList = new ArrayList<>();
      List<CodeBasicSec> basicSecDOS = codeBasicSecMapper.selectBatchIds(oidList);
      if(basicSecDOS.isEmpty()){
         return R.fail("克隆的码段信息不存在!");
      }
      basicSecDOS.forEach(sec -> {
         CodeBasicSec newSecDO = new CodeBasicSec();
         BeanUtilForVCI.copyPropertiesIgnoreCase(sec,newSecDO);
         newSecDO.setOid("");
         newSecDO.setNameOid("");
         newSecDO.setRevisionOid("");
         newSecDO.setOid(VciBaseUtil.getPk());
         newSecDO.setNameOid(VciBaseUtil.getPk());
         newSecDO.setRevisionOid(VciBaseUtil.getPk());
         newSecDO.setId(newSecDO.getId() + "_copy");
         newSecDO.setName(newSecDO.getName() + "_copy");
         newSecDO.setPkCodeRule(pkCodeRule);
         createList.add(newSecDO);
      });
      boolean b = saveBatch(createList);
      boolean resBoolean = saveBatch(createList);
      //codeBasicSecMapper.insertBatch(createList);
      return R.data(b,"克隆码段信息成功");
      return resBoolean ? R.data(resBoolean,"克隆码段信息成功"):R.fail("克隆码段信息失败!");
   }
   /**
@@ -550,7 +624,7 @@
    */
   @Override
   @Transactional(rollbackFor = Exception.class)
   public boolean upOrderNum(String oid) {
   public boolean upOrderNum(String oid) throws ServiceException{
      CodeBasicSec secDO = selectByOid(oid);
      if(secDO.getOrderNum() > 1){
         //等于1的时候不能上移了
@@ -581,7 +655,7 @@
    */
   @Override
   @Transactional(rollbackFor = Exception.class)
   public boolean downOrderNum(String oid) {
   public boolean downOrderNum(String oid) throws ServiceException {
      CodeBasicSec secDO = selectByOid(oid);
      Long total = codeBasicSecMapper.selectCount(Wrappers.<CodeBasicSec>query()
         .lambda().eq(CodeBasicSec::getPkCodeRule,secDO.getPkCodeRule())
@@ -613,7 +687,7 @@
    * @return
    */
   @Override
   public List<String> getOidByCodeclassifysecOid(String codeClassifySecOid) {
   public List<String> getOidByCodeclassifysecOid(String codeClassifySecOid)throws ServiceException {
      return codeBasicSecMapper.getOidByCodeclassifysecOid(codeClassifySecOid.trim());
   }
@@ -693,18 +767,14 @@
    * @return 码段的内容
    */
   @Override
   public List<CodeBasicSecVO> listCodeBasicSecByRuleOid(String ruleOid) {
   public List<CodeBasicSecVO> listCodeBasicSecByRuleOid(String ruleOid)throws ServiceException {
      if(StringUtils.isBlank(ruleOid)){
         return new ArrayList<>();
      }
//      Map<String,String> conditionMap = new HashMap<>();
//      conditionMap.put("pkCodeRule",ruleOid);
//      PageHelper pageHelper = new PageHelper(-1);
//      pageHelper.addDefaultAsc("ordernum");
      QueryWrapper<CodeBasicSec> wrapper = new QueryWrapper<>();
      wrapper.eq("pkCodeRule",ruleOid);
      wrapper.orderByAsc("ordernum");
      List<CodeBasicSec> secDOList = baseMapper.selectList(wrapper);//.selectByCondition(conditionMap, pageHelper);
      LambdaQueryWrapper<CodeBasicSec> wrapper = Wrappers.<CodeBasicSec>query().lambda()
         .eq(CodeBasicSec::getPkCodeRule, ruleOid)
         .orderByAsc(CodeBasicSec::getOrderNum);
      List<CodeBasicSec> secDOList = baseMapper.selectList(wrapper);//
      return codeBasicSecDO2VOs(secDOList,true);
   }
@@ -772,12 +842,22 @@
   public CodeBasicSecVO codeBasicSecDO2VO(CodeBasicSec codeBasicSecDO) throws VciBaseException {
      CodeBasicSecVO codeBasicSecVO = new CodeBasicSecVO();
      if (codeBasicSecDO != null) {
         BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecVO, codeBasicSecVO);
         codeBasicSecVO.setSecTypeText(CodeSecTypeEnum.getTextByValue(codeBasicSecVO.getSecType()));
         codeBasicSecVO.setCodeLevelTypeText(CodeLevelTypeEnum.getTextByValue(codeBasicSecVO.getCodeLevelType()));
         codeBasicSecVO.setCodeSecLengthTypeText(CodeSecLengthTypeEnum.getTextByValue(codeBasicSecVO.getCodeSecLengthType()));
         codeBasicSecVO.setValueCutTypeText(CodeCutTypeEnum.getValueByText(codeBasicSecVO.getValueCutType()));
         codeBasicSecVO.setCodeGetValueTypeText(CodeGetValueTypeEnum.getValueByText(codeBasicSecVO.getCodeGetValueType()));
         BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecDO, codeBasicSecVO);
         if(StringUtils.isNotBlank(codeBasicSecDO.getSecType())){
            codeBasicSecVO.setSecTypeText(EnumCache.getValue(EnumEnum.CODE_SEC_TYPE,codeBasicSecDO.getSecType()));
         }
         if(StringUtils.isNotBlank(codeBasicSecDO.getCodeLevelType())){
            codeBasicSecVO.setCodeLevelTypeText(EnumCache.getValue(EnumEnum.CODE_LEVEL_TYPE,codeBasicSecDO.getCodeLevelType()));
         }
         if(StringUtils.isNotBlank(codeBasicSecDO.getCodeSecLengthType())){
            codeBasicSecVO.setCodeSecLengthTypeText(EnumCache.getValue(EnumEnum.CODE_SEC_LENGTH,codeBasicSecDO.getCodeSecLengthType()));
         }
         if(StringUtils.isNotBlank(codeBasicSecDO.getValueCutType())){
            codeBasicSecVO.setValueCutTypeText(EnumCache.getValue(EnumEnum.CODE_CUT_TYPE,codeBasicSecDO.getValueCutType()));
         }
         if(StringUtils.isNotBlank(codeBasicSecDO.getCodeGetValueType())){
            codeBasicSecVO.setCodeGetValueTypeText(EnumCache.getValue(EnumEnum.CODE_GET_VALUE_TYPE,codeBasicSecDO.getCodeGetValueType()));
         }
         // 如果是分类码段需要查询所属分类的中文名称
         if(codeBasicSecDO.getSecType().equals("codeclassifysec") && Func.isNotEmpty(codeBasicSecDO.getParentClassifySecOid())){
            CodeBasicSec codeBasicSec = codeBasicSecMapper.selectOne(Wrappers.<CodeBasicSec>query().lambda()