From d2c10acb43c93325e5ccba73218e9203fcbe31e8 Mon Sep 17 00:00:00 2001 From: liuhanqing Date: Thu, 24 Jul 2025 11:33:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E9=A1=B5=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=93=E5=BA=93=E6=95=B0=E6=8D=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CheckDifferenceRecordServiceImpl.java | 2 + .../impl/BasStockFreezeRecordServiceImpl.java | 2 + .../BasStockMaintainRecordServiceImpl.java | 19 ++-- .../service/impl/BasStockServiceImpl.java | 1 + .../check/CheckDifferenceRecordMapper.xml | 105 +++++++++++------- .../stock/BasStockFreezeRecordMapper.xml | 3 + .../stock/BasStockMaintainRecordMapper.xml | 3 + .../resources/mapper/stock/BasStockMapper.xml | 3 + ruoyi-ui/src/views/check/create/index.vue | 32 +++++- ruoyi-ui/src/views/check/job/in/index.vue | 11 +- ruoyi-ui/src/views/out/addOutStockout.vue | 16 ++- 11 files changed, 137 insertions(+), 60 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/check/difference/service/impl/CheckDifferenceRecordServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/check/difference/service/impl/CheckDifferenceRecordServiceImpl.java index 77cfd32..82064b3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/check/difference/service/impl/CheckDifferenceRecordServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/check/difference/service/impl/CheckDifferenceRecordServiceImpl.java @@ -6,6 +6,7 @@ import java.util.List; import cn.hutool.core.util.IdUtil; import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace; import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService; +import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.stock.stock.domain.BasStock; @@ -52,6 +53,7 @@ public class CheckDifferenceRecordServiceImpl implements ICheckDifferenceRecordS * @return 盘点差异 */ @Override + @DataScope(warehouseAlias = "w") public List selectCheckDifferenceRecordList(CheckDifferenceRecord checkDifferenceRecord) { return checkDifferenceRecordMapper.selectCheckDifferenceRecordList(checkDifferenceRecord); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/freeze/service/impl/BasStockFreezeRecordServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/freeze/service/impl/BasStockFreezeRecordServiceImpl.java index b4213fe..81bb21c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/freeze/service/impl/BasStockFreezeRecordServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/freeze/service/impl/BasStockFreezeRecordServiceImpl.java @@ -3,6 +3,7 @@ package com.ruoyi.stock.freeze.service.impl; import java.util.List; import cn.hutool.core.util.IdUtil; +import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -41,6 +42,7 @@ public class BasStockFreezeRecordServiceImpl implements IBasStockFreezeRecordSer * @return 库存冻结记录 */ @Override + @DataScope(warehouseAlias = "bw") public List selectBasStockFreezeRecordList(BasStockFreezeRecord basStockFreezeRecord) { return basStockFreezeRecordMapper.selectBasStockFreezeRecordList(basStockFreezeRecord); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/maintain/service/impl/BasStockMaintainRecordServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/maintain/service/impl/BasStockMaintainRecordServiceImpl.java index 7695edd..5d0750c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/maintain/service/impl/BasStockMaintainRecordServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/maintain/service/impl/BasStockMaintainRecordServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.stock.maintain.service.impl; import java.util.List; + +import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -10,19 +12,19 @@ import com.ruoyi.stock.maintain.service.IBasStockMaintainRecordService; /** * 库存操作记录Service业务层处理 - * + * * @author ruoyi * @date 2025-05-26 */ @Service -public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecordService +public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecordService { @Autowired private BasStockMaintainRecordMapper basStockMaintainRecordMapper; /** * 查询库存操作记录 - * + * * @param whGuid 库存操作记录主键 * @return 库存操作记录 */ @@ -34,11 +36,12 @@ public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecor /** * 查询库存操作记录列表 - * + * * @param basStockMaintainRecord 库存操作记录 * @return 库存操作记录 */ @Override + @DataScope(warehouseAlias = "bw") public List selectBasStockMaintainRecordList(BasStockMaintainRecord basStockMaintainRecord) { return basStockMaintainRecordMapper.selectBasStockMaintainRecordList(basStockMaintainRecord); @@ -46,7 +49,7 @@ public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecor /** * 新增库存操作记录 - * + * * @param basStockMaintainRecord 库存操作记录 * @return 结果 */ @@ -59,7 +62,7 @@ public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecor /** * 修改库存操作记录 - * + * * @param basStockMaintainRecord 库存操作记录 * @return 结果 */ @@ -71,7 +74,7 @@ public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecor /** * 批量删除库存操作记录 - * + * * @param whGuids 需要删除的库存操作记录主键 * @return 结果 */ @@ -83,7 +86,7 @@ public class BasStockMaintainRecordServiceImpl implements IBasStockMaintainRecor /** * 删除库存操作记录信息 - * + * * @param whGuid 库存操作记录主键 * @return 结果 */ 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 0907937..24b3c65 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 @@ -61,6 +61,7 @@ public class BasStockServiceImpl implements IBasStockService * @return 库存信息 */ @Override + @DataScope(warehouseAlias = "bw") public List selectBasStockList(BasStock basStock) { return basStockMapper.selectBasStockList(basStock); diff --git a/ruoyi-admin/src/main/resources/mapper/check/CheckDifferenceRecordMapper.xml b/ruoyi-admin/src/main/resources/mapper/check/CheckDifferenceRecordMapper.xml index 3896972..29b0b26 100644 --- a/ruoyi-admin/src/main/resources/mapper/check/CheckDifferenceRecordMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/check/CheckDifferenceRecordMapper.xml @@ -1,54 +1,74 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - select r.check_guid, r.check_stock_detail_id, r.stock_id, r.tray_code, r.cargo_space_id, - r.product_id, r.lot_no, r.supplier, r.customer, r.old_quantity, r.new_quantity, - r.record_type, r.create_time, r.product_guid, r.status, r.warehouse_id, - w.warehouse_name,bp.product_name,bp.spare1 as englishDesc, - bp.spare2 as netWeight,bp.spare5 as length,bp.spare6 as width,bp.spare7 as height,bp.spare8 as volume, + select r.check_guid, + r.check_stock_detail_id, + r.stock_id, + r.tray_code, + r.cargo_space_id, + r.product_id, + r.lot_no, + r.supplier, + r.customer, + r.old_quantity, + r.new_quantity, + r.record_type, + r.create_time, + r.product_guid, + r.status, + r.warehouse_id, + w.warehouse_name, + bp.product_name, + bp.spare1 as englishDesc, + bp.spare2 as netWeight, + bp.spare5 as length, + bp.spare6 as width, + bp.spare7 as height, + bp.spare8 as volume, bcs.cargo_space_name from check_difference_record r - left join bas_warehouse w on r.warehouse_id = w.warehouse_id - left join bas_product bp on r.product_id = bp.product_id - left join bas_cargo_space bcs on r.cargo_space_id = bcs.cargo_space_id + left join bas_warehouse w on r.warehouse_id = w.warehouse_id + left join bas_product bp on r.product_id = bp.product_id + left join bas_cargo_space bcs on r.cargo_space_id = bcs.cargo_space_id - @@ -93,6 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and r.warehouse_id = #{warehouseId} + + ${params.warehouseDataScope} + order by r.create_time desc @@ -121,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" product_guid, status, warehouse_id, - + #{checkGuid}, #{checkStockDetailId}, @@ -139,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{productGuid}, #{status}, #{warehouseId}, - + @@ -165,7 +188,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from check_difference_record where check_guid = #{checkGuid} + delete + from check_difference_record + where check_guid = #{checkGuid} diff --git a/ruoyi-admin/src/main/resources/mapper/stock/BasStockFreezeRecordMapper.xml b/ruoyi-admin/src/main/resources/mapper/stock/BasStockFreezeRecordMapper.xml index 946cd36..33487a0 100644 --- a/ruoyi-admin/src/main/resources/mapper/stock/BasStockFreezeRecordMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/stock/BasStockFreezeRecordMapper.xml @@ -53,6 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bar_code_old_quantity = #{barCodeOldQuantity} and bar_code_quantity = #{barCodeQuantity} and product_guid = #{productGuid} + + ${params.warehouseDataScope} + order by create_time desc diff --git a/ruoyi-admin/src/main/resources/mapper/stock/BasStockMaintainRecordMapper.xml b/ruoyi-admin/src/main/resources/mapper/stock/BasStockMaintainRecordMapper.xml index 014b7c5..d3ee88d 100644 --- a/ruoyi-admin/src/main/resources/mapper/stock/BasStockMaintainRecordMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/stock/BasStockMaintainRecordMapper.xml @@ -53,6 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bar_code_old_quantity = #{barCodeOldQuantity} and bar_code_quantity = #{barCodeQuantity} and product_guid = #{productGuid} + + ${params.warehouseDataScope} + order by create_time desc diff --git a/ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml b/ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml index c90d4a9..aa0f389 100644 --- a/ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/stock/BasStockMapper.xml @@ -94,6 +94,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item} + + ${params.warehouseDataScope} + diff --git a/ruoyi-ui/src/views/check/create/index.vue b/ruoyi-ui/src/views/check/create/index.vue index df78672..83eca87 100644 --- a/ruoyi-ui/src/views/check/create/index.vue +++ b/ruoyi-ui/src/views/check/create/index.vue @@ -90,13 +90,21 @@ - - - - - + + + + + + +