| | |
| | | import com.vci.ubcs.code.vo.pagemodel.UITableFieldVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.UITablePageVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.flow.core.dto.FlowStatusDTO; |
| | | import com.vci.ubcs.flow.core.feign.IMDMIFlowAttrClient; |
| | | import com.vci.ubcs.flow.core.vo.ProcessStageAttrVO; |
| | | import com.vci.ubcs.omd.constant.BtmTypeLcStatusConstant; |
| | |
| | | orderDTO.getCodeClassifyOid(), "主题库分类的主键"); |
| | | |
| | | //需要升版 |
| | | // ClientBusinessObjectOperation cboOperation = new ClientBusinessObjectOperation(); |
| | | BaseModel cbo = null; |
| | | // try { |
| | | // //cbo = cboOperation.createBusinessObjectVersion(oldCbo,VciBaseUtil.getCurrentUserId()); |
| | | cbo = reviseBusinessObject(oldCbo); |
| | | // } catch (VCIError e) { |
| | | // throw new VciBaseException("初始化相关的内容出现了错误", new String[0], e); |
| | | // } |
| | | //1. 判断必输项 |
| | | //CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid()); |
| | | checkRequiredAttrOnOrder(templateVO, orderDTO); |
| | | checkRequiredAttrOnOrder(templateVO, orderDTO); |
| | | //2.先注入,再组合,最后校验 |
| | | switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO); |
| | | //3.处理组合规则。组合规则不能使用编码的属性,因为编码的生成可能是需要属性的 |
| | |
| | | //企业码和集团码的不修改 |
| | | cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription()) ? "" : orderDTO.getDescription()); |
| | | cbo.setName(orderDTO.getName()); |
| | | // try { |
| | | cbo.setDescription(StringUtils.isBlank(orderDTO.getDescription()) ? "" : orderDTO.getDescription()); |
| | | // cbo.setAttributeValueWithNoCheck("description", StringUtils.isBlank(orderDTO.getDescription())?"":orderDTO.getDescription()); |
| | | cbo.setName(orderDTO.getName()); |
| | | // } catch (VCIError e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | //数据的时候,编码是不变的 |
| | | cbo.setCreateTime(cbo.getCreateTime()); |
| | | cbo.setLastModifyTime(cbo.getLastModifyTime()); |
| | | // List<ClientBusinessObject> cboList = new ArrayList<>(); |
| | | // cboList.add(cbo); |
| | | cbo.setTenantId(AuthUtil.getTenantId()); |
| | | oldCbo.setLastV("0"); |
| | | oldCbo.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | oldCbo.setLastModifyTime(new Date()); |
| | | try { |
| | | // cboOperation.saveRevisionBuinessObject(cbo); |
| | | updateBatchByBaseModel(oldCbo.getBtmname(), Collections.singletonList(oldCbo)); |
| | | insertBatchByType(cbo.getBtmname(), Collections.singletonList(cbo)); |
| | | } catch (Exception vciError) { |
| | | throw new VciBaseException("数据更改保存出错了", new String[0], vciError); |
| | |
| | | return toBo; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 流程中变更状态值 |
| | | * @param flowDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R processChangeStatus(FlowStatusDTO flowDTO) { |
| | | flowDTO.getOids().forEach(s -> { |
| | | BaseModelDTO baseModel = new BaseModelDTO(); |
| | | baseModel.setOid(s); |
| | | baseModel.setBtmname(flowDTO.getBtmType()); |
| | | baseModel.setLcStatus(String.valueOf(flowDTO.getVariableMap().getOrDefault("statusValue","Auditing"))); |
| | | changeStatus(baseModel); |
| | | }); |
| | | return R.success("成功"); |
| | | } |
| | | } |