fujunling
2023-07-11 8310a8fb31e4a82cbbb8bb512e9815709f23d441
Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
已修改10个文件
605 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/GetItem.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/attrCrud.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue 141 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/system/tenant.vue 270 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/GetItem.js
@@ -29,3 +29,20 @@
    }
  })
}
// 新增数据
export function addSaveCode(data) {
  return request({
    url: 'api/ubcs-code/ubcs-code/mdmEngineController/addSaveCode',
    method: 'post',
    data
  })
}
//修改数据
export function editSaveCode(data) {
  return request({
    url: 'api/ubcs-code/ubcs-code/mdmEngineController/editSaveCode',
    method: 'put',
    data
  })
}
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -79,7 +79,7 @@
  </basic-container>
</template>
<script>
import {MasterTable, TableData, FindData} from "@/api/GetItem";
import {MasterTable, TableData, FindData,addSaveCode,editSaveCode} from "@/api/GetItem";
import {listCodeAttributeByClassId} from "@/api/integration/integration.js";
import integrationTransfer from "@/views/integration/integrationTransfer";
import SetPersonnel from "@/components/template/SetPersonnel";
@@ -213,7 +213,8 @@
    codeClassifyOid: {
      handler(newval, oldval) {
        this.codeClassifyOid = newval;
        this.parameter.vars.codeClassifyOid = newval
        this.parameter.vars.codeClassifyOid = newval;
        console.log('子',newval)
      },
      deep: true,
    },
@@ -421,6 +422,7 @@
    },
    //多选
    handleSelectionChange(row) {
      console.log(row)
      if (this.row) {
        this.rowOid = row[0].oid;
      } else {
@@ -485,16 +487,26 @@
      }
    },
    //增加保存
    AddSumbit() {
    AddSumbit(val) {
      this.addvisible = false;
      console.log(val)
      addSaveCode(val).then(res=>{
        console.log(res)
        this.onLoad()
      })
    },
    EditSumbit(val) {
      this.editvisible = false;
      console.log(val)
      editSaveCode(val).then(res=>{
        console.log(res)
        this.onLoad()
      })
    },
    openBatchImport(type) {
      this.batchImportData.visible = true
      this.batchImportData.type = type
      this.batchImportData.codeClassifyOid = this.codeClassifyOid
      this.batchImportData.visible = true;
      this.batchImportData.type = type;
      this.batchImportData.codeClassifyOid = this.codeClassifyOid;
    }
  },
};
@@ -505,7 +517,6 @@
  .el-table--scrollable-x .el-table__body-wrapper {
    overflow: auto !important;
  }
  .el-table__fixed-right-patch {
    background-color: #f5f7fa !important;
  }
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -156,6 +156,7 @@
        this.TableRend(); // TableHeadRend() 方法完成后再执行 TableRend()
        this.$emit('nodeClick',this.templateOids)
        this.$emit("codeClassifyOid", this.nodeClickList.oid )
        console.log('树',this.nodeClickList.oid)
      } catch (error) {
        // 处理错误
        this.$message.error(error)
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1816,11 +1816,9 @@
</script>
<style scoped lang="scss" >
///deep/ .el-button {
//  margin: 0 10px 10px 0;
//}
.app el-button{
  z-index: 1;
  margin: 0 10px 10px 0 !important;
.app {
   /deep/ .el-button {
     margin: 0 10px 10px 0;
     }
}
</style>
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -2,7 +2,7 @@
  <div>
    <avue-form v-model="loneTreeNewForm" :option="option" v-if="flag == 'renonly'">
    </avue-form>
    <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'">
    <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'">
    </avue-form>
    <div>
<!--     编码规则-->
@@ -255,70 +255,7 @@
          },
        ]
      },
      options: {
        column: [
          {
            label: '主题库/分类编号',
            prop: 'id',
            labelWidth:128,
            rules: [{
              required: true,
              message: "主题库/分类编号",
              trigger: "blur"
            }]
          },
          {
            label: '主题库/分类名称',
            prop: 'name',
            labelWidth:128,
            rules: [{
              required: true,
              message: "主题库/分类名称",
              trigger: "blur"
            }]
          },
          {
            label:"描述",
            prop:"description",
            labelWidth:128,
          },
          {
            label: '存储的业务类型',
            prop: 'btmtypename',
            labelWidth:128,
            focus:this.btmFoucus,
            readonly: true,
            display:false,
            rules: [{
              required: true,
              message: "存储的业务类型",
              trigger: "blur"
            }]
          },
          {
            label:"编码规则",
            prop:"coderuleoidName",
            labelWidth:128,
            focus:this.CodeFoucus,
            readonly: true,
          },
          {
            label:"关键属性查询规则",
            prop:"codekeyattrrepeatoidName",
            labelWidth:128,
            focus:this.Keyfouce,
            readonly: true,
          },
          {
            label:"相似查询规则",
            prop:"codeResembleRuleOidName",
            labelWidth:128,
            focus: this.simFouce,
            readonly: true,
          },
        ]
      },
      FormList: {},
      masterSelectList:[],
      KeySelectLIst:[],
@@ -326,6 +263,75 @@
      btmSelectList:[]
    }
  },
  computed:{
    options(){
      return{
          column: [
            {
              label: '主题库/分类编号',
              prop: 'id',
              labelWidth:128,
              rules: [{
                required: true,
                message: "主题库/分类编号",
                trigger: "blur"
              }]
            },
            {
              label: '主题库/分类名称',
              prop: 'name',
              labelWidth:128,
              rules: [{
                required: true,
                message: "主题库/分类名称",
                trigger: "blur"
              }]
            },
            {
              label:"描述",
              prop:"description",
              labelWidth:128,
            },
            {
              label: '存储的业务类型',
              prop: 'btmtypename',
              labelWidth:128,
              focus:this.btmFoucus,
                // readonly: true,
              display:this.TreeFlag,
              rules: [{
                required: true,
                message: "存储的业务类型",
                trigger: "blur"
              }]
            },
            {
              label:"编码规则",
              prop:"coderuleoidName",
              labelWidth:128,
              focus:this.CodeFoucus,
              readonly: true,
            },
            {
              label:"关键属性查询规则",
              prop:"codekeyattrrepeatoidName",
              labelWidth:128,
              focus:this.Keyfouce,
              readonly: true,
            },
            {
              label:"相似查询规则",
              prop:"codeResembleRuleOidName",
              labelWidth:128,
              focus: this.simFouce,
              readonly: true,
            },
          ]
      }
    }
  },
  watch:{
    nodeClickList:{
      handler(newval,oldval){
@@ -333,6 +339,13 @@
      },
      deep:true,
      immediate:true
    },
    TreeFlag:{
      handler(newval,oldval){
        console.log('树状态',newval,oldval)
      },
      deep:true,
      immediate:true
    }
  },
  created() {
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -3,8 +3,8 @@
  <el-container>
    <!--    左侧菜单-->
    <el-aside >
      <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;"@click.native="handleClickOutside" >
        <div @click.native="handleClickOutside">
      <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
        <div>
        <div>
          <div style="display: flex;justify-content: space-around">
            <el-button plain size="small" type="primary" @click="TreeAdd">添加</el-button>
@@ -33,7 +33,7 @@
            <el-form-item label="编码规则:" label-width="150px">
              <el-input v-model="TreeAddform.codeRuleOidName" autocomplete="off" style="width: 585px" @focus="CodeFoucus"></el-input>
            </el-form-item>
            <el-form-item label="业务类型:" label-width="150px" v-if="TreeFlag==false">
            <el-form-item label="业务类型:" label-width="150px" v-if="TreeFlagCode==false">
              <el-input v-model="TreeAddform.btmTypeName" autocomplete="off" style="width: 585px" @focus="btmFoucus"></el-input>
            </el-form-item>
            <el-form-item label="关键属性查询规则:" label-width="150px">
@@ -52,7 +52,7 @@
        </el-dialog>
        <!--        修改对话框-->
        <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlag" ::nodeClickList="nodeClickList"></classifyTreeform>
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlagCode" ::nodeClickList="nodeClickList"></classifyTreeform>
        </el-dialog>
        <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                   :option="Treeoption"
@@ -330,7 +330,7 @@
  data() {
    return {
      //树节点显示隐藏
      TreeFlag:false,
      TreeFlagCode:false,
      //编码规则
      MasterdialogVisible:false,
      masterData:[],
@@ -633,6 +633,10 @@
      if (e.target.nodeName !== 'SPAN') {
        this.$refs.tree.setCurrentKey(null)
        this.nodeClickList = {}
        this.TreeList=[]
        this.TreeFlagCode=false
        console.log('后TreeList',this.TreeList)
        console.log('后nodeClickList',this.nodeClickList)
      }
    }, true)
  },
@@ -682,18 +686,6 @@
    }
  },
  methods: {
    //树节点失去焦点
    handleClickOutside(event) {
      const treeElement = this.$refs.tree.$el;
      const targetElement = event.target;
      if (!treeElement.contains(targetElement)) {
        // 在树组件外部点击,清空选择状态
        // this.nodeClickList=[];
        // this.CloneTreeAvueform={}
        console.log(this.nodeClickList  )
        console.log(this.CloneTreeAvueform)
      }
    },
    //编码规则失焦
    CodeFoucus(){
      this.MasterdialogVisible=true;
@@ -1039,7 +1031,7 @@
    },
    //修改回填
    TreeEdit() {
      if (this.nodeClickList == "") {
      if ( Object.keys(this.nodeClickList).length<1) {
        this.$message({
          type: 'warning',
          message: '请先从树上选择一条数据!'
@@ -1119,9 +1111,8 @@
    //树点击事件
    async nodeClick(data) {
      //定义一个模板属性id,数据是模板管理表格里面的oid
      console.log('树',data)
      if(data.parentId == ""){
        this.TreeFlag=true;
        this.TreeFlagCode=true;
      }
      this.nodeClickList = data
      this.ProData=[]
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -142,6 +142,15 @@
            type: Array
        }
    },
  watch:{
    btmType:{
      handler(newval,oldval){
        console.log('监听',newval,oldval)
      },
      deep:true,
      immediate:true
    }
  },
    data() {
        return {
            form: {},
@@ -359,7 +368,7 @@
        },
        // 属性池加载
        attrRefOnLoad(){
            if (!this.attrRef.queryNotIn || (this.attrRef.queryNotIn === '' && this.btmType.attributes !== [])){
            if (this.attrRef.queryNotIn != ''){
              this.attrRef.queryNotIn = '';
               this.btmType.attributes.forEach(item => {
                  this.attrRef.queryNotIn += (item.id + ",")
Source/UBCS-WEB/src/views/system/tenant.vue
@@ -1,6 +1,6 @@
<template>
  <basic-container>
    <avue-crud :option="option"
    <avue-crud :option="this.option"
               :table-loading="loading"
               :data="data"
               ref="crud"
@@ -61,7 +61,7 @@
        <el-tag>{{ row.expireTime ? row.expireTime : '不限制' }}</el-tag>
      </template>
    </avue-crud>
    <el-dialog title="租户数据源配置"
               append-to-body
               :visible.sync="datasourceBox"
@@ -90,7 +90,7 @@
  remove,
  update,
  add,
  setting,
  // setting,
  datasource,
  packageInfo,
  packageSetting
@@ -115,117 +115,6 @@
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      option: {
        height: 'auto',
        calcHeight: 30,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: true,
        index: true,
        selection: true,
        viewBtn: true,
        dialogWidth: 900,
        dialogClickModal: false,
        highlightCurrentRow: true, //行选中时高亮
        column: [
          {
            label: "租户ID",
            prop: "tenantId",
            width: 100,
            search: true,
            addDisplay: false,
            editDisplay: false,
            span: 24,
            rules: [{
              required: true,
              message: "请输入租户ID",
              trigger: "blur"
            }]
          },
          {
            label: "全称",
            prop: "fullName",
            width: 120,
            span:24,
            rules: [{
              required: true,
              message: "请输入全称",
              trigger: "blur"
            }]
          },
          {
            label: "租户名称",
            prop: "tenantName",
            search: true,
            width: 180,
            span: 24,
            rules: [{
              required: true,
              message: "请输入参数名称",
              trigger: "blur"
            }]
          },
          {
            label: "联系人",
            prop: "linkman",
            width: 150,
            search: true,
            rules: [{
              required: true,
              message: "请输入联系人",
              trigger: "blur"
            }]
          },
          {
            label: "联系电话",
            prop: "contactNumber",
            width: 150,
          },
          {
            label: "联系地址",
            prop: "address",
            span: 24,
            minRows: 2,
            type: "textarea",
            hide: true,
          },
          {
            label: '开启三员',
            prop: 'ssaEnable',
            type: 'radio',
            width: 100,
            value:0,
            disabled:Boolean,
            dicData: [{
              label: '开启',
              value: 0
            }, {
              label: '不开启',
              value: 1
            },],
          },
          {
            label: "绑定域名",
            prop: "domainUrl",
            span: 24,
          },
          {
            label: "系统背景",
            prop: "backgroundUrl",
            type: 'upload',
            listType: 'picture-img',
            dataType: 'string',
            action: '/api/ubcs-resource/oss/endpoint/put-file',
            propsHttp: {
              res: 'data',
              url: 'link',
            },
            hide: true,
            span: 24,
          },
        ]
      },
      data: [],
      settingForm: {},
@@ -298,14 +187,12 @@
          },
        ]
      },
      BooleanFlag:Boolean,
    };
  },
  created() {
    // 获取到true还是false直接赋值,定义方法会就是获取不到,不知道什么问题,强制用JSON.parse会在后面追加一个disabled,所以直接获取。后期如果添加cloumn会出现bug,用foreach循环出column在判断type是否等于radio,然后将单独radio的disabled改为res.data.data
    this.$axios.get('/api/ubcs-system/tenant/find-ssa-enable').then(res => {
      this.option.column[6].disabled= res.data.data
    });
    this.initBoolean()
  },
  watch: {
    'packageForm.packageId'() {
@@ -336,9 +223,128 @@
    },
    tenantId() {
      return this.selectionList[0].tenantId;
    },
    option(){
      return{
          height: 'auto',
          calcHeight: 30,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          border: true,
          index: true,
          selection: true,
          viewBtn: true,
          dialogWidth: 900,
          dialogClickModal: false,
          highlightCurrentRow: true, //行选中时高亮
          column: [
            {
              label: "租户ID",
              prop: "tenantId",
              width: 100,
              search: true,
              addDisplay: false,
              editDisplay: false,
              span: 24,
              rules: [{
                required: true,
                message: "请输入租户ID",
                trigger: "blur"
              }]
            },
            {
              label: "全称",
              prop: "fullName",
              width: 120,
              span:24,
              rules: [{
                required: true,
                message: "请输入全称",
                trigger: "blur"
              }]
            },
            {
              label: "租户名称",
              prop: "tenantName",
              search: true,
              width: 180,
              span: 24,
              rules: [{
                required: true,
                message: "请输入参数名称",
                trigger: "blur"
              }]
            },
            {
              label: "联系人",
              prop: "linkman",
              width: 150,
              search: true,
              rules: [{
                required: true,
                message: "请输入联系人",
                trigger: "blur"
              }]
            },
            {
              label: "联系电话",
              prop: "contactNumber",
              width: 150,
            },
            {
              label: "联系地址",
              prop: "address",
              span: 24,
              minRows: 2,
              type: "textarea",
              hide: true,
            },
            {
              label: '开启三员',
              prop: 'ssaEnable',
              type: 'radio',
              width: 100,
              value:0,
              disabled:this.BooleanFlag ,
              dicData: [{
                label: '开启',
                value: 0
              }, {
                label: '不开启',
                value: 1
              },],
            },
            {
              label: "绑定域名",
              prop: "domainUrl",
              span: 24,
            },
            {
              label: "系统背景",
              prop: "backgroundUrl",
              type: 'upload',
              listType: 'picture-img',
              dataType: 'string',
              action: '/api/ubcs-resource/oss/endpoint/put-file',
              propsHttp: {
                res: 'data',
                url: 'link',
              },
              hide: true,
              span: 24,
            },
          ]
      }
    }
  },
  methods: {
    initBoolean(){
      this.$axios.get('/api/ubcs-system/tenant/find-ssa-enable').then(res => {
        this.BooleanFlag=res.data.data;
        console.log('---',res)
      });
    },
    initData() {
      getMenuTree().then(res => {
        const column = this.findObject(this.packageOption.column, "menuId");
@@ -510,20 +516,20 @@
    handlePackageSetting() {
      this.packageSettingBox = true;
    },
    handleSubmit(form, done, loading) {
      setting(this.ids, form).then(() => {
        this.onLoad(this.page);
        this.$message({
          type: "success",
          message: "配置成功!"
        });
        done();
        this.box = false;
      }, error => {
        window.console.log(error);
        loading();
      });
    },
    // handleSubmit(form, done, loading) {
    //   setting(this.ids, form).then(() => {
    //     this.onLoad(this.page);
    //     this.$message({
    //       type: "success",
    //       message: "配置成功!"
    //     });
    //     done();
    //     this.box = false;
    //   }, error => {
    //     window.console.log(error);
    //     loading();
    //   });
    // },
    handleDatasourceSubmit(form, done, loading) {
      datasource(this.tenantId, form.datasourceId).then(() => {
        this.$message({
Source/UBCS-WEB/vue.config.js
@@ -28,8 +28,8 @@
        //本地服务接口地址
        // target: 'http://localhost:37000',
        // target: 'http://192.168.1.51:37000',
        // target: 'http://192.168.1.46:37000',
        target: 'http://dev.vci-tech.com:37000',
        target: 'http://192.168.1.46:37000',
        // target: 'http://dev.vci-tech.com:37000',
        // target: 'http://192.168.1.51:37000/',
        // target: 'http://192.168.1.104:37000',
        // target: 'http://192.168.1.63:37000',
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -416,6 +416,11 @@
//        //默认的属性都不用从前端拷贝
//        //设置编码需要的默认属性的内容
        copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, false);
        cbo.setOid(VciBaseUtil.getPk());
        cbo.setCreateTime(new Date());
        cbo.setLastModifyTime(new Date());
        cbo.setCreator(AuthUtil.getUser().getUserName());
        cbo.setLastModifier(AuthUtil.getUser().getUserName());
//        //TODO:因为默认的属性都不拷贝,目前集团码叫name,并没有从DTO拷贝到cbo里。增加一个单独处理,以后再看要不要调整
        cbo.setName(orderDTO.getName() == null ? "" : orderDTO.getName());
//        //end -- modify by lihang @20220407
@@ -799,35 +804,27 @@
//        BeanUtils.
//        BeanUtils.copyProperties(orderDTO.getData(),cbo);
//        cbo.setMaterialtype(Short.valueOf("1001"));
//        orderDTO.getData().forEach((key, value) -> {
//            if (!edit || (!checkUnAttrUnEdit(key) &&
//                !VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(key))) {
//                try {
//                    cbo.setAttributeValue(key, value);
//                } catch (Exception e) {
//                    logger.error("设置属性的值错误", e);
//                }
//            }
//        });
        orderDTO.getData().forEach((key, value) -> {
            if (!edit || (!checkUnAttrUnEdit(key) &&
                !VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(key))) {
                try {
                    cbo.getData().put(cbo.getData().containsKey(key.toUpperCase())?key.toUpperCase():key, value);
                } catch (Exception e) {
                    logger.error("设置属性的值错误", e);
                }
            }
        });
//        BeanMap beanMap = BeanMap.create(cbo);
//        beanMap.putAll(orderDTO.getData());
        try {
            BeanUtilForVCI.copyPropertiesIgnoreNull(BeanUtilForVCI.convertMap(BaseModel.class, orderDTO.getData()), cbo);
            Map<String, String> data = new HashMap<>();
            data.put(CODE_CLASSIFY_OID_FIELD, classifyFullInfo.getCurrentClassifyVO().getOid());
            data.put(CODE_TEMPLATE_OID_FIELD, templateVO.getOid());
            data.put(CODE_FULL_PATH_FILED, fullPath);
            cbo.setData(data);
            cbo.setOid(VciBaseUtil.getPk());
            cbo.setCreateTime(new Date());
            Map<String, String> data = new HashMap<>();
            data.put(cbo.getData().containsKey(CODE_CLASSIFY_OID_FIELD.toUpperCase())?CODE_CLASSIFY_OID_FIELD.toUpperCase():CODE_CLASSIFY_OID_FIELD, classifyFullInfo.getCurrentClassifyVO().getOid());
            data.put(cbo.getData().containsKey(CODE_TEMPLATE_OID_FIELD.toUpperCase())?CODE_TEMPLATE_OID_FIELD.toUpperCase():CODE_TEMPLATE_OID_FIELD, templateVO.getOid());
            data.put(cbo.getData().containsKey(CODE_FULL_PATH_FILED.toUpperCase())?CODE_FULL_PATH_FILED.toUpperCase():CODE_FULL_PATH_FILED, fullPath);
            cbo.getData().putAll(data);
            cbo.setLastModifyTime(new Date());
            cbo.setCreator(AuthUtil.getUser().getUserName());
            cbo.setLastModifier(AuthUtil.getUser().getUserName());
//            cbo.setCodeclsfid(classifyFullInfo.getCurrentClassifyVO().getOid());
//            cbo.setTemplateOid(templateVO.getOid());
//            cbo.setCodeclsfpath(fullPath);
            cbo.setTs(new Date());
            if (!edit && StringUtils.isBlank(orderDTO.getLcStatus())) {
                //TODO 先写固定,后面生命周期好了在编写
@@ -2108,17 +2105,10 @@
        if (CollectionUtils.isEmpty(cbos)) {
            throw new VciBaseException(DATA_OID_NOT_EXIST);
        }
//        QueryWrapper<CodeWupin> btmWrapper = new QueryWrapper<>();
//        btmWrapper.eq("OID",orderDTO.getOid());
//        CodeWupin cbo = codeWupinMapper.selectOne(btmWrapper);
        BaseModel cbo = cbos.get(0);
//        CodeClstemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid());
//        CodeRuleVO ruleVO = ruleService.getObjectHasSecByOid(orderDTO.getCodeRuleOid());
        if (cbo != null) {
        if (cbo == null) {
            throw new VciBaseException(DATA_OID_NOT_EXIST);
        }
//        ClientBusinessObject cbo = cbos.get(0);
        if (!cbo.getTs().toString().contains(VciDateUtil.date2Str(orderDTO.getTs(), VciDateUtil.DateTimeFormat))) {
            throw new VciBaseException("数据不是最新的,可能他人已经修改,请刷新后再试");
        }
@@ -2128,9 +2118,16 @@
        //注意模板不能使用数据存储的时候的模板,因为可能会变化
        //1. 判断必输项
        String codeClassifyOid=cbo.getData().get(CODE_CLASSIFY_OID_FIELD.toUpperCase());
        orderDTO.setCodeClassifyOid(codeClassifyOid);
//        CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid());
//        CodeClassifyTemplateVO templateVO= this.getUsedTemplateByClassifyOid(orderDTO.getCodeClassifyOid());
        CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid());
        checkRequiredAttrOnOrder(templateVO, orderDTO);
        orderDTO.setTemplateOid(templateVO.getOid());
        //1. 判断必输项
        checkRequiredAttrOnOrder(templateVO, orderDTO);
        //2.先注入,再组合,最后校验
        switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO);
        //3.处理组合规则。组合规则不能使用编码的属性,因为编码的生成可能是需要属性的
@@ -2147,46 +2144,18 @@
        copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, true);
        //企业码和集团码的不修改
        cbo.setDescription(orderDTO.getDescription());
        cbo.setName(orderDTO.getName());
//        cbo.setName(orderDTO.getName());
        try {
            cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription()) ? "" : orderDTO.getDescription());
            cbo.setName(orderDTO.getName());
////            cbo.setAttributeValueWithNoCheck("description", orderDTO.getDescription());
//            cbo.setAttributeValue("name", orderDTO.getName());
        } catch (Exception e) {
            e.printStackTrace();
        }
//        cbo.getData().putAll(orderDTO.getData());
        cbo.setLastModifyTime(new Date());
        cbo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId()));
        updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), Collections.singletonList(cbo));
//        codeWupinMapper.updateById(cbo);
//
//        List<CodeWupinEntity> cboList = new ArrayList<>();
//
//        //备注
//        cbo.setDescription(orderDTO.getDescription());
//        cboList.add(cbo);
////
////        cboList.add(cbo);
//        List<String> codeList = productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(),cboList);
//
//
//        List<String> charList = new ArrayList<>();
//        for (CodeWupinEntity wupinEntity : cboList) {
//            charList.add(wupinEntity.getId());
//        }
//        batchSaveSelectChar(templateVO, charList);
//        return codeList.size() > 0 ? codeList.get(0) : "";
        //修改的时候,编码是不变的
//        BatchCBO batchCBO = new BatchCBO();
//        batchCBO.getUpdateCbos().add(cbo);
//        List<ClientBusinessObject> cboList = new ArrayList<>();
//        cboList.add(cbo);
//        boService.persistenceBatch(batchCBO);
        batchSaveSelectChar(templateVO, Collections.singletonList(cbo));
//        batchSaveSelectChar(templateVO, Arrays.asList(cbo.getId()));
    }
    /**