forked from BaoKaiWms/202501-Wms-Kate-Wuxi
1. 导入excel修改规则,不符合条件的数据行直接返回错误。
This commit is contained in:
parent
e9af1f12fe
commit
93731b685e
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user