lihang
2023-05-16 ca6ec80da1bffc13e67b2ce5e34ff67f485cc74f
业务类型新增按钮联调修正。
业务类型弹出表单细节修正。
已修改15个文件
已添加1个文件
417 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/omd/OmdAttribute.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/omd/btmType.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/Business.vue 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue 144 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/original.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTypeTreeVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTypeVO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/NewAppConstantEnum.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/AttributeController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/BtmTypeController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/repeater/DomainRepeater.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/AttributeWrapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeWrapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/omd/OmdAttribute.js
@@ -50,3 +50,16 @@
  })
}
export const queryPage = (key,notInStr,current,size) => {
  return request({
    url: '/api/ubcs-omd/attribute/query-page',
    method: 'get',
    params: {
      key,
      notInStr,
      current,
      size
    }
  })
}
Source/UBCS-WEB/src/api/omd/btmType.js
@@ -41,3 +41,19 @@
        }
    })
}
export const add = (btmType,auto) => {
    return request({
        url: '/api/ubcs-omd/btm-type/submit/' + auto,
        method: 'post',
        data: btmType
    })
}
export const update = (btmType) => {
    return request({
        url: '/api/ubcs-omd/btm-type/submit/' + auto,
        method: 'post',
        data: btmType
    })
}
Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -50,7 +50,9 @@
                  <i :class="icons.domain"></i>
                  æ‰€å±žé¢†åŸŸ
                </template>
                {{ obj.domain }}
                  <el-tag size="small">
                    {{ obj.domainText }}
                  </el-tag>
              </el-descriptions-item>
              <!-- <el-descriptions-item>
            <template slot="label">
@@ -85,7 +87,9 @@
                  <i :class="icons.view"></i>
                  è§†å›¾
                </template>
                {{ obj.viewFlag }}
               <el-tag size="small">
                  {{ obj.viewText }}
               </el-tag>
              </el-descriptions-item>
              <!-- <el-descriptions-item>
            <template slot="label">
@@ -106,17 +110,25 @@
          <!-- å±žæ€§åˆ—表-->
          <basic-container>
            <p style="margin-top: 10px;font-weight: 570;font-size: 19px">属性列表</p>
            <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption"></avue-crud>
            <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption">
              <template slot="attrDataType" slot-scope="{row}" >
                    <el-tag>{{row.attrDataType}}</el-tag>
                </template>
            </avue-crud>
          </basic-container>
        </el-main>
        <el-dialog :visible="ref.visible" title="从数据库中添加" width="700px" append-to-body @close="dialoghandelfalse">
          é€‰æ‹©é¢†åŸŸï¼š
          <el-select v-model="domain" placeholder="请选择" @change="refOnLoad">
            <el-option v-for="item in domainOptions" :key="item" :label="item" :value="item">
            <el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
          <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" @selection-change="selectionChange">
          </avue-crud>
          <div slot="footer" class="dialog-footer">
                <el-button @click="dialoghandeltrue">确定</el-button>
                <el-button @click="dialoghandelfalse">取消</el-button>
            </div>
        </el-dialog>
      </el-container>
    </el-container>
@@ -169,18 +181,19 @@
        columnBtn:false,
        column: [
          {
            label: '属性英文名称',
            label: '英文名称',
            prop: 'id',
            align: 'center'
          }, {
            label: '属性中文名称',
            label: '中文名称',
            prop: 'name',
            align: 'center'
          },
          {
            label: "属性类型",
            label: "类型",
            prop: "attrDataType",
            align: 'center'
            align: 'center',
            slot: true
          },
          {
            label: "默认值",
@@ -248,38 +261,6 @@
    this.initDomainOption();
  },
  methods: {
    //生命周期对话框取消点击事件
    dialoghandelfalse() {
      this.packageLifeBox = false
    },
    //生命周期对话框确定点击事件
    dialoghandeltrue() {
      this.packageLifeBox = false
    },
    //选择生命周期对话框
    handelLife() {
      this.packageLifeBox = true
    },
    //版本规则手动输入和选择框的状态取反
    handelRules() {
      this.rulesFalg = !this.rulesFalg
    },
    //版本规则三个按钮的显示隐藏
    radioChange(val) {
      if (val.value == 0) {
        this.basicOption.group[1].column[1].display = false;
        this.basicOption.group[1].column[2].display = false;
        this.basicOption.group[1].column[3].display = false;
      } else if (val.value == 1) {
        this.basicOption.group[1].column[1].display = true;
        this.basicOption.group[1].column[2].display = true;
        this.basicOption.group[1].column[3].display = false;
      } else if (val.value == 2) {
        this.basicOption.group[1].column[1].display = true;
        this.basicOption.group[1].column[2].display = true;
        this.basicOption.group[1].column[3].display = true;
      }
    },
    nodeClick(data) {
      if(data.oid){
        getDetail(data.oid).then(res => {
@@ -297,7 +278,6 @@
    },
    initTreeOnLoad() {
      initTree().then(res => {
        console.log('123');
        this.treeData = res.data.data;
      });
    },
@@ -308,7 +288,6 @@
    },
    selectionChange(list) {
      this.selectionList = list;
      console.log(this.selectionList);
    },
    dialoghandelfalse() {
      this.ref.visible = false;
@@ -324,13 +303,15 @@
    },
    businessAdd(){
      this.$refs.btmAdd.showSubmitDialog = true;
      this.$refs.btmAdd.refreshAttrTable();
      console.log('添加');
      this.ifRefreshBtmAddRefresh();
    },
    businessEdit(){
      this.addOption.btmType = this.obj;
      this.$refs.addOption.showSubmitDialog = true;
      console.log('编辑');
      this.$refs.btmAdd.btmType = this.obj;
      this.$refs.btmAdd.showSubmitDialog = true;
      this.ifRefreshBtmAddRefresh();
    },
    ifRefreshBtmAddRefresh(){
      this.$refs.btmAdd.refreshAttrTable();
    }
  },
}
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -6,42 +6,54 @@
    @close="closeSubmitDialog"
    width="74%"
    >
        <el-form ref="form" :model="btmType" show-message="true" inline>
            <el-form-item label="英文名称:" label-width="100px">
        <el-form ref="form" :model="btmType" show-message="true" inline size="medium" label-suffix=":" class="btmTypeForm">
            <el-form-item label="英文名称" label-width="100px" required="true">
                <el-input v-model="btmType.id" :prefix-icon="icons.key"></el-input>
            </el-form-item>
            <el-form-item label="中文名称:" label-width="100px">
            <el-form-item label="中文名称" label-width="100px">
                <el-input v-model="btmType.name" :prefix-icon="icons.name"></el-input>
            </el-form-item>
            <el-form-item label="数据库表名:" label-width="100px">
            <el-form-item label="数据库表名" label-width="100px">
                <el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input>
            </el-form-item>
            <el-form-item label="所属领域:" label-width="100px">
            <el-form-item label="所属领域" label-width="100px">
                <el-select v-model="btmType.domain" :prefix-icon="icons.domain">
                    <el-option v-for="item in domainOption"
                    :label="item"></el-option>
                    :label="item.label" :value="item.value" :key="item.value"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="版本规则:" label-width="100px">
                <el-input v-model="btmType.revisionRuleId" :prefix-icon="icons.revisionRule">
            <el-form-item label="版本规则" label-width="100px">
                <el-input v-model="btmType.revisionRuleId" :prefix-icon="icons.revisionRule" class="revisionRule">
                    <i slot="suffix" class="el-input__icon el-icon-search"></i>
                </el-input>
            </el-form-item>
            <el-form-item label="生命周期:" label-width="100px">
            <el-form-item label="生命周期" label-width="100px">
                <el-input v-model="btmType.lifeCycleId" :prefix-icon="icons.lifeCycle">
                    <i slot="suffix" class="el-input__icon el-icon-search"></i>
                </el-input>
            </el-form-item>
            <el-form-item label="视图:" label-width="100px">
                <el-input v-model="btmType.view" :prefix-icon="icons.view"></el-input>
            <div>
            <el-form-item label="开启视图" label-width="100px" class="viewFlag">
                <el-switch v-model="btmType.viewFlag" active-color="#13ce66" @change="viewChange"></el-switch>
            </el-form-item>
            <el-form-item label="描述:" label-width="100px">
            <el-form-item label="视图语句" label-width="100px">
                <el-input v-model="btmType.view" :prefix-icon="icons.view" :disabled="!btmType.viewFlag"></el-input>
            </el-form-item>
        </div>
            <el-form-item label="描述" label-width="100px" class="description">
                <el-input v-model="btmType.description" 
                :prefix-icon="icons.desc" 
                class="descClass"
                ></el-input>
            </el-form-item>
        </el-form>
        <avue-crud :option="option" :data="btmType.attributes" :page.sync="page" ref="attrTable">
        <avue-crud :option="option"
        :data="btmType.attributes"
        :page.sync="page"
        ref="attrTable"
        @cell-mouse-enter="cellEditClick"
        @cell-mouse-leave="cellEditSave">
            <template slot-scope="scope" slot="menuLeft">
                <el-button type="danger"
                icon="el-icon-plus"
@@ -50,8 +62,10 @@
            </template>
            
        </avue-crud>
        <div slot="footer" class="dialog-footer">
        <el-button @click="submitBtmType">确定</el-button>
            <el-button @click="cancleSubmitBtmType">取消</el-button>
        </div>
        <el-dialog title="属性池"
@@ -66,13 +80,16 @@
            :page.sync="attrRef.page"
            ref="attrRef"
            @on-load="attrRefOnLoad"
            @search-change="attrRefSearch"
            @selection-change="selectionChange">
                <template slot="name" slot-scope="scope" >
                    <el-tag>{{scope}}</el-tag>
                </template>
            </avue-crud>
            <div slot="footer" class="dialog-footer">
            <el-button @click="confirmSelectAttr">确定</el-button>
            <el-button @click="cancleSelectAttr">取消</el-button>
            </div>
        </el-dialog>
    </el-dialog>
</template>
@@ -80,8 +97,8 @@
<script>
import {  } from '@/api/omd/btmType';
import { getPage } from '@/api/omd/OmdAttribute';
import { add,update } from '@/api/omd/btmType';
import { queryPage } from '@/api/omd/OmdAttribute';
export default {
    name: 'BusinessAdd',
    props: {
@@ -117,17 +134,18 @@
                highlightCurrentRow: true,
                column: [
                    {
                        label: '属性英文名称',
                        label: '英文名称',
                        prop: 'id',
                        align: 'left'
                    }, {
                        label: '属性中文名称',
                        label: '中文名称',
                        prop: 'name',
                        align: 'center'
                        align: 'center',
                        cell: true
                    },
                    {
                        label: "属性类型",
                        prop: "typeValue",
                        label: "类型",
                        prop: "attrDataType",
                        align: 'center',
                        slot: true
                    },
@@ -135,13 +153,15 @@
                        label: "默认值",
                        prop: "defaultValue",
                        cell: 'true',
                        align: 'center'
                        align: 'center',
                        cell: true
                    },
                    {
                        label: "说明",
                        prop: "description",
                        cell: 'true',
                        align: 'center'
                        align: 'center',
                        cell:true
                    }
                ]
            },
@@ -150,8 +170,8 @@
                page: {
                    currentPage:1,
                    pageSize:10,
                    key:''
                },
                key: null,
                option:{
                    height: 360,
                    addBtn: false,
@@ -160,19 +180,22 @@
                    selection: true,
                    menu: false,
                    border: true,
                    reserveSelection: true,
                    searchMenuSpan:8,
                    column: [
                        {
                        label: '属性英文名称',
                        label: '英文名称',
                        prop: 'key',
                        align: 'left',
                        search: true,
                        width: 230
                    }, {
                        label: '属性中文名称',
                        label: '中文名称',
                        prop: 'label',
                        align: 'center'
                        align: 'center',
                    },
                    {
                        label: "属性类型",
                        label: "类型",
                        prop: "typeValue",
                        align: 'center'
                    },
@@ -199,12 +222,13 @@
                    {
                        label: "说明",
                        prop: "description",
                        cell:true,
                        align: 'center'
                    }
                    ]
                },
                data: [],
                queryNotIn: []
                queryNotIn: null
            }
        }
    },
@@ -214,42 +238,52 @@
    methods: {
        closeSubmitDialog(){
            this.showSubmitDialog = false;
            this.btmType.attributes = [];
            this.btmType = {};
            this.attrRef.selectData = [];
            this.attrRef.queryNotIn = null;
        },
        closeAttrDialog(){
            this.attrRef.visible = false;
        },
        rowAdd(){
            this.attrRef.visible = true;
            this.$refs.attrRef.refreshTable();
            this.attrRefOnLoad();
        },
        attrRefOnLoad(){
            var str = '';
            this.attrRef.queryNotIn.forEach(item => {
                str = str + item + ','
            });
            getPage(this.attrRef.page.currentPage, this.attrRef.page.pageSize,{'condition["key_like"]':this.attrRef.page.key}).then(res => {
            queryPage(this.attrRef.key,this.attrRef.queryNotIn,this.attrRef.page.currentPage, this.attrRef.page.pageSize).then(res => {
                const data = res.data.data;
                this.attrRef.page.total = data.total;
                this.attrRef.data = data.records;
            })
            });
            this.$nextTick(() => {
                this.$refs.attrRef.refreshTable();
            });
        },
        attrRefSearch(form,done){
            this.attrRef.key = form.key;
            this.attrRefOnLoad();
            done();
            this.attrRef.key = null;
        },
        selectionChange(list){
            this.attrRef.selectData = list;
        },
        confirmSelectAttr(){
            this.btmType.attributes = [];
            this.attrRef.queryNotIn = "";
            this.attrRef.selectData.forEach(item => {
                this.btmType.attributes.push({
                    id: item.key,
                    name: item.label,
                    typeValue: item.typeValue,
                    typeKey: item.typeValue,
                    attrDataType : item.typeValue,
                    defaultValue: item.defaultValue,
                    description: item.description
                    description: item.description,
                    attributeLength: item.maxLength
                });
                this.attrRef.queryNotIn.push(item.key);
                this.attrRef.queryNotIn += (item.key + ",")
            });
            this.closeAttrDialog();
        },
@@ -258,17 +292,35 @@
            this.closeAttrDialog();
        },
        submitBtmType(){
            // æ·»åŠ å®Œæˆï¼Œå›žè°ƒçˆ¶ç»„ä»¶çš„åˆ·æ–°
            console.log(this.btmType);
            add(this.btmType,true).then(res => {
                // æ·»åŠ å®Œæˆï¼Œå›žè°ƒçˆ¶ç»„ä»¶çš„åˆ·æ–°
                this.$message.success('保存成功');
                this.cancleSubmitBtmType();
            this.$emit('refreshTable');
            })
        },
        cancleSubmitBtmType(){
            this.btmType = {};
            this.btmType.attributes = [];
            console.log(this.btmType);
            this.showSubmitDialog = false;
        },
        refreshAttrTable(){
            this.$nextTick( () => {
            this.$refs.attrTable.refreshTable();
            })
        },
        viewChange(){
        },
        cellEditClick(cell){
            cell.$cellEdit = true;
        },
        cellEditSave(row){
            this.btmType.attributes[row.$index].name = row.name
            this.btmType.attributes[row.$index].defaultValue = row.defaultValue;
            this.btmType.attributes[row.$index].description = row.description;
            row.$cellEdit = false;
        }
    }
}
@@ -279,4 +331,16 @@
.attrRef > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{
        display: none !important;
}
.btmTypeForm > .el-form-item > .el-form-item__content > .el-input > .el-input__inner {
    width: 200px;
}
.viewFlag {
    width: 305px;
}
.descClass > .el-input__inner {
    width: 57vw
}
</style>
Source/UBCS-WEB/src/views/modeling/original.vue
@@ -152,7 +152,8 @@
            label: '属性编号',
            prop: 'key',
            align: 'left',
            display: false
            display: false,
            width: 200
          }, {
            label: '属性名称',
            prop: 'label',
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTypeTreeVO.java
@@ -21,6 +21,8 @@
    private String name;
    private String id;
    private String oid;
    private List<BtmTypeTreeVO> childList;
Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/vo/BtmTypeVO.java
@@ -133,6 +133,10 @@
    private boolean viewFlag;
    /**
     * è§†å›¾æ˜¾ç¤ºå­—段
     */
    private String viewText;
    /**
     * è§†å›¾åˆ›å»ºçš„sql语句
     */
    private String viewCreateSql;
@@ -178,6 +182,11 @@
    private String domain;
    /**
     * é¢†åŸŸæ˜¾ç¤ºå­—段
     */
    private String domainText;
    /**
     * åŒ…含属性
     */
    private List<BtmTypeAttributeVO> attributes;
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/enumpck/NewAppConstantEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
package com.vci.ubcs.starter.web.enumpck;
import org.springblade.core.launch.constant.AppConstant;
public enum NewAppConstantEnum {
    /**
     * ç¼–码规则,服务启动名
     */
    APPLICATION_NAME_CODE(AppConstant.APPLICATION_NAME_CODE,"编码规则服务"),
    ;
    /**
     * æžšä¸¾çš„name
     */
    private String name;
    /**
     * æžšä¸¾æ˜¾ç¤ºæ–‡æœ¬
     */
    private String text;
    NewAppConstantEnum(String name, String text) {
        this.name = name;
        this.text = text;
    }
    public String getName() {
        return name;
    }
    public String getText() {
        return text;
    }
    public void setName(String name) {
        this.name = name;
    }
    public void setText(String text) {
        this.text = text;
    }
    public static String getTextByName(String name) {
        NewAppConstantEnum[] var1 = values();
        int var2 = var1.length;
        for(int var3 = 0; var3 < var2; ++var3) {
            NewAppConstantEnum eu = var1[var3];
            if (eu.name.equals(name)) {
                return eu.text;
            }
        }
        return null;
    }
}
Source/UBCS/ubcs-service/ubcs-ddl/src/main/java/com/vci/ubcs/ddl/service/impl/DdlServiceImpl.java
@@ -532,7 +532,7 @@
        if (!CollectionUtils.isEmpty(linkTypeVOList)) {
            modifyAttributeInfoList.addAll(checkLinkType(linkTypeVOList));
        }
        if (CollectionUtils.isEmpty(modifyAttributeInfoList)) {
        if (!CollectionUtils.isEmpty(modifyAttributeInfoList)) {
            reflexDifferent(modifyAttributeInfoList, btmTypeVOList, linkTypeVOList);
        }
        return modifyAttributeInfoList;
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/AttributeController.java
@@ -1,6 +1,9 @@
package com.vci.ubcs.omd.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.vci.ubcs.omd.constant.OmdCacheConstant;
@@ -18,10 +21,14 @@
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -80,7 +87,7 @@
    })
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "查询列表", notes = "传入查询")
    public R<IPage<AttributeVO>> parentList(@ApiIgnore @RequestParam Map<String, Object> condition, Query query) {
    public R<IPage<AttributeVO>> pageList(@ApiIgnore @RequestParam Map<String, Object> condition, Query query) {
        IPage<AttributeVO> pageVO = new Page<>();
        IPage<Attribute> page = attributeService.page(Condition.getPage(query), Condition.getQueryWrapper(condition, Attribute.class).lambda().orderByAsc(Attribute::getKey));
        BeanUtil.copy(page,pageVO);
@@ -88,6 +95,31 @@
        return R.data(pageVO);
    }
    @GetMapping("/query-page")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "key",value = "属性名模糊",paramType = "query",dataType = "string"),
        @ApiImplicitParam(name = "notIn",value = "属性名排除",paramType = "query",dataType = "string")
    })
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "查询列表",notes = "传入查的值和不查的值")
    public R<IPage<AttributeVO>> queryPageList(String key,String notInStr,Query query){
        LambdaQueryWrapper<Attribute> wrapper = Wrappers.<Attribute>query().lambda();
        if (StringUtil.isNotBlank(notInStr)){
            List<String> notInList = Func.toStrList(",", notInStr);
            if (!CollectionUtils.isEmpty(notInList)){
                wrapper = wrapper.notIn(Attribute::getKey,notInList);
            }
        }
        if (StringUtil.isNotBlank(key)){
            wrapper = wrapper.like(Attribute::getKey,key);
        }
        IPage<Attribute> page = attributeService.page(Condition.getPage(query),wrapper.orderByAsc(Attribute::getKey));
        IPage<AttributeVO> pageVO = new Page<>();
        BeanUtil.copy(page,pageVO);
        pageVO.setRecords(AttributeWrapper.build().listEntityVO(page.getRecords()));
        return R.data(pageVO);
    }
        /**
         * æ–°å¢žæˆ–修改
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/controller/BtmTypeController.java
@@ -13,6 +13,7 @@
import com.vci.ubcs.omd.service.IBtmTypeService;
import com.vci.ubcs.omd.vo.BtmTypeTreeVO;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.omd.vo.DomainVO;
import com.vci.ubcs.omd.wrapper.BtmTypeWrapper;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
@@ -146,7 +147,7 @@
    @GetMapping("/domain")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "获取领域值")
    public R<List<String>> getDomain(){
    public R<List<DomainVO>> getDomain(){
        try {
            return R.data(DomainRepeater.getDomain());
        } catch (NacosException e) {
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/repeater/DomainRepeater.java
@@ -7,15 +7,17 @@
import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.naming.NamingService;
import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.api.naming.pojo.ServiceInfo;
import com.vci.ubcs.common.constant.LauncherConstant;
import com.vci.ubcs.omd.dto.BtmAndLinkTypeDdlDTO;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.omd.vo.DomainVO;
import com.vci.ubcs.omd.vo.LinkTypeVO;
import com.vci.ubcs.starter.web.enumpck.NewAppConstantEnum;
import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringPool;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.stereotype.Component;
@@ -243,11 +245,18 @@
     * @return ä¸åŒ…含默认服务的其他服务
     * @throws NacosException
     */
    public static List<String> getDomain() throws NacosException {
    public static List<DomainVO> getDomain() throws NacosException {
        RestTemplate restTemplate = new RestTemplate();
        String url = "http://" +LauncherConstant.NACOS_DEV_ADDR + "/nacos/v1/ns/service/list?pageNo=1&pageSize=50";
        String forObject = restTemplate.getForObject(url, String.class);
        JSONObject jsonObject = JSON.parseObject(forObject);
        return (List<String>) jsonObject.get("doms");
        List<String> doms = (List<String>) jsonObject.get("doms");
        NewAppConstantEnum[] apps = NewAppConstantEnum.values();
        return Arrays.stream(apps).filter(app -> doms.stream().anyMatch(s -> StringUtil.equals(app.getName(), s))).map(app -> {
            DomainVO domain = new DomainVO();
            domain.setValue(app.getName());
            domain.setLabel(app.getText());
            return domain;
        }).collect(Collectors.toList());
    }
}
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java
@@ -6,6 +6,7 @@
import com.alibaba.nacos.api.exception.NacosException;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vci.ubcs.omd.cache.EnumCache;
import com.vci.ubcs.omd.constant.BtmTypeFieldConstant;
import com.vci.ubcs.omd.dto.BtmAndLinkTypeDdlDTO;
import com.vci.ubcs.omd.entity.Attribute;
@@ -13,7 +14,7 @@
import com.vci.ubcs.omd.service.IAttributeService;
import com.vci.ubcs.omd.service.IBtmTypeAttributeService;
import com.vci.ubcs.omd.service.IModifyAttributeService;
import com.vci.ubcs.omd.vo.BtmTypeTreeVO;
import com.vci.ubcs.omd.vo.*;
import com.vci.ubcs.omd.wrapper.BtmTypeWrapper;
import com.vci.ubcs.omd.wrapper.ModifyAttributeWrapper;
import com.vci.ubcs.starter.web.constant.OmdRegExpConstant;
@@ -24,9 +25,6 @@
import com.vci.ubcs.omd.entity.ModifyAttributeInfo;
import com.vci.ubcs.omd.mapper.BtmTypeMapper;
import com.vci.ubcs.omd.service.IBtmTypeService;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
import com.vci.ubcs.omd.vo.LinkTypeVO;
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.web.enumpck.BooleanEnum;
import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum;
@@ -496,6 +494,7 @@
                btmTypeDO.setTableName(getTableName(btmTypeDO.getId(),btmTypeDO.getDomain()));
            }
            // æ·»åŠ å±žæ€§
            btmTypeDTO.setOid(btmTypeDO.getOid());
            afterAttributes = addAttributeForBtm(btmTypeDTO);
            baseMapper.insert(btmTypeDO);
        }else {
@@ -620,9 +619,6 @@
            // éœ€è¦æŽ§åˆ¶å¯†çº§
            btmTypeDTO.setAttributes(addAttributeByFieldMap(btmTypeDTO.getAttributes(),BtmTypeFieldConstant.SECRET_MANAGE_FIELD_MAP));
        }
        if (StringUtils.isBlank(btmTypeDTO.getOid())) {
            btmTypeDTO.setOid(VciBaseUtil.getPk());
        }
    }
    @Override
    public boolean deleteLogic(@NotEmpty List<Long> ids) {
@@ -642,18 +638,21 @@
    @Override
    public List<BtmTypeTreeVO> treeDomain() {
        try {
            List<String> domain = DomainRepeater.getDomain();
            Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(s -> s.getValue(), t -> t.getLabel()));
            List<BtmTypeVO> vos = BtmTypeWrapper.build().listEntityVO(baseMapper.selectAll());
            Map<String, List<BtmTypeVO>> domainMap = vos.stream().collect(Collectors.groupingBy(BtmTypeVO::getDomain));
            List<BtmTypeTreeVO> treeList = new ArrayList<>();
            domainMap.forEach((k,v)-> {
                if (domain.contains(k)){
                if (domain.containsKey(k)){
                    String label = domain.get(k);
                    BtmTypeTreeVO parent = new BtmTypeTreeVO();
                    parent.setName(k);
                    parent.setName(label);
                    parent.setId(k);
                    parent.setChildList(v.stream().map(s -> {
                        BtmTypeTreeVO child = new BtmTypeTreeVO();
                        child.setOid(s.getOid());
                        child.setName(s.getId() + " " + (s.getName() == null ? "" : s.getName()));
                        child.setId(s.getId());
                        return child;
                    }).collect(Collectors.toList()));
                    treeList.add(parent);
@@ -675,7 +674,7 @@
    public List<BtmTypeVO> getFromTable(String domain) {
        VciBaseUtil.alertNotNull(domain,"领域值");
        try {
            if (!DomainRepeater.getDomain().contains(domain)){
            if (!DomainRepeater.getDomain().stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel)).containsKey(domain)){
                return null;
            }
            R result = DomainRepeater.getFromTable(domain);
@@ -737,7 +736,9 @@
                Attribute attribute = new Attribute();
                attribute.setKey(attr.getId());
                attribute.setLabel(attr.getName());
                attribute.setDictKey(attr.getAttrDataType());
                attribute.setTypeCode("attributeType");
                attribute.setTypeKey(attr.getAttrDataType());
//                attribute.setDictKey(attr.getAttrDataType());
                attribute.setMaxLength(attr.getAttributeLength());
                attribute.setPrecision(attr.getPrecisionLength());
                attribute.setDescription(attr.getDescription());
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/AttributeWrapper.java
@@ -36,9 +36,8 @@
        if (StringUtil.isNotBlank(vo.getReferTypeCode())){
            vo.setReferTypeValue(DictBizCache.getValue(vo.getReferTypeCode(),vo.getReferTypeKey()));
        }
        if (StringUtil.isNotBlank(vo.getDictCode())){
            vo.setDictValue(DictBizCache.getValue(vo.getDictCode(),vo.getDictKey()));
        }
        vo.setDictValue(vo.getDictKey());
        vo.setTypeValue(vo.getTypeKey());
        return vo;
    }
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
@@ -3,6 +3,7 @@
import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO;
import com.vci.ubcs.omd.entity.BtmTypeAttribute;
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
import com.vci.ubcs.starter.web.util.VciBaseUtil;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
@@ -53,7 +54,13 @@
     */
    public BtmTypeAttribute copyBtmTypeAttributeDTO2Entity(BtmTypeLinkAttributesDTO dto, String btmTypeOid, String creator, Date now){
        BtmTypeAttribute entity = Objects.requireNonNull(BeanUtil.copy(dto, BtmTypeAttribute.class));
        entity.setOid(VciBaseUtil.getPk());
        entity.setBtmName("btmTypeAttribute");
        entity.setOwner(creator);
        entity.setCreator(creator);
        entity.setCreateTime(now);
        entity.setLastModifier(creator);
        entity.setLastModifyTime(now);
        entity.setTs(now);
        entity.setPkBtmType(btmTypeOid);
        // åœ¨è¿™è¿›è¡Œé€šç”¨å­—段处理
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeWrapper.java
@@ -4,6 +4,7 @@
import com.vci.ubcs.omd.entity.BtmType;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.starter.web.enumpck.BooleanEnum;
import com.vci.ubcs.starter.web.enumpck.NewAppConstantEnum;
import com.vci.ubcs.starter.web.util.VciBaseUtil;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.secure.utils.AuthUtil;
@@ -11,6 +12,7 @@
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -33,12 +35,15 @@
    @Override
    public BtmTypeVO entityVO(BtmType entity) {
        BtmTypeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, BtmTypeVO.class));
        vo.setDomainText(NewAppConstantEnum.getTextByName(vo.getDomain()));
        vo.setTableName(vo.getTableName().toUpperCase(Locale.ROOT));
        // åœ¨è¿™é‡Œè®¾ç½®æžšä¸¾æ˜¾ç¤ºå€¼
        vo.setRevisionFlag(BooleanEnum.TRUE.getValue().equals(entity.getRevisionFlag()));
        vo.setSecretFlag(BooleanEnum.TRUE.getValue().equals(entity.getSecretFlag()));
        vo.setLifeCycleFlag(BooleanEnum.TRUE.getValue().equals(entity.getLifeCycleFlag()));
        vo.setInputRevisionFlag(BooleanEnum.TRUE.getValue().equals(entity.getInputRevisionFlag()));
        vo.setViewFlag(BooleanEnum.TRUE.getValue().equalsIgnoreCase(entity.getViewFlag()));
        vo.setViewText(vo.isViewFlag() ? "视图" : "非视图");
        vo.setAbstractFlag(BooleanEnum.TRUE.getValue().equals(entity.getAbstractFlag()));
        return vo;
    }