28 lines
1.1 KiB
XML
28 lines
1.1 KiB
XML
|
<?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.OAQuotMapper">
|
||
|
<select id="selectOAQUOT" resultType="OASysQuot">
|
||
|
select q.quot_id as quotId,q.quot_code as quotCode,sq.state,sq.remark
|
||
|
from quot q
|
||
|
inner join (
|
||
|
select t.quot_code,t.state,t.remark from (
|
||
|
select a.quot_code,a.state,a.remark, row_number() over(partition by quot_code order by create_time desc) rw
|
||
|
from sys_oa_quot a
|
||
|
where a.triggerflag = '1' and a.state in ('2','3') and a.isFinish = '0'
|
||
|
) t where t.rw = 1
|
||
|
) sq on q.quot_code = sq.quot_code
|
||
|
where q.quot_oa_approval_status = '1'
|
||
|
</select>
|
||
|
|
||
|
<update id="updateQuotOAApprovalStatus">
|
||
|
update quot set quot_oa_approval_status = #{state},quot_oa_approval_remark = #{remark}
|
||
|
where quot_id = #{quotId}
|
||
|
</update>
|
||
|
|
||
|
<update id="updateOAQuotByQuotCode">
|
||
|
update sys_oa_quot set isFinish = '1' where quot_code = #{quotCode}
|
||
|
</update>
|
||
|
</mapper>
|