From 23078739a38225c815ddc4bfa1340911392b1cec Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 12 Jul 2024 09:50:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[feat]=20=E9=94=80=E5=94=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20=E5=94=AE?= =?UTF-8?q?=E5=90=8E=E7=AE=A1=E7=90=86=20=E6=96=B0=E5=A2=9E=20=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=87=BA=E5=BA=93=E8=AF=A6=E6=83=85=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=20=E6=96=B0=E5=A2=9E=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AE=A2=E6=88=B7=E9=AA=8C=E6=94=B6=20=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E5=AD=90=E8=A1=A8=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=87=BA=E5=BA=93=E5=8D=95=E5=8F=B7=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=87=BA=E5=BA=93=E5=8D=95=E6=95=B0=E6=8D=AE=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E9=AA=8C=E6=94=B6=E5=92=8C=E8=AF=A6=E6=83=85=E6=9D=83?= =?UTF-8?q?=E9=99=90=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SysSalesShippingInformController.java | 25 ++ .../ISysSalesShippingInformService.java | 5 + .../SysSalesShippingInformServiceImpl.java | 13 +- .../mapper/WarehouseOutOrderMapper.java | 9 + .../warehouse/WarehouseOutOrderMapper.xml | 45 ++++ .../customerCheckGoodsDetail.html | 245 ++++++++++++++++++ .../salesShippingInform.html | 14 +- 7 files changed, 350 insertions(+), 6 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/system/salesShippingInform/customerCheckGoodsDetail.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java index 66f82046..80797f99 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java @@ -220,6 +220,31 @@ public class SysSalesShippingInformController extends BaseController + + /** + * 详情 + */ + @GetMapping("/customerCheckGoodsDetail/{shippingInformId}") + public String customerCheckGoodsDetail(@PathVariable("shippingInformId") Long shippingInformId, ModelMap mmap) + { + SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformService.selectSysSalesShippingInformById(shippingInformId); + mmap.put("sysSalesShippingInform", sysSalesShippingInform); + return prefix + "/customerCheckGoodsDetail"; + } + + /** + * 修改保存详情 + */ + @RequiresPermissions("system:salesShippingInform:customerCheckGoodsDetail") + @Log(title = "销售取消发货", businessType = BusinessType.UPDATE) + @PostMapping("/customerCheckGoodsDetail") + @ResponseBody + public AjaxResult customerCheckGoodsDetailSave(@RequestBody SysSalesShippingInform sysSalesShippingInform) + { + return toAjax(sysSalesShippingInformService.updateCustomerCheckGoodsDetail(sysSalesShippingInform)); + } + + /** * 客户验收 物料信息信息 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java index 01fb4f01..634d508c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java @@ -101,4 +101,9 @@ public interface ISysSalesShippingInformService * 客户验收查询物料相关数据 * */ List getMaterialListByOutOrderCode(SysSalesShippingInform sysSalesShippingInform); + + /** + * 客户验收详情 + * */ + int updateCustomerCheckGoodsDetail(SysSalesShippingInform sysSalesShippingInform); } 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 a5a7eb57..0616334c 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 @@ -295,7 +295,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor } } //设置出货状态为全部验收 - sysSalesShippingInform.setWarehouseOutStatus("11"); + sysSalesShippingInform.setWarehouseOutStatus("12"); //更新出库状态 WarehouseOutOrder warehouseOutOrder = new WarehouseOutOrder(); @@ -304,7 +304,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor warehouseOutOrder.setUpdateBy(loginName); //设置为全部验收 warehouseOutOrder.setWarehouseOutStatus("12"); - int updateWarehouseOutOrdeResult = warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); + int updateWarehouseOutOrdeResult = warehouseOutOrderMapper.updateWarehouseOutOrderByCode(warehouseOutOrder); if (updateWarehouseOutOrdeResult <= 0){ throw new BusinessException("更新出库单数据失败"); } @@ -338,4 +338,13 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor List list = shippingInformDetailMapper.selectSysSalesShippingInformDetailByCode(outOrderCode); return list; } + + /** + * 客户验收详情 + * */ + @Override + public int updateCustomerCheckGoodsDetail(SysSalesShippingInform sysSalesShippingInform) { + + return 1; + } } 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 99ed744c..df447fae 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 @@ -52,6 +52,15 @@ public interface WarehouseOutOrderMapper */ public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder); + /** + * 修改仓库出库单 + * + * @param warehouseOutOrder 仓库出库单 + * @return 结果 + */ + public int updateWarehouseOutOrderByCode(WarehouseOutOrder warehouseOutOrder); + + /** * 删除仓库出库单 * diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml index 728613f3..79f25077 100644 --- a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderMapper.xml @@ -221,6 +221,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where out_order_id = #{outOrderId} + + + update warehouse_out_order + + out_order_code = #{outOrderCode}, + make_no = #{makeNo}, + warehouse_out_status = #{warehouseOutStatus}, + related_order_code = #{relatedOrderCode}, + sales_order_code = #{salesOrderCode}, + warehouse_order_type = #{warehouseOrderType}, + out_make_code = #{outMakeCode}, + warehouse_out_type = #{warehouseOutType}, + requisitioning_code = #{requisitioningCode}, + business_name = #{businessName}, + aftersales_name = #{aftersalesName}, + warehouse_name = #{warehouseName}, + shipping_device_id = #{shippingDeviceId}, + material_no = #{materialNo}, + material_name = #{materialName}, + material_sum = #{materialSum}, + enterprise_sum = #{enterpriseSum}, + out_order_sum = #{outOrderSum}, + out_order_name = #{outOrderName}, + out_order_time = #{outOrderTime}, + customer_id = #{customerId}, + customer_name = #{customerName}, + apply_name = #{applyName}, + supplier_code = #{supplierCode}, + plan_delivery_time = #{planDeliveryTime}, + supplier_name = #{supplierName}, + delivery_condition = #{deliveryCondition}, + delivery_address = #{deliveryAddress}, + delivery_name = #{deliveryName}, + delivery_number = #{deliveryNumber}, + create_by = #{createBy}, + create_time = #{createTime}, + delivery_date = #{deliveryDate}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where out_order_code = #{outOrderCode} + + + delete from warehouse_out_order where out_order_id = #{outOrderId} diff --git a/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/customerCheckGoodsDetail.html b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/customerCheckGoodsDetail.html new file mode 100644 index 00000000..6c1f9655 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/customerCheckGoodsDetail.html @@ -0,0 +1,245 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html index 173fa6e4..9b7c6803 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/salesShippingInform.html @@ -71,8 +71,8 @@ var cancelFlag = [[${@permission.hasPermi('system:salesShippingInform:cancel')}]]; var restoreFlag = [[${@permission.hasPermi('system:salesShippingInform:restore')}]]; var confirmShippingFlag = [[${@permission.hasPermi('system:salesShippingInform:confirmShipping')}]]; - - + var customerCheckGoodsFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoods')}]]; + var customerCheckGoodsDetailFlag = [[${@permission.hasPermi('system:salesShippingInform:customerCheckGoodsDetail')}]]; @@ -222,12 +222,12 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); + actions.push('详情 '); if(row.warehouseOutStatus == '2'){ actions.push('确认发货 '); } if(row.warehouseOutStatus == '10' || row.warehouseOutStatus == '11'){ - actions.push('确认验收 '); + actions.push('确认验收 '); } return actions.join(''); @@ -248,6 +248,12 @@ var url = prefix +'/customerCheckGoods/' + shippingInformId; $.modal.open("客户验收",url); } + + //详情 + function customerCheckGoodsDetail(shippingInformId){ + var url = prefix +'/customerCheckGoodsDetail/' + shippingInformId; + $.modal.open("详情",url); + } \ No newline at end of file From da75a3a98a901f78a7759082d6e3564012e0db70 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 12 Jul 2024 11:28:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[feat]=20=E9=94=80=E5=94=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20=E5=94=AE?= =?UTF-8?q?=E5=90=8E=E7=AE=A1=E7=90=86=20=E7=94=9F=E4=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E6=96=B0=E5=A2=9E=20=E6=A0=B9=E6=8D=AE=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=8D=95=E5=8F=B7=E6=9F=A5=E8=AF=A2=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E6=A0=B9=E6=8D=AE=20=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=8D=95=E5=8F=B7=E5=92=8C=E7=89=A9=E6=96=99=E5=8F=B7=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=94=80=E5=94=AE=E5=87=BA=E8=B4=A7=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E9=80=9A=E8=BF=87=E9=94=80=E5=94=AE?= =?UTF-8?q?=E5=8F=91=E8=B5=B7=E5=87=BA=E8=B4=A7=E7=94=9F=E6=88=90=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=87=BA=E8=B4=A7=E9=80=9A=E7=9F=A5=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=E4=B8=AD=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=E7=9A=84=E5=AD=97=E6=AE=B5=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=E9=94=80=E5=94=AE=E5=8D=95?= =?UTF-8?q?-=E5=87=BA=E5=BA=93=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=B8=AD=E6=96=B0=E5=A2=9E=E5=8A=A0=20?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=9B=B4=E6=96=B0=E9=94=80=E5=94=AE=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E8=AF=A6=E6=83=85=E6=95=B0=E6=8D=AE=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20=E5=87=86=E5=A4=87=E7=89=A9=E6=96=99=E4=B8=AD?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=95=B0=E6=8D=AE=E4=BC=A0=E9=80=92=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E5=90=8E=E7=AB=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AftersalesWarehouseOutServiceImpl.java | 1 + .../system/mapper/SysMakeOrderMapper.java | 5 +++ .../SysSalesShippingInformDetailMapper.java | 11 ++++++ .../SysSalesShippingInformServiceImpl.java | 9 ++++- .../impl/WarehouseOutOrderServiceImpl.java | 36 ++++++++++++++++++- .../mapper/system/SysMakeOrderMapper.xml | 7 ++++ .../SysSalesShippingInformDetailMapper.xml | 34 ++++++++++++++++++ .../warehouseOutOrder/prepareMaterial.html | 18 +++++----- 8 files changed, 110 insertions(+), 11 deletions(-) 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 cf8cdac4..139a2ab5 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 @@ -16,6 +16,7 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.SysSalesOrder; import com.ruoyi.system.domain.SysSalesOrderChild; import com.ruoyi.system.domain.SysSalesShippingInform; +import com.ruoyi.system.domain.SysSalesShippingInformDetail; import com.ruoyi.system.mapper.SysSalesOrderChildMapper; import com.ruoyi.system.mapper.SysSalesOrderMapper; import com.ruoyi.system.mapper.SysSalesShippingInformMapper; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java index c31a1a5f..ac8f7703 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeOrderMapper.java @@ -119,4 +119,9 @@ public interface SysMakeOrderMapper * 根据入库单号查询生产单号 * */ String selectMakeByWarehouseStorageCode(String warehouseStorageCode); + + /* + * 根据销售单号查询生产订单 + * */ + SysMakeOrder selectMakeOrderBySaleNo(String salesOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformDetailMapper.java index 0bdcba7e..1fafefc5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformDetailMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformDetailMapper.java @@ -43,6 +43,17 @@ public interface SysSalesShippingInformDetailMapper */ public int updateSysSalesShippingInformDetail(SysSalesShippingInformDetail sysSalesShippingInformDetail); + + + /** + * 修改销售出货通知详情 + * + * @param sysSalesShippingInformDetail 销售出货通知详情 + * @return 结果 + */ + public int updateSysSalesShippingInformDetailByCodeAndNo(SysSalesShippingInformDetail sysSalesShippingInformDetail); + + /** * 删除销售出货通知详情 * 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 0616334c..ac717d43 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 @@ -189,6 +189,11 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor sysSalesShippingInform.setMaterialSum(Math.toIntExact(sysSalesOrderVo.getMaterialSum())); //更新数量合计 sysSalesShippingInform.setEnterpriseSum(Math.toIntExact(sysSalesOrderVo.getEnterpriseSum())); + sysSalesShippingInform.setCustomerContact(sysSalesOrderVo.getCustomerDelivery()); + sysSalesShippingInform.setContactNumber(sysSalesOrderVo.getDeliveryPhone()); + sysSalesShippingInform.setCustomerContactAddress(sysSalesOrderVo.getDeliveryAddress()); + + //更新销售出库详情数据 List sysSalesOrderChildList = sysSalesOrder.getSysSalesOrderChildList(); @@ -204,6 +209,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor sysSalesShippingInformDetail.setMaterialProcessMethod(sysSalesOrderChild.getProcessMethod()); sysSalesShippingInformDetail.setMakeNum(sysSalesOrderChild.getMaterialNum()); sysSalesShippingInformDetail.setHasOutOrderNum(sysSalesOrderChild.getOutBoundQuantity()); + sysSalesShippingInformDetail.setThisShippingNum(sysSalesOrderChild.getApplyShippingNum()); sysSalesShippingInformDetail.setCreateBy(loginName); sysSalesShippingInformDetail.setCreateTime(new Date()); shippingInformDetailMapper.insertSysSalesShippingInformDetail(sysSalesShippingInformDetail); @@ -236,10 +242,11 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor warehouseOutOrder.setUpdateTime(new Date()); //更新销售订单的出货状态 +// SysSalesShippingInform tempShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); SysSalesOrder sysSalesOrder = new SysSalesOrder(); sysSalesOrder.setUpdateBy(loginName); sysSalesOrder.setUpdateTime(new Date()); - sysSalesOrder.setSalesOrderCode(sysSalesShippingInform.getSalesOrderCode()); + sysSalesOrder.setSalesOrderCode(warehouseOutOrder.getSalesOrderCode()); //暂收设置为全部出货 sysSalesOrder.setDeliveryStatus("6"); int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); 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 b41417da..98b20d90 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 @@ -62,6 +62,9 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService private SysSalesShippingInformMapper shippingInformMapper; + @Autowired + private SysSalesShippingInformDetailMapper shippingInformDetailMapper; + /** * 查询仓库出库单 * @@ -232,8 +235,20 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService sysSalesOrderChild.setQuoteId(warehouseOutOrder.getSalesOrderCode()); sysSalesOrderChild.setMaterialCode(warehouseOutOrderDetail.getMaterialNo()); sysSalesOrderChild.setOutBoundQuantity(warehouseOutOrderDetail.getActualOutOrderSum()); + sysSalesOrderChild.setUpdateBy(loginName); + sysSalesOrderChild.setUpdateTime(new Date()); int updateSalesOrderChildResult = salesOrderChildMapper.updateSysSalesOrderChildByCodeAndQuoteId(sysSalesOrderChild); if (updateSalesOrderChildResult <= 0){ + throw new BusinessException("更新销售订单子表数据失败"); + } + SysSalesShippingInformDetail sysSalesShippingInformDetail = new SysSalesShippingInformDetail(); + sysSalesShippingInformDetail.setHasOutOrderNum(warehouseOutOrderDetail.getActualOutOrderSum()); + sysSalesShippingInformDetail.setUpdateBy(loginName); + sysSalesShippingInformDetail.setUpdateTime(new Date()); + sysSalesShippingInformDetail.setOutOrderCode(warehouseOutOrder.getOutOrderCode()); + sysSalesShippingInformDetail.setMaterialNo(warehouseOutOrderDetail.getMaterialNo()); + int updateShippingInformDetailResult = shippingInformDetailMapper.updateSysSalesShippingInformDetailByCodeAndNo(sysSalesShippingInformDetail); + if (updateShippingInformDetailResult <= 0){ throw new BusinessException("更新销售出库详情数据失败"); } warehouseOutOrderDetail.setUpdateBy(loginName); @@ -579,6 +594,18 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService WarehouseOutOrder warehouseOutOrder = new WarehouseOutOrder(); warehouseOutOrder.setOutOrderCode(outOrderCode); + //添加生产单号 + SysMakeOrder makeOrder = sysMakeOrderMapper.selectMakeOrderBySaleNo(salesOrderCode); + if (makeOrder == null){ + log.warn("生产订单编号为空:{}",makeOrder.getMakeNo()); + } + + + warehouseOutOrder.setDeliveryName(sysSalesOrderVo.getCustomerDelivery()); + warehouseOutOrder.setDeliveryNumber(sysSalesOrderVo.getDeliveryPhone()); + warehouseOutOrder.setDeliveryAddress(sysSalesOrderVo.getDeliveryAddress()); + + warehouseOutOrder.setMakeNo(makeOrder.getMakeNo()); //出库状态为 待仓库准备物料 warehouseOutOrder.setWarehouseOutStatus("0"); warehouseOutOrder.setRelatedOrderCode(salesOrderCode); @@ -587,10 +614,17 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService warehouseOutOrder.setWarehouseOrderType("0"); //出库类型设置为 销售出库 warehouseOutOrder.setWarehouseOutType("0"); + + //物料合计 + warehouseOutOrder.setMaterialSum(Math.toIntExact(sysSalesOrderVo.getMaterialSum())); + //数量合计 + warehouseOutOrder.setEnterpriseSum(Math.toIntExact(sysSalesOrderVo.getEnterpriseSum())); + + warehouseOutOrder.setBusinessName(sysSalesOrderVo.getBusinessMembers()); warehouseOutOrder.setCustomerId(sysSalesOrderVo.getEnterpriseCode()); warehouseOutOrder.setCustomerName(sysSalesOrderVo.getEnterpriseName()); - warehouseOutOrder.setApplyName(sysSalesOrderVo.getApplyUserName()); + warehouseOutOrder.setApplyName(sysSalesOrderVo.getApplyUser()); warehouseOutOrder.setDeliveryCondition(sysSalesOrderVo.getDeliveryConditions()); warehouseOutOrder.setCreateTime(new Date()); warehouseOutOrder.setCreateBy(ShiroUtils.getLoginName()); diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml index 3a86a777..e0673d57 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml @@ -270,6 +270,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + +
@@ -25,49 +25,49 @@
- +
- +
- +
- +
- +
- +
- +
- +
From 8a44f2b5bd4805fde258a245fff0a5bb73228094 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 12 Jul 2024 15:37:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[feat]=20=E9=87=87=E8=B4=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=20=E5=93=81=E8=B4=A8=20=E4=BF=AE=E6=94=B9=20=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=93=81=E8=B4=A8=E4=B8=8D=E5=90=88=E6=A0=BC=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E7=9A=84=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E6=9D=A1=E4=BB=B6=E5=A6=82=E6=9E=9C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E4=B8=8D=E5=90=88=E6=A0=BC=E6=95=B0=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E8=AE=A1=E7=AE=97=E4=B8=8D=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E6=95=B0=E9=87=8F=20=E5=8E=BB=E6=8E=89=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=BF=85=E9=A1=BB=E9=80=89=E6=8B=A9=E4=B8=80=E6=9D=A1=E4=B8=8D?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E5=88=86=E7=B1=BB=E7=9A=84=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/QualityOrderReportServiceImpl.java | 6 +++++- .../quality/qualityOrder/qualityOrderReport.html | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java index 5c49c6ee..ffae4fbb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderReportServiceImpl.java @@ -162,7 +162,11 @@ public class QualityOrderReportServiceImpl implements IQualityOrderReportService // } //计算不良数量的合计值 - int processBadNumTotal = unqualifiedDataList.stream().mapToInt(QualityOrderReportUnqualified::getProcessBadNum).sum(); + + int processBadNumTotal = 0; + if (!CollectionUtils.isEmpty(unqualifiedDataList)){ + processBadNumTotal = unqualifiedDataList.stream().mapToInt(QualityOrderReportUnqualified::getProcessBadNum).sum(); + } //后续处理本次到货数 // if (processBadNumTotal>thisArrivedNum){ diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html index d5fe67da..af3206a2 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html @@ -120,10 +120,10 @@ // 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据 var table = $('#bootstrap-unqualified-table').bootstrapTable('getData'); // 检查表格数据是否为空 - if (table.length === 0) { - $.modal.alertWarning("请至少添加一条不合格数再保存!"); - return; - } + // if (table.length === 0) { + // $.modal.alertWarning("请至少添加一条不合格数再保存!"); + // return; + // } console.log(JSON.stringify(table)); // 将表数据转换成与qualityReportData格式一致的数组 var unqualifiedDataList = table.map(function (item) {