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/Tree/attrCrud.vue
@@ -1,36 +1,38 @@ <template> <div> <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag"> <el-button-group> <!--新增--> <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" @click="busineHandle">+ 添加 {{ msg }} </el-button> <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" icon="el-icon-plus" @click="busineHandle">添加 {{ msg }}</el-button> <!-- 全屏编辑--> <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle"> 全屏编辑 </el-button> <!-- 组合规则--> <el-button size="small" @click="isShowHandler">组合规则</el-button> <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle" icon="el-icon-full-screen">全屏编辑</el-button> <!-- 验证规则--> <el-button icon="el-icon-info" size="small" @click="rulesVisible=true">验证规则</el-button> <!-- 属性分组--> <el-button icon="el-icon-menu" size="small" @click="attrVisibleHandle">属性分组</el-button> </el-button-group> <el-button-group> <!-- 分类注入--> <el-button icon="el-icon-magic-stick" size="small" @click="injectBtn">分类注入</el-button> <!-- 组合规则--> <el-button size="small" @click="isShowHandler">组合规则</el-button> <!-- 枚举注入--> <el-button size="small" @click="enmuVisHandle">枚举注入</el-button> <!-- 级联属性--> <el-button size="small" @click="CascadeHandle">级联属性</el-button> <!-- 预览排序--> <el-button size="small">预览排序</el-button> <el-button size="small" icon="el-icon-arrow-down">预览排序</el-button> </el-button-group> <el-button-group> <!-- 保存--> <el-button size="small" @click="addsHandler">保存</el-button> <el-button size="small" @click="addsHandler" icon="el-icon-check">保存</el-button> <!-- 删除--> <el-button size="small" @click="CrudRemove">删除</el-button> <el-button size="small" @click="CrudRemove" icon="el-icon-delete">删除</el-button> <!-- 重置--> <el-button size="small" @click="reset">重置</el-button> <el-button size="small" @click="reset" icon="el-icon-refresh-right">重置</el-button> <!-- 同步到其他模板--> <el-button size="small"@click="syncHandle">同步到其他模板</el-button> <el-button size="small"@click="syncHandle" icon="el-icon-share">同步到其他模板</el-button> </el-button-group> <!-- 编码申请预览--> <el-button size="small" @click="applicationHandle" style="">编码申请预览</el-button> <!-- 验证规则--> @@ -92,7 +94,7 @@ </el-table-column> <el-table-column fixed="right" label="操作" width="120"> <template slot-scope="scope"> <el-button size="small" type="text" @click.native.prevent="enumDeleteRow(scope.$index, tableData)"> <el-button size="small" type="text" plain @click="enumDeleteRow"> 移除 </el-button> </template> @@ -224,7 +226,7 @@ </avue-crud> <div style="display: flex;justify-content: flex-end;margin-top: 15px"> <el-button size="small" type="primary" @click="busineAddHandle">保存</el-button> <el-button size="small" type="primary">取消</el-button> <el-button size="small" type="primary" @click="addVisible=false">取消</el-button> </div> </el-dialog> </div> @@ -232,6 +234,7 @@ style="width: 100%" @cell-click="handleCellClicks" @select="selectHandle" @selection-change="selectionChange" v-if="this.crudArrayFlag" > <el-table-column @@ -243,7 +246,7 @@ :label="item.label" :prop="item.prop" :formatter="formAttr" :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'" :width="item.width||(item.label.length >=4 ?'150':item.label.length==3 ?'120':'90')" :show-overflow-tooltip="true" align="center" > @@ -901,11 +904,27 @@ }, { label: "数据类型", prop: "attrDataType" prop: "attrDataType", formatter:function(row,column){ let vciFieldTypeMap = { VTBoolean: "布尔型", VTClob: "长文本", VTDate: "日期", VTDateTime: "日期时间", VTTime: "时间", VTLong: "长整型", VTDouble: "金额/双精度", VTInteger: "整形", VTFilePath: "文件", VTString: "字符串" } return vciFieldTypeMap[row.attrDataType]; } }, { label: "可空", prop: "nullableFlag" prop: "nullableFlag", formatter:function(row,column){return row.nullableFlag=='true' || row.nullableFlag=='1'?'是':'否'} }, { label: "默认值", @@ -925,11 +944,25 @@ }, { label: "参照", prop: "referFlag" prop: "referFlag", formatter: function (d) { if (!d.referFlag) { return ''; } else { return d.referBtmTypeId } } }, { label: "枚举", prop: "enumFlag" prop: "enumFlag", formatter: function (d) { if (!d.enumFlag) { return ''; } else { return d.enumId } } }, ] }, @@ -959,7 +992,7 @@ label: '排序号', sortable: true, edit: 'number', width: 60, width: 70, fixed: true }, { label: "属性英文编号", @@ -1016,14 +1049,14 @@ { label: "高级查询属性", prop: "seniorQueryAttrFlag", width: 95, width: 110, cell: false, edit: "switch" }, { label: "相似查重属性", prop: "sameRepeatAttrFlag", width: 95, width: 110, cell: false, edit: "switch" }, @@ -1285,7 +1318,6 @@ this.$message.warning('请选择属性集'); return false; } debugger; let ordernum = this.ProData.length; this.busineSelectList.forEach((citem) => { let isCopy = false; @@ -1320,8 +1352,6 @@ this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList))) } }) this.addVisible = false; }, @@ -1407,7 +1437,7 @@ }, //枚举注入删除 enumDeleteRow(row) { this.tableData.splice(row, 1) this.tableData.splice(row.$index, 1) }, //枚举注入按钮 enmuVisHandle() { @@ -1507,7 +1537,10 @@ }, //表格删除 CrudRemove() { this.ProData.splice(this.attrRow.$index, 1) this.attrSelectList.forEach((item)=>{ this.ProData.splice(item.$index, 1) }) }, //表格重置 reset() { 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/originalAdd.vue
@@ -297,17 +297,17 @@ submitAttribute() { const that = this; if (that.referInitFlag && that.referEditFlag){ this.$delete(this.attribute,'dictCode'); this.$delete(this.attribute,'dictKey'); this.$delete(this.attribute,'dictValue'); this.$delete(this.attribute,'usingDict'); this.$set(this.attribute,'dictCode',''); this.$set(this.attribute,'dictKey',''); this.$set(this.attribute,'dictValue',''); this.$set(this.attribute,'usingDict',''); } if (that.enumInitFlag && that.enumEditFlag){ this.$delete(this.attribute,'referTypeCode'); this.$delete(this.attribute,'referTypeKey'); this.$delete(this.attribute,'referTypeValue'); this.$delete(this.attribute,'referToId'); this.$delete(this.attribute,'referToName'); this.$set(this.attribute,'referTypeCode',''); this.$set(this.attribute,'referTypeKey',''); this.$set(this.attribute,'referTypeValue',''); this.$set(this.attribute,'referToId',''); this.$set(this.attribute,'referToName',''); } this.$refs.form.validate(function (pass, field) { if (pass) { Source/UBCS/ubcs-service-api/ubcs-omd-api/src/main/java/com/vci/ubcs/omd/constant/BtmTypeConstant.java
@@ -54,6 +54,16 @@ public static final String LIFE_CYCLE_EVENT = "lifeCycleEvent"; /** * 生命周期的节点 */ public static final String LIFE_CYCLE_NODE = "lifeCycleNode"; /** * 生命周期的连接线信息 */ public static final String LIFE_CYCLE_EDGE = "lifeCycleEdge"; /** * 生命周期连接线的业务类型名称 */ public static final String LIFE_CYCLE_LINE = "lifeCycleLine"; Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/BaseQueryObject.java
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import org.springblade.core.mp.support.Query; import java.io.Serializable; import java.util.HashMap; @@ -103,10 +104,15 @@ this.limit = limit; } /** * 从以前的项目拷贝过来的分页 * @return */ @JSONField( serialize = false, deserialize = false ) @Deprecated public PageHelper getPageHelper() { PageHelper pageHelper = new PageHelper(this.limit); pageHelper.setPage(this.getPage()); @@ -115,6 +121,7 @@ return pageHelper; } public BaseQueryObject addSort(String sort, String order) { this.setSort(StringUtils.isBlank(this.getSort()) ? sort : this.getSort() + "," + sort); this.setOrder(StringUtils.isBlank(this.getOrder()) ? order : this.getOrder() + "," + order); 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,7 +365,10 @@ // 回收需要业务数据删除 if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) { R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(baseModelDTO.getBtmname())); commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), VciBaseUtil.toInSql(baseModelDTO.getOid())); 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) { baseModel.setLcStatus(baseModelDTO.getLcStatus()); @@ -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,9 +2242,9 @@ // baseMapper.deleteBatchIds(cboList); //使用传入的业务类型查询表 R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getCurrentClassifyVO().getBtmtypeid())); if (listR.getData().size() == 0) { throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); } if (!listR.isSuccess() || listR.getData().size() == 0) { throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); } commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(), "'" + (StringUtils.join(cboList.stream().map(BaseModel::getOid).collect(Collectors.toSet()), "','")) + "'"); // ); @@ -3166,9 +3179,9 @@ public Integer insertBatchByType(String btmType, List<BaseModel> baseModels) { //使用传入的业务类型查询表 R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType)); if (listR.getData().size() == 0) { throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); } if (!listR.isSuccess() || listR.getData().size() == 0) { throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); } //将bean转为map,mybatis统一处理 List<Map<String, String>> maps = new ArrayList<>(); baseModels.stream().forEach(model -> { @@ -3193,9 +3206,9 @@ //使用传入的业务类型查询表 R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType)); if (listR.getData().size() == 0) { throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); } if (!listR.isSuccess() || listR.getData().size() == 0) { throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); } //查询数据 List<Map> maps = commonsMapper.selectBySql("select * from " + listR.getData().get(0).getTableName() + " where oid in (" + VciBaseUtil.toInSql(oids.toString()) + ")"); @@ -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,9 +3334,9 @@ public R updateBatchByBaseModel(String btmType, List<BaseModel> baseModels) { //使用传入的业务类型查询表 R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType)); if (listR.getData().size() == 0) { throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); } if (!listR.isSuccess() || listR.getData().size() == 0) { throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); } //将bean转为map,mybatis统一处理 List<Map<String, String>> maps = new ArrayList<>(); @@ -3579,7 +3595,10 @@ 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())); Map<String, Object> nextRevision = commonsMapper.getNextRevision(listR.getData().get(0).getTableName(), fromBo.getNameOid()); 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()); // VersionValueObject versionObj = this.getVersionValue(item.verRuleName); Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java
@@ -171,6 +171,7 @@ * @return 默认字段属性 */ @Override @GetMapping(GET_DEFAULT_ATTR_BY_BTM_ID) public R<BtmTypeVO> getDefaultAttrByBtmId(String btmTypeId) { return R.data(Optional.ofNullable(btmTypeService.getDefaultAttrByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new)); } @@ -182,6 +183,7 @@ * @return 所有字段 */ @Override @GetMapping(GET_ALL_ATTR_BY_BTM_ID) public R<BtmTypeVO> getAllAttributeByBtmId(String btmTypeId) { return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new)); } @@ -193,6 +195,7 @@ * @return 所有字段 */ @Override @GetMapping(GET_ALL_ATTR_BY_BTM_OID) public R<BtmTypeVO> getAllAttributeByBtmOid(String btmTypeOid) { return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmOid(btmTypeOid)).orElseGet(BtmTypeVO::new)); } Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/LifeCycleServiceImpl.java
@@ -309,6 +309,7 @@ * @param lifeCycleDTO 数据传输对象 */ @Override @Transactional public void delete(LifeCycleDTO lifeCycleDTO) { VciBaseUtil.alertNotNull(lifeCycleDTO,"数据传输对象",lifeCycleDTO.getOid(),"主键"); LifeCycleRule rule = null; @@ -320,8 +321,20 @@ //检查被引用不能删除 Integer count = btmTypeService.countByLifeId(lifeCycleDTO.getOid()); if(count !=null && count>0){ throw new VciBaseException("生命周期被使用,不能被删除"); } //我们查询全部node和edge,然后一起删除 } private List<LifeCycleNode> selectNodeByLifeOid(String lifeOid){ if(!StringUtils.hasLength(lifeOid)){ return new ArrayList<>(); } LambdaQueryWrapper<LifeCycleNode> query = new LambdaQueryWrapper<LifeCycleNode>(); query.eq(LifeCycleNode::getLifeCycleOid,lifeOid); return nodeMapper.selectList(query); } /**