|
@@ -3,6 +3,7 @@ package com.zjugis.business.flow.Asset.service;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
+import com.google.common.base.Strings;
|
|
|
import com.zjugis.business.bean.entity.Project;
|
|
|
import com.zjugis.business.constants.DictConstants;
|
|
|
import com.zjugis.business.constants.FlowStatusConstants;
|
|
@@ -24,6 +25,7 @@ import com.zjugis.business.flow.commoncost.entity.CommonCostDO;
|
|
|
import com.zjugis.business.flow.commoncost.entity.CommonCostDetailDO;
|
|
|
import com.zjugis.business.flow.commoncost.service.CommonCostServiceImpl;
|
|
|
import com.zjugis.business.flow.usemoney.controller.vo.UseMoneyRespVO;
|
|
|
+import com.zjugis.business.flow.usemoney.controller.vo.UseMoneyUpdateReqVO;
|
|
|
import com.zjugis.business.flow.usemoney.dao.UseMoneyDao;
|
|
|
import com.zjugis.business.flow.usemoney.entity.UseMoneyDO;
|
|
|
import com.zjugis.business.service.ProjectService;
|
|
@@ -182,8 +184,31 @@ public class AssetProcureServiceImpl implements AssetProcureService {
|
|
|
});
|
|
|
assetProcureDetailDao.insertBatch(detailDOS);
|
|
|
}
|
|
|
+ //更新流程描述
|
|
|
+ updateDesc(updateReqVO);
|
|
|
+ }
|
|
|
+ private void updateDesc(AssetProcureUpdateReqVO updateReqVO) {
|
|
|
+ AssetProcureDO entity = findByInstanceId(updateReqVO.getInstanceId());
|
|
|
+ String flowDesc = "";
|
|
|
+ if (!Strings.isNullOrEmpty(entity.getUserNickname())) {
|
|
|
+ flowDesc += "/" + entity.getUserNickname();
|
|
|
+ }
|
|
|
+ if (entity.getApplyTime()!=null) {
|
|
|
+ flowDesc += "/" + entity.getApplyTime();
|
|
|
+ }
|
|
|
+ if (entity.getTotalAmount()!=null) {
|
|
|
+ flowDesc += "/" + entity.getTotalAmount();
|
|
|
+ }
|
|
|
+ if (!Strings.isNullOrEmpty(entity.getProcureReason())) {
|
|
|
+ flowDesc += "/" + entity.getProcureReason();
|
|
|
+ }
|
|
|
+ if (!Strings.isNullOrEmpty(entity.getProjectId())&&"1".equals(entity.getProcureType())) {
|
|
|
+ Project project = projectService.selectById(entity.getProjectId());
|
|
|
+ flowDesc += "/" + project.getXmmc();
|
|
|
+ }
|
|
|
+ flowDesc = flowDesc.length() > 1 ? flowDesc.substring(1) : flowDesc;
|
|
|
+ workflowClient.saveFlowDescribe(updateReqVO.getInstanceId(),flowDesc);
|
|
|
}
|
|
|
-
|
|
|
private void validateCommonCostExists(String id) {
|
|
|
if (assetProcureDao.selectById(id) == null) {
|
|
|
throw exception(COMMON_COST_NOT_EXISTS);
|