| @@ -179,6 +179,16 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| } | } | ||||
| } | } | ||||
| public Map<String,Object> mallUserInfoToMap(MallUserInfo userInfo){ | |||||
| Map<String,Object> map = new HashedMap(); | |||||
| if(userInfo != null){ | |||||
| map.put("name",userInfo.getName()); | |||||
| map.put("id",userInfo.getId()); | |||||
| map.put("phone",userInfo.getPhone()); | |||||
| } | |||||
| return map; | |||||
| } | |||||
| @Override | @Override | ||||
| @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) | ||||
| public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) { | public ResultData start(Map<String, Object> params,Long userId,String userName,String tenantId) { | ||||
| @@ -196,7 +206,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| } | } | ||||
| // map info,设置发起人等信息 | // map info,设置发起人等信息 | ||||
| MallUserInfo starterInfo = this.mallUserInfoService.getById(userId); | MallUserInfo starterInfo = this.mallUserInfoService.getById(userId); | ||||
| map.put("starter", starterInfo); | |||||
| map.put("starter", mallUserInfoToMap(starterInfo)); | |||||
| map.put("startTime",new Date().getTime()); | map.put("startTime",new Date().getTime()); | ||||
| map.put("businessId",businessId+""); | map.put("businessId",businessId+""); | ||||
| map.put("flowType",flowType); | map.put("flowType",flowType); | ||||
| @@ -272,7 +282,8 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| Map<String,Object> taskInfoMap = new HashedMap(); | Map<String,Object> taskInfoMap = new HashedMap(); | ||||
| Map<String,Object> mapInfo = taskService.getVariables(task.getId()); | Map<String,Object> mapInfo = taskService.getVariables(task.getId()); | ||||
| if(mapInfo!=null){ | if(mapInfo!=null){ | ||||
| taskInfoMap.put("starter",((MallUserInfo)mapInfo.get("starter")).getName()); | |||||
| Map<String,Object> userMap = (Map<String,Object>)mapInfo.get("starter"); | |||||
| taskInfoMap.put("starter",userMap!=null?userMap.get("name"):""); | |||||
| taskInfoMap.put("startTime",mapInfo.get("startTime")); | taskInfoMap.put("startTime",mapInfo.get("startTime")); | ||||
| taskInfoMap.put("processInstanceId",task.getProcessInstanceId()); | taskInfoMap.put("processInstanceId",task.getProcessInstanceId()); | ||||
| taskInfoMap.put("taskId",task.getId()); | taskInfoMap.put("taskId",task.getId()); | ||||
| @@ -442,7 +453,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| Map<String,String> msgReplaceMap = new HashedMap(); | Map<String,String> msgReplaceMap = new HashedMap(); | ||||
| WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); | WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); | ||||
| wxMsgValidationcode.setTenantId(tenantId); | wxMsgValidationcode.setTenantId(tenantId); | ||||
| MallUserInfo starter = (MallUserInfo)mapInfo.get("starter"); | |||||
| Map<String,Object> userMap = (Map<String,Object>)mapInfo.get("starter"); | |||||
| List<Map<String,String>> taskAssigneeList = (List)mapInfo.get("taskAssignee"); | List<Map<String,String>> taskAssigneeList = (List)mapInfo.get("taskAssignee"); | ||||
| Long businessId = Long.parseLong(mapInfo.get("businessId").toString()); | Long businessId = Long.parseLong(mapInfo.get("businessId").toString()); | ||||
| @@ -470,7 +481,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| msgReplaceMap.put("toUserName",assignee.trim()); | msgReplaceMap.put("toUserName",assignee.trim()); | ||||
| wxMsgValidationcode = new WxMsgValidationcode(); | wxMsgValidationcode = new WxMsgValidationcode(); | ||||
| wxMsgValidationcode.setPhone(starter.getPhone()); | |||||
| wxMsgValidationcode.setPhone(userMap!=null?(String)userMap.get("phone"):""); | |||||
| wxMsgValidationcode.setType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode()); | wxMsgValidationcode.setType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode()); | ||||
| wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); | wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); | ||||
| return false; | return false; | ||||
| @@ -486,7 +497,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| msgReplaceMap.put("contract",businessId+""); | msgReplaceMap.put("contract",businessId+""); | ||||
| msgReplaceMap.put("page",Constant.adminPage); | msgReplaceMap.put("page",Constant.adminPage); | ||||
| wxMsgValidationcode = new WxMsgValidationcode(); | wxMsgValidationcode = new WxMsgValidationcode(); | ||||
| wxMsgValidationcode.setPhone(starter.getPhone()); | |||||
| wxMsgValidationcode.setPhone(userMap!=null?(String)userMap.get("phone"):""); | |||||
| wxMsgValidationcode.setType(EnumMsgModel.FLOW_PASS_NODIFY.getCode()); | wxMsgValidationcode.setType(EnumMsgModel.FLOW_PASS_NODIFY.getCode()); | ||||
| wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); | wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); | ||||
| return true; | return true; | ||||
| @@ -528,7 +539,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| Map<String,Object> mapInfo = taskService.getVariables(task.getId()); | Map<String,Object> mapInfo = taskService.getVariables(task.getId()); | ||||
| Long businessId = Long.parseLong(mapInfo.get("businessId").toString()); | Long businessId = Long.parseLong(mapInfo.get("businessId").toString()); | ||||
| Integer flowType = (Integer)mapInfo.get("flowType"); | Integer flowType = (Integer)mapInfo.get("flowType"); | ||||
| MallUserInfo starter = (MallUserInfo)mapInfo.get("starter"); | |||||
| Map<String,Object> userMap = (Map<String,Object>)mapInfo.get("starter"); | |||||
| String taskName; | String taskName; | ||||
| String taskKey; | String taskKey; | ||||
| @@ -568,7 +579,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| msgReplaceMap.put("page",Constant.adminPage); | msgReplaceMap.put("page",Constant.adminPage); | ||||
| wxMsgValidationcode = new WxMsgValidationcode(); | wxMsgValidationcode = new WxMsgValidationcode(); | ||||
| wxMsgValidationcode.setPhone(starter.getPhone()); | |||||
| wxMsgValidationcode.setPhone(userMap!=null?(String)userMap.get("phone"):""); | |||||
| wxMsgValidationcode.setType(EnumMsgModel.FLOW_REJECT_NODIFY.getCode()); | wxMsgValidationcode.setType(EnumMsgModel.FLOW_REJECT_NODIFY.getCode()); | ||||
| wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); | wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); | ||||
| return new ResultData(); | return new ResultData(); | ||||