Commit 86e409e0 by wubh

包活干V2.1.0-审核单导出功能优化

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@29072 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 65542cd1
...@@ -314,11 +314,10 @@ public class ReportController extends BaseReportController { ...@@ -314,11 +314,10 @@ public class ReportController extends BaseReportController {
// 安装地址 // 安装地址
Integer district = order.getDistrict(); Integer district = order.getDistrict();
if (district != null) { String fullArea = (district == null)
String fullArea = this.areaService.getFullAreaByDistrictId(district); ? "" : this.areaService.getFullAreaByDistrictId(district);
String address = order.getAddress(); String address = order.getAddress();
orderVo.setInstallAddress(StringUtils.join(fullArea, address)); orderVo.setInstallAddress(StringUtils.join(fullArea, address));
}
// 订单设备信息 // 订单设备信息
List<SysOrderDevice> orderDeviceList = order.getOrderDeviceList(); List<SysOrderDevice> orderDeviceList = order.getOrderDeviceList();
...@@ -330,20 +329,21 @@ public class ReportController extends BaseReportController { ...@@ -330,20 +329,21 @@ public class ReportController extends BaseReportController {
orderDeviceSb.append(deviceTypeName).append(":").append(orderDevice.getDeviceNo()) orderDeviceSb.append(deviceTypeName).append(":").append(orderDevice.getDeviceNo())
.append(",\n"); .append(",\n");
} }
String orderDeviceStr = orderDeviceSb.toString().replaceAll(",.*$", String orderDeviceStr = orderDeviceSb.toString().trim()
"").trim(); .replaceAll(",$", "");
orderVo.setOrderDeviceStr(orderDeviceStr); orderVo.setOrderDeviceStr(orderDeviceStr);
} }
// 安装照片地址 // 安装照片地址
if (StringUtils.isEmpty(order.getInstallPiuctures())) { if (CollectionUtils.isEmpty(order.getInstallPiuctures())
&& CollectionUtils.isNotEmpty(order.getOrderFileList())) {
// 没有现成的照片地址列表,则从订单文件列表中取 // 没有现成的照片地址列表,则从订单文件列表中取
List<SysOrderFile> orderFileList = order.getOrderFileList(); List<SysOrderFile> orderFileList = order.getOrderFileList();
List<String> installPictures = orderFileList.stream().map(SysOrderFile::getFilePath) List<String> installPictures = orderFileList.stream().map(SysOrderFile::getFilePath)
.collect(Collectors.toList()); .collect(Collectors.toList());
order.setInstallPiuctures(installPictures); order.setInstallPiuctures(installPictures);
} }
if (StringUtils.isNotEmpty(order.getInstallPiuctures())) { if (CollectionUtils.isNotEmpty(order.getInstallPiuctures())) {
orderVo.setInstallLocationPicture(StringUtils.join( orderVo.setInstallLocationPicture(StringUtils.join(
order.getInstallPiuctures(), ",\n")); order.getInstallPiuctures(), ",\n"));
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!