Commit f59217be by 杨林龙

优化发送邮件模板

1 parent c3817174
...@@ -483,23 +483,23 @@ public class WorkOrderService { ...@@ -483,23 +483,23 @@ public class WorkOrderService {
content.append("联系电话:").append(order.getShopTelephone()).append(";\n"); content.append("联系电话:").append(order.getShopTelephone()).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(order.getNeedInstall().equalsIgnoreCase(TypeConverseEunm.NeedInstallTypeEnum.NEED_INSTALL.getNeedInstallType()) ? TypeConverseEunm.NeedInstallTypeEnum.NEED_INSTALL.getNeedInstallTypeStr() : TypeConverseEunm.NeedInstallTypeEnum.UN_NEED_INSTALL.getNeedInstallTypeStr()).append(";\n");
content.append("期望安装日期:").append(DateUtil.formatDate(order.getServiceTime())).append(";\n"); content.append("期望安装日期:").append(DateUtil.formatDate(order.getServiceTime())).append(";\n");
StringBuilder installationAreaBuilder = new StringBuilder();
String installationArea = StringUtils.isEmpty(order.getProvince()) ? "" : order.getProvince() installationAreaBuilder.append(StringUtils.isEmpty(order.getProvince()) ? "" : order.getProvince())
.concat(StringUtils.isEmpty(order.getCity()) ? "" : order.getCity()) .append(StringUtils.isEmpty(order.getCity()) ? "" : order.getCity())
.concat(StringUtils.isEmpty(order.getDistrict()) ? "" : order.getDistrict()); .append(StringUtils.isEmpty(order.getDistrict()) ? "" : order.getDistrict());
if (StringUtils.isEmpty(installationArea)) { if (StringUtils.isEmpty(installationAreaBuilder.toString())) {
content.append("安装区域:").append("--").append(";\n"); content.append("安装区域:").append("--").append(";\n");
} else { } else {
content.append("安装区域:").append(installationArea).append(";\n"); content.append("安装区域:").append(installationAreaBuilder.toString()).append(";\n");
} }
content.append("联系地址:").append(order.getShopAddress()).append(";\n"); content.append("联系地址:").append(order.getShopAddress()).append(";\n");
String detailAddress = StringUtils.isEmpty(installationArea) ? "" : installationArea StringBuilder detailAddressBuilder = new StringBuilder();
.concat(StringUtils.isEmpty(order.getServiceAddress()) ? "" : order.getServiceAddress()); detailAddressBuilder.append(StringUtils.isEmpty(installationAreaBuilder.toString()) ? "" : installationAreaBuilder.toString()).append(StringUtils.isEmpty(order.getServiceAddress()) ? "" : order.getServiceAddress());
if (StringUtils.isEmpty(detailAddress)) { if (StringUtils.isEmpty(detailAddressBuilder.toString())) {
content.append("详细地址:").append("--").append(";\n"); content.append("详细地址:").append("--").append(";\n");
} else { } else {
content.append("详细地址:").append(detailAddress).append(";\n"); content.append("详细地址:").append(detailAddressBuilder.toString()).append(";\n");
} }
if (StringUtils.isEmpty(order.getServiceLinkerPhone())) { if (StringUtils.isEmpty(order.getServiceLinkerPhone())) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!