Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -489,7 +489,7 @@ this.$message.warning('您选择的数据全部为【发布状态】才可以发起流程'); showMessage = false; } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { processTS({templateId: this.templateOid, buttonTypeKey: 'DISABLE'}).then(res => { if (res.data.records != [] && res.data.data.records.length != 0) { this.userName = localStorage.getItem("username"); this.parameter.template = this.userName + '-停用[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; @@ -540,7 +540,7 @@ this.$message.warning('选择的数据中状态无需再执行当前操作'); showMessage = false; } else if (this.selectRow.length >= 1 && hasEditing && showMessage) { processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { processTS({templateId: this.templateOid, buttonTypeKey: 'ENABLE'}).then(res => { if (res.data.data.records && res.data.data.records.length != 0) { this.parameter = res.data.data.records[0] this.userName = localStorage.getItem("username"); @@ -599,10 +599,10 @@ showMessage = false; } else if (this.selectRow.length >= 1 && (disabledCount === this.selectRow.length || releasedCount === this.selectRow.length) || (disabledCount > 0 && releasedCount > 0) && showMessage) { //disabledCount 和 releasedCount 中任意一个等于 this.selectRow 数组的长度则表示全部是同一种状态,返回 true 如果disabledCount 和 releasedCount 都大于0,则表示既有Disabled也有Released返回 true processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { processTS({templateId: this.templateOid, buttonTypeKey: 'ROLLBACK'}).then(res => { if (res.data.records != [] && res.data.data.records.length != 0) { this.userName = localStorage.getItem("username"); this.parameter.template = this.userName + '-回收[' + this.Treedata[0].name + '-' + this.selectRow[0].name + ']'; this.parameter.template = this.userName + '-回收[' + this.selectRow[0].btmname + '-' + this.selectRow[0].name + ']'; this.parameter.type = 'TakeBack'; this.parameter.code = this.templateOid this.parameter.btmtype=this.selectRow[0].btmname || this.selectRow[0].btmtype; Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -1345,7 +1345,7 @@ message: "添加成功!" }); done(row) this.CrudRend() this.TemRefresh(); }).catch(res => { this.$message({ type: 'info', @@ -1357,7 +1357,7 @@ //模板管理修改 CrudRowUpdata(row,index,done) { editSave(row).then(() => { this.CrudRend() this.TemRefresh(); this.$message({ type: "success", message: "操作成功!" @@ -1370,7 +1370,7 @@ //模板管理删除 CrudRowDel(row) { deleteData(row).then(()=> { this.CrudRend() this.TemRefresh(); }).catch(res => { this.$message({ type: 'info', Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyTemplateAttrServiceImpl.java
@@ -40,6 +40,7 @@ import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springframework.beans.factory.annotation.Autowired; @@ -373,6 +374,10 @@ //将DTO转换为DO CodeClassifyTemplateAttr codeClassifyTemplateAttrDO = new CodeClassifyTemplateAttr(); BeanUtilForVCI.copyPropertiesIgnoreCase(codeClassifyTemplateAttrDTO,codeClassifyTemplateAttrDO); codeClassifyTemplateAttrDO.setCreateTime(codeClassifyTemplateAttrDO.getCreateTime()!=null?codeClassifyTemplateAttrDO.getCreateTime():new Date()); codeClassifyTemplateAttrDO.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); codeClassifyTemplateAttrDO.setLastModifyTime(new Date()); codeClassifyTemplateAttrDO.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); codeClassifyTemplateAttrDOInsert.add(codeClassifyTemplateAttrDO); if(StringUtils.isNotBlank(codeClassifyTemplateAttrDO.getPrefixValue())){ @@ -430,15 +435,9 @@ if(Func.isNotEmpty(codeReferConfigVO) && codeReferConfigVO.getIsPersistence()=="true"){ codeReferConfigService.insert(codeReferConfigVO); } } //执行数据保存操作 // WebUtil.setPersistence(false);//不执行保存 //先都删了 // VciQueryWrapperForDO deleteAttrWrapper = new VciQueryWrapperForDO(CodeClassifyTemplateAttrDO.class); // deleteAttrWrapper.addQueryMap("CLASSIFYTEMPLATEOID",CLASSIFYTEMPLATEOID); Map<String,Object> condition = new HashMap<>(); condition.put("CLASSIFYTEMPLATEOID",CLASSIFYTEMPLATEOID); List<CodeClassifyTemplateAttr> codeClassifyTemplateAttrDODelete = baseMapper.selectByMap(condition); @@ -448,7 +447,6 @@ for (CodeClassifyTemplateAttr codeClassifyTemplateAttrDO:codeClassifyTemplateAttrDODelete){ oids.add(codeClassifyTemplateAttrDO.getOid()); } // BatchCBO batchCBOTemplateDelete = new BatchCBO(); if(!CollectionUtils.isEmpty(oids)){ this.removeBatchByIds(oids); } @@ -463,8 +461,6 @@ } // SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); //处理可输可选的字符 if(!CollectionUtils.isEmpty(prefix)){ for (String s : prefix) { @@ -474,7 +470,6 @@ dictBiz.setDictValue(s); iDictBizClient.getCheck(dictBiz) ; } // .saveBySameNamespaceAndFlag(MdmBtmTypeConstant.CODE_CLASSIFY_TEMPLATE_ATTR,"prefix",prefix,sessionInfo); } if(!CollectionUtils.isEmpty(suffix)){ for (String s : suffix) { @@ -484,7 +479,6 @@ dictBiz.setDictValue(s); iDictBizClient.getCheck(dictBiz) ; } // charService.saveBySameNamespaceAndFlag(MdmBtmTypeConstant.CODE_CLASSIFY_TEMPLATE_ATTR,"suffix",suffix,sessionInfo); } if(!CollectionUtils.isEmpty(dateFormates)){ for (String s : dateFormates) { @@ -494,11 +488,7 @@ dictBiz.setDictValue(s); iDictBizClient.getCheck(dictBiz) ; } // charService.saveBySameNamespaceAndFlag(MdmBtmTypeConstant.CODE_CLASSIFY_TEMPLATE_ATTR,"dateFormates",dateFormates,sessionInfo); } // WebUtil.setPersistence(true);//执行保存 // boService.persistenceBatch(batchCBOTemplateDelete);//一起执行保存 return codeClassifyTemplateAttrDO2VOs(codeClassifyTemplateAttrDOInsert); } Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -422,8 +422,8 @@ cbo.setNameOid(VciBaseUtil.getPk()); cbo.setCreateTime(new Date()); cbo.setLastModifyTime(new Date()); cbo.setCreator(AuthUtil.getUser().getUserName()); cbo.setLastModifier(AuthUtil.getUser().getUserName()); cbo.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); cbo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); cbo.setTenantId(AuthUtil.getTenantId()); // //TODO:因为默认的属性都不拷贝,目前集团码叫name,并没有从DTO拷贝到cbo里。增加一个单独处理,以后再看要不要调整 cbo.setName(orderDTO.getName() == null ? "" : orderDTO.getName()); @@ -1010,7 +1010,11 @@ lineVO.setField(attrVO.getId() + "_line"); lineVO.setType("line"); lineVO.setText(key); //找位置 List<CodeClassifyTemplateAttrVO> collect = value.stream().filter(s -> "true".equals(s.getFormDisplayFlag())).collect(Collectors.toList()); if(collect.size() == 0){ continue; } //找位置 for (int i = 0; i < itemVOS.size(); i++) { UIFormItemVO record = itemVOS.get(i); if (record.getField().equalsIgnoreCase(attrVO.getId())) { @@ -3623,7 +3627,11 @@ setter.invoke(obj, ((BigDecimal) map.get(property.getName().toUpperCase())).intValue()); map.remove(property.getName().toUpperCase()); } else if (map.get(property.getName().toUpperCase()) != null) { setter.invoke(obj, map.get(property.getName().toUpperCase())); if(setter.getParameterTypes()[0].getSimpleName().equals("String")){ setter.invoke(obj, map.get(property.getName().toUpperCase()) == null ? null:String.valueOf(map.get(property.getName().toUpperCase()))); }else{ setter.invoke(obj, map.get(property.getName().toUpperCase())); } map.remove(property.getName().toUpperCase()); } } @@ -3800,14 +3808,12 @@ public BaseModel reviseBusinessObject(BaseModel fromBo) { BaseModel toBo = new BaseModel(); // Map<String,String> data = new HashMap<>(); // toBo.getData().put(data); toBo.setOid(VciBaseUtil.getPk()); toBo.setRevisionOid(VciBaseUtil.getPk()); toBo.setNameOid(fromBo.getNameOid()); toBo.setBtmname(fromBo.getBtmname()); toBo.setLastR(String.valueOf(1)); toBo.setFirstR(String.valueOf(0)); toBo.setFirstR(String.valueOf(1)); toBo.setFirstV(String.valueOf(1)); toBo.setLastV(String.valueOf(1)); toBo.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); @@ -3815,16 +3821,13 @@ toBo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); toBo.setLastModifyTime(new Date()); toBo.setRevisionRule(fromBo.getRevisionRule()); 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())); toBo.setVersionRule(fromBo.getVersionRule());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()); // VersionValueObject versionObj = this.getVersionValue(item.verRuleName); toBo.setVersionSeq(Integer.valueOf(nextRevision.get("VERSIONSEQ").toString())); toBo.setVersionValue(nextRevision.get("VERSIONVAL").toString()); toBo.setLctid(fromBo.getLctid()); @@ -3833,11 +3836,9 @@ toBo.setName(fromBo.getName()); toBo.setDescription(fromBo.getDescription()); toBo.setOwner(String.valueOf(AuthUtil.getUser().getUserId())); // toBo.setCheckinBy(String.valueOf(AuthUtil.getUser().getUserId())); toBo.setCopyFromVersion(fromBo.getOid()); toBo.getData().putAll(fromBo.getData()); toBo.getData().put("CHECKINBY", String.valueOf(AuthUtil.getUser().getUserId())); // this.initRevisionTypeAttributeValue(fromBo, toBo); return toBo; } Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmAttributeServiceImpl.java
@@ -116,9 +116,6 @@ } baseMapper.batchUpdate(btmTypeAttributeDOList); return BtmTypeAttributeWrapper.build().listEntityVO(btmTypeAttributeDOList); // btmTypeAttributeDOList.stream().forEachOrdered(s -> { // btmTypeAttributeDOMapper.insert(s); // }); } return null; } @@ -215,7 +212,7 @@ // 版本规则字段不能为空 // vo.setNullableFlag(false); vo.setAttributeLength(150); if (Arrays.asList("lastr","firstr","lastv","firstv","revisionseq","versionseq").contains(id)){ if (Arrays.asList("revisionseq","versionseq").contains(id)){ vo.setAttributeLength(5); vo.setAttrDataType(VciFieldTypeEnum.VTInteger.name()); } Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/wrapper/BtmTypeAttributeWrapper.java
@@ -8,6 +8,7 @@ import com.vci.ubcs.starter.web.util.VciBaseUtil; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.StringUtil; import java.util.Date; import java.util.List; @@ -57,7 +58,9 @@ */ public BtmTypeAttribute copyBtmTypeAttributeDTO2Entity(BtmTypeLinkAttributesDTO dto, String btmTypeOid, String creator, Date now){ BtmTypeAttribute entity = Objects.requireNonNull(BeanUtil.copy(dto, BtmTypeAttribute.class)); entity.setOid(VciBaseUtil.getPk()); if (StringUtil.isBlank(entity.getOid())) { entity.setOid(VciBaseUtil.getPk()); } entity.setBtmName(BtmTypeConstant.BTM_TYPE_ATTRIBUTE); entity.setOwner(creator); entity.setCreator(creator); Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/BtmTypeAttributeMapper.xml
@@ -41,8 +41,8 @@ pl_omd_btm_type </sql> <update id="batchUpdate" parameterType="java.util.List"> BEGIN <foreach collection="records" item="item" index="index" separator=";"> <foreach collection="records" item="item" index="index" separator=";" open="BEGIN" close=";END;"> update <include refid="tableName"/> set id = #{item.id,jdbcType=VARCHAR}, name = #{item.name,jdbcType=VARCHAR}, @@ -68,7 +68,7 @@ ts = #{item.ts,jdbcType=TIMESTAMP} where oid = #{item.oid,jdbcType=VARCHAR} </foreach> ;END; </update> <delete id="batchDelete"> delete from