From f33f28d00ec72296b9cc1e4bbfd2c62c0e201742 Mon Sep 17 00:00:00 2001 From: mengjiao <3338049200@qq,com> Date: Tue, 7 May 2024 16:16:13 +0800 Subject: [PATCH] =?UTF-8?q?wms=E6=88=90=E5=93=81=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B937?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OdsProductEmbryoInventoryController.java | 23 +++++ .../OdsProductEmbryoInventoryCorrelation.java | 9 ++ .../OdsProductEmbryoInventoryMapper.java | 2 + .../IOdsProductEmbryoInventoryService.java | 4 + .../OdsProductEmbryoInventoryServiceImpl.java | 39 ++++++++ .../wms/OdsProductEmbryoInventoryMapper.xml | 95 +++++++++++++++++++ 6 files changed, 172 insertions(+) diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/OdsProductEmbryoInventoryController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/OdsProductEmbryoInventoryController.java index c87ad567..faafbdb1 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/OdsProductEmbryoInventoryController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/OdsProductEmbryoInventoryController.java @@ -23,6 +23,8 @@ import com.op.common.core.web.domain.AjaxResult; import com.op.common.core.utils.poi.ExcelUtil; import com.op.common.core.web.page.TableDataInfo; +import static com.op.common.core.web.domain.AjaxResult.success; + /** * 成品盘点单Controller * @@ -86,7 +88,28 @@ public class OdsProductEmbryoInventoryController extends BaseController { public AjaxResult addOdsProductEmbryoInventory(@RequestBody OdsProductEmbryoInventory odsProductEmbryoInventory) { return success(odsProductEmbryoInventoryService.addOdsProductEmbryoInventory(odsProductEmbryoInventory)); } + /** + * 调整盘点单 + * @param odsProductEmbryoInventoryCorrelationList + * @return + */ + @PostMapping("/AdjustInventoryList") + public AjaxResult AdjustInventoryList(@RequestBody List odsProductEmbryoInventoryCorrelationList) { + String relust= odsProductEmbryoInventoryService.AdjustInventoryList(odsProductEmbryoInventoryCorrelationList); + return success(relust); + } + + /** + * 获取盘点单的关联信息 + * @param odsProductEmbryoInventory + * @return + */ + @PostMapping("/selectObtainTheAssociated") + public AjaxResult selectObtainTheAssociated(@RequestBody OdsProductEmbryoInventory odsProductEmbryoInventory) { + List odsProductEmbryoInventoryCorrelationList= odsProductEmbryoInventoryService.selectObtainTheAssociated(odsProductEmbryoInventory); + return success(odsProductEmbryoInventoryCorrelationList); + } /** * 修改成品盘点单 */ diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProductEmbryoInventoryCorrelation.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProductEmbryoInventoryCorrelation.java index bf982fa5..2932e098 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProductEmbryoInventoryCorrelation.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProductEmbryoInventoryCorrelation.java @@ -38,6 +38,15 @@ private static final long serialVersionUID=1L; @Excel(name = "关联的盘点单号") private String orderCode; private String wlCode; + private String adjustmentAmount; + + public String getAdjustmentAmount() { + return adjustmentAmount; + } + + public void setAdjustmentAmount(String adjustmentAmount) { + this.adjustmentAmount = adjustmentAmount; + } public String getWlCode() { return wlCode; diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProductEmbryoInventoryMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProductEmbryoInventoryMapper.java index 20247eee..9913e785 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProductEmbryoInventoryMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProductEmbryoInventoryMapper.java @@ -65,4 +65,6 @@ public interface OdsProductEmbryoInventoryMapper { List selectOdsProductEmbryoInventoryCorrelationList(OdsProductEmbryoInventory odsProductEmbryoInventory2); public int updateOdsProductEmbryoInventoryCorrelation(OdsProductEmbryoInventory odsProductEmbryoInventory1); + + public int updateOdsProductEmbryoInventoryByOrderCode(OdsProductEmbryoInventory odsProductEmbryoInventory1); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProductEmbryoInventoryService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProductEmbryoInventoryService.java index 5d92b172..3dd19aca 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProductEmbryoInventoryService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProductEmbryoInventoryService.java @@ -73,4 +73,8 @@ public interface IOdsProductEmbryoInventoryService { String confirmCompletion(OdsProductEmbryoInventory odsProductEmbryoInventory); List selectOdsProductEmbryoInventoryCorrelation(OdsProductEmbryoInventory odsProductEmbryoInventory); + + List selectObtainTheAssociated(OdsProductEmbryoInventory odsProductEmbryoInventory); + + String AdjustInventoryList(List odsProductEmbryoInventoryCorrelationList); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProductEmbryoInventoryServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProductEmbryoInventoryServiceImpl.java index a54c1b93..d1c8c23a 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProductEmbryoInventoryServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProductEmbryoInventoryServiceImpl.java @@ -267,6 +267,45 @@ public class OdsProductEmbryoInventoryServiceImpl implements IOdsProductEmbryoIn return odsProductEmbryoInventoryCorrelationList; } + @Override + @DS("#header.poolName") + public List selectObtainTheAssociated(OdsProductEmbryoInventory odsProductEmbryoInventory) { +// DynamicDataSourceContextHolder.push("ds_" + odsProductEmbryoInventory.getSiteCode()); + OdsProductEmbryoInventory odsProductEmbryoInventory1=new OdsProductEmbryoInventory(); +// odsProductEmbryoInventory1.setOrderStatus("1"); + odsProductEmbryoInventory1.setOrderCode(odsProductEmbryoInventory.getOrderCode()); + odsProductEmbryoInventory1.setActive("1"); + List odsProductEmbryoInventoryCorrelationList= odsProductEmbryoInventoryMapper.selectOdsProductEmbryoInventoryCorrelationList(odsProductEmbryoInventory1); + return odsProductEmbryoInventoryCorrelationList; + } + + @Override + @DS("#header.poolName") + public String AdjustInventoryList(List odsProductEmbryoInventoryCorrelationList) { + String result="调整成功"; + OdsProductEmbryoInventory odsProductEmbryoInventory1=new OdsProductEmbryoInventory(); + //修改为调整| + OdsProductEmbryoInventoryCorrelation odsProductEmbryoInventoryCorrelation= odsProductEmbryoInventoryCorrelationList.get(0); + odsProductEmbryoInventory1.setOrderCode(odsProductEmbryoInventoryCorrelation.getOrderCode()); + odsProductEmbryoInventory1.setOrderStatus("4");//4是待审核 + odsProductEmbryoInventory1.setUserDefined6(SecurityUtils.getUsername()); + odsProductEmbryoInventory1.setUserDefined7(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); + odsProductEmbryoInventory1.setLastUpdateDate(new Date()); + odsProductEmbryoInventory1.setLastUpdateBy(SecurityUtils.getUsername()); + odsProductEmbryoInventoryMapper.updateOdsProductEmbryoInventoryByOrderCode(odsProductEmbryoInventory1); + //插入调整数量 + for (OdsProductEmbryoInventoryCorrelation odsProductEmbryoInventoryCorrelation1:odsProductEmbryoInventoryCorrelationList){ + OdsProductEmbryoInventory odsProductEmbryoInventory11=new OdsProductEmbryoInventory(); + odsProductEmbryoInventory11.setID(odsProductEmbryoInventoryCorrelation1.getID()); + odsProductEmbryoInventory11.setUserDefined4(odsProductEmbryoInventoryCorrelation1.getAdjustmentAmount()); + odsProductEmbryoInventory11.setLastUpdateDate(new Date()); + odsProductEmbryoInventory11.setLastUpdateBy(SecurityUtils.getUsername()); + odsProductEmbryoInventoryMapper.updateOdsProductEmbryoInventoryCorrelation(odsProductEmbryoInventory11); + } + + return result; + } + @DS("#header.poolName") private String getPurcode(String factorycode, String orderType) { diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProductEmbryoInventoryMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProductEmbryoInventoryMapper.xml index 42eb0fb5..b4bc964b 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProductEmbryoInventoryMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProductEmbryoInventoryMapper.xml @@ -748,4 +748,99 @@ where ID = #{ID} + + + update ods_product_embryo_inventory + + Site_code = + #{siteCode}, + + Order_Code = + #{orderCode}, + + Material_Code = + #{materialCode}, + + Material_Desc = + #{materialDesc}, + + Plan_Date = + #{planDate}, + + Loc_Number = + #{locNumber}, + + Unit = + #{Unit}, + + Reality_Number = + #{realityNumber}, + + Order_Status = + #{orderStatus}, + + User_Defined1 = + #{userDefined1}, + + Loc_Code = + #{locCode}, + + User_Defined2 = + #{userDefined2}, + + User_Defined3 = + #{userDefined3}, + + User_Defined4 = + #{userDefined4}, + + User_Defined5 = + #{userDefined5}, + + User_Defined6 = + #{userDefined6}, + + User_Defined7 = + #{userDefined7}, + + User_Defined8 = + #{userDefined8}, + + User_Defined9 = + #{userDefined9}, + + User_Defined10 = + #{userDefined10}, + + User_Defined11 = + #{userDefined11}, + + Remark = + #{Remark}, + + Create_By = + #{createBy}, + + Create_Date = + #{createDate}, + + Last_Update_By = + #{lastUpdateBy}, + + Last_Update_Date = + #{lastUpdateDate}, + + Active = + #{Active}, + + Enterprise_Id = + #{enterpriseId}, + + Enterprise_Code = + #{enterpriseCode}, + + + where Order_Code = #{orderCode} + +