From c23b8aa49bb30575fe12513bee4a857f267e61d2 Mon Sep 17 00:00:00 2001 From: lym <1994302445@qq.com> Date: Tue, 14 Jan 2025 11:28:18 +0800 Subject: [PATCH] =?UTF-8?q?api=E5=AF=BC=E5=85=A5bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/order/vo/order/OrderSaveReqVO.java | 2 +- .../admin/api/webcad/ApiTypeRealize.java | 52 +++++++++---------- .../plate/vo/remain/RemainPlateSaveReqVO.java | 4 +- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/vo/order/OrderSaveReqVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/vo/order/OrderSaveReqVO.java index 3b7ea3c6c..a3b8031e4 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/vo/order/OrderSaveReqVO.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/vo/order/OrderSaveReqVO.java @@ -22,7 +22,7 @@ public class OrderSaveReqVO { private String apiOrderId; @Schema(description = "生产单日期", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "交付日期不能为空") + @NotNull(message = "生产单日期不能为空") private LocalDateTime orderDate; @Schema(description = "交付日期", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/api/webcad/ApiTypeRealize.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/api/webcad/ApiTypeRealize.java index 096f1e4d7..59c87a241 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/api/webcad/ApiTypeRealize.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/api/webcad/ApiTypeRealize.java @@ -882,19 +882,6 @@ public class ApiTypeRealize { Long organId) { // System.out.println("开始时间 :" + System.currentTimeMillis()); - if (platesJSONObject == null || platesJSONObject.isEmpty()) { - return Collections.emptyMap(); - } - if (blocksJSONObject == null || blocksJSONObject.isEmpty()) { - return Collections.emptyMap(); - } - // 板材数据 - Map blocksMap = getBlocksData(blocksJSONObject); - - - JSONArray plateLists = platesJSONObject.getJSONObject(ProduceApiConstants.VALUE).getJSONArray(ProduceApiConstants.LIST); -// System.out.println(" 长度 " + plateLists.size()); - Map map = new HashMap<>(); Map partsInfos = new HashMap<>(); List plateList = new ArrayList<>(); @@ -909,6 +896,29 @@ public class ApiTypeRealize { Map totalPlateCountMapToGroup = new HashMap<>(); Map irregularPlateCountMapToGroup = new HashMap<>(); + map.put(FieldConstants.PLATE, partsInfos); + map.put(FieldConstants.ITEM, platesItem); + + map.put(BODY_PLATE_NUMBER , totalPlateCountMapToBody); + map.put(BODY_IRREGULAR_PLATE_NUMBER , irregularPlateCountMapToBody); + map.put(GROUP_PLATE_NUMBER , totalPlateCountMapToGroup); + map.put(GROUP_IRREGULAR_PLATE_NUMBER , irregularPlateCountMapToGroup); + map.put(PLATE_DETAILS_REMARKS, plateDetailMap); + + if (platesJSONObject == null || platesJSONObject.isEmpty()) { + return map; + } + if (blocksJSONObject == null || blocksJSONObject.isEmpty()) { + return map; + } + // 板材数据 + Map blocksMap = getBlocksData(blocksJSONObject); + + + JSONArray plateLists = platesJSONObject.getJSONObject(ProduceApiConstants.VALUE).getJSONArray(ProduceApiConstants.LIST); + + + for (int i = 0; i < plateLists.size(); i++) { long plateNo = idWorker.nextId(); @@ -1037,22 +1047,8 @@ public class ApiTypeRealize { - map.put(FieldConstants.PLATE, partsInfos); - map.put(FieldConstants.ITEM, platesItem); - map.put(BODY_PLATE_NUMBER , totalPlateCountMapToBody); - map.put(BODY_IRREGULAR_PLATE_NUMBER , irregularPlateCountMapToBody); - map.put(GROUP_PLATE_NUMBER , totalPlateCountMapToGroup); - map.put(GROUP_IRREGULAR_PLATE_NUMBER , irregularPlateCountMapToGroup); - map.put(PLATE_DETAILS_REMARKS, plateDetailMap); -// System.out.println( -// " platesItem " + platesItem.size() + -// " totalPlateCountMapToBody " + totalPlateCountMapToBody.size() + -// " irregularPlateCountMapToBody " + irregularPlateCountMapToBody.size() + -// " totalPlateCountMapToGroup " + totalPlateCountMapToGroup.size() + -// " irregularPlateCountMapToGroup " + irregularPlateCountMapToGroup.size() + -// " plateDetailMap " + plateDetailMap.size() -// ); + return map; } diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateSaveReqVO.java b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateSaveReqVO.java index 052b7035d..7804eb064 100644 --- a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateSaveReqVO.java +++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateSaveReqVO.java @@ -84,7 +84,7 @@ public class RemainPlateSaveReqVO { private Integer placeStyle; @Schema(description = "仓库名") - @Size(max = 64, message = "品牌长度不能超过64个字符") + @Size(max = 64, message = "仓库名长度不能超过64个字符") private String store; @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318") @@ -92,7 +92,7 @@ public class RemainPlateSaveReqVO { private Integer count; @Schema(description = "备注", example = "随便") - @Size(max = 255, message = "品牌长度不能超过255个字符") + @Size(max = 255, message = "备注长度不能超过255个字符") private String remark; @Schema(description = "轮廊数据,Json 串", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318")