wangting
2023-07-05 92e7dde00a56aff46e01efe72e1f7ab9b76dcf69
Merge remote-tracking branch 'origin/master'
已修改10个文件
169 ■■■■■ 文件已修改
Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/BladeBeanSerializerModifier.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/BatchImport/index.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/template/Stage.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/Version.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/original.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/BladeX-Tool/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/BladeBeanSerializerModifier.java
@@ -43,7 +43,7 @@
            JavaType type = writer.getType();
            Class<?> clazz = type.getRawClass();
            if (type.isTypeOrSubTypeOf(Number.class)) {
                writer.assignNullSerializer(NullJsonSerializers.NUMBER_JSON_SERIALIZER);
//                writer.assignNullSerializer(NullJsonSerializers.NUMBER_JSON_SERIALIZER);
            } else if (type.isTypeOrSubTypeOf(Boolean.class)) {
                writer.assignNullSerializer(NullJsonSerializers.BOOLEAN_JSON_SERIALIZER);
            } else if (type.isTypeOrSubTypeOf(Character.class)) {
Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
@@ -6,7 +6,7 @@
    append-to-body
    top="5vh"
  >
    <div>
    <!-- <div>
      <FormTemplate
        v-if="type === 'batchApplyCode'"
        type="add"
@@ -16,9 +16,9 @@
        @getFormData="getCodeApplyFormData"
        @referConfigDataUpdate="referConfigDataUpdate"
      ></FormTemplate>
    </div>
    </div> -->
    <div class="flex_box">
      <div class="left" :style="{ width: leftWidth + 'px' }">
      <div class="left" :style="{ width: leftWidth + 'px' }" v-show="false">
        <div class="isExpand_box">
          <el-link type="primary" @click="hideTree">
            <i
@@ -91,22 +91,6 @@
                </el-table-column>
              </el-table>
              <div v-else style="height: 400px"></div>
            </el-tab-pane>
            <el-tab-pane :label="tab2Name" name="tab2">
              <el-table border :data="tab2Table" height="400px">
                <el-table-column
                  v-for="item in cloNamesList"
                  :key="item.field"
                  :prop="item.field"
                  :label="item.title"
                  :width="item.width"
                  align="center"
                >
                </el-table-column>
              </el-table>
            </el-tab-pane>
          </el-tabs>
        </div>
        <div>
          <el-table
            border
@@ -141,6 +125,23 @@
            ></el-table-column>
          </el-table>
        </div>
            </el-tab-pane>
            <el-tab-pane :label="tab2Name" name="tab2">
              <el-table border :data="tab2Table" height="600px">
                <el-table-column
                  v-for="item in cloNamesList"
                  :key="item.field"
                  :prop="item.field"
                  :label="item.title"
                  :width="item.width"
                  align="center"
                >
                </el-table-column>
              </el-table>
            </el-tab-pane>
          </el-tabs>
        </div>
      </div>
    </div>
    <template #footer>
@@ -176,7 +177,7 @@
export default {
  name: "ShowImportData",
  components: { ResembleQuery, FormTemplate },
  mixins: [codeApply],
  // mixins: [codeApply],
  props: {
    title: {
      type: String,
@@ -199,7 +200,11 @@
      type: String,
      default: "",
    },
    type: String
    type: String,
    secDTOList: {
      type: Array,
      default: () => ({})
    }
  },
  computed: {
    dialogVisible: {
@@ -295,8 +300,8 @@
    },
    submit() {
      const params = {
        classifyAttr: this.classifyAttr,
        improt: true,
        classifyAttr: this.type === 'historyImport' ? this.classifyAttr : undefined,
        improt: this.type === 'historyImport' ? true : false,
        codeImprotSaveDatVOList: [
          {
            Clos: this.cloNamesList.map((item) => item.title),
@@ -304,7 +309,7 @@
            orderDTO: {
              codeClassifyOid: this.codeClassifyOid,
              templateOid: this.templateOid,
              secDTOList: [],
              secDTOList: this.secDTOList,
            },
          },
        ],
@@ -329,6 +334,7 @@
      handler(arr) {
        if (arr.length > 0 && this.type === 'batchImportApply') {
          this.treeNodeClick(arr[0])
          this.leftWidth = 0
        }
      }
    }
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -76,6 +76,8 @@
      :codeClassifyOid="codeClassifyOid"
      :redisOid="redisOid"
      :type="type"
      :title="title"
      :secDTOList="secDTOList"
    ></ShowImportData>
  </el-dialog>
</template>
@@ -135,7 +137,7 @@
      return this.currentTypeObj[this.type]["tipList"];
    },
    downloadTemplateApi() {
      console.log(this.currentTypeObj[this.type], 'this.type');
      console.log(this.currentTypeObj[this.type], "this.type");
      return this.currentTypeObj[this.type]["downloadTemplateFun"];
    },
    action() {
@@ -148,15 +150,16 @@
          classifyAttr: this.classifyAttr,
        };
      } else if (this.type === "batchImportApply") {
        const secDTOList = this.localSecVOList.map(item => {
        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
        this.secDTOList = this.localSecVOList.map((item) => {
            return {
              secOid: item.oid,
              secValue: this.codeApplyForm[item.id]
            }
          })
            secValue: this.codeApplyForm[item.id],
          };
        });
        return {
          codeClassifyOid: this.codeClassifyOid,
          secDTOList: JSON.stringify(secDTOList),
          secDTOList: JSON.stringify(this.secDTOList),
          ...this.codeApplyForm,
        };
      } else if (this.type === "batchApplyCode") {
@@ -212,6 +215,7 @@
          upParams: "classifyAttr",
        },
      },
      secDTOList: [],
    };
  },
  methods: {
@@ -252,9 +256,9 @@
    },
    onSuccess(res) {
      if (Object.keys(res.data).length === 0) {
        this.$message.success(this.title + '导入成功!')
        this.dialogVisible = false
        return
        this.$message.success(this.title + "导入成功!");
        this.dialogVisible = false;
        return;
      }
      if (res.data.fileOid) {
        const fileName = res.data.filePath.split("/").pop();
@@ -277,7 +281,7 @@
      }
    },
    onError(err) {
      console.log(err, 'err');
      console.log(err, "err");
      this.pageLoading.close();
    },
    uploadChange(file) {
Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -456,6 +456,7 @@
        this.$message.warning("编码状态不是“编辑中”,不可编辑");
      } else {
        this.editvisible = true;
        this.rowOid = this.selectRow[0]['oid']
      }
    },
    //高级查询按钮
Source/UBCS-WEB/src/components/template/Stage.vue
@@ -162,9 +162,10 @@
                    item = { oid, id, name, attributeGroup, ...{ checked: false } }
                    if (dataRight.length !== 0) {
                        dataRight.forEach(element => { if (item.id === element.attrId) item.checked = true });
                        return item
                    }
                    return item
                })
                console.log(datas)
                let dataValue = datas.map(item => item.checked ? item.oid : undefined)
                this.attributeValue = dataValue.filter(item => item)
                this.attributeData = datas
@@ -187,8 +188,11 @@
        handleMaintenance(row) {
            console.log(row)
            this.dialogNode = true
            this.modelKey = row.modelKey
            this.saveParam.modelKey = row.modelKey
            this.getStagelist()
        },
        // 维护
        handleMaintenanceTransfer(row) {
            this.saveParam.taskId = row.taskId
            this.saveParam.taskName = row.taskName
Source/UBCS-WEB/src/views/modeling/BusinessAdd.vue
@@ -53,16 +53,18 @@
        <avue-crud :option="option"
        :data="btmType.attributes"
        :page.sync="page"
        ref="attrTable"
        @cell-mouse-enter="cellEditClick"
        @cell-mouse-leave="cellEditSave">
        ref="attrTable">
            <template slot-scope="scope" slot="menuLeft">
                <el-button type="danger"
                icon="el-icon-plus"
                size="small"
                @click="rowAdd()">属性选择</el-button>
            </template>
          <template slot="menu" slot-scope="{row,index}">
            <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="cellEditClick(row)">编辑</el-button>
            <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" @click="removeFormAttrTable(row,index)">移除</el-button>
            <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="cellEditSave(row,index)">保存</el-button>
          </template>
        </avue-crud>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="submitBtmType">确定</el-button>
@@ -83,7 +85,8 @@
            ref="attrRef"
            @on-load="attrRefOnLoad"
            @search-change="attrRefSearch"
            @selection-change="selectionChange">
            @selection-change="selectionChange"
            v-loading="attrRef.loading">
                <template slot="typeValue" slot-scope="scope" >
                    <el-tag>{{scope.row.typeValue}}</el-tag>
                </template>
@@ -145,13 +148,16 @@
            showSubmitDialog : false,
            option: {
                height: "330px",
                selection: true,
                selection: false,
                headerAlign: 'center',
                border: true,
                index: true,
                rowKey: 'id',
                tabs: true,
                menu: false,
                menu: true,
                editBtn: false,
                delBtn: false,
                menuWidth: 150,
                addBtn:false,
                highlightCurrentRow: true,
                column: [
@@ -191,6 +197,7 @@
                    currentPage:1,
                    pageSize:10,
                },
                loading: false,
                key: null,
                option:{
                    height: 360,
@@ -251,7 +258,7 @@
                    ]
                },
                data: [],
                queryNotIn: null
                queryNotIn: ''
            },
            revisionRef: {
                visible: false,
@@ -345,18 +352,22 @@
        closeAttrDialog(){
            this.attrRef.visible = false;
        },
        // 添加
        rowAdd(){
        // 属性选择添加
        async rowAdd() {
            await this.attrRefOnLoad();
            this.attrRef.visible = true;
            this.attrRefOnLoad();
        },
        // 属性池加载
        attrRefOnLoad(){
            this.attrRef.loading = true;
            queryPage(this.attrRef.key,this.attrRef.queryNotIn,this.attrRef.page.currentPage, this.attrRef.page.pageSize).then(res => {
                const data = res.data.data;
                this.attrRef.page.total = data.total;
                this.attrRef.data = data.records;
            });
            setTimeout(() => {
              this.attrRef.loading = false;
            },600)
            this.$nextTick(() => {
                this.$refs.attrRef.refreshTable();
            });
@@ -368,6 +379,14 @@
            done();
            this.attrRef.key = null;
        },
        // 从属性池中移除
        removeFormAttrTable(row,index){
          this.btmType.attributes.splice(index,1);
          this.attrRef.queryNotIn = "";
          this.btmType.attributes.forEach(item => {
            this.attrRef.queryNotIn += (item.id + ",")
          })
        },
        // 属性池勾选事件
        selectionChange(list){
            this.attrRef.selectData = list;
@@ -377,7 +396,6 @@
            if(!this.btmType.attributes){
                this.btmType.attributes = [];
            }
            this.attrRef.queryNotIn = "";
            this.attrRef.selectData.forEach(item => {
                this.btmType.attributes.push({
                    id: item.id,
@@ -395,6 +413,7 @@
                });
                this.attrRef.queryNotIn += (item.id + ",")
            });
            this.attrRef.data = [];
            this.closeAttrDialog();
        },
        // 取消属性池勾选
@@ -430,6 +449,7 @@
        },
        // 列表编辑
        cellEditClick(cell){
          console.log(cell);
            cell.$cellEdit = true;
        },
        // 列表编辑保存
Source/UBCS-WEB/src/views/modeling/LinkTypeAdd.vue
Source/UBCS-WEB/src/views/modeling/Version.vue
@@ -75,6 +75,7 @@
          {
            label:'英文名称',
            prop: 'id',
            editDisabled: true,
            rules: [
              {
                required: true,
Source/UBCS-WEB/src/views/modeling/original.vue
@@ -17,7 +17,7 @@
            </el-button>
            <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen">查看使用范围
            </el-button>
            <el-input placeholder="按属性英文名称查询" v-model="searchId" clearable prefix-icon="el-icon-search" class="attrSearch"
            <el-input placeholder="按属性编号查询" v-model="searchId" clearable prefix-icon="el-icon-search" class="attrSearch"
              size="small" @change="doSearch" type="text"></el-input>
            <el-button size="small" plain type="primary" icon="el-icon-search" @click="doSearch">&nbsp;搜索</el-button>
          </template>
@@ -279,14 +279,14 @@
      this.$refs.originalAdd.activeName = this.itemForm.activeName;
      this.$refs.originalAdd.enumInitFlag = this.itemForm.enumInitFlag;
      this.$refs.originalAdd.referInitFlag = this.itemForm.referInitFlag;
      this.refreshChange()
      // this.refreshChange()
    },
    deleteSave(row,index) {
      console.log(row);
      remove(row.oid).then(res => {
        this.$message.success("删除成功");
      });
      this.refreshChange();
      });
    },
    onLoad(page, params = {}) {
      this.loading = true;
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -57,7 +57,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.log.exception.ServiceException;
import com.vci.ubcs.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.DateUtil;
@@ -365,6 +365,9 @@
        // 回收需要业务数据删除
        if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) {
            R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(baseModelDTO.getBtmname()));
            if (!listR.isSuccess() || listR.getData().size() == 0) {
                throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
            }
            commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid()));
        } else {
            for (BaseModel baseModel : baseModels) {
@@ -646,6 +649,9 @@
//            final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "};
            R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getTopClassifyVO().getBtmtypeid()));
//                String referTable = VciBaseUtil.getTableName(referVO.getReferType());
            if (!listR.isSuccess() || listR.getData().size() == 0) {
                throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
            }
            final String[] sql = {"select count(*) from " + listR.getData().get(0).getTableName() + " t where 1 = 1 "};
            conditionMap.forEach((key, value) -> {
                sql[0] += " and " + key + " = " + value;
@@ -1221,7 +1227,8 @@
            fieldVO.setTemplet(attrVO.getTableDisplayJs());
        }
        if (StringUtils.isBlank(fieldVO.getTemplet()) && VciFieldTypeEnum.VTBoolean.name().equalsIgnoreCase(attrVO.getAttributeDataType())) {
            fieldVO.setTemplet("function(d){return $webUtil.formateBoolean(d." + fieldVO.getField() + ");}");
            fieldVO.setTemplet("function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'是':'否'}");
//            fieldVO.setTemplet("function(d){return $webUtil.formateBoolean(d." + fieldVO.getField() + ");}");
        }
        fieldVO.setOptionJsMap(eventJsMap);
        fieldVO.setStyle(attrVO.getTableDisplayStyle());
@@ -1595,6 +1602,9 @@
                //使用传入的业务类型查询表
                R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referVO.getReferType()));
//                String referTable = VciBaseUtil.getTableName(referVO.getReferType());
                if (!listR.isSuccess() || listR.getData().size() == 0) {
                    throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
                }
                String referTable = listR.getData().get(0).getTableName();
//                String referTable = "pl_code_classify";
                String referTableNick = attrVO.getId() + "0";
@@ -1691,6 +1701,9 @@
        }
//        String tableName = VciBaseUtil.getTableName(btmType);
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
//                String referTable = VciBaseUtil.getTableName(referVO.getReferType());
        String tableName = listR.getData().get(0).getTableName();
        String sql = "select " + selectFieldList.stream().map(s -> (s.contains(".") ? s : ("t." + s))).collect(Collectors.joining(","))
@@ -2229,7 +2242,7 @@
//        baseMapper.deleteBatchIds(cboList);
        //使用传入的业务类型查询表
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getCurrentClassifyVO().getBtmtypeid()));
        if (listR.getData().size() == 0) {
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(),
@@ -3166,7 +3179,7 @@
    public Integer insertBatchByType(String btmType, List<BaseModel> baseModels) {
        //使用传入的业务类型查询表
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
        if (listR.getData().size() == 0) {
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        //将bean转为map,mybatis统一处理
@@ -3193,7 +3206,7 @@
        //使用传入的业务类型查询表
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
        if (listR.getData().size() == 0) {
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        //查询数据
@@ -3251,6 +3264,9 @@
     */
    public BaseModel createBaseModel(String boName) {
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(boName));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        String userName = String.valueOf(AuthUtil.getUser().getUserId());
        BaseModel bo = new BaseModel();
//        bo.setOid(VciBaseUtil.getPk());
@@ -3318,7 +3334,7 @@
    public R updateBatchByBaseModel(String btmType, List<BaseModel> baseModels) {
        //使用传入的业务类型查询表
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType));
        if (listR.getData().size() == 0) {
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        //将bean转为map,mybatis统一处理
@@ -3579,6 +3595,9 @@
        toBo.setVersionRule(fromBo.getVersionRule());
//        RevisionValueObject rvObj = this.getNextRevision(fromBo.getBtmName(), fromBo.getNameoid(), item.revRuleName, item.revInput, revisionVal);
        R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(fromBo.getBtmname()));
        if (!listR.isSuccess() || listR.getData().size() == 0) {
            throw new VciBaseException("传入业务类型未查询到相应表单,请检查!");
        }
        Map<String, Object> nextRevision = commonsMapper.getNextRevision(listR.getData().get(0).getTableName(), fromBo.getNameOid());
        toBo.setRevisionSeq(Integer.parseInt(nextRevision.get("REVISIONSEQ").toString()));
        toBo.setRevisionValue(nextRevision.get("REVISIONVAL").toString());