JNBusinessTest/ruoyi-quartz/target/classes/mapper/quartz/OAZgysMapper.xml

29 lines
1.3 KiB
XML
Raw Permalink Normal View History

2024-08-05 17:16:54 +08:00
<?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.ruoyi.quartz.mapper.OAZgysMapper">
<select id="selectOAZGYS" resultType="OASysZgys">
2024-08-09 14:31:55 +08:00
select q.pq_id as pqId,q.pq_code as pqCode,sq.state,sq.pq_id oaPqId,sq.remark,sq.pq_vp_approval as pqVpApproval
2024-08-05 17:16:54 +08:00
from zgys q
inner join (
2024-08-09 14:31:55 +08:00
select t.pq_id,t.pq_code,t.state,t.remark,t.pq_vp_approval from (
select a.pq_id,a.pq_code,a.state,a.remark,a.pq_vp_approval, row_number() over(partition by pq_code order by create_time desc) rw
2024-08-05 17:16:54 +08:00
from sys_oa_zgys a
where a.triggerflag = '1' and a.state in ('2','3') and a.isFinish = '0'
) t where t.rw = 1
) sq on q.pq_code = sq.pq_code
where q.pq_oa_approval_status = '1'
</select>
<update id="updateZgysOAApprovalStatus">
update zgys set pq_approval_status = #{state},pq_oa_approval_status = #{state},
2024-08-08 16:51:48 +08:00
pq_oa_remark = #{remark},pq_vp_approval = #{pqVpApproval}
2024-08-05 17:16:54 +08:00
where pq_id = #{pqId}
</update>
<update id="updateOAZgysByZgysCode">
2024-08-09 14:31:55 +08:00
update sys_oa_zgys set isFinish = '1' where pq_id = #{oaPqId}
2024-08-05 17:16:54 +08:00
</update>
</mapper>