Commit dab6c28f authored by neo's avatar neo

[DEV] update approval status and comment to db

parent 89fcee22
...@@ -66,8 +66,8 @@ public class ApprovalController { ...@@ -66,8 +66,8 @@ public class ApprovalController {
@ResponseBody @ResponseBody
@RequestMapping(value = "/check/{taskId}") @RequestMapping(value = "/check/{taskId}")
public void check(@PathVariable String taskId, @RequestParam String decide) {//only for manager role public void check(@PathVariable String taskId, @RequestParam String decide, @RequestParam String comment) {//only for manager role
approvalService.checkTask(taskId, decide); approvalService.checkTask(taskId, decide,comment);
} }
@RequestMapping(value = "/show/{procDefId}")//获取流程图 @RequestMapping(value = "/show/{procDefId}")//获取流程图
......
...@@ -125,7 +125,7 @@ public class ApprovalService { ...@@ -125,7 +125,7 @@ public class ApprovalService {
@Transactional @Transactional
public void checkTask(String taskId, String decide) { public void checkTask(String taskId, String decide,String comment) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
PeriodApprove pa = new PeriodApprove(); PeriodApprove pa = new PeriodApprove();
switch (decide) { switch (decide) {
...@@ -147,8 +147,10 @@ public class ApprovalService { ...@@ -147,8 +147,10 @@ public class ApprovalService {
pa.setId(uuid); pa.setId(uuid);
periodApproveMapper.updateByPrimaryKeySelective(pa); periodApproveMapper.updateByPrimaryKeySelective(pa);
PeriodApprove result = periodApproveMapper.selectByPrimaryKey(uuid); pa.setApprovalBy("Admin");
//save report on service pa.setApprovalTime(new Date());
pa.setApprovalResualt(comment);
periodApproveMapper.selectByPrimaryKey(uuid);
} else { } else {
logger.warn("task must not null or size gt 1"); logger.warn("task must not null or size gt 1");
} }
......
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