包头工作流打日志
This commit is contained in:
parent
af381b87c8
commit
6c771cff04
@ -1,11 +1,13 @@
|
|||||||
package com.wflow.workflow.controller;
|
package com.wflow.workflow.controller;
|
||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.wflow.utils.R;
|
import com.wflow.utils.R;
|
||||||
import com.wflow.utils.UserUtil;
|
import com.wflow.utils.UserUtil;
|
||||||
import com.wflow.workflow.bean.vo.ProcessStartParamsVo;
|
import com.wflow.workflow.bean.vo.ProcessStartParamsVo;
|
||||||
import com.wflow.workflow.service.ProcessInstanceService;
|
import com.wflow.workflow.service.ProcessInstanceService;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -17,6 +19,7 @@ import java.util.HashMap;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("wflow/process")
|
@RequestMapping("wflow/process")
|
||||||
|
@Slf4j
|
||||||
public class ProcessInstanceController {
|
public class ProcessInstanceController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -42,6 +45,7 @@ public class ProcessInstanceController {
|
|||||||
@PostMapping("start/{defId}")
|
@PostMapping("start/{defId}")
|
||||||
public Object startTheProcess(@PathVariable String defId,
|
public Object startTheProcess(@PathVariable String defId,
|
||||||
@RequestBody ProcessStartParamsVo params) {
|
@RequestBody ProcessStartParamsVo params) {
|
||||||
|
log.info("发起审批:defId:{},详情:{}", defId, JSON.toJSONString(params));
|
||||||
String instanceId = processService.startProcess(defId, params);
|
String instanceId = processService.startProcess(defId, params);
|
||||||
return R.ok("启动流程实例 " + instanceId + " 成功");
|
return R.ok("启动流程实例 " + instanceId + " 成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
package com.wflow.workflow.controller;
|
package com.wflow.workflow.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.wflow.utils.R;
|
import com.wflow.utils.R;
|
||||||
import com.wflow.workflow.bean.vo.ProcessHandlerParamsVo;
|
import com.wflow.workflow.bean.vo.ProcessHandlerParamsVo;
|
||||||
import com.wflow.workflow.service.ProcessTaskService;
|
import com.wflow.workflow.service.ProcessTaskService;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.ibatis.logging.Log;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -14,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("wflow/process/task")
|
@RequestMapping("wflow/process/task")
|
||||||
|
@Slf4j
|
||||||
public class ProcessInstanceTaskController {
|
public class ProcessInstanceTaskController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -85,6 +89,7 @@ public class ProcessInstanceTaskController {
|
|||||||
@OperLog(operModul = "审批管理",operType = "用户处理任务",operDesc = "用户处理任务")
|
@OperLog(operModul = "审批管理",operType = "用户处理任务",operDesc = "用户处理任务")
|
||||||
@PostMapping("handler")
|
@PostMapping("handler")
|
||||||
public Object approvalTask(@RequestBody ProcessHandlerParamsVo params) {
|
public Object approvalTask(@RequestBody ProcessHandlerParamsVo params) {
|
||||||
|
log.info("审批处理:{}", JSON.toJSONString(params));
|
||||||
taskService.approvalTask(params);
|
taskService.approvalTask(params);
|
||||||
return R.ok("处理成功");
|
return R.ok("处理成功");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user