From 220b20a46d3dc95e5f0f9448c237621733392190 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 5 Jun 2024 14:32:44 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=8D=95=20=E6=96=B0=E5=A2=9E=E9=94=80?= =?UTF-8?q?=E5=94=AE-=E5=87=BA=E5=BA=93=20=E6=8C=89=E9=92=AE=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?salesOutWarehouse.html=20=E6=96=B0=E5=A2=9E=E9=94=80=E5=94=AE?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=90=8E=E7=AB=AF=E6=9F=A5=E8=AF=A2=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=87=BA=E5=BA=93=E5=90=8E=E7=AB=AF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93=E7=89=A9?= =?UTF-8?q?=E6=96=99=E4=BF=A1=E6=81=AF=E5=85=B3=E8=81=94=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=E8=AE=BE=E5=A4=87=E5=B1=A5=E5=8E=86?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=96=B0=E5=A2=9E=20=E5=9E=8B?= =?UTF-8?q?=E5=8F=B7=E5=92=8C=E8=A7=84=E6=A0=BC=E5=AD=97=E6=AE=B5=20?= =?UTF-8?q?=E9=94=80=E5=94=AE=E5=8D=95=E5=87=86=E5=A4=87=E7=89=A9=E6=96=99?= =?UTF-8?q?=20prepareMaterial.html=E9=A1=B5=E9=9D=A2=20=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E5=AD=97=E6=AE=B5=E4=B8=BA=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AfterSalesShippingDeviceMapper.java | 5 + .../WarehouseOutOrderController.java | 39 +++ .../mapper/WarehouseOutOrderDetailMapper.java | 5 + .../IWarehouseOutOrderDetailService.java | 6 + .../service/IWarehouseOutOrderService.java | 6 + .../WarehouseOutOrderDetailServiceImpl.java | 15 + .../impl/WarehouseOutOrderServiceImpl.java | 21 ++ .../AfterSalesShippingDeviceMapper.xml | 8 + .../WarehouseOutOrderDetailMapper.xml | 6 + .../warehouseOutOrder/prepareMaterial.html | 20 +- .../warehouseOutOrder/salesOutWarehouse.html | 304 ++++++++++++++++++ .../warehouseOutOrder/warehouseOutOrder.html | 11 + 12 files changed, 436 insertions(+), 10 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java index 6250e26a..e324a2c1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java @@ -92,4 +92,9 @@ public interface AfterSalesShippingDeviceMapper * @return 结果 */ public int restoreAfterSalesShippingDeviceById(Long shippingDeviceCode); + + /** + * 销售单-出库 物料信息关联设备信息 + */ + List selectShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java index 35de1cf3..c22fb2a1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java @@ -2,6 +2,7 @@ package com.ruoyi.warehouse.controller; import java.util.List; +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; import com.ruoyi.warehouse.service.IWarehouseOutOrderDetailService; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -150,5 +151,43 @@ public class WarehouseOutOrderController extends BaseController return getDataTable(list); } + /** + * 销售单-出库 + */ + @GetMapping("/salesOutWarehouse/{outOrderId}") + public String salesOutWarehouse(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) + { + WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId); + mmap.put("warehouseOutOrder", warehouseOutOrder); + return prefix + "/salesOutWarehouse"; + } + + /** + * 修改保存销售单-出库 + */ + @RequiresPermissions("warehouse:warehouseOutOrder:salesOutWarehouse") + @Log(title = "仓库出库单", businessType = BusinessType.UPDATE) + @PostMapping("/salesOutWarehouse") + @ResponseBody + public AjaxResult salesOutWarehouseSave(@RequestBody WarehouseOutOrder warehouseOutOrder) + { + return toAjax(warehouseOutOrderService.updateSalesOutWarehouse(warehouseOutOrder)); + } + + /** + * 销售单-出库 物料信息关联设备信息 + */ + @PostMapping("/getShippingDeviceList") + @ResponseBody + public TableDataInfo getShippingDeviceList( @RequestParam("salesOrderCode") String salesOrderCode, + @RequestParam("materialNo") String materialNo) + { + startPage(); + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setSalesOrderCode(salesOrderCode); + afterSalesShippingDevice.setMaterialNo(materialNo); + List list = outOrderDetailService.selectShippingDeviceList(afterSalesShippingDevice); + return getDataTable(list); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java index 22396f9c..4914ed52 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java @@ -81,4 +81,9 @@ public interface WarehouseOutOrderDetailMapper * 销售单-准备物料 物料相关信息 */ List selectOutOrderDetailListByCode(String outOrderCode); + + /** + * 销售单-出库 物料信息关联设备信息 + */ + List selectShippingDeviceList(WarehouseOutOrderDetail warehouseOutOrderDetail); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java index d22b4a00..058faca5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java @@ -2,6 +2,7 @@ package com.ruoyi.warehouse.service; import java.util.List; +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; import com.ruoyi.warehouse.domain.WarehouseOutOrder; import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; @@ -79,4 +80,9 @@ public interface IWarehouseOutOrderDetailService * 销售单-准备物料 物料相关信息 */ List selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder); + + /** + * 销售单-出库 物料信息关联设备信息 + */ + List selectShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java index 99c54b75..d4eaaea8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java @@ -77,4 +77,10 @@ public interface IWarehouseOutOrderService * 修改保存销售单-准备物料 */ int updatePrepareMaterial(WarehouseOutOrder warehouseOutOrder); + + /** + * 修改保存销售单-出库 + */ + int updateSalesOutWarehouse(WarehouseOutOrder warehouseOutOrder); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java index 051fcf33..0ea5f5c2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java @@ -1,6 +1,9 @@ package com.ruoyi.warehouse.service.impl; import java.util.List; + +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; +import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; @@ -26,6 +29,9 @@ public class WarehouseOutOrderDetailServiceImpl implements IWarehouseOutOrderDet @Autowired private WarehouseOutOrderDetailMapper warehouseOutOrderDetailMapper; + @Autowired + private AfterSalesShippingDeviceMapper afterSalesShippingDeviceMapper; + /** * 查询出库单详情 * @@ -140,4 +146,13 @@ public class WarehouseOutOrderDetailServiceImpl implements IWarehouseOutOrderDet } return warehouseOutOrderDetailMapper.selectOutOrderDetailListByCode(outOrderCode); } + + /** + * 销售单-出库 物料信息关联设备信息 + */ + @Override + public List selectShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice) { + + return afterSalesShippingDeviceMapper.selectShippingDeviceList(afterSalesShippingDevice); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java index 99caf11a..b3a1805f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java @@ -144,7 +144,28 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService } int updateRows = 0; for (WarehouseOutOrderDetail warehouseOutOrderDetail : warehouseOutOrderDetailList) { + warehouseOutOrderDetail.setRemark(warehouseOutOrder.getRemark()); + //更新数据库记录 + updateRows += outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail); + } + return updateRows; + } + + /** + * 修改保存销售单-出库 + */ + @Override + public int updateSalesOutWarehouse(WarehouseOutOrder warehouseOutOrder) { + + List warehouseOutOrderDetailList = warehouseOutOrder.getWarehouseOutOrderDetailList(); + if (StringUtils.isEmpty(warehouseOutOrderDetailList)){ + log.warn("保存销售单-出库,物料列表信息为空:{}",warehouseOutOrder); + } + int updateRows = 0; + for (WarehouseOutOrderDetail warehouseOutOrderDetail : warehouseOutOrderDetailList) { + warehouseOutOrderDetail.setRemark(warehouseOutOrder.getRemark()); + warehouseOutOrderDetail.setDeliveryDate(warehouseOutOrder.getDeliveryDate()); //更新数据库记录 updateRows += outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail); } diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml index 4044b363..bea7cb80 100644 --- a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml @@ -87,6 +87,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where sales_order_code = #{salesOrderCode} + + + + insert into aftersales_shipping_device diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml index 2b4b0fcf..e102a679 100644 --- a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml @@ -77,6 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where out_order_code = #{outOrderCode} + + insert into warehouse_out_order_detail diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html index b863d282..8316ba23 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html @@ -11,13 +11,13 @@
- +
-
@@ -25,49 +25,49 @@
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html new file mode 100644 index 00000000..27bf3549 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html @@ -0,0 +1,304 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html index f1ffab32..b477a1d0 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html @@ -69,6 +69,8 @@ \ No newline at end of file