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

53 lines
2.2 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.OABidMapper">
<select id="selectOABID" resultType="OASysBid">
2024-08-09 14:31:55 +08:00
select q.bid_id as bidId,q.bid_code as bidCode,sq.bid_id oaBidId,sq.state,sq.remark
2024-08-05 17:16:54 +08:00
from bid q
inner join (
2024-08-09 14:31:55 +08:00
select t.bid_id,t.bid_code,t.state,t.remark from (
select a.bid_id,a.bid_code,a.state,a.remark, row_number() over(partition by bid_code order by create_time desc) rw
2024-08-05 17:16:54 +08:00
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">
2024-08-14 16:11:40 +08:00
update bid set bid_approval_status = #{state},bid_oa_remark = #{remark}
2024-08-05 17:16:54 +08:00
where bid_id = #{bidId}
</update>
<update id="updateOABidByBidCode">
2024-08-09 14:31:55 +08:00
update sys_oa_bid set isFinish = '1' where bid_id = #{oaBidId}
2024-08-05 17:16:54 +08:00
</update>
2024-08-08 16:51:48 +08:00
<select id="selectOABIDTB" resultType="OASysBid">
2024-08-09 14:31:55 +08:00
select q.bid_id as bidId,q.bid_code as bidCode,sq.bid_id oaBidId,sq.state,sq.remark,sq.bid_vice_president_approved bidVicePresidentApproved
2024-08-08 16:51:48 +08:00
from bid q
inner join (
2024-08-09 14:31:55 +08:00
select t.bid_id,t.bid_code,t.state,t.remark,t.bid_vice_president_approved from (
select a.bid_id,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
2024-08-08 16:51:48 +08:00
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">
2024-08-14 16:11:40 +08:00
update bid set bid_approval_status = #{state},bid_oa_approval_status = #{state}, bid_oa_remark = #{remark},bid_vice_president_approved = #{bidVicePresidentApproved}
2024-08-08 16:51:48 +08:00
where bid_id = #{bidId}
</update>
<update id="updateOABidByBidCodeTb">
2024-08-09 14:31:55 +08:00
update sys_oa_bid_tb set isFinish = '1' where bid_id = #{oaBidId}
2024-08-08 16:51:48 +08:00
</update>
2024-08-05 17:16:54 +08:00
</mapper>