库存模块功能开发

This commit is contained in:
2026-01-22 19:59:49 +08:00
parent a1be0e4abd
commit 9b2b142347
24 changed files with 1848 additions and 501 deletions

View File

@@ -7,6 +7,7 @@
<!-- ==================== ResultMap ==================== -->
<resultMap type="RkBill" id="RkBillResult">
<result property="id" column="id"/>
<result property="wlType" column="wl_type"/>
<result property="wlTypeName" column="wl_type_name"/>
@@ -27,9 +28,22 @@
<result property="operatorName" column="operator_name"/>
<result property="teamCode" column="team_code"/>
<result property="teamName" column="team_name"/>
<result property="borrowTime" column="borrow_time"/>
<result property="returnTime" column="return_time"/>
<result property="xmNoCk" column="xm_no_ck"/>
<result property="xmMsCk" column="xm_ms_ck"/>
<result property="remark" column="remark"/>
<result property="isDelivery" column="is_delivery"/>
<result property="isDelete" column="is_delete"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<!-- ==================== Base Select ==================== -->
@@ -45,15 +59,26 @@
rb.exec_status,
rb.operator,
rb.team_code,
rb.borrow_time,
rb.return_time,
rb.xm_no_ck,
rb.xm_ms_ck,
rb.remark,
rb.is_delivery,
rb.is_delete,
rb.create_by,
rb.create_time,
rb.update_by,
rb.update_time,
mt.type_name AS wl_type_name,
COALESCE(sit.type_name, sot.type_name) AS operation_type_name,
su.nick_name AS operator_name,
wh.warehouse_name AS warehouse_name,
wh.parent_warehouse_name AS parent_warehouse_name
wh.parent_warehouse_name AS parent_warehouse_name,
ct.team_name AS team_name
FROM rk_bill rb
LEFT JOIN warehouse_info wh
@@ -70,6 +95,9 @@
AND (sot.is_delete = '0' OR sot.is_delete IS NULL)
LEFT JOIN sys_user su
ON rb.operator = su.user_id
LEFT JOIN construction_team ct
ON rb.team_code = ct.team_code
AND ct.is_delete = '0'
</sql>
<!-- ==================== List ==================== -->
@@ -93,20 +121,23 @@
AND rb.operation_type = #{operationType}
</if>
<!-- 多 bizType -->
<if test="bizTypeList != null and bizTypeList.size > 0">
AND rb.biz_type IN
<foreach collection="bizTypeList"
item="bt"
open="("
separator=","
close=")">
<foreach collection="bizTypeList" item="bt" open="(" separator="," close=")">
#{bt}
</foreach>
</if>
<if test="operationTime != null">
AND rb.operation_time = #{operationTime}
<if test="borrowTime != null">
AND rb.borrow_time = #{borrowTime}
</if>
<if test="returnTime != null">
AND rb.return_time = #{returnTime}
</if>
<if test="xmNoCk != null and xmNoCk != ''">
AND rb.xm_no_ck = #{xmNoCk}
</if>
<if test="startDate != null">
@@ -147,9 +178,7 @@
WHERE rb.id = #{id}
</select>
<select id="selectByBillNo"
parameterType="String"
resultMap="RkBillResult">
<select id="selectByBillNo" parameterType="String" resultMap="RkBillResult">
SELECT
id,
wl_type,
@@ -161,6 +190,10 @@
exec_status,
operator,
team_code,
borrow_time,
return_time,
xm_no_ck,
xm_ms_ck,
is_delivery,
remark,
create_by,
@@ -187,6 +220,11 @@
operation_type,
operation_time,
operator,
team_code,
borrow_time,
return_time,
xm_no_ck,
xm_ms_ck,
exec_status,
is_delivery,
remark,
@@ -201,6 +239,11 @@
#{operationType},
#{operationTime},
#{operator},
#{teamCode},
#{borrowTime},
#{returnTime},
#{xmNoCk},
#{xmMsCk},
#{execStatus},
#{isDelivery},
#{remark},
@@ -220,6 +263,10 @@
<if test="operationType != null and operationType != ''">operation_type = #{operationType},</if>
<if test="bizType != null and bizType != ''">biz_type = #{bizType},</if>
<if test="operationTime != null">operation_time = #{operationTime},</if>
<if test="borrowTime != null">borrow_time = #{borrowTime},</if>
<if test="returnTime != null">return_time = #{returnTime},</if>
<if test="xmNoCk != null and xmNoCk != ''">xm_no_ck = #{xmNoCk},</if>
<if test="xmMsCk != null and xmMsCk != ''">xm_ms_ck = #{xmMsCk},</if>
<if test="execStatus != null and execStatus != ''">exec_status = #{execStatus},</if>
<if test="operator != null">operator = #{operator},</if>
<if test="teamCode != null and teamCode != ''">team_code = #{teamCode},</if>
@@ -230,12 +277,19 @@
WHERE id = #{id}
</update>
<!-- ==================== ExecStatus ==================== -->
<update id="updateExecStatusByBillNo">
UPDATE rk_bill
SET exec_status = #{execStatus}
WHERE bill_no = #{billNo}
</update>
<update id="updateExecStatus">
UPDATE rk_bill
SET exec_status = #{execStatus}
WHERE bill_no = #{billNo}
</update>
<!-- ==================== Delete ==================== -->
<delete id="deleteRkBillById" parameterType="Long">
DELETE FROM rk_bill WHERE id = #{id}