From 80bcbc538b17e913bea91b092abf172cdb4c12d4 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 10 Jul 2024 11:06:39 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E5=94=AE=E5=90=8E=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20=E6=96=B0=E5=A2=9E=20=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=87=BA=E8=B4=A7=E8=AE=BE=E5=A4=87=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E9=A1=B5=E9=9D=A2=20=E4=BF=AE=E6=94=B9=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=AE=A2=E5=8D=95=E7=9A=84=E6=B7=BB=E5=8A=A0=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=B1=A5=E5=8E=86=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=86=8D=E5=8A=A0=E4=B8=8A=20=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=8F=B7=20=E6=96=B0=E5=A2=9E=20=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=8F=B7=E6=9F=A5=E8=AF=A2=E5=87=BA=E8=B4=A7?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF=E5=88=97=E8=A1=A8=20?= =?UTF-8?q?=E5=94=AE=E5=90=8E=E7=BB=B4=E6=8A=A4=E8=AE=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E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=87=BA=E8=B4=A7=E8=AE=BE=E5=A4=87=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E7=9A=84=E6=96=B9=E6=B3=95=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=87=86=E5=A4=87=E7=89=A9=E6=96=99=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=89=A9=E6=96=99=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=96=9D=E7=94=B3=E8=AF=B7=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E6=95=B0=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E4=BF=9D=E5=AD=98=E9=94=80=E5=94=AE=E5=8D=95-?= =?UTF-8?q?=E5=87=86=E5=A4=87=E7=89=A9=E6=96=99=20=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=97=B6=E6=9B=B4=E6=96=B0=20=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=BA=20=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AftersalesWarehouseOutController.java | 36 +++ .../AfterSalesShippingDeviceMapper.java | 5 + .../IAftersalesWarehouseOutService.java | 5 + .../AftersalesWarehouseOutServiceImpl.java | 27 ++ .../controller/SysMakeOrderController.java | 1 + .../impl/WarehouseOutOrderServiceImpl.java | 15 +- .../AfterSalesShippingDeviceMapper.xml | 7 + .../warehouseOutOrder/addShippingDevices.html | 186 ------------ .../addShippingDevicesOne.html | 273 ++++++++++++++++++ .../maintenanceEquipmentOne.html | 39 ++- .../system/makeorder/addEquipmentResume.html | 3 +- .../warehouseOutOrder/prepareMaterial.html | 12 +- 12 files changed, 412 insertions(+), 197 deletions(-) delete mode 100644 ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevices.html create mode 100644 ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html 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 96723c52..163c8516 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 @@ -263,6 +263,7 @@ public class AftersalesWarehouseOutController extends BaseController List list = warehouseOutOrderService.selectOutOrderDetailListByCode(warehouseOutOrder); return getDataTable(list); } + /** * 展示售后第一次维护设备料号相关出货设备信息 */ @@ -276,6 +277,41 @@ public class AftersalesWarehouseOutController extends BaseController return getDataTable(list); } + + + + /** + * 售后第一次维护设备 添加出货设备信息 + */ + @GetMapping("/addShippingDevicesOne/{outOrderDetailId}") + public String addShippingDevicesOne(@PathVariable("outOrderDetailId") Long outOrderDetailId, ModelMap mmap) + { + WarehouseOutOrderDetail warehouseOutOrderDetail = outOrderDetailService.selectWarehouseOutOrderDetailById(outOrderDetailId); + mmap.put("warehouseOutOrderDetail", warehouseOutOrderDetail); + return prefix + "/addShippingDevicesOne"; + } + + + + + + /** + * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 + */ + @PostMapping("/getEquipMaterialDetailByMaterialNo") + @ResponseBody + public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrderDetail warehouseOutOrderDetail) + { + + startPage(); + List list = warehouseOutOrderService.selectAftersalesShippingDeviceListByMaterialNo(warehouseOutOrderDetail); + return getDataTable(list); + } + + + + + /** * 第一次维护设备删除物料信息出货设备信息 */ 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 2e1a3a3b..2fd79a99 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 @@ -102,4 +102,9 @@ public interface AfterSalesShippingDeviceMapper * 根据生产单号和关联销售单号查询出货设备履历信息 * */ List selectAfterSalesShippingDeviceByNoAndCode(AfterSalesShippingDevice afterSalesShippingDevice); + + /* + * 根据物料号查询出货设备信息列表 + * */ + List selectShippingDeviceListByMaterialNo(AfterSalesShippingDevice afterSalesShippingDevice); } 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 77a7c7d0..2e95ce8b 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 @@ -114,4 +114,9 @@ public interface IAftersalesWarehouseOutService * 展示售后第一次维护设备物料相关信息 * */ List selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder); + + /** + * 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息 + * */ + List selectAftersalesShippingDeviceListByMaterialNo(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 5b4614a2..1291ad81 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 @@ -184,6 +184,33 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu return warehouseOutOrderDetails; } + /** + * 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息 + * */ + @Override + public List selectAftersalesShippingDeviceListByMaterialNo(WarehouseOutOrderDetail warehouseOutOrderDetail) { + + List selectShippingDeviceVOs = new ArrayList<>(); + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setMaterialNo(warehouseOutOrderDetail.getMaterialNo()); + List afterSalesShippingDevices = shippingDeviceMapper.selectShippingDeviceListByMaterialNo(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/java/com/ruoyi/system/controller/SysMakeOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java index e227446b..444e367f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java @@ -257,6 +257,7 @@ public class SysMakeOrderController extends BaseController AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); afterSalesShippingDevice.setMakeNo(makeNo); afterSalesShippingDevice.setSalesOrderCode(salesOrderCode); + afterSalesShippingDevice.setMaterialNo(equipMaterialDto.getMaterialCode()); List equipDetailDtos = salesShippingDeviceService.selectAfterSalesShippingDeviceByNoAndCode(afterSalesShippingDevice); return getDataTable(equipDetailDtos); } 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 e1a7d6ba..f554a845 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 @@ -170,20 +170,27 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService String loginName = ShiroUtils.getLoginName(); warehouseOutOrder.setUpdateBy(loginName); warehouseOutOrder.setUpdateTime(new Date()); - warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); + + //更改出库状态为 第一次维护设备信息 + warehouseOutOrder.setWarehouseOutStatus("1"); List warehouseOutOrderDetailList = warehouseOutOrder.getWarehouseOutOrderDetailList(); if (StringUtils.isEmpty(warehouseOutOrderDetailList)){ log.warn("保存销售单-准备物料,物料列表信息为空:{}",warehouseOutOrder); } - int updateRows = 0; for (WarehouseOutOrderDetail warehouseOutOrderDetail : warehouseOutOrderDetailList) { warehouseOutOrderDetail.setUpdateBy(loginName); warehouseOutOrderDetail.setUpdateTime(new Date()); warehouseOutOrderDetail.setRemark(warehouseOutOrder.getRemark()); //更新数据库记录 - updateRows += outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail); + int updateOutOrderDetail = outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail); + if (updateOutOrderDetail <= 0){ + throw new BusinessException("更新出库单详情数据失败"); + } } - return updateRows; + //出库单点击准备物料后生成售后单 + + int updateWarehouseOutOrderResult = warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); + return updateWarehouseOutOrderResult; } diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml index 33997e27..d5a9f599 100644 --- a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml @@ -98,6 +98,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where make_no = #{makeNo} and sales_order_code = #{salesOrderCode} + and material_no = #{materialNo} + + + + diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevices.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevices.html deleted file mode 100644 index 316a5184..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevices.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - -
-
- - -
-

物料信息

-
-
-
-

出货设备

-
-
-
-
- - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html new file mode 100644 index 00000000..af49b115 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html @@ -0,0 +1,273 @@ + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + + + + + +
+
+ +
+ +
+

出货设备

+
+
+
+
+ + +
+ + + + + \ No newline at end of file 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 d35431fa..304c596e 100644 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html +++ b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html @@ -124,13 +124,20 @@ columns: [{ checkbox: true }, + { title:'销售订单号', field:'quoteId', visible: false }, + { + title:'出库单详情Id', + field:'outOrderDetailId', + visible: false + + }, { title: '料号', - field: 'materialCode', + field: 'materialNo', }, { title: '图片', @@ -156,12 +163,28 @@ title: '描述', field: 'describe', }, + { + title: '订单数量', + field: 'makeNum', + }, + { + title: '已出库数', + field: 'hasOutOrderSum', + }, + { + title: '申请出库数', + field: 'applyOutOrderSum', + }, + { + title: '准备出库数', + field: 'prepareOutOrderSum', + }, { title: '操作', align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('添加出货设备'); + actions.push('添加出货设备'); return actions.join(''); } } @@ -255,12 +278,18 @@ /*添加出货设备*/ - function addShippingDevices(quoteId, materialCode) { - // 确保URL编码,特别是如果materialCode中可能含有特殊字符 - var url = ctx + 'aftersales/warehouseOutOrder/addShippingDevices/' + encodeURIComponent(quoteId) + '/' + encodeURIComponent(materialCode); + // function addShippingDevicesOne(quoteId, materialCode) { + // // 确保URL编码,特别是如果materialCode中可能含有特殊字符 + // var url = ctx + 'aftersales/warehouseOutOrder/addShippingDevicesOne/' + encodeURIComponent(quoteId) + '/' + encodeURIComponent(materialCode); + // $.modal.open("添加出货设备", url); + // } + + function addShippingDevicesOne(outOrderDetailId) { + var url = prefix + '/addShippingDevicesOne/' + outOrderDetailId $.modal.open("添加出货设备", url); } + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/addEquipmentResume.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/addEquipmentResume.html index 6756d2b3..b00778cf 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/addEquipmentResume.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/addEquipmentResume.html @@ -207,7 +207,8 @@ var curParams = { // 传递参数查询参数 makeNo: equipMaterial.makeNo, - quoteId: equipMaterial.quoteId + quoteId: equipMaterial.quoteId, + materialCode: equipMaterial.materialCode }; return curParams; } 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 5b0bc67b..367571f2 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html @@ -117,7 +117,17 @@ "outOrderDetailId":item.outOrderDetailId, "outOrderCode":item.outOrderCode, "materialNo": item.materialNo, // 假设id对应materialId - "prepareOutOrderSum":item.prepareOutOrderSum, + "materialName": item.materialName, + "materialType": item.materialType, + "materialPhotourl": item.materialPhotourl, + "materialDescribe": item.materialDescribe, + "materialBrand": item.materialBrand, + "materialUnit": item.materialUnit, + "materialProcessMethod": item.materialProcessMethod, + "makeNum": item.makeNum, + "hasOutOrderSum": item.hasOutOrderSum, + "applyOutOrderSum": item.applyOutOrderSum, + "prepareOutOrderSum": item.prepareOutOrderSum, // ...其他字段 }; });