新增盘点模块相关接口

This commit is contained in:
2025-06-17 08:39:05 +08:00
parent 52ff615f29
commit f3752c7cbc
32 changed files with 853 additions and 2303 deletions

View File

@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="lihuoY" column="lihuo_y" />
<result property="isChuku" column="is_chuku" />
<result property="billNo" column="bill_no"/>
<result property="billNoCk" column="bill_no_ck"/>
<result property="rkTypeName" column="rk_type_name"/>
<result property="wlTypeName" column="wl_type_name"/>
<result property="cangkuName" column="cangku_name"/>
@@ -54,11 +55,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT
ri.id,
ri.bill_no,
ri.bill_no_ck,
ri.rk_type, st.type_name AS rk_type_name,
ri.wl_type, mt.type_name AS wl_type_name,
ri.cangku, wh.warehouse_name AS cangku_name,
ri.rk_time, ri.lihuo_y, ri.is_chuku, ri.remark,
ri.ck_lihuo_y, ri.ck_type, sot.ck_type_name,
ri.ck_lihuo_y, ri.ck_type, sot.type_name AS ck_type_name,
ri.team_code, ct.team_name,
ri.ck_remark,
ri.ly_time,
@@ -71,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN stock_in_type st ON ri.rk_type = st.type_code
LEFT JOIN material_type mt ON ri.wl_type = mt.type_code
LEFT JOIN warehouse_info wh ON ri.cangku = wh.warehouse_code
LEFT JOIN stock_out_type sot ON ri.ck_type = sot.ck_type_code
LEFT JOIN stock_out_type sot ON ri.ck_type = sot.type_code
LEFT JOIN construction_team ct ON ri.team_code = ct.team_code
</sql>
@@ -101,6 +103,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
DELETE FROM rk_info WHERE bill_no = #{billNo}
</delete>
<update id="cancelStockOut">
UPDATE rk_info
SET
is_chuku = '0',
bill_no_ck = NULL,
ck_lihuo_y = NULL,
ck_type = NULL,
team_code = NULL,
ly_time = NULL,
ck_remark = NULL,
update_time = NOW()
WHERE bill_no_ck = #{billNoCk}
</update>
<select id="selectRkInfoList" parameterType="RkInfo" resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
<where>
@@ -108,7 +124,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isChuku != null and isChuku != ''">
and is_chuku = #{isChuku}
</if>
<if test="keyword != null and keyword != ''">
and (
xm_no like concat('%', #{keyword}, '%')
@@ -119,19 +134,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or gys_mc like concat('%', #{keyword}, '%')
or sap_no like concat('%', #{keyword}, '%')
or bill_no like concat('%', #{keyword}, '%')
or ck_type like concat('%', #{keyword}, '%')
or pcode like concat('%', #{keyword}, '%')
)
</if>
<if test="rkType != null and rkType != ''"> and rk_type = #{rkType}</if>
<if test="wlType != null and wlType != ''"> and wl_type = #{wlType}</if>
<if test="cangku != null and cangku != ''"> and cangku = #{cangku}</if>
<if test="rkTime != null "> and rk_time = #{rkTime}</if>
<if test="lihuoY != null and lihuoY != ''"> and lihuo_y = #{lihuoY}</if>
<if test="xj != null and xj != ''"> and xj = #{xj}</if>
<if test="billNo != null and billNo != ''">
and bill_no = #{billNo}
</if>
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
<if test="xmNo != null and xmNo != ''"> and xm_no = #{xmNo}</if>
<if test="xmMs != null and xmMs != ''"> and xm_ms = #{xmMs}</if>
<if test="wlNo != null and wlNo != ''"> and wl_no = #{wlNo}</if>
@@ -150,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lyTime != null"> and ri.ly_time = #{lyTime}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="entityId != null and entityId != ''"> and entity_id = #{entityId}</if>
<if test="ckType != null and ckType != ''"> and ck_type = #{ckType}</if>
<if test="isDelete != null and isDelete != ''">
and ri.is_delete = #{isDelete}
</if>
@@ -157,6 +171,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ri.is_delete = 0
</if>
</where>
order by rk_time desc
</select>
<select id="selectRkInfoById" parameterType="Long" resultMap="RkInfoResult">
@@ -198,6 +215,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY rk_time DESC
LIMIT #{limit}
</select>
<select id="selectSapNoByCkBillNo" resultType="java.lang.String">
SELECT DISTINCT sap_no FROM rk_info
WHERE bill_no = #{billNo} AND sap_no IS NOT NULL
</select>
<update id="updateRkInfo" parameterType="RkInfo">
update rk_info
@@ -230,7 +251,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="entityId != null">entity_id = #{entityId},</if>
<if test="ckLihuoY != null">ck_lihuo_y = #{ckLihuoY},</if>
<if test="ckType != null">ck_type = #{ckType},</if>
<if test="ckTypeName != null">ck_type_name = #{ckTypeName},</if>
<if test="sgdCode != null">sgd_code = #{sgdCode},</if>
<if test="sgdName != null">sgd_name = #{sgdName},</if>
<if test="lyTime != null">ly_time = #{lyTime},</if>
@@ -261,16 +281,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateById" parameterType="RkInfo">
UPDATE rk_info
SET is_chuku = #{isChuku},
ck_remark = #{ckRemark},
ck_type = #{ckType},
ck_time = #{ckTime},
ck_lihuo_y = #{ckLihuoY},
team_code = #{teamCode},
update_by = #{updateBy},
update_time = #{updateTime}
<set>
<if test="isChuku != null">is_chuku = #{isChuku},</if>
<if test="ckRemark != null">ck_remark = #{ckRemark},</if>
<if test="ckType != null">ck_type = #{ckType},</if>
<if test="lyTime != null">ly_time = #{lyTime},</if>
<if test="ckLihuoY != null">ck_lihuo_y = #{ckLihuoY},</if>
<if test="teamCode != null">team_code = #{teamCode},</if>
<if test="billNoCk != null">bill_no_ck = #{billNoCk},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime}</if>
</set>
WHERE id = #{id}
</update>
</mapper>