From a0e8e093fecd3c24ef1e548c9892ee4d3fd0a2d5 Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Thu, 16 Jan 2025 19:36:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gather/device/device/controller/PqDevController.java | 8 ++++---- .../java/com/njcn/gather/device/device/pojo/po/PqDev.java | 1 - .../device/device/service/impl/PqDevServiceImpl.java | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/device/src/main/java/com/njcn/gather/device/device/controller/PqDevController.java b/device/src/main/java/com/njcn/gather/device/device/controller/PqDevController.java index e82b5c30..ee40bc4a 100644 --- a/device/src/main/java/com/njcn/gather/device/device/controller/PqDevController.java +++ b/device/src/main/java/com/njcn/gather/device/device/controller/PqDevController.java @@ -250,22 +250,22 @@ public class PqDevController extends BaseController { params.setHeadRows(1); params.setNeedVerify(true); - List cnDevExcelList = null; + List cnDevExcelList; try { ExcelImportResult excelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), CNDevExcel.class, params); if (excelImportResult.isVerifyFail()) { // 此处前端要做特殊处理,具体可以参考技术监督的数据导入 Workbook failWorkbook = excelImportResult.getFailWorkbook(); PoiUtil.exportFileByWorkbook(failWorkbook, "非法被检设备数据.xlsx", response); - throw new BusinessException(DevResponseEnum.IMPORT_DATA_FORMAT_FAIL); -// return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe); +// throw new BusinessException(DevResponseEnum.IMPORT_DATA_FORMAT_FAIL); + return null; } else { cnDevExcelList = excelImportResult.getList(); } } catch (Exception e) { throw new BusinessException(DevResponseEnum.IMPORT_DATA_FAIL); } - if(ObjectUtil.isNotEmpty(cnDevExcelList)){ + if (ObjectUtil.isNotEmpty(cnDevExcelList)) { pqDevService.importCNDev(cnDevExcelList, patternId); } return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); diff --git a/device/src/main/java/com/njcn/gather/device/device/pojo/po/PqDev.java b/device/src/main/java/com/njcn/gather/device/device/pojo/po/PqDev.java index a1ecd06e..6eeecd57 100644 --- a/device/src/main/java/com/njcn/gather/device/device/pojo/po/PqDev.java +++ b/device/src/main/java/com/njcn/gather/device/device/pojo/po/PqDev.java @@ -215,6 +215,5 @@ public class PqDev extends BaseEntity implements Serializable { @TableField("Preinvestment_Plan") private String preinvestmentPlan; - private String power; } diff --git a/device/src/main/java/com/njcn/gather/device/device/service/impl/PqDevServiceImpl.java b/device/src/main/java/com/njcn/gather/device/device/service/impl/PqDevServiceImpl.java index e6602f20..1726bd71 100644 --- a/device/src/main/java/com/njcn/gather/device/device/service/impl/PqDevServiceImpl.java +++ b/device/src/main/java/com/njcn/gather/device/device/service/impl/PqDevServiceImpl.java @@ -811,7 +811,6 @@ public class PqDevServiceImpl extends ServiceImpl implements DevType devType = devTypeService.getByName(pqDev.getDevType()); pqDev.setDevType(devType.getId()); pqDev.setIcdId(devType.getIcd()); - pqDev.setPower(devType.getPower()); pqDev.setDevVolt(devType.getDevVolt()); pqDev.setDevCurr(devType.getDevCurr()); pqDev.setDevChns(devType.getDevChns());