添加分页 添加仓库数据权限
This commit is contained in:
@@ -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<CheckDifferenceRecord> selectCheckDifferenceRecordList(CheckDifferenceRecord checkDifferenceRecord)
|
||||
{
|
||||
return checkDifferenceRecordMapper.selectCheckDifferenceRecordList(checkDifferenceRecord);
|
||||
|
||||
@@ -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<BasStockFreezeRecord> selectBasStockFreezeRecordList(BasStockFreezeRecord basStockFreezeRecord)
|
||||
{
|
||||
return basStockFreezeRecordMapper.selectBasStockFreezeRecordList(basStockFreezeRecord);
|
||||
|
||||
@@ -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<BasStockMaintainRecord> 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 结果
|
||||
*/
|
||||
|
||||
@@ -61,6 +61,7 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
* @return 库存信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(warehouseAlias = "bw")
|
||||
public List<BasStock> selectBasStockList(BasStock basStock)
|
||||
{
|
||||
return basStockMapper.selectBasStockList(basStock);
|
||||
|
||||
@@ -1,54 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.check.difference.mapper.CheckDifferenceRecordMapper">
|
||||
|
||||
<resultMap type="CheckDifferenceRecord" id="CheckDifferenceRecordResult">
|
||||
<result property="checkGuid" column="check_guid" />
|
||||
<result property="checkStockDetailId" column="check_stock_detail_id" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="supplier" column="supplier" />
|
||||
<result property="customer" column="customer" />
|
||||
<result property="oldQuantity" column="old_quantity" />
|
||||
<result property="newQuantity" column="new_quantity" />
|
||||
<result property="recordType" column="record_type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="status" column="status" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="checkGuid" column="check_guid"/>
|
||||
<result property="checkStockDetailId" column="check_stock_detail_id"/>
|
||||
<result property="stockId" column="stock_id"/>
|
||||
<result property="trayCode" column="tray_code"/>
|
||||
<result property="cargoSpaceId" column="cargo_space_id"/>
|
||||
<result property="cargoSpaceName" column="cargo_space_name"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="lotNo" column="lot_no"/>
|
||||
<result property="supplier" column="supplier"/>
|
||||
<result property="customer" column="customer"/>
|
||||
<result property="oldQuantity" column="old_quantity"/>
|
||||
<result property="newQuantity" column="new_quantity"/>
|
||||
<result property="recordType" column="record_type"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="productGuid" column="product_guid"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="warehouseId" column="warehouse_id"/>
|
||||
<result property="warehouseName" column="warehouse_name"/>
|
||||
<association property="extraField" javaType="ExtraField">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="materialDesc" column="product_name" />
|
||||
<result property="englishDesc" column="englishDesc" />
|
||||
<result property="length" column="length" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="netWeight" column="netWeight" />
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="materialDesc" column="product_name"/>
|
||||
<result property="englishDesc" column="englishDesc"/>
|
||||
<result property="length" column="length"/>
|
||||
<result property="width" column="width"/>
|
||||
<result property="height" column="height"/>
|
||||
<result property="volume" column="volume"/>
|
||||
<result property="netWeight" column="netWeight"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCheckDifferenceRecordVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectCheckDifferenceRecordList" parameterType="CheckDifferenceRecord" resultMap="CheckDifferenceRecordResult">
|
||||
<select id="selectCheckDifferenceRecordList" parameterType="CheckDifferenceRecord"
|
||||
resultMap="CheckDifferenceRecordResult">
|
||||
<include refid="selectCheckDifferenceRecordVo"/>
|
||||
<where>
|
||||
<if test="checkStockDetailId != null and checkStockDetailId != ''">
|
||||
@@ -93,6 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="warehouseId != null and warehouseId != ''">
|
||||
and r.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by r.create_time desc
|
||||
</select>
|
||||
@@ -121,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkGuid != null">#{checkGuid},</if>
|
||||
<if test="checkStockDetailId != null">#{checkStockDetailId},</if>
|
||||
@@ -139,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCheckDifferenceRecord" parameterType="CheckDifferenceRecord">
|
||||
@@ -165,7 +188,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<delete id="deleteCheckDifferenceRecordByCheckGuid" parameterType="String">
|
||||
delete from check_difference_record where check_guid = #{checkGuid}
|
||||
delete
|
||||
from check_difference_record
|
||||
where check_guid = #{checkGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCheckDifferenceRecordByCheckGuids" parameterType="String">
|
||||
|
||||
@@ -53,6 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="barCodeOldQuantity != null and barCodeOldQuantity != ''"> and bar_code_old_quantity = #{barCodeOldQuantity}</if>
|
||||
<if test="barCodeQuantity != null and barCodeQuantity != ''"> and bar_code_quantity = #{barCodeQuantity}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
@@ -53,6 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="barCodeOldQuantity != null and barCodeOldQuantity != ''"> and bar_code_old_quantity = #{barCodeOldQuantity}</if>
|
||||
<if test="barCodeQuantity != null and barCodeQuantity != ''"> and bar_code_quantity = #{barCodeQuantity}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
@@ -94,6 +94,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user