From 53c81222eaf121b1c3f8b97138bd716d25fe89ad Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 25 Nov 2024 11:30:30 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E6=8C=89=E7=85=A7=E6=96=B0=E7=89=88prd=E8=B0=83=E6=95=B4:?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=E5=8D=95=E4=B8=BB=E8=A1=A8?= =?UTF-8?q?=E3=80=81=E5=AE=9E=E4=BD=93=E7=B1=BB=E3=80=81mapper.xml?= =?UTF-8?q?=E5=B1=82=E7=9A=84=E6=89=80=E6=9C=89=E6=96=B9=E6=B3=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=BE=9B=E5=BA=94=E5=95=86Id=E3=80=81=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E5=90=8D=E7=A7=B0=E3=80=81=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E4=BA=BA=E3=80=81=E8=81=94=E7=B3=BB=E7=94=B5=E8=AF=9D=E3=80=81?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E5=9C=B0=E5=9D=80=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=A7=E7=89=88=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchase/domain/PurchaseStorage.java | 44 ++++++++- .../service/IPurchaseOrderService.java | 4 - .../impl/PurchaseOrderServiceImpl.java | 92 ------------------- .../mapper/purchase/PurchaseStorageMapper.xml | 14 ++- 4 files changed, 56 insertions(+), 98 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java index 39e84c26..d70a20e7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseStorage.java @@ -56,6 +56,19 @@ public class PurchaseStorage extends BaseEntity @Excel(name = "供应商名称") private String supplierName; + + /** 联系人 */ + @Excel(name = "联系人") + private String customerContact; + + /** 联系电话 */ + @Excel(name = "联系电话") + private String contactNumber; + + /** 公司地址 */ + @Excel(name = "公司地址") + private String supplierAddress; + /** 通知已到货数量 */ @Excel(name = "通知已到货数量") private Integer notifyArrivedSum; @@ -211,7 +224,33 @@ public class PurchaseStorage extends BaseEntity { return supplierName; } - public void setNotifyArrivedSum(Integer notifyArrivedSum) + + + public String getCustomerContact() { + return customerContact; + } + + public void setCustomerContact(String customerContact) { + this.customerContact = customerContact; + } + + public String getContactNumber() { + return contactNumber; + } + + public void setContactNumber(String contactNumber) { + this.contactNumber = contactNumber; + } + + public String getSupplierAddress() { + return supplierAddress; + } + + public void setSupplierAddress(String supplierAddress) { + this.supplierAddress = supplierAddress; + } + + public void setNotifyArrivedSum(Integer notifyArrivedSum) { this.notifyArrivedSum = notifyArrivedSum; } @@ -360,6 +399,9 @@ public class PurchaseStorage extends BaseEntity .append("warehouseDeptType", getWarehouseDeptType()) .append("supplierCode", getSupplierCode()) .append("supplierName", getSupplierName()) + .append("customerContact", getCustomerContact()) + .append("contactNumber", getContactNumber()) + .append("supplierAddress", getSupplierAddress()) .append("notifyArrivedSum", getNotifyArrivedSum()) .append("actualArrivedSum", getActualArrivedSum()) .append("temporaryQualifiedSum", getTemporaryQualifiedSum()) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java index 16a70df5..37173877 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseOrderService.java @@ -96,10 +96,6 @@ public interface IPurchaseOrderService PurchaseOrder selectPurchaseOrderByOrderCode(String purchaseOrderCode); - /* - * 采购订单创建采购入库通知单 - * */ - int addPurchaseOrderStorage(WarehouseStorageOrder warehouseStorageOrder); Integer addPurchaseOrderPayable(PurchaseOrder purchaseOrder); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java index 6984762b..81640729 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java @@ -855,98 +855,6 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService } - /** - * 采购订单创建采购入库通知单 - * */ - @Override - @Transactional(rollbackFor = RuntimeException.class) - public int addPurchaseOrderStorage(WarehouseStorageOrder warehouseStorageOrder){ - WarehouseStorageOrder warehouseStorageOrder1 = new WarehouseStorageOrder(); - String relatedOrderCode = warehouseStorageOrder.getRelatedOrderCode(); - warehouseStorageOrder1.setRelatedOrderCode(relatedOrderCode); - - //关联开发修改单,修改开发修改单的状态 - ErpDevelopModifyorder developModifyorder = developModifyorderMapper.selectErpDevelopModifyorderByCode(relatedOrderCode); - if (developModifyorder != null){ - developModifyorder.setPurchaseStorageStatus("2"); - developModifyorderMapper.updateErpDevelopModifyorder(developModifyorder); - } - - List warehouseStorageOrderList = warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder1); - List list = warehouseStorageOrder.getWarehouseStorageOrderDetailList(); - //子表中通知到货数位过滤掉物料数位空 - list = list.stream().filter(e -> (e.getNotifyArriveNum() != null && e.getNotifyArriveNum() != 0)).collect(Collectors.toList()); - int result = 0; - if(!CollectionUtils.isEmpty(list)) { - //根据物料入库部门划分入库单,入库单类型:0 仓库,1 采购,生成入库单号 - List list1 = list.stream().filter(e -> ("1").equals(e.getMaterialDeptType())).collect(Collectors.toList()); - List list2 = list.stream().filter(e -> ("0").equals(e.getMaterialDeptType())).collect(Collectors.toList()); - //WarehouseStorageStatus 仓库入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库), - //WarehouseStorageType 仓库入库类型(0采购入库、1供应商补货、2委内入库、3公司退货、4委外入库、5生产入库), - //setWarehouseOrderType仓库订单类型(0采购订单、1生产订单、2退换货订单、3委外订单), - //WarehouseDeptType 仓库入库部门类型(0仓库,1采购 ), - //通知到货数1 - Integer notifyArrivedNum = 0; - Integer notifyArrivedNum1 = 0; - //通知到货数2 - if(list1.size() > 0) { - //仓库入库单,物料入库列表信息读取,放入生成的入库订单号 - String warehouseStorageCode = redisCache.generateBillNo("RK"); - for (WarehouseStorageOrderDetail warehouseStorageOrderDetail: list1) { - warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode); - warehouseStorageOrderDetail.setWarehouseStorageType("0"); - warehouseStorageOrderDetail.setMaterialDeptType("1"); - warehouseStorageOrderDetail.setWarehouseDeptType("1"); - notifyArrivedNum = notifyArrivedNum + warehouseStorageOrderDetail.getNotifyArriveNum(); - storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail); - } - warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode); - warehouseStorageOrder.setRelatedOrderCode(warehouseStorageOrder.getRelatedOrderCode()); - warehouseStorageOrder.setWarehouseStorageStatus("0"); - warehouseStorageOrder.setWarehouseQualityStatus("0"); - warehouseStorageOrder.setWarehouseStorageType("0"); - warehouseStorageOrder.setWarehouseOrderType("0"); - warehouseStorageOrder.setWarehouseDeptType("1"); - warehouseStorageOrder.setNotifyArrivedNum(notifyArrivedNum); - warehouseStorageOrder.setCreateTime(DateUtils.getNowDate()); - warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName()); - notifyArrivedNum = notifyArrivedNum + warehouseStorageOrder.getNotifyArrivedNum(); - result = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); - } - if(list2.size() > 0) { - String warehouseStorageCode1 = redisCache.generateBillNo("RK"); - //入库部门类型:采购入库单 - for (WarehouseStorageOrderDetail warehouseStorageOrderDetail: list2) { - warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode1); - warehouseStorageOrderDetail.setWarehouseStorageType("0"); - warehouseStorageOrderDetail.setMaterialDeptType("0"); - warehouseStorageOrderDetail.setWarehouseDeptType("0"); - notifyArrivedNum1 = notifyArrivedNum + warehouseStorageOrderDetail.getNotifyArriveNum(); - storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail); - } - //入库代表为仓库部分的入库单 - //WarehouseStorageStatus 仓库入库状态(0待暂收、1已暂收、2待入库、3部分入库、4全部入库), - //WarehouseStorageType 仓库入库类型(0采购入库、1供应商补货、2委内入库、3公司退货、4委外入库、5生产入库), - //setWarehouseOrderType仓库订单类型(0采购订单、1生产订单、2退换货订单、3委外订单), - //WarehouseDeptType 仓库入库部门类型(0仓库,1采购 ), - warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode1); - warehouseStorageOrder.setRelatedOrderCode(warehouseStorageOrder.getRelatedOrderCode()); - warehouseStorageOrder.setWarehouseStorageStatus("0"); - warehouseStorageOrder.setWarehouseQualityStatus("0"); - warehouseStorageOrder.setWarehouseStorageType("0"); - warehouseStorageOrder.setWarehouseOrderType("0"); - warehouseStorageOrder.setWarehouseDeptType("0"); - warehouseStorageOrder.setNotifyArrivedNum(notifyArrivedNum1); - warehouseStorageOrder.setCreateTime(DateUtils.getNowDate()); - warehouseStorageOrder.setCreateBy(ShiroUtils.getLoginName()); - warehouseStorageOrder.setWarehouseStorageOrderDetailList(list2); - result = warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); - } - } - - return result; - } - @Transactional(rollbackFor = Exception.class) @Override public Integer addPurchaseOrderPayable(PurchaseOrder purchaseOrder){ diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml index 7d31e20f..5643dffa 100644 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseStorageMapper.xml @@ -15,6 +15,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -37,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select purchase_storage_id, warehouse_storage_code, related_order_code, warehouse_storage_status, warehouse_quality_status, warehouse_storage_type, warehouse_order_type, warehouse_dept_type, supplier_code, supplier_name, notify_arrived_sum, actual_arrived_sum, temporary_qualified_sum, temporary_unqualified_sum, quality_qualified_sum, refunds_exchanges_sum, storage_sum, arrived_time, temporary_time, delivery_inspection_time, quality_time, storage_time, warehouse_employee, warehouse_code, warehouse_name, create_time, create_by, update_by, update_time from purchase_storage + select purchase_storage_id, warehouse_storage_code, related_order_code, warehouse_storage_status, warehouse_quality_status, warehouse_storage_type, warehouse_order_type, warehouse_dept_type, supplier_code, supplier_name, customer_contact, contact_number, supplier_address, notify_arrived_sum, actual_arrived_sum, temporary_qualified_sum, temporary_unqualified_sum, quality_qualified_sum, refunds_exchanges_sum, storage_sum, arrived_time, temporary_time, delivery_inspection_time, quality_time, storage_time, warehouse_employee, warehouse_code, warehouse_name, create_time, create_by, update_by, update_time from purchase_storage