From a30fc15ff4ba10c8c0fcf2707d0525eb13a1b101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Sat, 23 Nov 2024 09:49:39 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E5=85=A5=E5=BA=93=E5=8D=95=20=E6=96=B0=E5=A2=9E=E6=8C=89?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E5=8F=B7=E6=89=B9=E9=87=8F=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=85=A5=E5=BA=93=E5=8D=95=E8=AE=B0=E5=BD=95service?= =?UTF-8?q?=E5=92=8Cmapper=E6=96=B9=E6=B3=95=EF=BC=9B=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93=E5=8D=95controller?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E6=96=B9=E6=B3=95=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=BC=E5=87=BA=E5=85=A5=E5=BA=93=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=96=B9=E6=B3=95=EF=BC=8C=E5=AE=9E=E7=8E=B0=E5=A4=9A?= =?UTF-8?q?=E9=80=89=E5=92=8C=E5=85=A8=E9=83=A8=E5=AF=BC=E5=87=BA=EF=BC=9B?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A0=8F=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=AF=BC=E5=87=BA=E6=96=B9=E6=B3=95=EF=BC=9B=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0=E7=94=9F=E4=BA=A7=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E9=A1=B5=E9=9D=A2=E8=A1=A8=E6=A0=BC=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ErpInboundOrderController.java | 30 +++++++++++++--- .../mapper/WarehouseStorageOrderMapper.java | 3 ++ .../IWarehouseStorageOrderService.java | 3 ++ .../WarehouseStorageOrderServiceImpl.java | 5 +++ .../warehouse/WarehouseStorageOrderMapper.xml | 11 ++++++ .../erp/inboundOrder/inboundOrder.html | 35 ++++++++++++++----- .../system/makeorder/addProduceInbound.html | 2 +- 7 files changed, 76 insertions(+), 13 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java index 2fe3b144..0c083a63 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java @@ -9,6 +9,7 @@ import com.ruoyi.quality.service.IQualityOrderService; import com.ruoyi.system.domain.SysSalesOrderChild; import com.ruoyi.system.dto.SysEquipMaterialDto; import com.ruoyi.system.service.ISysSalesOrderChildService; +import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamageChild; import com.ruoyi.warehouse.domain.WarehouseStorageOrder; import com.ruoyi.warehouse.service.IWarehouseStorageOrderService; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -16,6 +17,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; @@ -63,6 +65,17 @@ public class ErpInboundOrderController extends BaseController @PostMapping("/list") @ResponseBody public TableDataInfo list(WarehouseStorageOrder storageOrder) + { + startPage(); + List list = storageOrderService.selectWarehouseStorageOrderList(storageOrder); + return getDataTable(list); + } + /** + * 查询生产入库单列表 + */ + @PostMapping("/makeStorageList") + @ResponseBody + public TableDataInfo makeStorageList(WarehouseStorageOrder storageOrder) { startPage(); List list = storageOrderService.selectWarehouseStorageOrderList(storageOrder); @@ -78,11 +91,20 @@ public class ErpInboundOrderController extends BaseController @Log(title = "入库单", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(QualityOrder qualityOrder) + public AjaxResult export(WarehouseStorageOrder storageOrder,String ids) { - List list = qualityOrderService.selectAllMakeQualityOrderList(qualityOrder); - ExcelUtil util = new ExcelUtil(QualityOrder.class); - return util.exportExcel(list, "入库单数据"); + storageOrder.setWarehouseOrderType("1"); + storageOrder.setWarehouseStorageType("5"); + if (StringUtils.isEmpty(ids)){ + List list = storageOrderService.selectWarehouseStorageOrderList(storageOrder); + ExcelUtil util = new ExcelUtil(WarehouseStorageOrder.class); + return util.exportExcel(list, "入库单数据"); + }else { + String[] storageCodes = ids.split(","); + List list = storageOrderService.selectStorageOrderListByCodes(storageCodes); + ExcelUtil util = new ExcelUtil(WarehouseStorageOrder.class); + return util.exportExcel(list, ids); + } } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java index a0daafa0..788b1c0e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseStorageOrderMapper.java @@ -144,4 +144,7 @@ public interface WarehouseStorageOrderMapper * 查询委外入库通知单列表数据 * */ List selectOutsourceStorageOrderList(WarehouseStorageOrder warehouseStorageOrder); + + //根据入库单号批量查询 + List selectStorageOrderListByCodes(String[] ids); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java index acf1537a..8f68d75b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java @@ -150,4 +150,7 @@ public interface IWarehouseStorageOrderService * 修改保存入库-采购单(仓库入库) */ int updateStoragePurchaseWarehouseSave(WarehouseStorageOrder warehouseStorageOrder); + + //根据入库单号批量查询 + List selectStorageOrderListByCodes(String[] ids); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java index 48b03ed8..082b5f83 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java @@ -1462,5 +1462,10 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS return warehouseStorageOrderMapper.restoreWarehouseStorageOrderById(warehouseStorageId); } + //根据入库单号批量查询 + @Override + public List selectStorageOrderListByCodes(String[] ids){ + return warehouseStorageOrderMapper.selectStorageOrderListByCodes(ids); + } } diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml index 993025dd..43228376 100644 --- a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseStorageOrderMapper.xml @@ -53,7 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and warehouse_storage_code like concat('%', #{warehouseStorageCode}, '%') and related_order_code like concat('%', #{relatedOrderCode}, '%') + and quality_order_code like concat('%', #{qualityOrderCode}, '%') and warehouse_storage_status = #{warehouseStorageStatus} + and warehouse_order_type = #{warehouseOrderType} and warehouse_quality_status = #{warehouseQualityStatus} and warehouse_dept_type = #{warehouseDeptType} and warehouse_employee = #{warehouseEmployee} @@ -289,4 +291,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by create_time desc + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html index c4a5ce25..9958c74d 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html +++ b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html @@ -16,11 +16,11 @@
  • - +
  • - @@ -29,10 +29,6 @@
  • -
  • - - -
  • @@ -49,7 +45,7 @@ @@ -74,7 +70,7 @@ $(function() { var options = { - url: prefix + "/list", + url: prefix + "/makeStorageList", createUrl: prefix + "/add", updateUrl: prefix + "/edit/{id}", detailUrl: prefix + "/detail/{id}", @@ -185,6 +181,29 @@ var url = ctx + 'warehouse/storageOrder/storageMakeDetail/' + warehouseStorageId; $.modal.open("详情",url); }; + + // 导出 + function exportExcel() { + var ids = $.table.selectColumns("warehouseStorageCode"); + var dataParam = $("#formId").serializeArray(); + + let tipMsg = "确定导出当前所有数据吗?"; + if ($.common.isNotEmpty(ids)) { + tipMsg = `确定导出 ${ids} 数据吗?`; + dataParam.push({ "name": "ids", "value": ids }); + } + $.modal.confirm(tipMsg, function () { + $.modal.loading("正在导出数据,请稍后..."); + $.post( prefix + "/export", dataParam, function (result) { + if (result.code === web_status.SUCCESS) { + window.location.href = ctx + "common/download?fileName="+ encodeURI(result.msg) + "&delete=" + true; + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + }); + }); + } \ 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 6d5f8435..5eb78218 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html @@ -65,7 +65,7 @@ $(function(){ var options = { - url: ctx + "system/makeorderbom/list", + url: ctx + "system/makeorderbom/storageList", id: 'bootstrap-sub-table-1', showSearch: false, showRefresh: false,