From 7e9784b918293989a9a797c7ae76335befe1209d Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 11 Nov 2024 14:04:02 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93=E5=87=BA=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2:?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E7=9A=84=E6=8C=89=E9=92=AE=EF=BC=8C=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=87=87=E7=94=A8=E7=BB=9F=E4=B8=80=E6=A0=B7=E5=BC=8F=EF=BC=9B?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=A0=8F=E5=BC=95=E7=94=A8$.table.dropdownTo?= =?UTF-8?q?ggle=E6=96=B9=E6=B3=95=EF=BC=8C=E5=8E=BB=E6=8E=89=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E6=8C=89=E9=92=AE=E7=9A=84=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E9=87=87=E7=94=A8=E9=BB=98=E8=AE=A4=E6=A0=B7=E5=BC=8F=EF=BC=9B?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E9=94=80=E5=94=AE-=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2,=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E4=BA=BA=E5=91=98=E5=8F=AF=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9B=E4=BF=AE=E6=94=B9=E5=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= =?UTF-8?q?=E8=AE=A4=E5=8F=91=E8=B4=A7=E6=96=B9=E6=B3=95=EF=BC=9A=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E5=90=8C=E6=97=B6=E6=9B=B4=E6=96=B0=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=8D=95=E5=92=8C=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=8D=95=E7=9A=84=E9=80=81=E8=B4=A7?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AftersalesOutOrderController.java | 13 ++++ .../AftersalesWarehouseOutController.java | 22 +++--- .../service/IAftersalesOutOrderService.java | 7 ++ .../IAftersalesWarehouseOutService.java | 8 +- .../impl/AftersalesOutOrderServiceImpl.java | 36 +++++++++ .../AftersalesWarehouseOutServiceImpl.java | 74 +++++++++---------- .../SysSalesShippingInformServiceImpl.java | 2 + .../WarehouseOutOrderController.java | 8 +- .../service/IWarehouseOutOrderService.java | 6 ++ .../impl/WarehouseOutOrderServiceImpl.java | 48 +++++++++++- .../maintenanceEquipmentTwo.html | 2 +- .../warehouseOutOrder/salesOutWarehouse.html | 5 +- .../warehouseOutOrder/warehouseOutOrder.html | 49 +++++++----- 13 files changed, 202 insertions(+), 78 deletions(-) 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 55713336..41608abb 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 @@ -384,4 +384,17 @@ public String addShippingDevicesOne(@RequestParam("outOrderDetailId") Long outOr + /** + * 展示第二次维护设备出库,已经添加了的出货设备 + */ + @ResponseBody + @PostMapping("/showAddShippingDevicesTwo") + public TableDataInfo showAddShippingDevicesTwo(AftersalesOutOrder aftersalesOutOrder) + { + startPage(); + List list = aftersalesOutOrderService.showAddShippingDevicesTwo(aftersalesOutOrder); + return getDataTable(list); + } + + } 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 82c61f14..0ce07ba2 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 @@ -372,17 +372,17 @@ public class AftersalesWarehouseOutController extends BaseController /** * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息 */ - @PostMapping("/showAftersalesShippingDeviceListTwo") - @ResponseBody - public TableDataInfo showAftersalesShippingDeviceListTwo(@RequestParam("materialNo") String materialNo, - @RequestParam("salesOrderCode") String salesOrderCode, - @RequestParam("makeNo") String makeNo) - { - - startPage(); - List list = warehouseOutOrderService.showAftersalesShippingDeviceListTwo(materialNo,salesOrderCode,makeNo); - return getDataTable(list); - } +// @PostMapping("/showAftersalesShippingDeviceListTwo") +// @ResponseBody +// public TableDataInfo showAftersalesShippingDeviceListTwo(@RequestParam("materialNo") String materialNo, +// @RequestParam("salesOrderCode") String salesOrderCode, +// @RequestParam("makeNo") String makeNo) +// { +// +// startPage(); +// List list = warehouseOutOrderService.showAftersalesShippingDeviceListTwo(materialNo,salesOrderCode,makeNo); +// return getDataTable(list); +// } /** 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 5aed959c..7d592195 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 @@ -128,4 +128,11 @@ public interface IAftersalesOutOrderService * @return */ int updateMaintenanceEquipmentTwo(AftersalesOutOrder aftersalesOutOrder); + + /** + * 展示售后第二次维护设备已经添加了需要维护出货物料信息 + * @param aftersalesOutOrder + * @return + */ + List showAddShippingDevicesTwo(AftersalesOutOrder aftersalesOutOrder); } 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 f2e99701..cadae6bf 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 @@ -131,10 +131,10 @@ public interface IAftersalesWarehouseOutService int updateMaintenanceEquipmentOne(WarehouseOutOrder warehouseOutOrder); - /** - * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息 - */ - List showAftersalesShippingDeviceListTwo(String materialNo,String salesOrderCode,String makeNo); +// /** +// * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息 +// */ +// List showAftersalesShippingDeviceListTwo(WarehouseOutOrder warehouseOutOrder); /** * 修改保存售后第二次维护设备 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 8014dcd3..1efbbce8 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 @@ -524,4 +524,40 @@ public class AftersalesOutOrderServiceImpl implements IAftersalesOutOrderService return result; } + + + /** + * 展示售后第二次维护设备已经添加了需要维护出货物料信息 + * @param aftersalesOutOrder + * @return + */ + @Override + public List showAddShippingDevicesTwo(AftersalesOutOrder aftersalesOutOrder) { + String outOrderCode = aftersalesOutOrder.getOutOrderCode(); + String materialNo = aftersalesOutOrder.getMaterialNo(); + List selectShippingDeviceVOS = new ArrayList<>(); + AfterSalesShippingDevice tempShippingDevice = new AfterSalesShippingDevice(); + tempShippingDevice.setMaterialNo(materialNo); + tempShippingDevice.setOutOrderCode(outOrderCode); + List afterSalesShippingDevices = afterSalesShippingDeviceMapper.selectHasAddShippingDevice(tempShippingDevice); + convertToDeviceVOsTwo(afterSalesShippingDevices, selectShippingDeviceVOS); + + return selectShippingDeviceVOS; + } + + + //转换成vo类 + private void convertToDeviceVOsTwo(List afterSalesShippingDevices, List selectShippingDeviceVOS) { + for (AfterSalesShippingDevice device : afterSalesShippingDevices) { + SelectShippingDeviceVO selectShippingDeviceVO = new SelectShippingDeviceVO(); + selectShippingDeviceVO.setShippingDeviceId(device.getShippingDeviceId()); + selectShippingDeviceVO.setDeviceModelCode(device.getDeviceModelCode()); + selectShippingDeviceVO.setDeviceRunningNumber(device.getDeviceRunningNumber()); + selectShippingDeviceVO.setMakePhotoUrl(device.getMakePhotourl()); + selectShippingDeviceVO.setAddShippingDeviceFlag(device.getAddShippingDeviceFlag()); + selectShippingDeviceVO.setSnCode(device.getSnCode()); + selectShippingDeviceVOS.add(selectShippingDeviceVO); + } + } + } 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 12352ef4..6ef12556 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 @@ -298,43 +298,43 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); } - /** - * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息 - */ - @Override - public List showAftersalesShippingDeviceListTwo(String materialNo,String salesOrderCode,String makeNo) { - - List selectShippingDeviceVOs = new ArrayList<>(); - AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); - afterSalesShippingDevice.setMaterialNo(materialNo); - afterSalesShippingDevice.setSalesOrderCode(salesOrderCode); - afterSalesShippingDevice.setMakeNo(makeNo); - List afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(afterSalesShippingDevice); - List filterAfterSalesShippingDevices = afterSalesShippingDevices.stream().filter(shippingDevice -> "0".equals(shippingDevice.getAddShippingDeviceFlag())).collect(Collectors.toList()); - if (!StringUtils.isNotEmpty(filterAfterSalesShippingDevices)) { - // 记录日志 - log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",materialNo); - } - - for (AfterSalesShippingDevice tempAfterSalesShippingDevice : filterAfterSalesShippingDevices) { - SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO(); - shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId()); - shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode()); - shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber()); - shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl()); - shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode()); - shippingDeviceVO.setSnCode(tempAfterSalesShippingDevice.getSnCode()); - shippingDeviceVO.setFactoryDate(tempAfterSalesShippingDevice.getFactoryDate()); - shippingDeviceVO.setGuaranteePeriod(tempAfterSalesShippingDevice.getGuaranteePeriod()); - shippingDeviceVO.setLockDate(tempAfterSalesShippingDevice.getLockDate()); - shippingDeviceVO.setLockDateFlag(tempAfterSalesShippingDevice.getLockDateFlag()); - shippingDeviceVO.setWastageExpireDate(tempAfterSalesShippingDevice.getWastageExpireDate()); - shippingDeviceVO.setComponentGuaranteeDate(tempAfterSalesShippingDevice.getComponentGuaranteeDate()); - selectShippingDeviceVOs.add(shippingDeviceVO); - - } - return selectShippingDeviceVOs; - } +// /** +// * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息 +// */ +// @Override +// public List showAftersalesShippingDeviceListTwo(String materialNo,String salesOrderCode,String makeNo) { +// +// List selectShippingDeviceVOs = new ArrayList<>(); +// AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); +// afterSalesShippingDevice.setMaterialNo(materialNo); +// afterSalesShippingDevice.setSalesOrderCode(salesOrderCode); +// afterSalesShippingDevice.setMakeNo(makeNo); +// List afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(afterSalesShippingDevice); +// List filterAfterSalesShippingDevices = afterSalesShippingDevices.stream().filter(shippingDevice -> "0".equals(shippingDevice.getAddShippingDeviceFlag())).collect(Collectors.toList()); +// if (!StringUtils.isNotEmpty(filterAfterSalesShippingDevices)) { +// // 记录日志 +// log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",materialNo); +// } +// +// for (AfterSalesShippingDevice tempAfterSalesShippingDevice : filterAfterSalesShippingDevices) { +// SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO(); +// shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId()); +// shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode()); +// shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber()); +// shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl()); +// shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode()); +// shippingDeviceVO.setSnCode(tempAfterSalesShippingDevice.getSnCode()); +// shippingDeviceVO.setFactoryDate(tempAfterSalesShippingDevice.getFactoryDate()); +// shippingDeviceVO.setGuaranteePeriod(tempAfterSalesShippingDevice.getGuaranteePeriod()); +// shippingDeviceVO.setLockDate(tempAfterSalesShippingDevice.getLockDate()); +// shippingDeviceVO.setLockDateFlag(tempAfterSalesShippingDevice.getLockDateFlag()); +// shippingDeviceVO.setWastageExpireDate(tempAfterSalesShippingDevice.getWastageExpireDate()); +// shippingDeviceVO.setComponentGuaranteeDate(tempAfterSalesShippingDevice.getComponentGuaranteeDate()); +// selectShippingDeviceVOs.add(shippingDeviceVO); +// +// } +// return selectShippingDeviceVOs; +// } /** * 修改保存售后第二次维护设备 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java index 1cda2ade..194f023f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java @@ -326,6 +326,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor log.warn("出库单号为空:{}",outOrderCode); } WarehouseOutOrder warehouseOutOrder = warehouseOutOrderMapper.selectWarehouseOutOrderByCode(outOrderCode); + warehouseOutOrder.setDeliveryDate(sysSalesShippingInform.getDeliverTime()); warehouseOutOrder.setWarehouseOutStatus("3"); warehouseOutOrder.setUpdateBy(loginName); warehouseOutOrder.setUpdateTime(new Date()); @@ -338,6 +339,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor aftersalesOutOrder.setWarehouseOutStatus("3"); aftersalesOutOrder.setUpdateBy(loginName); aftersalesOutOrder.setUpdateTime(new Date()); + aftersalesOutOrder.setDeliveryDate(sysSalesShippingInform.getDeliverTime()); int updateAftersalesOutOrderResult = aftersalesOutOrderMapper.updateAftersalesOutOrderByOutOrderCode(aftersalesOutOrder); if (updateAftersalesOutOrderResult <= 0){ throw new BusinessException("更新售后出库单数据失败"); 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 58fc6565..cb68dfcd 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 @@ -233,16 +233,14 @@ public class WarehouseOutOrderController extends BaseController /** - * 销售单-出库 物料信息关联设备信息 + * 销售单-出库 物料信息关联设备子表信息 */ @PostMapping("/getShippingDeviceList") @ResponseBody - public TableDataInfo getShippingDeviceList(@RequestParam("materialNo") String materialNo, - @RequestParam("salesOrderCode") String salesOrderCode, - @RequestParam("makeNo") String makeNo) + public TableDataInfo getShippingDeviceList(WarehouseOutOrder warehouseOutOrder) { startPage(); - List list = aftersalesWarehouseOutService.showAftersalesShippingDeviceListTwo(materialNo,salesOrderCode,makeNo); + List list = warehouseOutOrderService.showAftersalesShippingDeviceListTwo(warehouseOutOrder); return getDataTable(list); } 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 3ea74599..d2282fa3 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 @@ -2,6 +2,7 @@ package com.ruoyi.warehouse.service; import java.util.List; +import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderPickingVo; import com.ruoyi.system.domain.SysMakeorderPickVo; import com.ruoyi.system.domain.SysSalesOrder; @@ -135,4 +136,9 @@ public interface IWarehouseOutOrderService int generateWarehouseOutOrderByBaseEmpRequisiteOrder(BaseEmpRequisiteOrderVO baseEmpRequisiteOrderVO); int updateOutsourceOutWarehouse(WarehouseOutOrder warehouseOutOrder); + + /** + * 销售单-出库 物料信息关联设备子表信息 + */ + List showAftersalesShippingDeviceListTwo(WarehouseOutOrder warehouseOutOrder); } 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 a8bfce46..e6f5050f 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 @@ -4,8 +4,11 @@ import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; import com.ruoyi.aftersales.domain.AftersalesOutOrder; import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail; +import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; +import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper; import com.ruoyi.aftersales.mapper.AftersalesOutOrderDetailMapper; import com.ruoyi.aftersales.mapper.AftersalesOutOrderMapper; import com.ruoyi.common.core.redis.RedisCache; @@ -106,6 +109,9 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService @Autowired private AftersalesOutOrderDetailMapper aftersalesOutOrderDetailMapper; + @Autowired + private AfterSalesShippingDeviceMapper shippingDeviceMapper; + /** * 查询仓库出库单 * @@ -411,7 +417,46 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService return updateWarehouseOutOrderResult; } -// 更新物料对应库存查询记录 + + + /** + * 销售单-出库 物料信息关联设备子表信息 + */ + @Override + public List showAftersalesShippingDeviceListTwo(WarehouseOutOrder warehouseOutOrder) { + + List selectShippingDeviceVOs = new ArrayList<>(); + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setMaterialNo(warehouseOutOrder.getMaterialNo()); + afterSalesShippingDevice.setOutOrderCode(warehouseOutOrder.getOutOrderCode()); + List afterSalesShippingDevices = shippingDeviceMapper.selectHasAddShippingDevice(afterSalesShippingDevice); + if (!StringUtils.isNotEmpty(afterSalesShippingDevices)) { + // 记录日志 + log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",warehouseOutOrder.getMaterialNo()); + log.warn("未查找到与物料号关联的出库设备数据, 出库单号: {}",warehouseOutOrder.getOutOrderCode()); + } + + 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()); + shippingDeviceVO.setSnCode(tempAfterSalesShippingDevice.getSnCode()); + shippingDeviceVO.setFactoryDate(tempAfterSalesShippingDevice.getFactoryDate()); + shippingDeviceVO.setGuaranteePeriod(tempAfterSalesShippingDevice.getGuaranteePeriod()); + shippingDeviceVO.setLockDate(tempAfterSalesShippingDevice.getLockDate()); + shippingDeviceVO.setLockDateFlag(tempAfterSalesShippingDevice.getLockDateFlag()); + shippingDeviceVO.setWastageExpireDate(tempAfterSalesShippingDevice.getWastageExpireDate()); + shippingDeviceVO.setComponentGuaranteeDate(tempAfterSalesShippingDevice.getComponentGuaranteeDate()); + selectShippingDeviceVOs.add(shippingDeviceVO); + + } + return selectShippingDeviceVOs; + } + + // 更新物料对应库存查询记录 public int updateWarehouseInventoryInquiry(WarehouseOutOrderDetail outOrderDetail,WarehouseInventoryInquiry inventoryInquiry){ // 更新可用库存数 BigDecimal stockNum = inventoryInquiry.getAvailableStockNum(); @@ -1355,6 +1400,7 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService } } + /** * 仓库出库单通用修改保持方法 * */ diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentTwo.html b/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentTwo.html index 0302b451..9c76d828 100644 --- a/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentTwo.html +++ b/ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentTwo.html @@ -262,7 +262,7 @@ var childTableId = 'child_table_'+index; $detail.html('
'); $('#'+childTableId).bootstrapTable({ - url: prefix + "/showAddShippingDevicesOne", + url: prefix + "/showAddShippingDevicesTwo", method: 'post', sidePagination: "server", contentType: "application/x-www-form-urlencoded", diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html index cb12ce9b..8244846c 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/salesOutWarehouse.html @@ -31,7 +31,7 @@
- +
@@ -268,7 +268,8 @@ queryParams : { materialNo: row.materialNo, salesOrderCode:warehouseOutOrder.salesOrderCode, - makeNo:warehouseOutOrder.makeNo + makeNo:warehouseOutOrder.makeNo, + outOrderCode:warehouseOutOrder.outOrderCode }, columns: [ { 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 2e67e78b..235abe26 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/warehouseOutOrder.html @@ -56,7 +56,7 @@
@@ -102,6 +102,7 @@ restoreUrl: prefix + "/restore/{id}", exportUrl: prefix + "/export", modalName: "仓库出库单", + showFooter: true, detailView: true, onExpandRow : function(index, row, $detail) { initChildTable(index, row, $detail); @@ -150,10 +151,24 @@ { title: '物料合计', field: 'materialSum', + formatter: function(value) { + var sum = 0; + for (var i in value) { + sum += parseFloat(value[i].materialSum) || 0; + } + return "总物料合计: " + sum.toFixed(2); + } }, { title: '数量合计', field: 'enterpriseSum', + formatter: function(value) { + var sum = 0; + for (var i in value) { + sum += parseFloat(value[i].enterpriseSum) || 0; + } + return "总数量合计: " + sum.toFixed(2); + } }, { title: '出库数', @@ -194,68 +209,68 @@ var actions = []; /*销售单-准备物料*/ if (row.warehouseOutStatus == 0 && row.warehouseOrderType == 0 && row.warehouseOutType == 0){ - actions.push('准备物料 '); - actions.push('详情 '); + actions.push('准备物料 '); + actions.push('详情 '); } /*销售单-出库*/ if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 0 && row.warehouseOutType == 0){ - actions.push('出库 '); + actions.push('出库 '); } /*销售单-出库详情*/ if (row.warehouseOrderType == 0 && row.warehouseOutType == 0 && row.warehouseOutStatus != 0 ){ - actions.push('详情 '); + actions.push('详情 '); } /*生产单-出库*/ if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 1 && row.warehouseOutType == 1){ - actions.push('出库 '); + actions.push('出库 '); } /*生产单-出库 详情*/ if (row.warehouseOrderType == 1 && row.warehouseOutType == 1){ - actions.push('详情 '); + actions.push('详情 '); } /*请购单-出库*/ if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 2 && row.warehouseOutType == 2){ - actions.push('出库 '); + actions.push('出库 '); } /*请购单-出库 详情*/ if (row.warehouseOrderType == 2 && row.warehouseOutType == 2){ - actions.push('详情 '); + actions.push('详情 '); } /*退换货-出库*/ if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 4 && row.warehouseOutType == 4){ - actions.push('出库 '); + actions.push('出库 '); } /*退换货-出库详情*/ if (row.warehouseOrderType == 4 && row.warehouseOutType == 4){ - actions.push('详情 '); + actions.push('详情 '); } /*开发修改单-出库*/ if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 5 && row.warehouseOutType == 5){ - actions.push('出库 '); + actions.push('出库 '); } /*开发修改单-出库详情*/ if (row.warehouseOrderType == 5 && row.warehouseOutType == 5){ - actions.push('详情 '); + actions.push('详情 '); } /*委外单-出库*/ if (row.warehouseOutStatus == 4 && row.warehouseOrderType == 3 && row.warehouseOutType == 3){ - actions.push('出库 '); + actions.push('出库 '); } /*生产单-出库 详情*/ if (row.warehouseOrderType == 3 && row.warehouseOutType == 3){ - actions.push('详情 '); + actions.push('详情 '); } - - return actions.join(''); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }] };