From ff9b1c3cb985fee32ed2680fbef15e3061ce7285 Mon Sep 17 00:00:00 2001 From: mengjiao <3338049200@qq,com> Date: Tue, 12 Mar 2024 10:22:30 +0800 Subject: [PATCH] =?UTF-8?q?wms=E7=99=BD=E5=9D=AF=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WmsToWCSmissionController.java | 22 +++++++++ .../wms/mapper/WmsOdsEmStorageNewsMapper.java | 2 + .../wms/service/IOdsWhiteEmbryoService.java | 10 ++++ .../impl/OdsWhiteEmbryoServiceImpl.java | 49 +++++++++++++++++++ .../mapper/wms/WmsOdsEmStorageNewsMapper.xml | 10 ++++ 5 files changed, 93 insertions(+) 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 46245b83..b571ce8d 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 @@ -301,4 +301,26 @@ public class WmsToWCSmissionController { String result= iOdsWhiteEmbryoService.WhiteWarehouseDump(wmsOdsEmStorageNewsSn); return success(result); } + + + + + @PostMapping("/queryMaterialInfor") + public AjaxResult queryMaterialInfor(@RequestBody WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) { + // OdsProcureOutOrder orderList = odsProcureOrderService.PurchaseOrderOutboundPda(odsProcureOrder); + WmsOdsEmStorageNews wmsOdsEmStorageNews= iOdsWhiteEmbryoService.queryMaterialInfor(wmsOdsEmStorageNewsSn); + return success(wmsOdsEmStorageNews); + } + /** + * 用于白坯退货确认- + * + * @param wmsOdsEmStorageNewsSn + * @return + */ + @PostMapping("/WhiteBilletReturnConfir") + public AjaxResult WhiteBilletReturnConfir(@RequestBody WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) { + // OdsProcureOutOrder orderList = odsProcureOrderService.PurchaseOrderOutboundPda(odsProcureOrder); + String result= iOdsWhiteEmbryoService.WhiteBilletReturnConfir(wmsOdsEmStorageNewsSn); + return success(result); + } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java index ca5e7e87..122cb5b7 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java @@ -63,4 +63,6 @@ public interface WmsOdsEmStorageNewsMapper { void updateAdd(WmsOdsEmStorageNews wmsOdsEmStorageNews); WmsOdsEmStorageNews selectWmsOdsEmStorageNewsByWlCode(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn); + + List selectWmsOdsEmStorageNewsByMaterialCode(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsWhiteEmbryoService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsWhiteEmbryoService.java index 51d311e9..b479ea17 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsWhiteEmbryoService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsWhiteEmbryoService.java @@ -4,6 +4,7 @@ import java.util.List; import com.op.wms.domain.OdsProcureOutOrder; import com.op.wms.domain.OdsWhiteEmbryo; +import com.op.wms.domain.WmsOdsEmStorageNews; import com.op.wms.domain.WmsOdsEmStorageNewsSn; /** @@ -68,4 +69,13 @@ public interface IOdsWhiteEmbryoService { String WhiteEmbryoOutbound(OdsWhiteEmbryo odsWhiteEmbryo); String WhiteWarehouseDump(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn); + + /** + * + * @param wmsOdsEmStorageNewsSn + * @return + */ + String WhiteBilletReturnConfir(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn); + + WmsOdsEmStorageNews queryMaterialInfor(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsWhiteEmbryoServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsWhiteEmbryoServiceImpl.java index 6b023800..e1f84d17 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsWhiteEmbryoServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsWhiteEmbryoServiceImpl.java @@ -265,4 +265,53 @@ public class OdsWhiteEmbryoServiceImpl implements IOdsWhiteEmbryoService { } return result; } + + @Override + public String WhiteBilletReturnConfir(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) { + //退货的--在生产线上退下来的--托盘号,库位,物料号,物料描述,退货数量 + String result="成功"; + WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn1=new WmsOdsEmStorageNewsSn(); + wmsOdsEmStorageNewsSn1.setAmount(wmsOdsEmStorageNewsSn.getAmount()); + wmsOdsEmStorageNewsSn1.setWlCode(wmsOdsEmStorageNewsSn.getWlCode()); + wmsOdsEmStorageNewsSn1.setMaterialCode(wmsOdsEmStorageNewsSn.getMaterialCode()); + wmsOdsEmStorageNewsSn1.setMaterialDesc(wmsOdsEmStorageNewsSn.getMaterialDesc()); + wmsOdsEmStorageNewsSn1.setSn(wmsOdsEmStorageNewsSn.getSn()); + wmsOdsEmStorageNewsSn1.setCreateBy(wmsOdsEmStorageNewsSn.getCreateBy()); + wmsOdsEmStorageNewsSn1.setGmtCreate(new Date()); + wmsOdsEmStorageNewsSn1.setActiveFlag("1"); + wmsOdsEmStorageNewsSn1.setFactoryCode(wmsOdsEmStorageNewsSn.getFactoryCode()); + wmsOdsEmStorageNewsSnMapper.insertWmsOdsEmStorageNewsSn(wmsOdsEmStorageNewsSn1); + WmsOdsEmStorageNews wmsOdsEmStorageNews1=new WmsOdsEmStorageNews(); + + wmsOdsEmStorageNews1.setWlCode(wmsOdsEmStorageNewsSn.gettOwlCode()); + wmsOdsEmStorageNews1.setMaterialCode(wmsOdsEmStorageNewsSn.getMaterialCode()); + wmsOdsEmStorageNews1.setMaterialDesc(wmsOdsEmStorageNewsSn.getMaterialDesc()); + wmsOdsEmStorageNews1.setUserDefined1(wmsOdsEmStorageNewsSn.getUserDefined1()); + wmsOdsEmStorageNews1.setFactoryCode(wmsOdsEmStorageNewsSn.getFactoryCode()); + wmsOdsEmStorageNews1.setActiveFlag("1"); + List wmsOdsEmStorageNewsList= wmsOdsEmStorageNewsMapper.selectWmsOdsEmStorageNewsList(wmsOdsEmStorageNews1); + if (wmsOdsEmStorageNewsList.size()>0){ + WmsOdsEmStorageNews wmsOdsEmStorageNews2= wmsOdsEmStorageNewsList.get(0); + BigDecimal newAmount= wmsOdsEmStorageNews2.getAmount(); + wmsOdsEmStorageNews2.setAmount(newAmount.add(wmsOdsEmStorageNewsSn.getAmount())); + wmsOdsEmStorageNewsMapper.updateWmsOdsEmStorageNews(wmsOdsEmStorageNews2); + }else { + wmsOdsEmStorageNews1.setStorageId(IdUtils.fastSimpleUUID()); + wmsOdsEmStorageNews1.setCreateBy(wmsOdsEmStorageNewsSn.getCreateBy()); + wmsOdsEmStorageNews1.setGmtCreate(new Date()); + wmsOdsEmStorageNewsMapper.insertWmsOdsEmStorageNews(wmsOdsEmStorageNews1); + } + return result; + } + + @Override + public WmsOdsEmStorageNews queryMaterialInfor(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) { + DynamicDataSourceContextHolder.push("ds_" + wmsOdsEmStorageNewsSn.getFactoryCode()); + WmsOdsEmStorageNews wmsOdsEmStorageNew=new WmsOdsEmStorageNews(); + List wmsOdsEmStorageNews= wmsOdsEmStorageNewsMapper.selectWmsOdsEmStorageNewsByMaterialCode(wmsOdsEmStorageNewsSn); + if (wmsOdsEmStorageNews.size()>0){ + wmsOdsEmStorageNew=wmsOdsEmStorageNews.get(0); + } + return wmsOdsEmStorageNew; + } } diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml index c369e8b5..29c6749c 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml @@ -222,4 +222,14 @@ WHERE wl_code=#{wlCode} AND material_code=#{materialCode} AND active_flag='1' +