|
|
|
@@ -321,9 +321,11 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
map.put(taskAssigneeMap.get("taskKey"), taskAssigneeMap.get("assignee")); |
|
|
|
} |
|
|
|
// map info,设置发起人等信息 |
|
|
|
Date startDate = new Date(); |
|
|
|
MallUserInfo starterInfo = this.mallUserInfoService.getById(userId); |
|
|
|
map.put("starter", mallUserInfoToMap(starterInfo)); |
|
|
|
map.put("startTime", System.currentTimeMillis()); |
|
|
|
map.put("startTime", startDate.getTime()); |
|
|
|
map.put("startDate", startDate); |
|
|
|
map.put("businessId",businessId+""); |
|
|
|
map.put("flowType",flowType); |
|
|
|
map.put("taskAssignee",taskAssignee); |
|
|
|
@@ -348,6 +350,7 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
wxFlowRecord.setTaskName("发起"); |
|
|
|
wxFlowRecord.setCurrStatus(EnumRentContractAppStatus.APPLYING.getCode()); |
|
|
|
wxFlowRecord.setVariables(variablesToJson(variables)); |
|
|
|
wxFlowRecord.setStartDate(startDate); |
|
|
|
wxFlowRecordService.saveOrUpdate(wxFlowRecord); |
|
|
|
|
|
|
|
// 给审批人发送代办通知短信 |
|
|
|
@@ -605,6 +608,8 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
Map<String,Object> mapInfo = taskService.getVariables(task.getId()); |
|
|
|
Long businessId = Long.parseLong(mapInfo.get("businessId").toString()); |
|
|
|
Integer flowType = (Integer)mapInfo.get("flowType"); |
|
|
|
List<Map<String,Object>> variables = (List)mapInfo.get("variables"); |
|
|
|
Date startDate = (Date)mapInfo.get("startDate"); |
|
|
|
taskService.complete(taskId); |
|
|
|
|
|
|
|
//保存wx_flow_record表审批记录 |
|
|
|
@@ -619,6 +624,8 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
wxFlowRecord.setUserName(userName); |
|
|
|
wxFlowRecord.setTaskName(taskName); |
|
|
|
wxFlowRecord.setTaskKey(taskKey); |
|
|
|
wxFlowRecord.setVariables(variablesToJson(variables)); |
|
|
|
wxFlowRecord.setStartDate(startDate); |
|
|
|
wxFlowRecordService.saveOrUpdate(wxFlowRecord); |
|
|
|
|
|
|
|
// 判断流程是否结束,并发送短信通知 |
|
|
|
@@ -762,6 +769,7 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
Map<String,Object> userMap = (Map<String,Object>)mapInfo.get("starter"); |
|
|
|
String email = (String) userMap.get("email"); |
|
|
|
List<Map<String,Object>> variables = (List)mapInfo.get("variables"); |
|
|
|
Date startDate = (Date)mapInfo.get("startDate"); |
|
|
|
|
|
|
|
String taskName; |
|
|
|
String taskKey; |
|
|
|
@@ -789,6 +797,8 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
wxFlowRecord.setUserName(userName); |
|
|
|
wxFlowRecord.setTaskKey(taskKey); |
|
|
|
wxFlowRecord.setTaskName(taskName); |
|
|
|
wxFlowRecord.setVariables(variablesToJson(variables)); |
|
|
|
wxFlowRecord.setStartDate(startDate); |
|
|
|
wxFlowRecordService.saveOrUpdate(wxFlowRecord); |
|
|
|
//修改记录表当前状态 |
|
|
|
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(processInstanceId,EnumRentContractAppStatus.REJECT.getCode())); |
|
|
|
@@ -839,6 +849,8 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
Map<String,Object> mapInfo = taskService.getVariables(task.getId()); |
|
|
|
Long businessId = Long.parseLong(mapInfo.get("businessId").toString()); |
|
|
|
Integer flowType = (Integer)mapInfo.get("flowType"); |
|
|
|
List<Map<String,Object>> variables = (List)mapInfo.get("variables"); |
|
|
|
Date startDate = (Date)mapInfo.get("startDate"); |
|
|
|
|
|
|
|
String taskName; |
|
|
|
String taskKey; |
|
|
|
@@ -866,6 +878,8 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
wxFlowRecord.setUserName(userName); |
|
|
|
wxFlowRecord.setTaskKey(taskKey); |
|
|
|
wxFlowRecord.setTaskName(taskName); |
|
|
|
wxFlowRecord.setVariables(variablesToJson(variables)); |
|
|
|
wxFlowRecord.setStartDate(startDate); |
|
|
|
wxFlowRecordService.saveOrUpdate(wxFlowRecord); |
|
|
|
//修改记录表当前状态 |
|
|
|
wxFlowRecordMapper.updateCurrStatus(new WxFlowRecord(processInstanceId,EnumRentContractAppStatus.SETBACK.getCode())); |
|
|
|
@@ -941,6 +955,11 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFlowRecordMapper.findList(record)); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxFlowRecord> myHandelList(WxFlowRecord record, Integer pageIndex, Integer pageSize) { |
|
|
|
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFlowRecordMapper.myHandelList(record)); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void genProcessDiagram(HttpServletResponse httpServletResponse,String businessId) throws Exception { |
|
|
|
List<WxFlowRecord> result = wxFlowRecordService.findList(new WxFlowRecord(Long.parseLong(businessId))); |
|
|
|
|