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