|
|
@@ -172,18 +172,6 @@ public class JxlsExportTestServiceImpl implements JxlsExportTestService {
|
|
|
log.info("workLogTplVO is null:{}");
|
|
|
return null;
|
|
|
}
|
|
|
- byte driverOneSignUrl[] = null;
|
|
|
- if (StringUtils.isNotBlank(workLogTplVO.getWorkCycle().getDriverOneSignUrl())) {
|
|
|
- driverOneSignUrl = getImageBytes(domainUrl + workLogTplVO.getWorkCycle().getDriverOneSignUrl());
|
|
|
- }
|
|
|
- byte driverTwoSignUrl[] = null;
|
|
|
- if (StringUtils.isNotBlank(workLogTplVO.getWorkCycle().getDriverTwoSignUrl())) {
|
|
|
- driverTwoSignUrl = getImageBytes(domainUrl + workLogTplVO.getWorkCycle().getDriverTwoSignUrl());
|
|
|
- }
|
|
|
- byte escortSignUrl[] = null;
|
|
|
- if (StringUtils.isNotBlank(workLogTplVO.getWorkCycle().getEscortSignUrl())) {
|
|
|
- escortSignUrl = getImageBytes(domainUrl + workLogTplVO.getWorkCycle().getEscortSignUrl());
|
|
|
- }
|
|
|
|
|
|
// 获取模板文件
|
|
|
String tplfileName = "work_log_tpl.xlsx";
|
|
|
@@ -227,9 +215,18 @@ public class JxlsExportTestServiceImpl implements JxlsExportTestService {
|
|
|
model.put("restInfoList", workLogTplVO.getRestInfoList());
|
|
|
model.put("truckCheckInfoList", workLogTplVO.getTruckCheckInfoList());
|
|
|
|
|
|
- model.put("driverOneSignUrl", driverOneSignUrl);
|
|
|
- model.put("driverTwoSignUrl", driverTwoSignUrl);
|
|
|
- model.put("escortSignUrl", escortSignUrl);
|
|
|
+ if(StringUtils.isNotBlank(workLogTplVO.getWorkCycle().getDriverOneSignUrl())){
|
|
|
+ byte driverOneSignUrl[] = getImageBytes(domainUrl + workLogTplVO.getWorkCycle().getDriverOneSignUrl());
|
|
|
+ model.put("driverOneSignUrl", driverOneSignUrl);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(workLogTplVO.getWorkCycle().getDriverTwoSignUrl())){
|
|
|
+ byte driverTwoSignUrl[] = getImageBytes(domainUrl + workLogTplVO.getWorkCycle().getDriverTwoSignUrl());
|
|
|
+ model.put("driverTwoSignUrl", driverTwoSignUrl);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(workLogTplVO.getWorkCycle().getEscortSignUrl())){
|
|
|
+ byte escortSignUrl[] = getImageBytes(domainUrl + workLogTplVO.getWorkCycle().getEscortSignUrl());
|
|
|
+ model.put("escortSignUrl", escortSignUrl);
|
|
|
+ }
|
|
|
|
|
|
JxlsUtils.exportExcel(inputStream, os, model);
|
|
|
os.close();
|