|
@@ -29,6 +29,7 @@ import com.zjugis.module.system.api.user.dto.AdminUserRespDTO;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -126,6 +127,7 @@ public class CommonCostEvent extends BaseController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping("/flowArchingEvent")
|
|
@PostMapping("/flowArchingEvent")
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
public String flowArchingEvent(@ParamModel Map flowInstance, @ParamModel Map triggerFinishActivityInstance) {
|
|
public String flowArchingEvent(@ParamModel Map flowInstance, @ParamModel Map triggerFinishActivityInstance) {
|
|
try {
|
|
try {
|
|
if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
|
|
if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
|
|
@@ -148,6 +150,9 @@ public class CommonCostEvent extends BaseController {
|
|
List<CommonCostDetailDO> detailList = commonCostDetailService.getListByCommonCostId(entity.getId());
|
|
List<CommonCostDetailDO> detailList = commonCostDetailService.getListByCommonCostId(entity.getId());
|
|
for (CommonCostDetailDO commonCostDetailDO : detailList) {
|
|
for (CommonCostDetailDO commonCostDetailDO : detailList) {
|
|
projectCostService.updateCommonCost(commonCostDetailDO.getAmount(),commonCostDetailDO.getProjectId());
|
|
projectCostService.updateCommonCost(commonCostDetailDO.getAmount(),commonCostDetailDO.getProjectId());
|
|
|
|
+ projectService.calcProject(commonCostDetailDO.getProjectId());
|
|
|
|
+ commonCostDetailDO.setFlowStatus(FLOW_FINISHED);
|
|
|
|
+ commonCostDetailService.updateCommonCostDetail(commonCostDetailDO);
|
|
}
|
|
}
|
|
return ok("true");
|
|
return ok("true");
|
|
} else {
|
|
} else {
|