ludc
2023-09-21 4cf1a8984c27fd4449fa6149a7374dcfff5cf361
Merge remote-tracking branch 'origin/master'

# Conflicts:
# Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeSyncUniversalController.java
已修改18个文件
已添加6个文件
770 ■■■■ 文件已修改
Source/UBCS-WEB/src/api/integration/sysInfo.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/page/login/sso.vue 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/page/login/userlogin.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/integration/systemInfo.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/apply/ApplyDataVO.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDataVO.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDatasVO.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZParamVO.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZVO.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ClassfyBZVO.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ProppertyBZVO.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/result/xml/XMLResultClassfyVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplyWebManagementController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeSyncUniversalController.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/UniversalInterfaceI.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeApplyWebManagementServiceImpl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/integration/sysInfo.js
@@ -36,3 +36,11 @@
      params: params
    })
  }
//分类授权树
export const sysInfoTree = (params) => {
  return request({
    url: '/api/ubcs-code/codeApplyWebManagementController/getSystemClassifyRoleTree',
    method: 'get',
    params: params
  })
}
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -154,7 +154,6 @@
      handler(newval,oldval){
        if(newval){
          this.TreeValueForm=newval;
          // console.log(this.TreeValueForm)
        }
      },
      deep:true,
@@ -167,23 +166,18 @@
      if (this.eventList) {
        this.eventFlag= this.eventList.some(item => {
          if (item.classifyInvokeEditFlag === 'true') {
            console.log('even', item);
            this.eventObject = item;
            return true;
          }
        });
        // console.log('add',add)
      }
      // æ— éœ€åˆ†ç»„数据
      let column = [];
      let group = [];
      let dictKeys = [];
      let slotColumnList = [];
      let value=''
      formItemList.forEach((formItem) => {
        formItem = this.resetFormConfig(formItem);
        console.log(formItem)
        // console.log('formItem.dicData.value',formItem.dicData)
        if (formItem.type === "line") {
          group.push({
            label: formItem.text,
@@ -283,9 +277,7 @@
            value: "key",
          },
        };
        // console.log('columnItem',columnItem)
        slotColumnList.push(columnItem);
        // console.log('slotColumnList',slotColumnList)
        if (group.length === 0) {
          column.push(columnItem);
        } else {
@@ -307,7 +299,6 @@
    },
    // ä½¿ç”¨ä¼ å…¥çš„表单数据配置
    resetFormConfig(formItem) {
      // console.log(this.selfColumnConfig)
      for (const configType in this.selfColumnConfig) {
        if (Object.hasOwnProperty.call(this.selfColumnConfig, configType)) {
          const element = this.selfColumnConfig[configType];
@@ -323,9 +314,6 @@
              if (Object.hasOwnProperty.call(element, newAttr)) {
                const oldAttr = element[newAttr];
                formItem[newAttr] = formItem[oldAttr];
                // console.log(formItem)
                // console.log(newAttr,oldAttr)
                // console.log(formItem[newAttr],formItem[oldAttr])
              }
            }
          } else if (configType === "directVoluation") {
@@ -416,7 +404,7 @@
      );
    },
    setReferValue(data) {
      // console.log(data)
      debugger;
      if (data.field) {
        this.form[data.field] = data.value || "";
        this.form[data.showField] = data.text || "";
@@ -430,21 +418,24 @@
              if (!_item.attributes) {
                _item.attributes = _item;
              }
              if (!_item.attributes.data) {
                _item.attributes.data = {};
              }
              if (mapFields.length == 1) {
                var mapField = mapFields[0];
                if (mapField.indexOf("attribute.") > -1) {
                  temp = _item['attributes'][mapField.subString("attribute.".length)];
                  temp = _item['attributes'][mapField.subString("attribute.".length)] || _item['attributes']['data'][mapField.subString("attribute.".length)];
                } else {
                  temp = _item['attributes'][mapField] || _item[mapField];
                  temp = _item['attributes'][mapField] ||_item['attributes']['data'][mapField] || _item[mapField];
                }
              } else {
                //有多个
                var mutiTemp = [];
                layui.each(mapFields, function (_indexField, _itemField) {
                  if (_itemField.indexOf("attribute.") > -1) {
                    mutiTemp.push(_item['attributes'][_itemField.subString("attribute.".length)]);
                    mutiTemp.push(_item['attributes'][_itemField.subString("attribute.".length)] || _item['attributes']['data'][_itemField.subString("attribute.".length)]);
                  } else {
                    mutiTemp.push(_item['attributes'][_itemField] || _item[_itemField]);
                    mutiTemp.push(_item['attributes'][_itemField] || _item['attributes']['data'][_itemField] || _item[_itemField]);
                  }
                });
                temp = mutiTemp.join(' ');
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -253,7 +253,6 @@
            } else {
              this.showResembleQuery = false;
            }
            // console.log(this.hasResemble, "this.hasResemblethis.hasResemble");
            this.$nextTick(() => {
              this.$refs.FormTemplate.templateRender(
                res.data.formDefineVO.items
@@ -306,8 +305,6 @@
            that.showCodeApply = false;
          }
        }
        // console.log(' this.secVOList',that.secVOList)
        // console.log(' res.data.data.secVOList',res.data.data.secVOList)
      });
    },
    getFormData(form) {
@@ -484,8 +481,6 @@
      } else if (item.secType == "coderefersec") {
        //引用码段
        params = JSON.parse(item.referValueInfo);
        // console.log('item',item)
        console.log('params',params)
      }
      return params;
    },
Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue
@@ -198,6 +198,8 @@
                if (item.parentClassifySecOid === field) {
                    this.$refs.CodeApply.form[item.oid] = undefined;
                    this.$refs.CodeApply.form[item.name] = undefined;
          item.readOnly = false;
          item.referConfig.extraParams.parentClassifyValueOid = data.value;
                }
                return item;
            });
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue
@@ -30,8 +30,6 @@
    </el-dialog>
    <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>
</template>
@@ -91,6 +89,8 @@
      this.page.currentPage=this.referConfig.options.tableConfig.page.page || this.referConfig.options.tableConfig.page.currentPage;
    }else if(!validatenull(this.referConfig.options.limit)){
      this.page.pageSize=this.referConfig.options.limit
    }else if(!validatenull(this.referConfig.options.tableConfig.limit)){
      this.page.pageSize=this.referConfig.options.tableConfig.limit
    }
  },
  computed:{
@@ -122,7 +122,7 @@
        queryParams['referBo'] = this.options['referBo'] || this.options['referType'];
      }
      queryParams['referType'] = queryParams['referBo']
      if (this.options.remoteSort && this.options.initSort) {
      if (this.options.initSort) {
        queryParams['order'] = this.options.initSort.type;//方法
        queryParams['sort'] = this.options.initSort.field;//字段
      }
@@ -286,12 +286,15 @@
          text.push(itemText);
        }
      })
      let mapFields;
      if (this.options.mapFields == "") {
        mapFields = this.referConfig.fieldMap;
      } else {
      let mapFields =this.referConfig.fieldMap || {};
      try {
        if(!validatenull(this.options.mapFields)){
        mapFields = Object.assign(this.referConfig.fieldMap, JSON.parse(this.options.mapFields));
      }
      }catch (e) {
      }
      this.value=value.join(',');
      this.text=text.join(',')
      this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:mapFields});
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue
@@ -33,8 +33,6 @@
    </el-dialog>
    <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>
</template>
@@ -95,6 +93,8 @@
      this.page.currentPage=this.referConfig.options.tableConfig.page.page || this.referConfig.options.tableConfig.page.currentPage;
    }else if(!validatenull(this.referConfig.options.limit)){
      this.page.pageSize=this.referConfig.options.limit
    }else if(!validatenull(this.referConfig.options.tableConfig.limit)){
      this.page.pageSize=this.referConfig.options.tableConfig.limit
    }
    this.$nextTick(() => {
      this.$refs.referCrud.doLayout()
@@ -130,7 +130,7 @@
        queryParams['referBo'] = this.options['referBo'] || this.options['referType'];
      }
      queryParams['referType']= queryParams['referBo']
      if (this.options.remoteSort && this.options.initSort) {
      if (this.options.initSort) {
        queryParams['order'] = this.options.initSort.type;//方法
        queryParams['sort'] = this.options.initSort.field;//字段
      }
@@ -340,7 +340,14 @@
          text.push(itemText);
        }
      })
      let mapFields =Object.assign(this.referConfig.fieldMap,JSON.parse(this.options.mapFields)) ;
      let mapFields =this.referConfig.fieldMap || {};
      try {
        if(!validatenull(this.options.mapFields)){
          mapFields =Object.assign(this.referConfig.fieldMap,JSON.parse(this.options.mapFields)) ;
        }
      }catch (e) {
      }
      this.value=value.join(',');
      this.text=text.join(',')
      this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:mapFields});
Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
@@ -1,5 +1,5 @@
<template>
  <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>
  <avue-input-tree ref="referTree" :props="props" :disabled="disabled" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :blur="valueChange" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree>
</template>
<script>
@@ -25,7 +25,7 @@
      },
      treeUrl: this.referConfig.options.url || '/api/ubcs-code/mdmEngineController/defaultReferTree',
      treeData: [],
      selectionList: [],
      checkedData:[],
      currentNode:{},
      params: {},
      loadType: {'all': 'all', 'node': 'node'},
@@ -34,8 +34,6 @@
  },
  created() {
    this.getParams();
    // console.log('referConfig:')
    // console.log(this.referConfig)
  },
  mounted() {
    if(!this.lazy){
@@ -79,20 +77,20 @@
      queryParams['loadType'] = this.options.loadType;
      queryParams['multipleSelect'] = this.isMuti;
      queryParams['isMuti'] = queryParams['multipleSelect'];
      if (this.options.remoteSort && this.options.initSort) {
      if (this.options.initSort) {
        queryParams['order'] = this.options.initSort.type;//方法
        queryParams['sort'] = this.options.initSort.field;//字段
      }
      if (this.options.rootParams) {
        for (var key in this.options.rootParams) {
          queryParams[key] = this.options.rootParams[key];
        }
      }
      if(this.options.sortField){
        queryParams['sort'] = this.options.sortField;//字段
      }
      if(this.options.sortType){
        queryParams['order'] = this.options.sortType;//方法
      }
      if (this.options.rootParams) {
        for (var key in this.options.rootParams) {
          queryParams[key] = this.options.rootParams[key];
        }
      }
      if (this.options.conditionParams) {
        //说明是扩展属性
@@ -125,7 +123,6 @@
          queryParams['replaceMap["' + key + '"]'] = this.options.replaceParams[key];//新的方式
        }
      }
      queryParams['parentValue']='\\IN(SELECT oid from PL_CODE_CLASSIFY where id =\'hesuanfenlei\')'
      this.params=queryParams;
    },
@@ -181,7 +178,12 @@
      }
     },
    checked(checkedNode, checkedData) {
      this.setValue(checkedData)
      this.checkedData=checkedData
    },
    valueChange(){
      if(this.isMuti){
        // this.setValue(this.checkedData)
      }
    },
    setValue:function (checkedData){
      var value = [];
@@ -201,8 +203,16 @@
        }
        text.push(tempRaw.join(textSep));
      }
      let mapFields =this.referConfig.fieldMap || {};
      try {
        if(!validatenull(this.options.mapFields)){
          mapFields =Object.assign(this.referConfig.fieldMap,JSON.parse(this.options.mapFields)) ;
        }
      }catch (e) {
      }
      this.value = value.join(',');
      this.text = text.join(',')
      this.text = text.join(',');
      this.$emit("setValue", {
        field: this.referConfig.field,
        showField: this.referConfig.showField,
@@ -210,7 +220,7 @@
        text: this.text || '',
        isTreeMuti:this.isMuti,
        rawData: checkedData.checkedNodes,
        fieldMap:this.referConfig.fieldMap
        fieldMap:mapFields
      });
    }
  },
Source/UBCS-WEB/src/page/login/sso.vue
@@ -1,5 +1,5 @@
<template>
  <p>测试</p>
</template>
<script>
@@ -10,56 +10,25 @@
export default {
  name: "sso",
  data() {
    return {
      loginForm:{
        //租户ID
        tenantId: "",
        //部门ID
        deptId: "",
        //角色ID
        roleId: "",
        //用户名
        username: "",
        //密码
        password: "",
        selectInput: '',
        //下拉input数据
        value: '管理组',
        //下拉菜单
        region: [],
        //账号类型
        type: "account",
        //验证码的索引
        key: "",
        //预加载白色背景
        image: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
    return {}
      },
    }
  },
  computed: {
    ...mapGetters(["tagWel", "userInfo"])
  },
  computed: {},
  created() {
    this.onLoad()
  },
  methods: {
    // Onload() {
    //   let name = 'pwdfree'
    //   oaSsos(name).then(res=>{
    //     console.log(res)
    //     if(res.status === 200){
    //       // this.loginForm.tenantId=res.data.tenant_id;
    //       // this.loginForm.username=res.data.user_name;
    //       this.$store.dispatch("LoginBySso").then((res) => {
    //         console.log('res',res)
    //           this.$router.push({path: this.tagWel.value});
    //       })
    //       // console.log(this.tagWel)
    //       // this.$router.push({path: this.tagWel.value});
    //     }
    //   })
    // }
    onLoad() {
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      setTimeout(() => {
        loading.close();
      }, 2000);
    }
  }
}
</script>
Source/UBCS-WEB/src/page/login/userlogin.vue
@@ -300,10 +300,11 @@
  props: [],
  methods: {
    ChandleLogin() {
      this.$store.dispatch("LoginBySso").then((res) => {
        console.log('res', res)
        this.$router.push({path: this.tagWel.value});
      })
      // this.$store.dispatch("LoginBySso").then((res) => {
      //   console.log('res', res)
      //   this.$router.push({path: this.tagWel.value});
      // })
      this.$router.push({path:'/sso'});
    },
    closehandle() {
      removeToken()
Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -20,20 +20,46 @@
                  @clear="handleClear" @keyup.enter.native="handleEnter"></el-input>
      </template>
      <template #menu="{row,index,size}">
        <el-button type="text" icon="el-icon-menu" size="small" @click="classifyHandler">分类授权</el-button>
        <el-button icon="el-icon-menu" size="small" type="text" @click="classifyHandler(row)">分类授权</el-button>
      </template>
    </avue-crud>
    <el-dialog :visible.sync="dialogVisible" append-to-body title="分类授权">
    <el-dialog :visible.sync="dialogVisible" append-to-body class="avue-dialog avue-dialog--top" title="分类授权" top="-10">
      <el-row>
        <el-col :span="10">
          <avue-tree ref="tree"
                     v-model="TreeForm"
                     :data="TreeData"
                     :option="TreeOption"
                     @check-change="checkChange">
          </avue-tree>
        </el-col>
      </el-row>
      <div slot="footer" class="dialog-footer" style="height: 50px;line-height: 50px">
        <el-button type="primary" icon="el-icon-plus" size="small">授 æƒ</el-button>
        <el-button icon="el-icon-close"  size="small" type="danger">重 ç½®</el-button>
    </div>
    </el-dialog>
  </basic-container>
</template>
<script>
import {getSysInfoList, sysInfoAdd, sysInfoEdit, sysInfoDel} from '@/api/integration/sysInfo.js'
import {getSysInfoList, sysInfoAdd, sysInfoEdit, sysInfoDel, sysInfoTree} from '@/api/integration/sysInfo.js'
export default {
  data() {
    return {
      //避免缓存
      reload: Math.random(),
      TreeLoading: false,
      TreeOption: {
        defaultExpandAll: false,
        multiple: true,
        addBtn: false,
        filter: false
      },
      TreeData: [],
      TreeForm: {},
      loading: false,
      dialogVisible:false,
      page: {
@@ -99,10 +125,41 @@
      },
    }
  },
  methods: {
    //分类授权多选回调
    checkChange(row,checked) {
      // console.log(row)
      // if(checked){
      //
      // }
    },
    //分类授权
    classifyHandler(){
    classifyHandler(row) {
      this.loading = true;
      sysInfoTree({systemOid: row.oid, systemId: row.id}).then(res => {
        this.TreeData = res.data;
        this.ModifyProperties(this.TreeData, 'text', 'label');
        // æ ¹æ® this.TreeData çš„长度计算延迟时间
        const delayTime = this.TreeData.length * 1;
        setTimeout(() => {
          this.loading = false;
          this.reload = Math.random()
      this.dialogVisible=true;
        }, delayTime);
      });
    },
    //定义一个修改数据属性名的方法
    ModifyProperties(obj, oldName, newName) {
      for (let key in obj) {
        if (key === oldName) {
          obj[newName] = obj[key];
          delete obj[key];
        }
        if (typeof obj[key] === 'object') {
          this.ModifyProperties(obj[key], oldName, newName);
        }
      }
    },
    async getDataList() {
      this.loading = true;
@@ -234,13 +291,12 @@
    },
    // å¤šé€‰
    selectionChange(list) {
      console.log(list)
      let newData = list.map(item => {
        const {oid} = item
        return oid
      })
      this.delIds = {oids: newData.toString()}
      console.log(this.delIds)
      // console.log(this.delIds)
    },
  }
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/apply/ApplyDataVO.java
@@ -11,13 +11,14 @@
 */
@XStreamAlias("object")
public class ApplyDataVO {
    /***
     * è¾“入主键
     */
    @XStreamAsAttribute
    private String id;
    /**
     * ç¼–码
     * èµ·å§‹æˆ–修订编号
     */
    @XStreamAsAttribute
    private String code;
@@ -42,6 +43,23 @@
     */
    @XStreamAsAttribute
    private  String editor;
    /***
     * æ˜¯å¦ä¿®è®¢
     */
    private boolean amendmentFlag;
    /***
     *是否是系列标准
     */
    private boolean seriesStandardFlag;
    /**
     * æ˜¯å¦ç»§ç»­ç¼–号
     */
    private boolean continueNumberFlag;
    /***
     * å¹´ä»£å·
     */
    private String yearNumber;
    /***
     * æ•°æ®å±žæ€§å¯¹è±¡
     */
@@ -104,6 +122,38 @@
        this.prop = prop;
    }
    public boolean isAmendmentFlag() {
        return amendmentFlag;
    }
    public void setAmendmentFlag(boolean amendmentFlag) {
        this.amendmentFlag = amendmentFlag;
    }
    public boolean isSeriesStandardFlag() {
        return seriesStandardFlag;
    }
    public void setSeriesStandardFlag(boolean seriesStandardFlag) {
        this.seriesStandardFlag = seriesStandardFlag;
    }
    public boolean isContinueNumberFlag() {
        return continueNumberFlag;
    }
    public void setContinueNumberFlag(boolean continueNumberFlag) {
        this.continueNumberFlag = continueNumberFlag;
    }
    public String getYearNumber() {
        return yearNumber;
    }
    public void setYearNumber(String yearNumber) {
        this.yearNumber = yearNumber;
    }
    @Override
    public String toString() {
        return "ApplyDataVO{" +
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDataVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
package com.vci.ubcs.code.vo.webserviceModel.applybz;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.vci.ubcs.code.vo.webserviceModel.apply.ProppertyVO;
import java.util.List;
@XStreamAlias("object")
public class ApplyBZDataVO {
    /***
     * è¾“入主键
     */
    @XStreamAsAttribute
    private String id;
    /**
     * ç¼–码
     */
    @XStreamAsAttribute
    private String code;
    /**
     * çŠ¶æ€
     */
    @XStreamAsAttribute
    private  String status;
    /***
     * åˆ›å»ºè€…
     */
    @XStreamAsAttribute
    private String creator;
    /**
     * æ›´æ”¹è€…
     */
    @XStreamAsAttribute
    private  String editor;
    /***
     * æ•°æ®å±žæ€§å¯¹è±¡
     */
    @XStreamImplicit
    private List<ProppertyVO> prop;
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDatasVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
package com.vci.ubcs.code.vo.webserviceModel.applybz;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.vci.ubcs.code.vo.webserviceModel.apply.ApplyDataVO;
import java.util.List;
@XStreamAlias("objects")
public class ApplyBZDatasVO {
    @XStreamImplicit
    private List<ApplyBZDataVO> object;
    public List<ApplyBZDataVO> getObject() {
        return object;
    }
    public void setObject(List<ApplyBZDataVO> object) {
        this.object = object;
    }
    @Override
    public String toString() {
        return "ApplyDatasVO{" +
            "object=" + object +
            '}';
    }
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZParamVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
package com.vci.ubcs.code.vo.webserviceModel.applybz;
public class ApplyBZParamVO {
    private ApplyBZVO data;
    public ApplyBZVO getData() {
        return data;
    }
    public void setData(ApplyBZVO data) {
        this.data = data;
    }
    @Override
    public String toString() {
        return "InterParameterVO{" +
            "data=" + data +
            '}';
    }
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
package com.vci.ubcs.code.vo.webserviceModel.applybz;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.vci.ubcs.code.vo.webserviceModel.apply.UserVO;
/**
 *数据信息
 */
@XStreamAlias("data")
public class ApplyBZVO {
    /***
     * é›†æˆç³»ç»Ÿæ ‡è¯†
     */
    @XStreamAsAttribute
    private String systemId;
    /**
     * æ“ä½œç”¨æˆ·ä¿¡æ¯
     */
    private UserVO user;
    private ClassfyBZVO classify;
    public String getSystemId() {
        return systemId;
    }
    public void setSystemId(String systemId) {
        this.systemId = systemId;
    }
    public UserVO getUser() {
        return user;
    }
    public void setUser(UserVO user) {
        this.user = user;
    }
    public ClassfyBZVO getClassify() {
        return classify;
    }
    public void setClassify(ClassfyBZVO classify) {
        this.classify = classify;
    }
    @Override
    public String toString() {
        return "ApplyBZVO{" +
            "systemId='" + systemId + '\'' +
            ", user=" + user +
            ", classify=" + classify +
            '}';
    }
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ClassfyBZVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
package com.vci.ubcs.code.vo.webserviceModel.applybz;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.vci.ubcs.code.vo.webserviceModel.apply.ApplyDatasVO;
/**
 * åˆ†ç±»ä¿¡æ¯
 */
@XStreamAlias("classify")
public class ClassfyBZVO {
    /**
     * åˆ†ç±»ä»£å·
     */
    @XStreamAsAttribute
    private String classCode;
    /**
     * åº“代号
     */
    @XStreamAsAttribute
    private String library;
    /**
     * ç±»è·¯å¾„
     */
    @XStreamAsAttribute
    private  String fullclsfNamePath;
    /**
     * æ•°æ®é›†åˆ
     */
    private ApplyDatasVO objects;
    public String getClassCode() {
        return classCode;
    }
    public void setClassCode(String classCode) {
        this.classCode = classCode;
    }
    public String getLibrary() {
        return library;
    }
    public void setLibrary(String library) {
        this.library = library;
    }
    public String getFullclsfNamePath() {
        return fullclsfNamePath;
    }
    public void setFullclsfNamePath(String fullclsfNamePath) {
        this.fullclsfNamePath = fullclsfNamePath;
    }
    public ApplyDatasVO getObjects() {
        return objects;
    }
    public void setObjects(ApplyDatasVO objects) {
        this.objects = objects;
    }
    @Override
    public String toString() {
        return "ClassfyBZVO{" +
            "classCode='" + classCode + '\'' +
            ", library='" + library + '\'' +
            ", fullclsfNamePath='" + fullclsfNamePath + '\'' +
            ", objects=" + objects +
            '}';
    }
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ProppertyBZVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
package com.vci.ubcs.code.vo.webserviceModel.applybz;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias("prop")
public class ProppertyBZVO {
    /**
     * å±žæ€§å­—段
     */
    @XStreamAsAttribute
    private  String key;
    /**
     * å±žæ€§æ˜¾ç¤ºåç§°
     */
    @XStreamAsAttribute
    private String text;
    /**
     * å±žæ€§å€¼
     */
    @XStreamAsAttribute
    private  String value;
    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
    public String getText() {
        return text;
    }
    public void setText(String text) {
        this.text = text;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    @Override
    public String toString() {
        return "ProppertyVO{" +
            "key='" + key + '\'' +
            ", text='" + text + '\'' +
            ", value='" + value + '\'' +
            '}';
    }
}
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/result/xml/XMLResultClassfyVO.java
@@ -5,7 +5,7 @@
import java.util.List;
@XStreamAlias("classfy")
@XStreamAlias("classify")
public class XMLResultClassfyVO {
    @XStreamAsAttribute
    private  String classCode;
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplyWebManagementController.java
@@ -55,6 +55,7 @@
    @PostMapping( "/batchAddSave")
    public R batchAddSave(@RequestBody List<SystemClassifyRole> list,String systemOid,String systemId){
        return codeApplyWebManagementService.batchAddSave(list,systemOid,systemId);
//        return R.success("dddd");
    }
    @GetMapping("/getSystemClassifyRoleTree")
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeSyncUniversalController.java
@@ -48,7 +48,9 @@
    public String applyCode(@RequestParam("dataString")String dataString, @RequestParam("dataType")String dataType, HttpServletRequest request)  {
        String result="";
        try {
            this.setHttpToThreadLocal(request);
            ThreadLocal<HttpServletRequest> threadLocal = new ThreadLocal<>();
            threadLocal.set(request);
            universalInterfaceI.setThreadLocal(threadLocal);
            result = universalInterfaceI.applyCode(dataString, dataType);
        }catch (Throwable e){
            e.printStackTrace();
@@ -65,10 +67,9 @@
     * @throws Throwable
     */
    @PostMapping("/syncData")
    public String syncData(@RequestParam("dataString")String dataString,@RequestParam("dataType")String dataType, HttpServletRequest request)  {
    public String syncData(@RequestParam("dataString")String dataString,@RequestParam("dataType")String dataType)  {
        String result="";
        try {
            this.setHttpToThreadLocal(request);
            result= universalInterfaceI.syncEditData(dataString,dataType);
        }catch (Throwable e){
            e.printStackTrace();;
@@ -85,10 +86,9 @@
     * @throws Throwable
     */
    @PostMapping("/queryClassify")
    public String queryClassify(@RequestParam("dataString")String dataString,@RequestParam("dataType")String dataType, HttpServletRequest request) throws Throwable {
    public String queryClassify(@RequestParam("dataString")String dataString,@RequestParam("dataType")String dataType) throws Throwable {
        String result="";
        try {
            this.setHttpToThreadLocal(request);
            result = universalInterfaceI.queryClassify(dataString, dataType);
        }catch (Throwable e){
            e.printStackTrace();
@@ -105,10 +105,9 @@
     * @throws Throwable
     */
    @PostMapping("/queryData")
    public String queryData(@RequestParam("dataString")String dataString,@RequestParam("dataType")String dataType, HttpServletRequest request) throws Throwable {
    public String queryData(@RequestParam("dataString")String dataString,@RequestParam("dataType")String dataType) throws Throwable {
        String result="";
        try {
            this.setHttpToThreadLocal(request);
            result= universalInterfaceI.queryData(dataString,dataType);
        }catch (Throwable e){
            e.printStackTrace();
@@ -125,26 +124,15 @@
     * @throws Throwable
     */
    @PostMapping("/queryClassifyRule")
    public String queryClassifyRule(@RequestParam("dataString")String dataString,@RequestParam("dataType")String dataType, HttpServletRequest request) throws Throwable {
    public String queryClassifyRule(@RequestParam("dataString")String dataString,@RequestParam("dataType")String dataType) throws Throwable {
        String result="";
        try {
            this.setHttpToThreadLocal(request);
            result= universalInterfaceI.queryClassifyRule(dataString,dataType);
        }catch (Throwable e){
            e.printStackTrace();
            logger.error("queryData->"+e.getMessage());
        }
        return result;
    }
    /**
     * è®¾ç½®request,到ThreadLocal中
     * @param request
     */
    public void setHttpToThreadLocal(HttpServletRequest request){
        ThreadLocal<HttpServletRequest> threadLocal = new ThreadLocal<>();
        threadLocal.set(request);
        universalInterfaceI.setThreadLocal(threadLocal);
    }
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/UniversalInterfaceI.java
@@ -20,6 +20,7 @@
public interface UniversalInterfaceI {
    /**
     *统一申请编码接口
     *
     * @param data ä¼ é€’的数据参数
     * @param dataType æ ‡è¯†data是xml格式还是json格式,接口返回数据也是按照这个格式,以下接口类同
     * @return xml格式/json格式
@@ -36,6 +37,7 @@
     * @throws Throwable
     */
    public ResultOrgData syncDataForPerson(PersonData personData);
    /****
     * éƒ¨é—¨æ•°æ®åŒæ­¥
     * @param orgData
@@ -74,4 +76,12 @@
     */
    public String queryClassifyRule(String data,String datatype)throws Throwable;
    /****
     * æ ‡å‡†åŒ–申请接口
     * @param data æ•°æ®ä¿¡æ¯
     * @param dataType æ•°æ®æ ¼å¼ç±»åž‹
     * @return
     * @throws Throwable
     */
    public String applyCodeForBZ(String data,String dataType) throws Throwable;
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeApplyWebManagementServiceImpl.java
@@ -17,9 +17,11 @@
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class CodeApplyWebManagementServiceImpl extends ServiceImpl<SystemClassifyRoleMapper, SystemClassifyRole> implements ICodeApplyWebManagementService {
@@ -45,24 +47,31 @@
        QueryWrapper<SystemClassifyRole> wrapper = new QueryWrapper<>();
        wrapper.eq("systemOid",systemOid);
        wrapper.eq("systemId",systemId);
        List<SystemClassifyRole> systemClassifyRoles = this.listByIds(roleList.stream().map(SystemClassifyRole ::getOid).collect(Collectors.toList()));;
        this.remove(wrapper);
        List<SystemClassifyRole> newSCRoles = new ArrayList<>();
        //数据处理
        systemClassifyRoles.stream().forEach(classifyRole ->{
            classifyRole.setCreator(String.valueOf(AuthUtil.getUser().getUserId()));
            classifyRole.setCreateTime(new Date());
            classifyRole.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId()));
            classifyRole.setLastModifyTime(new Date());
            classifyRole.setTs(new Date());
        });
        newSCRoles.addAll(systemClassifyRoles);
        //处理新选择的数据
        roleList.stream().forEach(systemClassifyRole -> {
            if(StringUtil.isBlank(systemClassifyRole.getOid())){
                DefaultAttrAssimtUtil.addDefaultAttrAssimt(systemClassifyRole,"systemClassifyRole");
                systemClassifyRole.setSystemId(systemId);
                systemClassifyRole.setSystemOid(systemOid);
            }else{
                systemClassifyRole.setCreator(String.valueOf(AuthUtil.getUser().getUserId()));
                systemClassifyRole.setCreateTime(new Date());
                systemClassifyRole.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId()));
                systemClassifyRole.setLastModifyTime(new Date());
                systemClassifyRole.setTs(new Date());
            }
            systemClassifyRole.setTenantId(AuthUtil.getTenantId());
                systemClassifyRole.setSelected(true);
                newSCRoles.add(systemClassifyRole);
            }
        });
        //保存
        this.saveBatch(roleList);
        this.saveBatch(newSCRoles);
        return R.success("操作成功");
    }
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -17,6 +17,8 @@
import com.vci.ubcs.code.util.ClientBusinessObject;
import com.vci.ubcs.code.util.gennerAttrMapUtil;
import com.vci.ubcs.code.vo.pagemodel.*;
import com.vci.ubcs.code.vo.webserviceModel.applybz.ApplyBZParamVO;
import com.vci.ubcs.code.vo.webserviceModel.applybz.ApplyBZVO;
import com.vci.ubcs.code.vo.webserviceModel.person.*;
import com.vci.ubcs.code.vo.webserviceModel.apply.*;
import com.vci.ubcs.code.vo.webserviceModel.attrmap.*;
@@ -1936,6 +1938,134 @@
        return resultStr;
    }
    public String applyCodeForBZ(String data,String dataType){
        String resultStr = "";
//        log.info("方法->applyCodeForBZ start");
//
//        final String[] errorid = {"0"};
//        msg="成功";
//        objerrorCode="0";
//        objerrorMsg="成功";
//        log.info("申请编码的数据参数:->"+data);
//        log.info("申请编码的数据类型:->"+dataType);
//        String systemId="";
//        List<XMLResultClassfyVO> resultClassfyVOList = new ArrayList<>();
//        LinkedList<XMLResultDataObjectDetailDO> resultDataObjectDetailDOs = new LinkedList<>();
//        try{
//            try {
//                if(StringUtils.isBlank(data)) {
//                    errorid[0] ="101";
//                    throw new Throwable("接口参数:传递为空");
//                }
//                ApplyBZParamVO applyBZParamVO  =new ApplyBZParamVO();
//                //如果dataType是xml则,通过xml序列化成对象形式,如果是json则通过json转换成对象格式
//                try {
//                    if ("xml".equals(dataType)) {
//                        XStream xStream = new XStream(new DomDriver());
//                        xStream.processAnnotations(RootDataVO.class);
//                        xStream.autodetectAnnotations(true);
//                        ApplyBZVO rootDataVO = (ApplyBZVO) xStream.fromXML(data);
//                        applyBZParamVO.setData(rootDataVO);
//                    } else {
//                        applyBZParamVO = JSONObject.toJavaObject(JSONObject.parseObject(data), ApplyBZParamVO.class);
//                    }
//                }catch (Throwable e){
//                    errorid[0] ="101";
//                    throw new Throwable("接口参数:传入数据参数解析失败");
//                }
//                ClassfysVO classfysVO = interParameterVO.getData().getClassifys();
//                systemId = interParameterVO.getData().getSystemId();
//                UserVO userVo = interParameterVO.getData().getUser();
//                //免密登录申请token,request中添加用户信息
//                passwordFreeLoginService.passwordFreeLogin(userVo.getUserName(),this.getRequest());
//                AuthUtil.getUser();
//                List<ClassfyVO> classVOList = classfysVO.getClassify();
//                InterParameterVO finalInterParameterVO = interParameterVO;
//                //这是账号信息
//                SessionInfo sessionInfo = new SessionInfo();
//                sessionInfo.setUserId(userVo.getUserName());
//                sessionInfo.setUserName(userVo.getTrueName());
//                sessionInfo.setIp(userVo.getIp());
//                VciBaseUtil.setCurrentUserSessionInfo(sessionInfo);
////                List<XMLResultDataObjectDetailDO> allResultDataObjectDetailDOS=new ArrayList<>();
//                String finalSystemId = systemId;
//            } catch (Throwable e) {
//                List<ApplyDataVO> applyDataVOList= classVO.getObjects().getObject();
//                objerrorCode="1";
//                if(!CollectionUtils.isEmpty(applyDataVOList)) {
//                    applyDataVOList.stream().forEach(applyDataVO -> {
//                        XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO();
//                        xmlResultDataObjectDetailDO.setCode("");
//                        xmlResultDataObjectDetailDO.setId(applyDataVO.getId());
//                        xmlResultDataObjectDetailDO.setErrorid(objerrorCode);
//                        xmlResultDataObjectDetailDO.setMsg("编码申请失败:" + e.getMessage());
//                        resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO);
//                    });
//                }else{
//                    XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO();
//                    xmlResultDataObjectDetailDO.setCode("");
//                    xmlResultDataObjectDetailDO.setId("");
//                    xmlResultDataObjectDetailDO.setErrorid(objerrorCode);
//                    xmlResultDataObjectDetailDO.setMsg("编码申请失败:" + e.getMessage());
//                    resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO);
//                }
//                e.printStackTrace();
//            }finally {
//                XMLResultClassfyVO resultClassfyVO = new XMLResultClassfyVO();
//                resultClassfyVO.setClassCode(classVO.getClassCode());
//                resultClassfyVO.setLibrary(classVO.getLibrary());
//                resultClassfyVO.setFullclsfNamePath(classVO.getFullclsfNamePath());
//                resultClassfyVO.setObjects(resultDataObjectDetailDOs);
//                resultClassfyVOList.add(resultClassfyVO);
//            }
//            XMLResultSystemVO xmlResultSystemVO=new XMLResultSystemVO();
//            xmlResultSystemVO.setClassifys(resultClassfyVOList);
//            xmlResultSystemVO.setMsg(msg);
//            xmlResultSystemVO.setErrorid(errorid[0]);
//            resultStr= transferResultXMl(xmlResultSystemVO,dataType);
//        }catch (Throwable e){
//            e.printStackTrace();
//            msg="申请编码失败:"+e.getMessage();
//          /*  XMLResultSystemVO XMLResultSystemVO=new XMLResultSystemVO();
//            XMLResultSystemVO.setErrorid(errorid);
//            XMLResultSystemVO.setMsg("申请编码失败:->"+e.getMessage());
//            XMLResultSystemVO.setClassifys(resultClassfyVOList);
//            resultStr=transferResultXMl(XMLResultSystemVO,dataType);
//
//            log.error("申请编码失败:->"+e);
//            return resultStr;*/
//        }finally {
//            XMLResultSystemVO xmlResultSystemVO=new XMLResultSystemVO();
//            xmlResultSystemVO.setClassifys(resultClassfyVOList);
//            xmlResultSystemVO.setMsg(msg);
//            xmlResultSystemVO.setErrorid(errorid[0]);
//            resultStr= transferResultXMl(xmlResultSystemVO,dataType);
//            final boolean[] issucess = {true};
//            if(!errorid[0].equals("0")) {
//                issucess[0] = false;
//            }else {
//                if(!CollectionUtils.isEmpty(resultClassfyVOList)) {
//                    resultClassfyVOList.stream().forEach(xMLResultClassfyVO -> {
//                        xMLResultClassfyVO.getObjects().stream().forEach(objec -> {
//                            if (!(objec.getErrorid().equals("0") || objec.getErrorid().equals("204"))) {
//                                issucess[0] = false;
//                                msg=objec.getMsg();
//                            }
//                        });
//                    });
//                }
//            }
//            try {
//                //记录日志
//                this.saveLogs(systemId, systemId, data, resultStr, issucess[0], msg, "applyCodeForBZ");
//            }catch (Throwable e){
//                e.printStackTrace();
//            }
//        }
//        log.info("返回参数:"+resultStr);
        //调用集团申请接口申请集团码
        return resultStr;
    }
    /***
     * æŸ¥è¯¢æ ¡éªŒåˆ†ç±»ä¿¡æ¯
     * @param classfyVO
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml
@@ -70,7 +70,7 @@
               pc.SYSTEMID,
               p.oid CLASSIFYOID,
               p.id CLASSIFYID,
               case when pc.selected is null then 'false' else  pc.SELECTED end SELECTED,
               case when pc.selected is null then false else  pc.SELECTED end SELECTED,
               p.PARENTCODECLASSIFYOID CLASSPARENTOID
        from PL_CODE_CLASSIFY p ,
             PL_CODE_SYSTEM_CLASSIFY_ROLE pc