|
|
|
@@ -10,6 +10,8 @@ import com.iformall.domain.po.*; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.mq.MqBaseProducer; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
@@ -56,8 +58,6 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
@Autowired |
|
|
|
private MallUserInfoService mallUserInfoService; |
|
|
|
@Autowired |
|
|
|
private WxMsgValidationcodeService wxMsgValidationcodeService; |
|
|
|
@Autowired |
|
|
|
private WxRentContractMapper wxRentContractMapper; |
|
|
|
@Autowired |
|
|
|
private WxPropertyContractMapper wxPropertyContractMapper; |
|
|
|
@@ -71,6 +71,8 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
private WxBillPropertyMapper wxBillPropertyMapper; |
|
|
|
@Autowired |
|
|
|
private WxMerchantService wxMerchantService; |
|
|
|
@Autowired |
|
|
|
private MqBaseProducer mqBaseProducer; |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取流程key,1合同 2账单 |
|
|
|
@@ -241,11 +243,13 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
content.put("userName",starterInfo.getName()); |
|
|
|
content.put("page", Constant.adminPage); |
|
|
|
|
|
|
|
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
wxMsgValidationcode.setTenantId(tenantId); |
|
|
|
wxMsgValidationcode.setPhone(mallUserInfo.getPhone()); |
|
|
|
wxMsgValidationcode.setType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode()); |
|
|
|
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,content); |
|
|
|
WxMsgRecord wxMsgRecord = new WxMsgRecord(); |
|
|
|
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); |
|
|
|
wxMsgRecord.setModelType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode()); |
|
|
|
wxMsgRecord.setReceiver(mallUserInfo.getPhone()); |
|
|
|
wxMsgRecord.setTenantId(tenantId); |
|
|
|
wxMsgRecord.setDynamicContentMap(content); |
|
|
|
mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
@@ -375,8 +379,8 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
assigneeArray = assignee.get("assignee").split(","); |
|
|
|
userName = ""; |
|
|
|
for (String userid:assigneeArray) { |
|
|
|
MallUserInfo mallUserInfo = this.mallUserInfoService.getById(Long.parseLong(userid)); |
|
|
|
userName += mallUserInfo.getName()+" "; |
|
|
|
MallUserInfo mallUserInfo = this.mallUserInfoService.getById(Long.parseLong(userid)); |
|
|
|
userName += mallUserInfo.getName()+" "; |
|
|
|
} |
|
|
|
|
|
|
|
wxFlowRecord = new WxFlowRecord(); |
|
|
|
@@ -472,10 +476,13 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
msgReplaceMap.put("userName",userName); |
|
|
|
msgReplaceMap.put("page",Constant.adminPage); |
|
|
|
|
|
|
|
assignee += mallUserInfo.getName()+" "; |
|
|
|
wxMsgValidationcode.setPhone(mallUserInfo.getPhone()); |
|
|
|
wxMsgValidationcode.setType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode()); |
|
|
|
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); |
|
|
|
WxMsgRecord wxMsgRecord = new WxMsgRecord(); |
|
|
|
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); |
|
|
|
wxMsgRecord.setModelType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode()); |
|
|
|
wxMsgRecord.setReceiver(mallUserInfo.getPhone()); |
|
|
|
wxMsgRecord.setTenantId(tenantId); |
|
|
|
wxMsgRecord.setDynamicContentMap(msgReplaceMap); |
|
|
|
mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
} |
|
|
|
|
|
|
|
// 给发起人发送短信 |
|
|
|
@@ -485,10 +492,13 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
msgReplaceMap.put("contract",businessId+""); |
|
|
|
msgReplaceMap.put("toUserName",assignee.trim()); |
|
|
|
|
|
|
|
wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
wxMsgValidationcode.setPhone(userMap!=null?(String)userMap.get("phone"):""); |
|
|
|
wxMsgValidationcode.setType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode()); |
|
|
|
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); |
|
|
|
WxMsgRecord wxMsgRecord = new WxMsgRecord(); |
|
|
|
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); |
|
|
|
wxMsgRecord.setModelType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode()); |
|
|
|
wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):""); |
|
|
|
wxMsgRecord.setTenantId(tenantId); |
|
|
|
wxMsgRecord.setDynamicContentMap(msgReplaceMap); |
|
|
|
mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
return false; |
|
|
|
}else{ |
|
|
|
//继续递归判断 |
|
|
|
@@ -501,10 +511,14 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
msgReplaceMap = new HashedMap(); |
|
|
|
msgReplaceMap.put("contract",businessId+""); |
|
|
|
msgReplaceMap.put("page",Constant.adminPage); |
|
|
|
wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
wxMsgValidationcode.setPhone(userMap!=null?(String)userMap.get("phone"):""); |
|
|
|
wxMsgValidationcode.setType(EnumMsgModel.FLOW_PASS_NODIFY.getCode()); |
|
|
|
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); |
|
|
|
|
|
|
|
WxMsgRecord wxMsgRecord = new WxMsgRecord(); |
|
|
|
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); |
|
|
|
wxMsgRecord.setModelType(EnumMsgModel.FLOW_PASS_NODIFY.getCode()); |
|
|
|
wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):""); |
|
|
|
wxMsgRecord.setTenantId(tenantId); |
|
|
|
wxMsgRecord.setDynamicContentMap(msgReplaceMap); |
|
|
|
mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -583,10 +597,13 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
msgReplaceMap.put("contract",businessId+""); |
|
|
|
msgReplaceMap.put("page",Constant.adminPage); |
|
|
|
|
|
|
|
wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
wxMsgValidationcode.setPhone(userMap!=null?(String)userMap.get("phone"):""); |
|
|
|
wxMsgValidationcode.setType(EnumMsgModel.FLOW_REJECT_NODIFY.getCode()); |
|
|
|
wxMsgValidationcodeService.sendWorkFlowNodify(wxMsgValidationcode,msgReplaceMap); |
|
|
|
WxMsgRecord wxMsgRecord = new WxMsgRecord(); |
|
|
|
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); |
|
|
|
wxMsgRecord.setModelType(EnumMsgModel.FLOW_REJECT_NODIFY.getCode()); |
|
|
|
wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):""); |
|
|
|
wxMsgRecord.setTenantId(tenantId); |
|
|
|
wxMsgRecord.setDynamicContentMap(msgReplaceMap); |
|
|
|
mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
|