|
|
@@ -1,12 +1,14 @@ |
|
|
package com.iformall.controller; |
|
|
package com.iformall.controller; |
|
|
|
|
|
|
|
|
import com.iformall.common.ResultData; |
|
|
import com.iformall.common.ResultData; |
|
|
import com.iformall.mq.MqProducer; |
|
|
|
|
|
|
|
|
import com.iformall.domain.po.WxFlowRecord; |
|
|
|
|
|
import com.iformall.enums.EnumFlowRecordStatus; |
|
|
import com.iformall.service.WxFlowService; |
|
|
import com.iformall.service.WxFlowService; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
import org.flowable.engine.RuntimeService; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@@ -23,14 +25,7 @@ public class WxFlowAbleController extends BaseController { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private WxFlowService wxFlowService; |
|
|
private WxFlowService wxFlowService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private MqProducer mqProducer; |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "mqSend",notes = "") |
|
|
|
|
|
@PostMapping("/mqSend") |
|
|
|
|
|
public ResultData mqSend() throws Throwable{ |
|
|
|
|
|
mqProducer.sendMessage("aaaa","topic-1","tag-1","key1"); |
|
|
|
|
|
return new ResultData(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
RuntimeService runtimeService; |
|
|
|
|
|
|
|
|
@ApiOperation(value = "启动流程",notes = "{\"businessId\":\"221178539888607232\",\"businessType\":1,\"remark\":\"意见意见。\",\"taskAssignee\":[{\"taskKey\":\"firstTaskUser\",\"assignee\":\"243650055783841792\"},{\"taskKey\":\"secondTaskUser\",\"assignee\":\"\"}],\"variables\":[{\"key\":\"contractType\",\"value\":\"1\"},{\"key\":\"contractNumber\",\"value\":\"1111\"}]}") |
|
|
@ApiOperation(value = "启动流程",notes = "{\"businessId\":\"221178539888607232\",\"businessType\":1,\"remark\":\"意见意见。\",\"taskAssignee\":[{\"taskKey\":\"firstTaskUser\",\"assignee\":\"243650055783841792\"},{\"taskKey\":\"secondTaskUser\",\"assignee\":\"\"}],\"variables\":[{\"key\":\"contractType\",\"value\":\"1\"},{\"key\":\"contractNumber\",\"value\":\"1111\"}]}") |
|
|
@PostMapping("/start") |
|
|
@PostMapping("/start") |
|
|
@@ -39,6 +34,12 @@ public class WxFlowAbleController extends BaseController { |
|
|
return wxFlowService.start(params,super.getUser().getId(),super.getUser().getName(),super.getTenantId()); |
|
|
return wxFlowService.start(params,super.getUser().getId(),super.getUser().getName(),super.getTenantId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/del") |
|
|
|
|
|
public ResultData list(String id) { |
|
|
|
|
|
runtimeService.deleteProcessInstance(id, "驳回"); |
|
|
|
|
|
return new ResultData(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 用户代办列表 |
|
|
* 用户代办列表 |
|
|
*/ |
|
|
*/ |
|
|
@@ -47,13 +48,30 @@ public class WxFlowAbleController extends BaseController { |
|
|
@ApiImplicitParams({ |
|
|
@ApiImplicitParams({ |
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), |
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), |
|
|
@ApiImplicitParam(name = "flowType", value = "流程类型,1合同流程 2账单流程", dataType = "int", paramType = "query", required = true) |
|
|
|
|
|
|
|
|
@ApiImplicitParam(name = "flowType", value = "流程类型,1合同流程 2账单流程", dataType = "string", paramType = "query", required = true) |
|
|
}) |
|
|
}) |
|
|
public ResultData list(Integer flowType,Integer pageNum, Integer pageSize) { |
|
|
|
|
|
|
|
|
public ResultData list(String flowType,Integer pageNum, Integer pageSize) { |
|
|
logger.debug("[" + getIpAddr() + "] FlowAbleController::list"); |
|
|
logger.debug("[" + getIpAddr() + "] FlowAbleController::list"); |
|
|
return wxFlowService.list(flowType,pageNum,pageSize,super.getUser().getId()); |
|
|
return wxFlowService.list(flowType,pageNum,pageSize,super.getUser().getId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 我的申请列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
@ApiOperation("我的申请列表") |
|
|
|
|
|
@GetMapping(value = "/myApplyList") |
|
|
|
|
|
@ApiImplicitParams({ |
|
|
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), |
|
|
|
|
|
}) |
|
|
|
|
|
public ResultData myApplyList(@ModelAttribute WxFlowRecord record, Integer pageNum, Integer pageSize) { |
|
|
|
|
|
logger.debug("[" + getIpAddr() + "] FlowAbleController::myApplyList"); |
|
|
|
|
|
record.setUserId(super.getUser().getId()); |
|
|
|
|
|
record.setStatus(EnumFlowRecordStatus.NEW.getCode()); |
|
|
|
|
|
return new ResultData(wxFlowService.listAsPage(record,pageNum,pageSize)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 审批历史 |
|
|
* 审批历史 |
|
|
*/ |
|
|
*/ |
|
|
@@ -94,10 +112,20 @@ public class WxFlowAbleController extends BaseController { |
|
|
*/ |
|
|
*/ |
|
|
@ApiOperation(value = "驳回",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}") |
|
|
@ApiOperation(value = "驳回",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}") |
|
|
@PostMapping(value = "reject") |
|
|
@PostMapping(value = "reject") |
|
|
public ResultData reject(@RequestBody Map<String, String> params) { |
|
|
|
|
|
|
|
|
public ResultData reject(@RequestBody Map<String, Object> params) { |
|
|
return wxFlowService.reject(params,super.getUser().getId(),super.getUser().getName(),super.getTenantId()); |
|
|
return wxFlowService.reject(params,super.getUser().getId(),super.getUser().getName(),super.getTenantId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 撤回 |
|
|
|
|
|
*/ |
|
|
|
|
|
@ApiOperation(value = "撤回",notes = "{\"taskId\":\"\",\"processInstanceId\":\"\",\"remark\":\"\"}") |
|
|
|
|
|
@PostMapping(value = "setBack") |
|
|
|
|
|
public ResultData setBack(@RequestBody Map<String, Object> params) { |
|
|
|
|
|
return wxFlowService.setBack(params,super.getUser().getId(),super.getUser().getName()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 生成流程图 |
|
|
* 生成流程图 |
|
|
* |
|
|
* |
|
|
|