Commit 5d30e544 by 杨林龙

修改邮件模板

1 parent f60949d3
...@@ -12,6 +12,7 @@ import cn.com.glsx.devicemonitor.api.feign.DeviceFeignService; ...@@ -12,6 +12,7 @@ import cn.com.glsx.devicemonitor.api.feign.DeviceFeignService;
import cn.com.glsx.devicemonitor.api.feign.GpsBsFeignService; import cn.com.glsx.devicemonitor.api.feign.GpsBsFeignService;
import cn.com.glsx.notify.dto.MailTemplateMessageDTO; import cn.com.glsx.notify.dto.MailTemplateMessageDTO;
import cn.com.glsx.stdinterface.common.constants.Constants; import cn.com.glsx.stdinterface.common.constants.Constants;
import cn.com.glsx.stdinterface.common.enums.TypeConverseEunm;
import cn.com.glsx.stdinterface.common.exception.StdInterfaceException; import cn.com.glsx.stdinterface.common.exception.StdInterfaceException;
import cn.com.glsx.stdinterface.dto.*; import cn.com.glsx.stdinterface.dto.*;
import cn.com.glsx.stdinterface.enums.BizServiceTypeEnum; import cn.com.glsx.stdinterface.enums.BizServiceTypeEnum;
...@@ -471,39 +472,62 @@ public class WorkOrderService { ...@@ -471,39 +472,62 @@ public class WorkOrderService {
title.append("(").append(rootOrg).append(") 手动安装单-").append(order.getPartnerOrderNo()).append("-").append(woVehicle.getVin()).append("\n"); title.append("(").append(rootOrg).append(") 手动安装单-").append(order.getPartnerOrderNo()).append("-").append(woVehicle.getVin()).append("\n");
//创建邮件正文 //创建邮件正文
StringBuilder content = new StringBuilder(); StringBuilder content = new StringBuilder();
content.append("租赁公司-").append(rootOrg).append(";\n"); content.append("业务工单号:").append(order.getPartnerOrderNo()).append(";\n");
content.append("申请编号-").append(order.getPartnerOrderNo()).append(";\n"); content.append("店面名称:").append(order.getShopName()).append(";\n");
content.append("区域-").append(order.getProvince().concat("/").concat(order.getCity()).concat("/").concat(order.getDistrict())).append(";\n"); content.append("联系人:").append(order.getShopContactor()).append(";\n");
content.append("设备组合-").append(buildDeviceCompose(woVehicle.getDeviceCompose())).append(";\n"); content.append("联系电话:").append(order.getShopTelephone()).append(";\n");
content.append("导入时间-").append(DateUtil.formatDate(order.getCreatedDate())).append(";\n"); content.append("是否需要安装:").append(order.getNeedInstall().equalsIgnoreCase(TypeConverseEunm.NeedInstallTypeEnum.NEED_INSTALL.getNeedInstallType()) ? TypeConverseEunm.NeedInstallTypeEnum.NEED_INSTALL.getNeedInstallTypeStr() : TypeConverseEunm.NeedInstallTypeEnum.UN_NEED_INSTALL.getNeedInstallTypeStr()).append(";\n");
content.append("分公司-无").append(";\n"); content.append("期望安装日期:").append(DateUtil.formatDate(order.getServiceTime())).append(";\n");
content.append("店面名称-").append(order.getShopName()).append(";\n"); content.append("安装区域:").append(order.getProvince().concat(order.getCity()).concat(order.getDistrict())).append(";\n");
content.append("店面联系电话-").append(order.getShopTelephone()).append(";\n"); content.append("联系地址:").append(order.getShopAddress()).append(";\n");
content.append("要求安装日期-").append(DateUtil.formatDate(order.getServiceTime())).append(";\n"); content.append("详细地址:").append(order.getProvince().concat(order.getCity()).concat(order.getDistrict()).concat(order.getServiceAddress())).append(";\n");
if (StringUtils.isEmpty(woVehicle.getLesseeName())) { if (StringUtils.isEmpty(order.getServiceLinkerPhone())) {
content.append("客户姓名-无").append(";\n"); content.append("安装联系电话:").append("--").append(";\n");
} else { } else {
content.append("客户姓名-").append(woVehicle.getLesseeName()).append(";\n"); content.append("安装联系电话:").append(order.getServiceLinkerPhone()).append(";\n");
}
if (StringUtils.isEmpty(order.getServiceLinker())) {
content.append("姓名:").append("--").append(";\n");
} else {
content.append("姓名:").append(order.getServiceLinker()).append(";\n");
}
content.append("性别:").append("--").append(";\n");
content.append("联系电话:").append(order.getServiceLinkerPhone()).append(";\n");
if (StringUtils.isEmpty(woVehicle.getPlateNo())) {
content.append("车牌号:").append("--").append(";\n");
} else {
content.append("车牌号:").append(woVehicle.getPlateNo()).append(";\n");
}
content.append("车架号:").append(woVehicle.getVin()).append(";\n");
if (StringUtils.isEmpty(woVehicle.getBrandName())) {
content.append("车架品牌:").append("--").append(";\n");
} else {
content.append("车架品牌:").append(woVehicle.getBrandName()).append(";\n");
} }
content.append("车架号-").append(woVehicle.getVin()).append(";\n");
content.append("颜色-无").append(";\n");
if (StringUtils.isEmpty(woVehicle.getSubBrandName()) && StringUtils.isEmpty(woVehicle.getSeriesName()) && StringUtils.isEmpty(woVehicle.getTypeName())) { if (StringUtils.isEmpty(woVehicle.getSubBrandName()) && StringUtils.isEmpty(woVehicle.getSeriesName()) && StringUtils.isEmpty(woVehicle.getTypeName())) {
content.append("车型-无").append(";\n"); content.append("车型:").append("--").append(";\n");
} else { } else {
String modelType = (woVehicle.getSubBrandName() == null ? "--" : woVehicle.getSubBrandName()) String modelType = (woVehicle.getSubBrandName() == null ? "--" : woVehicle.getSubBrandName())
.concat("/").concat(woVehicle.getSeriesName() == null ? "--" : woVehicle.getSeriesName()) .concat("/").concat(woVehicle.getSeriesName() == null ? "--" : woVehicle.getSeriesName())
.concat("/").concat(woVehicle.getTypeName() == null ? "--" : woVehicle.getTypeName()); .concat("/").concat(woVehicle.getTypeName() == null ? "--" : woVehicle.getTypeName());
content.append("车型-").append(modelType).append(";\n"); content.append("车型:").append(modelType).append(";\n");
}
if (StringUtils.isEmpty(woVehicle.getEngineNo())) {
content.append("发动机号:").append("--").append(";\n");
} else {
content.append("发动机号:").append(woVehicle.getEngineNo()).append(";\n");
} }
content.append("贷款期限-无").append(";\n");
content.append("租凭方式-无").append(";\n"); content.append("排量:").append("--").append(";\n");
content.append("安装地址-").append(order.getServiceAddress()).append(";\n"); content.append("颜色:").append("默认").append(";\n");
if (StringUtils.isEmpty(order.getRemark())) { if (StringUtils.isEmpty(order.getServiceExplain())) {
content.append("备注—无").append(";\n"); content.append("备注:").append("--").append(";\n");
} else { } else {
content.append("备注—").append(order.getRemark()).append(";\n"); content.append("备注:").append(order.getServiceExplain()).append(";\n");
} }
content.append("安装方式—广联安装").append(";\n");
MailTemplateMessageDTO messageDTO = new MailTemplateMessageDTO(); MailTemplateMessageDTO messageDTO = new MailTemplateMessageDTO();
String sendMail = PropertiesUtils.getProperty("mail.toMail.addr"); String sendMail = PropertiesUtils.getProperty("mail.toMail.addr");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!