From 385abde545f5bd72d3d2866aafd87fcb434f7285 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Sat, 29 Jun 2024 16:00:06 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E5=94=AE=E5=90=8E=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4=E5=87=BA=E8=B4=A7?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E5=94=AE=E5=90=8E=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E8=AE=BE=E5=A4=87=E5=87=BA=E5=BA=93=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=94=AE=E5=90=8E=E7=BB=B4=E6=8A=A4=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=87=BA=E5=BA=93=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=20=E5=94=AE=E5=90=8E=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=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=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=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=E7=89=A9=E6=96=99=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=20=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E7=BB=B4=E6=8A=A4=E8=AE=BE=E5=A4=87=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=89=A9=E6=96=99=E4=BF=A1=E6=81=AF=E5=87=BA=E8=B4=A7?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF=20=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E7=AC=AC=E4=B8=80=E6=AC=A1=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E8=AE=BE=E5=A4=87=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=20=E7=94=9F=E4=BA=A7=E7=8A=B6?= =?UTF-8?q?=E6=80=81=20=E4=BF=AE=E6=94=B9=20=E5=94=AE=E5=90=8E=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E8=AE=BE=E5=A4=87=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8F=AA=E5=B1=95=E7=A4=BA=E8=AE=A2=E5=8D=95=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=BA=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AfterSalesShippingDeviceController.java | 11 - .../AftersalesWarehouseOutController.java | 109 +++++-- .../AfterSalesShippingDeviceMapper.java | 2 +- .../IAfterSalesShippingDeviceService.java | 18 -- .../IAftersalesWarehouseOutService.java | 20 +- .../AfterSalesShippingDeviceServiceImpl.java | 23 -- .../AftersalesWarehouseOutServiceImpl.java | 70 ++++- .../mapper/WarehouseOutOrderMapper.java | 9 + .../AfterSalesShippingDeviceMapper.xml | 5 +- .../warehouse/WarehouseOutOrderMapper.xml | 23 +- .../maintenanceEquipmentOne.html | 266 ++++++++++++++++++ .../warehouseOutOrder/warehouseOutOrder.html | 20 +- .../system/makeorder/addProduceInbound.html | 149 ++++------ .../system/salesOrder/salesOrder.html | 11 +- 14 files changed, 550 insertions(+), 186 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java index 408ac130..10631c98 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java @@ -164,17 +164,6 @@ public class AfterSalesShippingDeviceController extends BaseController } - /** - * 删除出货设备 - */ - @RequiresPermissions("aftersales:shippingDevice:remove") - @Log(title = "出货设备", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) - { - return toAjax(afterSalesShippingDeviceService.deleteAfterSalesShippingDeviceByIds(ids)); - } /** * 作废出货设备 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 a11d8b61..96723c52 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 @@ -5,6 +5,8 @@ import java.util.List; import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO; import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; import com.ruoyi.warehouse.domain.WarehouseOutOrder; +import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; +import com.ruoyi.warehouse.service.IWarehouseOutOrderDetailService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -23,7 +25,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** - * 出库单Controller + * 售后维护设备出库Controller * * @author 刘晓旭 * @date 2024-04-23 @@ -37,6 +39,10 @@ public class AftersalesWarehouseOutController extends BaseController @Autowired private IAftersalesWarehouseOutService warehouseOutOrderService; + @Autowired + private IWarehouseOutOrderDetailService outOrderDetailService; + + @RequiresPermissions("aftersales:warehouseOutOrder:view") @GetMapping() public String warehouseOutOrder() @@ -45,7 +51,7 @@ public class AftersalesWarehouseOutController extends BaseController } /** - * 查询出库单列表 + * 查询售后维护设备出库列表 */ @RequiresPermissions("aftersales:warehouseOutOrder:list") @PostMapping("/list") @@ -53,26 +59,26 @@ public class AftersalesWarehouseOutController extends BaseController public TableDataInfo list(WarehouseOutOrder warehouseOutOrder) { startPage(); - List list = warehouseOutOrderService.selectWarehouseOutOrderList(warehouseOutOrder); + List list = warehouseOutOrderService.selectAftersalesWarehouseOutOrderList(warehouseOutOrder); return getDataTable(list); } /** - * 导出出库单列表 + * 导出售后维护设备出库列表 */ @RequiresPermissions("aftersales:warehouseOutOrder:export") - @Log(title = "出库单", businessType = BusinessType.EXPORT) + @Log(title = "售后维护设备出库", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody public AjaxResult export(WarehouseOutOrder warehouseOutOrder) { - List list = warehouseOutOrderService.selectWarehouseOutOrderList(warehouseOutOrder); + List list = warehouseOutOrderService.selectAftersalesWarehouseOutOrderList(warehouseOutOrder); ExcelUtil util = new ExcelUtil(WarehouseOutOrder.class); - return util.exportExcel(list, "出库单数据"); + return util.exportExcel(list, "售后维护设备出库数据"); } /** - * 新增出库单 + * 新增售后维护设备出库 */ @GetMapping("/add") public String add() @@ -81,10 +87,10 @@ public class AftersalesWarehouseOutController extends BaseController } /** - * 新增保存出库单 + * 新增保存售后维护设备出库 */ @RequiresPermissions("aftersales:warehouseOutOrder:add") - @Log(title = "出库单", businessType = BusinessType.INSERT) + @Log(title = "售后维护设备出库", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody public AjaxResult addSave(WarehouseOutOrder warehouseOutOrder) @@ -93,7 +99,7 @@ public class AftersalesWarehouseOutController extends BaseController } /** - * 修改出库单 + * 修改售后维护设备出库 */ @GetMapping("/edit/{outOrderId}") public String edit(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) @@ -104,10 +110,10 @@ public class AftersalesWarehouseOutController extends BaseController } /** - * 修改保存出库单 + * 修改保存售后维护设备出库 */ @RequiresPermissions("aftersales:warehouseOutOrder:edit") - @Log(title = "出库单", businessType = BusinessType.UPDATE) + @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody public AjaxResult editSave(WarehouseOutOrder warehouseOutOrder) @@ -116,7 +122,7 @@ public class AftersalesWarehouseOutController extends BaseController } /** - * 查看出库单详情 + * 查看售后维护设备出库详情 */ @GetMapping("/detail/{outOrderId}") public String detail(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) @@ -127,10 +133,10 @@ public class AftersalesWarehouseOutController extends BaseController } /** - * 修改保存出库单详情 + * 修改保存售后维护设备出库详情 */ @RequiresPermissions("aftersales:warehouseOutOrder:edit") - @Log(title = "出库单", businessType = BusinessType.UPDATE) + @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) @PostMapping("/detail") @ResponseBody public AjaxResult detailSave(WarehouseOutOrder warehouseOutOrder) @@ -154,7 +160,7 @@ public class AftersalesWarehouseOutController extends BaseController * 修改保存出货设备 */ @RequiresPermissions("aftersales:warehouseOutOrder:addShippingDevices") - @Log(title = "出库单", businessType = BusinessType.INSERT) + @Log(title = "售后维护设备出库", businessType = BusinessType.INSERT) @PostMapping("/addShippingDevices") @ResponseBody public AjaxResult addShippingDevicesSave(WarehouseOutOrder warehouseOutOrder) @@ -206,10 +212,10 @@ public class AftersalesWarehouseOutController extends BaseController } /** - * 删除出库单 + * 删除售后维护设备出库 */ @RequiresPermissions("aftersales:warehouseOutOrder:remove") - @Log(title = "出库单", businessType = BusinessType.DELETE) + @Log(title = "售后维护设备出库", businessType = BusinessType.DELETE) @PostMapping( "/remove") @ResponseBody public AjaxResult remove(String ids) @@ -218,4 +224,69 @@ public class AftersalesWarehouseOutController extends BaseController } + + + + /** + * 售后第一次维护设备 + */ + @GetMapping("/maintenanceEquipmentOne/{outOrderId}") + public String maintenanceEquipmentOne(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) + { + WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId); + mmap.put("warehouseOutOrder", warehouseOutOrder); + return prefix + "/maintenanceEquipmentOne"; + } + + /** + * 修改保存售后第一次维护设备 + */ + @RequiresPermissions("aftersales:warehouseOutOrder:maintenanceEquipmentOne") + @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) + @PostMapping("/maintenanceEquipmentOne") + @ResponseBody + public AjaxResult maintenanceEquipmentOneSave(WarehouseOutOrder warehouseOutOrder) + { + return toAjax(warehouseOutOrderService.updateWarehouseOutOrder(warehouseOutOrder)); + } + + + /** + * 展示售后第一次维护设备物料信息 + * */ + @PostMapping("/getMaintenanceEquipmentOneMaterials") + @ResponseBody + public TableDataInfo getMaintenanceEquipmentOneMaterials(WarehouseOutOrder warehouseOutOrder) + { + + startPage(); + List list = warehouseOutOrderService.selectOutOrderDetailListByCode(warehouseOutOrder); + return getDataTable(list); + } + /** + * 展示售后第一次维护设备料号相关出货设备信息 + */ + @PostMapping("/showAftersalesShippingDevicelist") + @ResponseBody + public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrder warehouseOutOrder) + { + + startPage(); + List list = warehouseOutOrderService.selectAftersalesShippingDevicelistByCodeAndNo(warehouseOutOrder); + return getDataTable(list); + } + + /** + * 第一次维护设备删除物料信息出货设备信息 + */ + @Log(title = "售后维护设备出库", businessType = BusinessType.DELETE) + @PostMapping("/deleteRow") + @ResponseBody + public AjaxResult deleteRow(String shippingDeviceId) + { + return toAjax(warehouseOutOrderService.deleteAftersalesShippingDeviceById(shippingDeviceId)); + } + + + } 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 26f40117..2e1a3a3b 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 @@ -67,7 +67,7 @@ public interface AfterSalesShippingDeviceMapper * @param shippingDeviceCode 出货设备ID * @return 结果 */ - public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode); + public int deleteAfterSalesShippingDeviceById(String shippingDeviceId); /** * 批量删除出货设备 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java index a91ebf7a..131d382d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java @@ -74,24 +74,6 @@ public interface IAfterSalesShippingDeviceService */ public int updateAfterSalesShippingDevice(AfterSalesShippingDeviceEditDto afterSalesShippingDeviceEditDto); - - - /** - * 批量删除出货设备 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteAfterSalesShippingDeviceByIds(String ids); - - /** - * 删除出货设备信息 - * - * @param shippingDeviceCode 出货设备ID - * @return 结果 - */ - public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode); - /** * 作废出货设备 * @param shippingDeviceCode 出货设备ID 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 f044a02d..77a7c7d0 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 @@ -5,6 +5,7 @@ import java.util.List; import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO; import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; import com.ruoyi.warehouse.domain.WarehouseOutOrder; +import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; /** * 出库单Service接口 @@ -28,7 +29,7 @@ public interface IAftersalesWarehouseOutService * @param warehouseOutOrder 出库单 * @return 出库单集合 */ - public List selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder); + public List selectAftersalesWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder); /** @@ -96,4 +97,21 @@ public interface IAftersalesWarehouseOutService SelectMaterialsVO selectShippingDevicesById(String quoteId, String materialCode); List selectShippingDeviceBySalesOrderCode(SelectMaterialsVO selectMaterialsVO); + + /* + * 根据设备ID删除出货设备信息 + * */ + int deleteAftersalesShippingDeviceById(String shippingDeviceId); + + + /** + * 展示售后第一次维护设备料号相关出货设备信息 + */ + List selectAftersalesShippingDevicelistByCodeAndNo(WarehouseOutOrder warehouseOutOrder); + + + /** + * 展示售后第一次维护设备物料相关信息 + * */ + List selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java index 6fdc89d8..440c3d55 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java @@ -168,29 +168,6 @@ public class AfterSalesShippingDeviceServiceImpl implements IAfterSalesShippingD return afterSalesShippingDeviceMapper.updateAfterSalesShippingDevice(afterSalesShippingDevice); } - /** - * 删除出货设备对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteAfterSalesShippingDeviceByIds(String ids) - { - return afterSalesShippingDeviceMapper.deleteAfterSalesShippingDeviceByIds(Convert.toStrArray(ids)); - } - - /** - * 删除出货设备信息 - * - * @param shippingDeviceCode 出货设备ID - * @return 结果 - */ - @Override - public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode) - { - return afterSalesShippingDeviceMapper.deleteAfterSalesShippingDeviceById(shippingDeviceCode); - } /** * 作废出货设备 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 8ceb3275..5b4614a2 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 @@ -7,12 +7,15 @@ import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO; import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper; +import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.SysSalesOrderChild; import com.ruoyi.system.mapper.SysSalesOrderChildMapper; import com.ruoyi.warehouse.domain.WarehouseOutOrder; +import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; +import com.ruoyi.warehouse.mapper.WarehouseOutOrderDetailMapper; import com.ruoyi.warehouse.mapper.WarehouseOutOrderMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -39,6 +42,9 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu @Autowired private AfterSalesShippingDeviceMapper shippingDeviceMapper; + @Autowired + private WarehouseOutOrderDetailMapper outOrderDetailMapper; + /** * 查询出库单 * @@ -58,9 +64,11 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu * @return 出库单 */ @Override - public List selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder) + public List selectAftersalesWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder) { - return warehouseOutOrderMapper.selectWarehouseOutOrderList(warehouseOutOrder); + + + return warehouseOutOrderMapper.selectAftersalesWarehouseOutOrderList(warehouseOutOrder); } @Override @@ -131,6 +139,62 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu return selectShippingDeviceVOs; } + /** + * 展示售后第一次维护设备料号相关出货设备信息 + */ + @Override + public List selectAftersalesShippingDevicelistByCodeAndNo(WarehouseOutOrder warehouseOutOrder) { + + List selectShippingDeviceVOs = new ArrayList<>(); + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setSalesOrderCode(warehouseOutOrder.getSalesOrderCode()); + afterSalesShippingDevice.setMaterialNo(warehouseOutOrder.getMaterialNo()); + List afterSalesShippingDevices = shippingDeviceMapper.selectShippingDeviceList(afterSalesShippingDevice); + if (!StringUtils.isNotEmpty(afterSalesShippingDevices)) { + // 记录日志 + log.warn("未查找到与销售订单关联的出库设备数据, 销售订单编码: {}", warehouseOutOrder.getSalesOrderCode()); + throw new BusinessException("未查出库设备数据"); + } + + 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; + } + + /** + * 展示售后第一次维护设备物料相关信息 + * */ + @Override + public List selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder) { + + String outOrderCode = warehouseOutOrder.getOutOrderCode(); + if (!StringUtils.isNotEmpty(outOrderCode)) { + // 记录日志 + log.warn("未查找到与出库单号关联的出库单详情数据, 出库单号: {}", outOrderCode); + throw new BusinessException("未查出库单详情数据"); + } + List warehouseOutOrderDetails = outOrderDetailMapper.selectOutOrderDetailListByCode(outOrderCode); + return warehouseOutOrderDetails; + } + + /* + * 售后第一次维护设备信息根据设备ID删除出货设备信息 + * */ + @Override + public int deleteAftersalesShippingDeviceById(String shippingDeviceId) { + + return shippingDeviceMapper.deleteAfterSalesShippingDeviceById(shippingDeviceId); + } + + + @Override public List selectMaterialByMaterialCode(SelectMaterialsVO selectMaterialsVO) { List selectMaterialsVOs = new ArrayList<>(); @@ -182,7 +246,7 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu /** * 删除出库单对象 - * + * * @param ids 需要删除的数据ID * @return 结果 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java index 33fd32fc..e505696e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderMapper.java @@ -27,6 +27,15 @@ public interface WarehouseOutOrderMapper */ public List selectWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder); + + /** + * 查询售后维护设备仓库出库单列表 + * + * @param warehouseOutOrder 仓库出库单 + * @return 仓库出库单集合 + */ + public List selectAftersalesWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder); + /** * 新增仓库出库单 * diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml index dce6234c..33997e27 100644 --- a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml @@ -225,10 +225,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where shipping_device_id= #{shippingDeviceId} - - delete from aftersales_shipping_device where shipping_device_code = #{shippingDeviceCode} + + delete from aftersales_shipping_device where shipping_device_id = #{shippingDeviceId} + delete from aftersales_shipping_device where shipping_device_code in diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml index ec7f8d83..4371525f 100644 --- a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml @@ -63,7 +63,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and delivery_date = #{deliveryDate} - + + + + + + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+

物料信息

+
+
+ + + + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/warehouseOutOrder.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/warehouseOutOrder.html index 03d2e64e..fcc650d1 100644 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/warehouseOutOrder.html +++ b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/warehouseOutOrder.html @@ -64,8 +64,10 @@ var editFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:edit')}]]; var detailFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:detail')}]]; var removeFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:remove')}]]; - var cancelFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:cancel')}]]; - var restoreFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:restore')}]]; + var maintenanceEquipmentOneFlag = [[${@permission.hasPermi('aftersales:warehouseOutOrder:maintenanceEquipmentOne')}]]; + + + var warehouseOutStatusDatas = [[${@dict.getType('warehouse_out_status')}]]; var warehouseOrderTypeDatas = [[${@dict.getType('warehouse_order_type')}]]; var warehouseOutTypeDatas = [[${@dict.getType('warehouse_out_type')}]]; @@ -174,6 +176,9 @@ var actions = []; // actions.push('编辑 '); actions.push('详情 '); + if (row.warehouseOutStatus== "1"){ + actions.push('维护设备 '); + } return actions.join(''); } }] @@ -182,12 +187,21 @@ }); /*详情*/ - function detail(outOrderId ) { + function detail(outOrderId) { // 在这里编写派单操作的逻辑,使用传入的aftersalesOrderId参数 // 示例逻辑: var url = ctx + 'aftersales/warehouseOutOrder/detail/'+outOrderId; $.modal.open("详情",url); } + + /*售后第一次维护设备*/ + function maintenanceEquipmentOne(outOrderId) { + // 在这里编写派单操作的逻辑,使用传入的aftersalesOrderId参数 + // 示例逻辑: + var url = ctx + 'aftersales/warehouseOutOrder/maintenanceEquipmentOne/'+outOrderId; + $.modal.open("售后第一次维护设备",url); + } + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html index 3944901e..39b8a145 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html @@ -163,19 +163,6 @@ align: 'center', title: '已完成数' }, - // { - // field: 'currentNum', - // title: '本次完成数', - // formatter: function (value,row,index){ - // var curIndex = index; - // // 物料类型是成品,通过添加设备履历表计算数量 - // if(row.materialType == 'chcpsb'){ - // return '' + - // ''; - // } - // return ''; - // } - // }, { field: 'currentNum', title: '本次完成数', @@ -205,7 +192,6 @@ var childTableId = 'child_table_'+index; var childFormTableId = 'child_form_table_'+index; var childTableFormId = 'child_table_form_'+index; - // $detail.html('
'); $detail.html('
'); // BOM展示 $('#'+childTableId).bootstrapTable({ @@ -383,104 +369,63 @@ function addEquipmentResume(curIndex,materialCode){ var url = prefix + "/addEquipmentResume?makeNo="+$("#makeNo").val()+"&saleNo="+$("#saleNo").val()+"&materialNo="+materialCode+"&curIndex="+curIndex; - // var options = { - // title: '设备履历表', - // url: url, - // // callBack: doSubmit - // }; - // $.modal.openOptions(options); $.modal.open("设备履历表",url); } - // function doSubmit(index, layero,uniqueId) { - // // debugger - // var iframeWin = window[layero.find('iframe')[0]['name']]; - // // 行取不到 - // // var data = iframeWin.$('#bootstrap-sub-table-1').bootstrapTable('getData'); - // // alert(JSON.stringify(data)); - // - // // 取不到 - // // var options = iframeWin.$('#bootstrap-sub-table-1').bootstrapTable('getOptions'); - // // var data = options.data; - // // alert(JSON.stringify(data)); - // - // var formData = iframeWin.$("#form-equipMaterial-add").serializeArray(); - // var formObj = serializeObject(formData); - // var formObjStr = JSON.stringify(formObj); - // // alert(formObjStr); - // // 关闭弹出框 - // layer.close(index); - // var curIndex = formObj.curIndex; - // if(formObj.equipResumes){ - // var currentNum = formObj.equipResumes.length; - // var equipResumeArrayStr = JSON.stringify(formObj.equipResumes); - // $('[data-id="currentNum_'+curIndex+'"]').val(currentNum); - // $('[data-id="equipResumeArrayStr_'+curIndex+'"]').val(equipResumeArrayStr); - // } - // - // } - - function serializeObject(formData) { - var obj = {}; - $.each(formData, function () { - if (this.name.indexOf("[") !== -1 && this.name.indexOf("].") !== -1) { - let temp1 = this.name.split("["); - let temp2 = temp1[1].split("]."); - let list_name = temp1[0]; - let list_index = parseInt(temp2[0]); - let list_key = temp2[1]; - // console.log(list_name, '-', list_index, '-', list_key) - if (obj[list_name]) { - // console.log(obj[list_name]) - let arr = obj[list_name] - if (arr.length < list_index + 1) { - for (let i = arr.length; i < list_index + 1; i++) { - // console.log(list_index + 1) - let list_obj_temp = {} - arr.push(list_obj_temp) - } - } - let list_obj = obj[list_name][list_index]; - list_obj[list_key] = this.value || ''; - } else { - let arr = [] - if (list_index !== 0) { - for (let i = 0; i < list_index + 1; i++) { - // console.log(list_index + 1) - let list_obj_temp = {} - arr.push(list_obj_temp) - } - } - let list_obj = {} - list_obj[list_key] = this.value || ''; - arr.push(list_obj) - obj[list_name] = arr; - } - } else { - if (obj[this.name]) { - if (!obj[this.name].push) { - obj[this.name] = [obj[this.name]]; - } - obj[this.name].push(this.value || ''); - } else { - obj[this.name] = this.value || ''; - } - } - }); - return obj; - } - $("#form-makeorder-edit").validate({ focusCleanup: true }); + // function submitHandler() { + // debugger + // var data = $("#form-makeorder-edit").serializeArray(); + // alert(JSON.stringify(data)); + // $.operate.save(ctx + "erp/inboundOrder/add", data); + // } + + + /* + * 提交设备履历信息 + * */ function submitHandler() { - debugger - var data = $("#form-makeorder-edit").serializeArray(); - alert(JSON.stringify(data)); - $.operate.save(ctx + "erp/inboundOrder/add", data); + // 获取表单数据 + const makeorderData = $("#form-makeorder-edit").serializeArray().reduce((obj, item) => { + obj[item.name] = item.value; + return obj; + }, {}); + // 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据 + var table = $('#bootstrap-sub-table-1').bootstrapTable('getData'); + //获取选中复选框行的数据 + // 将表数据转换成与complaintNoticeData格式一致的数组 + var materialDataList = table.map(function(item) { + // 根据实际字段名调整 + return { + "materialCode":item.materialCode, + "materialName": item.materialName, + "unit": item.unit, + "brand": item.brand, + "describe":item.describe, + "processMethod":item.processMethod, + "deliveryTime":item.deliveryTime, + "materialNum":item.materialNum, + "currentNum": item.currentNum, + "completedNum": item.completedNum, + + // ...其他字段 + }; + }); + + // 合并表单数据和表格数据 + const combinedData = Object.assign({}, makeorderData, { sysEquipDetailDtos: materialDataList }); + + console.log(combinedData) + // 使用 JSON.stringify() 序列化数据 + const jsonData = JSON.stringify(combinedData); + // 发送 AJAX 请求到后端接口 + $.operate.saveJson(prefix + "/addEquipmentResumeSave", jsonData); } + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html index c37577ff..72429794 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html @@ -355,8 +355,9 @@ actions.push(' 进度查看 '); } - if (row.makeStatus == "0" || row.makeStatus == "1"){ - actions.push(' 出货 '); + // 生产状态部分完成/全部完成 + if (row.makeStatus == "5" || row.makeStatus == "6"){ + actions.push(' 出货 '); } // 详情 @@ -373,6 +374,12 @@ function downloadFile(filepath) { window.location.href =prefix + "/downloadFile?filepath="+ filepath; } + + //出货 + function salesDeliverGoods(salesOrderId){ + var url = prefix + "/salesDeliverGoods/" + salesOrderId; + $.modal.open("出货",url); + }