diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcDownCodeServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcDownCodeServiceImpl.java index 9b79cb9d..d8abb86f 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcDownCodeServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcDownCodeServiceImpl.java @@ -45,7 +45,7 @@ public class XhpcDownCodeServiceImpl implements IXhpcDownCodeService { List> list = xhpcDownCodeMapper.selectExcelDataByPileId(pileId); System.out.println(list); - File file1 = new File("Material"); + File file1 = new File("/www/wwwroot/xhpc.scxhua.com/dist/Material"); File file2 = new File(file1, "pictures"); if(file1.exists()){ deleteFiles(file1); @@ -91,7 +91,7 @@ public class XhpcDownCodeServiceImpl implements IXhpcDownCodeService { } System.out.println(list); //5、写入 - OutputStream fos = new FileOutputStream(file1.getAbsoluteFile() + "\\data.xls"); + OutputStream fos = new FileOutputStream(file1.getAbsoluteFile() + "/data.xls"); workbook.write(fos); workbook.close(); fos.close(); @@ -156,7 +156,7 @@ public class XhpcDownCodeServiceImpl implements IXhpcDownCodeService { } System.out.println(list); //5、写入 - OutputStream fos = new FileOutputStream(file1.getAbsoluteFile() + "\\data.xls"); + OutputStream fos = new FileOutputStream(file1.getAbsoluteFile() + "/data.xls"); workbook.write(fos); workbook.close(); fos.close(); diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/utils/img/DownMaterialUtil.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/utils/img/DownMaterialUtil.java index d64b8803..6486cb5b 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/utils/img/DownMaterialUtil.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/utils/img/DownMaterialUtil.java @@ -62,8 +62,8 @@ public class DownMaterialUtil { } String real = str.substring(poke + 1); System.out.println(real); - System.out.println(file.getName() + "\\" + real); - fileOutputStream = new FileOutputStream(file.getAbsoluteFile() + "\\" + real); + System.out.println(file.getName() + "/" + real); + fileOutputStream = new FileOutputStream(file.getAbsoluteFile() + "/" + real); while ((len = inputStream.read(data)) != -1) { fileOutputStream.write(data, 0, len);