ludc
2023-06-05 dd6942743fa3936a1bbcbe6f4102c028d8021d5c
完善高级查询组件
已修改15个文件
543 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue 277 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/code-dialog-page/referSelectBtmAttrDialog.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/code/code.vue 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeReferBtmTypeController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeClassifyService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeReferBtmTypeService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeReferBtmTypeServiceImpl.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/wrapper/CodeRuleWrapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/GroupCodeApplyApplication.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/DockingPreApplyFormServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/DockingPreAttrMappingServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/DockingPreClassifyServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/GroupMdmInterServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/advanced-query/advancedQuery.vue
@@ -1,73 +1,88 @@
<!-- 高级查询对话框组件
    1、打开与关闭与el-dialog用法一致;
    2、用户编辑好的查询条件通过@echoContion事件绑定相应的函数,实现子组件值传递回父组件;
    3、用户输入的值会以conditionMap[field]的格式拼接好进行回传,然后就需要使用的地方自行进行查询的调用;
 -->
<template>
    <el-dialog 
        title="高级查询"
        append-to-body
        width="55vw"
        style="height: 115vh; overflow: hidden"
        style="height: 115vh; margin-top: -10vh; overflow: hidden"
        :visible.sync="isShowDialog"
        @close="recoverPage"
        destroy-on-close>
        <div class="search-total">
            <el-row>
                <div class="grid-content">
                    <el-button
                        type="primary"
                        size="small"
                        icon="el-icon-search"
                        @click="searchSubmit">
                        查询
                    </el-button>
                    <el-button
                        type="warning"
                        size="small"
                        icon="el-icon-refresh"
                        @click="resetInput">
                        重置
                    </el-button>
                </div>
            </el-row>
            <el-row
                v-for="(item,index) in initOptions.column"
                :key="item.value"
                class="search-content"
                :span="24">
                <el-col :span="4">
                    <div class="grid-content">
                        <el-select placeholder="请选择">
                            <el-option
                                v-for="feildName in item.searchfeildName"
                                :key="feildName.value"
                                :label="feildName.label"
                                :value="feildName.value">
            <!-- 头部按钮区域 -->
            <div class="dialog-search-button">
                <el-button
                    type="primary"
                    size="small"
                    icon="el-icon-search"
                    @click="searchSubmit">
                    查询
                </el-button>
                <el-button
                    type="warning"
                    size="small"
                    icon="el-icon-refresh"
                    @click="resetInput">
                    重置
                </el-button>
            </div>
            <!-- 页面主体内容区域 -->
            <div class="search-content">
                <el-row
                    v-for="(item,index) in initOptions"
                    :key="item.queryField"
                    v-show="!item.hidden"
                    :span="24">
                    <el-col :span="5">
                        <div class="grid-content">
                            <el-select placeholder="请选择" v-model="searchFormArrays[index].queryField">
                                <el-option
                                    v-for="feildName in initOptions"
                                    :key="feildName.queryField"
                                    :label="feildName.title"
                                    :value="feildName.queryField">
                                </el-option>
                        </el-select>
                    </div>
                </el-col>
                <el-col :span="4">
                    <div class="grid-content">
                        <el-select placeholder="请选择">
                            <el-option
                            v-for="condition in item.searchCondition"
                            :key="condition.value"
                            :label="condition.label"
                            :value="condition.value">
                            </el-option>
                        </el-select>
                    </div>
                </el-col>
                <el-col :span="13">
                    <div class="grid-content">
                        <div class="el-input">
                            <input type="text" placeholder="请输入" autocomplete="off" class="el-input__inner" :value="value">
                            </el-select>
                        </div>
                    </div>
                </el-col>
                <el-col :span="2">
                    <div class="grid-content">
                        <i class="el-icon-close" @click="removeInput(index)"></i>
                    </div>
                </el-col>
            </el-row>
                    </el-col>
                    <el-col :span="4">
                        <div class="grid-content">
                            <el-select placeholder="请选择" v-model="searchFormArrays[index].condition">
                                <el-option
                                    v-for="condition in item.fieldType=='text' ? searchConditions:switchSearchConditions"
                                    :key="condition.value"
                                    :label="condition.label"
                                    :value="condition.value">
                                </el-option>
                            </el-select>
                        </div>
                    </el-col>
                    <el-col :span="12">
                        <div class="grid-content">
                            <el-input v-show="item.fieldType==='text' || item.fieldType===''" v-model="searchFormArrays[index].fieldValue" type="text" placeholder="请输入"></el-input>
                            <el-select v-show="item.fieldType==='combox'" v-model="searchFormArrays[index].fieldValue" placeholder="请选择">
                                <el-option
                                    v-for="option in item.data"
                                    :key="option.value"
                                    :label="option.key"
                                    :value="option.value">
                                </el-option>
                            </el-select>
                            <el-switch  v-show="item.fieldType==='truefalse'" v-model="searchFormArrays[index].fieldValue"></el-switch>
                        </div>
                    </el-col>
                    <el-col :span="2">
                        <div class="grid-content">
                            <i class="el-icon-close" @click="removeInput(index)"></i>
                        </div>
                    </el-col>
                </el-row>
            </div>
        </div>
    </el-dialog>
</template>
@@ -86,81 +101,166 @@
            type: "Object",
            default: {},
        },
        // 页面数据渲染配置
        searchForm: {
        conditionMapParams: {
            type: "Object",
            default: {},
        },
        value:{
            type: "String",
        }
    },
    data() {
        return {
            // 对话框显示控制
            isShowDialog: this.visible,
            initOptions: {},
            searchForm: {},
            initOptions: [],
            // 字段是输入框类型的条件数组
            searchConditions: [
                {
                    value: "=",
                    label: "等于",
                },{
                    value: "like",
                    label: "包含",
                },{
                    value: "!=",
                    label: "不等于",
                },{
                    value: ">",
                    label: "大于",
                },{
                    value: "<",
                    label: "小于",
                },
            ],
            // 字段是单选或下拉框类型的条件数组
            switchSearchConditions: [
                {
                    value: "=",
                    label: "等于",
                },{
                    value: "!=",
                    label: "不等于",
                },
            ],
            searchFormArrays: [],
        }
    },
    watch: {
        // 监听父组件传的窗口显示隐藏的值
        visible (){
            this.isShowDialog = this.visible;
        },
        // 对话框内容渲染配置
        options(){
            // 将options配置赋值到data中的option中,避免深浅拷贝的问题所以需要转json之后再赋值
            const data = JSON.stringify(this.options);
            this.initOptions = JSON.parse(data);
            // console.log(this.initOptions);
            this.initOptions.forEach((item,index) => {
                let add = {
                    queryField: String(item.queryField),
                    condition: item.fieldType=='text' ? String("like"):String("="),
                    fieldValue: item.fieldType=='truefalse' ? Boolean(false):String(''),
                }
                this.searchFormArrays.push(add)
            });
            //console.log(this.searchFormArrays);
        }
    },
    created () {
        // 将options配置赋值到data中的option中,避免深浅拷贝的问题所以需要转json之后再赋值
        const data = JSON.stringify(this.options);
        this.initOptions = JSON.parse(data);
        console.log(this.searchForm);
    },
    methods: {
        // 移除搜索框
        removeInput(index){
            //console.log(this.options.column);
            this.$delete(this.initOptions.column,index);
            //console.log(this.initOptions);
            this.$delete(this.initOptions,index);
            this.$delete(this.searchFormArrays,index);
        },
        // 重置当前界面的输入框
        resetInput(){
            const data = JSON.stringify(this.options);
            this.initOptions = JSON.parse(data);
            let array = [];
            this.initOptions.forEach((item,index) => {
                let add = {
                    queryField: String(item.queryField),
                    condition:item.fieldType=='text' ? String("like"):String("="),
                    fieldValue: item.fieldType=='truefalse' ? Boolean(false):String(''),
                }
                array.push(add)
            });
            this.searchFormArrays = array;
            //console.log(this.initOptions);
            //console.log(this.searchFormArrays);
        },
        // 恢复页面
        recoverPage(){
            this.resetInput();
            this.$emit('update:visible', false);
        },
        // 提交当前页面的输入
        // 提交当前页面的输入的查询条件并做对应的过滤与检查
        searchSubmit(){
            console.log(11);
            let condtionParam = {};
            const searchConditions = this.searchFormArrays;
            for(let index = 0; index < searchConditions.length; index++) {
                //console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']+'' == 'undefined');
                if(searchConditions[index].fieldValue != '' || searchConditions[index].fieldValue+''==='false') {
                    // 存在相同的查询条件
                    if(condtionParam['conditionMap['+searchConditions[index].queryField+']']+''.trim() != 'undefined' ) {
                        this.$message.warning("存在重复查询条件,请仔细核对!");
                        return false;
                    }
                    condtionParam['conditionMap['+searchConditions[index].queryField+']'] = searchConditions[index].fieldValue;
                }
            }
            //查询条件没有出现重复属性,并且过滤掉了空值,传递给父组件
            //console.log(condtionParam);
            // if(){
            // }
            this.$emit('echoContion',condtionParam)
        },
    }
}
</script>
<style lang="scss">
<style lang="scss" scoped>
    .search-total {
        border-radius: 4px;
        min-height: 36px;
        min-height: 70vh;
        // margin-left: 35px;
        margin-top: -20px;
        margin-top: -8px;
        overflow-y: auto;
        height: 70vh;
    }
    .search-total > .el-row{
        margin-bottom: 10px;
        &:last-child {
            margin-bottom: 0;
        }
    .dialog-search-button {
        border-top: 1px solid #E9E7E7;
        border-bottom: 1px solid #E9E7E7;
        padding: 10px 10px 10px;
        position: fixed;
        display: block;
        background-color: #fff;
        top: 90px;
        width: 50%;
        z-index: 1000;
    }
    .search-total > .el-col {
    // .search-total > .search-content > .el-row{
    //     margin-bottom: 5px;
    //     &:last-child {
    //         margin-bottom: 0;
    //     }
    // }
    .search-total > .search-content {
        margin-top: 40px;
    }
    .search-total > .search-content > .el-row > .el-col {
        border-radius: 4px;
    }
    .search-total > .el-col > .grid-content {
    .search-total > .search-content > .el-row > .el-col > .grid-content {
        border-radius: 4px;
        min-height: 36px;
    }
    .search-content > .el-col {
    .search-total > .search-content > .el-row > .el-col {
        margin-right: 6px;
        &:last-child {
            margin-right: 0;
@@ -175,6 +275,13 @@
        font-size: 38px;
        color: rgb(219, 52, 6);
    }
    .grid-content > .el-select {
        width: 100%;
    }
    .grid-content > .el-switch {
        line-height: 40px;
        height: 40px;
    }
</style>
Source/UBCS-WEB/src/components/code-dialog-page/referSelectBtmAttrDialog.vue
@@ -60,6 +60,7 @@
                    addBtn: false,
                    menu: false,
                    // refreshBtn: false,
                    disablePage: false,
                    searchShowBtn: false,
                    columnBtn: false,
                    dialogClickModal: false,
@@ -84,11 +85,11 @@
                    },{
                        label: '属性长度',
                        search: false,
                        prop: 'attrLength'
                        prop: 'attributeLength'
                    },{
                        label: '属性类型',
                        search: false,
                        prop: 'attrType'
                        prop: 'attrDataTypeText'
                    }],
                },
                crudData: [],
@@ -114,32 +115,38 @@
            this.options = params;
            this.crudParams.crudLoading = true;
            // 调用api请求
            const data = {
                total: 2,
                data: [{
                    id: 'test',
                    name: '测试',
                    attrLength: 11,
                    attrType: '字符串'
                }, {
                    id: 'test1',
                    name: '测试1',
                    attrLength: 12,
                    attrType: '数字'
                }]
            }
            // const data = {
            //     total: 2,
            //     data: [{
            //         id: 'test',
            //         name: '测试',
            //         attrLength: 11,
            //         attrType: '字符串'
            //     }, {
            //         id: 'test1',
            //         name: '测试1',
            //         attrLength: 12,
            //         attrType: '数字'
            //     }]
            // }
            let param = {};
            // 多个conditionMap这样传参
            if(this.crudParams.crudQuery){
                Object.keys(crudParams.crudQuery).forEach(key=>{
                    param['conditionMap['+key+']'] = crudParams.crudQuery[key];
                Object.keys(this.crudParams.crudQuery).forEach(key=>{
                    param['conditionMap['+key+']'] = this.crudParams.crudQuery[key];
                });
            }
            param['conditionMap[btmTypeId]'] = this.options.btmTypeId;
            gridAttributesByBtmId(1,-1,param).then(res=>{
                console.log(res);
                const data = res.data;
                console.log(data.data.records);
                this.crudParams.crudData = data.data.records;
                this.crudParams.crudLoading = false;
                this.$nextTick(()=>{
                    this.$refs[this.crudParams.ref].doLayout();
                })
            })
            this.crudParams.crudData = data.data;
            this.crudParams.crudLoading = false;
        },
        selectedBtmTypeAttrSrchChange(params, done){
            this.crudParams.crudQuery = params;
Source/UBCS-WEB/src/views/code/code.vue
@@ -99,10 +99,10 @@
    </basic-container>
    <!-- 高级查询对话框 -->
    <advanced-query
      ref="advancedQuery"
      :ref="advancedQueryParam.ref"
      :options="advancedQueryParam.options"
      :visible.sync="advancedQueryParam.advancedQuerySettingBox"
      v-model="value">
      @echoContion="echoSeniorContionMap">
    </advanced-query>
    <!-- 编码规则相关对话框 -->
    <el-dialog title="编码规则使用范围"
@@ -786,7 +786,7 @@
    addSave,
    refDataGridClassifySec,
  } from "@/api/code/codebasic";
  import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify";
  import { listClassifyLinkAttr } from "@/api/code/codeclassify";
  import { gridCodeFixedValue,addSaveCodeFixedValue,deleteCodeFixedValue,editCodeFixedValue,saveOrder } from "@/api/code/codeFixedValue";
  import { treeCodeClassifyValue,addSaveCodeClassifyValue,editCodeClassifyValue,deleteCodeClassifyValue,saveCodeClassifyValueOrder } from "@/api/code/codeClassifyValue";
  import { getDictionary } from "@/api/omd/enum";
@@ -799,18 +799,14 @@
  import treeOption from "@/const/code/classifyTreeOptionDialog";
  import classisyValueTreeOption from "@/const/code/classisyValueTreeDialog";
  import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog";
  import referBtmOption from "@/const/code/referBtmDialog";
  import fixedValueOption from "@/const/code/fixedValueMgrDialog";
  import {mapGetters} from "vuex";
  import func from "@/util/func";
  import {MasterTable} from "@/api/GetItem";
import referBtmTypeCrudDialog from '../../components/code-dialog-page/referBtmTypeCrudDialog.vue';
  export default {
  components: { referBtmTypeCrudDialog },
      data() {
        return {
          value:"1",
          ruleForm: {},
          query: {},
          loading: true,
@@ -1054,67 +1050,11 @@
          // 高级查询对话框相关参数
          advancedQueryParam: {
            ref: 'advancedQuery',
            advancedQuerySettingBox: false,
            searchForm: {
              name: 'advanced',
            },
            options: {
              labelWidth: '110px',
              // 查询字段
              searchfeildName: [
                    {
                      label: '编号',
                      value: 'id',
                    },
                    {
                      label: '名称',
                      value: 'name',
                    },
                    {
                      label: '状态',
                      value: 'status',
                    },
              ],
              // 查询条件 等于、包含、不等于、介于……
              searchCondition: [
                {
                  label: '等于',
                  value: '=',
                },
                {
                  label: '包含',
                  value: 'like',
                },
                {
                  label: '大于等于',
                  value: '>=',
                },
                {
                  label: '小于等于',
                  value: '<=',
                },
                {
                  label: '不等于',
                  value: '!=',
                },
                {
                  label: '介于',
                  value: 'between',
                },
              ],
              column: [
                {
                  type: 'text',
                },
                {
                },
              ],
            },
            options: {},
            //conditionMapParams: {},
          },
        };
      },
@@ -1135,9 +1075,42 @@
            functionId: 5,
          }).then(res=>{
            console.log(res.data.tableDefineVO.seniorQueryColumns);
            this.advancedQueryParam.options = res.data.tableDefineVO.seniorQueryColumns;
          }) 
          // this.advancedQueryParam.options = [
          //   {
          //     data: [],
          //     title: '编号',
          //     fieldType: 'text',
          //     queryField: 'id',
          //   },{
          //     data: [],
          //     title: '名称',
          //     fieldType: 'text',
          //     queryField: 'name',
          //   },{
          //     data: [],
          //     title: '描述',
          //     fieldType: 'text',
          //     queryField: 'description',
          //   }, {
          //     data: [],
          //     title: '状态',
          //     fieldType: 'text',
          //     queryField: 'description',
          //   }
          // ]
      },
      watch:{
      },
      methods: {
        /** 高级查询对话框组件,组件返回的值是condtionMap[field]形式的查询条件,保留和之前一样 */
        echoSeniorContionMap(conditionMaps){
          console.log(conditionMaps);
        },
        /* 公式编辑框内容改变,子组件编辑完公式之后内容回显时调用 */
        updateFormulaContent(content){
@@ -2033,8 +2006,6 @@
        /** 编码规则相关方法 */
        // 打开高级查询窗口
        openAdvancedQuery(){
          //this.$refs.advancedQuery.visible = true;
          //this.advancedQueryParam.timer = new Date().getTime()
          this.advancedQueryParam.advancedQuerySettingBox = !this.advancedQueryParam.advancedQuerySettingBox;
        },
        // 查询使用范围
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeReferBtmTypeController.java
@@ -50,7 +50,7 @@
    @GetMapping(value = "/gridAttributesByBtmId")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "获取业务类型包含的属性,不分页", notes = "baseQueryObject")
    public R<Page<AttributeVO>> gridAttributesByBtmId(BaseQueryObject baseQueryObject){
    public R<Page<BtmTypeAttributeVO>> gridAttributesByBtmId(BaseQueryObject baseQueryObject){
        return R.data(codeReferBtmTypeService.gridAttributesByBtmId(baseQueryObject));
    }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeClassifyService.java
@@ -11,6 +11,7 @@
import com.vci.ubcs.starter.revision.model.TreeQueryObject;
import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject;
import com.vci.ubcs.starter.web.pagemodel.DataGrid;import com.vci.ubcs.starter.web.pagemodel.Tree;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.api.R;
import java.io.File;
import java.util.Collection;
@@ -167,7 +168,7 @@
     * @param baseQueryObject 查询对象,必须有codeClassifyOid,支持id和name两种查询条件
     * @return 属性的信息,包含默认的属性
     */
    DataGrid<BtmTypeAttributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject);
    DataGrid<BtmTypeAttributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject) throws ServiceException;
    /**
     * 获取当前分类的顶层分类
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeReferBtmTypeService.java
@@ -2,10 +2,12 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vci.ubcs.omd.vo.AttributeVO;
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.starter.web.enumpck.BooleanEnum;
import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject;
import com.vci.ubcs.starter.web.util.BeanUtil;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
@@ -25,14 +27,14 @@
     * @param baseQueryObject 查询条件
     * @return 列表的内容
     */
    Page<BtmTypeVO> referDataGrid(BaseQueryObject baseQueryObject);
    Page<BtmTypeVO> referDataGrid(BaseQueryObject baseQueryObject) throws ServiceException;
    /**
     * 获取业务类型包含的属性,不分页
     * @param baseQueryObject 查询对象
     * @return 属性的信息
     */
    Page<AttributeVO> gridAttributesByBtmId(BaseQueryObject baseQueryObject);
    Page<BtmTypeAttributeVO> gridAttributesByBtmId(BaseQueryObject baseQueryObject) throws ServiceException ;
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -22,6 +22,8 @@
import com.vci.ubcs.code.vo.pagemodel.CodeFixedValueVO;
import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO;
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.exception.VciBaseException;
import com.vci.ubcs.starter.revision.service.RevisionModelUtil;
import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil;
@@ -216,11 +218,11 @@
        CodeBasicSec codeBasicSecDO = new CodeBasicSec();
        BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecDTO, codeBasicSecDO);
        //text转换
        codeBasicSecDO.setSecTypeText(CodeSecTypeEnum.getTextByValue(codeBasicSecDTO.getSecType()));
        codeBasicSecDO.setCodeLevelTypeText(CodeLevelTypeEnum.getTextByValue(codeBasicSecDTO.getCodeLevelType()));
        codeBasicSecDO.setCodeSecLengthTypeText(CodeSecLengthTypeEnum.getTextByValue(codeBasicSecDTO.getCodeSecLengthType()));
        codeBasicSecDO.setValueCutTypeText(CodeCutTypeEnum.getValueByText(codeBasicSecDTO.getValueCutType()));
        codeBasicSecDO.setCodeGetValueTypeText(CodeGetValueTypeEnum.getValueByText(codeBasicSecDTO.getCodeGetValueType()));
        codeBasicSecDO.setSecTypeText(EnumCache.getValue(EnumEnum.CODE_SEC_TYPE,codeBasicSecDTO.getSecType()));
        codeBasicSecDO.setCodeLevelTypeText(EnumCache.getValue(EnumEnum.CODE_LEVEL_TYPE,codeBasicSecDTO.getCodeLevelType()));
        codeBasicSecDO.setCodeSecLengthTypeText(EnumCache.getValue(EnumEnum.CODE_SEC_LENGTH,codeBasicSecDTO.getCodeSecLengthType()));
        codeBasicSecDO.setValueCutTypeText(EnumCache.getValue(EnumEnum.CODE_CUT_TYPE,codeBasicSecDTO.getValueCutType()));
        codeBasicSecDO.setCodeGetValueTypeText(EnumCache.getValue(EnumEnum.CODE_GET_VALUE_TYPE,codeBasicSecDTO.getCodeGetValueType()));
        //填充一些默认值
        DefaultAttrAssimtUtil.addDefaultAttrAssimt(codeBasicSecDO,MdmBtmTypeConstant.CODE_BASIC_SEC);
        //排序号,默认等于当前已有的数量加1
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -873,7 +873,7 @@
     * @return 属性的信息,包含默认的属性
     */
    @Override
    public DataGrid<BtmTypeAttributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject) {
    public DataGrid<BtmTypeAttributeVO> listClassifyLinkAttr(BaseQueryObject baseQueryObject) throws ServiceException{
        if(baseQueryObject == null){
            baseQueryObject = new BaseQueryObject();
        }
@@ -897,8 +897,11 @@
        Map<String,Object> condition = new HashMap<>(1);
        condition.put("pkbtmtype",topClassifyVO.getBtmtypeid());
        BtmTypeVO data = btmTypeClient.getDetail(btmTypeOid).getData();
        List<BtmTypeAttributeVO> unDefaultAttributes = data.getAttributes();
        R<BtmTypeVO> btmTypeDetail = btmTypeClient.getDetail(btmTypeOid);
        if(btmTypeDetail.getCode() != 200){
            throw new ServiceException("业务类型feign接口调用出错");
        }
        List<BtmTypeAttributeVO> unDefaultAttributes = btmTypeDetail.getData().getAttributes();
        // List<CodeOsbtmtypeattributeEntity> unDefaultAttributes = codeOsbtmtypeattributeMapper.selectByMap(condition);
        // List<OsBtmTypeAttributeVO> unDefaultAttributes = btmService. (topClassifyVO.getBtmtypeid());
        List<BtmTypeAttributeVO> attributeVOS = new ArrayList<>();
@@ -908,8 +911,8 @@
                BeanUtils.copyProperties(attr,attributeVO);
                attributeVO.setAttrDataType(attr.getAttrDataType());
                attributeVO.setAttributeLength(attr.getAttributeLength());
                attributeVO.setBtmTypeId(data.getId());
                attributeVO.setBtmname(data.getName());
                attributeVO.setBtmTypeId(btmTypeDetail.getData().getId());
                attributeVO.setBtmname(btmTypeDetail.getData().getName());
                attributeVO.setAttrDataTypeText(EnumCache.getValue(EnumEnum.VCO_FIELD_TYPE,attr.getAttrDataType()));
                boolean add = true;
                if(StringUtils.isNotBlank(id) && !attributeVO.getId().contains(id.replace("*",""))){
@@ -923,6 +926,25 @@
                }
            });
        }
        R<BtmTypeVO> btmTypeVOR = btmTypeClient.getDefaultAttrByBtmId(topClassifyVO.getBtmtypeid());
        if(btmTypeVOR.getCode() != 200){
            throw new ServiceException("业务类型feign接口调用出错");
        }
        List<BtmTypeAttributeVO> defaultAttrVOS = btmTypeVOR.getData().getAttributes();
        if(!CollectionUtils.isEmpty(defaultAttrVOS)){
            defaultAttrVOS.stream().forEach(attr->{
                boolean add = true;
                if(StringUtils.isNotBlank(id) && !attr.getId().contains(id.replace("*",""))){
                    add = false;
                }
                if(StringUtils.isNotBlank(name) && !attr.getId().contains(name.replace("*",""))){
                    add = false;
                }
                if(add){
                    attributeVOS.add(attr);
                }
            });
        }
        DataGrid<BtmTypeAttributeVO> dataGrid = new DataGrid<>();
        dataGrid.setData(attributeVOS);
        dataGrid.setTotal(attributeVOS.size());
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeReferBtmTypeServiceImpl.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vci.ubcs.code.service.ICodeReferBtmTypeService;
import com.vci.ubcs.omd.feign.IAttributeClient;
import com.vci.ubcs.omd.feign.IBtmAttributeClient;
import com.vci.ubcs.omd.feign.IBtmTypeClient;
import com.vci.ubcs.omd.vo.AttributeVO;
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
@@ -39,12 +40,6 @@
    private IBtmTypeClient btmTypeClient;
    /**
     * 业务类型属性服务
     */
    @Resource
    private IAttributeClient attributeClient;
    /**
     * 获取业务类型列表
     * @param baseQueryObject 查询条件
     * @return 列表的内容
@@ -54,13 +49,11 @@
        Map<String, String> conditionMap = baseQueryObject.getConditionMap();
        conditionMap.put("domain", AppConstant.APPLICATION_NAME_CODE);
        baseQueryObject.setConditionMap(conditionMap);
        Page<BtmTypeVO> refPage = null;
        try {
            refPage = btmTypeClient.getRefPage(baseQueryObject).getData();
        }catch (Exception e){
        R<Page<BtmTypeVO>> btmTypeClientRefPage = btmTypeClient.getRefPage(baseQueryObject);
        if(btmTypeClientRefPage.getCode() != 200){
            throw new ServiceException("业务类型feign接口调用错误");
        }
        return refPage;
        return btmTypeClientRefPage.getData();
    }
    /**
@@ -69,25 +62,28 @@
     * @return 属性的信息
     */
    @Override
    public Page<AttributeVO> gridAttributesByBtmId(BaseQueryObject baseQueryObject) {
    public Page<BtmTypeAttributeVO> gridAttributesByBtmId(BaseQueryObject baseQueryObject) throws ServiceException {
        String btmTypeId = baseQueryObject.getConditionMap().containsKey("btmTypeId")?baseQueryObject.getConditionMap().get("btmTypeId"):"";
        if(StringUtils.isBlank(btmTypeId)){
            return new Page<AttributeVO>();
            return new Page<>();
        }
        String hasDefaultAttr = baseQueryObject.getConditionMap().getOrDefault("hasDefaultAttr","false");
        String attrId = baseQueryObject.getConditionMap().containsKey("name")?baseQueryObject.getConditionMap().get("name").replace("*",""):"";
        String attrName = baseQueryObject.getConditionMap().containsKey("label") ? baseQueryObject.getConditionMap().get("label").replace("*","") : "";
        // TODO 根据业务类型id获取关联的属性
        List<BtmTypeAttributeVO> boAttrs = null; //attributeClient.get();
        List<BtmTypeAttributeVO> boAttrs = null;
        try {
            boAttrs = btmTypeClient.getAllAttributeByBtmId(btmTypeId).getData().getAttributes();
        }catch (Exception e){
            throw new ServiceException("业务类型feign接口调用错误");
        }
        if(boAttrs == null){
            boAttrs = new ArrayList<>();
        }
        if(BooleanEnum.TRUE.getValue().equalsIgnoreCase(hasDefaultAttr)){
            // TODO 获取默认的属性
            List<BtmTypeAttributeVO> finalBoAttrs = boAttrs;
            List<BtmTypeAttributeVO> btmTypeAttributeVOS = new ArrayList<>(); //attributeClient.getDefaultAttributeVOs();
            btmTypeAttributeVOS.stream().forEach(attr->{
            BtmTypeVO btmTypeVO = btmTypeClient.getDefaultAttrByBtmId(btmTypeId).getData();
            btmTypeVO.getAttributes().stream().forEach(attr->{
                BtmTypeAttributeVO attributeVO = new BtmTypeAttributeVO();
                BeanUtil.convert(attr,attributeVO);
                attributeVO.setAttributeLength(attr.getAttributeLength());
@@ -108,8 +104,9 @@
            }
            return usedFlag;
        }).collect(Collectors.toList());
        return new Page<>();
        Page<BtmTypeAttributeVO> btmTypeAttributeVOPage = new Page<>();
        btmTypeAttributeVOPage.setRecords(attrList);
        return btmTypeAttributeVOPage;
    }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/wrapper/CodeRuleWrapper.java
@@ -18,6 +18,7 @@
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.vci.ubcs.code.entity.CodeRule;
import com.vci.ubcs.code.enumpack.CodeClassifyTemplateLC;
import com.vci.ubcs.code.lifecycle.CodeRuleLC;
import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO;
import com.vci.ubcs.omd.cache.EnumCache;
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/GroupCodeApplyApplication.java
@@ -8,7 +8,7 @@
 * 集团码申请接口启动器
 *
 * @author
 * ludc
 * xieju
 */
@UbcsCloudApplication
public class GroupCodeApplyApplication {
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/DockingPreApplyFormServiceImpl.java
@@ -1,6 +1,5 @@
package com.vci.ubcs.code.webservice.service.impl;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vci.ubcs.code.webservice.mapper.DockingPreApplyFormMapper;
import com.vci.ubcs.code.webservice.entity.DockingPreApplyForm;
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/DockingPreAttrMappingServiceImpl.java
@@ -20,7 +20,6 @@
import com.vci.ubcs.code.webservice.vo.DockingPreAttrRangeVO;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/DockingPreClassifyServiceImpl.java
@@ -2,7 +2,6 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vci.ubcs.code.webservice.mapper.DockingPreClassifyMapper;
import com.vci.ubcs.code.webservice.service.IDockingPreApplyFormService;
import com.vci.ubcs.code.webservice.service.IDockingPreAttrMappingService;
import com.vci.ubcs.code.webservice.service.IDockingPreClassifyService;
import com.vci.ubcs.code.webservice.service.IDockingPreViewModelService;
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/GroupMdmInterServiceImpl.java
@@ -7,11 +7,11 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.vci.ubcs.code.feign.IMdmEngineClient;
import com.vci.ubcs.code.webservice.entity.*;
import com.vci.ubcs.code.webservice.service.IGroupMdmInterService;
import com.vci.ubcs.code.webservice.vo.*;
import com.vci.ubcs.starter.util.MdmBtmTypeConstant;
import com.vci.ubcs.code.webservice.feign.MdmApplyGroupCodeProvider;
import com.vci.ubcs.code.webservice.mapper.DockingPreAttrMappingMapper;
import com.vci.ubcs.code.webservice.service.*;
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil;
import com.vci.ubcs.starter.web.util.BeanUtilForVCI;
@@ -55,20 +55,20 @@
     * 集团分类服务
     */
    @Autowired(required = false)
    private IDockingPreClassifyService dockingPreClassifyService;
    private com.vci.ubcs.code.webservice.service.IDockingPreClassifyService dockingPreClassifyService;
    /***
     * 申请单服务
     */
    @Autowired(required = false)
    private IDockingPreApplyFormService dockingPreApplyFormService;
    private com.vci.ubcs.code.webservice.service.IDockingPreApplyFormService dockingPreApplyFormService;
    /***
     * 模型视图单服务
     */
    @Autowired(required = false)
    private IDockingPreViewModelService dockingPreViewModelService;
    private com.vci.ubcs.code.webservice.service.IDockingPreViewModelService dockingPreViewModelService;
    /***
@@ -80,14 +80,14 @@
     * 属性取值范围服务
     */
    @Autowired(required = false)
    private IDockingPreAttrRangeService dockingPreAttrRangeService;
    private com.vci.ubcs.code.webservice.service.IDockingPreAttrRangeService dockingPreAttrRangeService;
    /***
     * 集团属性服务
     */
    @Autowired(required = false)
    private IDockingPreMetaAttrService dockingPreMetaAttrService;
    private com.vci.ubcs.code.webservice.service.IDockingPreMetaAttrService dockingPreMetaAttrService;
    @Autowired(required = false)
    private IMdmEngineClient mdmEngineClient;