Просмотр исходного кода

[审批][修改][调整短信]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
a1212b98eb
1 измененных файлов: 60 добавлений и 20 удалений
  1. +60
    -20
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java

+ 60
- 20
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Просмотреть файл

@@ -254,7 +254,7 @@ public class WxFlowServiceImpl implements WxFlowService {
Boolean supplement = (Boolean)params.get("supplement");

WxFlowModel flowModel = getModelByType(flowType,tenantId);
if(StringUtils.isBlank(flowModel.getFlowId())){
if(flowModel== null || StringUtils.isBlank(flowModel.getFlowId())){
return new ResultData(ResultData.ERROR, "您尚未设置审批模板,请先设置。");
}

@@ -310,9 +310,14 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setModelType(EnumMsgModel.FLOW_ASSIGNEE_NODIFY.getCode());
wxMsgRecord.setReceiver(phone);
wxMsgRecord.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)
){
dynamicContentMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
}else if(EnumFlowKey.BILL.getCode().equals(flowType)){
dynamicContentMap.put("bustype","账单");
dynamicContentMap.put("contract", businessId.toString());
}
@@ -386,11 +391,16 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode());
mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)
){
dynamicContentMap.put("bustype","合同");
}else if(EnumFlowKey.BILL.getCode().equals(flowType)){
dynamicContentMap.put("bustype","账单");
dynamicContentMap.put("contract", businessId.toString());
}
mailMsg.setDynamicContentMap(msgReplaceMap);
mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());
@@ -706,9 +716,14 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setModelType(EnumMsgModel.FLOW_APPLY_NODIFY.getCode());
wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):"");
wxMsgRecord.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)
){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
}else if(EnumFlowKey.BILL.getCode().equals(flowType)){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
}
@@ -725,9 +740,14 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode());
mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)
){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
}else if(EnumFlowKey.BILL.getCode().equals(flowType)){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
}
@@ -754,9 +774,14 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setModelType(EnumMsgModel.FLOW_PASS_NODIFY.getCode());
wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):"");
wxMsgRecord.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)
){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
}else if(EnumFlowKey.BILL.getCode().equals(flowType)){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
}
@@ -773,9 +798,14 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode());
mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)
){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
}else if(EnumFlowKey.BILL.getCode().equals(flowType)){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
}
@@ -888,9 +918,14 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setModelType(EnumMsgModel.FLOW_REJECT_NODIFY.getCode());
wxMsgRecord.setReceiver(userMap!=null?(String)userMap.get("phone"):"");
wxMsgRecord.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)
){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
}else if(EnumFlowKey.BILL.getCode().equals(flowType)){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
}
@@ -914,9 +949,14 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelId(EnumMsgModelId.MAIL_MSG_FLOW.getCode());
mailMsg.setTo(new String[]{email});
mailMsg.setTenantId(tenantId);
if(1 == flowType.intValue() || 3 == flowType.intValue()){
if(EnumFlowKey.CONTRACT.getCode().equals(flowType) || EnumFlowKey.NEW_RENT_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_RENT_END_CONTRACT.getCode().equals(flowType)
|| EnumFlowKey.NEW_SHOP_END_CONTRACT.getCode().equals(flowType)
){
msgReplaceMap.put("bustype","合同");
}else if(2 == flowType.intValue()){
}else if(EnumFlowKey.BILL.getCode().equals(flowType)){
msgReplaceMap.put("bustype","账单");
msgReplaceMap.put("contract", businessId.toString());
}


Загрузка…
Отмена
Сохранить