初始化

This commit is contained in:
lsymicc
2026-07-17 17:24:00 +08:00
parent a3c023a8d3
commit 5353351520
129 changed files with 7697 additions and 2072 deletions

View File

@@ -33,6 +33,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select cargo_space_id, warehouse_id, roadway_id, cargo_area_id, the_type, the_type_name, cargo_space_name, the_platoon, the_column, the_floor, status, locked, tray_code, iss_double, group_coding_no, group_coding, cargo_space_logo, this_cargo_area, dept_id, dept_name, the_weight, the_height from bas_cargo_space
</sql>
<sql id="selectBasCargoSpaceVoTop1">
select top 1 cargo_space_id, warehouse_id, roadway_id, cargo_area_id, the_type, the_type_name, cargo_space_name, the_platoon, the_column, the_floor, status, locked, tray_code, iss_double, group_coding_no, group_coding, cargo_space_logo, this_cargo_area, dept_id, dept_name, the_weight, the_height from bas_cargo_space
</sql>
<select id="selectBasCargoSpaceList" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
<include refid="selectBasCargoSpaceVo"/>
<where>
@@ -97,6 +101,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectBasCargoSpaceForStockin" parameterType="basCargoSpace" resultMap="BasCargoSpaceResult">
<include refid="selectBasCargoSpaceVoTop1"/>
<where>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="cargoAreaId != null and cargoAreaId != ''"> and cargo_area_id = #{cargoAreaId}</if>
<if test="theTypeName != null and theTypeName != ''"> and the_type_name like concat('%', #{theTypeName}, '%')</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and the_column = #{theColumn}</if>
<if test="theFloor != null "> and the_floor = #{theFloor}</if>
and status = '1'
and locked = 'N'
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="issDouble != null and issDouble != ''"> and iss_double = #{issDouble}</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and group_coding_no = #{groupCodingNo}</if>
<if test="groupCoding != null and groupCoding != ''"> and group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="thisCargoArea != null and thisCargoArea != ''"> and this_cargo_area = #{thisCargoArea}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="theWeight != null "> and the_weight = #{theWeight}</if>
<if test="theHeight != null "> and the_height = #{theHeight}</if>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
<if test="theType != null and theType != ''"> and the_type = #{theType}</if>
</where>
ORDER BY iss_double desc ,group_coding asc,the_floor asc, the_platoon asc, the_column asc
</select>
<select id="selectBasCargoSpaceForStockout" parameterType="basCargoSpace" resultMap="BasCargoSpaceResult">
<include refid="selectBasCargoSpaceVoTop1"/>
<where>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="cargoAreaId != null and cargoAreaId != ''"> and cargo_area_id = #{cargoAreaId}</if>
<if test="theTypeName != null and theTypeName != ''"> and the_type_name like concat('%', #{theTypeName}, '%')</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and the_column = #{theColumn}</if>
<if test="theFloor != null "> and the_floor = #{theFloor}</if>
and status = '2'
and locked = 'N'
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="issDouble != null and issDouble != ''"> and iss_double = #{issDouble}</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and group_coding_no = #{groupCodingNo}</if>
<if test="groupCoding != null and groupCoding != ''"> and group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="thisCargoArea != null and thisCargoArea != ''"> and this_cargo_area = #{thisCargoArea}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="theWeight != null "> and the_weight = #{theWeight}</if>
<if test="theHeight != null "> and the_height = #{theHeight}</if>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
<if test="theType != null and theType != ''"> and the_type = #{theType}</if>
</where>
ORDER BY iss_double asc ,group_coding asc,the_floor asc, the_platoon asc, the_column asc
</select>
<insert id="insertBasCargoSpace" parameterType="BasCargoSpace">
insert into bas_cargo_space
<trim prefix="(" suffix=")" suffixOverrides=",">

View File

@@ -0,0 +1,114 @@
<?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">
<mapper namespace="com.ruoyi.bas.stock.mapper.BasStockInfoMapper">
<resultMap type="BasStockInfo" id="BasStockInfoResult">
<result property="stockId" column="stock_id" />
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="trayCode" column="tray_code" />
<result property="warehouseId" column="warehouse_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
<result property="supplierId" column="supplier_id" />
<result property="supplierName" column="supplier_name" />
<result property="supplierName" column="supplier_name" />
<result property="trayType" column="tray_type" />
<result property="emptyStatus" column="empty_status" />
</resultMap>
<sql id="selectBasStockInfoVo">
select stock_id, cargo_space_id, tray_code, warehouse_id, user_id, user_name, dept_id, dept_name, supplier_id, supplier_name, tray_type, empty_status from bas_stock
</sql>
<select id="selectBasStockInfoList" parameterType="BasStockInfo" resultMap="BasStockInfoResult">
<include refid="selectBasStockInfoVo"/>
where
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="trayType != null and trayType != ''"> and tray_type = #{trayType}</if>
<if test="emptyStatus != null and emptyStatus != ''"> and empty_status = #{emptyStatus}</if>
${params.warehouseScope}
</select>
<select id="selectBasStockInfoByStockId" parameterType="String" resultMap="BasStockInfoResult">
<include refid="selectBasStockInfoVo"/>
where stock_id = #{stockId}
</select>
<select id="selectBasStockInfoByTrayCode" parameterType="String" resultMap="BasStockInfoResult">
<include refid="selectBasStockInfoVo"/>
where tray_code = #{trayCode}
</select>
<insert id="insertBasStockInfo" parameterType="BasStockInfo">
insert into bas_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockId != null">stock_id,</if>
<if test="cargoSpaceId != null">cargo_space_id,</if>
<if test="trayCode != null">tray_code,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="userId != null">user_id,</if>
<if test="userName != null">user_name,</if>
<if test="deptId != null">dept_id,</if>
<if test="deptName != null">dept_name,</if>
<if test="supplierId != null">supplier_id,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="trayType != null">tray_type,</if>
<if test="emptyStatus != null">empty_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockId != null">#{stockId},</if>
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="userId != null">#{userId},</if>
<if test="userName != null">#{userName},</if>
<if test="deptId != null">#{deptId},</if>
<if test="deptName != null">#{deptName},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="trayType != null">#{trayType},</if>
<if test="emptyStatus != null">#{emptyStatus},</if>
</trim>
</insert>
<update id="updateBasStockInfo" parameterType="basStockInfo">
update bas_stock
<trim prefix="SET" suffixOverrides=",">
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="trayType != null and trayType != ''"> and tray_type = #{trayType}</if>
<if test="emptyStatus != null and emptyStatus != ''"> and empty_status = #{emptyStatus}</if>
</trim>
where stock_id = #{stockId}
</update>
<delete id="deleteBasStockInfoByStockId" parameterType="String">
delete from bas_stock where stock_id = #{stockId}
</delete>
<delete id="deleteBasStockInfoByTrayCode" parameterType="String">
delete from bas_stock where tray_code = #{trayCode}
</delete>
<delete id="deleteBasStockInfoByStockIds" parameterType="String">
delete from bas_stock where stock_id in
<foreach item="stockId" collection="array" open="(" separator="," close=")">
#{stockId}
</foreach>
</delete>
</mapper>

View File

@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="backDate" column="back_date" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="rollerNumber" column="roller_number" />
<result property="quantity" column="quantity" />
<result property="jobId" column="job_id" />
<result property="jobDetailId" column="job_detail_id" />
@@ -28,21 +29,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="userName" column="user_name" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
<result property="suplierId" column="suplier_id" />
<result property="suplierName" column="suplier_name" />
<result property="supplierId" column="supplier_id" />
<result property="supplierName" column="supplier_name" />
<result property="trayType" column="tray_type" />
<result property="availablePlace" column="available_place" />
</resultMap>
<sql id="selectBasStockVo">
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_id, product_name, quantity, job_id, job_detail_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, warehouse_id, warehouse_name, user_id, user_name, dept_id, dept_name, suplier_id, suplier_name from bas_stock
select stock_id, cargo_space_id, stock_status, product_status, lot_no, in_date, back_date, product_id, product_name, roller_number,
quantity, job_id, job_detail_id, tray_code, out_quantity, stockin_detail_id, stockin_id, in_type, warehouse_id, warehouse_name,
user_id, user_name, dept_id, dept_name, supplier_id, supplier_name, tray_type, availablePlace
from bas_stock
</sql>
<select id="selectBasStockList" parameterType="BasStock" resultMap="BasStockResult">
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_id, bs.product_name,
bs.lot_no, bs.in_date, bs.back_date, bs.product_id, bs.product_name,bs.roller_number,
bs.quantity, bs.job_id, bs.job_detail_id, bs.tray_code, bs.out_quantity,
bs.stockin_detail_id, bs.stockin_id, bs.in_type, bs.warehouse_id, bs.warehouse_name,
bs.user_id, bs.user_name, bs.dept_id, bs.dept_name, bs.suplier_id, bs.suplier_name
from bas_stock bs
bs.user_id, bs.user_name, bs.dept_id, bs.dept_name, bs.supplier_id, bs.supplier_name,bs.tray_type,bs.available_place
from bas_stock_detail bs
left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id
where
bcs.status = '2'
@@ -54,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginBackDate != null and params.beginBackDate != '' and params.endBackDate != null and params.endBackDate != ''"> and bs.back_date between #{params.beginBackDate} and #{params.endBackDate}</if>
<if test="productId != null and productId != ''"> and bs.product_id = #{productId}</if>
<if test="productName != null and productName != ''"> and bs.product_name like concat('%', #{productName}, '%')</if>
<if test="rollerNumber != null and rollerNumber != ''"> and bs.roller_number like concat('%', #{rollerNumber}, '%')</if>
<if test="quantity != null "> and bs.quantity = #{quantity}</if>
<if test="jobId != null and jobId != ''"> and bs.job_id = #{jobId}</if>
<if test="jobDetailId != null and jobDetailId != ''"> and bs.job_detail_id = #{jobDetailId}</if>
@@ -65,7 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseName != null and warehouseName != ''"> and bs.warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="userName != null and userName != ''"> and bs.user_name like concat('%', #{userName}, '%')</if>
<if test="deptName != null and deptName != ''"> and bs.dept_name like concat('%', #{deptName}, '%')</if>
<if test="suplierName != null and suplierName != ''"> and bs.suplier_name like concat('%', #{suplierName}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and bs.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="trayType != null and trayType != ''"> and bs.tray_type = #{trayType}</if>
<if test="availablePlace != null and availablePlace != ''"> and bs.available_place = #{availablePlace}</if>
${params.warehouseScope}
</select>
@@ -74,8 +83,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where stock_id = #{stockId}
</select>
<select id="selectBasStockListByProductId" parameterType="String" resultMap="BasStockResult">
<include refid="selectBasStockVo"/>
where product_id = #{producId}
</select>
<select id="selectBasStockListByTrayCode" parameterType="String" resultMap="BasStockResult">
<include refid="selectBasStockVo"/>
where tray_code = #{trayCode}
</select>
<select id="selectBasStockByRollerNumber" parameterType="String" resultMap="BasStockResult">
<include refid="selectBasStockVo"/>
where roller_number = #{rollerNumber}
</select>
<insert id="insertBasStock" parameterType="BasStock">
insert into bas_stock
insert into bas_stock_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockId != null">stock_id,</if>
<if test="cargoSpaceId != null">cargo_space_id,</if>
@@ -86,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="backDate != null">back_date,</if>
<if test="productId != null">product_id,</if>
<if test="productName != null">product_name,</if>
<if test="rollerNumber != null">roller_number,</if>
<if test="quantity != null">quantity,</if>
<if test="jobId != null">job_id,</if>
<if test="jobDetailId != null">job_detail_id,</if>
@@ -100,8 +125,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null">user_name,</if>
<if test="deptId != null">dept_id,</if>
<if test="deptName != null">dept_name,</if>
<if test="suplierId != null">suplier_id,</if>
<if test="suplierName != null">suplier_name,</if>
<if test="supplierId != null">supplier_id,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="trayType != null">tray_type,</if>
<if test="availablePlace != null">available_place,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockId != null">#{stockId},</if>
@@ -113,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="backDate != null">#{backDate},</if>
<if test="productId != null">#{productId},</if>
<if test="productName != null">#{productName},</if>
<if test="rollerNumber != null">#{rollerNumber},</if>
<if test="quantity != null">#{quantity},</if>
<if test="jobId != null">#{jobId},</if>
<if test="jobDetailId != null">#{jobDetailId},</if>
@@ -127,13 +155,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null">#{userName},</if>
<if test="deptId != null">#{deptId},</if>
<if test="deptName != null">#{deptName},</if>
<if test="suplierId != null">#{suplierId},</if>
<if test="suplierName != null">#{suplierName},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="trayType != null">#{tray_type},</if>
<if test="availablePlace != null">#{available_place},</if>
</trim>
</insert>
<update id="updateBasStock" parameterType="BasStock">
update bas_stock
update bas_stock_detail
<trim prefix="SET" suffixOverrides=",">
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
<if test="stockStatus != null">stock_status = #{stockStatus},</if>
@@ -143,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="backDate != null">back_date = #{backDate},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="rollerNumber != null">roller_number = #{rollerNumber},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="jobId != null">job_id = #{jobId},</if>
<if test="jobDetailId != null">job_detail_id = #{jobDetailId},</if>
@@ -157,18 +188,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null">user_name = #{userName},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="suplierId != null">suplier_id = #{suplierId},</if>
<if test="suplierName != null">suplier_name = #{suplierName},</if>
<if test="supplierId != null">supplier_id = #{supplierId},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="trayType != null">tray_type = #{trayType},</if>
<if test="availablePlace != null">available_place = #{availablePlace},</if>
</trim>
where stock_id = #{stockId}
</update>
<delete id="deleteBasStockByStockId" parameterType="String">
delete from bas_stock where stock_id = #{stockId}
delete from bas_stock_detail where stock_id = #{stockId}
</delete>
<delete id="deleteBasStockByRollerNumber" parameterType="String">
delete from bas_stock_detail where roller_number = #{rollerNumber}
</delete>
<delete id="deleteBasStockByStockIds" parameterType="String">
delete from bas_stock where stock_id in
delete from bas_stock_detail where stock_id in
<foreach item="stockId" collection="array" open="(" separator="," close=")">
#{stockId}
</foreach>