From 53359c95561fa89d698ba1885f9f242d7c9ad67e Mon Sep 17 00:00:00 2001 From: mengjiao <3338049200@qq,com> Date: Thu, 9 Jan 2025 10:17:05 +0800 Subject: [PATCH] =?UTF-8?q?wms=E6=89=8B=E6=8C=81=E6=8E=A5=E5=8F=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WmsSellOutEmbryoController.java | 5 ++ .../controller/WmsToWCSmissionController.java | 2 +- .../op/wms/mapper/WmsSellOutEmbryoMapper.java | 4 + .../impl/WmsProductPutServiceImpl.java | 8 +- .../impl/WmsSellOutEmbryoServiceImpl.java | 8 ++ .../mapper/wms/WmsFpStorageNewsSnMapper.xml | 2 +- .../mapper/wms/WmsSellOutEmbryoMapper.xml | 90 ++++++++++++++++++- 7 files changed, 112 insertions(+), 7 deletions(-) diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsSellOutEmbryoController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsSellOutEmbryoController.java index f80fdf82..59babba3 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsSellOutEmbryoController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsSellOutEmbryoController.java @@ -103,6 +103,11 @@ public class WmsSellOutEmbryoController extends BaseController { return toAjax(wmsSellOutEmbryoService.updateWmsSellOutEmbryo(wmsSellOutEmbryo)); } + @Log(title = "成品销售出库", businessType = BusinessType.UPDATE) + @PostMapping("/editRE") + public AjaxResult editRE(@RequestBody WmsSellOutEmbryo wmsSellOutEmbryo) { + return toAjax(wmsSellOutEmbryoService.updateWmsSellOutEmbryoRE(wmsSellOutEmbryo)); + } /** * 删除成品销售出库 */ diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java index db7e7ed4..56535d18 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java @@ -484,7 +484,7 @@ public class WmsToWCSmissionController { return AjaxResult.success(wmsProductPutService.confirmFinishedProductSales(wmsSellOutEmbryo)); } /** - * 成品销售出库--确认接口 + * 成品特殊出库--确认接口 * */ @PostMapping("/confirmFinishedProductSalesTS") diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsSellOutEmbryoMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsSellOutEmbryoMapper.java index 4a73bf75..bebefa80 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsSellOutEmbryoMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsSellOutEmbryoMapper.java @@ -99,4 +99,8 @@ public interface WmsSellOutEmbryoMapper { public int insertWmsSellOutEmbryoOrder(WmsSellOutEmbryo wmsSellOutEmbryo); public String selectwmsFpStorageNewsTS(String formattedDate); + + int updateWmsSellOutEmbryoRE(WmsSellOutEmbryo wmsSellOutEmbryo); + + public WmsSellOutEmbryo selectWmsSellOutEmbryoByIdRE(String id); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java index 146b19e3..80fc29e3 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java @@ -854,7 +854,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { List wmsFpStorageNewsSns = wmsSellOutEmbryo.getWmsFpStorageNewsSns(); for (WmsFpStorageNewsSn wmsFpStorageNewsSn: wmsFpStorageNewsSns) { - WmsSellOutEmbryo wmsSellOutEmbryo1 = wmsSellOutEmbryoMapper.selectWmsSellOutEmbryoById(wmsSellOutEmbryo.getId()); + WmsSellOutEmbryo wmsSellOutEmbryo1 = wmsSellOutEmbryoMapper.selectWmsSellOutEmbryoByIdRE(wmsSellOutEmbryo.getId()); BigDecimal OutQuantity= wmsSellOutEmbryo1.getOutQuantity().add(wmsFpStorageNewsSn.getAmount());//已出加操作 int result = wmsSellOutEmbryo1.getPlanQuantity().compareTo(OutQuantity); WmsSellOutEmbryo wmsSellOutEmbryoUpdate=new WmsSellOutEmbryo(); @@ -865,10 +865,10 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { } wmsSellOutEmbryoUpdate.setId(wmsSellOutEmbryo.getId()); wmsSellOutEmbryoUpdate.setOutQuantity(OutQuantity); - wmsSellOutEmbryoMapper.updateWmsSellOutEmbryo(wmsSellOutEmbryoUpdate); + wmsSellOutEmbryoMapper.updateWmsSellOutEmbryoRE(wmsSellOutEmbryoUpdate); WmsFpStorageNewsSn wmsFpStorageNewsSn1=new WmsFpStorageNewsSn(); wmsFpStorageNewsSn1.setStorageId(wmsFpStorageNewsSn.getStorageId()); - wmsFpStorageNewsSn1.setUserDefined2(wmsFpStorageNewsSn.getAmount().toString()); + wmsFpStorageNewsSn1.setAmount(wmsFpStorageNewsSn.getAmount()); wmsFpStorageNewsSn1.setActiveFlag("1"); wmsFpStorageNewsSn1.setProductCode(wmsSellOutEmbryo1.getProductCode()); wmsFpStorageNewsSnMapper.updateWmsFpStorageNewsSnOut(wmsFpStorageNewsSn1); @@ -890,7 +890,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { wmsFpStorageNewsSn3.setAmount(wmsFpStorageNewsSn.getAmount()); wmsFpStorageNewsSn3.setBarCode(wmsSellOutEmbryo.getId()); wmsFpStorageNewsSn3.setFactoryCode(wmsSellOutEmbryo.getFactoryCode()); - wmsFpStorageNewsSnMapper.insertWmsFpStorageNewsSnRecords(wmsFpStorageNewsSn3); + wmsFpStorageNewsSnMapper.insertWmsFpStorageNewsSnRecords(wmsFpStorageNewsSn3);//出库明细记录 WmsFpStorageNews wmsFpStorageNews=new WmsFpStorageNews(); wmsFpStorageNews.setActiveFlag("1"); wmsFpStorageNews.setWlCode(wmsFpStorageNewsSn2.getWlCode()); diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsSellOutEmbryoServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsSellOutEmbryoServiceImpl.java index 4896e75d..359c7708 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsSellOutEmbryoServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsSellOutEmbryoServiceImpl.java @@ -212,6 +212,14 @@ public class WmsSellOutEmbryoServiceImpl implements IWmsSellOutEmbryoService { return wmsSellOutEmbryoMapper.selectWmsSellOutEmbryoREListTS(wmsSellOutEmbryo); } + @Override + @DS("#header.poolName") + public int updateWmsSellOutEmbryoRE(WmsSellOutEmbryo wmsSellOutEmbryo) { + //todo 需要修改 + wmsSellOutEmbryo.setUpdateTime(DateUtils.getNowDate()); + return wmsSellOutEmbryoMapper.updateWmsSellOutEmbryoRE(wmsSellOutEmbryo); + } + public List dayin( ) { // 定义请求的URL地址 diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsFpStorageNewsSnMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsFpStorageNewsSnMapper.xml index b72a035f..0f042730 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsFpStorageNewsSnMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsFpStorageNewsSnMapper.xml @@ -374,7 +374,7 @@ UPDATE wms_fp_storage_news_sn - SET user_defined2 = COALESCE(user_defined2, 0) + #{userDefined2} -- 如果user_defined2为NULL,则先将其设置为0再进行加法 + SET amount = COALESCE(amount, 0) - #{amount} -- 如果user_defined2为NULL,则先将其设置为0再进行加法 WHERE storage_id = #{storageId} AND active_flag = '1'; diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsSellOutEmbryoMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsSellOutEmbryoMapper.xml index 2d082062..3989866e 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsSellOutEmbryoMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsSellOutEmbryoMapper.xml @@ -285,6 +285,7 @@ and attr8 = #{attr8} and attr9 = #{attr9} and attr10 = #{attr10} + and id = #{id} ORDER BY stock_order DESC @@ -292,7 +293,50 @@ where id = #{id} - +