已生成装船计划,不能导入

This commit is contained in:
dengjun 2023-12-27 14:32:05 +08:00
parent f54c1bb8c0
commit 3250f6b570
1 changed files with 14 additions and 0 deletions

View File

@ -1827,6 +1827,20 @@ public class ExportInHandler implements BaseHandler {
return;
}
// 已生成装船计划不能导入
List<Long> havePlans = openApi.haveShipPlan(exportIn.getVoyageId());
if (exportIn != null && CollectionUtils.isNotEmpty(havePlans)) {
Boolean c = havePlans.contains(exportIn.getId());
if (c) {
errorDataList.addAll(item.getValue().stream().map(p -> {
JSONObject o = JSONObject.from(p);
o.put("status", "已生成装船计划,不能导入");
return o;
}).collect(Collectors.toList()));
return;
}
}
if (exportIn.getCheckStatus() == AuditEnum.AUDIT_PASS) { // 审核
errorDataList.addAll(item.getValue().stream().map(p -> {
JSONObject o = JSONObject.from(p);