From 460f32703f2a44d0abd49ae3bf817b1266fe6db2 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 19 Jul 2024 17:41:44 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E5=94=AE=E5=90=8E=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=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=B7=BB=E5=8A=A0=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=B1=A5=E5=8E=86=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=B1=95=E7=A4=BA=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=B1=A5=E5=8E=86=E7=9A=84=E5=89=8D=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E6=94=B9=E6=88=90=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E5=8F=B7=E3=80=81?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=8D=95=E5=8F=B7=E6=95=B0=E6=8D=AE=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=95=E7=A4=BA=E8=AE=BE=E5=A4=87=E5=B1=A5?= =?UTF-8?q?=E5=8E=86=E7=9A=84=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=E7=94=B1?= =?UTF-8?q?=E5=85=B3=E8=81=94=E7=89=A9=E6=96=99=E5=8F=B7=E6=94=B9=E6=88=90?= =?UTF-8?q?=E5=85=B3=E8=81=94=E7=89=A9=E6=96=99=E5=8F=B7=E3=80=81=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E5=8F=B7=E3=80=81=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E5=8D=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AftersalesWarehouseOutController.java | 13 ++++++--- .../IAftersalesWarehouseOutService.java | 7 ++++- .../AftersalesWarehouseOutServiceImpl.java | 29 +++++++++++++++++++ .../addShippingDevicesOne.html | 8 +++-- .../maintenanceEquipmentOne.html | 8 ++++- 5 files changed, 57 insertions(+), 8 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java index c056b967..c7c006b1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java @@ -274,10 +274,15 @@ public class AftersalesWarehouseOutController extends BaseController /** * 售后第一次维护设备 添加出货设备信息 */ - @GetMapping("/addShippingDevicesOne/{outOrderDetailId}") - public String addShippingDevicesOne(@PathVariable("outOrderDetailId") Long outOrderDetailId, ModelMap mmap) + @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"; } @@ -298,13 +303,13 @@ public class AftersalesWarehouseOutController extends BaseController /** * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 */ - @PostMapping("/getEquipMaterialDetailByMaterialNo") + @PostMapping("/getAllMaterialShippingDevices") @ResponseBody public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrderDetail warehouseOutOrderDetail) { startPage(); - List list = warehouseOutOrderService.selectAftersalesShippingDeviceListByMaterialNo(warehouseOutOrderDetail); + List list = warehouseOutOrderService.selectAftersalesShippingDeviceList(warehouseOutOrderDetail); return getDataTable(list); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java index c68025a0..32fb8a6f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java @@ -116,7 +116,7 @@ public interface IAftersalesWarehouseOutService List selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder); /** - * 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息 + * 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息 (旧版) * */ List selectAftersalesShippingDeviceListByMaterialNo(WarehouseOutOrderDetail warehouseOutOrderDetail); @@ -150,4 +150,9 @@ public interface IAftersalesWarehouseOutService * 确认验收 */ int confirmCheckGoodsById(Long outOrderId); + + /** + * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 关联物料号、生产单号、销售单号 + * */ + List selectAftersalesShippingDeviceList(WarehouseOutOrderDetail warehouseOutOrderDetail); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java index 139a2ab5..4c05cc7a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java @@ -473,6 +473,35 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu } + /** + * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 关联物料号、生产单号、销售单号 + * */ + @Override + public List selectAftersalesShippingDeviceList(WarehouseOutOrderDetail warehouseOutOrderDetail) { + List selectShippingDeviceVOs = new ArrayList<>(); + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setMaterialNo(warehouseOutOrderDetail.getMaterialNo()); + afterSalesShippingDevice.setMakeNo(warehouseOutOrderDetail.getMakeNo()); + afterSalesShippingDevice.setSalesOrderCode(warehouseOutOrderDetail.getSalesOrderCode()); + List afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(afterSalesShippingDevice); + if (!StringUtils.isNotEmpty(afterSalesShippingDevices)) { + // 记录日志 + log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",warehouseOutOrderDetail.getMaterialNo()); + } + + for (AfterSalesShippingDevice tempAfterSalesShippingDevice : afterSalesShippingDevices) { + SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO(); + shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId()); + shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode()); + shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber()); + shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl()); + shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode()); + selectShippingDeviceVOs.add(shippingDeviceVO); + } + return selectShippingDeviceVOs; + + } + /* * 售后第一次维护设备信息根据设备ID删除出货设备信息 * */ diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html index 3df5aba7..e69f32f2 100644 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html +++ b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html @@ -106,6 +106,8 @@ var prefix = ctx + "aftersales/warehouseOutOrder"; var warehouseOutOrderDetail = [[${warehouseOutOrderDetail}]]; + var salesOrderCode = [[${salesOrderCode}]]; + var makeNo = [[${makeNo}]]; $("#form-addShippingDevicesOne-edit").validate({ focusCleanup: true @@ -231,7 +233,7 @@ var options = { id: "table-shippingDevices", - url: prefix + "/getEquipMaterialDetailByMaterialNo", + url: prefix + "/getAllMaterialShippingDevices", pagination: false, showSearch: false, showRefresh: false, @@ -288,7 +290,9 @@ function queryParams(params) { var curParams = { // 传递参数查询参数 - materialNo: warehouseOutOrderDetail.materialNo + materialNo: warehouseOutOrderDetail.materialNo, + salesOrderCode:salesOrderCode, + makeNo:makeNo }; return curParams; } diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html index 7d3b78f4..1db56a09 100644 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html +++ b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html @@ -339,7 +339,13 @@ // } function addShippingDevicesOne(outOrderDetailId) { - var url = prefix + '/addShippingDevicesOne/' + outOrderDetailId + var salesOrderCode = [[${warehouseOutOrder.salesOrderCode}]]; + var makeNo = [[${warehouseOutOrder.makeNo}]]; + var queryParams = new URLSearchParams(); + queryParams.append('outOrderDetailId', outOrderDetailId); + queryParams.append('salesOrderCode', encodeURIComponent(salesOrderCode)); + queryParams.append('makeNo',encodeURIComponent(makeNo)); + var url = prefix + '/addShippingDevicesOne?' + queryParams.toString(); $.modal.open("添加出货设备", url); }