From 5d46e8fd43b6b5d25845f1c7aa8b519e61ab2833 Mon Sep 17 00:00:00 2001 From: mengjiao <3338049200@qq,com> Date: Fri, 24 May 2024 09:26:17 +0800 Subject: [PATCH] =?UTF-8?q?wms=E5=8C=85=E6=9D=90=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9---=E4=B8=80=E4=B8=AA=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=89=A9=E6=96=99=E7=99=BB=E8=AE=B0=EF=BC=8C?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=99=BB=E8=AE=B0=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WmsToWCSmissionController.java | 19 +++++++ .../com/op/wms/domain/OdsProcureOrder.java | 22 ++++++++ .../op/wms/mapper/OdsProcureOrderMapper.java | 2 + .../wms/service/IOdsProcureOrderService.java | 2 + .../impl/OdsProcureOrderServiceImpl.java | 52 ++++++++++++------- .../mapper/wms/OdsProcureOrderMapper.xml | 10 +++- 6 files changed, 86 insertions(+), 21 deletions(-) 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 91f224bd..21ebcbbd 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 @@ -133,6 +133,22 @@ public class WmsToWCSmissionController { String result = odsProcureOrderService.ArrivalRegistration(odsProcureOrder); return success(result); } + + + + /** + * 到货登记--用的于查询,,入参--采购单,物料,行项目 + * @param odsProcureOrder + * @return + */ + @PostMapping("/selectArrivalRegistration") + public AjaxResult selectArrivalRegistration(@RequestBody OdsProcureOrder odsProcureOrder) { +// odsProcureOrderService.PurchaseOrderdeliPdas(odsProcureOrder); +// return success(); + OdsProcureOrder order = odsProcureOrderService.selectArrivalRegistration(odsProcureOrder); + return success(order); + } + /** * 手持 --包材采购单采购收货查询总共已经收货数量 */ @@ -573,4 +589,7 @@ public class WmsToWCSmissionController { return success(odsProductEmbryoInventoryCorrelationList); } + + + } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOrder.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOrder.java index 9d4f895e..5b5ae668 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOrder.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOrder.java @@ -27,6 +27,28 @@ public class OdsProcureOrder extends BaseEntity { @Excel(name = "工厂编码") private String factoryCode; List list; + /** + * 已登记数量 + */ + + private BigDecimal operationNumber; + private BigDecimal czNumber; + + public BigDecimal getCzNumber() { + return czNumber; + } + + public void setCzNumber(BigDecimal czNumber) { + this.czNumber = czNumber; + } + + public BigDecimal getOperationNumber() { + return operationNumber; + } + + public void setOperationNumber(BigDecimal operationNumber) { + this.operationNumber = operationNumber; + } public List getList() { return list; diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOrderMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOrderMapper.java index 40e8581a..dad24ecb 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOrderMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOrderMapper.java @@ -64,4 +64,6 @@ public interface OdsProcureOrderMapper { String selectBaseSupplier(OdsProcureOrder odsProcureOrder); List selectOdsProcureOrderAlreadyList(OdsProcureOrder odsProcureOrder); + + void updateOdsProcureOrderAddOperationNumber(OdsProcureOrder odsProcureOrder); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java index 0e5e8d46..fb780109 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsProcureOrderService.java @@ -99,4 +99,6 @@ public interface IOdsProcureOrderService { String PurchaseOrderdeliPdaConfirm(OdsProcureOrder odsProcureOrder); String ArrivalRegistration(OdsProcureOrder odsProcureOrder); + + OdsProcureOrder selectArrivalRegistration(OdsProcureOrder odsProcureOrder); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java index abbf8a09..52db3a3f 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOrderServiceImpl.java @@ -733,32 +733,44 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService { OdsProcureOrder order=new OdsProcureOrder(); order.setProcureCode(odsProcureOrder.getProcureCode()); order.setActive("1"); - List orderList= odsProcureOrderMapper.selectOdsProcureOrderList(order); - for (OdsProcureOrder order1:orderList){ - //查询这次收货信息----生成质检任务------- //插入检验集计划 - QcCheckTaskIncomeDTO qcCheckTaskIncomeDTO = new QcCheckTaskIncomeDTO(); - qcCheckTaskIncomeDTO.setCheckLoc("mjtest"); - qcCheckTaskIncomeDTO.setCheckType("checkTypeLL"); + OdsProcureOrder order1= odsProcureOrderMapper.selectOdsProcureOrderByID(odsProcureOrder.getID()); + + //查询这次收货信息----生成质检任务------- //插入检验集计划 + QcCheckTaskIncomeDTO qcCheckTaskIncomeDTO = new QcCheckTaskIncomeDTO(); + qcCheckTaskIncomeDTO.setCheckLoc("mjtest"); + qcCheckTaskIncomeDTO.setCheckType("checkTypeLL"); // qcCheckTaskIncomeDTO.setCheckManCode("mobile"); // qcCheckTaskIncomeDTO.setCheckManName("手持测试用户"); - qcCheckTaskIncomeDTO.setSupplierCode(order1.getSupplierCode()); - String name = odsProcureOrderMapper.selectBaseSupplier(order1); - qcCheckTaskIncomeDTO.setSupplierName(name); - qcCheckTaskIncomeDTO.setOrderType("8040");//包材固定码 - qcCheckTaskIncomeDTO.setUnit(order1.getUnit()); - qcCheckTaskIncomeDTO.setFactoryCode(odsProcureOrder.getFactoryCode()); - qcCheckTaskIncomeDTO.setQuality(order1.getPlanNumber()); - qcCheckTaskIncomeDTO.setMaterialCode(order1.getMaterialCode()); - qcCheckTaskIncomeDTO.setMaterialName(order1.getMaterialDesc()); - // qcCheckTaskIncomeDTO.setIncomeBatchNo(order.getUserDefined2()); - qcCheckTaskIncomeDTO.setOrderNo(order1.getProcureCode()); - qcCheckTaskIncomeDTO.setIncomeTime(new Date()); - remoteQualityService.createIncomeTask(qcCheckTaskIncomeDTO); + qcCheckTaskIncomeDTO.setSupplierCode(order1.getSupplierCode()); + String name = odsProcureOrderMapper.selectBaseSupplier(order1); + qcCheckTaskIncomeDTO.setSupplierName(name); + qcCheckTaskIncomeDTO.setOrderType("8040");//包材固定码 + qcCheckTaskIncomeDTO.setUnit(order1.getUnit()); + qcCheckTaskIncomeDTO.setFactoryCode(odsProcureOrder.getFactoryCode()); + qcCheckTaskIncomeDTO.setQuality(odsProcureOrder.getCzNumber());//操作数量 + qcCheckTaskIncomeDTO.setMaterialCode(order1.getMaterialCode()); + qcCheckTaskIncomeDTO.setMaterialName(order1.getMaterialDesc()); + // qcCheckTaskIncomeDTO.setIncomeBatchNo(order.getUserDefined2()); + qcCheckTaskIncomeDTO.setOrderNo(order1.getProcureCode()); + qcCheckTaskIncomeDTO.setIncomeTime(new Date()); + R ruslt= remoteQualityService.createIncomeTask(qcCheckTaskIncomeDTO); +// 成功后修改-- + if (ruslt.getCode()==200){//成功 + odsProcureOrderMapper.updateOdsProcureOrderAddOperationNumber(odsProcureOrder); + }else { + result="操作失败"; } -// return result; } + @Override + public OdsProcureOrder selectArrivalRegistration(OdsProcureOrder odsProcureOrder) { + //采购单,物料,行项目 + DynamicDataSourceContextHolder.push("ds_" + odsProcureOrder.getFactoryCode()); + OdsProcureOrder order= odsProcureOrderMapper.selectOdsProcureOrderByID(odsProcureOrder.getID()); + return order; + } + public String DesignatedPalletOutboundWCS(WMSDesignatedPalle wmsDesignatedPalle) { // 定义请求的URL地址 String url = "http://192.168.202.37:9001/api/v1/ReceiveMesMsg/packingMaterialsOutBoundByPallet"; diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOrderMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOrderMapper.xml index 562f6911..d924174f 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOrderMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOrderMapper.xml @@ -36,10 +36,11 @@ + - select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit,COALESCE(Reality_Number, 0) Reality_Number, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code from ods_procure_order + select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit,COALESCE(Reality_Number, 0) Reality_Number, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code, COALESCE(Operation_Number, 0) Operation_Number from ods_procure_order + + update ods_procure_order + SET Operation_Number = COALESCE(Operation_Number, 0) + #{czNumber}, + Last_Update_By = #{lastUpdateBy}, + Last_Update_Date = now() + where ID = #{ID} +