|
|
|
@@ -1,7 +1,6 @@ |
|
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
@@ -128,7 +127,6 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
map.put("businessId",businessId); |
|
|
|
map.put("flowType",flowType); |
|
|
|
map.put("taskAssignee",taskAssignee); |
|
|
|
//map.put("contractNumber",wxRentContract.getContractNumber()); |
|
|
|
map.put("variables",variables); |
|
|
|
|
|
|
|
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getFlowKeyByType(flowType), map); |
|
|
|
@@ -183,17 +181,20 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
for (Task task : tasks) { |
|
|
|
Map<String,Object> taskInfoMap = new HashedMap(); |
|
|
|
Map<String,Object> mapInfo = taskService.getVariables(task.getId()); |
|
|
|
taskInfoMap.put("starter",((MallUserInfo)mapInfo.get("starter")).getName()); |
|
|
|
taskInfoMap.put("startTime",mapInfo.get("startTime")); |
|
|
|
taskInfoMap.put("processInstanceId",task.getProcessInstanceId()); |
|
|
|
taskInfoMap.put("taskId",task.getId()); |
|
|
|
taskInfoMap.put("businessId",mapInfo.get("businessId")); |
|
|
|
taskInfoMap.put("contractNumber",mapInfo.get("contractNumber")); |
|
|
|
List<Map<String,String>> variables = (List)mapInfo.get("variables"); //定制variables,回传 |
|
|
|
for (Map<String,String> m:variables) { |
|
|
|
taskInfoMap.putAll(m); |
|
|
|
if(mapInfo!=null){ |
|
|
|
taskInfoMap.put("starter",((MallUserInfo)mapInfo.get("starter")).getName()); |
|
|
|
taskInfoMap.put("startTime",mapInfo.get("startTime")); |
|
|
|
taskInfoMap.put("processInstanceId",task.getProcessInstanceId()); |
|
|
|
taskInfoMap.put("taskId",task.getId()); |
|
|
|
taskInfoMap.put("businessId",mapInfo.get("businessId")); |
|
|
|
List<Map<String,String>> variables = (List)mapInfo.get("variables"); //定制variables,回传 |
|
|
|
if(CollectionUtils.isNotEmpty(variables)){ |
|
|
|
for (Map<String,String> m:variables) { |
|
|
|
taskInfoMap.put(m.get("key"),m.get("value")); |
|
|
|
} |
|
|
|
} |
|
|
|
result.add(taskInfoMap); |
|
|
|
} |
|
|
|
result.add(taskInfoMap); |
|
|
|
} |
|
|
|
PageInfo<Map<String,Object>> pageInfo = new PageInfo<>(result,pageSize); |
|
|
|
return new ResultData(pageInfo); |
|
|
|
|