初始化

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

@@ -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>