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