|
@@ -218,31 +218,6 @@ public class CommonCostServiceImpl implements CommonCostService {
|
|
|
// 更新
|
|
|
CommonCostDO updateObj = CommonCostConvert.INSTANCE.convert(updateReqVO);
|
|
|
commonCostDao.updateById(updateObj);
|
|
|
- //发生核减后修改流程描述z
|
|
|
- if(StringUtils.isNotEmpty(updateReqVO.getBz2())){
|
|
|
- CommonCostDO entity = commonCostDao.selectById(updateReqVO.getId());
|
|
|
- List<CommonCostDetailDO> detailList = commonCostDetailService.getListByCommonCostId(updateObj.getId());
|
|
|
- StringBuilder projectName = new StringBuilder();
|
|
|
- Set<String> projectNameList = new HashSet<>();
|
|
|
- detailList.forEach(x -> {
|
|
|
- Project project = projectService.selectById(x.getProjectId());
|
|
|
- projectNameList.add(project.getXmmc());
|
|
|
- });
|
|
|
- projectNameList.forEach(name -> {
|
|
|
- projectName.append(name);
|
|
|
- projectName.append(";");
|
|
|
- });
|
|
|
- projectName.setLength(projectName.length() - 1);
|
|
|
- Integer agent = entity.getIsAgent();
|
|
|
- String applyTime = LocalDateTimeUtils.format(entity.getApplyTime(), null);
|
|
|
- String flowDesc = "";
|
|
|
- if (agent == 0) {
|
|
|
- flowDesc = StringUtils.join(Arrays.asList(entity.getUserNickname(), applyTime, "¥" + entity.getTotalAmount(), projectName), "/");
|
|
|
- } else {
|
|
|
- flowDesc = StringUtils.join(Arrays.asList(entity.getUserNickname(), applyTime, "¥" + entity.getTotalAmount()), "/");
|
|
|
- }
|
|
|
- workflowClient.saveFlowDescribe(entity.getInstanceId(), flowDesc);
|
|
|
- }
|
|
|
if (CollectionUtil.isNotEmpty(updateReqVO.getDetailList())) {
|
|
|
Set<String> idList = convertSet(commonCostDetailService.getListByCommonCostId(updateObj.getId()), CommonCostDetailDO::getId);
|
|
|
if (CollectionUtil.isNotEmpty(idList)) {
|
|
@@ -255,6 +230,28 @@ public class CommonCostServiceImpl implements CommonCostService {
|
|
|
});
|
|
|
commonCostDetailDao.insertBatch(detailDOS);
|
|
|
}
|
|
|
+ CommonCostDO entity = commonCostDao.selectById(updateReqVO.getId());
|
|
|
+ List<CommonCostDetailDO> detailList = commonCostDetailService.getListByCommonCostId(updateObj.getId());
|
|
|
+ StringBuilder projectName = new StringBuilder();
|
|
|
+ Set<String> projectNameList = new HashSet<>();
|
|
|
+ detailList.forEach(x -> {
|
|
|
+ Project project = projectService.selectById(x.getProjectId());
|
|
|
+ projectNameList.add(project.getXmmc());
|
|
|
+ });
|
|
|
+ projectNameList.forEach(name -> {
|
|
|
+ projectName.append(name);
|
|
|
+ projectName.append(";");
|
|
|
+ });
|
|
|
+ projectName.setLength(projectName.length() - 1);
|
|
|
+ Integer agent = entity.getIsAgent();
|
|
|
+ String applyTime = LocalDateTimeUtils.format(entity.getApplyTime(), null);
|
|
|
+ String flowDesc = "";
|
|
|
+ if (agent == 0) {
|
|
|
+ flowDesc = StringUtils.join(Arrays.asList(entity.getUserNickname(), applyTime, "¥" + entity.getTotalAmount(), projectName), "/");
|
|
|
+ } else {
|
|
|
+ flowDesc = StringUtils.join(Arrays.asList(entity.getUserNickname(), applyTime, "¥" + entity.getTotalAmount()), "/");
|
|
|
+ }
|
|
|
+ workflowClient.saveFlowDescribe(entity.getInstanceId(), flowDesc);
|
|
|
}
|
|
|
|
|
|
private void validateCommonCostExists(String id) {
|