Commit aa9e348b authored by yajun.zhang's avatar yajun.zhang

优化Excel生成路径

parent 87bbd6dc
......@@ -320,7 +320,7 @@ public class ThirdWorkOrderServiceImpl implements IThirdWorkOrderService {
exportVo.setAcceptUser(objects[5].toString());
}
if (objects[6] != null) {
exportVo.setOrderNo(objects[6].toString());
exportVo.setOrderNo(objects[6].toString().trim());
orderNos.add(exportVo.getOrderNo());
}
if (objects[7] != null) {
......@@ -391,7 +391,8 @@ public class ThirdWorkOrderServiceImpl implements IThirdWorkOrderService {
}
String date = DateUtil.format(new Date(), DateUtil.YYYYMMDDHHMMSS);
String path =this.getClass().getResource("/").getPath()+ "工单导出"+DateUtil.format(new Date(),DateUtil.YYYYMMDDHHMMSS) +".xlsx";
String path = System.getProperty("java.io.tmpdir")+ "工单导出"+DateUtil.format(new Date(),DateUtil.YYYYMMDDHHMMSS) +".xlsx";
log.info("下载文件路径:{}",path);
File file = new File(path);
EasyExcelUtil.write(path,ThirdWorkOrderExportVo.class,exportVos);
SendMailParam mailParam = new SendMailParam();
......@@ -411,5 +412,4 @@ public class ThirdWorkOrderServiceImpl implements IThirdWorkOrderService {
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment