2024-08-08 16:51:48 +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.OAAuthorizeMapper">
|
|
|
|
<select id="selectOAAUTHORIZE" resultType="OASysAuthorize">
|
2024-08-09 14:31:55 +08:00
|
|
|
select q.doa_id as doaId,q.doa_code as doaCode,sq.doa_id oaDoaId,sq.state,sq.remark,sq.doa_vice_president_approved as doaVicePresidentApproved
|
2024-08-08 16:51:48 +08:00
|
|
|
from authorize q
|
|
|
|
inner join (
|
2024-08-09 14:31:55 +08:00
|
|
|
select t.doa_id,t.doa_code,t.state,t.remark,t.doa_vice_president_approved from (
|
|
|
|
select a.doa_id,a.doa_code,a.state,a.remark,a.doa_vice_president_approved, row_number() over(partition by doa_code order by create_time desc) rw
|
2024-08-08 16:51:48 +08:00
|
|
|
from sys_oa_authorize a
|
|
|
|
where a.triggerflag = '1' and a.state in ('2','3') and a.isFinish = '0'
|
|
|
|
) t where t.rw = 1
|
|
|
|
) sq on q.doa_code = sq.doa_code
|
|
|
|
where q.doa_oa_approval_status = '1'
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<update id="updateAuthorizeOAApprovalStatus">
|
|
|
|
update authorize set doa_approval_status = #{state},doa_oa_approval_status = #{state},
|
|
|
|
doa_oa_remark = #{remark},doa_vice_president_approved = #{doaVicePresidentApproved}
|
|
|
|
where doa_id = #{doaId}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<update id="updateOAAuthorizeByAuthorizeCode">
|
2024-08-09 14:31:55 +08:00
|
|
|
update sys_oa_authorize set isFinish = '1' where doa_id = #{oaDoaId}
|
2024-08-08 16:51:48 +08:00
|
|
|
</update>
|
|
|
|
</mapper>
|