修改库存管理 联查 查询条件 字典相关问题
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.stock.freeze.mapper.BasStockFreezeRecordMapper">
|
||||
|
||||
|
||||
<resultMap type="BasStockFreezeRecord" id="BasStockFreezeRecordResult">
|
||||
<result property="whGuid" column="wh_guid" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
@@ -23,18 +23,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="barCodeOldQuantity" column="bar_code_old_quantity" />
|
||||
<result property="barCodeQuantity" column="bar_code_quantity" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockFreezeRecordVo">
|
||||
select wh_guid, stock_id, cargo_space_id, tray_code, product_id, product_name, print_date, lot_no, old_status, curr_status, method, warehouse_id, create_time, stock_detail_id, operating_target, bar_code_old_quantity, bar_code_quantity, product_guid from bas_stock_freeze_record
|
||||
select wh_guid, stock_id, bsfr.cargo_space_id,bw.warehouse_name, bcs.cargo_space_name, bsfr.tray_code, product_id, product_name, print_date, lot_no, old_status, curr_status, method, bsfr.warehouse_id, create_time, stock_detail_id, operating_target, bar_code_old_quantity, bar_code_quantity, product_guid
|
||||
from bas_stock_freeze_record bsfr
|
||||
left join bas_cargo_space bcs on bsfr.cargo_space_id=bcs.cargo_space_id
|
||||
left join bas_warehouse bw on bsfr.warehouse_id=bw.warehouse_id
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockFreezeRecordList" parameterType="BasStockFreezeRecord" resultMap="BasStockFreezeRecordResult">
|
||||
<include refid="selectBasStockFreezeRecordVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bsfr.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bsfr.tray_code = #{trayCode}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
@@ -42,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="oldStatus != null and oldStatus != ''"> and old_status = #{oldStatus}</if>
|
||||
<if test="currStatus != null and currStatus != ''"> and curr_status = #{currStatus}</if>
|
||||
<if test="method != null and method != ''"> and method = #{method}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bsfr.warehouse_id = #{warehouseId}</if>
|
||||
<if test="stockDetailId != null and stockDetailId != ''"> and stock_detail_id = #{stockDetailId}</if>
|
||||
<if test="operatingTarget != null and operatingTarget != ''"> and operating_target = #{operatingTarget}</if>
|
||||
<if test="barCodeOldQuantity != null and barCodeOldQuantity != ''"> and bar_code_old_quantity = #{barCodeOldQuantity}</if>
|
||||
@@ -50,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectBasStockFreezeRecordByWhGuid" parameterType="String" resultMap="BasStockFreezeRecordResult">
|
||||
<include refid="selectBasStockFreezeRecordVo"/>
|
||||
where wh_guid = #{whGuid}
|
||||
@@ -129,9 +134,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasStockFreezeRecordByWhGuids" parameterType="String">
|
||||
delete from bas_stock_freeze_record where wh_guid in
|
||||
delete from bas_stock_freeze_record where wh_guid in
|
||||
<foreach item="whGuid" collection="array" open="(" separator="," close=")">
|
||||
#{whGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.stock.maintain.mapper.BasStockMaintainRecordMapper">
|
||||
|
||||
|
||||
<resultMap type="BasStockMaintainRecord" id="BasStockMaintainRecordResult">
|
||||
<result property="whGuid" column="wh_guid" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
@@ -23,18 +23,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="barCodeOldQuantity" column="bar_code_old_quantity" />
|
||||
<result property="barCodeQuantity" column="bar_code_quantity" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockMaintainRecordVo">
|
||||
select wh_guid, stock_id, cargo_space_id, tray_code, product_id, product_name, print_date, lot_no, old_quantity, quantity, method, warehouse_id, create_time, stock_detail_id, operating_target, bar_code_old_quantity, bar_code_quantity, product_guid from bas_stock_maintain_record
|
||||
select wh_guid, stock_id, bsmr.cargo_space_id,bw.warehouse_name, bcs.cargo_space_name, bsmr.tray_code, product_id, product_name, print_date, lot_no, old_quantity, quantity, method, bsmr.warehouse_id, create_time, stock_detail_id, operating_target, bar_code_old_quantity, bar_code_quantity, product_guid
|
||||
from bas_stock_maintain_record bsmr
|
||||
left join bas_cargo_space bcs on bsmr.cargo_space_id=bcs.cargo_space_id
|
||||
left join bas_warehouse bw on bsmr.warehouse_id=bw.warehouse_id
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockMaintainRecordList" parameterType="BasStockMaintainRecord" resultMap="BasStockMaintainRecordResult">
|
||||
<include refid="selectBasStockMaintainRecordVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bsmr.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bsmr.tray_code = #{trayCode}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
@@ -42,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="oldQuantity != null and oldQuantity != ''"> and old_quantity = #{oldQuantity}</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="method != null and method != ''"> and method = #{method}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bsmr.warehouse_id = #{warehouseId}</if>
|
||||
<if test="stockDetailId != null and stockDetailId != ''"> and stock_detail_id = #{stockDetailId}</if>
|
||||
<if test="operatingTarget != null and operatingTarget != ''"> and operating_target = #{operatingTarget}</if>
|
||||
<if test="barCodeOldQuantity != null and barCodeOldQuantity != ''"> and bar_code_old_quantity = #{barCodeOldQuantity}</if>
|
||||
@@ -50,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectBasStockMaintainRecordByWhGuid" parameterType="String" resultMap="BasStockMaintainRecordResult">
|
||||
<include refid="selectBasStockMaintainRecordVo"/>
|
||||
where wh_guid = #{whGuid}
|
||||
@@ -129,9 +134,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasStockMaintainRecordByWhGuids" parameterType="String">
|
||||
delete from bas_stock_maintain_record where wh_guid in
|
||||
delete from bas_stock_maintain_record where wh_guid in
|
||||
<foreach item="whGuid" collection="array" open="(" separator="," close=")">
|
||||
#{whGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -29,39 +29,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="cargoSpaceStatus" column="locked" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="cargoSpaceName" column="cargo_space_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" />
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockVo">
|
||||
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_guid, quantity, job_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, in_class_id, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6 from bas_stock
|
||||
select bs.stock_id, bs.cargo_space_id, bs.stock_status, bs.product_status, bs.lot_no, bs.in_date,
|
||||
bs.back_date, bs.product_guid, bs.quantity, bs.job_id, bs.tray_code, bs.out_quantity,
|
||||
bs.stockin_detail_id, bs.stockin_id, bs.in_type, bs.in_class_id, bs.warehouse_id, bs.stacking_id,
|
||||
bs.spare1, bs.spare2, bs.spare3, bs.spare4, bs.spare5, bs.spare6 ,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,bw.warehouse_name,bs.product_id,
|
||||
bcs.locked,bcs.cargo_space_name
|
||||
from bas_stock bs
|
||||
left join bas_product bp on bs.product_id = bp.product_id
|
||||
left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id
|
||||
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockList" parameterType="BasStock" resultMap="BasStockResult">
|
||||
<include refid="selectBasStockVo"/>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
|
||||
<if test="productStatus != null and productStatus != ''"> and product_status = #{productStatus}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="inDate != null and inDate != ''"> and in_date = #{inDate}</if>
|
||||
<if test="backDate != null and backDate != ''"> and back_date = #{backDate}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="outQuantity != null and outQuantity != ''"> and out_quantity = #{outQuantity}</if>
|
||||
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
|
||||
<if test="inClassId != null and inClassId != ''"> and in_class_id = #{inClassId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="stackingId != null and stackingId != ''"> and stacking_id = #{stackingId}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
<if test="stockId != null and stockId != ''"> and bs.stock_id = #{stockId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bs.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||
<if test="productStatus != null and productStatus != ''"> and bs.product_status = #{productStatus}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
|
||||
<if test="inDate != null and inDate != ''"> and bs.in_date = #{inDate}</if>
|
||||
<if test="backDate != null and backDate != ''"> and bs.back_date = #{backDate}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and bs.product_guid = #{productGuid}</if>
|
||||
<if test="productName != null and productName != ''"> and bp.product_name = #{productName}</if>
|
||||
<if test="quantity != null and quantity != ''"> and bs.quantity = #{quantity}</if>
|
||||
<if test="jobId != null and jobId != ''"> and bs.job_id = #{jobId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bs.tray_code = #{trayCode}</if>
|
||||
<if test="outQuantity != null and outQuantity != ''"> and bs.out_quantity = #{outQuantity}</if>
|
||||
<if test="stockinDetailId != null and stockinDetailId != ''"> and bs.stockin_detail_id = #{stockinDetailId}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and bs.stockin_id = #{stockinId}</if>
|
||||
<if test="inType != null and inType != ''"> and bs.in_type = #{inType}</if>
|
||||
<if test="inClassId != null and inClassId != ''"> and bs.in_class_id = #{inClassId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bs.warehouse_id = #{warehouseId}</if>
|
||||
<if test="stackingId != null and stackingId != ''"> and bs.stacking_id = #{stackingId}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and bs.spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and bs.spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and bs.spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and bs.spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and bs.spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and bs.spare6 = #{spare6}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user