|
@@ -143,7 +143,7 @@ public class CommonCostEvent extends BaseController {
|
|
|
entity.setFlowFinishtime(LocalDateTime.now());
|
|
|
commonCostService.updateCommonCost(CommonCostConvert.INSTANCE.convert(entity));
|
|
|
//如果是代办,更新一下固定资产和外购存货的状态
|
|
|
- if (entity.getIsAgent()==1) {
|
|
|
+ if (entity.getIsAgent() == 1) {
|
|
|
AssetProcureDO asset = new AssetProcureDO();
|
|
|
asset.setCommonCostId(flowInstanceId);
|
|
|
asset.setCommonCostStatus(FLOW_FINISHED);
|
|
@@ -155,7 +155,7 @@ public class CommonCostEvent extends BaseController {
|
|
|
}
|
|
|
List<CommonCostDetailDO> detailList = commonCostDetailService.getListByCommonCostId(entity.getId());
|
|
|
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);
|
|
@@ -187,7 +187,7 @@ public class CommonCostEvent extends BaseController {
|
|
|
entity.setFlowStatus(FLOW_NULLY);
|
|
|
entity.setIsvalid(0);
|
|
|
commonCostService.updateCommonCost(CommonCostConvert.INSTANCE.convert(entity));
|
|
|
- if (entity.getIsAgent()==1) {
|
|
|
+ if (entity.getIsAgent() == 1) {
|
|
|
AssetProcureDO asset = new AssetProcureDO();
|
|
|
asset.setCommonCostId(flowInstanceId);
|
|
|
asset.setCommonCostStatus(0);
|
|
@@ -609,10 +609,10 @@ public class CommonCostEvent extends BaseController {
|
|
|
Set<String> zrbmIdList = new HashSet<>();
|
|
|
detailList.forEach(x -> {
|
|
|
Project project = projectService.selectById(x.getProjectId());
|
|
|
- if(project.getId().equals("31414c5bef38ca7eb9ce31612e84e8e8") || project.getId().equals("3ce706b5a67bb175929cda0117c11620") ){
|
|
|
+ if (project.getId().equals("31414c5bef38ca7eb9ce31612e84e8e8") || project.getId().equals("3ce706b5a67bb175929cda0117c11620")) {
|
|
|
//卓一瑞
|
|
|
HashMap<String, String> map = new HashMap<>();
|
|
|
- map.put("id","d05dc4f4-ead4-4925-9aaa-0c4d3bc470b6");
|
|
|
+ map.put("id", "d05dc4f4-ead4-4925-9aaa-0c4d3bc470b6");
|
|
|
userMaps.add(map);
|
|
|
return;
|
|
|
}
|
|
@@ -782,4 +782,29 @@ public class CommonCostEvent extends BaseController {
|
|
|
throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 出纳退件事件
|
|
|
+ *
|
|
|
+ * @param flowInstance 流程实例
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/cashierRejectEvent")
|
|
|
+ public String cashierRejectEvent(@ParamModel Map flowInstance) {
|
|
|
+ try {
|
|
|
+ if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
|
|
|
+ String flowInstanceId = flowInstance.get("id").toString();
|
|
|
+ CommonCostDO entity = commonCostService.findByInstanceId(flowInstanceId);
|
|
|
+ entity.setFlowStatus(FLOW_PROCESS);
|
|
|
+ entity.setFlowFinishtime(LocalDateTime.now());
|
|
|
+ commonCostService.updateCommonCost(CommonCostConvert.INSTANCE.convert(entity));
|
|
|
+ return ok("true");
|
|
|
+ } else {
|
|
|
+ throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
+ }
|
|
|
+ } catch (Exception ex) {
|
|
|
+ log.error(ex.getMessage(), ex);
|
|
|
+ throw new BusinessException("执行事件出错,请联系管理员!");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|