库存模块功能开发

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

@@ -103,6 +103,8 @@
<include refid="selectRkInfoVo"/>
<where>
ri.exec_status = 1
AND ri.is_chuku = 0
AND ri.is_delete = 0
<if test="operationType != null and operationType != ''">
AND ri.operation_type LIKE CONCAT('%', #{operationType}, '%')
</if>
@@ -159,16 +161,44 @@
WHERE ri.id = #{id}
</select>
<select id="countByBillNo" resultType="int">
SELECT COUNT(1)
FROM rk_info
WHERE bill_no = #{billNo}
</select>
<select id="countNotPreByIds" resultType="int">
SELECT COUNT(1)
FROM rk_info
WHERE id IN
<foreach collection="rkInfoIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
AND exec_status != '0'
</select>
<select id="selectRkInfoByIds"
parameterType="java.util.List"
resultMap="RkInfoResult">
SELECT
ri.*
FROM rk_info ri
WHERE ri.id IN
<foreach collection="rkInfoIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<!-- ========================= 删除 ========================= -->
<delete id="deleteRkInfoById" parameterType="Long">
DELETE FROM rk_info WHERE id = #{id}
</delete>
<delete id="deleteRkInfoByIds" parameterType="java.util.List">
<delete id="deleteRkInfoByIds">
DELETE FROM rk_info
WHERE id IN
<foreach item="item" collection="list" open="(" separator="," close=")">
#{item}
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
@@ -277,4 +307,27 @@
</foreach>
</update>
<update id="updateRealQtyById">
update rk_info
set real_qty = #{realQty},
update_time = now()
where id = #{id}
</update>
<update id="updateIsChukuById">
update rk_info
set is_chuku = #{isChuku},
update_time = now()
where id = #{id}
</update>
<update id="updateBorrowReturn">
UPDATE rk_info
SET is_borrowed = #{isBorrowed},
return_time = #{returnTime},
update_time = NOW()
WHERE id = #{id}
</update>
</mapper>