From 7fd415def96e2bc3963f2231535bf9150c4bee68 Mon Sep 17 00:00:00 2001 From: "maxw@mesnac.com" Date: Mon, 13 Jan 2025 11:12:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B0=83=E6=8B=A8=E5=8D=95?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WmsAllocateOrderController.java | 4 ++-- .../wms/domain/bo/WmsAllocateOrderBo.java | 2 +- .../wms/service/IWmsAllocateOrderService.java | 2 +- .../impl/WmsAllocateOrderServiceImpl.java | 20 +++++++++---------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsAllocateOrderController.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsAllocateOrderController.java index 4c1682d2..135ed10c 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsAllocateOrderController.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsAllocateOrderController.java @@ -76,8 +76,8 @@ public class WmsAllocateOrderController extends BaseController { @Log(title = "调拨工单", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() - public R add(@Validated(AddGroup.class) @RequestBody WmsAllocateOrderBo bo) { - return toAjax(wmsAllocateOrderService.insertByBo(bo)); + public R add(@RequestBody WmsAllocateOrderBo bo) { + return R.ok(wmsAllocateOrderService.insertByBo(bo)); } /** diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsAllocateOrderBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsAllocateOrderBo.java index f274d52b..a8433932 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsAllocateOrderBo.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsAllocateOrderBo.java @@ -85,7 +85,7 @@ public class WmsAllocateOrderBo extends BaseEntity { /** * 是否创建出库单 */ - @NotBlank(message = "是否创建出库单不能为空", groups = { AddGroup.class, EditGroup.class }) +// @NotBlank(message = "是否创建出库单不能为空", groups = { AddGroup.class, EditGroup.class }) private String createOut; /** diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsAllocateOrderService.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsAllocateOrderService.java index 67071d18..258f8b37 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsAllocateOrderService.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsAllocateOrderService.java @@ -47,7 +47,7 @@ public interface IWmsAllocateOrderService { * @param bo 调拨工单 * @return 是否新增成功 */ - Boolean insertByBo(WmsAllocateOrderBo bo); + String insertByBo(WmsAllocateOrderBo bo); /** * 修改调拨工单 diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsAllocateOrderServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsAllocateOrderServiceImpl.java index 49a98d54..4aceeaf1 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsAllocateOrderServiceImpl.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsAllocateOrderServiceImpl.java @@ -137,7 +137,7 @@ public class WmsAllocateOrderServiceImpl implements IWmsAllocateOrderService { * @return 是否新增成功 */ @Override - public Boolean insertByBo(WmsAllocateOrderBo bo) { + public String insertByBo(WmsAllocateOrderBo bo) { Date date = new Date(); SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHssmm"); String orderDate = format.format(date).substring(2); @@ -157,20 +157,20 @@ public class WmsAllocateOrderServiceImpl implements IWmsAllocateOrderService { String allocateOrder = allocate + orderDate + orderLast; WmsAllocateOrder add = MapstructUtils.convert(bo, WmsAllocateOrder.class); add.setAllocateOrderCode(allocateOrder); - if (bo.getCreateIn().equals("1")){ - allocateInOrder = allocateIn + orderDate + orderLast; - add.setInCode(allocateInOrder); - } - if (bo.getCreateOut().equals("1")){ - allocateOutOrder = allocateOut + orderDate + orderLast; - add.setOutCode(allocateOutOrder); - } +// if (bo.getCreateIn().equals("1")){ +// allocateInOrder = allocateIn + orderDate + orderLast; +// add.setInCode(allocateInOrder); +// } +// if (bo.getCreateOut().equals("1")){ +// allocateOutOrder = allocateOut + orderDate + orderLast; +// add.setOutCode(allocateOutOrder); +// } validEntityBeforeSave(add); boolean flag = baseMapper.insert(add) > 0; if (flag) { bo.setAoId(add.getAoId()); } - return flag; + return allocateOrder; } public String generateOrder(Integer value){ if (value.toString().length()<3){