ludc
2023-07-04 1f238ae264c0dfca87bba9ea9da5456153991eaa
修改system服务部分接口
已修改10个文件
84 ■■■■ 文件已修改
Source/UBCS-WEB/src/const/code/codebasic.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/const/code/mdmrule.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/code/code.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeBasicSec.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeRule.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeBasicSecController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/TenantController.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/const/code/codebasic.js
@@ -14,7 +14,7 @@
    menuWidth:260,
    dialogClickModal: false,
    refreshBtn: true,
    columnBtn: true,
    columnBtn: false,
    searchShowBtn: false,
    highlightCurrentRow: true, //行选中时高亮
    rowKey: "oid", //行数据的 Key,用来优化 Table 的渲染
@@ -25,6 +25,7 @@
        search: true,
        searchLabelWidth: 80,
        searchSpan: 6,
        sortable: true,
      },
      {
        label: "码段名称",
@@ -32,6 +33,7 @@
        search: true,
        searchLabelWidth: 80,
        searchSpan: 6,
        sortable: true,
      },
      {
        label: "码段描述",
Source/UBCS-WEB/src/const/code/mdmrule.js
@@ -10,6 +10,8 @@
  viewBtn: true,
  selection: true,
  dialogClickModal: false,
  columnBtn: false,
  searchShowBtn: false,
  highlightCurrentRow: true,
  rowKey: "oid", //行数据的 Key,用来优化 Table 的渲染
  column: [
@@ -19,6 +21,7 @@
      search: true,
      searchLabelWidth: 45,
      searchSpan: 4,
      sortable: true,
      rules: [{
        required: true,
        message: "请输入编号",
@@ -31,6 +34,7 @@
      search: true,
      searchLabelWidth: 45,
      searchSpan: 4,
      sortable: true,
      rules: [{
        required: true,
        message: "请输入名称",
Source/UBCS-WEB/src/views/code/code.vue
@@ -529,7 +529,7 @@
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="补位时的字符:" :label-width="rightFormLabelWidth">
              <el-form-item v-if="form.codeFillType!='code_fill_none'" label="补位时的字符:" :label-width="rightFormLabelWidth">
                <el-select v-model="form.codeFillSeparator" @blur="inputSelectBlur" filterable placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in enumParam.codeFillSeparator"
@@ -577,7 +577,7 @@
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item id="ShowOrHide" v-mode="showCutLength" v-if="showCutLength==true" label="值截取长度:" :label-width="rightFormLabelWidth">
              <el-form-item id="ShowOrHide" v-if="form.valueCutType!='code_cut_none'" label="值截取长度:" :label-width="rightFormLabelWidth">
                <el-input v-model.number="form.valueCutLength" ref="valueCutLength"  :readonly="basicSecOnlyRead"></el-input>
              </el-form-item>
              <el-form-item label="取值类型:" :label-width="rightFormLabelWidth">
@@ -669,7 +669,7 @@
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="补位时的字符:" :label-width="rightFormLabelWidth">
              <el-form-item v-if="form.codeFillType!='code_fill_none'" label="补位时的字符:" :label-width="rightFormLabelWidth">
                <el-select v-model="form.codeFillSeparator" filterable @blur="inputSelectBlur" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in enumParam.codeFillSeparator"
@@ -840,7 +840,6 @@
            total: 0
          },
          selectionList: [],
          showCutLength: false,
          /*编码规则表格配置*/
          optionRule: optionRule,
          data: [],
@@ -1096,6 +1095,9 @@
      },
      watch:{
      },
      mounted(){
        this.loadTotalEnum();
      },
      methods: {
@@ -1697,6 +1699,8 @@
                window.console.log(error);
            });
            this.loadBasic(this.selectionList[0]);
            // 关闭对话框
            this.addBasicCodeSettingBox = false
          }
        },
        // 因为elementui的表单校验设置不上所以采用判断的方式来做表单检验方式
@@ -2289,6 +2293,7 @@
        },
        // 添加
        rowSave(row, done, loading) {
          console.log(row);
          add(row).then(() => {
            this.onLoad(this.page);
            this.$message({
@@ -2386,13 +2391,11 @@
        },
        changeCutType(value){
          if (value != 'code_cut_none'){
            this.showCutLength = true;
            if(this.form.valueCutLength == ''){
              this.form.valueCutLength = 1;
            }
          }else{
            this.form.valueCutLength = '';
            this.showCutLength = false;
          }
        },
        // 单击编码规则实现行选择
@@ -2604,12 +2607,6 @@
              valueCutLength: row!=null&&row.valueCutLength != '' ? row.valueCutLength:'',    //
              codeGetValueType: row!=null&&row.codeGetValueType != '' ? row.codeGetValueType:'code_get_value_all_up',  //取值类型 枚举查询
            });
            if(this.form.valueCutType === 'code_cut_none'){
              this.showCutLength = false;
            }else{
              this.showCutLength = true;
            }
            this.loadCodeLevelType();
            this.loadCodeCutType();
            this.loadCodeGetValueType();
@@ -2661,6 +2658,16 @@
          }
          return enumCach;
        },
        // 统一加载所有枚举查询,主要是为避免切换码段类型时还未加载完成的情况
        loadTotalEnum(){
          this.loadCodeSecType();
          this.loadCodeSecLength();
          this.loadCodeFillType();
          this.loadCodeFillSeparator();
          this.loadCodeLevelType();
          this.loadCodeCutType();
          this.loadCodeGetValueType();
        },
        //枚举和可输可选内容查询
        loadCodeSecType(){
          this.enumParam.secTypeList = this.getLocalStorageEnum("codeSecType");
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeBasicSec.java
@@ -11,6 +11,7 @@
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.Alias;
import javax.validation.constraints.NotBlank;
import java.sql.Clob;
/**
@@ -33,16 +34,19 @@
    /**
     * 码段信息
     */
    @NotBlank(message = "码段信息不能为空")
    private String id;
    /**
     * 码段名称
     */
    @NotBlank(message = "码段名称不能为空")
    private String name;
    /**
     * 码段类型
     */
    @NotBlank(message = "码段类型不能为空")
    private String secType;
    /**
@@ -55,6 +59,7 @@
    /**
     * 所属编码规则
     */
    @NotBlank(message = "所属编码规则不能为空")
    private String pkCodeRule;
    /**
Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeRule.java
@@ -24,6 +24,8 @@
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
/**
 * 编码规则 实体类
 *
@@ -44,11 +46,13 @@
    /**
     * 规则编号
     */
    @NotBlank(message = "规则编号不能为空")
    private String id;
    /**
     * 规则的名称
     */
    @NotBlank(message = "规则的名称不能为空")
    private String name;
    /**
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeBasicSecController.java
@@ -62,7 +62,7 @@
    @PostMapping( "/addSave")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "增加 码段基础信息", notes = "codeBasicSecDTO")
    public R addSave(@RequestBody CodeBasicSecDTO codeBasicSecDTO){
    public R addSave(@Valid @RequestBody CodeBasicSecDTO codeBasicSecDTO){
        boolean resBoolean;
        try {
            resBoolean = codeBasicSecService.addSave(codeBasicSecDTO);
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -456,7 +456,7 @@
    public R deleteCodeBasicSecByPrimaryKey(String oid) throws VciBaseException {
        CodeBasicSec codeBasicSecDO = selectByOid(oid);
        boolean isLinked = checkIsLinked(codeBasicSecDO.getPkCodeRule(), oid);
        if (!isLinked) {
        if (isLinked) {
            return R.fail("编码规则已被引用,不允许编辑或删除");
        }
        //执行删除操作
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java
@@ -132,8 +132,9 @@
    @Override
    public boolean addSave(CodeRuleDTO codeRuleDTO) throws VciBaseException {
        VciBaseUtil.alertNotNull(codeRuleDTO, "需要添加的数据对象");
        //将DTO转换为DO
        // 将DTO转换为DO
        CodeRule codeRule = Objects.requireNonNull(BeanUtil.copy(codeRuleDTO, CodeRule.class));
        // 填充默认值
        DefaultAttrAssimtUtil.addDefaultAttrAssimt(codeRule, MdmBtmTypeConstant.CODE_RULE);
        codeRule.setLctid(CODE_RULE_LC);
        codeRule.setLcStatus(FRAMEWORK_RELEASE_EDITING);
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/TenantController.java
@@ -37,10 +37,12 @@
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -66,6 +68,12 @@
    private final ITenantService tenantService;
    private final ITenantPackageService tenantPackageService;
    /**
     * 超管租户id
     */
    @Value("${user-info.tenant-id}")
    private String tenantId;
    /**
     * 详情
@@ -218,15 +226,20 @@
    }
    /**
     * 查询租户信息,简键值对形势
     * 查询租户信息,键值对形式
     * @return
     */
    @GetMapping("/tenant-map")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "下拉租户信息")
    public R<List> findAll() {
        List<Map<String, Object>> map = tenantService.selectMaps();
        return R.data(map);
        List<Map<String, Object>> mapList = tenantService.selectMaps();
        if(Func.isNotEmpty(tenantId)){
            Map<String, Object> map = new HashMap<>();
            map.put("管理组", tenantId);
            mapList.add(map);
        }
        return R.data(mapList);
    }
    /**
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java
@@ -34,6 +34,7 @@
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringPool;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
@@ -50,6 +51,11 @@
    private static final String TENANT_ID = "tenantId";
    private static final String PARENT_ID = "parentId";
    /**
     * nacos配置的管理组租户id
     */
    @Value("${user-info.tenant-id}")
    private String tenantId;
    @Override
    public IPage<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param, Query query) {
@@ -80,10 +86,10 @@
        return baseMapper.lazyList(tenantId, parentId, param, Condition.getPage(query));
    }
    @Override
    public List<DeptVO> tree(String tenantId) {
        List<DeptVO> tree = baseMapper.tree(tenantId);
        // 这里判断我们自己配置的管理组租户,可以查询所有
        List<DeptVO> tree = baseMapper.tree(tenantId.equals(this.tenantId) ? "":tenantId);
        return ForestNodeMerger.merge(tree);
    }