审核模块相关接口修改0721

This commit is contained in:
2025-07-21 11:17:44 +08:00
parent 6c7f945d29
commit 39a92d61f3
10 changed files with 272 additions and 126 deletions

View File

@@ -91,13 +91,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND is_delete = '0'
</select>
<select id="selectPhotoUrlByRkId"
<select id="selectPhotoUrlByBillNo"
resultMap="AuditSignatureResult"
parameterType="java.lang.Long">
parameterType="java.lang.String">
SELECT sign_url, audit_result
FROM audit_signature
WHERE is_delete = '0'
AND rk_id = #{rkId}
AND bill_no = #{billNo}
AND image_type = '1'
ORDER BY create_time DESC
LIMIT 1
@@ -177,7 +177,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
is_delete,
create_by,
create_time,
rk_id
rk_id,
pcode,
tray_code
)
VALUES
<foreach collection="list" item="item" separator=",">
@@ -195,7 +197,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.isDelete},
#{item.createBy},
#{item.createTime},
#{item.rkId}
#{item.rkId},
#{item.pcode},
#{item.trayCode}
)
</foreach>
</insert>
@@ -209,6 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isCurrent != null">is_current = #{isCurrent},</if>
</set>
WHERE bill_no = #{billNo}
AND is_current = '1'

View File

@@ -142,9 +142,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<delete id="deleteByBillNo">
DELETE FROM rk_info WHERE bill_no = #{billNo}
</delete>
<update id="cancelStockOut">
UPDATE rk_info
@@ -160,6 +157,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time = NOW()
WHERE bill_no_ck = #{billNoCk}
</update>
<delete id="deleteByBillNo">
DELETE FROM rk_info
WHERE bill_no = #{billNo}
</delete>
<select id="selectRkInfoList" parameterType="RkInfo" resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
@@ -350,25 +351,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectOneForEachBillNo" parameterType="java.util.List" resultType="com.zg.project.wisdom.domain.RkInfo">
SELECT
r.bill_no AS billNo,
COALESCE(r.bill_no_ck, r.bill_no) AS billNo,
MAX(r.lihuo_y) AS lihuoY,
MAX(u.user_name) AS lihuoYName,
MAX(rkType.type_name) AS rkTypeName,
MAX(cangku.warehouse_name) AS cangkuName,
MAX(wlType.type_name) AS wlTypeName
MAX(wlType.type_name) AS wlTypeName,
MAX(ckType.type_name) AS ckTypeName,
MAX(team.team_name) AS teamName
FROM rk_info r
LEFT JOIN stock_in_type rkType ON r.rk_type = rkType.type_code
LEFT JOIN stock_out_type ckType ON r.ck_type = ckType.type_code
LEFT JOIN warehouse_info cangku ON r.cangku = cangku.warehouse_code
LEFT JOIN material_type wlType ON r.wl_type = wlType.type_code
LEFT JOIN construction_team team ON r.team_code = team.team_code
LEFT JOIN sys_user u ON r.lihuo_y = u.user_id
WHERE r.is_delete = '0'
AND r.bill_no IN
AND (
r.bill_no IN
<foreach collection="billNos" item="billNo" open="(" separator="," close=")">
#{billNo}
</foreach>
GROUP BY r.bill_no
OR
r.bill_no_ck IN
<foreach collection="billNos" item="billNo" open="(" separator="," close=")">
#{billNo}
</foreach>
)
GROUP BY COALESCE(r.bill_no_ck, r.bill_no)
</select>
<select id="selectRkInfoListByBillNo" resultMap="RkInfoResult"
parameterType="java.lang.String">
SELECT
@@ -378,6 +392,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND bill_no = #{billNo}
</select>
<select id="selectRkInfoListByBillNoCk" resultMap="RkInfoResult" parameterType="java.lang.String">
SELECT *
FROM rk_info
WHERE is_delete = '0'
AND bill_no_ck = #{billNo}
</select>
<update id="updateRkInfo" parameterType="RkInfo">
update rk_info
<trim prefix="SET" suffixOverrides=",">
@@ -458,18 +479,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lyTime != null">ly_time = #{lyTime},</if>
<if test="borrowTime != null">borrow_time = #{borrowTime},</if>
<if test="returnTime != null">return_time = #{returnTime},</if>
<if test="status != null">status = #{status},</if>
</set>
WHERE id = #{id}
</update>
<update id="updateStatusByBillNo" parameterType="RkInfo">
UPDATE rk_info
SET status = #{status},
update_by = #{updateBy},
is_chuku = #{isChuku},
update_time = #{updateTime}
WHERE bill_no = #{billNo}
AND is_delete = '0'
<set>
<if test="status != null">status = #{status},</if>
<if test="isChuku != null">is_chuku = #{isChuku},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</set>
<where>
<if test="billNo != null">
bill_no = #{billNo}
</if>
<if test="billNo == null and billNoCk != null">
bill_no_ck = #{billNoCk}
</if>
</where>
</update>
<update id="markDeleteByBillNo" parameterType="RkInfo">
UPDATE rk_info
SET is_delete = #{isDelete},
status = #{status},
update_by = #{updateBy},
update_time = #{updateTime}
WHERE bill_no = #{billNo}
AND status IN ('0', '2')
</update>
<update id="markDeleteByBillNoCk" parameterType="RkInfo">
UPDATE rk_info
SET is_delete = #{isDelete},
status = #{status},
update_by = #{updateBy},
update_time = #{updateTime}
WHERE bill_no_ck = #{billNoCk}
AND status IN ('0', '2')
</update>
<update id="revertRkInfoStatusByBillNoCk" parameterType="RkInfo">
UPDATE rk_info
SET status = #{status},
is_chuku = #{isChuku},
update_by = #{updateBy},
update_time = #{updateTime}
WHERE bill_no_ck = #{billNoCk}
AND is_delete = '0'
AND bill_no IS NOT NULL
</update>
</mapper>