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

53 lines
2.2 KiB
XML
Raw 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.OABidMapper">
<select id="selectOABID" resultType="OASysBid">
select q.bid_id as bidId,q.bid_code as bidCode,sq.state,sq.remark
from bid q
inner join (
select t.bid_code,t.state,t.remark from (
select a.bid_code,a.state,a.remark, row_number() over(partition by bid_code order by create_time desc) rw
from sys_oa_bid a
where a.triggerflag = '1' and a.state in ('1','3') and a.isFinish = '0'
) t where t.rw = 1
) sq on q.bid_code = sq.bid_code
where q.bid_approval_status = '4'
</select>
<update id="updateBidOAApprovalStatus">
update bid set bid_approval_status = #{state},bid_returnRemark = #{remark}
where bid_id = #{bidId}
</update>
<update id="updateOABidByBidCode">
update sys_oa_bid set isFinish = '1' where bid_code = #{bidCode}
</update>
2024-08-08 16:51:48 +08:00
<select id="selectOABIDTB" resultType="OASysBid">
select q.bid_id as bidId,q.bid_code as bidCode,sq.state,sq.remark,sq.bid_vice_president_approved bidVicePresidentApproved
from bid q
inner join (
select t.bid_code,t.state,t.remark,t.bid_vice_president_approved from (
select a.bid_code,a.state,a.remark, a.bid_vice_president_approved,row_number() over(partition by bid_code order by create_time desc) rw
from sys_oa_bid_tb a
where a.triggerflag = '1' and a.state in ('2','3') and a.isFinish = '0'
) t where t.rw = 1
) sq on q.bid_code = sq.bid_code
where q.bid_approval_status = '1'
</select>
<update id="updateBidOAApprovalStatusTb">
update bid set bid_approval_status = #{state},bid_oa_approval_status = #{state}, bid_oa_remark = #{remark},bid_vice_president_approved = {bidVicePresidentApproved}
where bid_id = #{bidId}
</update>
<update id="updateOABidByBidCodeTb">
update sys_oa_bid_tb set isFinish = '1' where bid_code = #{bidCode}
</update>
2024-08-05 17:16:54 +08:00
</mapper>