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.
20 lines
1.1 KiB
20 lines
1.1 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.ccsens.ptccsens.persist.dao.FinanceDao">
|
|
|
|
|
|
<select id="getPrepareByTaskId" resultType="com.ccsens.ptccsens.bean.vo.FinanceVo$FinancePrepare">
|
|
select f.id as financeId, (f.budget+ifNull(sum(b.add_budget),0)) as budge, f.bonus from t_plu_finance f
|
|
left join t_plu_finance_append_budget b on f.id = b.finance_id and b.rec_status = 0
|
|
where f.task_id = #{taskId} and f.rec_status = 0
|
|
group by f.id
|
|
</select>
|
|
<select id="getExpenseByTaskId" resultType="com.ccsens.ptccsens.bean.vo.FinanceVo$FinanceExpense">
|
|
select f.id as financeId, t.name as type, sum(a.money) as money from
|
|
t_plu_finance f
|
|
left join t_plu_finance_apply a on f.id = a.finance_id and a.rec_status = 0
|
|
left join t_plu_finance_type t on a.type_id = t.id and t.rec_status = 0
|
|
where f.task_id = #{taskId} and f.rec_status = 0
|
|
GROUP BY f.id, t.id
|
|
</select>
|
|
</mapper>
|