Jelajahi Sumber

(原来使用"("和")",这在linux平台中运行时会发生错误:因为此符号特殊,不允许出现在文件名中,如果有出现会使用''包括)

hexiugang 2 tahun lalu
induk
melakukan
f18770b011

+ 3 - 3
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -2157,8 +2157,8 @@ public class AdminCustomerController {
 
         }
 
-        //下载导出订单Excel
-        downloadCustomerExcel(wb, downloadProgressInfo, path, "客诉报表" + (type == 1 ? "(客诉订单)" : "(寄回订单)"));
+        //下载导出订单Excel(原来使用"("和")",这在linux平台中运行时会发生错误:因为此符号特殊,不允许出现在文件名中,如果有出现会使用''包括)
+        downloadCustomerExcel(wb, downloadProgressInfo, path, "_report_" + (type == 1 ? "customer_order_" : "send_back_"));
     }
 
     /**
@@ -2168,7 +2168,7 @@ public class AdminCustomerController {
      * @throws Exception
      */
     public void downloadCustomerExcel(HSSFWorkbook wb, DownloadProgressInfo downloadProgressInfo, String path, String name) throws Exception {
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
         String fileName = format.format(new Date()) + name;
         try {
             FileOutputStream fout = new FileOutputStream(path + "/common/customerExcel/" + fileName + downloadProgressInfo.getDownloadId() + ".xls");