fujunling
2023-06-16 3bcd305ef9408ae54f7ef62b8472d0813ae34333
解决冲突
已修改68个文件
已添加4个文件
21538 ■■■■ 文件已修改
Source/UBCS-WEB/package-lock.json 16796 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/GetItem.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/resource/file.js 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/system/dept.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/system/menu.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/system/passwords.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/system/role.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/template/setPersonnel.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Crud/Crud.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/TemplatePro.vue 316 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/attrCrud.vue 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue 108 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/file/inDialog.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/file/inHtml.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/file/main.vue 325 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebRefer.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/template/SetPersonnel.vue 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/template/Stage.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/MasterData/FormTempalteTest.vue 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/MasterData/items.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/authority/apiscope.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/authority/datascope.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/authority/role.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/code/code.vue 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/flow/flowPath.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/omd/enum.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/system/PasswordManagement/passwords.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/system/dept.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/system/tenant.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/system/user.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/vue.config.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops-api/ubcs-resource-api/src/main/java/com/vci/ubcs/resource/dto/FileObjectDTO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeImportResultVO.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeImportTemplateVO.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeImprotDataVO.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/revision/model/BaseModel.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/UBCSSqlKeyword.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/CommonsMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeRuleService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmEngineService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmIOService.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java 2442 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/DeptController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/MenuController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/RoleController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/StrategyController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/DeptMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/MenuMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/StrategyMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IDeptService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IMenuService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IStrategyService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/CombinationServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/MenuServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/StrategyServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/DeptWrapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/MenuWrapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/RoleWrapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/MenuMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/GroupMdmInterServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/package-lock.json
ÎļþÌ«´ó
Source/UBCS-WEB/src/api/GetItem.js
@@ -2,7 +2,7 @@
export const MasterTable =(params)=>{
  return request({
    url: 'api/ubcs-code/ubcs-code/mdmEngineController/getUIInfoByClassifyOid',
    url: 'api/ubcs-code/mdmEngineController/getUIInfoByClassifyOid',
    method: 'get',
    params:{
      ...params
@@ -12,7 +12,7 @@
export const TableData =(params)=>{
  return request({
    url: 'api/ubcs-code/ubcs-code/mdmEngineController/gridTableDataByClassifyOid',
    url: 'api/ubcs-code/mdmEngineController/gridTableDataByClassifyOid',
    method: 'get',
    params:{
      ...params
Source/UBCS-WEB/src/api/resource/file.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,74 @@
import request from '@/router/axios';
export const getList = (page, limit, params) => {
  return request({
    url: '/api/ubcs-resource/fileController/listFiles',
    method: 'get',
    params: {
      ...params,
      page,
      limit
    }
  })
}
export const remove = (oids) => {
  return request({
    url: '/api/ubcs-resource/fileController/deleteFile',
    method: 'post',
    params: {
      oids
    }
  })
}
export const upload = (row) => {
  return request({
    url: '/api/ubcs-resource/fileController/uploadFile',
    method: 'post',
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/ubcs-resource/fileController/uploadFile',
    method: 'post',
    data: row
  })
}
export const download = (oids) => {
  return request({
    url: '/api/ubcs-resource/fileController/downloadFilesByOids',
    method: 'get',
    params: {
      oids
    }
  })
}
/**
 * ä½¿ç”¨æ–‡ä»¶ä¸»é”®èŽ·å–å¯¹è±¡
 * @param oid ä¸»é”®
 * @return æ–‡ä»¶æ˜¾ç¤ºå¯¹è±¡
 */
export const getFile = (oid) => {
  return request({
    url: '/api/ubcs-resource/fileController/get',
    method: 'get',
    params: {
      oid
    }
  })
}
export const listFilesByOids = (oids) => {
  return request({
    url: '/api/ubcs-resource/fileController/listFilesByOids',
    method: 'get',
    params: {
      oids
    }
  })
}
Source/UBCS-WEB/src/api/system/dept.js
@@ -12,13 +12,15 @@
  })
}
export const getLazyList = (parentId, params) => {
export const getLazyList = (parentId, params,current, size,) => {
  return request({
    url: '/api/ubcs-system/dept/lazy-list',
    method: 'get',
    params: {
      ...params,
      parentId
      parentId,
      current,
      size
    }
  })
}
Source/UBCS-WEB/src/api/system/menu.js
@@ -23,13 +23,15 @@
  })
}
export const getLazyMenuList = (parentId, params) => {
export const getLazyMenuList = (parentId, params, current, size) => {
  return request({
    url: '/api/ubcs-system/menu/lazy-menu-list',
    method: 'get',
    params: {
      ...params,
      parentId
      parentId,
      current,
      size,
    }
  })
}
Source/UBCS-WEB/src/api/system/passwords.js
@@ -49,3 +49,10 @@
    }
  })
}
export const combination = () => {
  return request({
    url: '/api/ubcs-system/combination/select',
    method: 'get',
  })
}
Source/UBCS-WEB/src/api/system/role.js
@@ -1,8 +1,8 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
export const getPage = (current, size, params) => {
  return request({
    url: '/api/ubcs-system/role/list',
    url: '/api/ubcs-system/role/page',
    method: 'get',
    params: {
      ...params,
Source/UBCS-WEB/src/api/template/setPersonnel.js
@@ -28,8 +28,8 @@
export const personnelSave = (params) => {
  return request({
    url: '/api/ubcs-flow/vciflow/start',
    method: 'get',
    params: params
    method: 'post',
    data: params
  })
}
// äººå‘˜è®¾ç½®ä¿å­˜
Source/UBCS-WEB/src/components/Crud/Crud.vue
@@ -6,7 +6,7 @@
          <FormTemplateDialog
            :visible.sync="addvisible"
            :type="add"
            :templateOid="this.templateOid"
            :templateOid="templateOid"
            :codeClassifyOid="this.codeClassifyOid"
            :codeRuleOid="this.codeRuleOid"
            :disabledProp="disabledProp"
@@ -16,7 +16,7 @@
          <FormTemplateDialog
            :visible.sync="editvisible"
            :type="edit"
            :templateOid="this.templateOids"
            :templateOid="templateOid"
            :codeClassifyOid="this.codeClassifyOid"
            :codeRuleOid="this.codeRuleOid"
            :disabledProp="disabledProp"
@@ -30,20 +30,24 @@
        <el-button size="small" type="primary" plain>删除</el-button>
        <el-button size="small" type="primary" plain>发布</el-button>
        <el-button size="small" type="primary" plain>数据更改</el-button>
        <el-button size="small" type="primary" plain>回收</el-button>
        <el-button size="small" type="primary" plain @click="huishouHandler">回收</el-button>
        <el-button size="small" type="primary" plain @click="openD">导出
          <integration-transfer :visible.sync="dialogPush" :data="transferData"
                                :props="transferProps" @save="handelTransferSave"></integration-transfer>
        </el-button>
        <el-button size="small" type="primary" plain @click="findvisible=true">查询
        <advancedQuery  :visible.sync="findvisible" :options="this.options"></advancedQuery>
<<<<<<< HEAD
        <advanced-query  :visible.sync="findvisible" :options="options"></advanced-query>
=======
        <advanced-query  :visible.sync="findvisible" :options="this.options"></advanced-query>
>>>>>>> 859a64b36d107b147f44eccd0c0a76471c5e49ea
        </el-button>
        <el-button size="small" type="primary" plain>相似项查询</el-button>
        <el-button size="small" type="primary" plain style="margin-left: 1px;margin-top:10px">刷新</el-button>
        <el-input placeholder="请输入关键字按回车查询" style="width: 180px;margin-left: 5px;margin-top:10px" size="small"></el-input>
      </div>
      <el-row style="height: 700px;width: 100%">
        <el-table :data="tableData" style="" @cell-click="handleCellClick" max-height="700"  @selection-change="handleSelectionChange"  @sort-change="sortChange">
        <el-table :data="tableData" style="" @cell-click="handleCellClick" max-height="700"  v-loading="isLoading"  @selection-change="handleSelectionChange"  @sort-change="sortChange">
          <el-table-column
            type="selection"
            fixed
@@ -113,15 +117,20 @@
    },
    tableDataArray:{
      type:Array,
      default:[]
    },
    total:{
      type:String,
      default:""
    },
    templateOid:{
      type:String,
    },
    tableHeadDataFateher:{
      type:Array,
      default:[]
    },
    isLoading:{
      type:Boolean,
      default:false
    }
  },
  data() {
@@ -141,9 +150,8 @@
      editingRow:null,
      editShow: "",
      editAttr:"",
      loading: false,
      data: [],
      options:{},
      options:[],
      option: {
        column: []
      },
@@ -157,7 +165,6 @@
      },
      tableData:[],
      tableHeadData:[],
      tableHeadDataFateher:[],
      items:{},
      seniorQueryColumns:[]
    }
@@ -193,13 +200,30 @@
        this.page.total=newval;
      }
    },
    tableHeadData:{
    tableHeadDataFateher:{
      handler(newval,oldval){
        this.tableHeadDataFateher=newval
        let List=newval.tableDefineVO.cols[0];
        List.forEach(item=>{
          let columnItem = {
            label: item.title,
            prop: item.field,
            type: this.columnType[item.type],
            sortable: item.sort,
            width: item.minWidth
          };
          this.option.column.push(columnItem);
          this.option.column=this.tableHeadData;
        })
      }
    }
  },
  methods: {
    huishouHandler(){
      console.log('tem',this.templateOid)
      console.log('table',this.tableData)
      console.log('tabheadle',this.tableHeadData)
      console.log('tableFather',this.tableHeadDataFateher)
    },
    openD(){
      this.dialogPush=true;
      this.getListCodeByClassId()
@@ -219,25 +243,20 @@
      this.page.pageSize=val
      this.$emit('pageSize',val)
      this.CrudRend()
      console.log(this.tableData)
    },
    handleCurrentChange(val){
      this.page.currentPage=val
      this.$emit('currentPage',val)
      this.CrudRend()
      console.log(val)
      console.log(this.tableData)
    },
    // ç›‘听单元格点击事件并存储正在编辑的行
    handleCellClick(row, column) {
      this.editingRow = row;
      this.editShow = column.property;
      console.log(row)
      this.rowOid=row.oid
    },
    //删除
    enumDeleteRow(row) {
      console.log(row)
      this.tableData.splice(row, 1)
    },
    // å°†æ­£åœ¨ç¼–辑的行的状态变为 null ï¼Œå³é€€å‡ºç¼–辑状态
@@ -285,7 +304,6 @@
            this.option.column=this.tableHeadData;
            this.templateOid=res.data.tableDefineVO.oid
            this.$emit('templateOid',this.templateOid)
            console.log(this.templateOid)
          })
        })
      }
@@ -305,7 +323,7 @@
    },
    // æŽ’序
    sortChange(val) {
      this.loading = true;
      this.isLoading = true;
      let order = ""
      if (val.order == "ascending") {
        order = "asc";
@@ -322,7 +340,7 @@
      }).then(res => {
        setTimeout(() => {
          this.data = res.data.data;
          this.loading = false;
          this.isLoading = false;
        }, 100);
      })
    },
Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
@@ -29,6 +29,8 @@
          :referConfig="item.referConfig || {}"
          :value="form[item.referConfig.field] || item.value"
          :text="form[item.referConfig.showField]"
          :disabled="item.disabled"
          :display="item.display"
          @setReferValue="setReferValue"
        ></vciWebRefer>
      </template>
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -82,7 +82,6 @@
        this.coderuleoid=res.data[0].attributes.coderuleoid;
        this.$emit("codeClassifyOid", this.codeClassifyOid )
        this.$emit("coderuleoid", this.coderuleoid )
        this.TableHeadRends()
      }).catch(res=>{
        console.log(res)
      })
@@ -108,44 +107,40 @@
        page: this.currentPage,
        limit: this.pageSize,
      }).then(res => {
        // this.page.total = res.data.total;
        // this.data = res.data.data;
        this.tableDataArray=res.data.data;
        this.$emit('tableDataArray',this.tableDataArray)
        this.$emit('total',res.data.total)
        console.log('table',this.tableDataArray)
      })
    },
    //表格头部
    TableHeadRend(){
      MasterTable({
        codeClassifyOid:this.nodeClickList.oid,
        functionId: 5,
      }).then(res=>{
        this.tableHeadDataFateher=res.data;
        this.templateOids=res.data.tableDefineVO.oid
        this.$emit("tableHeadDataFateher",this.tableHeadDataFateher)
        console.log("123",res)
      })
    },
    TableHeadRends(){
      MasterTable({
        codeClassifyOid:this.codeClassifyOid,
        functionId: 5,
      }).then(res=>{
        this.tableHeadDataFateher=res.data;
        this.templateOids=res.data.tableDefineVO.oid
        this.$emit("tableHeadDataFateher",this.tableHeadDataFateher)
        console.log("123",res)
    TableHeadRend() {
      return new Promise((resolve,reject)=>{
        MasterTable({
          codeClassifyOid: this.nodeClickList.oid,
          functionId: 5,
        }).then(res => {
          this.tableHeadDataFateher = res.data;
          this.templateOids = res.data.tableDefineVO.oid;
          this.$emit('tableHeadDataFateher', this.tableHeadDataFateher);
          resolve();
        }).catch(err=>{
          reject(err)
        })
      })
    },
    //树点击事件
    nodeClick(data){
      this.nodeClickList = data;
       this.TableHeadRend()
      this.TableRend()
      console.log('code',this.nodeClickList.oid)
      console.log('teoid',this.templateOids)
      console.log()
    async nodeClick(data) {
      try {
        this.nodeClickList = data;
        await this.TableHeadRend(); // å…ˆæ‰§è¡Œ TableHeadRend()
        this.TableRend(); // TableHeadRend() æ–¹æ³•完成后再执行 TableRend()
        this.$emit('nodeClick',this.templateOids)
        console.log(this.templateOids)
      } catch (error) {
        // å¤„理错误
        this.$message.error(error)
      }
    }
  }
}
Source/UBCS-WEB/src/components/Tree/TemplatePro.vue
@@ -5,11 +5,11 @@
      <attrCrud :ProData="ProData" :crudOid="crudOid" :crudArray="crudArray" :Formlist="Formlist" :codeClassifyOid="codeClassifyOid"></attrCrud>
    </span>
    <span v-else-if="type.prop==='tab2'">
       <FlowPath code="8b5e2017-990f-454a-9c39-4c4eeeb57553"></FlowPath>
       <FlowPath :code="this.codeClassifyOid"></FlowPath>
    </span>
    <span v-else-if="type.prop==='tab3'">
<!--          <stage :visible.sync="visibleStage" code="8b5e2017-990f-454a-9c39-4c4eeeb57553"></stage>-->
          <stage  :code="this.codeClassifyOid"></stage>
    </span>
  </basic-container>
@@ -51,318 +51,6 @@
  }
}
</script>
<!--<template>-->
<!--  &lt;!&ndash; ä½¿ç”¨ Element UI çš„表格组件展示数据 &ndash;&gt;-->
<!--  &lt;!&ndash; å¯¹æ¯è¡Œæ•°æ®æ¸²æŸ“一个表格行组件 &ndash;&gt;-->
<!--  <el-table :data="data">-->
<!--    <el-table-column v-for="column in columns" :key="column.prop" :label="column.label">-->
<!--      <template slot-scope="scope">-->
<!--        <template v-if="isEditing(scope.$index, column.prop)">-->
<!--          &lt;!&ndash; ä½¿ç”¨è‡ªå®šä¹‰è¾“入框,绑定数据并监听 blur äº‹ä»¶ &ndash;&gt;-->
<!--          <el-input v-model="editorModel[scope.$index][column.prop]" ref="editor"-->
<!--                    @blur="onEditorBlur(scope.$index, column.prop)">-->
<!--          </el-input>-->
<!--        </template>-->
<!--        <template v-else>-->
<!--          &lt;!&ndash; å°†æ•°æ®æ¸²æŸ“为表格单元格,绑定 click äº‹ä»¶ &ndash;&gt;-->
<!--          <div @click="onCellClick(scope.$index, column.prop)"-->
<!--               :style="{cursor: 'pointer', backgroundColor: isEditing(scope.$index, column.prop) ? '#F0F0F0' : 'transparent'}">-->
<!--            {{ scope.row[column.prop] === "" ? '' : scope.row[column.prop] }}-->
<!--          </div>-->
<!--        </template>-->
<!--      </template>-->
<!--    </el-table-column>-->
<!--  </el-table>-->
<!--</template>-->
<!--<script>-->
<!--export default {-->
<!--  data() {-->
<!--    // ç»„件的数据,包括表格的数据、列定义和当前正在编辑的行和列-->
<!--    return {-->
<!--      data: [-->
<!--        { id: 1, name: '张三', age: 18, attributegroup: '男', attributeDataTypeText: '广东省深圳市' },-->
<!--        { id: 2, name: '李四', age: 20, attributegroup: '女', attributeDataTypeText: '北京市海淀区' },-->
<!--        { id: 3, name: '王五', age: 22, attributegroup: '男', attributeDataTypeText: '上海市浦东新区' },-->
<!--        { id: 4, name: '赵六', age: 24, attributegroup: '女', attributeDataTypeText: '广东省广州市' }-->
<!--      ],-->
<!--      columns: [  // å®šä¹‰è¡¨æ ¼çš„列-->
<!--        {-->
<!--          label: "属性英文编号",-->
<!--          prop: "id",-->
<!--          fixed: true,-->
<!--          cell: false,-->
<!--          labelWidth: 110,-->
<!--          width: 125,-->
<!--          sortable: true,-->
<!--        },-->
<!--        {-->
<!--          label: "属性中文名称",-->
<!--          prop: "name",-->
<!--          fixed: true,-->
<!--          cell: false,-->
<!--          width: 125,-->
<!--          sortable: true-->
<!--        },-->
<!--        {-->
<!--          label: "属性分组",-->
<!--          prop: "attributegroup",-->
<!--          cell: false,-->
<!--          sortable: true,-->
<!--          width: 125,-->
<!--        },-->
<!--        {-->
<!--          label: "类型",-->
<!--          prop: "attributeDataTypeText",-->
<!--          cell: false,-->
<!--          sortable: true,-->
<!--        },-->
<!--        {-->
<!--          label: "列表宽度",-->
<!--          prop: "attrTableWidth",-->
<!--          cell: false,-->
<!--          sortable: true,-->
<!--          width: 105,-->
<!--        },-->
<!--        {-->
<!--          label: "关键属性",-->
<!--          prop: "keyattrflag",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "查询属性",-->
<!--          prop: "queryattrflag",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "高级查询属性",-->
<!--          prop: "seniorqueryattrflag",-->
<!--          width: 95,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "相似查询属性",-->
<!--          prop: "samerepeatattrflag",-->
<!--          width: 95,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "必输",-->
<!--          prop: "requireflag",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "表单显示",-->
<!--          prop: "formdisplayflag",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "列表显示",-->
<!--          prop: "tabledisplayflag",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "只读",-->
<!--          prop: "readonlyflag",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "列表排序",-->
<!--          prop: "sortattrflag",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "多行文本",-->
<!--          prop: "textareaflag",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "默认值",-->
<!--          prop: "defaultvalue",-->
<!--          sortable: true,-->
<!--          cell: false,-->
<!--          width: 95,-->
<!--        },-->
<!--        {-->
<!--          label: "前缀",-->
<!--          prop: "prefixvalue",-->
<!--          sortable: true,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "后缀",-->
<!--          prop: "suffixvalue",-->
<!--          sortable: true,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "组合规则",-->
<!--          prop: "componentrule",-->
<!--          sortable: true,-->
<!--          cell: false,-->
<!--          width: 105,-->
<!--        },-->
<!--        {-->
<!--          label: "验证规则",-->
<!--          prop: "verifyrule",-->
<!--          sortable: true,-->
<!--          cell: false,-->
<!--          width: 105,-->
<!--        },-->
<!--        {-->
<!--          label: "时间格式",-->
<!--          prop: "codedateformat",-->
<!--          sortable: true,-->
<!--          width: 105,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "分类注入",-->
<!--          prop: "classifyinvokelevel",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "枚举注入",-->
<!--          prop: "enumString",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "级联属性",-->
<!--          prop: "parentCode",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "参照配置",-->
<!--          prop: "referConfig",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "级联查询属性",-->
<!--          prop: "parentQueryAttr",-->
<!--          width: 105,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "选择库标识",-->
<!--          prop: "libraryIdentification",-->
<!--          width: 105,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "填写提示",-->
<!--          prop: "explain",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "表单显示样式",-->
<!--          prop: "formdisplaystyle",-->
<!--          width: 105,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "表格显示样式",-->
<!--          prop: "tabledisplaystyle",-->
<!--          width: 105,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "表单超链接",-->
<!--          prop: "formhref",-->
<!--          width: 95,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "表格超链接",-->
<!--          prop: "tablehref",-->
<!--          width: 95,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "表格显示js",-->
<!--          prop: "tabledisplayjs",-->
<!--          width: 95,-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "长度",-->
<!--          prop: "controllength",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "小数精度",-->
<!--          prop: "precisionlength",-->
<!--          cell: false,-->
<!--        },-->
<!--        {-->
<!--          label: "取值范围",-->
<!--          prop: "valuearea",-->
<!--          sortable: true,-->
<!--          cell: false,-->
<!--          width: 105,-->
<!--        },-->
<!--      ],-->
<!--      editingIndex: -1,  // å½“前正在编辑的行的索引-->
<!--      editingColumn: '',  // å½“前正在编辑的列的属性名-->
<!--      editorModel: []  // ç¼–辑框的数据,使用数组保存每个单元格的数据-->
<!--    };-->
<!--  },-->
<!--  created() {-->
<!--    // åœ¨ç»„件创建时,初始化编辑框的数据-->
<!--    this.editorModel = this.data.map(row => {-->
<!--      const editorRow = {};-->
<!--      this.columns.forEach(column => {-->
<!--        editorRow[column.prop] = row[column.prop];-->
<!--      });-->
<!--      return editorRow;-->
<!--    });-->
<!--  },-->
<!--  methods: {-->
<!--    // å•元格点击事件处理函数-->
<!--    onCellClick(rowIndex, columnProp) {-->
<!--      if (this.editingIndex >= 0 && this.editingColumn) {-->
<!--        this.onEditorBlur(this.editingIndex, this.editingColumn);-->
<!--        return;-->
<!--      }-->
<!--      const cellValue = this.data[rowIndex][columnProp];-->
<!--      if (cellValue === undefined || cellValue === null) {-->
<!--        this.data[rowIndex][columnProp] = '';-->
<!--      }-->
<!--      this.editingIndex = rowIndex;-->
<!--      this.editingColumn = columnProp;-->
<!--      this.$nextTick(() => {-->
<!--        this.$refs.editor.focus();-->
<!--      });-->
<!--    },-->
<!--    // ç¼–辑框失焦事件处理函数-->
<!--    onEditorBlur(rowIndex, columnProp) {-->
<!--      // å°†å½“前编辑框的数据保存到表格数据中-->
<!--      const editorValue = this.editorModel[rowIndex][columnProp];-->
<!--      if (editorValue === '') {-->
<!--        this.data[rowIndex][columnProp] = undefined;-->
<!--      } else {-->
<!--        this.data[rowIndex][columnProp] = editorValue;-->
<!--      }-->
<!--      this.editingIndex = -1;-->
<!--      this.editingColumn = '';-->
<!--    },-->
<!--    // åˆ¤æ–­æŒ‡å®šå•元格是否在编辑状态-->
<!--    isEditing(rowIndex, columnProp) {-->
<!--      return rowIndex === this.editingIndex && columnProp === this.editingColumn;-->
<!--    }-->
<!--  }-->
<!--};-->
<!--</script>-->
<style lang="scss">
//修改分类注入对话框公共样式
.mydialog .el-dialog__body {
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -33,8 +33,12 @@
    </template>
<!--    ç»„合规则-->
    <template slot="menuLeft">
      <el-button size="small" @click="isShowformulaEdit=true">组合规则</el-button>
        <formula-editor :visible.sync="isShowformulaEdit" :systemVariableTableData="systemVariableTableData" :thisSceneTableData="thisSceneTableData"></formula-editor>
      <el-button size="small" @click="isShowHandler">组合规则</el-button>
        <formula-editor :visible.sync="isShowformulaEdit"
                        :systemVariableTableData="systemVariableTableData"
                        :thisSceneTableData="thisSceneTableData"
                        @updateFormulaContent="updataFormlaContent"
        ></formula-editor>
    </template>
    <!--        éªŒè¯è§„则-->
@@ -266,6 +270,7 @@
      type:Boolean,
      default:false
    },
  },
  data() {
    return {
@@ -696,20 +701,130 @@
          },
          {
            label: "使用说明",
            prop: "shiyong"
            prop: "description"
          }
        ]
      },
      //属性验证规则data
      rulesData: [
        {
          bds: "测试一",
          shiyong: "测试一"
        },
        {bds: '[\u3000\uff01-\uff5f]+', description: '全角符号'},
    {bds: '[^\u3000\uff01-\uff5f]+', description: '半角符号'},
    {bds: '(([-|+]{1}[\\d]+℃~[-|+]{1}[\\d]+℃)|无)', description: '温度范围,示例 -55℃~+125℃'},
    {bds: '[\\d]{15}|[\\d]{18}|[\\d]{17}X', description: '身份证号码(15或18位数字、17位数字X) '},
    {bds: '男|女|男性|女性', description: '中文性别'},
    {bds: '[\\d]+', description: '数字'},
    {bds: '[a-zA-Z]+', description: '字母'},
    {bds: '[A-Z]+', description: '大写字母'},
    {bds: '[a-z]+', description: '小写字母'},
    {bds: '[0-9a-zA-Z]+', description: '字母、数字组合'},
    {bds: '((0[\\d]{3}-[\\d]{7})|(0[\\d]{2}-[\\d]{8})|([\\d]{7,8}))', description: '电话号码'},
    {bds: '-?[1-9]\\d*', description: '整数'},
    {bds: '[1-9]\\d*', description: '正整数'},
    {bds: '-[1-9]\\d*', description: '负整数'},
    {bds: '-[1-9]\\d*|0', description: '非正整数(负整数+0)'},
    {bds: '[1-9]\\d*|0', description: '非负整数(正整数+0)'},
    {bds: '-?([1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*|0?\\.0+|0)', description: '浮点数'},
    {bds: '[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*', description: '正浮点数'},
    {bds: '-[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*', description: '负浮点数'},
    {bds: '[(-([1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*))|0?\\.0+|0', description: '非正浮点数(负浮点数 + 0)'},
    {bds: '[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*|0?\\.0+|0', description: '非负浮点数(正浮点数 + 0)'},
    {bds: 'x', description: '字符 x'},
    {bds: '\\\\', description: '反斜线字符'},
    {bds: '\\0n', description: '带有八进制值 0 çš„字符 n (0 <= n <= 7)'},
    {bds: '\\0nn', description: '带有八进制值 0 çš„字符 nn (0 <= n <= 7)'},
    {bds: '\\0mnn', description: '带有八进制值 0 çš„字符 mnn(0 <= m <= 3、0 <= n <= 7)'},
    {bds: '\\xhh', description: '带有十六进制值 0x çš„字符 hh'},
    {bds: '\\uhhhh', description: '带有十六进制值 0x çš„字符 hhhh'},
    {bds: '\\t', description: '制表符 (\'\u0009\')'},
    {bds: '\\n', description: '新行(换行)符 (\'\u000A\')'},
    {bds: '\\r', description: '回车符 (\'\u000D\')'},
    {bds: '\\f', description: '换页符 (\'\u000C\')'},
    {bds: '\\a', description: '报警 (bell) ç¬¦ (\'\u0007\')'},
    {bds: '\\e', description: '转义符 (\'\u001B\')'},
    {bds: '\\cx', description: '对应于 x çš„æŽ§åˆ¶ç¬¦'},
    {bds: '[abc]', description: 'a、b æˆ– c(简单类)'},
    {bds: '[^abc]', description: '任何字符,除了 a、b æˆ– c(否定)'},
    {bds: '[a-zA-Z]', description: 'a åˆ° z æˆ– A åˆ° Z,两头的字母包括在内(范围)'},
    {bds: '[a-d[m-p]]', description: 'a åˆ° d æˆ– m åˆ° p:[a-dm-p](并集)'},
    {bds: '[a-z&&[def]]', description: '\td、e æˆ– f(交集)'},
    {bds: '[a-z&&[^bc]]', description: 'a åˆ° z,除了 b å’Œ c:[ad-z](减去)'},
    {bds: '[a-z&&[^m-p]]', description: 'a åˆ° z,而非 m åˆ° p:[a-lq-z](减去)'},
    {bds: '.', description: '任何字符(与行结束符可能匹配也可能不匹配)'},
    {bds: '\\d', description: '数字:[0-9]'},
    {bds: '\\D', description: '非数字: [^0-9]'},
    {bds: '\\s', description: '空白字符:[ \\t\\n\x0B\\f\\r]'},
    {bds: '\\S', description: '非空白字符:[^\\s]'},
    {bds: '\\w', description: '单词字符:[a-zA-Z_0-9]'},
    {bds: '\\W', description: '非单词字符:[^\\w]'},
    {bds: '\\p{Lower}', description: '小写字母字符:[a-z]'},
    {bds: '\\p{Upper}', description: '大写字母字符:[A-Z]'},
    {bds: '\\p{ASCII}', description: '所有 ASCII:[\x00-\x7F]'},
    {bds: '\\p{Alpha}', description: '字母字符:[\\p{Lower}\\p{Upper}]'},
    {bds: '\\p{Digit}', description: '十进制数字:[0-9]'},
    {bds: '\\p{Alnum}', description: '字母数字字符:[\\p{Alpha}\\p{Digit}]'},
    {bds: '\\p{Punct}', description: '标点符号:!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'},
    {bds: '\\p{Graph}', description: '可见字符:[\\p{Alnum}\\p{Punct}]'},
    {bds: '\\p{Print}', description: '可打印字符:[\\p{Graph}\x20]'},
    {bds: '\\p{Blank}', description: '空格或制表符:[ \\t]'},
    {bds: '\\p{Cntrl}', description: '控制字符:[\x00-\x1F\x7F]'},
    {bds: '\\p{XDigit}', description: '十六进制数字:[0-9a-fA-F]'},
    {bds: '\\p{Space}', description: '空白字符:[ \\t\\n\x0B\\f\\r]'},
    {bds: '\\p{javaLowerCase}', description: '等效于 java.lang.Character.isLowerCase()'},
    {bds: '\\p{javaUpperCase}', description: '等效于 java.lang.Character.isUpperCase()'},
    {bds: '\\p{javaWhitespace}', description: '等效于 java.lang.Character.isWhitespace()'},
    {bds: '\\p{javaMirrored}', description: '等效于 java.lang.Character.isMirrored()'},
    {bds: '\\p{InGreek}', description: 'Greek å—(简单块)中的字符'},
    {bds: '\\p{Lu}', description: '大写字母(简单类别)'},
    {bds: '\\p{Sc}', description: '货币符号'},
    {bds: '\\P{InGreek}', description: '所有字符,Greek å—中的除外(否定)'},
    {bds: '[\\p{L}&&[^\\p{Lu}]]', description: '所有字母,大写字母除外(减去)'},
    {bds: '^', description: '行的开头'},
    {bds: '$', description: '行的结尾'},
    {bds: '\\b', description: '单词边界'},
    {bds: '\\B', description: '非单词边界'},
    {bds: '\\A', description: '输入的开头'},
    {bds: '\\G', description: '上一个匹配的结尾'},
    {bds: '\\Z', description: '输入的结尾,仅用于最后的结束符(如果有的话)'},
    {bds: '\\z', description: '输入的结尾'},
    {bds: 'X ?', description: 'X,一次或一次也没有'},
    {bds: 'X *', description: 'X,零次或多次'},
    {bds: 'X +', description: 'X,一次或多次'},
    {bds: 'X {n }', description: 'X,恰好 n æ¬¡'},
    {bds: 'X {n ,}', description: 'X,至少 n æ¬¡'},
    {bds: 'X {n ,m }', description: 'X,至少 n æ¬¡ï¼Œä½†æ˜¯ä¸è¶…过 m æ¬¡'},
    {bds: 'X ??', description: 'X,一次或一次也没有'},
    {bds: 'X *?', description: 'X,零次或多次'},
    {bds: 'X +?', description: 'X,一次或多次'},
    {bds: 'X {n }?', description: 'X,恰好 n æ¬¡'},
    {bds: 'X {n ,}?', description: 'X,至少 n æ¬¡'},
    {bds: 'X {n ,m }?', description: 'X,至少 n æ¬¡ï¼Œä½†æ˜¯ä¸è¶…过 m æ¬¡'},
    {bds: 'X ?+', description: 'X,一次或一次也没有'},
    {bds: 'X *+', description: 'X,零次或多次'},
    {bds: 'X ++', description: 'X,一次或多次'},
    {bds: 'X {n }+', description: 'X,恰好 n æ¬¡'},
    {bds: 'X {n ,}+', description: 'X,至少 n æ¬¡'},
    {bds: 'X {n ,m }+', description: 'X,至少 n æ¬¡ï¼Œä½†æ˜¯ä¸è¶…过 m æ¬¡'},
    {bds: 'XY', description: 'X åŽè·Ÿ Y'},
    {bds: 'X |Y', description: 'X æˆ– Y'},
    {bds: '(X )', description: 'X,作为捕获组'},
    {bds: '\\n', description: '任何匹配的 n<sup>th</sup> æ•获组'},
    {bds: '\\', description: 'Nothing,但是引用以下字符'},
    {bds: '\\Q', description: 'Nothing,但是引用所有字符,直到 \\E'},
    {bds: '\\E', description: 'Nothing,但是结束从 \\Q å¼€å§‹çš„引用'},
    {bds: '(?:X )', description: 'X,作为非捕获组'},
    {bds: '(?idmsux-idmsux)', description: 'Nothing,但是将匹配标志由 on è½¬ä¸º off'},
    {bds: '(?idmsux-idmsux:X )', description: 'X,作为带有给定标志 on - off çš„非捕获组'},
    {bds: '(?=X )', description: 'X,通过零宽度的正 lookahead'},
    {bds: '(?!X )', description: 'X,通过零宽度的负 lookahead'},
    {bds: '(?<=X )', description: 'X,通过零宽度的正 lookbehind'},
    {bds: '(?<!X )', description: 'X,通过零宽度的负 lookbehind'},
    {bds: '(?>X )', description: 'X,作为独立的非捕获组'}
      ],
      // æ–°å¢žä¸šåŠ¡ç±»åž‹
      businessData: [],
      businessOption: {
        indexClassName:"序号",
        indexLabelClassName:'序号',
        index: true,
        border: true,
        addBtn: false,
@@ -1178,7 +1293,9 @@
    },
    //验证规则检查
    rulesExamine() {
      if(this.RulesForm.expressionText.test(this.RulesForm.TestContent)){
        this.$message.success('校验成功')
      }
    },
    //点击分类注入按钮
    injectBtn(){
@@ -1273,6 +1390,16 @@
      //   console.log(res)
      // })
    },
    //组合规则
    isShowHandler(){
      if(this.CrudSelect.length>1){
        this.$message.warning('只能选择一条模板属性数据')
      }else if(this.CrudSelect.length<1){
        this.$message.warning('请选择一条模板属性数据')
      }else if(this.CrudSelect.length === 1){
       this.isShowformulaEdit=true;
      }
    },
    //全屏编辑
    fullscreenHandle(){
      if(this.crudArray.length<1){
@@ -1290,6 +1417,10 @@
      this.attrEditVisible=false;
      console.log(this.attrEditVisible)
    },
    updataFormlaContent(val){
      console.log(val)
      this.$set(this.attrRow,'componentRule',val)
    },
    // æŽ’序
    sortChange(val) {
      console.log(val)
Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -77,7 +77,7 @@
                          @select="selectHandle"
               >
            <template slot="menuLeft">
              <el-button plain size="small" type="primary" @click="FindFormVisible = true;">查询</el-button>
              <el-button plain size="small" type="primary" @click="FindeHanler">查询</el-button>
              <el-button plain size="small" type="primary" @click="TemRefresh">刷新</el-button>
                    <el-button plain size="small" type="primary" @click="TreeEdit">修改</el-button>
            <el-button plain size="small" type="primary" @click="TreeDel">删除</el-button>
@@ -206,36 +206,36 @@
  inject: [, "crudTreeData"],
  data() {
    return {
      //表格option配置项
      crudTreeOption: {
        index: true,
        border: true,
        height:180,
        selection:true,
        addBtn:this.addFlag,
        column: [
          {
            label: "模板编号",
            prop: "id"
          },
          {
            label:"模板名称",
            prop:"name"
          },
          {
            label: "模板描述",
            prop:"description"
          },
          {
            label:"版本号",
            prop:"revisionSeq"
          },
          {
            label:"状态",
            prop:"lcStatusText"
          }
        ]
      },
      // //表格option配置项
      // crudTreeOption: {
      //   index: true,
      //   border: true,
      //   height:180,
      //   selection:true,
      //   addBtn:this.addFlag,
      //   column: [
      //     {
      //       label: "模板编号",
      //       prop: "id"
      //     },
      //     {
      //       label:"模板名称",
      //       prop:"name"
      //     },
      //     {
      //       label: "模板描述",
      //       prop:"description"
      //     },
      //     {
      //       label:"版本号",
      //       prop:"revisionSeq"
      //     },
      //     {
      //       label:"状态",
      //       prop:"lcStatusText"
      //     }
      //   ]
      // },
      addFlag:false,
      // è¡¨æ ¼å½“前行id
      crudOid:"",
@@ -433,6 +433,42 @@
  mounted() {
    this.type = this.tabOption.column[0];
    this.getAttr();
    console.log('11',this.nodeClickList)
  },
  computed:{
    crudTreeOption(){
      return{
        index: true,
        indexClassName:"序号",
        indexLabelClassName:'序号',
        border: true,
        height:180,
        selection:true,
        addBtn:this.Formlist.length<=0  && this.nodeClickList != "",
        column: [
          {
            label: "模板编号",
            prop: "id"
          },
          {
            label:"模板名称",
            prop:"name"
          },
          {
            label: "模板描述",
            prop:"description"
          },
          {
            label:"版本号",
            prop:"revisionSeq"
          },
          {
            label:"状态",
            prop:"lcStatusText"
          }
        ]
      }
    }
  },
  methods: {
    //行单选事件
@@ -639,7 +675,7 @@
    async nodeClick(data) {
      //定义一个模板属性id,数据是模板管理表格里面的oid
      this.nodeClickList = data
      console.log(data.oid)
      console.log(data)
      this.ProData=[]
      try {
        await TreeObjcet(data.oid).then(res => {
@@ -827,6 +863,14 @@
        })
      })
    },
    // æŸ¥è¯¢
    FindeHanler(){
      if(this.nodeClickList != ""){
        this.FindFormVisible=true
      }else {
        this.$message.warning('请从树上选择一条数据')
      }
    },
    //克隆模板选择确定
    Clonehandler(){
      if(this.CloneSelect.length <= 0){
Source/UBCS-WEB/src/components/file/inDialog.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
<template>
  <div>
  <el-dialog :title="options.title|| '附件管理'"
             :visible.sync="visible"
             append-to-body
             class="avue-dialog avue-dialog--top"
             @close="close"
             top="0"
             :width="options.width|| '80%'">
    <fileContent
      :options="options"
    ></fileContent>
  </el-dialog>
  </div>
</template>
<script>
import fileContent from './main.vue';
export default {
  name: "inDialog",
  components: { fileContent },
  props: ["options","visible"],
  data(){
    return{
    }
  },
  computed: {
  },
  methods:{
    close(){
      this.$emit("close", false);
    }
  }
}
</script>
<style scoped>
</style>
Source/UBCS-WEB/src/components/file/inHtml.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
<template>
  <basic-container>
    <fileContent
      :options="options"
    ></fileContent>
  </basic-container>
</template>
<script>
import fileContent from './main.vue';
export default {
  name: "inHtml",
  components: { fileContent },
  props: ["options"],
  data(){
    return{
    }
  },
  computed: {
  }
}
</script>
<style scoped>
</style>
Source/UBCS-WEB/src/components/file/main.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,325 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               ref="crud"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="primary"
                   size="small"
                   plain
                   icon="el-icon-upload2"
                   @click="handleUpload">上 ä¼ 
        </el-button>
        <el-button type="primary"
                   size="small"
                   plain
                   icon="el-icon-edit"
                   @click="handleEdit">ä¿® æ”¹
        </el-button>
        <el-button type="danger"
                   size="small"
                   icon="el-icon-delete"
                   plain
                   @click="handleDelete">删 é™¤
        </el-button>
      </template>
      <template slot-scope="scope" slot="menu">
        <el-button type="text"
                   icon="el-icon-download"
                   size="small"
                   @click="handleDownload(scope.row)">下载
        </el-button>
      </template>
    </avue-crud>
    <el-dialog title="上传附件列表"
               append-to-body
               :visible.sync="attachBox"
               width="555px">
      <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-before="uploadBefore" :upload-after="uploadAfter" :upload-error="uploadError">
      </avue-form>
    </el-dialog>
  </basic-container>
</template>
<script>
import {getList, getFile,upload,update, remove,download} from "@/api/resource/file";
import {mapGetters} from "vuex";
import {dateFormat} from "@/util/date";
export default {
  props: ["options","visible"],
  data() {
    return {
      form: {},
      query: {},
      params:{},
      loading: false,
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0
      },
      attachBox: false,
      selectionList: [],
      option: {
        height: 'auto',
        calcHeight: 30,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: true,
        index: true,
        viewBtn: true,
        selection: true,
        dialogClickModal: false,
        column: [
          {
            label: "文件名称",
            prop: "name",
            search: true,
            /*formatter:function(d){
              if(this.options.hasDownloadRight != false){
                //说明有下载文件的权限,那么我们就添加一个超链接
                return ''//'<a name="filenamedownloadlink " class="layui-btn layui-btn-intable" lay-event="PREVIEW" fileoid="' + d.oid +'">' + (d.id?d.id:d.name) + '</a>';
              }else{
                return d.id || d.name;
              }
            }*/
          },
          {
            label: "文件大小",
            prop: "fileSize",
            formatter:function(d){
              if(!d.fileSize || d.fileSize == null || d.fileSize*1 == 0 || isNaN(d.fileSize*1) ){
                return "未知大小";
              }else{
                //原始大小是B
                var filesize = d.fileSize*1;
                if(filesize>1024*1024*1024*1024){
                  return parseInt(filesize/(1024*1024*1024*1024)) + "TB";
                }else if(filesize> 1024*1024*1024){
                  return parseInt(filesize/(1024*1024*1024)) + "GB";
                }else if(filesize> 1024*1024){
                  return parseInt(filesize/(1024*1024)) + "MB";
                }else if(filesize> 1024){
                  return parseInt(filesize/1024) + "KB";
                }else {
                  return filesize + "B";
                }
              }
            }
          },
          /*{
            label: "密级",
            prop: "secretGradeText"
          },
          {
            label: "文档类别",
            prop: "fileDocClassifyName"
          },*/
          {
            label: "创建者",
            prop: "creator"
          },
          {
            label: "创建时间",
            prop: "createTime"
          },
        ]
      },
      data: [{
        btmname: "fileobject",
        createTime: "2023-06-14 16:08:50.002",
        creator: "1",
        fileDocClassify: "undefined",
        fileDocClassifyName: null,
        fileExtension: "png",
        filePath: "VolumnFactoryService:/f87a4c92-ce6e-458b-aad0-0c76bd5eeb35\\54120082-76aa-4092-abbf-b13cb40606c5",
        fileSize: 858,
        id: "assignRole",
        name: "assignRole",
        nameOid: "9FF4C05D-4EFA-F00B-0080-5ABB50257D4E",
        oid: "54120082-76aa-4092-abbf-b13cb40606c5",
        ownBtmname: "wupin",
        ownbizOid: "6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9",
        owner: "1",
        secretGrade: null,
        secretGradeText: null
      }],
      attachForm: {},
      attachOption: {
        submitBtn: true,
        emptyBtn: true,
        column: [
          {
            label: '附件上传',
            prop: 'attachFile',
            type: 'upload',
            dragFile: true,
            loadText: '文件上传中,请稍等',
            span: 24,
            propsHttp: {
              res: 'data'
            },
            action: "/api/ubcs-resource/fileController/uploadFile"
          }
        ]
      }
    };
  },
  computed: {
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: false,
        editBtn: false,
        viewBtn: false,
        delBtn: this.vaildData(this.permission.attach_delete, false)
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
    }
  },
  methods: {
    setParams(){
      var params={
        ownbizOid:options.ownbizOid || '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9',
        ownbizBtm:options.ownbizBtm || 'wupin',
        fileDocClassify:options.fileDocClassify || '!=processAuditSuggest'
      }
      this.params=params;
    },
    handleUpload() {
      this.attachBox = true;
    },
    handleEdit() {
      this.attachBox = true;
    },
    uploadBefore(file, done, loading,column) {
      console.log(file,column)
      //如果你想修改file文件,由于上传的file是只读文件,必须复制新的file才可以修改名字,完后赋值到done函数里,如果不修改的话直接写done()即可
      var newFile = new File([file], '1234', { type: file.type });
      done(newFile)
      this.$message.success('上传前的方法')
    },
    uploadAfter(res, done, loading, column) {
      window.console.log(column);
      this.attachBox = false;
      this.refreshChange();
      done();
    },
    uploadError(error, column) {
      this.$message.success('上传失败回调')
      console.log(error, column)
    },
    handleDownload(row) {
      window.open(`${row.link}`);
    },
    rowDel(row) {
      this.$confirm("确定将选择文件删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          return remove(row.id);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
        });
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择至少一条数据");
        return;
      }
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          return remove(this.ids);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          this.$refs.crud.toggleSelection();
        });
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then(res => {
          this.form = res.data.data;
        });
      }
      done();
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params) {
      //this.loading = true;
      params=this.params || {}
      /*getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      });*/
    }
  }
};
</script>
<style>
</style>
Source/UBCS-WEB/src/components/refer/vciWebRefer.vue
@@ -1,7 +1,10 @@
<template>
  <vciWebReferTree v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferTree>
  <vciWebReferTable v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferTable>
  <vciWebReferDefalut v-else  @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferDefalut>
  <div v-if="display">
    <vciWebReferTree v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTree>
    <vciWebReferTable v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTable>
    <vciWebReferDefalut v-else  @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferDefalut>
  </div>
</template>
<script>
@@ -10,7 +13,7 @@
import vciWebReferDefalut from "./vciWebReferDefalut.vue";
export default {
  name: "vciWebRefer",
  props: ["referConfig","value","text"],
  props: ["referConfig","value","text","disabled","display"],
  components: {vciWebReferTree, vciWebReferTable, vciWebReferDefalut},
  data() {
    return {
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue
@@ -27,7 +27,7 @@
      </div>
    </el-dialog>
    <avue-input v-model="text" :placeholder="title" @click="visible=true"></avue-input>
    <avue-input v-model="text" :disabled="disabled" :placeholder="title" @click="!disabled && (visible=true)"></avue-input>
    <!--<avue-input-table ref="referTable"  :props="props"  :column="column" :on-load="onLoad" v-model="value"  :placeholder="title" ></avue-input-table>
  -->
  </div>
@@ -38,7 +38,7 @@
import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table";
export default {
  name: "vciWebReferDefalut",
  props:["referConfig","value","text","title"],
  props:["referConfig","value","text","title","disabled"],
  data() {
    return {
      visible: false,
@@ -180,6 +180,7 @@
              ...item,
              label: item.title,
              prop: item.field,
              formatter:item.template,
              search: true
            }
          }
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue
@@ -30,7 +30,7 @@
      </div>
    </el-dialog>
    <avue-input v-model="text" :placeholder="title" @click="visible=true"></avue-input>
    <avue-input v-model="text" :disabled="disabled" :placeholder="title" @click="!disabled && (visible=true)"></avue-input>
    <!--<avue-input-table ref="referTable"  :props="props"  :column="column" :on-load="onLoad" v-model="value"  :placeholder="title" ></avue-input-table>
  -->
  </div>
@@ -41,7 +41,7 @@
import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table";
export default {
  name: "vciWebReferTable",
  props:["referConfig","value","text","title"],
  props:["referConfig","value","text","title","disabled"],
  data() {
    return {
      visible: false,
Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
@@ -1,5 +1,5 @@
<template>
  <avue-input-tree ref="referTree" :props="props" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree>
  <avue-input-tree ref="referTree" :props="props" :disabled="disabled" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree>
</template>
<script>
@@ -8,7 +8,7 @@
export default {
  name: "vciWebReferTree",
  props:["referConfig","value","text","title"],
  props:["referConfig","value","text","title","disabled"],
  data() {
    return {
      options: this.referConfig.options,
Source/UBCS-WEB/src/components/template/SetPersonnel.vue
@@ -1,20 +1,30 @@
<template>
    <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true">
        <div>
            <el-tag v-for="tag in tags" :key="tag" closable disable-transitions effect="dark" @click="handleClickTag(tag)"
                @close="handleCloseTag(tag)">
                <span> {{ tag.name }}</span>
            </el-tag>
        </div>
    <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true" width="30%">
        <el-tag v-for="tag in tags" :key="tag" closable disable-transitions effect="Plain" size="medium"
            @click="handleClickTag(tag)" @close="handleCloseTag(tag)">
            <span> {{ tag.name }}</span>
        </el-tag>
        <el-divider v-if="tags.length !== 0"></el-divider>
        <el-form :model="saveParam" class="demo-form-inline" label-position="left" label-width="auto" :rules="rules">
            <el-form-item label="流程模板">
                <el-input placeholder="流程模板" v-model="saveParam.modelName" disabled  ></el-input>
            </el-form-item>
            <el-form-item label="流程名称" prop="processName">
                <el-input placeholder="流程名称" v-model="saveParam.processName"  >
                </el-input>
            </el-form-item>
            <el-form-item label="流程描述">
                <el-input placeholder="流程描述" type="textarea" :rows="4" v-model="saveParam.processDesc"  >
                </el-input>
            </el-form-item>
        </el-form>
        <el-divider></el-divider>
        <div class="btns-icon">
            <el-button type="primary" icon="el-icon-star-off" @click="handleCollect"></el-button>
            <!-- <el-button type="primary" icon="el-icon-refresh" ></el-button> -->
            <el-button icon="el-icon-star-off" circle @click="handleCollect"></el-button>
        </div>
        <el-form :model="saveParam" class="demo-form-inline" label-position="left">
        <el-form :model="collectParam" class="demo-form-inline" label-position="left" label-width="auto">
            <el-form-item :label="item.taskName" v-for="(item, index) in initFrom" :key="index">
                <el-select style="width: 50%;" v-model="saveParam.flowTaskUsers[index]['userId']"
                <el-select style="width: 80%;"  filterable v-model="collectParam.flowTaskUsers[index]['userId']"
                    :placeholder="item.taskName" @change="handleSelect($event, index)">
                    <el-option :label="key.userNames" :value="key.userId" v-for="(key, keyi) in typeName"
                        :key="keyi"></el-option>
@@ -40,18 +50,26 @@
        // æ ‡é¢˜
        title: {
            typeof: String,
            default: '人员设置'
            default: '流程审批'
        },
        // æ¨¡æ¿id
        code: {
            typeof: String,
            default: ''
        // å‚数:选择的id,多个以数组方式传递:['id','id'],模板id,模板用途,流程名字,流程模板
        parameter: {
            typeof: Object,
            default: () => { }
        },
        // æ¨¡æ¿ç”¨é€”
        type: {
            typeof: String,
            default: ''
        parameterKeys: {
            typeof: Object,
            default: () => {
                return {
                    ids: 'ids',
                    flowName: 'flowName',
                    flowTemplate: 'flowTemplate',
                    code: 'code',
                    type: 'type'
                }
            }
        }
    },
    watch: {
        visible(n) {
@@ -64,28 +82,45 @@
    data() {
        return {
            dialogVisible: this.visible,
            isCollent: false,
            initFrom: [],
            tags: [],
            typeName: [],
            saveParam: {},
            collectParam: {},
            saveParam: this.saveParam(),
            users: [],
            rules: {
                processName: [
                    { required: true, message: '模板名称不能为空', trigger: 'blur' },
                    { min: 1, max: 20, message: '长度在 3 åˆ° 20 ä¸ªå­—符', trigger: 'blur' }
                ]
            }
        }
    },
    mounted() {
        this.apiInit()
        this.apiDict()
    },
    methods: {
        saveParam() {
            return {
                modelName: this.parameter[this.parameterKeys.flowName],
                processName: this.parameter[this.parameterKeys.flowTemplate],
                topName: this.title,
                ids: this.parameter[this.parameterKeys.ids],
            }
        },
        async apiInit() {
            const response = await personnelInit({ type: this.type, templateId: this.code })
            const response = await personnelInit({ type: this.parameter[this.parameterKeys.type], templateId: this.parameter[this.parameterKeys.code] })
            if (response.status === 200) {
                console.log(response)
                this.initFrom = response.data.data.user
                this.tags = response.data.data.collect
                const { modelKey, templateId } = response.data.data.flow
                let flowTaskUsers = response.data.data.user
                this.saveParam = { modelKey, templateId, flowTaskUsers: flowTaskUsers }
                this.collectParam = { modelKey, templateId, flowTaskUsers: flowTaskUsers }
                this.saveParam = { ...this.saveParam, modelKey, templateId }
                this.handleClickTag(this.tags[0])
            }
        },
@@ -108,10 +143,10 @@
                cancelButtonText: '取消',
            }).then(async ({ value }) => {
                console.log(this.users)
                this.saveParam.flowTaskUsers = this.users
                this.saveParam = { ...this.saveParam, name: value }
                console.log(this.saveParam)
                const response = await personnelCollect(this.saveParam)
                this.collectParam.flowTaskUsers = this.users
                this.collectParam = { ...this.collectParam, name: value }
                console.log(this.collectParam)
                const response = await personnelCollect(this.collectParam)
                if (response.status === 200) {
                    this.$nextTick(() => {
                        this.apiInit()
@@ -127,6 +162,7 @@
            if (response.status === 200) {
                console.log(response)
                this.apiInit()
                this.isCollent = true
                this.$message({
                    type: 'success',
                    message: response.data.msg
@@ -135,14 +171,13 @@
        },
        async apiSave() {
            try {
                const { modelKey, templateId } = this.saveParam
                const response = await personnelSave({ modelKey, templateId })
                const response = await personnelSave(this.saveParam)
                if (response.status === 200) {
                    console.log(response)
                    this.$message({
                    type: 'success',
                    message: response.data.msg
                });
                        type: 'success',
                        message: response.data.msg
                    });
                    this.done()
                }
            } catch {
@@ -152,7 +187,7 @@
        handleClickTag(event) {
            console.log(event)
            const flowTaskUsers = event.flowTaskUsers
            this.saveParam.flowTaskUsers = flowTaskUsers.map(item => {
            this.collectParam.flowTaskUsers = flowTaskUsers.map(item => {
                const { taskId, taskName, userId, userName } = item
                return { taskId, taskName, userId, userName }
            })
@@ -164,7 +199,7 @@
        handleSelect(event, index) {
            const res = this.typeName.find(item => item.userId === event)
            const { userName } = res
            let users = { ... this.saveParam.flowTaskUsers[index], userName }
            let users = { ... this.collectParam.flowTaskUsers[index], userName }
            console.log(users)
            this.users[index] = users
        },
@@ -175,7 +210,6 @@
            this.done()
        },
        handleConfirm() {
            console.log(this.users)
            console.log(this.saveParam)
            this.apiSave()
        }
Source/UBCS-WEB/src/components/template/Stage.vue
@@ -8,7 +8,7 @@
                    @click="handleMaintenance(row, index)">维护</el-button>
            </template>
        </avue-crud>
        <el-dialog title="模板阶段" width="50%" append-to-body="true" :visible.sync="dialogNode">
        <el-dialog title="模板阶段" width="50%"  append-to-body="true" :visible.sync="dialogNode">
            <avue-crud ref="crud" :table-loading="loading" :data="stageData" :option="stageOption" @on-load="getStagelist"
                @row-click="handleRowStageClick">
                <template slot-scope="{type,size,row,index}" slot="menu">
@@ -106,6 +106,7 @@
            },
            stageOption: {
                ...options,
              height:620,
                column: [
                    { label: '阶段编号', prop: 'taskId' },
                    { label: '阶段名称', prop: 'taskName' },
Source/UBCS-WEB/src/views/MasterData/FormTempalteTest.vue
@@ -1,50 +1,60 @@
<template>
  <div>
    <el-button @click="visible = true">测试</el-button>
    <el-button @click="visible1 = true">相似项查询</el-button>
    <FormTemplateDialog
      :visible.sync="visible"
      :type="this.type"
      :templateOid="this.templateOid"
      :codeClassifyOid="this.codeClassifyOid"
      :codeRuleOid="this.codeRuleOid"
      :disabledProp="disabledProp"
      :rowOid="rowOid"
      @submit="submit"
    ></FormTemplateDialog>
    <ResembleQueryDialog
      :visible.sync="visible1"
      :type="this.type"
      :templateOid="this.templateOid"
      :codeClassifyOid="this.codeClassifyOid"
      :codeRuleOid="this.codeRuleOid"
    ></ResembleQueryDialog>
  </div>
</template>
<script>
import ResembleQueryDialog from '@/components/FormTemplate/ResembleQueryDialog.vue';
export default {
  name: "FormTempalteTest",
  components: { ResembleQueryDialog },
  data() {
    return {
      visible: false,
      visible1: false,
      // é»˜è®¤ç¦ç”¨çš„表元素
      disabledProp: ["id", 'lcstatus'],
      // è¡¨å•类型
      type: "add",
      templateOid: "A12826E4-2B66-6D56-DE30-92BB1D7F607F",
      codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
      codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
      rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9'
    };
  },
  methods: {
    submit(data) {
      console.log(data);
    }
  }
};
</script>
<template>
  <div>
    <el-button @click="visible = true">测试</el-button>
    <el-button @click="visible1 = true">相似项查询</el-button>
    <el-button @click="visible2 = true">附件管理dialog</el-button>
    <FormTemplateDialog
      :visible.sync="visible"
      :type="this.type"
      :templateOid="this.templateOid"
      :codeClassifyOid="this.codeClassifyOid"
      :codeRuleOid="this.codeRuleOid"
      :disabledProp="disabledProp"
      :rowOid="rowOid"
      @submit="submit"
    ></FormTemplateDialog>
    <ResembleQueryDialog
      :visible.sync="visible1"
      :type="this.type"
      :templateOid="this.templateOid"
      :codeClassifyOid="this.codeClassifyOid"
      :codeRuleOid="this.codeRuleOid"
    ></ResembleQueryDialog>
    <fileInHtml :options="{}"></fileInHtml>
    <fileinDialog
      :visible="visible2"
      :options="{}"
      @close="visible2=false"
    ></fileinDialog>
  </div>
</template>
<script>
import ResembleQueryDialog from '@/components/FormTemplate/ResembleQueryDialog.vue';
import fileInHtml from '@/components/file/inHtml.vue';
import fileinDialog from '@/components/file/inDialog.vue';
export default {
  name: "FormTempalteTest",
  components: { ResembleQueryDialog ,fileInHtml ,fileinDialog},
  data() {
    return {
      visible: false,
      visible1: false,
      visible2: false,
      // é»˜è®¤ç¦ç”¨çš„表元素
      disabledProp: ["id", 'lcstatus'],
      // è¡¨å•类型
      type: "add",
      templateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A",
      codeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96",
      codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
      rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9'
    };
  },
  methods: {
    submit(data) {
      console.log(data);
    }
  }
};
</script>
Source/UBCS-WEB/src/views/MasterData/items.vue
@@ -7,10 +7,10 @@
                       @coderuleoid="coderuleoidList"
                       :pageSize="this.pageSize"
                       :currentPage="this.currentPage"
                       :templateOid="this.templateOid"
                       @tableDataArray="tableDataArrays"
                       @tableHeadDataFateher="tableHeadDatas"
                       @total="totals"
                       @nodeClick="nodeClick"
                        ></master-tree>
        </basic-container>
      </el-aside>
@@ -21,10 +21,11 @@
                 :coderuleoid="this.coderuleoid"
                 @pageSize="pageSizes"
                 @currentPage="currentPages"
                 @templateOid="templateOids"
                 :tableDataArray="tableDataArray"
                 :total="this.total"
                 :tableHeadDataFateher="this.tableHeadDataFateher"
                 :isLoading="isLoading"
                 :templateOid="templateOid"
      ></TableCrud>
      </el-main>
    </el-container>
@@ -49,7 +50,9 @@
      templateOid:"",
      tableDataArray:[],
      tableHeadDataFateher:[],
      total:""
      total:"",
      isLoading: false,
    }
  },
  created() {
@@ -68,9 +71,6 @@
    currentPages(val){
      this.currentPage=val
    },
    templateOids(val){
      this.templateOid=val
    },
    tableDataArrays(val){
      this.tableDataArray=val
    },
@@ -79,7 +79,15 @@
    },
    tableHeadDatas(val){
      this.tableHeadDataFateher=val
    }
    },
    nodeClick(val){
      this.templateOid=val;
      console.log('val',val)
      this.isLoading=true;
      setTimeout(() => {
        this.isLoading = false;
      }, 2000);
}
  }
}
</script>
Source/UBCS-WEB/src/views/authority/apiscope.vue
@@ -1,24 +1,25 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :permission="permissionList"
               :before-open="beforeOpen"
               @row-del="rowDel"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @search-change="searchChange"
               @search-reset="searchReset"
               @row-click="clickRowChange"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad"
               @tree-load="treeLoad">
      :table-loading="loading"
      :page.sync="page"
      :data="data"
      ref="crud"
      v-model="form"
      :permission="permissionList"
      :before-open="beforeOpen"
      @row-del="rowDel"
      @row-update="rowUpdate"
      @row-save="rowSave"
      @search-change="searchChange"
      @search-reset="searchReset"
      @row-click="clickRowChange"
      @selection-change="selectionChange"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
      @tree-load="treeLoad">
      <template slot-scope="{row}" slot="menu">
        <el-button type="text"
                   icon="el-icon-setting"
@@ -114,7 +115,7 @@
        option: {
          lazy: true,
          tip: false,
          simplePage: true,
          //simplePage: true,
          searchShow: true,
          searchMenuSpan: 6,
          dialogWidth: "60%",
@@ -514,8 +515,10 @@
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
          this.data = res.data.data;
        getLazyMenuList(this.parentId, Object.assign(params, this.query), page.currentPage, page.pageSize).then(res => {
          const data = res.data.data;
          this.data = data.records;
          this.page.total = data.total;
          this.loading = false;
          this.selectionClear();
        });
@@ -523,7 +526,7 @@
      treeLoad(tree, treeNode, resolve) {
        const parentId = tree.id;
        getLazyMenuList(parentId).then(res => {
          resolve(res.data.data);
          resolve(res.data.data.records);
        });
      },
      // æ•°æ®æƒé™æ¨¡å—
Source/UBCS-WEB/src/views/authority/datascope.vue
@@ -3,6 +3,7 @@
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               ref="crud"
               v-model="form"
               :permission="permissionList"
@@ -118,7 +119,7 @@
        option: {
          lazy: true,
          tip: false,
          simplePage: true,
          // simplePage: true,
          searchShow: true,
          searchMenuSpan: 6,
          dialogWidth: "60%",
@@ -598,8 +599,10 @@
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
          this.data = res.data.data;
        getLazyMenuList(this.parentId, Object.assign(params, this.query), page.currentPage, page.pageSize).then(res => {
          const data = res.data.data;
          this.data = data.records;
          this.page.total = data.total;
          this.loading = false;
          this.selectionClear();
        });
@@ -607,7 +610,7 @@
      treeLoad(tree, treeNode, resolve) {
        const parentId = tree.id;
        getLazyMenuList(parentId).then(res => {
          resolve(res.data.data);
          resolve(res.data.data.records);
        });
      },
      // æ•°æ®æƒé™æ¨¡å—
Source/UBCS-WEB/src/views/authority/role.vue
@@ -1,23 +1,24 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               ref="crud"
               v-model="form"
               :permission="permissionList"
               :before-open="beforeOpen"
               @row-del="rowDel"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @search-change="searchChange"
               @search-reset="searchReset"
               @row-click="clickRowChange"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      :table-loading="loading"
      :data="data"
      ref="crud"
      :page.sync="page"
      v-model="form"
      :permission="permissionList"
      :before-open="beforeOpen"
      @row-del="rowDel"
      @row-update="rowUpdate"
      @row-save="rowSave"
      @search-change="searchChange"
      @search-reset="searchReset"
      @row-click="clickRowChange"
      @selection-change="selectionChange"
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad">
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
@@ -80,7 +81,7 @@
</template>
<script>
  import {add, getList, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role";
  import {add, getPage, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role";
  import {mapGetters} from "vuex";
  import website from '@/config/website';
@@ -111,7 +112,7 @@
        option: {
          height: "auto",
          tip: false,
          simplePage: true,
          // simplePage: true,
          searchShow: true,
          searchMenuSpan: 6,
          tree: true,
@@ -381,8 +382,10 @@
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          this.data = res.data.data;
        getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.data = data.records;
          this.page.total = data.total;
          this.loading = false;
          this.selectionClear();
        });
Source/UBCS-WEB/src/views/code/code.vue
@@ -300,6 +300,7 @@
            size="small"
            icon="el-icon-search"
            plain
            :disabled="selectionList.length <= 0"
            @click="openAdvancedQuery('codeBasicSec')">
            é«˜çº§æŸ¥è¯¢
        </el-button>
@@ -527,7 +528,7 @@
                </el-select>
              </el-form-item>
              <el-form-item label="补位时的字符:" :label-width="rightFormLabelWidth">
                <el-select v-model="form.codeFillSeparatorSelect" @blur="inputSelectBlur" filterable placeholder="请选择" :disabled="basicSecOnlyRead">
                <el-select v-model="form.codeFillSeparator" @blur="inputSelectBlur" filterable placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in enumParam.codeFillSeparator"
                    :key="item.itemValue"
@@ -664,7 +665,7 @@
                </el-select>
              </el-form-item>
              <el-form-item label="补位时的字符:" :label-width="rightFormLabelWidth">
                <el-select v-model="form.codeFillSeparatorSelect" filterable @blur="inputSelectBlur" placeholder="请选择" :disabled="basicSecOnlyRead">
                <el-select v-model="form.codeFillSeparator" filterable @blur="inputSelectBlur" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in enumParam.codeFillSeparator"
                    :key="item.itemValue"
@@ -1104,7 +1105,6 @@
            //console.log(conditionMaps);
          }
        },
        /* å…¬å¼ç¼–辑框内容改变,子组件编辑完公式之后内容回显时调用 */
        updateFormulaContent(content){
          this.form.getValueClass = content;
@@ -1177,7 +1177,8 @@
          let parentClsParam = this.parentClsfyParams;
          parentClsParam.classifyDialogLoading = true;
          let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid;
          let conditionMaps = this.paramsToConditionMa({"pkCodeRule":oid});
          let conditionMaps = {};
          conditionMaps['conditionMap[pkCodeRule]'] = oid;
          refDataGridClassifySec(
            page.currentPage, 
            page.pageSize, 
@@ -1667,7 +1668,8 @@
              // å…³é—­å¯¹è¯æ¡†
              this.addBasicCodeSettingBox = false
            }
            // ç‚¹å‡»æ–°å¢žåŸºç¡€ç æ®µ,关闭窗口之后触发重新加载
            this.loadBasic(this.selectionList[0]);
          }else{
            editSave(this.form).then(() => {
               // å…³é—­å¯¹è¯æ¡†
@@ -1679,9 +1681,8 @@
              }, error => {
                window.console.log(error);
            });
            this.loadBasic(this.selectionList[0]);
          }
          // ç‚¹å‡»æ–°å¢žåŸºç¡€ç æ®µ,关闭窗口之后触发重新加载
          this.loadBasic(this.selectionList[0]);
        },
        // å› ä¸ºelementui的表单校验设置不上所以采用判断的方式来做表单检验方式
        checkForm(){
@@ -1755,7 +1756,7 @@
              this.$message.warning('(编码补位方式)'+tipsMsg);
              return false;
            }
            if(form.codeFillType != '不补位' && form.codeFillSeparatorSelect == ''){
            if(form.codeFillType != '不补位' && form.codeFillSeparator == ''){
              this.$message.warning('当补位方式为左补位或者右补位的时候,补位字符不能为空');
              return false;
            }
@@ -1779,11 +1780,10 @@
              this.$refs.codeFillLimit.$el.querySelector('input').focus();
              return false;
            }
            if(form.codeFillFlag == ''){
              this.$message.warning('(流水是否补码)'+tipsMsg);
              this.$refs.switch.$el.querySelector('input').focus();
              return false;
            }
            // if(form.codeFillFlag == '' || ){
            //   this.$message.warning('(流水是否补码)'+tipsMsg);
            //   return false;
            // }
          }else if(this.form.secType==='codelevelsec'){
            //层级码段
            if(form.codeLevelType == ''){
@@ -1851,7 +1851,8 @@
              this.$message.warning('(编码补位方式)'+tipsMsg);
              return false;
            }
            if(form.codeFillType != '不补位' && form.codeFillSeparatorSelect == ''){
            // console.log(form);
            if(form.codeFillType != 'code_fill_none' && form.codeFillSeparator == ''){
              this.$message.warning('当补位方式为左补位或者右补位的时候,补位字符不能为空');
              return false;
            }
@@ -1899,9 +1900,11 @@
          }
          // console.log(row.oid);
          //存储当前关联的编码规则相关信息
          this.currentCodeRuleOid = row.oid;
          this.currentRuleLcStatus = row.lcStatus;
          this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false);
          if(row!='' || row!=null){
            this.currentCodeRuleOid = row.oid;
            this.currentRuleLcStatus = row.lcStatus;
            this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false);
          }
        },
        // å‘送加载基础码段的请求
        sendGridCodeBasicSec(condition,isAdancedQuery/** æ˜¯å¦é«˜çº§æŸ¥è¯¢ */){
@@ -1912,11 +1915,11 @@
          let conditionMaps = {};
          if(condition && !isAdancedQuery){
            Object.keys(condition).forEach(key=>{
              conditionMaps['conditionMap[pl_code_basicsec.'+key+']'] = condition[key].trim();
              conditionMaps['conditionMap['+key+']'] = condition[key].trim();
            });
          }
          if(isAdancedQuery){
            condition['conditionMap[pl_code_basicsec.pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == ''
            condition['conditionMap[pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == ''
            ? this.selectionList[0].oid:this.currentCodeRuleOid;
          }
          gridCodeBasicSec(1, -1,isAdancedQuery ? condition:conditionMaps).then(res => {
@@ -2001,7 +2004,7 @@
        },
        // åŸºç¡€ç æ®µåˆ·æ–°æ—¶æŸ¥è¯¢
        refreshChangeBasicSec(){
          this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
          this.loadBasic(this.selectionList.at(-1));
        },
        // æ“ä½œåŸºç¡€ç æ®µä¸­æœç´¢æ¸…空等按钮的显示/隐藏
        hideBasicTable(hideBoolean){
@@ -2009,18 +2012,16 @@
          this.$refs.crudBasic.option.columnBtn = hideBoolean;
          this.$refs.crudBasic.option.column[0].search = hideBoolean;
          this.$refs.crudBasic.option.column[1].search = hideBoolean;
          if(!hideBoolean){
            this.selectionList = [];
            this.basicData = [];
          }
        },
        /** ç¼–码规则相关方法 */
        // æ‰“开高级查询窗口
        openAdvancedQuery(condition){
          // MasterTable({
          //   codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
          //   functionId: 5,
          // }).then(res=>{
          //   console.log(res.data.tableDefineVO.seniorQueryColumns);
          // })
          if(condition=='codeRule'){
            this.advancedQueryParam.options = [
              {
@@ -2065,22 +2066,22 @@
                data: [],
                title: '码段编号',
                fieldType: 'text',
                queryField: 'pl_code_basicsec.id',
                queryField: 'id',
              },{
                data: [],
                title: '码段名称',
                fieldType: 'text',
                queryField: 'pl_code_basicsec.name',
                queryField: 'name',
              },{
                data: [],
                title: '描述',
                fieldType: 'text',
                queryField: 'pl_code_basicsec.description',
                queryField: 'description',
              },{
                data: [],
                title: '码段类型',
                fieldType: 'combox',
                queryField: 'pl_code_basicsec.secType',
                queryField: 'secType',
                comboxKey: 'codeSecType',
              }
            ]
@@ -2112,17 +2113,6 @@
        // åˆ·æ–°ä½¿ç”¨èŒƒå›´åˆ—表
        refreshUseRangeChange(){
          this.getRangeCodeList();
        },
        // å•击编码规则实现行选择
        codeRuleRowClick (row) {
          // è¿™å„¿åº”该可以不要,因为toggleRowSelection也会触发行选择时间
          this.selectionList = row;
          this.$refs.crud.toggleSelection();
          this.$refs.crud.setCurrentRow(row);
          this.$refs.crud.toggleRowSelection(row); //选中当前行
          if(row!=''){
            this.loadBasic(row);
          }
        },
        // å¯ç”¨ä¸Žåœç”¨
        enableOrDeactivatse(oId,update){
@@ -2220,7 +2210,7 @@
          this.selectionOtherCloneCodeBasicList = list;
          this.$refs.crudCloneCodeBasicOther.setCurrentRow(this.selectionOtherCloneCodeBasicList[list.length-1]);
        },
         // ä»Žå…¶ä»–编码规则中克隆码段信息
        // ä»Žå…¶ä»–编码规则中克隆码段信息
        saveOtherCodeBasic(){
          let oid = this.selectionList[0].oid;
          let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
@@ -2238,7 +2228,7 @@
          //console.log(res);
          let oidArr = [];
          fromDialogPkCodebasic.forEach(ele => {
            oidArr.push(ele.id);
            oidArr.push(ele.oid);
          });
          let data = {
            "pkCodeRule": oid,
@@ -2360,7 +2350,7 @@
          let requestData = {};
          if(params){
            Object.keys(params).forEach(key=>{
              requestData["conditionMap"+'['+key+']'] = params[key].trim();
              requestData["conditionMap"+'['+key+'_like]'] = params[key].trim();
            });
          }
          this.query = requestData;
@@ -2370,17 +2360,23 @@
        // ç¼–码规则当前选中行变化的时候触发
        selectionChange(list) {
          this.selectionList = list;
          this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
          //当前选中行为空的时候就将码段管理表格数据置空,并禁用相关功能
          if(list == ''){
            this.basicData = [];
          if(this.selectionList.length <= 0){
            this.hideBasicTable(false);
          }
          if(this.selectionList.length > 0){
          if (this.selectionList.length > 0) {
            this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
            this.currentCodeRuleOid = this.selectionList[list.length-1].oid;
            this.currentRuleLcStatus = this.selectionList[list.length-1].lcStatus;
            this.loadBasic(this.selectionList[list.length-1]);
          }
        },
        // å•击编码规则实现行选择
        codeRuleRowClick (row) {
          // console.log(this.currentRuleLcStatus);
          this.$refs.crud.toggleSelection();
          this.$refs.crud.toggleRowSelection(row); //选中当前行
        },
        selectionClear() {
          this.selectionList = [];
@@ -2410,8 +2406,6 @@
            // æŸ¥è¯¢çš„值为空时,要将码段管理相关的内容禁用
            if(data.records.length <= 0) {
              this.hideBasicTable(false);
              this.selectionList = [];
              this.basicData = [];
              return;
            }
            this.loadBasic(this.data[0])
@@ -2507,7 +2501,7 @@
        // è¡¥ä½æ—¶çš„字符,实现可输可选
        inputSelectBlur(e){
          if (e.target.value) {  
            this.form.codeFillSeparatorSelect = e.target.value;
            this.form.codeFillSeparator = e.target.value;
          }
        },
        // ç æ®µç±»åž‹æ”¹å˜æ—¶ï¼Œå¢žåŠ å¯¹åº”çš„form表单中的属性
@@ -2568,8 +2562,8 @@
              serialStart: row!=null&&row.serialStart != '' ? row.serialStart:1,  //流水号起始值
              serialStep: row!=null&&row.serialStep != '' ? row.serialStep:1,   //流水的步长
              codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_left', //编码补位方式
              codeFillSeparatorSelect: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparatorSelect:0,    //补位时的字符,选中的下拉框的下标
              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:0,          //补位时的字符
              // codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0,    //补位时的字符,选中的下拉框的下标
              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'0',          //补位时的字符
              codeFillLength: row!=null&&row.codeFillLength != '' ? row.codeFillLength:'',              //填充长度
              codeFillLimit: row!=null&&row.codeFillLimit != '' ? row.codeFillLimit:'',               //流水上限
              codeFillFlag: row!=null&&row.codeFillFlag != '' ? row.codeFillFlag=='true' ?  true:false :false,      //流水是否补码
@@ -2617,8 +2611,8 @@
            this.form = Object.assign({}, this.form,{
              codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'',             //码段的长度
              codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_left', //编码部位方式,枚举查询
              codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0,  //选中的补位时的字符的下标
              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'', //补位时的字符,可输可选查询
              // codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0,  //选中的补位时的字符的下标
              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'0', //补位时的字符,可输可选查询
            });
            this.loadCodeFillType();
            this.loadCodeFillSeparator();
Source/UBCS-WEB/src/views/flow/flowPath.vue
@@ -3,7 +3,7 @@
        <el-button @click="outerVisible = true">流程测试</el-button>
        <el-button @click="handleTable">人员设置</el-button>
        <flow-business :visible.sync="outerVisible"></flow-business>
       <set-personnel :visible.sync="visibleFlow" code="8b5e2017-990f-454a-9c39-4c4eeeb57553" type="PUBLIC"></set-personnel>
       <set-personnel :visible.sync="visibleFlow" :parameter="parameter" :parameter-keys="props" ></set-personnel>
    </div>
</template>
@@ -19,7 +19,20 @@
        return {
            outerVisible: false,
            visibleFlow: false,
            parameter:{
                ids:['0000','22222222'],
                code:'8b5e2017-990f-454a-9c39-4c4eeeb57553',
                type:'PUBLIC',
                name:'模板name',
                template:'模板template'
            },
            props:{
                flowName:'name',
                flowTemplate:'template',
                type:'type',
                ids:'ids',
                code:'code'
            }
        }
    },
    methods: {
Source/UBCS-WEB/src/views/omd/enum.vue
@@ -4,7 +4,7 @@
      :option="optionParent"
      :table-loading="loading"
      :data="dataParent"
      :page="pageParent"
      :page.sync="pageParent"
      ref="crud"
      v-model="formParent"
      :permission="permissionList"
Source/UBCS-WEB/src/views/system/PasswordManagement/passwords.vue
@@ -33,7 +33,8 @@
  // getOnesearch,
  getadd,
  getupdata,
  getremove
  getremove,
  combination
} from "@/api/system/passwords";
export default {
  name: "passwords.vue",
@@ -189,24 +190,12 @@
              message: "请选择组合方法",
              trigger: "blur"
            }],
            dicData: [
              {
                label: "数字",
                value: '1638024706425188354'
              },
              {
                label: "符号",
                value: '1638097837516926977'
              },
              {
                label: "小写字母",
                value: '1638097772983365634'
              },
              {
                label: "大写字母",
                value: '1638097733707902977'
              },
            ],
            dicUrl: '/api/ubcs-system/combination/select',
            dicMethod: 'get',
            props: {
              value: "ID",
              label: "NAME",
            },
          },
          {
            label: '必填种类',
@@ -222,22 +211,22 @@
            }],
            dicData:[{
              label:'1种',
              value:0,
              value:1,
              disabled:false
              },
              {
                label:'2种',
                value:1,
                disabled:false
              },
              {
                label:'3种',
                value:2,
                disabled:false
              },
              {
                label:'4种',
                label:'3种',
                value:3,
                disabled:false
              },
              {
                label:'4种',
                value:4,
                disabled:false
              }
            ]
@@ -334,6 +323,9 @@
  },
  created() {
    this.onLoad()
    combination().then(res=>{
      console.log("111",res)
    })
  },
  mount() {
  },
@@ -497,9 +489,8 @@
        });
        done(row)
        this.onLoad()
        console.log(res)
      }).catch((res)=>{
        console.log(res)
        this.$message.warning(res)
      })
    },
    rowEdit(row){
@@ -544,8 +535,8 @@
        // this.loading = false;
        // this.selectionClear();
        console.log(res)
        this.page.total=res.data.data.totalElements
        this.data=res.data.data.content
        this.page.total=res.data.data.total
        this.data=res.data.data.records
      });
    }
  }
@@ -553,5 +544,5 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
</style>
Source/UBCS-WEB/src/views/system/dept.vue
@@ -1,6 +1,7 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :page.sync="page"
      :table-loading="loading"
      :data="data"
      ref="crud"
@@ -75,7 +76,9 @@
        option: {
          lazy: true,
          tip: false,
          simplePage: true,
          height:'auto',
          maxHeight:600,
          // simplePage: true,
          searchShow: true,
          searchMenuSpan: 6,
          tree: true,
@@ -352,8 +355,9 @@
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
          this.data = res.data.data;
        getLazyList(this.parentId,Object.assign(params, this.query),this.page.currentPage, this.page.pageSize).then(res => {
          this.data = res.data.data.records;
          this.page.total=res.data.data.total
          this.loading = false;
          this.selectionClear();
        });
@@ -361,7 +365,7 @@
      treeLoad(tree, treeNode, resolve) {
        const parentId = tree.id;
        getLazyList(parentId).then(res => {
          resolve(res.data.data);
          resolve(res.data.data.records);
        });
      }
    }
Source/UBCS-WEB/src/views/system/tenant.vue
@@ -27,14 +27,6 @@
                   plain
                   @click="handleDelete">删 é™¤
        </el-button>
        <el-tooltip class="item" effect="dark" content="给租户配置账号额度、过期时间等授权信息" placement="top">
          <el-button size="small"
                     plain
                     v-if="userInfo.role_name.includes('administrator')"
                     icon="el-icon-setting"
                     @click="handleSetting">授权配置
          </el-button>
        </el-tooltip>
        <el-tooltip class="item" effect="dark" content="给租户配置独立数据源以实现数据库隔离" placement="top">
          <el-button size="small"
                     plain
@@ -361,7 +353,7 @@
          message: "操作成功!"
        });
        done();
        console.log(done)
        // console.log(done)
      }, error => {
        window.console.log(error);
        loading();
Source/UBCS-WEB/src/views/system/user.vue
@@ -152,7 +152,6 @@
              :value="item.id"
              class="seloption"
              >
            </el-option>
          </el-select>
            <span slot="footer" class="dialog-footer">
@@ -1137,8 +1136,7 @@
  overflow: scroll;
}
.selects{
  width: 400px;
  margin-left: 92px;
  width: 100%;
}
.seloption{
  margin-left: 10px;
Source/UBCS-WEB/vue.config.js
@@ -26,7 +26,8 @@
    proxy: {
      '/api': {
        //本地服务接口地址
        //  target: 'http://localhost:37000',
        target: 'http://localhost:37000',
        // 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',
@@ -34,8 +35,9 @@
          // target: 'http://192.168.1.104:37000',
        // target: 'http://192.168.1.63:37000',
        //target: 'http://192.168.3.7:37000',
        target: 'http://dev.vci-tech.com:37000',
        // target: 'http://dev.vci-tech.com:37000',
        //target: 'http://192.168.1.51:37000/',
        // target:'http://192.168.1.104:37000',
        //远程演示服务地址,可用于直接启动项目
        // target: 'https://saber.bladex.vip/api',
        ws: true,
Source/UBCS/ubcs-ops-api/ubcs-resource-api/src/main/java/com/vci/ubcs/resource/dto/FileObjectDTO.java
@@ -1,7 +1,6 @@
package com.vci.ubcs.resource.dto;
import com.vci.ubcs.resource.entity.FileObject;
import com.vci.ubcs.starter.web.pagemodel.BaseModelVO;
import lombok.Data;
/**
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeImportResultVO.java
@@ -1,6 +1,8 @@
package com.vci.ubcs.code.vo.pagemodel;
import com.vci.ubcs.starter.revision.model.BaseModel;
import java.util.*;
/**
@@ -28,7 +30,10 @@
     * å…³é”®å±žæ€§æ ¡éªŒåŽï¼Œé‡å¤çš„行号
     */
    private Set<String> keyAttrRepeatRowIndexList  = new HashSet<>();
    /***
     * æ ¹æ®å…³é”®ç†Ÿæ‚‰æŸ¥è¯¢çš„重复的数据对象
     */
    private Map<String,  List<BaseModel>> indexTODataMap=new HashMap<>();
    /***
     * æ ¹æ®å…³é”®ç†Ÿæ‚‰æŸ¥è¯¢çš„重复的数据对象
     */
@@ -89,7 +94,14 @@
        this.selfRepeatRowIndexList = selfRepeatRowIndexList;
    }
    /*public Map<String,List<ClientBusinessObject>> getIndexTODataMap() {
    public Map<String, List<BaseModel>> getIndexTODataMap() {
        return indexTODataMap;
    }
    public void setIndexTODataMap(Map<String, List<BaseModel>> indexTODataMap) {
        this.indexTODataMap = indexTODataMap;
    }
    /*public Map<String,List<ClientBusinessObject>> getIndexTODataMap() {
        return indexTODataMap;
    }
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeImportTemplateVO.java
@@ -12,11 +12,13 @@
 */
@Data
public class CodeImportTemplateVO {
    private List<ColumnVO> cloNamesList=new ArrayList<>();
    private CodeClassifyTemplateVO codeClassifyTemplateVO;
    private CodeClassifyVO codeClassifyVO;
    private boolean root;
    private String codeClassifyOid;
    private String codeTemplateOid;
    private String codeRuleOid;
    private List<ColumnVO> cloNamesList=new ArrayList<>();
    private CodeRuleVO codeRuleVO;
    private CodeClassifyTemplateVO codeClassifyTemplateVO;
    private CodeClassifyVO codeClassifyVO;
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/CodeImprotDataVO.java
@@ -49,7 +49,7 @@
    private List<Map<String,String>> datas = new ArrayList<>();
    private CodeClassifyTemplateVO codeClstemplateVO;
    private CodeClassifyVO codeClassifyVO;
    private CodeRuleVO codeRuleVO;
    public CodeClassifyTemplateVO getCodeClassifyTemplateVO() {
        return codeClstemplateVO;
    }
@@ -116,18 +116,35 @@
        this.fields = fields;
    }
    @Override
    public String toString() {
        return "CodeImprotDataVO{" +
                "rowIndex='" + rowIndex + '\'' +
                ", codeClassifyOid='" + codeClassifyOid + '\'' +
                ", templateOid='" + templateOid + '\'' +
                ", codeRuleOid='" + codeRuleOid + '\'' +
                ", fields=" + fields +
                ", colNames=" + colNames +
                ", datas=" + datas +
                ", codeClstemplateVO=" + codeClstemplateVO +
                ", codeClassifyVO=" + codeClassifyVO +
                '}';
    }
    public CodeClassifyTemplateVO getCodeClstemplateVO() {
        return codeClstemplateVO;
    }
    public void setCodeClstemplateVO(CodeClassifyTemplateVO codeClstemplateVO) {
        this.codeClstemplateVO = codeClstemplateVO;
    }
    public CodeRuleVO getCodeRuleVO() {
        return codeRuleVO;
    }
    public void setCodeRuleVO(CodeRuleVO codeRuleVO) {
        this.codeRuleVO = codeRuleVO;
    }
    @Override
    public String toString() {
        return "CodeImprotDataVO{" +
            "rowIndex='" + rowIndex + '\'' +
            ", codeClassifyOid='" + codeClassifyOid + '\'' +
            ", templateOid='" + templateOid + '\'' +
            ", codeRuleOid='" + codeRuleOid + '\'' +
            ", fields=" + fields +
            ", colNames=" + colNames +
            ", datas=" + datas +
            ", codeClstemplateVO=" + codeClstemplateVO +
            ", codeClassifyVO=" + codeClassifyVO +
            ", codeRuleVO=" + codeRuleVO +
            '}';
    }
}
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/revision/model/BaseModel.java
@@ -32,7 +32,7 @@
     * ç§Ÿæˆ·ID
     * @TableField(value = "tenant_id")这里必须要写,并且必须是要小写的
     */
    @TableField(value = "tenant_id",exist = false)
    @TableField(value = "tenant_id")
    private String tenantId;
    private String description;
Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/UBCSSqlKeyword.java
@@ -84,44 +84,52 @@
        }
    }
    public static void buildConditionByAs(Map<String, Object> query, MPJLambdaWrapper<?> qw, String tableAlias){
        buildConditionMPJ(query,qw,tableAlias);
    }
    public static void buildCondition(Map<String, Object> query, MPJLambdaWrapper<?> qw) {
        buildConditionMPJ(query,qw,null);
    }
    private static void buildConditionMPJ(Map<String, Object> query, MPJLambdaWrapper<?> qw, String tableAlias){
        if (!Func.isEmpty(query)) {
            query.forEach((k, v) -> {
                if (!Func.hasEmpty(new Object[]{k, v}) && !k.endsWith("_ignore")) {
                    if (k.endsWith("_like")) {
                        qw.like(getColumn(k, "_like"), v);
                        qw.like(tableAlias+"."+getColumn(k, "_like"), v);
                    } else if (k.endsWith("_notequal")) {
                        qw.ne(getColumn(k, "_notequal"), v);
                        qw.ne(tableAlias+"."+getColumn(k, "_notequal"), v);
                    } else if (k.endsWith("_likeleft")) {
                        qw.likeLeft(getColumn(k, "_likeleft"), v);
                        qw.likeLeft(tableAlias+"."+getColumn(k, "_likeleft"), v);
                    } else if (k.endsWith("_likeright")) {
                        qw.likeRight(getColumn(k, "_likeright"), v);
                        qw.likeRight(tableAlias+"."+getColumn(k, "_likeright"), v);
                    } else if (k.endsWith("_notlike")) {
                        qw.notLike(getColumn(k, "_notlike"), v);
                        qw.notLike(tableAlias+"."+getColumn(k, "_notlike"), v);
                    } else if (k.endsWith("_ge")) {
                        qw.ge(getColumn(k, "_ge"), v);
                        qw.ge(tableAlias+"."+getColumn(k, "_ge"), v);
                    } else if (k.endsWith("_le")) {
                        qw.le(getColumn(k, "_le"), v);
                        qw.le(tableAlias+"."+getColumn(k, "_le"), v);
                    } else if (k.endsWith("_gt")) {
                        qw.gt(getColumn(k, "_gt"), v);
                        qw.gt(tableAlias+"."+getColumn(k, "_gt"), v);
                    } else if (k.endsWith("_lt")) {
                        qw.lt(getColumn(k, "_lt"), v);
                        qw.lt(tableAlias+"."+getColumn(k, "_lt"), v);
                    } else if (k.endsWith("_datege")) {
                        qw.ge(getColumn(k, "_datege"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                        qw.ge(tableAlias+"."+getColumn(k, "_datege"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                    } else if (k.endsWith("_dategt")) {
                        qw.gt(getColumn(k, "_dategt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                        qw.gt(tableAlias+"."+getColumn(k, "_dategt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                    } else if (k.endsWith("_dateequal")) {
                        qw.eq(getColumn(k, "_dateequal"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                        qw.eq(tableAlias+"."+getColumn(k, "_dateequal"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                    } else if (k.endsWith("_datele")) {
                        qw.le(getColumn(k, "_datele"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                        qw.le(tableAlias+"."+getColumn(k, "_datele"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                    } else if (k.endsWith("_datelt")) {
                        qw.lt(getColumn(k, "_datelt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                        qw.lt(tableAlias+"."+getColumn(k, "_datelt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss"));
                    } else if (k.endsWith("_null")) {
                        qw.isNull(getColumn(k, "_null"));
                        qw.isNull(tableAlias+"."+getColumn(k, "_null"));
                    } else if (k.endsWith("_notnull")) {
                        qw.isNotNull(getColumn(k, "_notnull"));
                        qw.isNotNull(tableAlias+"."+getColumn(k, "_notnull"));
                    } else {
                        qw.eq(getColumn(k, "_equal"), v);
                        qw.eq(tableAlias+"."+getColumn(k, "_equal"), v);
                    }
                }
@@ -129,6 +137,7 @@
        }
    }
    public static void buildConditionByMapString(Map<String, String> query, MPJLambdaWrapper<?> qw) {
        if (!Func.isEmpty(query)) {
            query.forEach((k, v) -> {
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/MdmEngineController.java
@@ -74,7 +74,52 @@
            ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null);
        }
    }
    /**
     * ä¸‹è½½æ‰¹é‡ç”³è¯·çš„导入模板
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param response å“åº”对象
     * @throws IOException æŠ›å‡ºå¼‚常
     */
    @GetMapping("/downloadTopImportExcel")
    @VciBusinessLog(operateName = "下载批量申请编码的导入模板")
    public void downloadTopImportExcel(String codeClassifyOid,HttpServletResponse response) throws IOException{
        String excelName = mdmIOService.downloadTopImportExcel(codeClassifyOid);
        try {
            ControllerUtil.writeFileToResponse(response,excelName);
        } catch (Throwable e) {
            //如果出错,把错误信息写到text
            String msg = LangBaseUtil.getErrorMsg(e);
            if(StringUtils.isBlank(msg)){
                msg = "未知错误";
            }
            ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null);
        }
    }
    /**
     * ä¸‹è½½åŽ†å²æ•°æ®å¯¼å…¥æ¨¡æ¿
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param response å“åº”对象
     * @throws IOException æŠ›å‡ºå¼‚常
     */
    @GetMapping("/downloadImportExcelHistory")
    @VciBusinessLog(operateName = "下载历史数据导入模板")
    public void downloadImportExcelHistory(String codeClassifyOid,HttpServletResponse response) throws IOException{
        String excelName = mdmIOService.createImportExcel(codeClassifyOid,true);
        //String excelName = mdmIOService.downloadTopImportExcel(codeClassifyOid);
        try {
            ControllerUtil.writeFileToResponse(response,excelName);
        } catch (Throwable e) {
            //如果出错,把错误信息写到text
            String msg = LangBaseUtil.getErrorMsg(e);
            if(StringUtils.isBlank(msg)){
                msg = "未知错误";
            }
            ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null);
        }
    }
    /**
     * æ‰¹é‡ç”³è¯·ç¼–码的信息
@@ -126,6 +171,97 @@
//        return null;
    }
    /**
     * å¯¼å…¥åŽ†å²æ•°æ®
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file æ–‡ä»¶çš„内容
     */
    @VciBusinessLog(operateName = "导入编码的历史数据")
    @PostMapping("/batchImportHistoryData")
    public R batchImportHistoryData(String codeClassifyOid, String classifyAttr,MultipartFile file,HttpServletResponse response) throws Throwable {
        String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + file.getOriginalFilename();
        File file1 = new File(excelFileName);
        try {
            file.transferTo(new File(excelFileName));
            CodeImProtRusultVO codeImProtRusultVO =mdmIOService.batchImportHistoryData(codeClassifyOid, classifyAttr,file1);
            if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())||StringUtils.isNotBlank(codeImProtRusultVO.getRedisUuid())){
                //放到map里
                R result = R.fail("导入失败");
                if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())) {
                    String filedUUid = ControllerUtil.putErrorFile(codeImProtRusultVO.getFilePath());
                    codeImProtRusultVO.setFileOid(filedUUid);
                }
                result.setData(codeImProtRusultVO);
                return result;
            }else {
                return R.success("操作成功!");
            }
        }catch (Throwable e) {
            logger.error("导入错误",e);
            String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt";
            LocalFileUtil.writeContentToFile(LangBaseUtil.getErrorMsg(e),errorFile);
            String uuid=ControllerUtil.putErrorFile(errorFile);
            CodeImProtRusultVO codeImProtRusultVO =new CodeImProtRusultVO();
            codeImProtRusultVO.setRedisUuid("");
            codeImProtRusultVO.setFileOid(uuid);
            codeImProtRusultVO.setFilePath(errorFile);
            R r = R.fail("导入失败");
            r.setData(codeImProtRusultVO);
            return r;
        }finally {
            file1.delete();
        }
    }
    /**
     * å¯¼å…¥åŽ†å²æ•°æ®
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file æ–‡ä»¶çš„内容
     */
    @VciBusinessLog(operateName = "批量申请编码的信息")
    @PostMapping("/batchTopImportCode")
    public R batchTopImportCode(String codeClassifyOid, String classifyAttr,MultipartFile file,HttpServletResponse response) throws Throwable {
        String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + file.getOriginalFilename();
        File file1 = new File(excelFileName);
        try {
            file.transferTo(new File(excelFileName));
            CodeImProtRusultVO codeImProtRusultVO =mdmIOService.batchTopImportCode(codeClassifyOid, classifyAttr,file1);
            if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())||StringUtils.isNotBlank(codeImProtRusultVO.getRedisUuid())){
                //放到map里
                R r = R.fail("导入失败!");
                if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())) {
                    String filedUUid = ControllerUtil.putErrorFile(codeImProtRusultVO.getFilePath());
                    codeImProtRusultVO.setFileOid(filedUUid);
                    r = R.success("导入成功!");
                }
                r.setData(codeImProtRusultVO);
                return r;
            }else {
                return R.success("导入成功!");
            }
        }catch (Throwable e) {
            e.printStackTrace();
            logger.error("导入错误",e);
            String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt";
            LocalFileUtil.writeContentToFile(LangBaseUtil.getErrorMsg(e),errorFile);
            String uuid=ControllerUtil.putErrorFile(errorFile);
            CodeImProtRusultVO codeImProtRusultVO =new CodeImProtRusultVO();
            codeImProtRusultVO.setRedisUuid("");
            codeImProtRusultVO.setFileOid(uuid);
            codeImProtRusultVO.setFilePath(errorFile);
            R r = R.fail("导入失败");
            r.setData(codeImProtRusultVO);
            return r;
        }finally {
            file1.delete();
        }
    }
    /**
     * ä¿®æ”¹çŠ¶æ€
@@ -256,7 +392,7 @@
    }
    /***
     * ä»Žredis缓存里获取到导入正确的数据
     * ä»Žredis缓存里获取到导入行相似项的数据
     * @param dataOid
     * @param redisOid
     * @return
@@ -276,7 +412,27 @@
    public DataGrid<Map<String,String>> gridResemble(String codeClassifyOid,String redisOid){
        return mdmIOService.gridDatas(codeClassifyOid,redisOid);
    }
    /***
     * å¯¼å…¥æ•°æ®
     * @param codeImprotSaveDatVO//数据对象
     * @return
     */
    @PostMapping("/batchImportData")
    public R batchImportData(@RequestBody CodeImprotParmaDatVO codeImprotSaveDatVO){
        return  mdmIOService.batchImportData(codeImprotSaveDatVO.getCodeImprotSaveDatVOList(),codeImprotSaveDatVO.getClassifyAttr(),codeImprotSaveDatVO.getImprot());
    }
    /***
     *根据数据oid从缓存中移除数据
     * @param redisOid redisid
     * @param codeClassifyOid å­˜å‚¨è§„则的oid
     * @param dataOids  æ‰€éœ€åˆ é™¤çš„æ•°æ®
     * @return
     */
    @GetMapping("/deleteDatas")
    public  R deleteDatas(String redisOid,String codeClassifyOid,String dataOids){
        return mdmIOService.deleteDatas(redisOid,codeClassifyOid,dataOids);
    }
    /**
     * æ‰¹é‡ä¿å­˜æµç¨‹æ‰§è¡Œé¡µé¢ä¿®æ”¹çš„内容
     * @param orderDTOList ç¼–码相关的信息,不需要码段的信息
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/CommonsMapper.java
@@ -20,7 +20,6 @@
    List<String> selectById(@Param("inSql") String inSql);
    int  queryCountBySql(@Param("inSql") String inSql);
    List<Map> selectBySql(@Param("inSql") String inSql);
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeRuleService.java
@@ -108,6 +108,16 @@
    Collection<CodeRuleVO> listCodeRuleByOids(Collection<String> oidCollections) throws VciBaseException;
    /**
     * ä¸»é”®æ‰¹é‡èŽ·å–ä¸»æ•°æ®ç¼–ç è§„åˆ™
     *
     * @param oidCollections ä¸»é”®é›†åˆï¼Œä½†æ˜¯å—性能影响,建议一次查询不超过10000个
     * @param hasSec         æ˜¯å¦åŒ…含码段
     * @return ä¸»æ•°æ®ç¼–码规则显示对象
     * @throws VciBaseException æŸ¥è¯¢å‡ºçŽ°å¼‚å¸¸æ—¶ä¼šæŠ›å‡º
     */
    Collection<CodeRuleVO> listCodeRuleByIds(Collection<String> oidCollections,boolean hasSec)throws VciBaseException ;
    /**
     * å‚照主数据编码规则列表
     * @param bladeQueryObject æŸ¥è¯¢æ¡ä»¶
     * @return ä¸»æ•°æ®ç¼–码规则显示对象列表,生效的内容
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmEngineService.java
@@ -14,6 +14,7 @@
import com.vci.ubcs.starter.revision.model.BaseModel;
import com.vci.ubcs.starter.revision.model.TreeQueryObject;
import com.vci.ubcs.starter.web.pagemodel.*;
import com.vci.ubcs.starter.web.util.VciQueryWrapperForDO;
import org.springblade.core.tool.api.R;
import java.beans.IntrospectionException;
@@ -411,4 +412,20 @@
     * @return æ ‘形的数据
     */
    List<Tree> referTree(UIFormReferVO referConfigVO, TreeQueryObject queryObject);
    /**
     * æ˜¯å¦ä¸ºä¿®æ”¹å¿½ç•¥çš„属性
     * @param attrName å±žæ€§çš„名字
     * @return true è¡¨ç¤ºåº”该忽略
     */
    default boolean checkUnAttrUnEdit(String attrName){
        return  (VciQueryWrapperForDO.OID_FIELD.equalsIgnoreCase(attrName)
            ||"ts".equalsIgnoreCase(attrName)
            || "lastmodifier".equalsIgnoreCase(attrName)
            || "lastmodifytime".equalsIgnoreCase(attrName)
            || "createtime".equalsIgnoreCase(attrName)
            || "checkintime".equalsIgnoreCase(attrName)
            ||"checkouttime".equalsIgnoreCase(attrName));
    }
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/MdmIOService.java
@@ -4,9 +4,11 @@
import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO;
import com.vci.ubcs.code.vo.pagemodel.CodeImProtRusultVO;
import com.vci.ubcs.code.vo.pagemodel.CodeImportTemplateVO;
import com.vci.ubcs.code.vo.pagemodel.CodeImprotSaveDatVO;
import com.vci.ubcs.code.vo.webserviceModel.attrmap.DataObjectVO;
import com.vci.ubcs.code.vo.webserviceModel.result.xml.XMLResultDataObjectDetailDO;
import com.vci.ubcs.starter.web.pagemodel.DataGrid;
import org.springblade.core.tool.api.R;
import java.io.File;
import java.util.LinkedList;
@@ -24,6 +26,14 @@
     */
    String createImportExcel(String codeClassifyOid,boolean isHistory);
    /**
     * ç”Ÿæˆå¯¼å…¥çš„æ–‡ä»¶
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @return excel的文件地址
     */
    String downloadTopImportExcel(String codeClassifyOid);
    /**
     * æ‰¹é‡ç”³è¯·ç¼–码数据
     * @param orderDTO ç¼–码申请信息,必须包含分类主键和码段的信息
@@ -32,6 +42,23 @@
     */
    CodeImProtRusultVO batchImportCode(CodeOrderDTO orderDTO, File file);
    /***
     *批量申请编码数据
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file excel文件的信息
     * @return æœ‰é”™è¯¯ä¿¡æ¯çš„excel
     */
    CodeImProtRusultVO batchTopImportCode(String codeClassifyOid,String classifyAttr, File file);
    /**
     * å¯¼å…¥åŽ†å²æ•°æ®
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file excel文件的信息
     * @return æœ‰é”™è¯¯ä¿¡æ¯çš„excel
     */
    CodeImProtRusultVO batchImportHistoryData(String codeClassifyOid,String classifyAttr, File file);
    /***
     * ä»Žredis缓存里获取到导入的数据
     * @param codeClassifyOid
@@ -48,6 +75,25 @@
     */
    DataGrid<Map<String, String>> gridRowResemble(String dataOid, String redisOid);
    /**
     * æ‰¹é‡ç”³è¯·
     * @param codeImprotSaveDatVOList
     * @param isImprot
     * @return
     */
     R batchImportData(List<CodeImprotSaveDatVO> codeImprotSaveDatVOList, String classifyAttr, boolean isImprot);
    /***
     *
     * @param redisOid redisid
     * @param codeClassifyOid å­˜å‚¨è§„则的oid
     * @param dataOids  æ‰€éœ€åˆ é™¤çš„æ•°æ®
     * @return
     */
    R deleteDatas(String redisOid, String codeClassifyOid, String dataOids);
    void batchSyncEditDatas(CodeClassifyVO codeClassifyVO, DataObjectVO dataObjectVO, LinkedList<XMLResultDataObjectDetailDO> resultDataObjectDetailDOs);
    /**
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -131,9 +131,11 @@
        MPJLambdaWrapper<CodeBasicSec> mpjLambdaWrapper = new MPJLambdaWrapper<>(CodeBasicSec.class, CodeTableNameEnum.PL_CODE_BASICSEC.getText())
            .selectAll(CodeBasicSec.class)
            .selectAs(CodeClassify::getName, CodeBasicSec::getReferCodeClassifyOidName)
            .leftJoin(CodeClassify.class,CodeTableNameEnum.PL_CODE_CLASSIFY.getText(), CodeClassify::getOid, CodeBasicSec::getReferCodeClassifyOid);
            .leftJoin(CodeClassify.class, CodeTableNameEnum.PL_CODE_CLASSIFY.getText(), CodeClassify::getOid, CodeBasicSec::getReferCodeClassifyOid)
            .leftJoin(CodeBasicSec.class,CodeTableNameEnum.PL_CODE_BASICSEC.getText()+1,CodeBasicSec::getOid,CodeBasicSec::getParentClassifySecOid
                ,ext->ext.selectAs(CodeBasicSec::getName,CodeBasicSec::getParentClassifySecText));
        // æ·»åŠ where条件
        UBCSSqlKeyword.buildCondition(conditionMap,mpjLambdaWrapper);
        UBCSSqlKeyword.buildConditionByAs(conditionMap,mpjLambdaWrapper,CodeTableNameEnum.PL_CODE_BASICSEC.getText());
        IPage<CodeBasicSec> codeBasicSecIPage = codeBasicSecMapper.selectPage(UBCSCondition.getPage(query), mpjLambdaWrapper);
        return CodeBasicSecWrapper.build().pageVO(codeBasicSecIPage);
    }
@@ -508,20 +510,23 @@
        }
        List<CodeBasicSec> createList = new ArrayList<>();
        List<CodeBasicSec> basicSecDOS = codeBasicSecMapper.selectBatchIds(oidList);
        if(basicSecDOS.isEmpty()){
            return R.fail("克隆的码段信息不存在!");
        }
        basicSecDOS.forEach(sec -> {
            CodeBasicSec newSecDO = new CodeBasicSec();
            BeanUtilForVCI.copyPropertiesIgnoreCase(sec,newSecDO);
            newSecDO.setOid("");
            newSecDO.setNameOid("");
            newSecDO.setRevisionOid("");
            newSecDO.setOid(VciBaseUtil.getPk());
            newSecDO.setNameOid(VciBaseUtil.getPk());
            newSecDO.setRevisionOid(VciBaseUtil.getPk());
            newSecDO.setId(newSecDO.getId() + "_copy");
            newSecDO.setName(newSecDO.getName() + "_copy");
            newSecDO.setPkCodeRule(pkCodeRule);
            createList.add(newSecDO);
        });
        boolean b = saveBatch(createList);
        boolean resBoolean = saveBatch(createList);
        //codeBasicSecMapper.insertBatch(createList);
        return R.data(b,"克隆码段信息成功");
        return resBoolean ? R.data(resBoolean,"克隆码段信息成功"):R.fail("克隆码段信息失败!");
    }
    /**
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java
@@ -320,6 +320,21 @@
    }
    /**
     * ä¸»é”®æ‰¹é‡èŽ·å–ä¸»æ•°æ®ç¼–ç è§„åˆ™
     *
     * @param oidCollections ä¸»é”®é›†åˆï¼Œä½†æ˜¯å—性能影响,建议一次查询不超过10000个
     * @param hasSec         æ˜¯å¦åŒ…含码段
     * @return ä¸»æ•°æ®ç¼–码规则显示对象
     * @throws VciBaseException æŸ¥è¯¢å‡ºçŽ°å¼‚å¸¸æ—¶ä¼šæŠ›å‡º
     */
    @Override
    public Collection<CodeRuleVO> listCodeRuleByIds(Collection<String> oidCollections, boolean hasSec) throws VciBaseException {
        VciBaseUtil.alertNotNull(oidCollections, "数据对象主键集合");
        List<CodeRule> codeRuleDOList = listCodeRuleDOByOidCollections(oidCollections);
        return codeRuleDO2VOs(codeRuleDOList, true);
    }
    /**
     * ä½¿ç”¨ä¸»é”®é›†åˆæŸ¥è¯¢æ•°æ®å¯¹è±¡
     *
     * @param oidCollections ä¸»é”®çš„集合
@@ -438,6 +453,27 @@
    }
    /**
     * æ‰¹é‡æ•°æ®å¯¹è±¡è½¬æ¢ä¸ºæ˜¾ç¤ºå¯¹è±¡
     *
     * @param codeRules æ•°æ®å¯¹è±¡åˆ—表
     * @param hasSec      æ˜¯å¦åŒ…含码段
     * @return æ˜¾ç¤ºå¯¹è±¡
     * @throws VciBaseException å‚数为空或者不存在的时候会抛出异常
     */
    public List<CodeRuleVO> codeRuleDO2VOs(Collection<CodeRule> codeRules, boolean hasSec) throws VciBaseException {
        List<CodeRuleVO> voList = new ArrayList<CodeRuleVO>();
        if (!CollectionUtils.isEmpty(codeRules)) {
            for (CodeRule s : codeRules) {
                CodeRuleVO vo = codeRuleDO2VO(s,true);
                if (vo != null) {
                    voList.add(vo);
                }
            }
        }
        return voList;
    }
    /**
     * æ•°æ®å¯¹è±¡è½¬æ¢ä¸ºæ˜¾ç¤ºå¯¹è±¡
     *
     * @param codeRuleDO è§„则的数据对象
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -938,7 +938,8 @@
     * @param attrName å±žæ€§çš„名字
     * @return true è¡¨ç¤ºåº”该忽略
     */
    boolean checkUnAttrUnEdit(String attrName){
    @Override
    public boolean checkUnAttrUnEdit(String attrName){
        return  (VciQueryWrapperForDO.OID_FIELD.equalsIgnoreCase(attrName)
            ||"ts".equalsIgnoreCase(attrName)
            || "lastmodifier".equalsIgnoreCase(attrName)
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -2,12 +2,16 @@
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.common.utils.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.vci.ubcs.code.bo.AttributeValue;
import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO;
import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO;
import com.vci.ubcs.code.dto.CodeOrderDTO;
import com.vci.ubcs.code.entity.CodeAllCode;
import com.vci.ubcs.code.entity.CodeClassify;
import com.vci.ubcs.code.enumpack.CodeDefaultLC;
import com.vci.ubcs.code.enumpack.CodeLevelTypeEnum;
import com.vci.ubcs.code.lifecycle.CodeAllCodeLC;
import com.vci.ubcs.code.mapper.CommonsMapper;
import com.vci.ubcs.code.service.*;
import com.vci.ubcs.code.util.ClientBusinessObject;
@@ -16,6 +20,8 @@
import com.vci.ubcs.code.vo.webserviceModel.attrmap.DataObjectVO;
import com.vci.ubcs.code.vo.webserviceModel.attrmap.RowDatas;
import com.vci.ubcs.code.vo.webserviceModel.result.xml.XMLResultDataObjectDetailDO;
import com.vci.ubcs.omd.feign.IBtmTypeClient;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.starter.bo.WriteExcelData;
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.poi.bo.ReadExcelOption;
@@ -26,7 +32,10 @@
import com.vci.ubcs.starter.revision.model.BaseModel;
import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil;
import com.vci.ubcs.starter.util.LocalFileUtil;
import com.vci.ubcs.starter.util.MdmBtmTypeConstant;
import com.vci.ubcs.starter.web.constant.QueryOptionConstant;
import com.vci.ubcs.starter.web.enumpck.BooleanEnum;
import com.vci.ubcs.starter.web.enumpck.UserSecretEnum;
import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.ubcs.starter.web.pagemodel.DataGrid;
import com.vci.ubcs.starter.web.pagemodel.KeyValue;
@@ -37,6 +46,7 @@
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.map.HashedMap;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.HSSFColor;
@@ -44,16 +54,18 @@
import org.apache.poi.ss.usermodel.RichTextString;
import org.apache.poi.ss.usermodel.Workbook;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.tool.api.R;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.stream.Collectors;
@@ -66,6 +78,21 @@
@Service
@Slf4j
public class MdmIOServiceImpl implements MdmIOService {
    /**
     * å­—段
     */
    public static final String ROW_INDEX = "LAY_TABLE_INDEX";
    /**
     * é”™è¯¯ä¿¡æ¯çš„字段
     */
    public static final String ERROR_MSG = "errorMsg";
    @Value("${batchadd.exportattr.type:基本信息}")
    public String BATCHADD_EXCEPORT_ATTR_TYPE;
    @Value("${batchadd.redis.time:6000000}")
    public int BATCHADD_REDIS_TIME;
    /**
@@ -74,11 +101,17 @@
    @Resource
    private ICodeClassifyService classifyService;
    /**
     * é€šç”¨æŸ¥è¯¢
     */
    @Resource
    CommonsMapper commonsMapper;
    private CommonsMapper commonsMapper;
    /****
     * ç å€¼æœåŠ¡
     */
    @Resource
    ICodeAllCodeService codeAllCodeService;
    /**
     * æ¨¡æ¿çš„æœåŠ¡
@@ -111,6 +144,178 @@
     */
    @Autowired
    private FormulaServiceImpl formulaService;
    /**
     * è§„则的服务
     */
    @Autowired
    private ICodeRuleService ruleService;
    /**
     * ä¸šåŠ¡ç±»åž‹çš„æœåŠ¡
     */
    @Autowired
    private IBtmTypeClient btmTypeClient;
    /**
     * æ‰¹é‡ç”³è¯·ï¼šé€‰å–选中分类下的所有模板关键属性,相似属性,必填属性,写入execl中
     *
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @return excel的文件地址
     */
    @Override
    public  String downloadTopImportExcel(String codeClassifyOid){
        List<CodeClassifyTemplateVO> templateVOList=new ArrayList<>();
        VciBaseUtil.alertNotNull("导出模板","导出的配置",codeClassifyOid,"主题库分类的主键");
        CodeClassifyVO codeClassifyVO = classifyService.getObjectByOid(codeClassifyOid);
        templateVOList= templateService.childTemplates(codeClassifyOid);
        List<CodeClassifyVO>  codeClassifyVOS=classifyService.getIdPathToNamePathByParentId(codeClassifyOid,true);
        WriteExcelOption eo = new WriteExcelOption();
        LinkedHashMap<String,CodeClassifyTemplateAttrVO> allFieldToOutNameMap=new LinkedHashMap<>();
        templateVOList.stream().forEach(templateVO -> {
            //组合格式的不导入,
            // æžšä¸¾çš„æä¾›åºåˆ—的选择
            //时间全部统一为yyyy-MM-dd HH:mm:ss
            //参照的自行输入名称
            //分类注入的不用,都是导入后自动处理的
            //编码,状态等字段不导入
            List<CodeClassifyTemplateAttrVO> templateAttrVOS = templateVO.getAttributes().stream().filter(s ->
                !DEFAULT_ATTR_LIST.contains(s.getId())
                    && StringUtils.isBlank(s.getComponentRule())
                    && StringUtils.isBlank(s.getClassifyInvokeAttr())
                    && (VciBaseUtil.getBoolean(s.getFormDisplayFlag()))
            ).collect(Collectors.toList());
            if(CollectionUtils.isEmpty(templateAttrVOS)){
                throw new VciBaseException("模板没有配置任何【表单显示】为【是】的属性");
            }
            templateAttrVOS.stream().forEach(codetemplateAttr ->{
                String field=codetemplateAttr.getId();
                String name=codetemplateAttr.getName();
                CodeClassifyTemplateAttrVO codeBaseAttributeDTO=new CodeClassifyTemplateAttrVO();
                boolean res=codetemplateAttr.getAttributeGroup().equals(BATCHADD_EXCEPORT_ATTR_TYPE)//基本属性字段显示
                    ||(StringUtils.isNotBlank(codetemplateAttr.getKeyAttrFlag())&&Boolean.parseBoolean(codetemplateAttr.getKeyAttrFlag()))//关键属性的存入
                    ||(StringUtils.isNotBlank(codetemplateAttr.getSameRepeatAttrFlag())&&Boolean.parseBoolean(codetemplateAttr.getSameRepeatAttrFlag())) //相似属性的存入
                    ||(StringUtils.isNotBlank(codetemplateAttr.getRequireFlag())&&Boolean.parseBoolean(codetemplateAttr.getRequireFlag()));
                if(allFieldToOutNameMap.containsKey(name)){//如果存在的话则需要根据具体的去赋值
                    codeBaseAttributeDTO=  allFieldToOutNameMap.get(name);
                    if(StringUtils.isNotBlank(codetemplateAttr.getKeyAttrFlag())&&Boolean.parseBoolean(codetemplateAttr.getKeyAttrFlag())){
                        codeBaseAttributeDTO.setKeyAttrFlag(codetemplateAttr.getKeyAttrFlag());//属性关键属性
                    }
                    if(StringUtils.isNotBlank(codetemplateAttr.getRequireFlag())&&Boolean.parseBoolean(codetemplateAttr.getRequireFlag())){
                        codeBaseAttributeDTO.setRequireFlag(codetemplateAttr.getRequireFlag());//属性必填项
                    }
                    if(StringUtils.isNotBlank(codetemplateAttr.getSameRepeatAttrFlag())&&Boolean.parseBoolean(codetemplateAttr.getSameRepeatAttrFlag())){
                        codeBaseAttributeDTO.setSameRepeatAttrFlag(codetemplateAttr.getSameRepeatAttrFlag());//属性相似属性
                    }
                }else if(res){
                    allFieldToOutNameMap.put(name,codetemplateAttr);
                }
            });
        });
        //整理好所有模板需要写入execl的属性信息
        Workbook workbook = new HSSFWorkbook();
        LinkedList<WriteExcelData> excelDataList = new LinkedList<>();
        if(!CollectionUtils.isEmpty(allFieldToOutNameMap)){
            excelDataList.add(new WriteExcelData(0,0,"分类路径"));
            final int[] index = {0};
            allFieldToOutNameMap.values().stream().forEach(attrVO -> {
                Object text = attrVO.getName();
                text = exportKeyAndRequired(workbook,attrVO,text);
                int colIndex = 1 + index[0]++;
                WriteExcelData excelData = new WriteExcelData(0, colIndex, text);
                if(StringUtils.isNotBlank(attrVO.getCodeDateFormat())
                    || VciFieldTypeEnum.VTDateTime.name().equalsIgnoreCase(attrVO.getAttributeDataType())
                    || VciFieldTypeEnum.VTDate.name().equalsIgnoreCase(attrVO.getAttributeDataType())
                    ||VciFieldTypeEnum.VTTime.name().equalsIgnoreCase(attrVO.getAttributeDataType())){
                    excelData.setDateFormat(VciDateUtil.DateTimeFormat);
                }
                if(text instanceof RichTextString){
                    excelData.setFontColor(String.valueOf(HSSFColor.HSSFColorPredefined.RED.getIndex()));
                }
                excelDataList.add(excelData);
                if(StringUtils.isNotBlank(attrVO.getEnumString()) || StringUtils.isNotBlank(attrVO.getEnumId())){
                    //添加数据有效性
                    List<String> enumValueList = new ArrayList<>();
                    enumValueList.add("");
                    List<KeyValue> valueList = engineService.listComboboxItems(attrVO);
                    if(!CollectionUtils.isEmpty(valueList)){
                        valueList.stream().forEach(kv->{
                            enumValueList.add(kv.getValue());
                        });
                    }
                    //默认加1万条
                    WriteExcelData ed = new WriteExcelData(1,colIndex,"");
                    ed.setRowTo(100);
                    ed.setColTo(colIndex);
                    ed.setValidation(true);
                    ed.setValidationDataList(enumValueList);
                    ed.setValidationErrorMsg("请在序列中选择正确的值");
                    excelDataList.add(ed);
                }
                if(VciFieldTypeEnum.VTBoolean.name().equalsIgnoreCase(attrVO.getAttributeDataType())){
                    List<String> booleanList = new ArrayList<>();
                    booleanList.add("是");
                    booleanList.add("否");
                    //默认加1万条
                    WriteExcelData ed = new WriteExcelData(1,colIndex,"");
                    ed.setRowTo(100);
                    ed.setColTo(colIndex);
                    ed.setValidation(true);
                    ed.setValidationDataList(booleanList);
                    ed.setValidationErrorMsg("请在序列中选择正确的值");
                    excelDataList.add(ed);
                }
            });
            eo.addSheetDataList(codeClassifyVO.getName()+"导入模板",excelDataList);
        }
        LinkedList<WriteExcelData> classPathList = new LinkedList<>();
        classPathList.add(new WriteExcelData(0,0,"分类层级"));
        WriteExcelData idPathWriteExcelTitle=new WriteExcelData(0,1,"分类ID路径");
        idPathWriteExcelTitle.setWidth(20);
        idPathWriteExcelTitle.setCenter(false);
        classPathList.add(idPathWriteExcelTitle);
        WriteExcelData namePathWriteExcelTitle=new WriteExcelData(0,2,"分类名称路径");
        namePathWriteExcelTitle.setWidth(20);
        namePathWriteExcelTitle.setCenter(false);
        classPathList.add(namePathWriteExcelTitle);
        final int[] rowIndex = {1};
        codeClassifyVOS.stream().forEach(codeClassifyVO1 -> {
            classPathList.add(new WriteExcelData(rowIndex[0],0,codeClassifyVO1.getDataLevel()));
            String idPath=codeClassifyVO1.getIdPath().startsWith("#")?codeClassifyVO1.getIdPath().substring(1):codeClassifyVO1.getIdPath();
            WriteExcelData idPathWriteExcelData=new WriteExcelData(rowIndex[0],1,idPath);
            idPathWriteExcelData.setWidth(30);
            idPathWriteExcelData.setCenter(false);
            classPathList.add(idPathWriteExcelData);
            String namePath=codeClassifyVO1.getNamePath().startsWith("#")?codeClassifyVO1.getNamePath().substring(1):codeClassifyVO1.getNamePath();
            WriteExcelData  namePathWriteExcelData=  new WriteExcelData(rowIndex[0],2,namePath);
            namePathWriteExcelData.setWidth(40);
            namePathWriteExcelData.setCenter(false);
            classPathList.add(namePathWriteExcelData);
            rowIndex[0]++;
        });
        WriteExcelData  excelData=new WriteExcelData();
        excelData.setMerged(true);
        excelData.setRow(1);
        excelData.setRowTo(2);
        excelData.setCol(4);
        excelData.setColTo(9);
        excelData.setCenter(false);
        excelData.setReadOnly(true);
        excelData.setObj("导入数据时,分类路径必须填写叶子节点路径\n(选择叶子节点导入则不需要填写分类路径)");
        excelData.setFontColor(String.valueOf(HSSFColor.HSSFColorPredefined.RED.getIndex()));
        classPathList.add(excelData);
        eo.addSheetDataList(codeClassifyVO.getName()+"分类对照表",classPathList);
        String excelName = LocalFileUtil.getDefaultTempFolder() + File.separator + codeClassifyVO.getName() + "_导入模板.xls";
        // eo.addSheetDataList(templateVOList.size()+"模板信息【请勿删除或移动】",tempEDList);
        ExcelUtil.writeDataToFile(excelName,eo);
        return excelName;
    }
    /**
     * ç”Ÿæˆå¯¼å…¥çš„æ–‡ä»¶
     *
@@ -307,6 +512,627 @@
        return codeImProtRusultVO;
    }
    /***
     * ä»Žé¡¶å±‚批量申请导入方法
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file excel文件的信息
     * @return
     */
    @Override
    public CodeImProtRusultVO batchTopImportCode(String codeClassifyOid, String classifyAttr, File file) {
        VciBaseUtil.alertNotNull(codeClassifyOid,"分类的主键");
        ReadExcelOption reo = new ReadExcelOption();
        reo.setReadAllSheet(true);
        List<SheetDataSet> sheetDataSetList = ExcelUtil.readDataObjectFromExcel(file,null,reo);
        if(CollectionUtils.isEmpty(sheetDataSetList) || CollectionUtils.isEmpty(sheetDataSetList.get(0).getRowData())
            ||sheetDataSetList.get(0).getRowData().size()<1){
            throw new VciBaseException("没有读取到任何的数据");
        }
        if(sheetDataSetList.size()>LIMIT+1){
            throw new VciBaseException("为了保证系统的稳定性,请一次不要导入超过1万条的数据");
        }
        //先找到每一行的标题,然后根据标题来获取对应的属性
        SheetDataSet dataSet = sheetDataSetList.get(0);
        CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(codeClassifyOid);
        //获取当前模板
        CodeClassifyTemplateVO selectCodeClassifyTemplateVO =engineService.getUsedTemplateByClassifyOid(codeClassifyOid);
        Map<String,List<ColumnVO>> templateColumnVOMap=new HashMap<>();
        createTemplate(selectCodeClassifyTemplateVO,templateColumnVOMap);
        List<CodeClassifyVO> childClassifyVOs = classifyService.listChildrenClassify(codeClassifyOid, true, classifyAttr, true);
        Map<String/**路径**/, CodeClassifyVO> pathMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getPath().startsWith("#") ? s.getPath().substring(1) : s.getPath(), t -> t));
        pathMap.put("#current#", classifyFullInfo.getCurrentClassifyVO());
        List<String> titleRowData = dataSet.getColName();
        Map<String, String> errorMap = new ConcurrentHashMap<>();
        //首先将数据以模板的形式分开
        LinkedHashMap<String,List<CodeImprotDataVO>> codeclassifyDataMap=new LinkedHashMap<>();
        List<CodeImprotDataVO> codeClassifyDatas=new ArrayList<>();
        createExeclClassData(dataSet,pathMap,errorMap,codeClassifyDatas);
        //根据模板将数据整合在一起,去校验
        Map<String/**模板oid**/, List<CodeImprotDataVO>/**数据对象**/> templateDatasMap =codeClassifyDatas.stream().collect(Collectors.toMap(CodeImprotDataVO::getTemplateOid,s->{
            List<CodeImprotDataVO> l=new ArrayList<>();
            l.add(s);
            return l;
        },(List<CodeImprotDataVO> s1,List<CodeImprotDataVO> s2)->{
            s1.addAll(s2);
            return s1;
        }));
        String uuid=VciBaseUtil.getPk();
        List<CodeImportTemplateVO> codeImportTemplateVOS=new ArrayList<>();
        Map<String,CodeImportTemplateVO> codeRuleMap=new HashMap<>();
        //相似数据
        // Map<String,String>wpResembleMap=new HashMap<>();
        // List<CodeImprotDataVO> wpCodeImprotDataVOList=new ArrayList<>();
        //按照模板去整理数据
        templateDatasMap.keySet().stream().forEach(templateVOOid->{
            List<CodeImprotDataVO> codeImprotDataVOS= templateDatasMap.get(templateVOOid);
            CodeClassifyTemplateVO templateVO= templateService.getObjectHasAttrByOid(templateVOOid);
            //除去默认的属性.还有只有表单显示的字段才导入
            List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s ->
                !DEFAULT_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag())
            ).collect(Collectors.toList());
            Map<String/**模板属性字段oid**/, String /**模板属性外部名称**/> fieldNameMap =attrVOS.stream().collect(Collectors.toMap(CodeClassifyTemplateAttrVO::getId,s->s.getName()));
            List<ClientBusinessObject> allCboList=new ArrayList<>();
            codeImprotDataVOS.stream().forEach(codeImprotDataVO -> {
                List<ColumnVO>columnVOList =new ArrayList();
                String templateOid=selectCodeClassifyTemplateVO.getOid();
                if(templateColumnVOMap.containsKey(templateOid)){
                    columnVOList= columnVOList=templateColumnVOMap.get(templateOid);
                }else{
                    createTemplate(templateVO,templateColumnVOMap);
                    columnVOList= columnVOList=templateColumnVOMap.get(templateOid);
                }
                String codeRuleOid=codeImprotDataVO.getCodeRuleOid();
                if(!codeRuleMap.containsKey(codeRuleOid)){
                    CodeImportTemplateVO codeImportTemplateVO=new CodeImportTemplateVO();
                    codeImportTemplateVO.setRoot(false);
                    codeImportTemplateVO.setCodeClassifyOid(codeImprotDataVO.getCodeClassifyOid());
                    codeImportTemplateVO.setCodeRuleOid(codeImprotDataVO.getCodeRuleOid());
                    codeImportTemplateVO.setCodeTemplateOid (codeImprotDataVO.getTemplateOid());
                    codeImportTemplateVO.setCodeClassifyVO( codeImprotDataVO.getCodeClassifyVO());
                    codeImportTemplateVO.setCodeClassifyTemplateVO( codeImprotDataVO.getCodeClassifyTemplateVO());
                    codeImportTemplateVO.setCodeRuleVO(codeImprotDataVO.getCodeRuleVO());
                    List<String> colNames=codeImprotDataVO.getColNames();
                    codeImportTemplateVO.setCloNamesList(columnVOList);
                    codeImportTemplateVOS.add(codeImportTemplateVO);
                    codeRuleMap.put(codeRuleOid,codeImportTemplateVO);
                }
                List<ClientBusinessObject> cboList=new ArrayList<>();
                excelToCbo(classifyFullInfo,codeImprotDataVO,cboList,true);
                allCboList.addAll(cboList);
                //往选择的节点里面加数据
                // CodeImprotDataVO wpcodeImprotDataVO=new CodeImprotDataVO();
                //   BeanUtilForVCI.copyPropertiesIgnoreCase(codeImprotDataVO,wpcodeImprotDataVO);
               /* wpcodeImprotDataVO.setCodeClassifyOid(codeClassifyOid);
                wpcodeImprotDataVO.setCodeClassifyVO(classifyFullInfo.getCurrentClassifyVO());
                wpcodeImprotDataVO.setCodeClassifyTemplateVO(selectCodeClassifyTemplateVO);
                wpcodeImprotDataVO.setCodeRuleOid(classifyFullInfo.getCurrentClassifyVO().getCoderuleoid());*/
                // wpCodeImprotDataVOList.add(wpcodeImprotDataVO);//往物品对象里添加
            });
            //都转换完了。需要批量检查
            //如果出错了,我们依然执行有效的数据,无效的数据写回到excel中
            //2.判断必输项。。需要全部的属性,如果是必输,但是表单里面不显示的,只能是分类注入或者组合规则
            batchCheckRequiredAttrOnOrder(templateVO,allCboList,errorMap);
            //3.判断关键属性
            CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, templateVO, allCboList);
            Set<String> selfRepeatRowIndexList = keyResultVO.getSelfRepeatRowIndexList();
            Set<String> keyAttrRepeatRowIndexList = keyResultVO.getKeyAttrRepeatRowIndexList();
            if(!CollectionUtils.isEmpty(selfRepeatRowIndexList)){
                selfRepeatRowIndexList.stream().forEach(rowIndex->{
                    errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";在当前处理的数据文件中关键属性重复" );
                });
            }
            if(!CollectionUtils.isEmpty(keyAttrRepeatRowIndexList)){
                keyAttrRepeatRowIndexList.stream().forEach(rowIndex->{
                    errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";关键属性与系统中的重复" );
                });
            }
            //分类注入
            // batchSwitchClassifyAttrOnOrder(attrVOS,allCboList,classifyFullInfo,false);
            //boolean
            reSwitchBooleanAttrOnOrder(attrVOS,allCboList);
            //4.校验规则
            batchCheckVerifyOnOrder(attrVOS, allCboList,errorMap);
            //是否需要校验枚举/参照
            //5.校验枚举是否正确
            batchSwitchEnumAttrOnOrder(attrVOS, allCboList, errorMap);
            //7.处理参照的情况
            batchSwitchReferAttrOnOrder(attrVOS,allCboList,errorMap);
            //6.时间格式的验证
            //6.时间的,必须统一为yyyy-MM-dd HH:mm:ss
            batchSwitchDateAttrOnOrder(attrVOS,allCboList,errorMap);
            //设置默认值
            batchSwitchAttrDefault(attrVOS, allCboList);
            //最后弄组合规则
            batchSwitchComponentAttrOnOrder(attrVOS,allCboList);
            Map<String, ClientBusinessObject> rowIndexCboMap = allCboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue((IMPORT_ROW_INDEX)), t -> t));
            List<ClientBusinessObject> needSaveCboList = allCboList.stream().filter(cbo -> {
                String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                return !errorMap.containsKey(rowIndex);
            }).collect(Collectors.toList());
            //相似校验
            Map<String,String>resembleMap=new HashMap<>();
            List<DataResembleVO> dataResembleVOS=new ArrayList<>();
            String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmtypeid();
            bathcResembleQuery(codeClassifyOid,templateVO,needSaveCboList,resembleMap,btmtypeid,dataResembleVOS);
            if(resembleMap.size()>0) {
                if(!CollectionUtils.isEmpty(dataResembleVOS)) {
                    bladeRedis.set(uuid + "-resemble-data", dataResembleVOS);
                    bladeRedis.expire(uuid + "-resemble-data",BATCHADD_REDIS_TIME);//redis过期时间
                    // createRedisDatas(uuid + "-resemble", codeImprotDataVOS, resembleMap, false);
                    //  wpResembleMap.putAll(resembleMap);
                }
            }
            //排除错误的,剩下正确的
            Map<String,String> newErrorMap=new HashMap<>();
            newErrorMap.putAll(resembleMap);
            newErrorMap.putAll(errorMap);
            needSaveCboList = allCboList.stream().filter(cbo -> {
                String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                return !newErrorMap.containsKey(rowIndex);
            }).collect(Collectors.toList());
            if(newErrorMap.size()>0) {
                createRedisDatas(uuid + "-resemble",codeImprotDataVOS, newErrorMap,false);
            }
            createRedisDatas(uuid + "-ok",codeImprotDataVOS, newErrorMap,true);
        });
        //往物品节点上加模板
        List<String> needRowIndexList=new ArrayList<>();
        CodeImProtRusultVO codeImProtRusultVO = new CodeImProtRusultVO();
        if(errorMap.size()>0) {
            String filePath = returnErrorToExcel(dataSet.getRowData(), errorMap, needRowIndexList, dataSet.getColName());
            if (StringUtils.isNotBlank(filePath)) {
                codeImProtRusultVO.setFilePath(filePath);
            }
        }
        if(StringUtils.isNotBlank(uuid)){
            //将所有的分类存入缓存之中
            codeImProtRusultVO.setRedisUuid(uuid);
            /**  List<ColumnVO>columnVOList=new ArrayList<>();
             CodeImportTemplateVO wpCodeImportTemplateVO=new CodeImportTemplateVO();
             wpCodeImportTemplateVO.setRoot(true);
             wpCodeImportTemplateVO.setCodeClassifyTemplateVO(selectCodeClassifyTemplateVO);
             wpCodeImportTemplateVO.setCodeClassifyVO(classifyFullInfo.getCurrentClassifyVO());
             String templateOid=selectCodeClassifyTemplateVO.getOid();
             if(templateColumnVOMap.containsKey(templateOid)){
             columnVOList= columnVOList=templateColumnVOMap.get(templateOid);
             }else{
             createTemplate(selectCodeClassifyTemplateVO,templateColumnVOMap);
             columnVOList= columnVOList=templateColumnVOMap.get(templateOid);
             }
             wpCodeImportTemplateVO.setCloNamesList(columnVOList);
             codeImportTemplateVOS.add(wpCodeImportTemplateVO);
             if(wpResembleMap.size()>0){
             //  redisService.setCacheList(uuid + "-resemble-data", wpDataResembleVOList);
             createRedisDatas(uuid + "-resemble",selectCodeClassifyTemplateVO, wpCodeImprotDataVOList, wpResembleMap, false,codeClassifyOid);
             }
             //排除错误的,剩下正确的
             Map<String,String> newErrorMap=new HashMap<>();
             newErrorMap.putAll(wpResembleMap);
             newErrorMap.putAll(errorMap);
             List<CodeImprotDataVO>  needSaveCboList = wpCodeImprotDataVOList.stream().filter(cbo -> {
             String rowIndex = cbo.getRowIndex();
             return !newErrorMap.containsKey(rowIndex);
             }).collect(Collectors.toList());
             createRedisDatas(uuid + "-ok",selectCodeClassifyTemplateVO,wpCodeImprotDataVOList, newErrorMap,true,codeClassifyOid);****/
            if(codeImportTemplateVOS.size()>0){
                bladeRedis.set(uuid + "-class",codeImportTemplateVOS);
                bladeRedis.expire(uuid + "-class",BATCHADD_REDIS_TIME);
            }
        }
        return codeImProtRusultVO;
    }
    /**
     * å¯¼å…¥åŽ†å²æ•°æ®
     *
     * @param codeClassifyOid åˆ†ç±»çš„主键
     * @param classifyAttr åˆ†ç±»è·¯å¾„使用的属性
     * @param file            excel文件的信息
     * @return æœ‰é”™è¯¯ä¿¡æ¯çš„excel
     */
    @Override
    public CodeImProtRusultVO batchImportHistoryData(String codeClassifyOid, String classifyAttr,File file) {
        VciBaseUtil.alertNotNull(codeClassifyOid,"分类的主键");
        ReadExcelOption reo = new ReadExcelOption();
        reo.setReadAllSheet(true);
        List<SheetDataSet> sheetDataSetList = ExcelUtil.readDataObjectFromExcel(file,null,reo);
        if (sheetDataSetList.size() > LIMIT + 1) {
            throw new VciBaseException("为了保证系统的稳定性,请一次不要导入超过1万条的数据");
        }
        Map<String,List<WriteExcelData>> shetNameMap=new HashMap<>();
        //相似项目查重
        String uuid=VciBaseUtil.getPk();
        boolean isCreateUUid=false;
        boolean isExport=false;
        for(int i=0;i<sheetDataSetList.size()-1;i++) {
            if (CollectionUtils.isEmpty(sheetDataSetList) || CollectionUtils.isEmpty(sheetDataSetList.get(i).getRowData())
                || sheetDataSetList.get(i).getRowData().size() < 1) {
                continue;
            }
            //历史导入的时候不处理编码
            //----逻辑内容----
            //1. åˆ†ç±»çš„路径可以在页面上选择是分类编号还是分类的名称
            //2. åˆ†ç±»çš„路径,必须是当前导入选择的分类的节点,以及其下级节点
            //3. é€šè¿‡æ•°æ®è¦å¯¼å…¥çš„分类去查找对应的编码规则
            //4. æ•°æ®å­˜å‚¨å’Œæ‰¹é‡ç”³è¯·ä¸€æ ·ï¼Œ
            //5. éœ€è¦å•独处理企业编码的内容,
            //     5.1 ä¼ä¸šç¼–码在当前excel里不能重复
            //     5.2 ä¼ä¸šç¼–码在系统中不能重复(可以是已经回收的)
            //     5.3 ä¼ä¸šç¼–码的长度,和编码规则的长度要对应上
            //     5.4 èŽ·å–æµæ°´ç æ®µçš„å€¼ï¼ŒåŽ»é™¤å¡«å……çš„å­—ç¬¦ï¼Œçœ‹æµæ°´å·æ˜¯å¤šå°‘ï¼Œç„¶åŽå°†æµæ°´å·å’ŒçŽ°åœ¨çš„æœ€å¤§æµæ°´å·åˆ¤æ–­ï¼Œå°äºŽå°±ç›´æŽ¥å½•å…¥ï¼Œå¤§äºŽåˆ™ä¿®æ”¹æœ€å¤§æµæ°´å·
            //     5.5 å­˜å‚¨ä¼ä¸šç¼–码到allcode中
            //查询分类和模板
            CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(codeClassifyOid);
            //先找到每一行的标题,然后根据标题来获取对应的属性
            SheetDataSet dataSet = sheetDataSetList.get(i);
            List<SheetRowData> rowDataList = dataSet.getRowData();
            //找第一行,为了找标题
            CodeClassifyTemplateVO templateVO = new CodeClassifyTemplateVO();
            /**  if (!templateService.checkChildHasSameTemplate(classifyFullInfo.getCurrentClassifyVO().getOid())) {
             throw new VciBaseException("当前的分类以及下级分类的模板不相同");
             }***/
            //都转换完了。需要批量检查
            //找所有的分类路径,需要校验路径是否正确,是否都在当前的分类的下级
            List<CodeClassifyVO> childClassifyVOs = classifyService.listChildrenClassify(codeClassifyOid, true, classifyAttr, true);
            Map<String/**路径**/, CodeClassifyVO> pathMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getPath().startsWith("#") ? s.getPath().substring(1) : s.getPath(), t -> t));
            List<String> titleRowData = dataSet.getColName();
            Map<String, String> errorMap = new ConcurrentHashMap<>();
            pathMap.put("#current#",classifyFullInfo.getCurrentClassifyVO());
            try {
                List<CodeClassifyTemplateVO> templateVOList= checkSamesTemplate(titleRowData,sheetDataSetList,i,pathMap,errorMap);
                templateVO= templateVOList.get(0);
            }catch (Throwable e){
                throw  new VciBaseException(e.getMessage());
            }
            List<SheetRowData> needowDataList = rowDataList.stream().filter(cbo -> {
                String rowIndex = cbo.getRowIndex();
                return !errorMap.containsKey(rowIndex);
            }).collect(Collectors.toList());
            //checkTemplateSync(sheetDataSetList, templateVO,i);
            //这里不除去默认的属性
            List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes();
            Map<Integer/**列号**/, String/**字段的名称**/> fieldIndexMap = new HashMap<>();
            Map<String/**中文名称**/, String/**英文名称**/> attrNameIdMap = attrVOS.stream().collect(Collectors.toMap(s -> s.getName(), t -> t.getId()));
            String idFieldName = attrVOS.stream().filter(s -> VciQueryWrapperForDO.ID_FIELD.equalsIgnoreCase(s.getId())).findFirst().orElseGet(() -> new CodeClassifyTemplateAttrVO()).getName();
            getFieldIndexMap(titleRowData, attrNameIdMap, fieldIndexMap);
            //先不用管属性是否都存在,先转换一下数据
            List<ClientBusinessObject> cboList = new ArrayList<>();
            String fullPath = getFullPath(classifyFullInfo);
            //我们需要获取到所有的下级分类的oid的路径,因为后面需要
            Map<String/**主键**/, String/**路径**/> childOidPathMap = getChildClassifyPathMap(classifyFullInfo, fullPath);
            excelToCbo(classifyFullInfo, fieldIndexMap, needowDataList, templateVO, cboList, fullPath, false);
            Map<String/**主键**/, CodeClassifyVO> classifyVOMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t));
            classifyVOMap.put(classifyFullInfo.getCurrentClassifyVO().getOid(), classifyFullInfo.getCurrentClassifyVO());
            pathMap.put("#current#", classifyFullInfo.getCurrentClassifyVO());
            //判断编号在excel里本身就重复的
            Map<String, Long> idCountMap = cboList.stream().collect(Collectors.groupingBy(ClientBusinessObject::getId, Collectors.counting()));
            List<String> repeatIdList = new ArrayList<>();
            idCountMap.forEach((id, count) -> {
                if (count > 1) {
                    repeatIdList.add(id);
                }
            });
            if (!CollectionUtils.isEmpty(repeatIdList)) {
                cboList.stream().filter(s -> repeatIdList.contains(s.getId())).map(s -> s.getAttributeValue(IMPORT_ROW_INDEX)).forEach(rowIndex -> {
                    errorMap.put(rowIndex, "编号在当前excel中重复;");
                });
            }
            //我们需要判断这些分类的模板是不是一样的,只需要校验,不用获取
            //检查分类的路径
            checkClassifyPathInHistory(cboList, errorMap, pathMap, childOidPathMap);
            //检查规则
            Map<String/**分类主键**/, String/**规则主键**/> ruleOidMap = new ConcurrentHashMap<String, String>();
            List<String> unExistRuleClassifyOidList = new CopyOnWriteArrayList<>();
            checkRuleOidInHistory(classifyVOMap, ruleOidMap, unExistRuleClassifyOidList);
            //如果出错了,我们依然执行有效的数据,无效的数据写回到excel中
            //我们根据出错的分类的主键,去找行号
            if (!CollectionUtils.isEmpty(unExistRuleClassifyOidList)) {
                cboList.stream().forEach(cbo -> {
                    if (unExistRuleClassifyOidList.contains(cbo.getAttributeValue(CODE_CLASSIFY_OID_FIELD))) {
                        String row_index = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                        errorMap.put(row_index, errorMap.getOrDefault(row_index, "") + ";根据分类路径对应的分类,没有设置编码规则");
                    }
                });
            }
            //判断必输项
            batchCheckRequiredAttrOnOrder(templateVO, cboList, errorMap);
            //有限校验编码是否存在
            batchCheckIdExistOnOrder(templateVO, cboList, errorMap);
            //boolean
            reSwitchBooleanAttrOnOrder(attrVOS, cboList);
            // æžšä¸¾çš„内容需要根据名称转换为枚举的值
            batchSwitchEnumAttrOnOrder(attrVOS, cboList, errorMap);
            batchSwitchReferAttrOnOrder(attrVOS, cboList, errorMap);
            //6.处理分类注入
            batchSwitchClassifyAttrOnOrder(attrVOS, cboList, classifyFullInfo,true);
            //设置默认值
            batchSwitchAttrDefault(attrVOS, cboList);
            //7.处理组合规则
            batchSwitchComponentAttrOnOrder(attrVOS, cboList);
            //3.判断关键属性
            CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, templateVO, cboList);
            Set<String> selfRepeatRowIndexList = keyResultVO.getSelfRepeatRowIndexList();
            Set<String> keyAttrRepeatRowIndexList = keyResultVO.getKeyAttrRepeatRowIndexList();
            if (!CollectionUtils.isEmpty(selfRepeatRowIndexList)) {
                selfRepeatRowIndexList.stream().forEach(rowIndex -> {
                    errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";在当前excel文件中关键属性重复");
                });
            }
            if (!CollectionUtils.isEmpty(keyAttrRepeatRowIndexList)) {
                keyAttrRepeatRowIndexList.stream().forEach(rowIndex -> {
                    errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";关键属性与系统中的重复");
                });
            }
            //4.校验规则
            batchCheckVerifyOnOrder(attrVOS, cboList, errorMap);
            //6.时间的,必须统一为yyyy-MM-dd HH:mm:ss
            batchSwitchDateAttrOnOrder(attrVOS, cboList, errorMap);
            if (CollectionUtils.isEmpty(ruleOidMap.values())) {
                throw new VciBaseException("导入的数据所选择的分类都没有设置编码规则");
            }
            Map<String, CodeRuleVO> ruleVOMap = ruleService.listCodeRuleByIds(ruleOidMap.values(), true).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t));
            //校验编码规则和码段是否正确
            Map<String, List<String>> ruleRowIndexMap = new ConcurrentHashMap<>();
            checkSecLengthInHistory(cboList, classifyVOMap, ruleVOMap, ruleOidMap, errorMap, ruleRowIndexMap);
            ruleRowIndexMap.keySet().parallelStream().forEach(ruleOid -> {
                List<String> rowIndexList = ruleRowIndexMap.get(ruleOid);
                List<ClientBusinessObject> thisCbos = cboList.stream().filter(cbo -> rowIndexList.contains(cbo.getAttributeValue(IMPORT_ROW_INDEX)) && !errorMap.containsKey(cbo.getAttributeValue(IMPORT_ROW_INDEX))).collect(Collectors.toList());
//我们需要先查询一下,内容是否已经存在
                if(!CollectionUtils.isEmpty(thisCbos)){
                    List<String> existIds = new ArrayList<>();
                    VciBaseUtil.switchCollectionForOracleIn(thisCbos).stream().forEach(cbos -> {
                        List<CodeAllCode> codeAllCodeList= codeAllCodeService.selectByWrapper(Wrappers.<CodeAllCode>query().lambda().eq(CodeAllCode::getCodeRuleOid, ruleOid)
                            .notIn(CodeAllCode::getId,cbos.stream().map(s -> s.getId()).collect(Collectors.toSet()).toArray(new String[0]))
                            .notIn(CodeAllCode::getLcStatus,CodeAllCodeLC.TASK_BACK.getValue() + "','" + CodeAllCodeLC.OBSOLETED.getValue())
                        );
                        existIds.addAll(Optional.ofNullable(codeAllCodeList).orElseGet(() -> new ArrayList<>()).stream().map(s -> {
                            String id = s.getId();
                            if (StringUtils.isBlank(id)) {
                                id = s.getId();
                            }
                            return id;
                        }).collect(Collectors.toList()));
                    });
                    List<String> existIdCbos = thisCbos.stream().filter(s -> {
                        String id = s.getId();
                        if (StringUtils.isBlank(id)) {
                            id = s.getAttributeValue("id");
                        }
                        return existIds.contains(id);
                    }).map(s -> s.getAttributeValue(IMPORT_ROW_INDEX)).collect(Collectors.toList());
                    if (!CollectionUtils.isEmpty(existIdCbos)) {
                        thisCbos = thisCbos.stream().filter(s -> {
                            String id = s.getId();
                            if (StringUtils.isBlank(id)) {
                                id = s.getAttributeValue("id");
                            }
                            return !existIdCbos.contains(id);
                        }).collect(Collectors.toList());
                        existIdCbos.stream().forEach(rowIndex -> {
                            errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";【" + idFieldName + "】在系统中已经被占用");
                        });
                    }
                }
            });
            Map<String, ClientBusinessObject> rowIndexCboMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue((IMPORT_ROW_INDEX)), t -> t));
            if (errorMap.size() > 0) {
                isExport=true;
                createRedisDatas(uuid + "-error", templateVO, rowIndexCboMap, dataSet, fieldIndexMap, errorMap, false);
            }
            createWriteExcelData(rowDataList, errorMap, new ArrayList<>(), titleRowData, shetNameMap, templateVO);
            List<ClientBusinessObject> needSaveCboList = cboList.stream().filter(cbo -> {
                String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                return !errorMap.containsKey(rowIndex);
            }).collect(Collectors.toList());
            //相似校验
            Map<String, String> resembleMap = new HashMap<>();
            List<DataResembleVO> dataResembleVOS = new ArrayList<>();
            String btmtypeid = classifyFullInfo.getTopClassifyVO().getBtmtypeid();
            bathcResembleQuery(templateVO.getCodeclassifyoid(), templateVO, needSaveCboList, resembleMap, btmtypeid, dataResembleVOS);
            if (resembleMap.size() > 0) {
                if (!CollectionUtils.isEmpty(dataResembleVOS)) {
                    bladeRedis.set(uuid + "-resemble-data", dataResembleVOS);
                    createRedisDatas(uuid + "-resemble", templateVO, rowIndexCboMap, dataSet, fieldIndexMap, resembleMap, false);
                }
            }
            //生成class缓存
            Map<String, String> rowIndexClsOidMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue((IMPORT_ROW_INDEX)), t -> t.getAttributeValue(CODE_CLASSIFY_OID_FIELD)));
            createRedisByCodeClassify(uuid + "-class",templateVO,dataSet,fieldIndexMap,true);
            //获取编码,查询在系统中是否被其他的引用了
            //排除错误的,剩下正确的
            Map<String, String> newErrorMap = new HashMap<>();
            newErrorMap.putAll(resembleMap);
            newErrorMap.putAll(errorMap);
            //要把以上的错误的都抛出后,再继续处理时间和组合规则
            needSaveCboList = cboList.stream().filter(cbo -> {
                String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                return !newErrorMap.containsKey(rowIndex);
            }).collect(Collectors.toList());
            if((errorMap.size()>0&&needSaveCboList.size()>0)||resembleMap.size()>0){
                isCreateUUid=true;
            }
            List<String> needRowIndexList = needSaveCboList.stream().filter(s -> errorMap.containsKey(s.getAttributeValue(IMPORT_ROW_INDEX))).map(s -> s.getAttributeValue(IMPORT_ROW_INDEX)).collect(Collectors.toList());
            if (isExport||newErrorMap.size() > 0) {
                createRedisDatas(uuid + "-ok", templateVO, rowIndexCboMap, dataSet, fieldIndexMap, newErrorMap, true);
            } else {
                List<String> dataCBOIdList=new ArrayList<>();
                //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
                List<ClientBusinessObject> finalNeedSaveCboList = needSaveCboList;
                CodeClassifyTemplateVO finalTemplateVO = templateVO;
                ruleRowIndexMap.keySet().parallelStream().forEach(ruleOid -> {
                    //VciBaseUtil.setCurrentUserSessionInfo(sessionInfo);
                    List<String> rowIndexList = ruleRowIndexMap.get(ruleOid);
                    List<ClientBusinessObject> thisCbos = finalNeedSaveCboList.stream().filter(cbo -> rowIndexList.contains(cbo.getAttributeValue(IMPORT_ROW_INDEX)) && !errorMap.containsKey(cbo.getAttributeValue(IMPORT_ROW_INDEX))).collect(Collectors.toList());
                    List<BaseModel> dataCBOList=new ArrayList<>();
                    thisCbos.stream().forEach(clientBusinessObject -> {
                        BaseModel baseModel=new BaseModel();
                        BeanUtil.convert(clientBusinessObject,baseModel);
                        baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject));
                        dataCBOList.add(baseModel);
                        dataCBOIdList.add(baseModel.getOid());
                    });
                    if (!CollectionUtils.isEmpty(thisCbos)) {
                        try {
                            productCodeService.productCodeAndSaveData(classifyFullInfo, finalTemplateVO, ruleVOMap.get(ruleOid), null, dataCBOList);
                        } catch (Throwable e) {
                            log.error("批量产生编码的时候出错了", e);
                            thisCbos.stream().forEach(cbo -> {
                                String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                                errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";系统错误,存储数据的时候出错了");
                            });
                        }
                    }
                });
                engineService.batchSaveSelectChar(templateVO, dataCBOIdList);
            }
        }
        String excelFileName="";
        if(isExport&&!CollectionUtils.isEmpty(shetNameMap)) {
            excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误信息.xls";
            WriteExcelOption eo = new WriteExcelOption();
            shetNameMap.forEach((shetName, errorDataList) -> {
                eo.addSheetDataList(shetName, errorDataList);
            });
            try {
                new File(excelFileName).createNewFile();
            } catch (IOException e) {
                throw new VciBaseException(LangBaseUtil.getErrorMsg(e));
            }
            ExcelUtil.writeDataToFile(excelFileName, eo);
        }
        CodeImProtRusultVO codeImProtRusultVO=new CodeImProtRusultVO();
        if(StringUtils.isNotBlank(excelFileName)) {
            codeImProtRusultVO.setFilePath(excelFileName);
            codeImProtRusultVO.setFileOid("");
        }
        if(isCreateUUid){
            codeImProtRusultVO.setRedisUuid(uuid);
        }
        return codeImProtRusultVO;
    }
    /***
     * ä»Žexecl里构建对象
     * @param rowDataList
     * @param errorMap
     * @param needRowIndexList
     * @param titleRowData
     * @param shetNameMap
     * @param templateVO
     */
    private void createWriteExcelData(Collection<SheetRowData> rowDataList, Map<String,String> errorMap,
                                      List<String> needRowIndexList, List<String> titleRowData, Map<String,List<WriteExcelData>> shetNameMap, CodeClassifyTemplateVO templateVO){
        List<WriteExcelData> errorDataList=new ArrayList<>();
        Map<String, SheetRowData> rowIndexDataMap = rowDataList.stream().filter(s -> !needRowIndexList.contains(s.getRowIndex())).collect(Collectors.toMap(s -> s.getRowIndex(), t -> t));
        errorDataList.add(new WriteExcelData(0,0,"错误信息"));
        for (int i = 0; i < titleRowData.size(); i++) {
            //错误信息在最后
            errorDataList.add(new WriteExcelData(0,i+1,titleRowData.get(i)));
        }
        Integer[] newRowIndex = new Integer[]{1};
        errorMap.forEach((index,error)->{
            //错误信息全部组合到一起
            SheetRowData rowData = rowIndexDataMap.getOrDefault(index, null);
            if(rowData!=null){
                errorDataList.add(new WriteExcelData(newRowIndex[0],0,error));
                rowData.getData().forEach((colIndex,value)->{
                    errorDataList.add(new WriteExcelData(newRowIndex[0],colIndex+1,value));
                });
                newRowIndex[0]++;
            }
        });
        shetNameMap.put(templateVO.getName(),errorDataList);
    }
    /***
     *
     * @param currentTemplateVO
     * @param templateColumnVOMap
     */
    private void createTemplate(CodeClassifyTemplateVO currentTemplateVO,Map<String,List<ColumnVO>>templateColumnVOMap){
        List<CodeClassifyTemplateAttrVO> templateAttrVOS = currentTemplateVO.getAttributes().stream().filter(s ->
            !DEFAULT_ATTR_LIST.contains(s.getId())
                && StringUtils.isBlank(s.getComponentRule())
                && StringUtils.isBlank(s.getClassifyInvokeAttr())
                && (VciBaseUtil.getBoolean(s.getFormDisplayFlag()))
        ).collect(Collectors.toList());
        if(CollectionUtils.isEmpty(templateAttrVOS)){
            throw new VciBaseException("模板没有配置任何【表单显示】为【是】的属性");
        }
        List<ColumnVO> columnVOList=new ArrayList<>();
        ColumnVO errorMsgColumnVO=new ColumnVO();
        errorMsgColumnVO.setTitle("错误信息");
        errorMsgColumnVO.setField("errorMsg");
        columnVOList.add(errorMsgColumnVO);
        ColumnVO pathColumnVO=new ColumnVO();
        pathColumnVO.setTitle("分类路径");
        pathColumnVO.setField("codeclsfid");
        columnVOList.add(pathColumnVO);
        templateAttrVOS.stream().forEach(codetemplateAttr ->{
            String field=codetemplateAttr.getId();
            String name=codetemplateAttr.getName();
            ColumnVO columnVO=new ColumnVO();
            columnVO.setTitle(name);
            columnVO.setField(field);
            columnVO.setWidth(codetemplateAttr.getAttrTableWidth()==0?columnVO.getWidth():codetemplateAttr.getAttrTableWidth());
            columnVOList.add(columnVO);
        });
        templateColumnVOMap.put(currentTemplateVO.getOid(),columnVOList);
        log.info("模板"+currentTemplateVO.getName()+"对应的属性"+columnVOList.size());
    }
    /**
     * é”™è¯¯ä¿¡æ¯è¿”回excel
     * @param rowDataList æ‰€æœ‰çš„导入数据
@@ -492,23 +1318,23 @@
            uuid="";
            //要把以上的错误的都抛出后,再继续处理时间和组合规则
            /*dataCBOList = cboList.stream().filter(cbo -> {
            needSaveCboList = cboList.stream().filter(cbo -> {
                String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                return !newErrorMap.containsKey(rowIndex);
            }).collect(Collectors.toList());
*/            List<String> dataCBOIdList=new ArrayList<>();
            List<BaseModel> dataCBOList=new ArrayList<>();
            cboList.stream().forEach(clientBusinessObject -> {
                BaseModel baseModel=new BaseModel();
                BeanUtil.convert(clientBusinessObject,baseModel);
                baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject));
                dataCBOList.add(baseModel);
                dataCBOIdList.add(baseModel.getOid());
            });
            if (!CollectionUtils.isEmpty(needSaveCboList)) {
                //9.我们处理业务数据
                //生成编码的内容
                List<String> dataCBOIdList=new ArrayList<>();
                List<BaseModel> dataCBOList=new ArrayList<>();
                cboList.stream().forEach(clientBusinessObject -> {
                    BaseModel baseModel=new BaseModel();
                    BeanUtil.convert(clientBusinessObject,baseModel);
                    baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject));
                    dataCBOList.add(baseModel);
                    dataCBOIdList.add(baseModel.getOid());
                });
                try {
                    codeList = productCodeService.productCodeAndSaveData(classifyFullInfo,templateVO,ruleVO, orderDTO.getSecDTOList(),dataCBOList);
                    //如果是编码生成失败,则直接就失败了,其他的判断出来有错误的我们都统一返回到excel里面
@@ -599,6 +1425,161 @@
        return dataGrid;
    }
    @Override
    public R batchImportData(List<CodeImprotSaveDatVO> codeImprotSaveDatVOList, String classifyAttr, boolean isImprot) {
        List<String> allNeedSaveCboList=new ArrayList<>();
        codeImprotSaveDatVOList.stream().forEach(codeImprotSaveDatVO -> {
            List<SheetRowData> rowDataList = new ArrayList<>();
            List<ClientBusinessObject>cboList=new ArrayList<>();
            List<String> colList=codeImprotSaveDatVO.getClos();
            CodeOrderDTO orderDTO= codeImprotSaveDatVO.getOrderDTO();
            List<Map<String, String>> dataList= codeImprotSaveDatVO.getDataList();
            Map<Integer, String> fieldIndexMap = new HashMap();
            for (int i=0;i<dataList.size();i++){
                SheetRowData sheetRowData=new SheetRowData();
                Map<String,String> dataMap= dataList.get(i);
                Map<Integer, String> data = new HashMap();
                final int[] colIndex = {0};
                Map<Integer, String> finalFieldIndexMap = new HashMap<>();
                dataMap.forEach((field, value)->{
                    if(!ROW_INDEX.equalsIgnoreCase(field) && !ERROR_MSG.equalsIgnoreCase(field)){
                        data.put(colIndex[0],value);
                        finalFieldIndexMap.put(colIndex[0]++,field);
                    }
                });
                fieldIndexMap=finalFieldIndexMap;
                sheetRowData.setData(data);
                sheetRowData.setRowIndex(i+"");
                rowDataList.add(sheetRowData);
            }
            CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid());
            log.info("分类:"+classifyFullInfo.getCurrentClassifyVO().getName()+"数据:"+codeImprotSaveDatVO.getDataList().size());
            // CodeClassifyTemplateVO codeClassifyTemplateVO=   engineService.getUsedTemplateByClassifyOid(orderDTO.getCodeClassifyOid());
            CodeClassifyTemplateVO codeClassifyTemplateVO=  templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid());
            //规则的主键需要去获取
            CodeRuleVO ruleVO = engineService.getCodeRuleByClassifyFullInfo(classifyFullInfo);
            //除去默认的属性.还有只有表单显示的字段才导入
            List<CodeClassifyTemplateAttrVO> attrVOS = codeClassifyTemplateVO.getAttributes().stream().filter(s ->
                !DEFAULT_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag())
            ).collect(Collectors.toList());
            String fullPath = getFullPath(classifyFullInfo);
            excelToCbo(classifyFullInfo,fieldIndexMap,rowDataList, codeClassifyTemplateVO,cboList,fullPath,!isImprot);
            Map<String,String> errorMap=new HashMap<>();
            if(isImprot) {
                Map<String/**主键**/, String/**路径**/> childOidPathMap = getChildClassifyPathMap(classifyFullInfo, fullPath);
                //都转换完了。需要批量检查
                //找所有的分类路径,需要校验路径是否正确,是否都在当前的分类的下级
                List<CodeClassifyVO> childClassifyVOs = classifyService.listChildrenClassify(orderDTO.getCodeClassifyOid(), true, classifyAttr, true);
                Map<String/**路径**/, CodeClassifyVO> pathMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getPath().startsWith("#") ? s.getPath().substring(1) : s.getPath(), t -> t));
                Map<String/**主键**/, CodeClassifyVO> classifyVOMap = Optional.ofNullable(childClassifyVOs).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t));
                classifyVOMap.put(classifyFullInfo.getCurrentClassifyVO().getOid(), classifyFullInfo.getCurrentClassifyVO());
                pathMap.put("#current#", classifyFullInfo.getCurrentClassifyVO());
                //我们需要判断这些分类的模板是不是一样的,只需要校验,不用获取
                //检查分类的路径
                checkClassifyPathInHistory(cboList, errorMap, pathMap, childOidPathMap);
            }
            //分类注入
            batchSwitchClassifyAttrOnOrder(attrVOS,cboList,classifyFullInfo,isImprot);
            //boolean
            reSwitchBooleanAttrOnOrder(attrVOS,cboList);
            //4.校验规则
            batchCheckVerifyOnOrder(attrVOS, cboList,errorMap);
            //5.校验枚举是否正确
            batchSwitchEnumAttrOnOrder(attrVOS, cboList, errorMap);
            //7.处理参照的情况
            batchSwitchReferAttrOnOrder(attrVOS,cboList,errorMap);
            //6.时间格式的验证
            //6.时间的,必须统一为yyyy-MM-dd HH:mm:ss
            batchSwitchDateAttrOnOrder(attrVOS,cboList,errorMap);
            //设置默认值
            batchSwitchAttrDefault(attrVOS, cboList);
            //最后弄组合规则
            batchSwitchComponentAttrOnOrder(attrVOS,cboList);
            //3.判断关键属性
            CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, codeClassifyTemplateVO, cboList);
            Set<String> selfRepeatRowIndexList = keyResultVO.getSelfRepeatRowIndexList();
            Set<String> keyAttrRepeatRowIndexList = keyResultVO.getKeyAttrRepeatRowIndexList();
            if(!CollectionUtils.isEmpty(keyAttrRepeatRowIndexList)){
                keyAttrRepeatRowIndexList.stream().forEach(rowIndex->{
                    errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";关键属性与系统中的重复" );
                });
            }
            //4.校验规则
            batchCheckVerifyOnOrder(attrVOS, cboList,errorMap);
            //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
            List<ClientBusinessObject>needSaveCboList = cboList.stream().filter(cbo -> {
                String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                return !errorMap.containsKey(rowIndex);
            }).collect(Collectors.toList());
            log.info("分类:"+classifyFullInfo.getCurrentClassifyVO().getName()+"数据:"+needSaveCboList.size());
            if (!CollectionUtils.isEmpty(needSaveCboList)) {
                List<BaseModel> dataCBOList=new ArrayList<>();
                needSaveCboList.stream().forEach(clientBusinessObject -> {
                    BaseModel baseModel=new BaseModel();
                    BeanUtil.convert(clientBusinessObject,baseModel);
                    baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject));
                    dataCBOList.add(baseModel);
                    allNeedSaveCboList.add(baseModel.getOid());
                });
                try {
                //9.我们处理业务数据
                    if (isImprot) {
                        productCodeService.productCodeAndSaveData(classifyFullInfo, codeClassifyTemplateVO, ruleVO, null, dataCBOList);
                    }else {
                        productCodeService.productCodeAndSaveData(classifyFullInfo, codeClassifyTemplateVO, ruleVO, orderDTO.getSecDTOList(), dataCBOList);
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            //如果是编码生成失败,则直接就失败了,其他的判断出来有错误的我们都统一返回到excel里面
            engineService.batchSaveSelectChar(codeClassifyTemplateVO, allNeedSaveCboList);
        });
        return  R.success(isImprot?"批量历史导入成功":"批量申请成功");
    }
    /***
     *根据数据oid从缓存中移除数据
     * @param redisOid redisid
     * @param codeClssifyOid å­˜å‚¨è§„则的oid
     * @param dataOids  æ‰€éœ€åˆ é™¤çš„æ•°æ®
     * @return
     */
    @Override
    public R deleteDatas(String redisOid,String codeClssifyOid,String dataOids) {
        VciBaseUtil.alertNotNull(redisOid, "数据删除", redisOid, "数据缓存主键");
        VciBaseUtil.alertNotNull(codeClssifyOid, "数据删除", codeClssifyOid, "编码规则缓存主键");
        VciBaseUtil.alertNotNull(dataOids, "数据删除", dataOids, "所需删除的数据主键");
        try {
            List<CodeImprotDataVO> codeImprotDataVOs = bladeRedis.lRange(redisOid + "-" + codeClssifyOid,0,-1);
            List<String> dataOidList = new ArrayList<>();
            codeImprotDataVOs.stream().forEach(codeImprotDataVO -> {
                List<Map<String, String>> newDataList = new ArrayList<>();
                List<Map<String, String>> dataList = codeImprotDataVO.getDatas();
                dataList.stream().forEach(dataMap -> {
                    String oid = dataMap.get("oid");
                    if (!dataOidList.contains(oid)) {
                        newDataList.add(dataMap);
                    }
                });
                codeImprotDataVO.setDatas(newDataList);
            });
            //重新缓存
            bladeRedis.del(redisOid + "-" + codeClssifyOid);
            bladeRedis.set(redisOid + "-" + codeClssifyOid, codeImprotDataVOs);
            bladeRedis.expire(redisOid + "-" + codeClssifyOid, BATCHADD_REDIS_TIME);
            return R.success("删除缓存数据成功");
        }catch (Throwable e){
            return R.fail("删除缓存数据失败!");
        }
    }
    /**
     * é›†æˆæ‰¹é‡ç”³è¯·æ•°æ®
     * @param orderDTO åˆ†ç±»çš„主键
@@ -642,7 +1623,7 @@
        if(!CollectionUtils.isEmpty(unExistAttrVOs)){
            throw new VciBaseException("【" + unExistAttrVOs.stream().map(CodeClassifyTemplateAttrVO::getName) + "】这些属性在excel中没有找到");
        }
        List<ClientBusinessObject> cboList = new ArrayList<>();
        String fullPath = getFullPath(classifyFullInfo);
        // List<CodeClassifyProcessTempVO> codeClassifyProcessTempVOS=codeClassifyProcessTempService.listProcessTemplate(templateVO.getOid(),"code_cls_flow_use_order");
@@ -651,19 +1632,781 @@
        /** if(!CollectionUtils.isEmpty(codeClassifyProcessTempVOS)){
         isProcess=true;
         }***/
        //List<ClientBusinessObject> cboList = new ArrayList<>();
        //Map<String,String> codeOidToSystemOidMap=new HashMap<>();//存储编码数据和集成系统数据oid对照映射
        //excelToCbo(classifyFullInfo,titleRowData,fieldIndexMap,rowDataList,templateVO,cboList,fullPath,isProcess,"create",errorMap,codeOidToSystemOidMap);
        Map<String,String> codeOidToSystemOidMap=new HashMap<>();//存储编码数据和集成系统数据oid对照映射
        excelToCbo(classifyFullInfo,titleRowData,fieldIndexMap,rowDataList,templateVO,cboList,fullPath,isProcess,"create",errorMap,codeOidToSystemOidMap);
        //都转换完了。需要批量检查
        //如果出错了,我们依然执行有效的数据,无效的数据写回到excel中
        //2.判断必输项。。需要全部的属性,如果是必输,但是表单里面不显示的,只能是分类注入或者组合规则
        batchCheckRequiredAttrOnOrder(templateVO,cboList,errorMap);
        /**
         * å…³é”®ç†Ÿæ‚‰é”™è¯¯æç¤º
         */
        Map<String,String> errorKeyMap=new HashMap<>();
        //3.判断关键属性
        CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, templateVO, cboList);
        Set<String> selfRepeatRowIndexList = keyResultVO.getSelfRepeatRowIndexList();
        Set<String> keyAttrRepeatRowIndexList = keyResultVO.getKeyAttrRepeatRowIndexList();
        if(!CollectionUtils.isEmpty(selfRepeatRowIndexList)){
            selfRepeatRowIndexList.stream().forEach(rowIndex->{
               /* //传入数据之间关键属性的校验
                RowDatas rowData= rowDataMap.get(rowIndex);
                XMLResultDataObjectDetailDO resultDataObjectDetailDO=new XMLResultDataObjectDetailDO();
                resultDataObjectDetailDO.setCode("");
                resultDataObjectDetailDO.setId(rowData.getOid());
                resultDataObjectDetailDO.setErrorid("1");
                resultDataObjectDetailDO.setMsg(errorMap.getOrDefault(rowIndex,"") + ";关键属性重复");
                resultDataObjectDetailDOs.add(resultDataObjectDetailDO);
                */
                errorKeyMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";传入的数据中关键属性重复");
            });
        }
        /****
         * å…³é”®å±žæ€§ä¸Žç³»ç»Ÿä¸­é‡å¤çš„判断
         */
        if(!CollectionUtils.isEmpty(keyAttrRepeatRowIndexList)){
            keyAttrRepeatRowIndexList.stream().forEach(rowIndex->{
                //传入数据之间关键属性的校验
               /* RowDatas rowData= rowDataMap.get(rowIndex);
                XMLResultDataObjectDetailDO resultDataObjectDetailDO=new XMLResultDataObjectDetailDO();
                resultDataObjectDetailDO.setCode("");
                resultDataObjectDetailDO.setId(rowData.getOid());
                resultDataObjectDetailDO.setErrorid("1");
                resultDataObjectDetailDO.setMsg(errorMap.getOrDefault(rowIndex,"") + ";关键属性与系统中的重复" );
                resultDataObjectDetailDOs.add(resultDataObjectDetailDO);
                */
                errorKeyMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";关键属性与系统中的重复" );
            });
        }
        //分类注入
        batchSwitchClassifyAttrOnOrder(attrVOS,cboList,classifyFullInfo,false);
        //boolean
        reSwitchBooleanAttrOnOrder(attrVOS,cboList);
        // cboList.stream().forEach(cbo->{
        //4.校验规则
        batchCheckVerifyOnOrder(attrVOS, cboList,errorMap);
        //5.校验枚举是否正确
        batchSwitchEnumAttrOnOrder(attrVOS,cboList,errorMap);
        //6.时间格式的验证
        //6.时间的,必须统一为yyyy-MM-dd HH:mm:ss
        batchSwitchDateAttrOnOrder(attrVOS,cboList,errorMap);
        //7.处理参照的情况
        batchSwitchReferAttrOnOrder(attrVOS,cboList,errorMap);
        //校验属性是否正确错误信息
        if(errorMap.size()>0){
            String[] newMsg = {""};
            cboList.stream().forEach(cbo -> {
                String rowIndex =cbo.getAttributeValue(IMPORT_ROW_INDEX);
                if(errorMap.containsKey(rowIndex)){
                    String oid=cbo.getOid();
                    String sourceOid=oid;
                    if(codeOidToSystemOidMap.containsKey(oid)){
                        sourceOid=codeOidToSystemOidMap.get(oid);
                    }
                    String code="";
                    String errorid="103";
                    String mes=errorMap.get(rowIndex);
                    XMLResultDataObjectDetailDO resultDataObjectDetailDO=new XMLResultDataObjectDetailDO();
                    resultDataObjectDetailDO.setCode(code);
                    resultDataObjectDetailDO.setId(sourceOid);
                    resultDataObjectDetailDO.setErrorid(errorid);
                    resultDataObjectDetailDO.setMsg(mes);
                    resultDataObjectDetailDOs.add(resultDataObjectDetailDO);
                }
            });
        }
        Map<String,String> newKeyMap=new HashedMap();
        if(errorKeyMap.size()>0 ) {
            errorKeyMap.keySet().forEach(key->{
                if(!errorMap.containsKey(key)){
                    newKeyMap.put(key,errorKeyMap.get(key));
                }
            });
            if(newKeyMap.size()>0) {
                List<BaseModel> editBoList = new ArrayList<>();
                Map<String, List<BaseModel>> indexTodataMap = keyResultVO.getIndexTODataMap();
                cboList.stream().forEach(cbo -> {
                    String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                    if (indexTodataMap.containsKey(rowIndex)) {
                        String oid = cbo.getOid();
                        String sourceOid = oid;
                        String code = "";
                        String errorid = "201";
                        if(codeOidToSystemOidMap.containsKey(oid)){
                            sourceOid=codeOidToSystemOidMap.get(oid);
                        }
                        List<BaseModel> newCboList = indexTodataMap.get(rowIndex);
                        if (!CollectionUtils.isEmpty(newCboList)) {
                            BaseModel newCbo= newCboList.get(0);
                            String lcstatus =newCbo.getLcStatus();
                            String newOid =newCbo.getOid();
                            Date ts =newCbo.getTs();
                            code=newCbo.getId();
                            String lastmodifier=newCbo.getLastModifier();
                            if (!lcstatus.equals(CodeDefaultLC.RELEASED.getValue())) {
                                newCbo.setOid(newOid);
                                newCbo.setLastModifier(lastmodifier);
                                newCbo.setId(code);
                                newCbo.setTs(ts);
                                cbo.setLastModifier(cbo.getLastModifier());
                                editBoList.add(newCbo);
                            }
                            String mes = errorKeyMap.get(rowIndex);
                            XMLResultDataObjectDetailDO resultDataObjectDetailDO = new XMLResultDataObjectDetailDO();
                            resultDataObjectDetailDO.setCode(code);
                            resultDataObjectDetailDO.setId(sourceOid);
                            resultDataObjectDetailDO.setErrorid(errorid);
                            resultDataObjectDetailDO.setMsg(mes);
                            resultDataObjectDetailDOs.add(resultDataObjectDetailDO);
                        }
                    }
                });
                //关键熟悉更改
                if (!CollectionUtils.isEmpty(editBoList)) {
                    engineService.updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmtypeid(),editBoList);//保存数据
                }
                errorMap.putAll(errorKeyMap);
            }
        }
        //  });
        //设置默认值
        batchSwitchAttrDefault(attrVOS, cboList);
        //最后弄组合规则
        batchSwitchComponentAttrOnOrder(attrVOS,cboList);
        //要把以上的错误的都抛出后,再继续处理时间和组合规则
        List<ClientBusinessObject> needSaveCboList = cboList.stream().filter(cbo -> {
            String rowIndex =cbo.getAttributeValue(IMPORT_ROW_INDEX);
            return !errorMap.containsKey(rowIndex);
        }).collect(Collectors.toList());
        List<String> needRowIndexList = new ArrayList<>();
        if(!CollectionUtils.isEmpty(needSaveCboList)) {
            //9.我们处理业务数据
            //生成编码的内容
            List<String>allNeedSaveCboList=new ArrayList<>();
            List<BaseModel> dataCBOList=new ArrayList<>();
            needSaveCboList.stream().forEach(clientBusinessObject -> {
                BaseModel baseModel=new BaseModel();
                BeanUtil.convert(clientBusinessObject,baseModel);
                baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject));
                dataCBOList.add(baseModel);
                allNeedSaveCboList.add(baseModel.getOid());
            });
            try {
                productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(), dataCBOList);
                //如果是编码生成失败,则直接就失败了,其他的判断出来有错误的我们都统一返回到excel里面
                engineService.batchSaveSelectChar(templateVO, allNeedSaveCboList);
                // if(!isProcess){
                needSaveCboList.stream().forEach(needSaveCbo->{
                    XMLResultDataObjectDetailDO resultDataObjectDetailDO=new XMLResultDataObjectDetailDO();
                    resultDataObjectDetailDO.setCode(needSaveCbo.getId());
                    String oid=needSaveCbo.getOid();
                    String sourceOid=oid;
                    if(codeOidToSystemOidMap.containsKey(oid)){
                        sourceOid=codeOidToSystemOidMap.get(oid);
                    }
                    resultDataObjectDetailDO.setId(sourceOid);
                    resultDataObjectDetailDO.setErrorid("0");
                    resultDataObjectDetailDO.setMsg("申请编码成功");
                    resultDataObjectDetailDOs.add(resultDataObjectDetailDO);
                });
               /* }else{
                    needSaveCboList.stream().forEach(needSaveCbo->{
                        XMLResultDataObjectDetailDO resultDataObjectDetailDO=new XMLResultDataObjectDetailDO();
                       // resultDataObjectDetailDO.setCode(needSaveCbo.getId());//不用返回编码
                        String oid=needSaveCbo.getOid();
                        String sourceOid=oid;
                        if(codeOidToSystemOidMap.containsKey(oid)){
                            sourceOid=codeOidToSystemOidMap.get(oid);
                        }
                        resultDataObjectDetailDO.setId(sourceOid);
                        resultDataObjectDetailDO.setErrorid("204");
                        resultDataObjectDetailDO.setMsg("申请编码成功,等待编码系统发布!");
                        resultDataObjectDetailDOs.add(resultDataObjectDetailDO);
                    });
                }*/
            }catch (Throwable e){
                e.printStackTrace();
                needSaveCboList.stream().forEach(needSaveCbo->{
                    XMLResultDataObjectDetailDO resultDataObjectDetailDO=new XMLResultDataObjectDetailDO();
                    resultDataObjectDetailDO.setCode("");
                    String oid=needSaveCbo.getOid();
                    String sourceOid=oid;
                    if(codeOidToSystemOidMap.containsKey(oid)){
                        sourceOid=codeOidToSystemOidMap.get(oid);
                    }
                    resultDataObjectDetailDO.setId(sourceOid);
                    resultDataObjectDetailDO.setErrorid("1");
                    resultDataObjectDetailDO.setMsg("保存出现问题:"+e.getMessage());
                    resultDataObjectDetailDOs.add(resultDataObjectDetailDO);
                });
            }
        }
    }
    /***
     * é›†æˆæ‰¹é‡åŒæ­¥æ›´æ–°æŽ¥å£
     * @param codeClassifyVO;
     * @param dataObjectVO æ•°æ®ä¿¡æ¯
     * @param resultDataObjectDetailDOs é”™è¯¯ä¿¡æ¯
     */
    @Override
    public void batchSyncEditDatas(CodeClassifyVO codeClassifyVO, DataObjectVO dataObjectVO, LinkedList<XMLResultDataObjectDetailDO> resultDataObjectDetailDOs) {
        String errorid="";
        String msg="";
        //查询分类和模板
        //先找到每一行的标题,然后根据标题来获取对应的属性
        List<RowDatas> rowDataList = dataObjectVO.getRowData();
        Map<String, RowDatas> rowDataMap = new LinkedHashMap<>();
        Map<String, RowDatas> codeDataMap = new LinkedHashMap<>();
        rowDataList.stream().forEach(rowData -> {
            rowDataMap.put(rowData.getRowIndex(), rowData);
            codeDataMap.put(rowData.getCode(), rowData);
        });
        //找第一行,为了找标题
        CodeClassifyTemplateVO templateVO = engineService.getUsedTemplateByClassifyOid(codeClassifyVO.getOid());
        // åº”该都是一个分类下的业务数据,找第一条的就行
        CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(codeClassifyVO.getOid());
        //校验模板是不是最新的
        //checkTemplateSync(sheetDataSetList,templateVO);
        //除去默认的属性.还有只有表单显示的字段才导入
        List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> !DEFAULT_SYNC_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag())
        ).collect(Collectors.toList());
        Map<Integer/**列号**/, String/**字段的名称**/> fieldIndexMap = new HashMap<>();
        List<String> titleRowData = dataObjectVO.getColName();
        Map<String/**中文名称**/, String/**英文名称**/> attrNameIdMap = attrVOS.stream().collect(Collectors.toMap(s -> s.getName(), t -> t.getId().toLowerCase(Locale.ROOT), (o1, o2) -> o2));
        getFieldIndexMap(titleRowData, attrNameIdMap, fieldIndexMap);
        Map<String, String> cboOidMap = new HashMap<>();
        cboOidMap.put("id", QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0])) + ")");
        R<BtmTypeVO>  r= btmTypeClient.getDetail(templateVO.getBtmTypeId());
        BtmTypeVO btmTypeVO =r.getData();
        String tableName=btmTypeVO.getTableName();
        StringBuffer sb=new StringBuffer();
        sb.append(" select * from ");
        sb.append(tableName);
        sb.append(" where 1=1 ");
        sb.append(" id in (");
        sb.append(VciBaseUtil.toInSql(codeDataMap.keySet().toArray(new String[0])));
        sb.append(")");
        List<Map<String,String>> dataMapList=commonsMapper.queryByOnlySqlForMap(sb.toString());
        List<ClientBusinessObject> cboList=    ChangeMapTOClientBusinessObjects(dataMapList);
        Map<String, ClientBusinessObject> codeSystemObjectMap = cboList.stream().filter(systeDataObject -> systeDataObject != null && StringUtils.isNotBlank(systeDataObject.getId())).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getId(), t -> t));
        Map<String, String> errorMap = new HashMap<>();
        List<CodeOrderDTO> codeOrderDTOList = new ArrayList<>();
        this.getCodeOrderDTOs(codeClassifyVO, templateVO, codeDataMap, codeSystemObjectMap, codeOrderDTOList, errorMap);
        // List<CodeClassifyProcessTempVO> codeClassifyProcessTempVOS=codeClassifyProcessTempService.listProcessTemplate(templateVO.getOid(),"code_cls_flow_use_order");
        boolean isProcess=false;
        /**  if(!CollectionUtils.isEmpty(codeClassifyProcessTempVOS)){
         isProcess=true;
         }**/
        Map<String, CodeOrderDTO> orderDTOMap = codeOrderDTOList.stream().filter(orderDTO -> orderDTO != null && StringUtils.isNotBlank(orderDTO.getId())).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getId(), t -> t));
        List<BaseModel> updateList = new ArrayList<>();
        List<CodeAllCode> codeAllCodeList = new ArrayList<>();
        List<String> deleteList = new ArrayList<>();
        CodeClassifyTemplateVO firstTemplateVO = templateService.getObjectHasAttrByOid(orderDTOMap.values().stream().findFirst().get().getTemplateOid());
        Map<String, ClientBusinessObject> cboMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getId(), t -> t));
        //  boolean finalIsProcess = isProcess;
        orderDTOMap.keySet().stream().forEach(code -> {
            CodeOrderDTO orderDTO = orderDTOMap.get(code);
            ClientBusinessObject cbo = cboMap.get(code);
            String dataStatus=cbo.getLcStatus();
            RowDatas rowData=codeDataMap.get(code);
            String status=rowData.getStatus();
            String operation=rowData.getOperation();
            if (cbo.getTs().compareTo(orderDTO.getTs())==0?true:false) {
                // throw new VciBaseException("数据不是最新的,可能他人已经修改,请刷新后再试");
                errorMap.put(orderDTO.getId(),errorMap.getOrDefault(orderDTO.getId(),"")+";数据不是最新的,可能他人已经修改,请刷新后再试");
            }
           /* if (!CodeDefaultLC.EDITING.getValue().equalsIgnoreCase(cbo.getLcStatus()) && !orderDTO.isEditInProcess()) {
                throw new VciBaseException("数据不是{0}的状态,不允许修改", new String[]{CodeDefaultLC.EDITING.getText()});
            }*/
            if(operation.equals("update")) {
                //1. åˆ¤æ–­å¿…输项
                checkRequiredAttrOnOrder(templateVO, orderDTO, errorMap);
                //2.先注入,再组合,最后校验
                switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO, errorMap);
                //3.处理组合规则。组合规则不能使用编码的属性,因为编码的生成可能是需要属性的
                switchComponentAttrOnOrder(templateVO, orderDTO);
                //4.校验规则
                checkVerifyOnOrder(templateVO, orderDTO, errorMap);
                //5.判断关键属性
                checkKeyAttrOnOrder(classifyFullInfo, templateVO, orderDTO, errorMap);
                //6.校验枚举的内容是否正确
                checkEnumOnOrder(templateVO, orderDTO, errorMap);
                //7.处理时间格式,在数据库里面不论是字符串还是日期格式,都使用相同的格式存储
                switchDateAttrOnOrder(templateVO, orderDTO);
                //默认的内容不能变,所以只需要拷贝自定义的相关属性即可
                copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, true, errorMap);
                //企业码和集团码的不修改
                cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription());
                cbo.setName(orderDTO.getName());
                try {
                    cbo.setAttributeValueWithNoCheck("description", orderDTO.getDescription());
                    cbo.setAttributeValue("name", orderDTO.getName());
                    //  if(finalIsProcess){//在流程中不允许更改
                    //     errorMap.put(code,errorMap.getOrDefault(code, errorMap.getOrDefault(code,"")+";数据"+code+"在流程中,不允许更改!"));
                    //  }else{
                    cbo.setLcStatus(status);
                    cbo.setAttributeValue("lcstatus",status);
                    //  }
                } catch (VciBaseException e) {
                    e.printStackTrace();
                }
                List<CodeAllCode>newCodeAllCodeList= codeAllCodeService.selectByWrapper(Wrappers.<CodeAllCode>query().lambda().eq(CodeAllCode::getCreateCodeOid, cbo.getOid()));
                if (!CollectionUtils.isEmpty(newCodeAllCodeList)) {
                    CodeAllCode codeCbo = codeAllCodeList.get(0);
                    log.info("codeCbos code:" + codeCbo.getId());
                    codeCbo.setLcStatus(status);
                    codeAllCodeList.add(codeCbo);
                }
                BaseModel baseModel=new BaseModel();
                BeanUtil.convert(cbo,baseModel);
                baseModel.setData(VciBaseUtil.objectToMapString(cbo));
                updateList.add(baseModel);
            }else if(operation.equals("delete")){//如果在流程中不允许删除,不在流程中状态为发布或者停用的数据不允许删除,将其更改为停用,其他的情况直接删除
                //  if(finalIsProcess){
                //    errorMap.put(code,errorMap.getOrDefault(code, errorMap.getOrDefault(code,"")+";数据"+code+"在流程中,不允许删除!"));
                //}else {
                try {
                    log.info("oid:" + cbo.getOid());
                    List<CodeAllCode>newCodeAllCodeList= codeAllCodeService.selectByWrapper(Wrappers.<CodeAllCode>query().lambda().eq(CodeAllCode::getCreateCodeOid, cbo.getOid()));
                    log.info("codeCbos size:" + newCodeAllCodeList.size());
                    if (!CollectionUtils.isEmpty(newCodeAllCodeList)) {
                        CodeAllCode codeCbo = codeAllCodeList.get(0);
                        log.info("codeCbos code:" + codeCbo.getId());
                        codeCbo.setLcStatus(CodeDefaultLC.TASK_BACK.getValue());
                        codeAllCodeList.add(codeCbo);
                    }
                    deleteList.add(cbo.getOid());
                }catch (VciBaseException e) {
                    e.printStackTrace();
                }
                // }
            }else if(operation.equals("editstatus")){
                try {
                    //  if (finalIsProcess) {
                    //      errorMap.put(code, errorMap.getOrDefault(code, errorMap.getOrDefault(code, "") + ";数据" + code + "在流程中,不允许更改状态!"));
                    //   } else {
                    cbo.setLcStatus(status);
                    cbo.setAttributeValue("lcstatus", status);
                    //  }
                    List<CodeAllCode>newCodeAllCodeList= codeAllCodeService.selectByWrapper(Wrappers.<CodeAllCode>query().lambda().eq(CodeAllCode::getCreateCodeOid, cbo.getOid()));
                    if (!CollectionUtils.isEmpty(newCodeAllCodeList)) {
                        CodeAllCode codeCbo = codeAllCodeList.get(0);
                        log.info("codeCbos code:" + codeCbo.getId());
                        codeCbo.setLcStatus(status);
                        codeAllCodeList.add(codeCbo);
                    }
                    BaseModel baseModel=new BaseModel();
                    BeanUtil.convert(cbo,baseModel);
                    baseModel.setData(VciBaseUtil.objectToMapString(cbo));
                    updateList.add(baseModel);
                }catch (VciBaseException e) {
                    e.printStackTrace();
                }
            }
        });
        /**
         * é”™è¯¯ä¿¡æ¯è¾“出
         */
        if(errorMap.size()>0){
            errorMap.keySet().forEach(code->{
                if(codeDataMap.containsKey(code)){
                    RowDatas rowDatas=  codeDataMap.get(code);
                    String dataMsg=errorMap.get(code);
                    String oid=rowDatas.getOid();
                    XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO=new XMLResultDataObjectDetailDO();
                    xmlResultDataObjectDetailDO.setErrorid("103");
                    xmlResultDataObjectDetailDO.setMsg(dataMsg);
                    xmlResultDataObjectDetailDO.setId(oid);
                    xmlResultDataObjectDetailDO.setCode(code);
                    resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO);
                }
            });
        }else {
            //存储数据
            try {
                engineService.updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmtypeid(),updateList);
                codeAllCodeService.saveBatch(codeAllCodeList);
                if(deleteList.size()>0) {
                    commonsMapper.deleteByTaleAndOid(tableName, VciBaseUtil.array2String(deleteList.toArray(new String[]{})));
                }
                errorid="0";
                msg="更新/状态更改/删除成功!";
            }catch (Throwable e){
                errorid="1";
                msg="保存失败:"+e;
            }finally {
                String finalMsg = msg;
                String finalErrorid = errorid;
                cboList.stream().forEach(cbo->{
                    String code =cbo.getId();
                    if(codeDataMap.containsKey(code)) {
                        RowDatas rowDatas=codeDataMap.get(code);
                        String oid=rowDatas.getOid();
                        XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO();
                        xmlResultDataObjectDetailDO.setErrorid(finalErrorid);
                        xmlResultDataObjectDetailDO.setMsg(finalMsg);
                        xmlResultDataObjectDetailDO.setId(oid);
                        xmlResultDataObjectDetailDO.setCode(code);
                        resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO);
                    }
                });
            }
        }
    }
    /**
     * æ ¡éªŒå±žæ€§æ˜¯å¦ä¸ºå¿…输
     *
     * @param templateVO æ¨¡æ¿çš„æ˜¾ç¤ºå¯¹è±¡ï¼Œéœ€è¦åŒ…含模板属性
     * @param orderDTO   ç¼–码申请的信息
     */
    private void checkRequiredAttrOnOrder(CodeClassifyTemplateVO templateVO, CodeOrderDTO orderDTO,Map<String,String> errorMap) {
        Map<String, CodeClassifyTemplateAttrVO> requiredAttrMap = templateVO.getAttributes().stream().filter(
                s -> VciBaseUtil.getBoolean(s.getRequireFlag()) && StringUtils.isBlank(s.getComponentRule())
                    && StringUtils.isBlank(s.getClassifyInvokeAttr()))
            .collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        if (!CollectionUtils.isEmpty(requiredAttrMap)) {
            requiredAttrMap.forEach((attrId, attrVO) -> {
                //只有企业编码,状态,备注,模板主键,分类主键这几个是固定的,其余都是自行配置的
                if (StringUtils.isBlank(getValueFromOrderDTO(orderDTO, attrId))) {
                    errorMap.put(orderDTO.getId(),errorMap.getOrDefault(orderDTO.getId(),"") + ";属性【{"+attrVO.getName()+"}】必须要输入(选择)内容" );
                    //  throw new VciBaseException("属性【{0}】必须要输入(选择)内容", new String[]{attrVO.getName()});
                }
            });
        }
    }
    /**
     * è½¬æ¢ç»„合规则的值
     *
     * @param templateVO æ¨¡æ¿çš„æ˜¾ç¤ºå¯¹è±¡ï¼Œéœ€è¦åŒ…含模板属性
     * @param orderDTO   ç¼–码申请的信息
     */
    private void switchComponentAttrOnOrder(CodeClassifyTemplateVO templateVO, CodeOrderDTO orderDTO) {
        Map<String, CodeClassifyTemplateAttrVO> compAttrVOMap = templateVO.getAttributes().stream().filter(s -> StringUtils.isNotBlank(s.getComponentRule())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        if (!CollectionUtils.isEmpty(compAttrVOMap)) {
            Map<String, String> dataMap = WebUtil.objectToMapString(orderDTO);
            Map<String, String> dataLowMap = new HashMap<>();
            if (!CollectionUtils.isEmpty(dataMap)) {
                dataMap.forEach((key, value) -> {
                    dataLowMap.put(key.toLowerCase(Locale.ROOT), value);
                });
            }
            dataLowMap.putAll(orderDTO.getData());
            compAttrVOMap.forEach((attrId, attrVO) -> {
                dataLowMap.put(attrId, formulaService.getValueByFormula(dataLowMap, attrVO.getComponentRule()));
            });
            dataLowMap.forEach((key, value) -> {
                setValueToOrderDTO(orderDTO, key, value);
            });
        }
    }
    /**
     * æ ¡éªŒæ­£åˆ™è¡¨è¾¾å¼æ˜¯å¦æ­£ç¡®
     *
     * @param templateVO æ¨¡æ¿çš„信息,必须包含属性的内容
     * @param orderDTO   ç¼–码申请的相关的信息
     */
    private void checkVerifyOnOrder(CodeClassifyTemplateVO templateVO, CodeOrderDTO orderDTO,Map<String,String> errorMap) {
        Map<String, CodeClassifyTemplateAttrVO> verifyAttrVOMap = templateVO.getAttributes().stream().filter(s -> StringUtils.isNotBlank(s.getVerifyRule())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        if (!CollectionUtils.isEmpty(verifyAttrVOMap)) {
            verifyAttrVOMap.forEach((attrId, attrVO) -> {
                String value = getValueFromOrderDTO(orderDTO, attrId);
                if (StringUtils.isNotBlank(value) && !value.matches(attrVO.getVerifyRule())) {
                    errorMap.put(orderDTO.getId(),errorMap.getOrDefault(orderDTO.getId(),"")+";属性["+attrVO.getName()+"]的值不符合校验规则的要求");
                    //校验正则表达式
                    // throw new VciBaseException("属性[{0}]的值不符合校验规则的要求", new String[]{attrVO.getName()});
                }
            });
        }
    }
    /**
     * æ ¡éªŒå…³é”®å±žæ€§
     *
     * @param classifyFullInfo åˆ†ç±»çš„全部信息
     * @param templateVO       æ¨¡æ¿çš„内容,必须包含模板属性
     * @param orderDTO         ç¼–码申请的相关的信息
     */
    private void checkKeyAttrOnOrder(CodeClassifyFullInfoBO classifyFullInfo, CodeClassifyTemplateVO templateVO, CodeOrderDTO orderDTO,Map<String,String> errorMap) {
        //先获取关键属性的规则,也利用继承的方式
        CodeKeyAttrRepeatVO keyRuleVO = keyRuleService.getRuleByClassifyFullInfo(classifyFullInfo);
        //注意的是keyRuleVO可能为空,表示不使用规则控制
        //获取所有的关键属性
        Map<String, CodeClassifyTemplateAttrVO> ketAttrMap = templateVO.getAttributes().stream().filter(s -> VciBaseUtil.getBoolean(s.getKeyAttrFlag())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        Map<String, String> conditionMap = new HashMap<>();
        boolean trimAll = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnoreallspaceflag());
        //全部去空的优先级大于去空
        boolean trim = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorespaceflag());
        boolean ignoreCase = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorecaseflag());
        boolean ignoreWidth = keyRuleVO == null ? false : VciBaseUtil.getBoolean(keyRuleVO.getIgnorewidthflag());
        ketAttrMap.forEach((attrId, attrVO) -> {
            String value = getValueFromOrderDTO(orderDTO, attrId);
            if (value == null) {
                value = "";
            }
            engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap);
        });
        //没有限制分类,但是一个模板只可能在一个业务类型里面,所以直接查询这个业务类型即可
        if (!CollectionUtils.isEmpty(conditionMap)) {
            final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " where 1 = 1 "};
            conditionMap.forEach((key, value) -> {
                sql[0] += " and " + key + " = " + value;
            });
            if (StringUtils.isNotBlank(orderDTO.getOid())) {
                //修改的时候,需要排除自己
                sql[0] += " and oid != '" + orderDTO.getOid() + "'";
            } else if (StringUtils.isNotBlank(orderDTO.getCopyFromVersion())) {
                sql[0] += " and oid != '" + orderDTO.getCopyFromVersion() + "'";
            }
            sql[0] += " and islastR = '1' and islastV = '1' ";
            if (commonsMapper.queryCountBySql(sql[0]) > 0) {
                String ruleInfoMsg = keyRuleVO == null ? "" : "查询规则:去除空格--{0},忽略大小写--{1},忽略全半角--{2},忽略全部空格--{3}";
                String[] objs = new String[]{trim ? "是" : "否", ignoreCase ? "是" : "否", ignoreWidth ? "是" : "否", trimAll ? "是" : "否"};
                String defaultValue=";根据您填写的关键属性的内容,结合关键属性查询规则,发现这个数据已经在系统中存在了。请修正!。";
                String errormsg=defaultValue+ MessageFormat.format(ruleInfoMsg, objs);
                errorMap.put(orderDTO.getId(),errorMap.getOrDefault(orderDTO.getId(),"")+errormsg);
                // throw new VciBaseException("根据您填写的关键属性的内容,结合关键属性查询规则,发现这个数据已经在系统中存在了。请修正!。" + ruleInfoMsg, objs);
            }
        }
    }
    /**
     * æ ¡éªŒæžšä¸¾çš„内容
     *
     * @param templateVO æ¨¡æ¿çš„æ˜¾ç¤ºå¯¹è±¡ï¼Œéœ€è¦åŒ…含属性
     * @param orderDTO   ç¼–码申请的信息
     */
    private void checkEnumOnOrder(CodeClassifyTemplateVO templateVO, CodeOrderDTO orderDTO,Map<String,String> errorMap) {
        //如果枚举可以修改,则不需要校验是否符合枚举的选项
        Map<String, CodeClassifyTemplateAttrVO> enumAttrVOMap = templateVO.getAttributes().stream().filter(s -> (StringUtils.isNotBlank(s.getEnumString()) || StringUtils.isNotBlank(s.getEnumId())) && !VciBaseUtil.getBoolean(s.getEnumEditFlag())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        if (!CollectionUtils.isEmpty(enumAttrVOMap)) {
            enumAttrVOMap.forEach((attrId, attrVO) -> {
                String value = getValueFromOrderDTO(orderDTO, attrId);
                if (StringUtils.isNotBlank(value)) {
                    //有值才能校验
                    List<KeyValue> comboboxKVs = this.engineService.listComboboxItems(attrVO);
                    if (!comboboxKVs.stream().anyMatch(s -> value.equalsIgnoreCase(s.getKey()))) {
                        errorMap.put(orderDTO.getId(),errorMap.getOrDefault(orderDTO.getId(),"")+";属性【"+attrVO.getName()+"】的值不符合枚举的要求");
                        //throw new VciBaseException("属性【{0}】的值不符合枚举的要求", new String[]{attrVO.getName()});
                    }
                }
            });
        }
    }
    /**
     * è½¬æ¢æ—¶é—´çš„æ ¼å¼
     *
     * @param templateVO æ¨¡æ¿çš„æ˜¾ç¤ºå¯¹è±¡ï¼Œéœ€è¦åŒ…含属性
     * @param orderDTO   ç¼–码申请的信息
     */
    private void switchDateAttrOnOrder(CodeClassifyTemplateVO templateVO, CodeOrderDTO orderDTO) {
        Map<String, CodeClassifyTemplateAttrVO> dateAttrVOMap = templateVO.getAttributes().stream().filter(s -> StringUtils.isNotBlank(s.getCodeDateFormat())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        if (!CollectionUtils.isEmpty(dateAttrVOMap)) {
            dateAttrVOMap.forEach((attrId, attrVO) -> {
                String value = getValueFromOrderDTO(orderDTO, attrId);
                if (StringUtils.isNotBlank(value)) {
                    DateConverter dateConverter = new DateConverter();
                    dateConverter.setAsText(value);
                    value = VciDateUtil.date2Str(dateConverter.getValue(), VciDateUtil.DateTimeMillFormat);
                    setValueToOrderDTO(orderDTO, attrId, value);
                }
            });
        }
    }
    /**
     * æ‹·è´æ•°æ®åˆ°cbo对象上
     *
     * @param classifyFullInfo åˆ†ç±»çš„全部信息
     * @param cbo              ä¸šåŠ¡æ•°æ®
     * @param orderDTO         ç¼–码申请的信息
     * @param templateVO       æ¨¡æ¿çš„æ˜¾ç¤ºå¯¹è±¡
     * @param edit             æ˜¯å¦ä¸ºä¿®æ”¹
     */
    private void copyValueToCBO(CodeClassifyFullInfoBO classifyFullInfo, ClientBusinessObject cbo,
                                CodeOrderDTO orderDTO, CodeClassifyTemplateVO templateVO,
                                boolean edit,Map<String,String> errorMap) {
        String fullPath = "";
        if (!CollectionUtils.isEmpty(classifyFullInfo.getParentClassifyVOs())) {
            fullPath = classifyFullInfo.getParentClassifyVOs().stream().sorted(((o1, o2) -> o2.getDataLevel().compareTo(o1.getDataLevel())))
                .map(CodeClassifyVO::getOid).collect(Collectors.joining("##"));
        } else {
            fullPath = classifyFullInfo.getCurrentClassifyVO().getOid();
        }
        orderDTO.getData().forEach((key, value) -> {
            if (!edit || (!engineService.checkUnAttrUnEdit(key) &&
                !VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(key))) {
                try {
                    cbo.setAttributeValue(key, value);
                } catch (VciBaseException e) {
                    log.error("设置属性的值错误", e);
                }
            }
        });
        try {
            cbo.setAttributeValue(CODE_CLASSIFY_OID_FIELD, classifyFullInfo.getCurrentClassifyVO().getOid());
            cbo.setAttributeValue(CODE_TEMPLATE_OID_FIELD, templateVO.getOid());
            cbo.setAttributeValue(CODE_FULL_PATH_FILED, fullPath);
            if (!edit && StringUtils.isBlank(orderDTO.getLcStatus())) {
                //找生命周期的起始状态,
                if (StringUtils.isNotBlank(cbo.getLctid())) {
                    //OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(cbo.getLctid());
//                    if (lifeCycleVO != null) {
//                        cbo.setLcStatus(lifeCycleVO.getStartStatus());
//                    } else {
                        cbo.setLcStatus(CodeDefaultLC.EDITING.getValue());
//                    }
                } else {
                    cbo.setLcStatus(CodeDefaultLC.EDITING.getValue());
                }
            }
            int secret = VciBaseUtil.getInt(cbo.getAttributeValue(SECRET_FIELD));
            /*if (secret == 0 || !secretService.checkDataSecret(secret)) {
                Integer userSecret = VciBaseUtil.getCurrentUserSecret();
                cbo.setAttributeValue(SECRET_FIELD, String.valueOf((userSecret == null || userSecret == 0) ? UserSecretEnum.NONE.getValue() : userSecret));
            }*/
        } catch (Throwable e) {
            log.error("设置默认的属性的值错误", e);
        }
    }
    /**
     * è®¾ç½®æ–°çš„值到申请对象上
     *
     * @param orderDTO ç¼–码申请对象
     * @param attrId   å±žæ€§çš„编号
     * @param value    å€¼
     */
    private void setValueToOrderDTO(CodeOrderDTO orderDTO, String attrId, String value) {
        attrId = attrId.toLowerCase(Locale.ROOT);
        if (VciQueryWrapperForDO.BASIC_FIELD_MAP.containsKey(attrId)) {
            WebUtil.setValueToField(WebUtil.getFieldForObject(attrId, orderDTO.getClass()).getName(), orderDTO, value);
        } else {
            orderDTO.getData().put(attrId, value);
        }
    }
    /**
     * ä»Žç¼–码申请信息对象上获取某个属性的值
     *
     * @param orderDTO ç¼–码申请对象
     * @param attrId   å±žæ€§çš„编号
     * @return å€¼
     */
    private String getValueFromOrderDTO(CodeOrderDTO orderDTO, String attrId) {
        attrId = attrId.toLowerCase(Locale.ROOT);
        String value = null;
        if (VciQueryWrapperForDO.BASIC_FIELD_MAP.containsKey(attrId)) {
            value = WebUtil.getStringValueFromObject(WebUtil.getValueFromField(WebUtil.getFieldForObject(attrId, orderDTO.getClass()).getName(), orderDTO));
        } else {
            //说明是自行配置的
            //前端必须要传递小写的属性
            value = orderDTO.getData().getOrDefault(attrId, "");
        }
        return value;
    }
    /**
     * å¤„理分类注入的信息
     *
     * @param templateVO         æ¨¡æ¿çš„æ˜¾ç¤ºå¯¹è±¡ï¼Œå¿…须要后模板的属性
     * @param classifyFullInfoBO åˆ†ç±»çš„全路径
     * @param orderDTO           ç¼–码申请的信息
     */
    private void switchClassifyLevelOnOrder(CodeClassifyTemplateVO templateVO, CodeClassifyFullInfoBO classifyFullInfoBO, CodeOrderDTO orderDTO,Map<String,String> errorMap) {
        Map<String, CodeClassifyTemplateAttrVO> classifyAttrVOMap = templateVO.getAttributes().stream().filter(
            s -> StringUtils.isNotBlank(s.getClassifyInvokeAttr()) && StringUtils.isNotBlank(s.getClassifyInvokeLevel())
        ).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        if (classifyFullInfoBO.getTopClassifyVO() == null) {
            //需要重新查询一下,因为这个是指定的分类进来的
        }
        if (!CollectionUtils.isEmpty(classifyAttrVOMap)) {
            classifyAttrVOMap.forEach((attrId, attrVO) -> {
                //分类注入的编号或者名称,
                //层级包含指定层和最小层
                CodeClassifyVO classifyVO = null;
                if (!CodeLevelTypeEnum.MIN.getValue().equalsIgnoreCase(attrVO.getClassifyInvokeLevel()) && !"min".equalsIgnoreCase(attrVO.getClassifyInvokeLevel())) {
                    //指定了层级的
                    //注意,因为查询上级分类出来的层级是倒序的,即顶层节点是最大的值
                    List<CodeClassifyVO> classifyVOS = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> o2.getDataLevel().compareTo(o1.getDataLevel()))).collect(Collectors.toList());
                    int level = VciBaseUtil.getInt(attrVO.getClassifyInvokeLevel());
                    if (classifyVOS.size() >= level && level > 0) {
                        classifyVO = classifyVOS.get(level - 1);
                    }
                } else {
                    //当前的分类
                    classifyVO = classifyFullInfoBO.getCurrentClassifyVO();
                }
                if (classifyVO == null) {
                    //说明层级有误
                    errorMap.put(orderDTO.getId(),errorMap.getOrDefault(orderDTO.getId(),"")+";分类树上没有层级[" + attrVO.getClassifyInvokeLevel() + "]");
                    //orderDTO.getData().put(attrId, "分类树上没有层级[" + attrVO.getClassifyinvokelevel() + "]");
                    // classifyVO = classifyFullInfoBO.getCurrentClassifyVO();
                } else {
                    Map<String, String> classifyDataMap = VciBaseUtil.objectToMapString(classifyVO);
                    String value = classifyDataMap.getOrDefault(attrVO.getClassifyInvokeAttr(), "");
                    orderDTO.getData().put(attrId, value);
                }
            });
        }
    }
    /***
     *
     * @param codeClassifyVO
     * @param templateVO
     * @param codeDataMap
     * @param codeSystemObjectMap
     * @param codeOrderDTOList
     * @param errorMap
     * @return
     */
    private void   getCodeOrderDTOs(CodeClassifyVO codeClassifyVO,CodeClassifyTemplateVO templateVO,Map<String ,RowDatas>codeDataMap,Map<String, ClientBusinessObject> codeSystemObjectMap,List<CodeOrderDTO> codeOrderDTOList,Map<String,String> errorMap){
        codeDataMap.keySet().forEach(code->{
            RowDatas rowDatas=codeDataMap.get(code);
            Map<String, String> data= rowDatas.getFiledValue();
            CodeOrderDTO orderDTO = new CodeOrderDTO();
            if(codeSystemObjectMap.containsKey(code)){
                ClientBusinessObject sysDataObject= codeSystemObjectMap.get(code);
                orderDTO.setCodeClassifyOid(codeClassifyVO.getOid());//分类主键
                orderDTO.setOid(sysDataObject.getOid());//数据oid
                orderDTO.setLcStatus(rowDatas.getStatus());//状态
                orderDTO.setId(code);
                orderDTO.setTs(sysDataObject.getTs());
                orderDTO.setBtmname(codeClassifyVO.getBtmname());//业务类型
                orderDTO.setDescription("集成调用:更新");//数据描述
                if(data.containsKey("name")){
                    String name=data.get("name");
                    orderDTO.setName(name);//名称属性值
                }
                orderDTO.setData(data);//设置数据
                orderDTO.setSecDTOList(null);//分类码段
                orderDTO.setEditInProcess(false);//是否在流程中
                orderDTO.setTemplateOid(templateVO.getOid());
            }else{
                errorMap.put("code","编码为:【"+code+"】的数据在系统中不存在");
            }
            codeOrderDTOList.add(orderDTO);
        });
    }
    /**
@@ -682,6 +2425,233 @@
        return fullPath;
    }
    /**
     * æ£€æŸ¥ç æ®µçš„长度是否符合要求
     * @param cboList æ•°æ®
     * @param classifyVOMap åˆ†ç±»æ˜ å°„
     * @param ruleVOMap è§„则对象
     * @param ruleOidMap åˆ†ç±»åŒ…含规则
     * @param errorMap é”™è¯¯çš„信息
     * @param ruleRowIndexMap è§„则包含的行号,key是规则主键,value是包含的全部行号
     */
    private void checkSecLengthInHistory(List<ClientBusinessObject> cboList,Map<String,CodeClassifyVO> classifyVOMap,Map<String,CodeRuleVO> ruleVOMap,
                                         Map<String/**分类主键**/,String/**规则主键**/> ruleOidMap,Map<String,String> errorMap,Map<String,List<String>> ruleRowIndexMap){
        cboList.stream().forEach(cbo-> {
            String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
            String secLength = cbo.getAttributeValue(CODE_SEC_LENGTH_FIELD);
            //找分类
            String classifyOid = cbo.getAttributeValue(CODE_CLASSIFY_OID_FIELD);
            CodeClassifyVO classifyVO = classifyVOMap.get(classifyOid);
            if (classifyVO != null) {
                //2#2#4#1这样的方式
                CodeRuleVO ruleVO = ruleVOMap.getOrDefault(ruleOidMap.get(classifyVO.getOid()), null);
                if(ruleVO!=null){
                    String[] secValues = secLength.split("#");
                    //总长度和编码的长度
                    String code = cbo.getAttributeValue(CODE_FIELD);
                    if(code.length() != Arrays.stream(secValues).mapToInt(s->VciBaseUtil.getInt(s)).sum()){
                        errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";码段宽度与系统中的编码规则不同" );
                    }else if(secValues.length != ruleVO.getSecVOList().size()){
                        errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";码段宽度与系统中的编码规则不同" );
                    } else {
                        //每一个长度都不能超过码段的
                        boolean fined = false;
                        for (int j = 0; j < ruleVO.getSecVOList().size(); j++) {
                            CodeBasicSecVO secVO = ruleVO.getSecVOList().get(j);
                            String length= secValues[j];
                            if(StringUtils.isNotBlank(secVO.getCodeSecLength())&&VciBaseUtil.getInt(length)>VciBaseUtil.getInt(secVO.getCodeSecLength())){
                                errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";码段宽度与系统中的编码规则不同" );
                                fined = true;
                                break;
                            }
                        }
                        /**for (int i = 0; i < secValues.length; i++) {
                         for (int j = 0; j < ruleVO.getSecVOList().size(); j++) {
                         CodeBasicSecVO secVO = ruleVO.getSecVOList().get(j);
                         if (VciBaseUtil.getInt(secValues[i]) > VciBaseUtil.getInt(secVO.getCodeSecLength())) {
                         errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";码段宽度与系统中的编码规则不同" );
                         fined = true;
                         break;
                         }
                         }
                         if(fined){
                         break;
                         }
                         }***/
                        if(!fined){
                            //暂时不取流水的内容,因为调用produceCode的时候去处理
                            List<String> rowIndexList = ruleRowIndexMap.getOrDefault(ruleVO.getOid(), new ArrayList<>());
                            rowIndexList.add(rowIndex);
                            ruleRowIndexMap.put(ruleVO.getOid(),rowIndexList);
                        }
                    }
                }else{
                    errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";分类没有设置编码规则" );
                }
            }
        });
    }
    /**
     * excel转换为cbo的对象
     * @param classifyFullInfo åˆ†ç±»çš„全部信息
     * @param fieldIndexMap å­—段的位置
     * @param rowDataList excel里的行数据
     * @param templateVO æ¨¡æ¿çš„æ˜¾ç¤ºå¯¹è±¡
     * @param cboList æ•°æ®çš„列表
     * @param fullPath å…¨è·¯å¾„
     * @param operation æ“ä½œç±»åž‹
     * @param errorMap é”™è¯¯ä¿¡æ¯è®°å½•
     */
    private void excelToCbo(CodeClassifyFullInfoBO classifyFullInfo,List<String> titleRowData,Map<Integer,String> fieldIndexMap,List<RowDatas> rowDataList,
                            CodeClassifyTemplateVO templateVO,List<ClientBusinessObject> cboList,
                            String fullPath,boolean isProcess,String operation,Map<String,String> errorMap,Map<String,String> codeOidToSystemOidMap){
        rowDataList.stream().forEach(rowData -> {
            String oid=rowData.getOid();
            String rowNumber=rowData.getRowIndex();
            ClientBusinessObject cbo = new ClientBusinessObject();
            DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmtypeid());
            rowData.getData().forEach((index,value)->{
                String field = fieldIndexMap.get(index);
                if(StringUtils.isBlank(field)){
                    errorMap.put(rowNumber,"属性:【" +titleRowData.get(index)+ "】在系统中不存在");
                }
                try {
                    cbo.setAttributeValueWithNoCheck(field,value);
                    if(WebUtil.isDefaultField(field)){
                        WebUtil.setValueToField(field, cbo, value);
                    }
                } catch (VciBaseException e) {
                    log.error("设置属性的值错误",e);
                    errorMap.put(rowNumber,"属性:【" +titleRowData.get(index)+ "】在系统中不存在");
                }
            });
            try {
                cbo.setAttributeValue(IMPORT_ROW_INDEX,rowData.getRowIndex());
                cbo.setAttributeValue(CODE_TEMPLATE_OID_FIELD,templateVO.getOid());
                if(operation.equals("create")){
                    log.info("分类对象:"+classifyFullInfo.getCurrentClassifyVO());
                    log.info("codeClassoid:"+classifyFullInfo.getCurrentClassifyVO().getOid());
                    cbo.setAttributeValue(CODE_CLASSIFY_OID_FIELD,classifyFullInfo.getCurrentClassifyVO().getOid());
                    cbo.setAttributeValue(CODE_FULL_PATH_FILED,fullPath);
                    int secret = VciBaseUtil.getInt(cbo.getAttributeValue(SECRET_FIELD));
                    /*if(secret == 0 || !secretService.checkDataSecret(secret) ){
                        Integer userSecret = VciBaseUtil.getCurrentUserSecret();
                        String secretValue= String.valueOf((userSecret==null || userSecret ==0)? UserSecretEnum.NONE.getValue():userSecret);
                        cbo.setAttributeValue(SECRET_FIELD,secretValue);
                    }*/
                    if(rowData.getStatus().equals(CodeDefaultLC.DISABLE.getValue())){//停用
                        cbo.setLcStatus(CodeDefaultLC.DISABLE.getValue());
                    }else if(rowData.getStatus().equals(CodeDefaultLC.EDITING.getValue())){//编辑
                        cbo.setLcStatus(CodeDefaultLC.EDITING.getValue());
                    }else if(rowData.getStatus().equals(CodeDefaultLC.AUDITING.getValue())) {//审批中
                        cbo.setLcStatus(CodeDefaultLC.AUDITING.getValue());
                    }else if(rowData.getStatus().equals(CodeDefaultLC.TASK_BACK.getValue())){//回收
                        cbo.setLcStatus(CodeDefaultLC.TASK_BACK.getValue());
                    }else{
                        cbo.setLcStatus(CodeDefaultLC.RELEASED.getValue());//发布
                    }
                    /**  if(!isProcess){
                     cbo.setLcStatus(CodeDefaultLC.RELEASED.getValue());
                     }else {
                     if(rowData.getStatus().equals(CodeDefaultLC.DISABLE.getValue())){//停用
                     cbo.setLcStatus(CodeDefaultLC.DISABLE.getValue());
                     }else if(rowData.getStatus().equals(CodeDefaultLC.EDITING.getValue())){//编辑
                     cbo.setLcStatus(CodeDefaultLC.EDITING.getValue());
                     }else {//发布
                     cbo.setLcStatus(CodeDefaultLC.RELEASED.getValue());
                     }
                     }***/
                    cbo.setCreator(rowData.getCreator());
                    cbo.setLastModifier(rowData.getEditor()==null?"":rowData.getEditor());
                }else if(operation.equals("update")){
                    //此时还没有转换路径
                    //cbo.setAttributeValue(CODE_FULL_PATH_FILED, childOidPathMap.getOrDefault(rowData.getData().getOrDefault(CODE_CLASSIFY_OID_FIELD,""),fullPath));
                    if(rowData.getStatus().equals(CodeDefaultLC.DISABLE.getValue())){//停用
                        cbo.setLcStatus(CodeDefaultLC.DISABLE.getValue());
                    }else if(rowData.getStatus().equals(CodeDefaultLC.RELEASED.getValue())){//发布
                        cbo.setLcStatus(CodeDefaultLC.RELEASED.getValue());
                    }else if(rowData.getStatus().equals(CodeDefaultLC.EDITING.getValue())){//编辑
                        cbo.setLcStatus(CodeDefaultLC.EDITING.getValue());
                    }else if(rowData.getStatus().equals(CodeDefaultLC.AUDITING.getValue())) {//审批中
                        cbo.setLcStatus(CodeDefaultLC.AUDITING.getValue());
                    }else if(rowData.getStatus().equals(CodeDefaultLC.TASK_BACK.getValue())){//回收
                        cbo.setLcStatus(CodeDefaultLC.TASK_BACK.getValue());
                    }
                    cbo.setLastModifier(rowData.getEditor() == null ? "" : rowData.getEditor());//修改者
                }else if(operation.equals("delete")){
                    if(rowData.getStatus().equals(CodeDefaultLC.TASK_BACK.getValue())){//回收
                        cbo.setLcStatus(CodeDefaultLC.TASK_BACK.getValue());
                    }else{
                        cbo.setLcStatus(CodeDefaultLC.DISABLE.getValue());//停用
                    }
                }
            }catch (Throwable e){
                log.error("设置默认的属性的值错误",e);
                if(e instanceof  VciBaseException){
                    errorMap.put(rowNumber,"设置默认的属性的值错误"+((VciBaseException) e).getMessage());
                }else{
                    errorMap.put(rowNumber,"设置默认的属性的值错误"+e.getMessage());
                }
            }finally {
                codeOidToSystemOidMap.put(cbo.getOid(),oid);
            }
            cbo.setDescription("");
            cboList.add(cbo);
        });
    }
    /**
     * excel转换为cbo的对象
     * @param classifyFullInfo åˆ†ç±»çš„全部信息
     * @param codeImprotDataVO: åˆ†ç±»å¯¹åº”的数据
     * @param cboList æ•°æ®çš„列表
     * @param newCode æ˜¯å¦ä¸ºæ‰¹é‡ç”³è¯·
     */
    private void excelToCbo(CodeClassifyFullInfoBO classifyFullInfo,CodeImprotDataVO codeImprotDataVO,List<ClientBusinessObject> cboList, boolean newCode){
        String fullPath = getFullPath(classifyFullInfo);
        codeImprotDataVO.getDatas().stream().forEach(rowData -> {
            ClientBusinessObject cbo=new ClientBusinessObject();
            DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmtypeid());
            rowData.forEach((field,value)->{
                try {
                    cbo.setAttributeValueWithNoCheck(field,value);
                    if(WebUtil.isDefaultField(field)){
                        WebUtil.setValueToField(field, cbo, value);
                    }
                } catch (VciBaseException e) {
                    log.error("设置属性的值错误",e);
                }
            });
            try {
                cbo.setAttributeValue(CODE_TEMPLATE_OID_FIELD,codeImprotDataVO.getTemplateOid());
                cbo.setAttributeValue(IMPORT_ROW_INDEX,rowData.get(IMPORT_ROW_INDEX));
                if(newCode){
                    cbo.setAttributeValue(CODE_CLASSIFY_OID_FIELD,classifyFullInfo.getCurrentClassifyVO().getOid());
                    cbo.setAttributeValue(CODE_FULL_PATH_FILED,fullPath);
                    //cbo.setLcStatus(CodeDefaultLC.EDITING.getValue());
                    /*int secret = VciBaseUtil.getInt(cbo.getAttributeValue(SECRET_FIELD));
                    if(secret == 0 || !secretService.checkDataSecret(secret) ){
                        Integer userSecret = VciBaseUtil.getCurrentUserSecret();
                        cbo.setAttributeValue(SECRET_FIELD,String.valueOf((userSecret==null || userSecret ==0)? UserSecretEnum.NONE.getValue():userSecret));
                    }*/
                }else{
                    //此时还没有转换路径
                    //cbo.setAttributeValue(CODE_FULL_PATH_FILED, childOidPathMap.getOrDefault(rowData.getData().getOrDefault(CODE_CLASSIFY_OID_FIELD,""),fullPath));
                    cbo.setLcStatus(CodeDefaultLC.RELEASED.getValue());
                }
                rowData.put("oid",cbo.getOid());
            }catch (Throwable e){
                log.error("设置默认的属性的值错误",e);
            }
            cboList.add(cbo);
        });
    }
    /**
     * excel转换为cbo的对象
     * @param classifyFullInfo åˆ†ç±»çš„全部信息
@@ -817,6 +2787,32 @@
            });
        }
    }
    /**
     * ç³»ç»Ÿæ¨¡æ¿ä¸­é»˜è®¤å€¼è®¾ç½®
     * @param attrVOS æ¨¡æ¿å±žæ€§
     * @param dataList excel的数据内容
     */
    private void batchSwitchAttrDefault(Collection<CodeClassifyTemplateAttrVO> attrVOS,List<ClientBusinessObject> dataList) {
        Map<String, CodeClassifyTemplateAttrVO> dateAttrVOMap = attrVOS.stream().filter(s -> StringUtils.isNotBlank(s.getDefaultValue())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t));
        if(!CollectionUtils.isEmpty(dateAttrVOMap)) {
            dateAttrVOMap.forEach((attrId, attrVO) -> {
                String defaultValue = attrVO.getDefaultValue();
                dataList.stream().forEach(cbo -> {
                    String dataValue= cbo.getAttributeValue(attrId);
                    if(StringUtils.isBlank(dataValue)){
                        dataValue=defaultValue;
                    }
                    try {
                        cbo.setAttributeValue(attrId, dataValue);
                    }catch (Throwable e){
                        log.error("设置属性的错误",e);
                    }
                });
            });
        }
    }
    /**
     * è½¬ç§»boolean型的属性
     * @param attrVOS å±žæ€§çš„对象
@@ -968,7 +2964,136 @@
        }
    }
    /**
     * æ‰¹é‡æ£€æŸ¥ä¼ä¸šç¼–码是否存在
     * @param templateVO æ¨¡æ¿çš„æ˜¾ç¤ºå¯¹è±¡
     * @param cboList æ•°æ®çš„列表
     * @param errorMap é”™è¯¯çš„信息
     */
    private void batchCheckIdExistOnOrder(CodeClassifyTemplateVO templateVO,List<ClientBusinessObject> cboList,Map<String ,String> errorMap){
        List<String> existIds = new ArrayList<>();
        VciBaseUtil.switchCollectionForOracleIn(cboList).stream().forEach(cbos -> {
            Map<String, String> conditionMap = new HashMap<>();
            conditionMap.put("id", QueryOptionConstant.IN + "(" + VciBaseUtil.toInSql(cbos.stream().map(s -> s.getId()).collect(Collectors.toSet()).toArray(new String[0])) + ")");
            R<BtmTypeVO>  r= btmTypeClient.getDetail(templateVO.getBtmTypeId());
            BtmTypeVO btmTypeVO =r.getData();
            String tableName=btmTypeVO.getTableName();
            StringBuffer sb=new StringBuffer();
            sb.append(" select id from ");
            sb.append(tableName);
            sb.append(" where 1=1 ");
            sb.append(" id in (");
            sb.append(VciBaseUtil.toInSql(cbos.stream().map(s -> s.getId()).collect(Collectors.toSet()).toArray(new String[0])));
            sb.append(")");
            List<String> idList= commonsMapper.selectById(sb.toString());
            //业务数据如果码值回收会直接删除数据,所以这里直接判断是否存在即可
            existIds.addAll(Optional.ofNullable(idList).orElseGet(() -> new ArrayList<>()).stream().map(s -> s.toLowerCase(Locale.ROOT)).collect(Collectors.toList()));
        });
        if(!CollectionUtils.isEmpty(existIds)){
            String idFieldName = templateVO.getAttributes().stream().filter(s -> VciQueryWrapperForDO.ID_FIELD.equalsIgnoreCase(s.getId())).findFirst().orElseGet(() -> new CodeClassifyTemplateAttrVO()).getName();
            if(StringUtils.isBlank(idFieldName)){
                idFieldName = "企业编码";
            }
            String finalIdFieldName = idFieldName;
            cboList.stream().forEach(cbo->{
                String id = cbo.getId();
                if(StringUtils.isBlank(id)){
                    id = cbo.getAttributeValue("id");
                }
                if(existIds.contains(id)){
                    String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                    String msg = errorMap.getOrDefault(rowIndex, "");
                    msg+=";" + finalIdFieldName + "的值在系统中已经存在";
                    errorMap.put(rowIndex,msg);
                }
            });
        }
    }
    /***
     * æ ¡éªŒåˆ†ç±»å¯¹åº”的模板信息
     * @param titleRowData
     * @param sheetDataSetList
     * @param shetNumber
     * @param pathMap
     * @param errorMap
     * @return
     * @throws Throwable
     */
    private LinkedList<CodeClassifyTemplateVO> checkSamesTemplate(List<String> titleRowData,  List<SheetDataSet> sheetDataSetList,int shetNumber,Map<String/**路径**/, CodeClassifyVO> pathMap,Map<String,String>errorMap) throws Throwable {
        Map<String,String>pathOidMap =new HashMap<>();
        Map<String,String> templateIdRowIndex=new HashedMap();
        SheetDataSet dataSet=  sheetDataSetList.get(shetNumber);
        LinkedHashMap<String,CodeClassifyTemplateVO> codeClassifyTemplateVOMap=new LinkedHashMap <String,CodeClassifyTemplateVO>();
        for (int i=0; i<titleRowData.size();i++){
            String title= titleRowData.get(i);
            if(title.equals("分类路径")) {
                int finalI = i;
                dataSet.getRowData().stream().forEach(sheetRowData -> {
                    String Path = sheetRowData.getData().get(finalI);
                    String rowIndex=sheetRowData.getRowIndex();
                    if(StringUtils.isBlank(Path)){
                        Path= "#current#";
                    }
                    CodeClassifyTemplateVO newTemplateVO=new CodeClassifyTemplateVO();
                    String templateOid="";
                    if(pathOidMap.containsKey(Path)){
                        templateOid= pathOidMap.get(Path) ;
                        newTemplateVO=codeClassifyTemplateVOMap.get(templateOid);
                    }else{
                        if (pathMap.containsKey(Path)) {
                            CodeClassifyVO codeClassifyVO = pathMap.get(Path);
                            newTemplateVO = engineService.getUsedTemplateByClassifyOid(codeClassifyVO.getOid());
                            if (newTemplateVO != null) {
                                templateOid = newTemplateVO.getOid();
                            } else {
                                errorMap.put(rowIndex, "第" + rowIndex + "行,分类路径未查询到相应的分类模板");
                            }
                        } else {
                            errorMap.put(rowIndex, "第" + rowIndex + "行,分类路径未查询到相应的分类");
                        }
                    }
                    pathOidMap.put(Path, templateOid);
                    codeClassifyTemplateVOMap.put(templateOid, newTemplateVO);
                    templateIdRowIndex.put(templateOid, templateIdRowIndex.getOrDefault(templateOid, "") + "," +rowIndex );
                });
                break;
            }
        }
        LinkedList<CodeClassifyTemplateVO> codeClassifyTemplateVOList=new LinkedList<>();
        StringBuffer sb=new StringBuffer();
        codeClassifyTemplateVOMap.keySet().forEach(tempateOid->{
            String templateOidInExcel="";
            String tempateName="";
            CodeClassifyTemplateVO t= codeClassifyTemplateVOMap.get(tempateOid);
            codeClassifyTemplateVOList.add(t);
            if(!CollectionUtils.isEmpty(sheetDataSetList)
                && sheetDataSetList.size()>1 && !CollectionUtils.isEmpty(sheetDataSetList.get(sheetDataSetList.size()-1).getColName())){
                List<SheetRowData>  rowData=  sheetDataSetList.get(sheetDataSetList.size()-1).getRowData();
                templateOidInExcel=rowData.get(shetNumber).getData().get(0);
                tempateName=rowData.get(shetNumber).getData().get(2);
                //templateOidInExcel = sheetDataSetList.get(sheetDataSetList.size()-1).getColName().get(sheetDataSetList.size()-i);
            }
            if(StringUtils.isBlank(templateOidInExcel) || !templateOidInExcel.equalsIgnoreCase(tempateOid)){
                sb.append("模板【"+tempateName+"】中第"+templateIdRowIndex.get(tempateOid)+"行数据不属于当前模板的数据,请核对!");
            }
        });
        if(StringUtils.isNotBlank(sb.toString())){
            throw  new Throwable(sb.toString());
        }
        if(codeClassifyTemplateVOList.size()>1){
            String message="模板【"+dataSet.getSheetName()+"】根据分类路径判断,分类存在多个模板";
            throw  new Throwable(message);
        }
        if(codeClassifyTemplateVOList.size()==0){
            String message="模板【"+dataSet.getSheetName()+"】根据数据分类路径判断,未匹配到对应模板";
            throw  new Throwable(message);
        }
        return codeClassifyTemplateVOList ;
    }
    /**
     * ä»Žå±žæ€§ä¸ŠèŽ·å–å‚ç…§çš„å†…å®¹
     * @param attrVO å±žæ€§çš„信息
@@ -1178,7 +3303,7 @@
        //2.判断关键属性在系统里是否重复
        //因为数据量很大,所以得想办法并行
        //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
        Map<String,List<ClientBusinessObject>> indexTODataMap=new HashMap<>();
        Map<String,List<BaseModel>> indexTODataMap=new HashMap<>();
        List<ClientBusinessObject> repeatDataMap = cboList.parallelStream().filter(cbo -> {
            //每行都得查询.如果其中出现了错误,我们就直接抛出异常,其余的显示
            //VciBaseUtil.setCurrentUserSessionInfo(sessionInfo);
@@ -1196,8 +3321,16 @@
                boolean isKeyCheck= commonsMapper.queryCountBySql(sqlBO.getSqlCount()) > 0;
                if(isKeyCheck){
                    List<Map<String,String>> newDataList=  commonsMapper.queryByOnlySqlForMap(sqlBO.getSqlUnPage());
                    List<ClientBusinessObject> newCboList=    ChangeMapTOClientBusinessObjects(newDataList);
                    indexTODataMap.put(cbo.getAttributeValue(IMPORT_ROW_INDEX),newCboList);
                    //List<ClientBusinessObject> newCboList=    ChangeMapTOClientBusinessObjects(newDataList);
                    List<BaseModel> newCboList=new ArrayList<>();
                    newDataList.stream().forEach(stringStringMap -> {
                        BaseModel baseModel=new BaseModel();
                        DefaultAttrAssimtUtil.copplyDefaultAttrAssimt(stringStringMap,baseModel);
                        newCboList.add(baseModel);
                    });
                    if(!CollectionUtils.isEmpty(newCboList)) {
                        indexTODataMap.put(cbo.getAttributeValue(IMPORT_ROW_INDEX), newCboList);
                    }
                }
                return isKeyCheck;
            }else{
@@ -1207,10 +3340,113 @@
        if(!CollectionUtils.isEmpty(repeatDataMap)){
            resultVO.setKeyAttrRepeatRowIndexList(repeatDataMap.stream().map(s->s.getAttributeValue(IMPORT_ROW_INDEX)).collect(Collectors.toSet()));
        }
        //resultVO.setIndexTODataMap(indexTODataMap);
        resultVO.setIndexTODataMap(indexTODataMap);
        //resultVO.setSuccess(true);
        return resultVO;
    }
    /**
     * æ£€æŸ¥åˆ†ç±»çš„路径是否存在
     * @param cboList ä¸šåŠ¡æ•°æ®
     * @param errorMap é”™è¯¯ä¿¡æ¯
     * @param pathMap è·¯å¾„和分类的映射
     */
    private void checkClassifyPathInHistory(List<ClientBusinessObject> cboList,
                                            Map<String,String> errorMap,     Map<String/**路径**/,CodeClassifyVO> pathMap,
                                            Map<String/**主键**/, String/**路径**/> childOidPathMap) {
        cboList.parallelStream().forEach(cbo -> {
            String classifyPath = cbo.getAttributeValue(CODE_CLASSIFY_OID_FIELD);
            //如果path为空,则表示是导入当前分类
            if(StringUtils.isBlank(classifyPath)){
                classifyPath = "#current#";
            }
            if ( !pathMap.containsKey(classifyPath)) {
                String row_index = cbo.getAttributeValue(IMPORT_ROW_INDEX);
                errorMap.put(row_index,errorMap.getOrDefault(row_index,"") + ";分类路径不存在");
            } else {
                //转一下分类的主键
                try {
                    String classifyOid = pathMap.get(classifyPath).getOid();
                    cbo.setAttributeValueWithNoCheck(CODE_CLASSIFY_OID_FIELD, classifyOid);
                    cbo.setAttributeValue(CODE_FULL_PATH_FILED, childOidPathMap.getOrDefault(classifyOid,classifyPath));
                } catch (VciBaseException e) {
                    log.error("设置属性的错误", e);
                }
            }
        });
    }
    /**
     * æ£€æŸ¥åˆ†ç±»ä»¥åŠå­åˆ†ç±»æ˜¯å¦éƒ½æœ‰ç¼–码规则
     * @param classifyVOMap åˆ†ç±»çš„æ˜¾ç¤ºå¯¹è±¡æ˜ å°„
     * @param ruleOidMap è§„则的主键映射
     * @param unExistRuleClassifyOidList ä¸å­˜åœ¨ç¼–码规则的分类的主键
     */
    private void checkRuleOidInHistory( Map<String/**主键**/,CodeClassifyVO> classifyVOMap,  Map<String/**分类主键**/,String/**规则主键**/> ruleOidMap,
                                        List<String> unExistRuleClassifyOidList   ){
        if(!CollectionUtils.isEmpty(classifyVOMap)){
            classifyVOMap.values().parallelStream().forEach(classifyVO->{
                if(StringUtils.isNotBlank(classifyVO.getCoderuleoid())){
                    ruleOidMap.put(classifyVO.getOid(),classifyVO.getCoderuleoid());
                }else{
                    //递归找上级
                    List<String> ruleOidList = new ArrayList<>();
                    recursionRule(classifyVOMap,classifyVO.getParentcodeclassifyoid(),ruleOidList);
                    if(!CollectionUtils.isEmpty(ruleOidList)){
                        ruleOidMap.put(classifyVO.getOid(),ruleOidList.get(0));
                    }else{
                        unExistRuleClassifyOidList.add(classifyVO.getOid());
                    }
                }
            });
        }
        log.info(";;;;");
    }
    /**
     * é€’归找编码规则
     * @param classifyVOMap åˆ†ç±»çš„æ˜¾ç¤ºå¯¹è±¡æ˜ å°„
     * @param classifyOid åˆ†ç±»çš„主键
     * @param ruleOidList è§„则的主键list
     */
    private void recursionRule(Map<String, CodeClassifyVO> classifyVOMap,String classifyOid,List<String> ruleOidList){
        if(classifyVOMap.containsKey(classifyOid)){
            CodeClassifyVO classifyVO = classifyVOMap.get(classifyOid);
            if(StringUtils.isNotBlank(classifyVO.getCoderuleoid())){
                ruleOidList.add(classifyVO.getCoderuleoid());
                return;
            }else{
                recursionRule(classifyVOMap,classifyVO.getParentcodeclassifyoid(),ruleOidList);
            }
        }else{
            Map<String, CodeClassifyVO> parentClassifyVOMap=new HashMap<>();
            CodeClassifyVO codeClassifyVO= this.classifyService.getObjectByOid(classifyOid);
            parentClassifyVOMap.put(codeClassifyVO.getOid(),codeClassifyVO);
            recursionRule(parentClassifyVOMap,codeClassifyVO.getOid(),ruleOidList);
        }
    }
    /**
     * èŽ·å–å­åˆ†ç±»çš„è·¯å¾„
     * @param classifyFullInfo åˆ†ç±»å…¨éƒ¨ä¿¡æ¯
     * @param fullPath åˆ†ç±»çš„全路径
     * @return å­åˆ†ç±»çš„路径,key是分类的主键
     */
    private Map<String/**分类的主键**/,String/**分类路径**/> getChildClassifyPathMap(CodeClassifyFullInfoBO classifyFullInfo,String fullPath){
        List<CodeClassifyVO> childPathVOs = classifyService.listChildrenClassify(classifyFullInfo.getCurrentClassifyVO().getOid(), true, VciQueryWrapperForDO.OID_FIELD, true);
        Map<String/**分类的主键**/,String/**分类的主键**/> childOidPathMap = new ConcurrentHashMap<>();
        if(!CollectionUtils.isEmpty(childPathVOs)){
            childPathVOs.parallelStream().forEach(childPath->{
                // String thisClassifyPath = fullPath + "##" + childPath.getPath().replace("#" + classifyFullInfo.getCurrentClassifyVO().getOid() + "#","").replace("#","##");
                List<String> list=Arrays.asList(childPath.getPath().split("#"));
                List<String> newPahtList=  list.stream().sorted(Comparator.comparing(s -> s,Comparator.reverseOrder())).collect(Collectors.toList());
                String thisClassifyPath=StringUtils.join(newPahtList,"##")+fullPath;
                childOidPathMap.put(childPath.getOid(),thisClassifyPath);
            });
        }
        return childOidPathMap;
    }
    /**
     * èŽ·å–å¯¼å…¥çš„å†…å®¹ä¸­å…³é”®å±žæ€§é‡å¤çš„è¡Œå·
     * @param ketAttrMap å…³é”®å±žæ€§çš„æ˜ å°„
@@ -1301,6 +3537,126 @@
    }
    /***
     * æ ¹æ®ä¸åŒæ¨¡æ¿ç»„织execl数据
     * @param dataSet
     * @param pathMap
     * @param errorMap
     */
    private void createExeclClassData(SheetDataSet dataSet,Map<String/**路径**/, CodeClassifyVO> pathMap,Map<String,String>errorMap,List<CodeImprotDataVO> codeClassifyDatas){
        Map<String,CodeImprotDataVO> pathDatas=new HashMap<>();
        List<String> titleRowData= dataSet.getColName();
        List<SheetRowData>  rowDataList= dataSet.getRowData();
        LinkedHashMap<String,CodeClassifyTemplateVO> codeClassifyTemplateVOMap=new LinkedHashMap <String,CodeClassifyTemplateVO>();
        LinkedHashMap<String,CodeRuleVO> codeRuleVOVOMap=new LinkedHashMap <String,CodeRuleVO>();
        for (int i=0;i<titleRowData.size();i++){
            String title= titleRowData.get(i);
            if(title.equals("分类路径")) {
                int finalI = i;
                rowDataList.stream().forEach(sheetRowData -> {
                    CodeImprotDataVO dataVO=new CodeImprotDataVO();
                    String Path = sheetRowData.getData().get(finalI);
                    String rowIndex=sheetRowData.getRowIndex();
                    Map<Integer, String> execlData= sheetRowData.getData();
                    CodeClassifyTemplateVO newTemplateVO=new CodeClassifyTemplateVO();
                    CodeRuleVO codeRuleVO=new CodeRuleVO();
                    if(StringUtils.isEmpty(Path)){
                        Path="#current#";
                    }
                    if(pathMap.containsKey(Path)){
                        CodeClassifyVO codeClassifyVO=pathMap.get(Path);
                        if(codeClassifyTemplateVOMap.containsKey(Path)){
                            newTemplateVO=  codeClassifyTemplateVOMap.get(Path);
                            codeRuleVO=  codeRuleVOVOMap.get(Path);
                            if(newTemplateVO==null||StringUtils.isBlank(newTemplateVO.getOid())){
                                errorMap.put(rowIndex,"第"+rowIndex+"行,分类路径未查询到相应的分类模板");
                            }
                            if(codeRuleVO==null||StringUtils.isBlank(codeRuleVO.getOid())){
                                errorMap.put(rowIndex,"第"+rowIndex+"行,分类路径未查询到相应的分类规则");
                            }
                        }else{
                            newTemplateVO =engineService.getUsedTemplateByClassifyOid(codeClassifyVO.getOid());
                            if(newTemplateVO==null||StringUtils.isBlank(newTemplateVO.getOid())){
                                errorMap.put(rowIndex,"第"+rowIndex+"行,分类路径未查询到相应的分类模板");
                            }
                            codeRuleVO=engineService.getCodeRuleByClassifyOid(codeClassifyVO.getOid());
                            if(codeRuleVO==null||StringUtils.isBlank(codeRuleVO.getOid())){
                                errorMap.put(rowIndex,"第"+rowIndex+"行,分类路径未查询到相应的分类规则");
                            }
                        }
                        if(pathMap.containsKey(Path)){
                            dataVO=pathDatas.getOrDefault(Path,dataVO);
                        }
                        dataVO.setTemplateOid(newTemplateVO==null?"":newTemplateVO.getOid());
                        dataVO.setCodeClassifyTemplateVO(newTemplateVO);
                        dataVO.setCodeClassifyVO(codeClassifyVO);
                        dataVO.setCodeRuleVO(codeRuleVO);
                        dataVO.setRowIndex(rowIndex);
                        dataVO.setCodeClassifyOid(codeClassifyVO.getOid());//设置分类oid
                        dataVO.setCodeRuleOid(codeRuleVO==null?"":codeRuleVO.getOid());
                        createExeclClassData(titleRowData,newTemplateVO,execlData,dataVO);
                        pathDatas.put(Path,dataVO);
                        codeClassifyTemplateVOMap.put(Path, newTemplateVO);
                        codeRuleVOVOMap.put(Path,codeRuleVO);
                    }else{
                        errorMap.put(rowIndex,"第"+rowIndex+"行,分类路径未查询到相应的分类");
                    }
                });
                break;
            }
        }
        List <CodeImprotDataVO> newCodeImprotDataVO= pathDatas.values().stream().collect(Collectors.toList());
        codeClassifyDatas.addAll(newCodeImprotDataVO);
        log.info("222");
    }
    /***
     *  @param titleRowData
     * @param newTemplateVO
     * @param execlData
     * @param codeImprotDataVO
     */
    private void createExeclClassData(List<String> titleRowData, CodeClassifyTemplateVO newTemplateVO, Map<Integer, String> execlData, CodeImprotDataVO codeImprotDataVO){
        //除去默认的属性.还有只有表单显示的字段才导入
        List<CodeClassifyTemplateAttrVO> attrVOS = newTemplateVO.getAttributes().stream().filter(s ->
            !DEFAULT_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag())
        ).collect(Collectors.toList());
        Map<String/**中文名称**/, String/**英文名称**/> attrNameIdMap = attrVOS.stream().collect(Collectors.toMap(s -> s.getName(), t -> t.getId()));
        List<String> fields=new ArrayList<>();
        Map<String,String> filedValueMap=new HashMap<>();
        List<String> colNames=new ArrayList<>();
        for (int i = 0; i < titleRowData.size(); i++) {
            String title = titleRowData.get(i);
            title=title.replace(KEY_ATTR_CHAR,"").replace(REQUIRED_CHAR,"");
            String id = attrNameIdMap.getOrDefault(title,"");
            if(StringUtils.isBlank(id) && "分类路径".equalsIgnoreCase(title)){
                id = CODE_CLASSIFY_OID_FIELD;
            }
            if(StringUtils.isBlank(id) && "码段宽度".equalsIgnoreCase(title)){
                id = CODE_SEC_LENGTH_FIELD;
            }
            if(StringUtils.isBlank(id) && "企业编码".equalsIgnoreCase(title)){
                id = CODE_FIELD;
            }
            if(StringUtils.isNotBlank(id)){
                // fieldIndexMap.put(i,id);id
                fields.add(id);
                colNames.add(title);
                String value= StringUtils.isNotBlank(execlData.get(i))?execlData.get(i):"";
                filedValueMap.put(id,value);
            }
        }
        // filedValueMap.put(CODE_CLASSIFY_OID_FIELD,codeImprotDataVO.getCodeClassifyOid());//将当前分类oid存入字段中
        filedValueMap.put("codeclassifyid",codeImprotDataVO.getCodeClassifyOid());
        filedValueMap.put(IMPORT_ROW_INDEX,codeImprotDataVO.getRowIndex());
        filedValueMap.put("codetemplateoid",newTemplateVO.getOid());
        codeImprotDataVO.setFields(fields);
        codeImprotDataVO.setColNames(colNames);
        codeImprotDataVO.getDatas().add(filedValueMap);
    }
    /***
     * æ­£ç¡®é”™è¯¯æ•°æ®redis缓存
     * @param uuid
     * @param templateVO
@@ -1359,6 +3715,50 @@
        }
    }
    /******
     * æ ¹æ®ç¼–码规则缓存数据
     * @param uuid
     * @param codeImprotDataVOs
     * @param errorMap
     * @param isok
     */
    private void createRedisDatas(String uuid, List<CodeImprotDataVO> codeImprotDataVOs, Map<String, String> errorMap, boolean isok){
        codeImprotDataVOs.stream().forEach(codeImprotDataVO -> {
            List<Map<String, String>>  dataLists=new ArrayList<>();
            CodeImprotDataVO newCodeImprotDataVO=new CodeImprotDataVO();
            if(errorMap.size()>0) {
                //要把以上的错误的都抛出后,再继续处理时间和组合规则
                dataLists = codeImprotDataVO.getDatas().stream().filter(cbo -> {
                    String rowIndex=cbo.get(IMPORT_ROW_INDEX);
                    String msg=StringUtils.isBlank(errorMap.get(rowIndex))?"":errorMap.get(rowIndex);
                    cbo.put("errorMsg",msg);
                    return  isok? !errorMap.containsKey(rowIndex):errorMap.containsKey(rowIndex);
                }).collect(Collectors.toList());
            }else{
                dataLists= codeImprotDataVO.getDatas();
            }
            BeanUtilForVCI.copyPropertiesIgnoreCase(codeImprotDataVO,newCodeImprotDataVO);
            newCodeImprotDataVO.setDatas(dataLists);
            List<CodeImprotDataVO> codeImprotDataVOList=new ArrayList<>();
            codeImprotDataVOList.add(newCodeImprotDataVO);
            /***update æ›´æ”¹æˆä»¥è§„则分组*****/
            String codeRuleOid=codeImprotDataVO.getCodeRuleOid();
            log.info(uuid+"-"+codeRuleOid+":条目数"+codeImprotDataVOList.size());
            if(codeImprotDataVOList.size()>0) {
                bladeRedis.set(uuid + "-" + codeRuleOid, codeImprotDataVOList);
                bladeRedis.expire(uuid + "-" + codeRuleOid, BATCHADD_REDIS_TIME);//redis过期时间
            }
            /*** String codeClassifyOid=codeImprotDataVO.getCodeClassifyOid();
             redisService.setCacheList(uuid+"-"+codeClassifyOid,codeImprotDataVOList);
             logger.info(uuid+"-"+codeClassifyOid+":条目数"+codeImprotDataVOList.size());
             redisService.expire(uuid+"-"+codeClassifyOid,BATCHADD_REDIS_TIME);//redis过期时间***/
        });
    }
    /****
     * æ•°æ®ç›¸ä¼¼é¡¹æ•°æ®æ ¡éªŒredis缓存
     * @param codeClassifyOid
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml
@@ -22,6 +22,10 @@
        ${inSql}
    </select>
    <select id="queryCountBySql" resultType="java.lang.Integer">
        ${inSql}
    </select>
    <select id="queryByOnlySqlForMap" resultType="java.util.Map">
        ${inSql}
    </select>
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/DeptController.java
@@ -17,6 +17,7 @@
package com.vci.ubcs.system.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.vci.ubcs.system.cache.DictCache;
@@ -32,6 +33,7 @@
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
@@ -99,9 +101,9 @@
    })
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "懒加载列表", notes = "传入dept")
    public R<List<DeptVO>> lazyList(@ApiIgnore @RequestParam Map<String, Object> dept, Long parentId, BladeUser bladeUser) {
        List<DeptVO> list = deptService.lazyList(bladeUser.getTenantId(), parentId, dept);
        return R.data(DeptWrapper.build().listNodeLazyVO(list));
    public R<IPage<DeptVO>> lazyList(@ApiIgnore @RequestParam Map<String, Object> dept, Query query, Long parentId, BladeUser bladeUser) {
        IPage<DeptVO> list = deptService.lazyList(bladeUser.getTenantId(), parentId, dept, query);
        return R.data(DeptWrapper.build().pageNodeLazyVO(list));
    }
    /**
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/MenuController.java
@@ -16,7 +16,9 @@
 */
package com.vci.ubcs.system.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.system.entity.Menu;
import com.vci.ubcs.system.entity.TopMenu;
@@ -31,6 +33,7 @@
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
@@ -133,9 +136,9 @@
    //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "懒加载菜单列表", notes = "传入menu")
    public R<List<MenuVO>> lazyMenuList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) {
        List<MenuVO> list = menuService.lazyMenuList(parentId, menu);
        return R.data(MenuWrapper.build().listNodeLazyVO(list));
    public R<IPage<MenuVO>> lazyMenuList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu, Query query) {
        IPage<MenuVO> menuVOIPage = menuService.lazyMenuPage(parentId, menu,query);
        return R.data(MenuWrapper.build().pageNodeLazyVO(menuVOIPage));
    }
    /**
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/RoleController.java
@@ -17,6 +17,7 @@
package com.vci.ubcs.system.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.vci.ubcs.system.cache.SysCache;
@@ -32,6 +33,7 @@
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
@@ -73,19 +75,20 @@
    }
    /**
     * åˆ—表
     * åˆ†é¡µåˆ—表
     */
    @GetMapping("/list")
    @GetMapping("/page")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "roleName", value = "参数名称", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "roleAlias", value = "角色别名", paramType = "query", dataType = "string")
    })
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "列表", notes = "传入role")
    public R<List<RoleVO>> list(@ApiIgnore @RequestParam Map<String, Object> role, BladeUser bladeUser) {
    public R<IPage<RoleVO>> list(@ApiIgnore @RequestParam Map<String, Object> role, BladeUser bladeUser, Query query) {
        QueryWrapper<Role> queryWrapper = Condition.getQueryWrapper(role, Role.class);
        List<Role> list = roleService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Role::getTenantId, bladeUser.getTenantId()) : queryWrapper);
        return R.data(RoleWrapper.build().listNodeVO(list));
        IPage<Role> page = roleService.page(Condition.getPage(query),
            (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Role::getTenantId, bladeUser.getTenantId()) : queryWrapper);
        return R.data(RoleWrapper.build().pageNodeVO(page));
    }
    /**
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/StrategyController.java
@@ -1,5 +1,6 @@
package com.vci.ubcs.system.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.vci.ubcs.system.service.IStrategyService;
import io.swagger.annotations.Api;
@@ -48,8 +49,8 @@
    @GetMapping("/page")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "分页查询", notes = "传入分页参数query")
    public R<Page<Strategy>> queryByPage(Query query) {
        Page<Strategy> strategyPage = strategyService.queryAllByPage(query);
    public R<IPage<Strategy>> queryByPage(Query query) {
        IPage<Strategy> strategyPage = strategyService.queryAllByPage(query);
        return R.data(strategyPage);
    }
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/DeptMapper.java
@@ -17,6 +17,7 @@
package com.vci.ubcs.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.vci.ubcs.system.entity.Dept;
import com.vci.ubcs.system.vo.DeptVO;
@@ -38,7 +39,7 @@
     * @param param
     * @return
     */
    List<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param);
    IPage<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param,IPage page);
    /**
     * èŽ·å–æ ‘å½¢èŠ‚ç‚¹
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/MenuMapper.java
@@ -17,6 +17,7 @@
package com.vci.ubcs.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.tool.node.TreeNode;
import com.vci.ubcs.system.dto.MenuDTO;
import com.vci.ubcs.system.entity.Menu;
@@ -49,7 +50,7 @@
     * @param param
     * @return
     */
    List<MenuVO> lazyMenuList(Long parentId, Map<String, Object> param);
    IPage<MenuVO> lazyMenuPage(Long parentId, Map<String, Object> param, IPage page);
    /**
     * æ ‘形结构
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/StrategyMapper.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import com.vci.ubcs.system.entity.Strategy;
@@ -22,7 +23,7 @@
     * @param page åˆ†é¡µå¯¹è±¡
     * @return å¯¹è±¡åˆ—表
     */
    List<Strategy> queryAllByPage(IPage page);
    IPage<Strategy> queryAllByPage(IPage page);
    /**
     * ç»Ÿè®¡æ€»è¡Œæ•°
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IDeptService.java
@@ -16,9 +16,11 @@
 */
package com.vci.ubcs.system.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.vci.ubcs.system.entity.Dept;
import com.vci.ubcs.system.vo.DeptVO;
import org.springblade.core.mp.support.Query;
import java.util.List;
import java.util.Map;
@@ -38,7 +40,7 @@
     * @param param
     * @return
     */
    List<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param);
    IPage<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param, Query query);
    /**
     * æ ‘形结构
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IMenuService.java
@@ -16,7 +16,9 @@
 */
package com.vci.ubcs.system.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.node.TreeNode;
@@ -50,7 +52,7 @@
     * @param param
     * @return
     */
    List<MenuVO> lazyMenuList(Long parentId, Map<String, Object> param);
    IPage<MenuVO> lazyMenuPage(Long parentId, Map<String, Object> param, Query query);
    /**
     * èœå•树形结构
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IStrategyService.java
@@ -1,5 +1,6 @@
package com.vci.ubcs.system.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.core.mp.support.Query;
import com.vci.ubcs.system.entity.Strategy;
@@ -36,7 +37,7 @@
     * @param query åˆ†é¡µå¯¹è±¡
     * @return æŸ¥è¯¢ç»“æžœ
     */
    PageImpl<Strategy> queryAllByPage(Query query);
    IPage<Strategy> queryAllByPage(Query query);
    /**
     * æ–°å¢žæ•°æ®æˆ–修改数据
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/CombinationServiceImpl.java
@@ -110,7 +110,9 @@
     */
    @Override
    public List<Map<String, Object>> selectMaps() {
        List<Map<String, Object>> maps = listMaps(new QueryWrapper<Combination>().select("ID", "NAME"));
        List<Map<String, Object>> maps = listMaps(
            new QueryWrapper<Combination>().lambda().select(Combination::getId, Combination::getName)
        );
        return maps;
    }
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java
@@ -17,6 +17,7 @@
package com.vci.ubcs.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.core.log.exception.ServiceException;
@@ -26,6 +27,8 @@
import com.vci.ubcs.system.service.IDeptService;
import com.vci.ubcs.system.vo.DeptVO;
import com.vci.ubcs.system.wrapper.DeptWrapper;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
@@ -49,7 +52,7 @@
    private static final String PARENT_ID = "parentId";
    @Override
    public List<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param) {
    public IPage<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param, Query query) {
        // è®¾ç½®ç§Ÿæˆ·ID
        if (AuthUtil.isAdministrator()) {
            tenantId = StringPool.EMPTY;
@@ -74,7 +77,7 @@
        if (Func.isEmpty(param.get(PARENT_ID)) && param.size() > 1 && Func.toLong(parentId) == 0L) {
            parentId = null;
        }
        return baseMapper.lazyList(tenantId, parentId, param);
        return baseMapper.lazyList(tenantId, parentId, param, Condition.getPage(query));
    }
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/MenuServiceImpl.java
@@ -17,6 +17,7 @@
package com.vci.ubcs.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vci.ubcs.system.cache.SysCache;
@@ -31,6 +32,8 @@
import com.vci.ubcs.system.wrapper.MenuWrapper;
import lombok.AllArgsConstructor;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
@@ -74,11 +77,11 @@
    }
    @Override
    public List<MenuVO> lazyMenuList(Long parentId, Map<String, Object> param) {
    public IPage<MenuVO> lazyMenuPage(Long parentId, Map<String, Object> param, Query query) {
        if (Func.isEmpty(Func.toStr(param.get(PARENT_ID)))) {
            parentId = null;
        }
        return baseMapper.lazyMenuList(parentId, param);
        return baseMapper.lazyMenuPage(parentId, param, Condition.getPage(query));
    }
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/StrategyServiceImpl.java
@@ -1,5 +1,6 @@
package com.vci.ubcs.system.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -67,9 +68,9 @@
     * @return æŸ¥è¯¢ç»“æžœ
     */
    @Override
    public PageImpl<Strategy> queryAllByPage(Query query) {
    public IPage<Strategy> queryAllByPage(Query query) {
        Page<Strategy> strategyPage = new Page<>(query.getCurrent(), query.getSize());
        return new PageImpl<>(this.strategyMapper.queryAllByPage(strategyPage));
        return this.strategyMapper.queryAllByPage(strategyPage);
    }
    /**
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/DeptWrapper.java
@@ -16,6 +16,9 @@
 */
package com.vci.ubcs.system.wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vci.ubcs.common.utils.PageDO2PageVO;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
@@ -75,4 +78,14 @@
        return ForestNodeMerger.merge(collect);
    }
    public IPage<DeptVO> pageNodeLazyVO(IPage<DeptVO> page) {
        List<DeptVO> deptVOS = page.getRecords().stream().peek(dept -> {
            String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
            Objects.requireNonNull(dept).setDeptCategoryName(category);
        }).collect(Collectors.toList());
        List<DeptVO> list = ForestNodeMerger.merge(deptVOS);
        page.setRecords(list);
        return page;
    }
}
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/MenuWrapper.java
@@ -16,6 +16,7 @@
 */
package com.vci.ubcs.system.wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
@@ -69,4 +70,10 @@
        return ForestNodeMerger.merge(list);
    }
    public IPage<MenuVO> pageNodeLazyVO(IPage<MenuVO> page) {
        List<MenuVO> merge = ForestNodeMerger.merge(page.getRecords());
        page.setRecords(merge);
        return page;
    }
}
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/wrapper/RoleWrapper.java
@@ -16,6 +16,9 @@
 */
package com.vci.ubcs.system.wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vci.ubcs.common.utils.PageDO2PageVO;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
@@ -52,10 +55,17 @@
        return roleVO;
    }
    public List<RoleVO> listNodeVO(List<Role> list) {
        List<RoleVO> collect = list.stream().map(this::entityVO).collect(Collectors.toList());
        return ForestNodeMerger.merge(collect);
    }
    public IPage<RoleVO> pageNodeVO(IPage<Role> page) {
        List<RoleVO> collect = page.getRecords().stream().map(this::entityVO).collect(Collectors.toList());
        List<RoleVO> mergeList = ForestNodeMerger.merge(collect);
        IPage<RoleVO> roleVOIPage = new Page<>();
        roleVOIPage.setRecords(mergeList);
        return PageDO2PageVO.pageDO2PageVO(page,roleVOIPage);
    }
}
Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/MenuMapper.xml
@@ -73,7 +73,7 @@
        ORDER BY menu.sort
    </select>
    <select id="lazyMenuList" resultMap="menuVOResultMap">
    <select id="lazyMenuPage" resultMap="menuVOResultMap">
        SELECT
            menu.*,
            (
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
@@ -309,6 +309,7 @@
        }
        //获取用户采用的密码策略
        Strategy strategy = sysClient.getByUserId(userId).getData();
        // å‡ ä¹Žä¸ä¼šå‡ºçŽ°è¿™ç§æƒ…å†µ
        if(ObjectUtil.isEmpty(strategy)) {
            throw new ServiceException("当前用户未应用密码策略!");
        }
@@ -323,7 +324,7 @@
            if(reqType>=strategy.getRequiredType()){
                break;
            }
            if(!Func.isEmpty(RegexUtil.findResult(regexs.get(i),newPassword1))){
            if(RegexUtil.find(regexs.get(i),newPassword1)){
                reqType++;
            }
        }
@@ -331,11 +332,12 @@
        if(reqType<strategy.getRequiredType()){
            throw new ServiceException(resException);
        }
        // æ˜¯å¦å±žäºŽç»„合方式中的类型
        // æ˜¯å¦å±žäºŽç»„合方式中的类型,以前是密码必须是包含在组合方式中的类型
        String regex = sysClient.getRegex(Arrays.asList(strategy.getCombinationIds().split(","))).getData();
        regex = "^"+regex+"{"+strategy.getRequiredType()+",}$";
        boolean result = RegexUtil.find(regex, newPassword1);
        if(!result){
            throw new ServiceException("密码中只能存在【"+strategy.getCombinationNames()+"】中包含的字符!");
            //throw new ServiceException(resException);
        }
        //修改密码同时,改变用户信息中的密码修改状态字段,密码修改时间
@@ -422,6 +424,7 @@
        boolean oauthTemp = userOauthService.updateById(userOauth);
        return (userTemp && oauthTemp);
    }
    @Override
    public boolean updatePlatform(Long userId, Integer userType, String userExt) {
        if (userType.equals(UserEnum.WEB.getCategory())) {
Source/UBCS/ubcs-service/ubcs-webservice/src/main/java/com/vci/ubcs/code/webservice/service/impl/GroupMdmInterServiceImpl.java
@@ -198,7 +198,7 @@
                }
                //保存表单数据
                dockingPreApplyFormService.saveOrUpdateBatch(dockingPreAttrMappings);
                mdmEngineClient.insertBatchByType(btmName,updateCbos);//保存数据
                mdmEngineClient.updateBatchByType(btmName,updateCbos);//保存数据
            }
            return R.success("申请接口调用成功");
        }catch (VciBaseException e){
@@ -312,7 +312,7 @@
                }
                //保存表单数据
                dockingPreApplyFormService.saveOrUpdateBatch(dockingPreAttrMappings);
                mdmEngineClient.insertBatchByType(btmName,updateCbos);//保存数据
                mdmEngineClient.updateBatchByType(btmName,updateCbos);//保存数据
            }
            return R.success("申请接口调用成功");
        }catch (VciBaseException e){