From 86e26c400c867211402a19c8091d7912ccbffa82 Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 1 Mar 2019 16:42:08 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=93=9C=E9=94=A3=E6=B9=BE][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E9=A2=84=E8=B4=A6=E5=8D=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxFlowAbleController.java | 11 +++++++++++ .../service/impl/WxFlowServiceImpl.java | 17 +++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java index a68aeba40..507fbe943 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxFlowAbleController.java @@ -13,6 +13,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import org.flowable.engine.RuntimeService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -29,6 +30,7 @@ public class WxFlowAbleController extends BaseController { @Autowired private WxFlowService wxFlowService; @Autowired +<<<<<<< HEAD private MessageProducer messageProducer; @ApiOperation(value = "mqSend",notes = "") @@ -37,6 +39,9 @@ public class WxFlowAbleController extends BaseController { messageProducer.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\"}]}") @PostMapping("/start") @@ -45,6 +50,12 @@ public class WxFlowAbleController extends BaseController { 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(); + } + /** * 用户代办列表 */ diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 1c6921e6f..4114aa313 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -260,12 +260,18 @@ public class WxFlowServiceImpl implements WxFlowService { @Override public ResultData list(String flowType, Integer pageNum, Integer pageSize,Long userId) { - List definitionKeyList = new ArrayList<>(); - for (String ft:flowType.split(",")) { - definitionKeyList.add(getFlowKeyByType(Integer.parseInt(ft))); - } TaskQuery taskQuery = taskService.createTaskQuery(); - taskQuery.processDefinitionKeyIn(definitionKeyList); + //流程过滤条件 + if(StringUtils.isNotBlank(flowType)) { + List definitionKeyList = new ArrayList<>(); + for (String ft : flowType.split(",")) { + definitionKeyList.add(getFlowKeyByType(Integer.parseInt(ft))); + } + if(CollectionUtils.isNotEmpty(definitionKeyList)){ + taskQuery.processDefinitionKeyIn(definitionKeyList); + } + } + int total = taskQuery.taskCandidateUser(userId.toString()).list().size(); int pages; if(total % pageSize == 0){ @@ -306,7 +312,6 @@ public class WxFlowServiceImpl implements WxFlowService { return new ResultData(pageInfo); } - @Override public ResultData applyHistory(Long businessId,String tenantId) { List result = wxFlowRecordService.findList(new WxFlowRecord(businessId,tenantId));