Commit eb4efba8 by 杨林龙

优化邮件发送内容 车型展示

1 parent fc20f497
...@@ -458,7 +458,10 @@ public class WorkOrderService { ...@@ -458,7 +458,10 @@ public class WorkOrderService {
content.append("客户姓名-").append(woVehicle.getLesseeName()).append(";\n"); content.append("客户姓名-").append(woVehicle.getLesseeName()).append(";\n");
content.append("车架号-").append(woVehicle.getVin()).append(";\n"); content.append("车架号-").append(woVehicle.getVin()).append(";\n");
content.append("颜色-无").append(";\n"); content.append("颜色-无").append(";\n");
content.append("车型-").append(woVehicle.getVehicleType()).append(";\n"); String modelType = (woVehicle.getSubBrandName() == null ? "--" : woVehicle.getSubBrandName())
.concat("/").concat(woVehicle.getSeriesName() == null ? "--" : woVehicle.getSeriesName())
.concat("/").concat(woVehicle.getTypeName() == null ? "--" : woVehicle.getTypeName());
content.append("车型-").append(modelType).append(";\n");
content.append("贷款期限-无").append(";\n"); content.append("贷款期限-无").append(";\n");
content.append("租凭方式-无").append(";\n"); content.append("租凭方式-无").append(";\n");
content.append("安装地址-").append(order.getServiceAddress()).append(";\n"); content.append("安装地址-").append(order.getServiceAddress()).append(";\n");
...@@ -890,8 +893,7 @@ public class WorkOrderService { ...@@ -890,8 +893,7 @@ public class WorkOrderService {
* @param devices * @param devices
*/ */
private void checkDevicesExist(WorkOrder workOrder, List<SimpleDeviceItem> devices) { private void checkDevicesExist(WorkOrder workOrder, List<SimpleDeviceItem> devices) {
//安装单激活必须有设备 //激活必须有设备
if ("Y".equals(workOrder.getNeedInstall())) {
if (CollectionUtils.isEmpty(devices)) { if (CollectionUtils.isEmpty(devices)) {
throw new StdInterfaceException("656565", "验证设备不能为空"); throw new StdInterfaceException("656565", "验证设备不能为空");
} }
...@@ -905,7 +907,6 @@ public class WorkOrderService { ...@@ -905,7 +907,6 @@ public class WorkOrderService {
} }
}); });
} }
}
/** /**
* 验证设备存在、激活等状态 * 验证设备存在、激活等状态
...@@ -940,7 +941,7 @@ public class WorkOrderService { ...@@ -940,7 +941,7 @@ public class WorkOrderService {
*/ */
private void checkDevicesCompose(Long workOrderId, List<SimpleDeviceItem> devices) { private void checkDevicesCompose(Long workOrderId, List<SimpleDeviceItem> devices) {
if (CollectionUtils.isNotEmpty(devices)) { if (CollectionUtils.isNotEmpty(devices)) {
Map<Integer, List<SimpleDeviceItem>> deviceGroup = devices.stream().collect(Collectors.groupingBy(SimpleDeviceItem::getWireType)); Map<Integer, List<SimpleDeviceItem>> deviceGroup = devices.stream().filter(simpleDeviceItem -> simpleDeviceItem.getWireType() != null).collect(Collectors.groupingBy(SimpleDeviceItem::getWireType));
List<SimpleDeviceItem> wireDevices = deviceGroup.get(1); List<SimpleDeviceItem> wireDevices = deviceGroup.get(1);
List<SimpleDeviceItem> wirelessDevices = deviceGroup.get(0); List<SimpleDeviceItem> wirelessDevices = deviceGroup.get(0);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!