From 2c14013285b3be631dd9561e47cde1bd1924d88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=80=A1=E8=93=89?= <377046077@qq.com> Date: Fri, 10 Oct 2025 14:36:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=8D=95=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BasStockServiceImpl.java | 10 +- .../mapper/out/ViewHandAllotStockMapper.xml | 3 +- .../resources/mapper/stock/BasStockMapper.xml | 3 +- ruoyi-ui/src/views/job/outJobManagement.vue | 4 +- ruoyi-ui/src/views/stock/management/index.vue | 340 +++++++++++++++--- ruoyi-ui/src/views/stock/record/index.vue | 10 +- 6 files changed, 309 insertions(+), 61 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/stock/service/impl/BasStockServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/stock/service/impl/BasStockServiceImpl.java index 2c9c9b1..7376733 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/stock/service/impl/BasStockServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/stock/service/impl/BasStockServiceImpl.java @@ -85,20 +85,20 @@ public class BasStockServiceImpl implements IBasStockService } private void insertMaintainRecord(BasStock oldStock, BasStock basStock, String operate) { - if (oldStock != null && !oldStock.getQuantity().equals(basStock.getQuantity())) { + if (oldStock != null && (!oldStock.getQuantity().equals(basStock.getQuantity())||!oldStock.getProductId().equals(basStock.getProductId()))) { BasStockMaintainRecord basStockMaintainRecord = new BasStockMaintainRecord(); basStockMaintainRecord.setWhGuid(IdUtil.fastSimpleUUID()); basStockMaintainRecord.setStockId(basStock.getStockId()); basStockMaintainRecord.setCargoSpaceId(basStock.getCargoSpaceId()); - basStockMaintainRecord.setLotNo(basStock.getLotNo()); + basStockMaintainRecord.setLotNo(oldStock.getCargoSpaceId()); basStockMaintainRecord.setTrayCode(basStock.getTrayCode()); - basStockMaintainRecord.setProductGuid(basStock.getProductGuid()); + basStockMaintainRecord.setProductGuid(oldStock.getProductName()); basStockMaintainRecord.setCreateBy(SecurityUtils.getLoginUser().getUsername()); basStockMaintainRecord.setCreateTime(new Date()); basStockMaintainRecord.setOldQuantity(oldStock.getQuantity()); basStockMaintainRecord.setQuantity(basStock.getQuantity()); - basStockMaintainRecord.setProductId(basStock.getExtraField().getProductId()); - basStockMaintainRecord.setProductName(basStock.getExtraField().getMaterialDesc()); + basStockMaintainRecord.setProductId(basStock.getProductId()); + basStockMaintainRecord.setProductName(basStock.getProductName()); basStockMaintainRecord.setWarehouseId(basStock.getWarehouseId()); basStockMaintainRecord.setMethod(operate); basStockMaintainRecordService.insertBasStockMaintainRecord(basStockMaintainRecord); diff --git a/ruoyi-admin/src/main/resources/mapper/out/ViewHandAllotStockMapper.xml b/ruoyi-admin/src/main/resources/mapper/out/ViewHandAllotStockMapper.xml index 00c749b..b41a950 100644 --- a/ruoyi-admin/src/main/resources/mapper/out/ViewHandAllotStockMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/out/ViewHandAllotStockMapper.xml @@ -53,10 +53,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and stock_id = #{stockId} and cargo_space_id = #{cargoSpaceId} + and cargo_space_name like concat('%', #{cargoSpaceName}, '%') and stock_status = #{stockStatus} and product_status = #{productStatus} and lot_no = #{lotNo} - and in_date = #{inDate} + and in_date like concat('%', #{inDate}, '%') and back_date = #{backDate} and product_guid = #{productGuid} and quantity = #{quantity} diff --git a/ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml b/ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml index d0cf2ee..6d83b84 100644 --- a/ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml @@ -75,13 +75,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bs.stock_id = #{stockId} and bs.cargo_space_id = #{cargoSpaceId} + and bs.cargo_space_name like concat('%', #{cargoSpaceName}, '%') and bs.stock_status = #{stockStatus} and bs.product_status = #{productStatus} and bs.lot_no = #{lotNo} and bs.in_date like concat('%', #{inDate}, '%') and bs.back_date = #{backDate} and bs.product_guid = #{productGuid} - and bs.product_name = #{productName} + and bs.product_name like concat('%', #{productName}, '%') and bs.quantity = #{quantity} and bs.job_id = #{jobId} and bs.tray_code = #{trayCode} diff --git a/ruoyi-ui/src/views/job/outJobManagement.vue b/ruoyi-ui/src/views/job/outJobManagement.vue index a424afc..bd0c3d6 100644 --- a/ruoyi-ui/src/views/job/outJobManagement.vue +++ b/ruoyi-ui/src/views/job/outJobManagement.vue @@ -419,10 +419,10 @@ export default { } // 检查选中任务的状态是否小于3(未执行) const invalidTasks = this.mydoJobList.filter(item => - this.ids.includes(item.jobId) && item.status >= '3' + this.ids.includes(item.jobId) && item.status > '3' ); if (invalidTasks.length > 0) { - this.$modal.msgError("只能手动作废状态为[未执行]的作业"); + this.$modal.msgError("作业已完成,无法作废!"); return; } this.$modal.confirm('是否确认手动作废选中的任务?').then(() => { diff --git a/ruoyi-ui/src/views/stock/management/index.vue b/ruoyi-ui/src/views/stock/management/index.vue index 987bf90..ee78b46 100644 --- a/ruoyi-ui/src/views/stock/management/index.vue +++ b/ruoyi-ui/src/views/stock/management/index.vue @@ -9,10 +9,18 @@ @keyup.enter.native="handleQuery" /> - + + + + @@ -27,26 +35,7 @@ /> - - - - - - - - - - + - + + + - - - - - - - - 搜索 @@ -129,6 +102,11 @@ + + + @@ -184,12 +162,41 @@ - - + + + + + + + + + + + - - + + + + + + 取消 + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + +