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