Commit d060cf3e authored by neo's avatar neo

[dev] fixed commited and decided is not requre temp

parent f81068b9
...@@ -62,16 +62,17 @@ public class ApprovalController { ...@@ -62,16 +62,17 @@ public class ApprovalController {
@ResponseBody @ResponseBody
@RequestMapping(value = "/check/{taskId}") @RequestMapping(value = "/check/{taskId}")
public String check(@PathVariable String taskId, @RequestParam Integer committed, @RequestParam Integer decide) { public String check(@PathVariable String taskId, @RequestParam(required = false) Integer committed,
@RequestParam(required = false) Integer decide) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (committed != null) { if (committed != null && (committed == 0 || committed == 1)) {
map.put("committed", committed); map.put("committed", committed);
taskService.complete(taskId, map); taskService.complete(taskId, map);
if(committed==1)mocoHasCommittedAndOver(); if (committed == 1) mocoHasCommittedAndOver();
} else if (decide != null) { } else if (decide != null && (decide == 0 || decide == 1)) {
map.put("decide", decide); map.put("decide", decide);
taskService.complete(taskId, map); taskService.complete(taskId, map);
if(decide==1)mocoAggreAndOver(); if (decide == 1) mocoAggreAndOver();
else mocoDisAggreAndOver(); else mocoDisAggreAndOver();
} }
return taskId; return taskId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment