From 513a914f6498f21ace6900d8b1a79cb0768d38bd Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 6 Nov 2024 15:32:30 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E5=94=AE=E5=90=8E=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E5=94=AE=E5=90=8E=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=89=8D=E7=AB=AF=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E5=94=AE=E5=90=8E=E7=AC=AC=E4=B8=80=E6=AC=A1=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=89=8D=E7=AB=AF=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E5=94=AE=E5=90=8E=E7=AC=AC=E4=B8=80=E6=AC=A1=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=90=8E=E7=AB=AFController=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E5=94=AE=E5=90=8E=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87=E6=8E=A5=E5=8F=A3=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=E5=94=AE=E5=90=8E=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=81=E5=B1=95=E7=A4=BA=E5=94=AE=E5=90=8E=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E7=BB=B4=E6=8A=A4=E5=87=BA=E8=B4=A7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=BA=E5=BA=93=E5=8D=95=E5=87=86=E5=A4=87?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=EF=BC=9A?= =?UTF-8?q?=E5=AD=90=E8=A1=A8=E6=95=B0=E6=8D=AE=E5=8A=A0=E4=B8=8A=20?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=95=B0=E9=87=8F=E5=92=8C=E5=B7=B2=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E6=95=B0=E9=87=8F=20=E4=BF=AE=E6=94=B9=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E5=87=BA=E8=B4=A7=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=87=BA=E8=B4=A7=E6=95=B0=E7=9A=84=E6=A0=A1=E9=AA=8C=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AftersalesOutOrderController.java | 136 ++++- .../AftersalesOutOrderDetailMapper.java | 5 + .../service/IAftersalesOutOrderService.java | 23 + .../impl/AftersalesOutOrderServiceImpl.java | 48 ++ .../AftersalesOutOrderDetailMapper.xml | 7 +- .../aftersalesOutOrder.html | 9 + .../maintenanceEquipmentOne.html | 476 ++++++++++++++++++ .../system/salesOrder/salesDeliverGoods.html | 8 +- .../warehouseOutOrder/prepareMaterial.html | 2 + 9 files changed, 704 insertions(+), 10 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentOne.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesOutOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesOutOrderController.java index 7f539730..9e06c07c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesOutOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesOutOrderController.java @@ -1,15 +1,13 @@ package com.ruoyi.aftersales.controller; import java.util.List; + +import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.aftersales.domain.AftersalesOutOrder; @@ -148,4 +146,132 @@ public class AftersalesOutOrderController extends BaseController } + /** + * 售后第一次维护设备 + */ + @GetMapping("/maintenanceEquipmentOne/{outOrderId}") + public String maintenanceEquipmentOne(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) + { + AftersalesOutOrder aftersalesOutOrder = aftersalesOutOrderService.selectAftersalesOutOrderById(outOrderId); + mmap.put("aftersalesOutOrder", aftersalesOutOrder); + return prefix + "/maintenanceEquipmentOne"; + } + + /** + * 修改保存售后第一次维护设备 + */ + @RequiresPermissions("aftersales:aftersalesOutOrder:maintenanceEquipmentOne") + @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) + @PostMapping("/maintenanceEquipmentOne") + @ResponseBody + public AjaxResult maintenanceEquipmentOneSave(@RequestBody AftersalesOutOrder aftersalesOutOrder) + { + return toAjax(aftersalesOutOrderService.updateMaintenanceEquipmentOne(aftersalesOutOrder)); + } + + + /** + * 展示售后第一次维护设备需要维护出货物料信息 + * */ + @PostMapping("/getNeedShippingDeviceMaterialsOne") + @ResponseBody + public TableDataInfo getNeedShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder) + { + + startPage(); + List list = aftersalesOutOrderService.getNeedShippingDeviceMaterialsOne(aftersalesOutOrder); + return getDataTable(list); + } + + + /** + * 展示售后第一次维护设备不需要维护出货物料信息 + * */ + @PostMapping("/getNoShippingDeviceMaterialsOne") + @ResponseBody + public TableDataInfo getNoShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder) + { + + startPage(); + List list = aftersalesOutOrderService.getNoShippingDeviceMaterialsOne(aftersalesOutOrder); + return getDataTable(list); + } + +// +// /** +// * 展示售后第一次维护设备料号已选择添加出货设备的相关出货设备信息 +// */ +// @PostMapping("/showAftersalesShippingDeviceListOne") +// @ResponseBody +// public TableDataInfo showAftersalesShippingDeviceListOne(@RequestParam("materialNo") String materialNo, +// @RequestParam("salesOrderCode") String salesOrderCode, +// @RequestParam("makeNo") String makeNo) +// { +// +// startPage(); +// List list = aftersalesOutOrderService.showAftersalesShippingDeviceList(materialNo,salesOrderCode,makeNo); +// return getDataTable(list); +// } +// +// +// +// +// /** +// * 售后第一次维护设备 添加出货设备信息 +// */ +// @GetMapping("/addShippingDevicesOne") +// public String addShippingDevicesOne(@RequestParam("outOrderDetailId") Long outOrderDetailId, +// @RequestParam("salesOrderCode") String salesOrderCode, +// @RequestParam("makeNo") String makeNo, +// ModelMap mmap) +// { +// WarehouseOutOrderDetail warehouseOutOrderDetail = outOrderDetailService.selectWarehouseOutOrderDetailById(outOrderDetailId); +// mmap.put("salesOrderCode",salesOrderCode); +// mmap.put("makeNo",makeNo); +// mmap.put("warehouseOutOrderDetail", warehouseOutOrderDetail); +// return prefix + "/addShippingDevicesOne"; +// } +// +// /** +// * 修改保存售后第一次维护设备 添加出货设备信息 +// */ +// @ResponseBody +// @PostMapping("/addShippingDevicesOne") +// public AjaxResult addShippingDevicesOneSave(@RequestBody WarehouseOutOrderDetail warehouseOutOrderDetail) +// { +// +// return toAjax(outOrderDetailService.addShippingDevicesOne(warehouseOutOrderDetail)); +// } +// +// +// +// /** +// * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 +// */ +// @PostMapping("/getAllMaterialShippingDevices") +// @ResponseBody +// public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrderDetail warehouseOutOrderDetail) +// { +// +// startPage(); +// List list = aftersalesOutOrderService.selectAftersalesShippingDeviceList(warehouseOutOrderDetail); +// return getDataTable(list); +// } +// +// +// +// /** +// * 第一次维护设备删除物料信息出货设备信息 +// */ +// @Log(title = "售后维护设备出库", businessType = BusinessType.DELETE) +// @PostMapping("/deleteRow") +// @ResponseBody +// public AjaxResult deleteRow(String shippingDeviceId) +// { +// return toAjax(aftersalesOutOrderService.deleteAftersalesShippingDeviceById(shippingDeviceId)); +// } + + + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderDetailMapper.java index 7a93f0ed..70bff156 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderDetailMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderDetailMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.aftersales.mapper; import java.util.List; import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail; + /** * 售后维护设备出库详情Mapper接口 * @@ -80,4 +81,8 @@ public interface AftersalesOutOrderDetailMapper * */ int insertBatchAftersalesOutOrderDetail(List aftersalesOutOrderDetails); + /** + * 根据出库单号查询详情集合 + * */ + List selectDetailListByOutOrderCode(String outOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesOutOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesOutOrderService.java index 05ca9a82..afb4f4c2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesOutOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesOutOrderService.java @@ -2,6 +2,7 @@ package com.ruoyi.aftersales.service; import java.util.List; import com.ruoyi.aftersales.domain.AftersalesOutOrder; +import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail; /** * 售后维护设备出库Service接口 @@ -72,4 +73,26 @@ public interface IAftersalesOutOrderService * @return */ int restoreAftersalesOutOrderById(Long outOrderId); + + /** + * 修改保存售后第一次维护设备出库 + * @param aftersalesOutOrder + * @return + */ + int updateMaintenanceEquipmentOne(AftersalesOutOrder aftersalesOutOrder); + + + /** + * 展示售后第一次维护设备需要维护出货物料信息 + * @param aftersalesOutOrder + * @return + */ + List getNeedShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder); + + /** + * 展示售后第一次维护设备不需要维护出货物料信息 + * @param aftersalesOutOrder + * @return + */ + List getNoShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesOutOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesOutOrderServiceImpl.java index 212db251..1a777275 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesOutOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesOutOrderServiceImpl.java @@ -1,6 +1,10 @@ package com.ruoyi.aftersales.service.impl; import java.util.List; +import java.util.stream.Collectors; + +import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail; +import com.ruoyi.aftersales.mapper.AftersalesOutOrderDetailMapper; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +26,9 @@ public class AftersalesOutOrderServiceImpl implements IAftersalesOutOrderService @Autowired private AftersalesOutOrderMapper aftersalesOutOrderMapper; + @Autowired + private AftersalesOutOrderDetailMapper aftersalesOutOrderDetailMapper; + /** * 查询售后维护设备出库 * @@ -123,4 +130,45 @@ public class AftersalesOutOrderServiceImpl implements IAftersalesOutOrderService { return aftersalesOutOrderMapper.restoreAftersalesOutOrderById(outOrderId); } + + + /** + * 修改保存售后第一次维护设备出库 + * @param aftersalesOutOrder + * @return + */ + @Override + public int updateMaintenanceEquipmentOne(AftersalesOutOrder aftersalesOutOrder) { + return 0; + } + + /** + * 展示售后第一次维护设备需要维护出货物料信息 + * @param aftersalesOutOrder + * @return + */ + @Override + public List getNeedShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder) { + String outOrderCode = aftersalesOutOrder.getOutOrderCode(); + List list = aftersalesOutOrderDetailMapper.selectDetailListByOutOrderCode(outOrderCode); + //只保留成品 + List filterList = list.stream().filter(item -> "chcpsb".equals(item.getMaterialType())).collect(Collectors.toList()); + return filterList; + } + + + /** + * 展示售后第一次维护设备不需要维护出货物料信息 + * @param aftersalesOutOrder + * @return + */ + @Override + public List getNoShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder) { + String outOrderCode = aftersalesOutOrder.getOutOrderCode(); + List list = aftersalesOutOrderDetailMapper.selectDetailListByOutOrderCode(outOrderCode); + //过滤掉成品 + List filterList = list.stream().filter(item -> !"chcpsb".equals(item.getMaterialType())).collect(Collectors.toList()); + return filterList; + + } } diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderDetailMapper.xml index 6c5938b6..07e86a25 100644 --- a/ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderDetailMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderDetailMapper.xml @@ -71,7 +71,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where out_order_detail_id = #{outOrderDetailId} - + + + insert into aftersales_out_order_detail diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/aftersalesOutOrder.html b/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/aftersalesOutOrder.html index 784e1b35..80bf0888 100644 --- a/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/aftersalesOutOrder.html +++ b/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/aftersalesOutOrder.html @@ -210,6 +210,15 @@ }; $.table.init(options); }); + + + + /*售后第一次维护设备*/ + function maintenanceEquipmentOne(outOrderId) { + var url = ctx + 'aftersales/aftersalesOutOrder/maintenanceEquipmentOne/'+outOrderId; + $.modal.open("售后第一次维护设备",url); + } + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentOne.html b/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentOne.html new file mode 100644 index 00000000..b1a5152c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentOne.html @@ -0,0 +1,476 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+

需要维护出货设备信息

+
+
+
+
+
+
+
+ + +
+
+

无需维护出货设备信息

+
+
+
+
+
+
+
+ + + +
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html index 9c973cfd..a7a69998 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html @@ -386,14 +386,14 @@ return '申请出货数不能为空'; } if (isNaN(value)) { - return '申请出货数不能为空'; + return '请输入有效的数字'; } - if (value < 0) { - return '申请出货数不能为空'; + if (value <= 0) { + return '申请出货数必须大于0'; } //不能为小数 if (value % 1 !== 0) { - return '申请出货数不能为空'; + return '申请出货数不能为小数'; } }, }, 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 048aca10..94baca9d 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html @@ -128,6 +128,8 @@ "materialBrand": item.materialBrand, "materialUnit": item.materialUnit, "materialProcessMethod": item.materialProcessMethod, + "makeNum": item.makeNum, + "hasOutOrderSum": item.hasOutOrderSum, "applyOutOrderSum": item.applyOutOrderSum, "prepareOutOrderSum": item.prepareOutOrderSum, // ...其他字段