出入库新增审核相关接口
This commit is contained in:
206
src/main/resources/mybatis/wisdom/AuditSignatureMapper.xml
Normal file
206
src/main/resources/mybatis/wisdom/AuditSignatureMapper.xml
Normal file
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zg.project.wisdom.mapper.AuditSignatureMapper">
|
||||
|
||||
<resultMap type="AuditSignature" id="AuditSignatureResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="billNo" column="bill_no" />
|
||||
<result property="billType" column="bill_type" />
|
||||
<result property="signerId" column="signer_id" />
|
||||
<result property="signerRole" column="signer_role" />
|
||||
<result property="signUrl" column="sign_url" />
|
||||
<result property="signTime" column="sign_time" />
|
||||
<result property="pcode" column="pcode" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="approverId" column="approver_id" />
|
||||
<result property="approverSignUrl" column="approver_sign_url" />
|
||||
<result property="auditResult" column="audit_result" />
|
||||
<result property="imageType" column="image_type" />
|
||||
<result property="isCurrent" column="is_current" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAuditSignatureVo">
|
||||
select id, bill_no, bill_type, signer_id, signer_role, sign_url, sign_time, pcode, tray_code, approver_id, approver_sign_url, audit_result, image_type, is_current, remark, create_by, create_time, update_by, update_time, is_delete from audit_signature
|
||||
</sql>
|
||||
|
||||
<select id="selectAuditSignatureList" parameterType="AuditSignature" resultMap="AuditSignatureResult">
|
||||
<include refid="selectAuditSignatureVo"/>
|
||||
<where>
|
||||
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
|
||||
<if test="billType != null and billType != ''"> and bill_type = #{billType}</if>
|
||||
<if test="signerId != null and signerId != ''"> and signer_id = #{signerId}</if>
|
||||
<if test="signerRole != null and signerRole != ''"> and signer_role = #{signerRole}</if>
|
||||
<if test="signUrl != null and signUrl != ''"> and sign_url = #{signUrl}</if>
|
||||
<if test="signTime != null "> and sign_time = #{signTime}</if>
|
||||
<if test="pcode != null and pcode != ''"> and pcode = #{pcode}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="approverId != null and approverId != ''"> and approver_id = #{approverId}</if>
|
||||
<if test="approverSignUrl != null and approverSignUrl != ''"> and approver_sign_url = #{approverSignUrl}</if>
|
||||
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if>
|
||||
<if test="imageType != null and imageType != ''"> and image_type = #{imageType}</if>
|
||||
<if test="isCurrent != null and isCurrent != ''"> and is_current = #{isCurrent}</if>
|
||||
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAuditSignatureById" parameterType="Long" resultMap="AuditSignatureResult">
|
||||
<include refid="selectAuditSignatureVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectPendingByUser" resultMap="AuditSignatureResult">
|
||||
SELECT
|
||||
id, bill_no, bill_type, signer_id, signer_role, sign_url, sign_time,
|
||||
pcode, tray_code, approver_id, approver_sign_url, audit_result,
|
||||
image_type, is_current, remark, create_by, create_time, update_by,
|
||||
update_time, is_delete
|
||||
FROM audit_signature
|
||||
WHERE is_delete = '0'
|
||||
AND approver_id = #{userId}
|
||||
AND audit_result IS NULL
|
||||
</select>
|
||||
|
||||
<select id="existsCurrentSigner" resultType="boolean">
|
||||
SELECT COUNT(1)
|
||||
FROM audit_signature
|
||||
WHERE bill_no = #{billNo}
|
||||
AND signer_role = #{signerRole}
|
||||
AND is_current = '1'
|
||||
AND is_delete = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertAuditSignature" parameterType="AuditSignature" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into audit_signature
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="billNo != null and billNo != ''">bill_no,</if>
|
||||
<if test="billType != null and billType != ''">bill_type,</if>
|
||||
<if test="signerId != null">signer_id,</if>
|
||||
<if test="signerRole != null">signer_role,</if>
|
||||
<if test="signUrl != null">sign_url,</if>
|
||||
<if test="signTime != null">sign_time,</if>
|
||||
<if test="pcode != null">pcode,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="approverId != null">approver_id,</if>
|
||||
<if test="approverSignUrl != null">approver_sign_url,</if>
|
||||
<if test="auditResult != null">audit_result,</if>
|
||||
<if test="imageType != null">image_type,</if>
|
||||
<if test="isCurrent != null">is_current,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="billNo != null and billNo != ''">#{billNo},</if>
|
||||
<if test="billType != null and billType != ''">#{billType},</if>
|
||||
<if test="signerId != null">#{signerId},</if>
|
||||
<if test="signerRole != null">#{signerRole},</if>
|
||||
<if test="signUrl != null">#{signUrl},</if>
|
||||
<if test="signTime != null">#{signTime},</if>
|
||||
<if test="pcode != null">#{pcode},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="approverId != null">#{approverId},</if>
|
||||
<if test="approverSignUrl != null">#{approverSignUrl},</if>
|
||||
<if test="auditResult != null">#{auditResult},</if>
|
||||
<if test="imageType != null">#{imageType},</if>
|
||||
<if test="isCurrent != null">#{isCurrent},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO audit_signature (
|
||||
bill_no,
|
||||
bill_type,
|
||||
signer_id,
|
||||
signer_role,
|
||||
sign_url,
|
||||
sign_time,
|
||||
image_type,
|
||||
approver_id,
|
||||
is_current,
|
||||
is_delete,
|
||||
create_by,
|
||||
create_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.billNo},
|
||||
#{item.billType},
|
||||
#{item.signerId},
|
||||
#{item.signerRole},
|
||||
#{item.signUrl},
|
||||
#{item.signTime},
|
||||
#{item.imageType},
|
||||
#{item.approverId},
|
||||
#{item.isCurrent},
|
||||
#{item.isDelete},
|
||||
#{item.createBy},
|
||||
#{item.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateAuditSignature" parameterType="AuditSignature">
|
||||
update audit_signature
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="billNo != null and billNo != ''">bill_no = #{billNo},</if>
|
||||
<if test="billType != null and billType != ''">bill_type = #{billType},</if>
|
||||
<if test="signerId != null">signer_id = #{signerId},</if>
|
||||
<if test="signerRole != null">signer_role = #{signerRole},</if>
|
||||
<if test="signUrl != null">sign_url = #{signUrl},</if>
|
||||
<if test="signTime != null">sign_time = #{signTime},</if>
|
||||
<if test="pcode != null">pcode = #{pcode},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="approverId != null">approver_id = #{approverId},</if>
|
||||
<if test="approverSignUrl != null">approver_sign_url = #{approverSignUrl},</if>
|
||||
<if test="auditResult != null">audit_result = #{auditResult},</if>
|
||||
<if test="imageType != null">image_type = #{imageType},</if>
|
||||
<if test="isCurrent != null">is_current = #{isCurrent},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateIsCurrentToZero">
|
||||
UPDATE audit_signature
|
||||
SET is_current = '0',
|
||||
update_time = NOW()
|
||||
WHERE bill_no = #{billNo}
|
||||
AND signer_role = #{signerRole}
|
||||
AND is_current = '1'
|
||||
AND is_delete = '0'
|
||||
</update>
|
||||
|
||||
<delete id="deleteAuditSignatureById" parameterType="Long">
|
||||
delete from audit_signature where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAuditSignatureByIds" parameterType="String">
|
||||
delete from audit_signature where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -93,7 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
jh_qty, ht_qty, jh_amt, ht_dj, dw,
|
||||
borrow_time, return_time,
|
||||
pcode, pcode_id, tray_code, real_qty, entity_id,
|
||||
remark, is_chuku,is_borrowed, is_delete, create_by, create_time
|
||||
remark, is_chuku,is_borrowed,
|
||||
is_delete, create_by, create_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
@@ -105,7 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.jhQty}, #{item.htQty}, #{item.jhAmt}, #{item.htDj}, #{item.dw},
|
||||
#{item.borrowTime}, #{item.returnTime},
|
||||
#{item.pcode}, #{item.pcodeId}, #{item.trayCode}, #{item.realQty}, #{item.entityId},
|
||||
#{item.remark}, #{item.isChuku}, #{item.isBorrowed},#{item.isDelete}, #{item.createBy}, #{item.createTime}
|
||||
#{item.remark}, #{item.isChuku}, #{item.isBorrowed},
|
||||
#{item.isDelete}, #{item.createBy}, #{item.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
@@ -264,9 +266,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
SELECT
|
||||
ri.id, ri.rk_type, ri.wl_type, ri.cangku, ri.rk_time, ri.lihuo_y,
|
||||
ri.is_chuku, ri.bill_no, ri.bill_no_ck,
|
||||
ri.remark, ri.xj, ri.xm_no, ri.xm_ms, ri.wl_no, ri.wl_ms,ri.is_borrowed,
|
||||
ri.remark, ri.xj, ri.xm_no, ri.xm_ms, ri.wl_no, ri.wl_ms, ri.is_borrowed,
|
||||
ri.gys_no, ri.gys_mc, ri.jh_amt, ri.ht_dj, ri.sap_no, ri.xh,
|
||||
ri.jh_qty, ri.ht_qty, ri.dw, ri.real_qty,ri.borrow_time, ri.return_time,
|
||||
ri.jh_qty, ri.ht_qty, ri.dw, ri.real_qty, ri.borrow_time, ri.return_time,
|
||||
ri.pcode, ri.pcode_id, ri.tray_code, ri.entity_id,
|
||||
ri.ck_lihuo_y, ri.ck_type, ri.team_code, ri.ly_time, ri.ck_remark,
|
||||
ri.create_by, ri.create_time, ri.update_by, ri.update_time, ri.is_delete
|
||||
@@ -282,7 +284,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
SELECT
|
||||
id, rk_type, wl_type, cangku, rk_time, lihuo_y,
|
||||
is_chuku, bill_no, bill_no_ck,
|
||||
remark, xj, xm_no, xm_ms, wl_no, wl_ms,is_borrowed,
|
||||
remark, xj, xm_no, xm_ms, wl_no, wl_ms, is_borrowed,
|
||||
gys_no, gys_mc, jh_amt, ht_dj, sap_no, xh,
|
||||
jh_qty, ht_qty, dw, real_qty,
|
||||
pcode, pcode_id, tray_code, entity_id,
|
||||
@@ -422,4 +424,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateStatusByBillNo" parameterType="RkInfo">
|
||||
UPDATE rk_info
|
||||
SET status = #{status},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
WHERE bill_no = #{billNo}
|
||||
AND is_delete = '0'
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user