From 429a9ed44851a8a56470cffa198aea22825d8bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Sun, 28 Sep 2025 09:55:43 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20bug-760=20=E9=92=A2=E6=9E=84?= =?UTF-8?q?=E5=8C=85=E7=AE=A1=E7=90=86=E5=88=97=E8=A1=A8=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=8C=89=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/WmsStructuralPackageMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nflg-wms-repository/src/main/resources/mapper/WmsStructuralPackageMapper.xml b/nflg-wms-repository/src/main/resources/mapper/WmsStructuralPackageMapper.xml index 922ed2af..1729fc3b 100644 --- a/nflg-wms-repository/src/main/resources/mapper/WmsStructuralPackageMapper.xml +++ b/nflg-wms-repository/src/main/resources/mapper/WmsStructuralPackageMapper.xml @@ -22,14 +22,14 @@ and latest=true - ORDER BY id DESC + ORDER BY create_time DESC From 7b76691afab19db672429c327b3d73d0832744a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Sun, 28 Sep 2025 10:21:53 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20bug-763=20=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=97=B6=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E6=90=9C=E7=B4=A2=E5=85=B3=E9=94=AE=E5=AD=97=E7=9A=84?= =?UTF-8?q?=E5=89=8D=E5=90=8E=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/starter/config/JacksonConfig.java | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/nflg-wms-starter/src/main/java/com/nflg/wms/starter/config/JacksonConfig.java b/nflg-wms-starter/src/main/java/com/nflg/wms/starter/config/JacksonConfig.java index 59fe051a..cc395a4b 100644 --- a/nflg-wms-starter/src/main/java/com/nflg/wms/starter/config/JacksonConfig.java +++ b/nflg-wms-starter/src/main/java/com/nflg/wms/starter/config/JacksonConfig.java @@ -1,7 +1,9 @@ package com.nflg.wms.starter.config; import cn.hutool.core.date.DatePattern; +import cn.hutool.core.util.StrUtil; import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; @@ -27,14 +29,15 @@ public class JacksonConfig { public ObjectMapper objectMapper() { return new ObjectMapper() .registerModule(new JavaTimeModule()) - .registerModule(customDateTimeModule()) + .registerModule(dateTimeModule()) .registerModule(bigDecimalModule()) - .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) - .configure(SerializationFeature.INDENT_OUTPUT, false); + .registerModule(stringModule()) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .disable(SerializationFeature.INDENT_OUTPUT); } - private SimpleModule customDateTimeModule() { + private SimpleModule dateTimeModule() { SimpleModule module = new SimpleModule(); module.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN))); module.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_PATTERN))); @@ -52,6 +55,12 @@ public class JacksonConfig { return module; } + private SimpleModule stringModule() { + SimpleModule module = new SimpleModule(); + module.addDeserializer(String.class, new TrimStringDeserializer()); + return module; + } + public static class BigDecimalPlainSerializer extends JsonSerializer { @Override public void serialize(BigDecimal value, JsonGenerator gen, SerializerProvider serializers) @@ -64,4 +73,15 @@ public class JacksonConfig { } } } + + /** + * 去除字符串首尾空格 + */ + public static class TrimStringDeserializer extends JsonDeserializer { + @Override + public String deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException { + return StrUtil.trim(p.getValueAsString()); + } + } } \ No newline at end of file From 13889b2703f2719e9235ad8336d71c34430eff52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Sun, 28 Sep 2025 13:50:55 +0800 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20bug-774=20=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=E7=9A=84=E5=85=AC=E5=8F=B8=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=85=A8=E9=83=A8=E6=9B=B4=E6=94=B9=E4=B8=BA=E3=80=90?= =?UTF-8?q?=E7=A6=8F=E5=BB=BA=E5=8D=97=E6=96=B9=E8=B7=AF=E9=9D=A2=E6=9C=BA?= =?UTF-8?q?=E6=A2=B0=E8=82=A1=E4=BB=BD=E6=9C=89=E9=99=90=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nflg-wms-admin/src/main/resources/template/厂内调拨单.html | 2 +- .../src/main/resources/template/外协领料出库单.html | 2 +- nflg-wms-admin/src/main/resources/template/外协领料单.html | 2 +- .../src/main/resources/template/成本中心退料单.html | 2 +- .../src/main/resources/template/成本中心领料单.html | 2 +- nflg-wms-admin/src/main/resources/template/生产入库单.html | 2 +- nflg-wms-admin/src/main/resources/template/生产补料单.html | 2 +- nflg-wms-admin/src/main/resources/template/生产退料单.html | 2 +- .../src/main/resources/template/生产领料出库单.html | 2 +- nflg-wms-admin/src/main/resources/template/生产领料单.html | 2 +- nflg-wms-admin/src/main/resources/template/转储入库单.html | 2 +- nflg-wms-admin/src/main/resources/template/转储单.html | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nflg-wms-admin/src/main/resources/template/厂内调拨单.html b/nflg-wms-admin/src/main/resources/template/厂内调拨单.html index a1095da4..db8d6252 100644 --- a/nflg-wms-admin/src/main/resources/template/厂内调拨单.html +++ b/nflg-wms-admin/src/main/resources/template/厂内调拨单.html @@ -138,7 +138,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
材料调拨单
diff --git a/nflg-wms-admin/src/main/resources/template/外协领料出库单.html b/nflg-wms-admin/src/main/resources/template/外协领料出库单.html index c2541d1c..b004fd75 100644 --- a/nflg-wms-admin/src/main/resources/template/外协领料出库单.html +++ b/nflg-wms-admin/src/main/resources/template/外协领料出库单.html @@ -139,7 +139,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
外协发料单
diff --git a/nflg-wms-admin/src/main/resources/template/外协领料单.html b/nflg-wms-admin/src/main/resources/template/外协领料单.html index 641809d5..cb9a1ba0 100644 --- a/nflg-wms-admin/src/main/resources/template/外协领料单.html +++ b/nflg-wms-admin/src/main/resources/template/外协领料单.html @@ -138,7 +138,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
委外发货清单
diff --git a/nflg-wms-admin/src/main/resources/template/成本中心退料单.html b/nflg-wms-admin/src/main/resources/template/成本中心退料单.html index 876f7c4d..8f1c0095 100644 --- a/nflg-wms-admin/src/main/resources/template/成本中心退料单.html +++ b/nflg-wms-admin/src/main/resources/template/成本中心退料单.html @@ -138,7 +138,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
部门退料单
diff --git a/nflg-wms-admin/src/main/resources/template/成本中心领料单.html b/nflg-wms-admin/src/main/resources/template/成本中心领料单.html index ffa3e79c..52822fb7 100644 --- a/nflg-wms-admin/src/main/resources/template/成本中心领料单.html +++ b/nflg-wms-admin/src/main/resources/template/成本中心领料单.html @@ -139,7 +139,7 @@
ICO2156115651
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
部门领料单
diff --git a/nflg-wms-admin/src/main/resources/template/生产入库单.html b/nflg-wms-admin/src/main/resources/template/生产入库单.html index 62399231..5b8e46be 100644 --- a/nflg-wms-admin/src/main/resources/template/生产入库单.html +++ b/nflg-wms-admin/src/main/resources/template/生产入库单.html @@ -140,7 +140,7 @@
ICO2156115651
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
成品/半成品入库单
diff --git a/nflg-wms-admin/src/main/resources/template/生产补料单.html b/nflg-wms-admin/src/main/resources/template/生产补料单.html index e68da068..3987fd70 100644 --- a/nflg-wms-admin/src/main/resources/template/生产补料单.html +++ b/nflg-wms-admin/src/main/resources/template/生产补料单.html @@ -166,7 +166,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
补 料 单
diff --git a/nflg-wms-admin/src/main/resources/template/生产退料单.html b/nflg-wms-admin/src/main/resources/template/生产退料单.html index c1c1b6e4..e5709c50 100644 --- a/nflg-wms-admin/src/main/resources/template/生产退料单.html +++ b/nflg-wms-admin/src/main/resources/template/生产退料单.html @@ -166,7 +166,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
生产订单退料单
diff --git a/nflg-wms-admin/src/main/resources/template/生产领料出库单.html b/nflg-wms-admin/src/main/resources/template/生产领料出库单.html index d42c3e72..242c7b05 100644 --- a/nflg-wms-admin/src/main/resources/template/生产领料出库单.html +++ b/nflg-wms-admin/src/main/resources/template/生产领料出库单.html @@ -126,7 +126,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
生产订单发料单
diff --git a/nflg-wms-admin/src/main/resources/template/生产领料单.html b/nflg-wms-admin/src/main/resources/template/生产领料单.html index e19fca74..2658b335 100644 --- a/nflg-wms-admin/src/main/resources/template/生产领料单.html +++ b/nflg-wms-admin/src/main/resources/template/生产领料单.html @@ -165,7 +165,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
生产订单领料单
diff --git a/nflg-wms-admin/src/main/resources/template/转储入库单.html b/nflg-wms-admin/src/main/resources/template/转储入库单.html index 55276ace..2abfc01b 100644 --- a/nflg-wms-admin/src/main/resources/template/转储入库单.html +++ b/nflg-wms-admin/src/main/resources/template/转储入库单.html @@ -142,7 +142,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
采购入(退)库单
diff --git a/nflg-wms-admin/src/main/resources/template/转储单.html b/nflg-wms-admin/src/main/resources/template/转储单.html index fcee2c0b..6e125d91 100644 --- a/nflg-wms-admin/src/main/resources/template/转储单.html +++ b/nflg-wms-admin/src/main/resources/template/转储单.html @@ -138,7 +138,7 @@
-
福建南方路面机械有限公司
+
福建南方路面机械股份有限公司
转储单
From 508576debb993e918c4f69890dccf2c749fa6e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Sun, 28 Sep 2025 13:51:52 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feat:=20bug-765=20=E6=95=B4=E5=8D=95?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E7=9A=84=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=8F=B7=E7=A0=81=E5=90=8E=E7=9A=84=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nflg-wms-admin/src/main/resources/template/qrcode/dp-2.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nflg-wms-admin/src/main/resources/template/qrcode/dp-2.html b/nflg-wms-admin/src/main/resources/template/qrcode/dp-2.html index 327114f9..6822d204 100644 --- a/nflg-wms-admin/src/main/resources/template/qrcode/dp-2.html +++ b/nflg-wms-admin/src/main/resources/template/qrcode/dp-2.html @@ -54,7 +54,10 @@
- + From a42df50cd8c7334912944c733c66fcace6fa34fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Sun, 28 Sep 2025 16:47:40 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nflg-wms-admin/pom.xml | 10 +++++----- pom.xml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nflg-wms-admin/pom.xml b/nflg-wms-admin/pom.xml index a7a00a4e..47b7f37e 100644 --- a/nflg-wms-admin/pom.xml +++ b/nflg-wms-admin/pom.xml @@ -64,7 +64,7 @@ commons-io commons-io - 2.17.0 + 2.20.0 compile @@ -122,7 +122,7 @@ cn.idev.excel fastexcel - 1.2.0 + 1.3.0 org.springframework.retry @@ -143,16 +143,16 @@ org.redisson redisson-spring-boot-starter - 3.50.0 + 3.52.0 org.springframework.boot spring-boot-starter-validation - com.jcraft + com.github.mwiede jsch - 0.1.55 + 2.27.3 test diff --git a/pom.xml b/pom.xml index e8a5cb79..424144cc 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ 1.42.0 3.5.12 - 42.7.5 + 42.7.7 3.17.4 8.5.17 3.4.0 From 924bf4c5ffeeaf6fb5a917383eed1e1703c27820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Mon, 29 Sep 2025 10:27:49 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E5=BA=93?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=201=E3=80=81PDA=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=A0=A1=E9=AA=8C=E4=BC=98=E5=8C=96=EF=BC=9B?= =?UTF-8?q?=202=E3=80=81PC=E9=A1=B5=E9=9D=A2=E6=90=9C=E7=B4=A2=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OutPurchaseController.java | 65 ++++++++++--------- .../wms/common/pojo/vo/OutPurchaseVO.java | 51 +++++++++++++++ .../wms/common/pojo/vo/ZWM3A05ItemVO.java | 12 +++- .../mapper/WmsOutPurchaseMapper.java | 6 ++ .../service/IWmsOutPurchaseService.java | 3 +- .../impl/WmsOutPurchaseServiceImpl.java | 15 +---- .../resources/mapper/WmsOutPurchaseMapper.xml | 23 +++++++ 7 files changed, 129 insertions(+), 46 deletions(-) create mode 100644 nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/OutPurchaseVO.java diff --git a/nflg-wms-admin/src/main/java/com/nflg/wms/admin/controller/OutPurchaseController.java b/nflg-wms-admin/src/main/java/com/nflg/wms/admin/controller/OutPurchaseController.java index 6eba5233..1ed0de56 100644 --- a/nflg-wms-admin/src/main/java/com/nflg/wms/admin/controller/OutPurchaseController.java +++ b/nflg-wms-admin/src/main/java/com/nflg/wms/admin/controller/OutPurchaseController.java @@ -19,6 +19,7 @@ import com.nflg.wms.common.pojo.dto.ZWM3A06Input1DTO; import com.nflg.wms.common.pojo.dto.ZWM3A06Input2DTO; import com.nflg.wms.common.pojo.qo.OutPurchaseSearchQO; import com.nflg.wms.common.pojo.qo.zwm3A05QO; +import com.nflg.wms.common.pojo.vo.OutPurchaseVO; import com.nflg.wms.common.pojo.vo.ZWM3A05VO; import com.nflg.wms.common.util.UserUtil; import com.nflg.wms.common.util.VUtil; @@ -106,38 +107,42 @@ public class OutPurchaseController extends BaseController { item.setId(IdUtil.getSnowflakeNextId()); item.setOrderId(order.getId()); item.setNum(BigDecimal.ZERO); - it.getQrCodes().forEach(qrCode -> { - MaterialQRCodeContentDTO dto = NoUtil.getMaterialQRCodeContent(qrCode); - VUtil.trueThrowBusinessError(!StrUtil.equals(dto.getMaterialNo(), it.getMatnr())) - .throwMessage("物料" + it.getMatnr() + "与二维码不匹配"); - VUtil.trueThrowBusinessError(!check(dto, it.getCharg(), it.getSernrs())) - .throwMessage("物料" + it.getMatnr() + "包含不符合批次号和序列号的扫码记录"); - item.setNum(item.getNum().add(dto.getNum())); - records.add(new OutMaterialScanRecord() - .setSource(6) - .setSourceId(order.getId()) - .setSourceItemId(item.getId()) - .setTicketId(order.getId()) - .setTicketItemId(item.getId()) - .setMaterialNo(dto.getMaterialNo()) - .setContent(qrCode) - .setBatchNo(dto.getBatchNo()) - .setSerialNo(dto.getSerialNo()) - .setUniqNo(dto.getUniqNo()) - .setFactoryNo(item.getWerks()) - .setWarehouseNo(item.getLgort()) - .setNum(dto.getNum()) - .setUnit(it.getMeins()) - .setEbeln(order.getEbeln()) - .setEbeln(it.getEbelp()) - .setCreateBy(UserUtil.getUserName()) - .setCreateTime(Instant.now()) - ); - }); + if (CollectionUtil.isNotEmpty(it.getQrCodes())) { + it.getQrCodes().forEach(qrCode -> { + MaterialQRCodeContentDTO dto = NoUtil.getMaterialQRCodeContent(qrCode); + VUtil.trueThrowBusinessError(!StrUtil.equals(dto.getMaterialNo(), it.getMatnr())) + .throwMessage("物料" + it.getMatnr() + "与二维码不匹配"); + VUtil.trueThrowBusinessError(!check(dto, it.getCharg(), it.getSernrs())) + .throwMessage("物料" + it.getMatnr() + "包含不符合批次号和序列号的扫码记录"); + item.setNum(item.getNum().add(dto.getNum())); + records.add(new OutMaterialScanRecord() + .setSource(6) + .setSourceId(order.getId()) + .setSourceItemId(item.getId()) + .setTicketId(order.getId()) + .setTicketItemId(item.getId()) + .setMaterialNo(dto.getMaterialNo()) + .setContent(qrCode) + .setBatchNo(dto.getBatchNo()) + .setSerialNo(dto.getSerialNo()) + .setUniqNo(dto.getUniqNo()) + .setFactoryNo(item.getWerks()) + .setWarehouseNo(item.getLgort()) + .setNum(dto.getNum()) + .setUnit(it.getMeins()) + .setEbeln(order.getEbeln()) + .setEbeln(it.getEbelp()) + .setCreateBy(UserUtil.getUserName()) + .setCreateTime(Instant.now()) + ); + }); + } + VUtil.trueThrowBusinessError(it.getNum().compareTo(item.getTemng()) > 0) + .throwMessage("物料" + it.getMatnr() + "的扫码数量大于退货数量"); VUtil.trueThrowBusinessError(item.getNum().compareTo(it.getNum()) != 0) .throwMessage("物料" + it.getMatnr() + "的扫码数量不一致"); + items.add(item); if (item.getNum().compareTo(BigDecimal.ZERO) > 0) { - items.add(item); input1.add(new ZWM3A06Input1DTO() .setEbelp(it.getEbelp()) .setRetpo(it.getRetpo()) @@ -213,7 +218,7 @@ public class OutPurchaseController extends BaseController { * 搜索列表 */ @PostMapping("search") - public ApiResult> search(@Valid @RequestBody OutPurchaseSearchQO request) { + public ApiResult> search(@Valid @RequestBody OutPurchaseSearchQO request) { return ApiResult.success(outPurchaseService.search(request)); } diff --git a/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/OutPurchaseVO.java b/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/OutPurchaseVO.java new file mode 100644 index 00000000..fb5be88c --- /dev/null +++ b/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/OutPurchaseVO.java @@ -0,0 +1,51 @@ +package com.nflg.wms.common.pojo.vo; + +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public class OutPurchaseVO { + + private Long id; + + /** + * 退库单号 + */ + private String no; + + /** + * 采购凭证号 + */ + private String ebeln; + + /** + * 供应商或债权人的帐号 + */ + private String lifnr; + + /** + * 供应商或债权人名称 + */ + private String lifnrName; + + /** + * 物料凭证编号 + */ + private String matDoc; + + /** + * 物料凭证年度 + */ + private String docYear; + + /** + * 创建人 + */ + private String createBy; + + /** + * 创建时间 + */ + private LocalDateTime createTime; +} diff --git a/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/ZWM3A05ItemVO.java b/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/ZWM3A05ItemVO.java index c1fed26f..fc03597d 100644 --- a/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/ZWM3A05ItemVO.java +++ b/nflg-wms-common/src/main/java/com/nflg/wms/common/pojo/vo/ZWM3A05ItemVO.java @@ -1,13 +1,13 @@ package com.nflg.wms.common.pojo.vo; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.Data; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.util.Optional; @Data @JsonIgnoreProperties(ignoreUnknown = true) @@ -56,6 +56,7 @@ public class ZWM3A05ItemVO { /** * 退货数量 */ + @NotNull private BigDecimal temng; /** @@ -91,9 +92,14 @@ public class ZWM3A05ItemVO { /** * 实际退货数量(扫码后计算) */ - @NotNull(message = "实际退货数量不能为空") private BigDecimal num; - @NotEmpty(message = "请扫码添加物料") + public BigDecimal getNum() { + return Optional.ofNullable(num).orElse(BigDecimal.ZERO); + } + + /** + * 二维码列表 + */ private List qrCodes = new ArrayList<>(); } diff --git a/nflg-wms-repository/src/main/java/com/nflg/wms/repository/mapper/WmsOutPurchaseMapper.java b/nflg-wms-repository/src/main/java/com/nflg/wms/repository/mapper/WmsOutPurchaseMapper.java index 9fcf20ea..14770583 100644 --- a/nflg-wms-repository/src/main/java/com/nflg/wms/repository/mapper/WmsOutPurchaseMapper.java +++ b/nflg-wms-repository/src/main/java/com/nflg/wms/repository/mapper/WmsOutPurchaseMapper.java @@ -1,6 +1,10 @@ package com.nflg.wms.repository.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.nflg.wms.common.pojo.qo.OutPurchaseSearchQO; +import com.nflg.wms.common.pojo.vo.OutPurchaseVO; import com.nflg.wms.repository.entity.WmsOutPurchase; /** @@ -12,4 +16,6 @@ import com.nflg.wms.repository.entity.WmsOutPurchase; * @since 2025 */ public interface WmsOutPurchaseMapper extends BaseMapper { + + IPage search(OutPurchaseSearchQO request, Page page); } diff --git a/nflg-wms-repository/src/main/java/com/nflg/wms/repository/service/IWmsOutPurchaseService.java b/nflg-wms-repository/src/main/java/com/nflg/wms/repository/service/IWmsOutPurchaseService.java index 31fbb22f..9754ea71 100644 --- a/nflg-wms-repository/src/main/java/com/nflg/wms/repository/service/IWmsOutPurchaseService.java +++ b/nflg-wms-repository/src/main/java/com/nflg/wms/repository/service/IWmsOutPurchaseService.java @@ -3,6 +3,7 @@ package com.nflg.wms.repository.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.nflg.wms.common.pojo.qo.OutPurchaseSearchQO; +import com.nflg.wms.common.pojo.vo.OutPurchaseVO; import com.nflg.wms.repository.entity.WmsOutPurchase; import jakarta.validation.Valid; @@ -16,5 +17,5 @@ import jakarta.validation.Valid; */ public interface IWmsOutPurchaseService extends IService { - IPage search(@Valid OutPurchaseSearchQO request); + IPage search(@Valid OutPurchaseSearchQO request); } diff --git a/nflg-wms-repository/src/main/java/com/nflg/wms/repository/service/impl/WmsOutPurchaseServiceImpl.java b/nflg-wms-repository/src/main/java/com/nflg/wms/repository/service/impl/WmsOutPurchaseServiceImpl.java index 28cea0b7..70a9dec5 100644 --- a/nflg-wms-repository/src/main/java/com/nflg/wms/repository/service/impl/WmsOutPurchaseServiceImpl.java +++ b/nflg-wms-repository/src/main/java/com/nflg/wms/repository/service/impl/WmsOutPurchaseServiceImpl.java @@ -1,17 +1,15 @@ package com.nflg.wms.repository.service.impl; -import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.nflg.wms.common.pojo.qo.OutPurchaseSearchQO; +import com.nflg.wms.common.pojo.vo.OutPurchaseVO; import com.nflg.wms.repository.entity.WmsOutPurchase; import com.nflg.wms.repository.mapper.WmsOutPurchaseMapper; import com.nflg.wms.repository.service.IWmsOutPurchaseService; import org.springframework.stereotype.Service; -import java.util.Objects; - /** *

* 退库-采购中心退库 服务实现类 @@ -23,14 +21,7 @@ import java.util.Objects; public class WmsOutPurchaseServiceImpl extends ServiceImpl implements IWmsOutPurchaseService { @Override - public IPage search(OutPurchaseSearchQO request) { - return lambdaQuery() - .eq(StrUtil.isNotBlank(request.getNo()), WmsOutPurchase::getNo, request.getNo()) - .eq(StrUtil.isNotBlank(request.getEbeln()), WmsOutPurchase::getEbeln, request.getEbeln()) - .eq(StrUtil.isNotBlank(request.getLifnr()), WmsOutPurchase::getLifnr, request.getLifnr()) - .ge(Objects.nonNull(request.getStartDate()), WmsOutPurchase::getCreateTime, request.getStartDate()) - .le(Objects.nonNull(request.getEndDate()), WmsOutPurchase::getCreateTime, request.getEndDate()) - .orderByDesc(WmsOutPurchase::getId) - .page(new Page<>(request.getPage(), request.getPageSize())); + public IPage search(OutPurchaseSearchQO request) { + return baseMapper.search(request, new Page<>(request.getPage(), request.getPageSize())); } } diff --git a/nflg-wms-repository/src/main/resources/mapper/WmsOutPurchaseMapper.xml b/nflg-wms-repository/src/main/resources/mapper/WmsOutPurchaseMapper.xml index 0fa61367..93258682 100644 --- a/nflg-wms-repository/src/main/resources/mapper/WmsOutPurchaseMapper.xml +++ b/nflg-wms-repository/src/main/resources/mapper/WmsOutPurchaseMapper.xml @@ -1,4 +1,27 @@ + +

+ +
20250227100950-0
+
SAP编码: