| | |
| | | menuWidth:260, |
| | | dialogClickModal: false, |
| | | refreshBtn: true, |
| | | columnBtn: true, |
| | | columnBtn: false, |
| | | searchShowBtn: false, |
| | | highlightCurrentRow: true, //行选中时高亮 |
| | | rowKey: "oid", //行数据的 Key,用来优化 Table 的渲染 |
| | |
| | | search: true, |
| | | searchLabelWidth: 80, |
| | | searchSpan: 6, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: "码段名称", |
| | |
| | | search: true, |
| | | searchLabelWidth: 80, |
| | | searchSpan: 6, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: "码段描述", |
| | |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | columnBtn: false, |
| | | searchShowBtn: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: "oid", //行数据的 Key,用来优化 Table 的渲染 |
| | | column: [ |
| | |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | searchSpan: 4, |
| | | sortable: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入编号", |
| | |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | searchSpan: 4, |
| | | sortable: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入名称", |
| | |
| | | </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" |
| | |
| | | </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"> |
| | |
| | | </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" |
| | |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | showCutLength: false, |
| | | /*编码规则表格配置*/ |
| | | optionRule: optionRule, |
| | | data: [], |
| | |
| | | }, |
| | | watch:{ |
| | | |
| | | }, |
| | | mounted(){ |
| | | this.loadTotalEnum(); |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | window.console.log(error); |
| | | }); |
| | | this.loadBasic(this.selectionList[0]); |
| | | // 关闭对话框 |
| | | this.addBasicCodeSettingBox = false |
| | | } |
| | | }, |
| | | // 因为elementui的表单校验设置不上所以采用判断的方式来做表单检验方式 |
| | |
| | | }, |
| | | // 添加 |
| | | rowSave(row, done, loading) { |
| | | console.log(row); |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | |
| | | }, |
| | | 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; |
| | | } |
| | | }, |
| | | // 单击编码规则实现行选择 |
| | |
| | | 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(); |
| | |
| | | } |
| | | return enumCach; |
| | | }, |
| | | // 统一加载所有枚举查询,主要是为避免切换码段类型时还未加载完成的情况 |
| | | loadTotalEnum(){ |
| | | this.loadCodeSecType(); |
| | | this.loadCodeSecLength(); |
| | | this.loadCodeFillType(); |
| | | this.loadCodeFillSeparator(); |
| | | this.loadCodeLevelType(); |
| | | this.loadCodeCutType(); |
| | | this.loadCodeGetValueType(); |
| | | }, |
| | | //枚举和可输可选内容查询 |
| | | loadCodeSecType(){ |
| | | this.enumParam.secTypeList = this.getLocalStorageEnum("codeSecType"); |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | import org.apache.ibatis.type.Alias; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.sql.Clob; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 码段信息 |
| | | */ |
| | | @NotBlank(message = "码段信息不能为空") |
| | | private String id; |
| | | |
| | | /** |
| | | * 码段名称 |
| | | */ |
| | | @NotBlank(message = "码段名称不能为空") |
| | | private String name; |
| | | |
| | | /** |
| | | * 码段类型 |
| | | */ |
| | | @NotBlank(message = "码段类型不能为空") |
| | | private String secType; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 所属编码规则 |
| | | */ |
| | | @NotBlank(message = "所属编码规则不能为空") |
| | | private String pkCodeRule; |
| | | |
| | | /** |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | /** |
| | | * 编码规则 实体类 |
| | | * |
| | |
| | | /** |
| | | * 规则编号 |
| | | */ |
| | | @NotBlank(message = "规则编号不能为空") |
| | | private String id; |
| | | |
| | | /** |
| | | * 规则的名称 |
| | | */ |
| | | @NotBlank(message = "规则的名称不能为空") |
| | | private String name; |
| | | |
| | | /** |
| | |
| | | @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); |
| | |
| | | public R deleteCodeBasicSecByPrimaryKey(String oid) throws VciBaseException { |
| | | CodeBasicSec codeBasicSecDO = selectByOid(oid); |
| | | boolean isLinked = checkIsLinked(codeBasicSecDO.getPkCodeRule(), oid); |
| | | if (!isLinked) { |
| | | if (isLinked) { |
| | | return R.fail("编码规则已被引用,不允许编辑或删除"); |
| | | } |
| | | //执行删除操作 |
| | |
| | | VciBaseUtil.alertNotNull(codeRuleDTO, "需要添加的数据对象"); |
| | | //将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); |
| | |
| | | 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; |
| | | |
| | |
| | | private final ITenantService tenantService; |
| | | |
| | | private final ITenantPackageService tenantPackageService; |
| | | |
| | | /** |
| | | * 超管租户id |
| | | */ |
| | | @Value("${user-info.tenant-id}") |
| | | private String tenantId; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询租户信息,简键值对形势 |
| | | * 查询租户信息,键值对形式 |
| | | * @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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; |
| | |
| | | |
| | | 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) { |
| | |
| | | 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); |
| | | } |
| | | |