From 93731b685ea3e72e8cdcbf40ed420ab712d6e34a Mon Sep 17 00:00:00 2001 From: liang <594755172@qq.com> Date: Wed, 16 Apr 2025 08:47:37 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=AF=BC=E5=85=A5excel=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=A7=84=E5=88=99=EF=BC=8C=E4=B8=8D=E7=AC=A6=E5=90=88=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E6=95=B0=E6=8D=AE=E8=A1=8C=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/serviceImpl/ImportExcelEasyPoi.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dev_wms_serve/src/main/java/com/wms_main/excel/easypoi/service/serviceImpl/ImportExcelEasyPoi.java b/dev_wms_serve/src/main/java/com/wms_main/excel/easypoi/service/serviceImpl/ImportExcelEasyPoi.java index f83c7be..739bbcc 100644 --- a/dev_wms_serve/src/main/java/com/wms_main/excel/easypoi/service/serviceImpl/ImportExcelEasyPoi.java +++ b/dev_wms_serve/src/main/java/com/wms_main/excel/easypoi/service/serviceImpl/ImportExcelEasyPoi.java @@ -90,7 +90,7 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor || dbsRawData.getPlanProduction() == null || StringUtils.isEmpty(dbsRawData.getFamily()) || StringUtils.isEmpty(dbsRawData.getTestNo())) { - continue; + return BaseWmsApiResponse.error("存在信息不全的数据行。"); } if (dbsRawData.getFamily().contains("NGH")) { // 去除J列的NGH @@ -131,7 +131,8 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor tAppDbsService.saveBatch(newDbsMapToSave.values()); // 保存导入file记录 saveFileVo(fileVo); - return BaseWmsApiResponse.success("导入计划成功。"); + return BaseWmsApiResponse.success("导入计划成功。\n非NGH:" + dbsList.size() + "条,成功:" + newDbsMapToSave.size() + + "条。"); } catch (Exception e) { // 回滚事务 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); @@ -168,10 +169,10 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor || StringUtils.isEmpty(productRawData.getGoodsId()) || productRawData.getQuantityOfPairs() == null || StringUtils.isEmpty(productRawData.getBoxNo())) { - continue; + return BaseWmsApiResponse.error("存在信息不全的数据行。"); } if (StringUtils.isNotEmpty(thisProductId) && !thisProductId.equals(productRawData.getProductId())) { - continue; + return BaseWmsApiResponse.error("存在多个成品号。"); } else { thisProductId = productRawData.getProductId(); } @@ -247,10 +248,10 @@ public class ImportExcelEasyPoi extends BaseImportExcelEasyPoi implements IImpor || StringUtils.isEmpty(productRawData.getGoodsId()) || productRawData.getQuantityOfPairs() == null || StringUtils.isEmpty(productRawData.getBoxNo())) { - continue; + return BaseWmsApiResponse.error("存在信息不全的数据行。"); } if (StringUtils.isNotEmpty(thisProductId) && !thisProductId.equals(productRawData.getSingleProductId())) { - continue; + return BaseWmsApiResponse.error("存在多个服务件成品号。"); } else { thisProductId = productRawData.getSingleProductId(); }