Commit 6861f3e4 by huluobin

# 费用系统小程序api

parent 9c495a09
......@@ -416,27 +416,8 @@
<select id="appCheckCostList" resultType="com.blt.other.module.cost.model.CostDomain">
select t1.*
from cost t1
left join cost_log t2 on t1.cost_no = t2.cost_no
left join cost_company t3 on t1.company_no = t3.company_no
-- 最终审核人
left join cost_reviewer t4 on t3.id = t4.refer_id and t4.type = 3
-- 财务审核人
left join cost_reviewer t5 on t3.id = t5.refer_id and t5.type = 2
-- 部门审核人
left join oa_user t6 on t1.create_userid = t6.oa_user_id
left join cost_reviewer t7 on t6.primary_department_id = t7.refer_id and t7.type = 1
-- 行政审核
left join cost_reviewer t8 on t3.id = t8.refer_id and t5.type = 4
where (
-- 最终审核
(t1.cost_status = 8 and t4.reviewer_user_id = #{req.oaUserId})
-- 财务审核
or (t1.cost_status = 7 and t5.reviewer_user_id = #{req.oaUserId})
-- 部门审核
or (t1.cost_status = 6 and t7.reviewer_user_id = #{req.oaUserId})
-- 行政审核
or (t1.cost_status = 9 and t8.reviewer_user_id = #{req.oaUserId})
)
left join cost_current_reviewer tt on t1.cost_no = tt.cost_no
where tt.oa_user_id =#{req.oaUserId}
<if test=" req.startTime!=null">
and t1.create_time &gt;=#{req.startTime}
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment