mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
错误提示语句修改
This commit is contained in:
+1
-2
@@ -1,7 +1,6 @@
|
||||
package com.cf.imes.module.manage.controller.admin.parts;
|
||||
|
||||
import com.cf.imes.module.manage.controller.admin.parts.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlateImportExcelVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.parts.PartsDO;
|
||||
import com.cf.imes.module.manage.service.parts.PartsExcelListener;
|
||||
import com.cf.imes.module.manage.service.parts.PartsService;
|
||||
@@ -131,7 +130,7 @@ public class PartsController {
|
||||
ExcelReadUtil excelReadUtil = new ExcelReadUtil();
|
||||
PartsExcelListener listener = new PartsExcelListener();
|
||||
List<PartsImportExcelVO> list = excelReadUtil.read(file, PartsImportExcelVO.class, listener);
|
||||
System.out.println(" list = " + list);
|
||||
|
||||
if (!excelReadUtil.getFlag())
|
||||
ExcelUtils.write(response, IMPORT_TEMPLATE, "配件列表", PartsImportExcelVO.class, list);
|
||||
else {
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ public class PlateController {
|
||||
if (!plateExcelUtil.getFlag())
|
||||
ExcelUtils.write(response, IMPORT_TEMPLATE, "板材列表", PlateImportExcelVO.class, list);
|
||||
else {
|
||||
if (list.size() == 0){
|
||||
if (list.isEmpty()){
|
||||
PlateImportExcelVO plateImportExcelVO = PlateImportExcelVO.builder().result("导入失败,请保证导入文件中包含板材数据").build();
|
||||
list.add(plateImportExcelVO);
|
||||
ExcelUtils.write(response, IMPORT_TEMPLATE, "板材列表", PlateImportExcelVO.class, list);
|
||||
|
||||
+4
-1
@@ -6,6 +6,9 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.cf.imes.module.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 文件上传下载相工具类
|
||||
*/
|
||||
@@ -32,7 +35,7 @@ public class FileHelperUtil {
|
||||
outputStream.write(buffer);
|
||||
outputStream.flush();
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
throw exception(FILE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user