diff --git a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java index 4fdf4c9..6338e3e 100644 --- a/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java +++ b/nuzar-customer-controller/src/main/java/com/haitonggauto/rtosc/handler/ExportInHandler.java @@ -1827,6 +1827,20 @@ public class ExportInHandler implements BaseHandler { return; } + // 已生成装船计划,不能导入 + List 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);