You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
3.7 KiB
87 lines
3.7 KiB
<?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.qs.serve.modules.seeyon.mapper.CommonCheckMapper">
|
|
|
|
<select id="pageCallbackList" resultType="com.qs.serve.modules.seeyon.entity.vo.TodoVO">
|
|
select
|
|
'CostBill' as target_type,
|
|
cost.id as target_id,
|
|
cost.`code` as target_code,
|
|
cost.charge_theme as title,
|
|
cost.submit_time
|
|
from tbs_cost_apply cost where cost.charge_state = 4 and cost.user_id = #{query.userId} and cost.del_flag = 0
|
|
UNION
|
|
select
|
|
'ReleasePolicy' as target_type,
|
|
policy.id as target_id,
|
|
policy.policy_code as target_code,
|
|
policy.title,
|
|
policy.submit_time
|
|
from tzc_policy policy where policy.policy_status = 4 and policy.user_id = #{query.userId} and policy.del_flag = 0
|
|
UNION
|
|
select
|
|
'CheckCost' as target_type,
|
|
vtb.id as target_id,
|
|
vtb.`verification_code` as target_code,
|
|
act.act_title as title,
|
|
vtb.create_time as submit_time
|
|
from vtb_verification vtb
|
|
left join tbs_activity act on vtb.activity_id = act.id
|
|
where vtb.verification_state = 3 and vtb.user_id = #{query.userId} and act.del_flag = 0 and vtb.del_flag = 0
|
|
UNION
|
|
select
|
|
'budgetAdjust' as target_type,
|
|
budget.id as target_id,
|
|
budget.budget_number as target_code,
|
|
budget.budget_code as title,
|
|
budget.submit_time
|
|
from tbs_budget budget
|
|
where budget.budget_check_state = 3 and budget.user_id = #{query.userId} and budget.del_flag = 0
|
|
UNION
|
|
select
|
|
'budgetAdjust2' as target_type,
|
|
budget_change.id as target_id,
|
|
budget_change.change_code as target_code,
|
|
budget_change.budget_title as title,
|
|
budget_change.submit_time
|
|
from tbs_budget_change budget_change
|
|
where budget_change.budget_check_state = 3 and budget_change.user_id = #{query.userId} and budget_change.del_flag = 0
|
|
limit #{query.startRow},#{query.pageSize}
|
|
</select>
|
|
|
|
<select id="countCallback" resultType="java.lang.Long">
|
|
select count(0) from (
|
|
select
|
|
'CostBill' as target_type,
|
|
cost.id as target_id
|
|
from tbs_cost_apply cost where cost.charge_state = 4 and cost.user_id = #{query.userId} and cost.del_flag = 0
|
|
UNION
|
|
select
|
|
'ReleasePolicy' as target_type,
|
|
policy.id as target_id
|
|
from tzc_policy policy where policy.policy_status = 4 and policy.user_id = #{query.userId} and policy.del_flag = 0
|
|
UNION
|
|
select
|
|
'CheckCost' as target_type,
|
|
vtb.id as target_id
|
|
from vtb_verification vtb
|
|
left join tbs_activity act on vtb.activity_id = act.id
|
|
where vtb.verification_state = 3 and vtb.user_id = #{query.userId} and vtb.del_flag = 0
|
|
UNION
|
|
select
|
|
'budgetAdjust' as target_type,
|
|
budget.id as target_id
|
|
from tbs_budget budget
|
|
where budget.budget_check_state = 3 and budget.user_id = #{query.userId} and budget.del_flag = 0
|
|
UNION
|
|
select
|
|
'budgetAdjust2' as target_type,
|
|
budget_change.id as target_id
|
|
from tbs_budget_change budget_change
|
|
where budget_change.budget_check_state = 3 and budget_change.user_id = #{query.userId} and budget_change.del_flag = 0
|
|
) tmp_tb
|
|
</select>
|
|
|
|
</mapper>
|
|
|