|
@ -18,11 +18,16 @@ public interface TbsBudgetLogMapper extends BaseMapper<TbsBudgetLog> { |
|
|
@Select("SELECT SUM(amount) FROM `tbs_budget_log` WHERE budget_id = #{budgetId} AND schedule_item_id = #{itemId} AND del_flag = '0'") |
|
|
@Select("SELECT SUM(amount) FROM `tbs_budget_log` WHERE budget_id = #{budgetId} AND schedule_item_id = #{itemId} AND del_flag = '0'") |
|
|
BigDecimal countBudgetItemAmount(@Param("budgetId")Long budgetId,@Param("itemId")Long itemId ); |
|
|
BigDecimal countBudgetItemAmount(@Param("budgetId")Long budgetId,@Param("itemId")Long itemId ); |
|
|
|
|
|
|
|
|
@Select("SELECT ROUND(SUM(amount),2) FROM `tbs_budget_log` WHERE opt_type in (0,2,3) and del_flag = '0'") |
|
|
@Select("SELECT ROUND(SUM(l.amount),2) FROM `tbs_budget_log` l left join tbs_schedule_item_budget i " + |
|
|
BigDecimal countPlannedBudgetAmount(); |
|
|
" on l.schedule_item_budget_id = i.id " + |
|
|
|
|
|
" WHERE l.opt_type in (0,2,3) and l.del_flag = '0' " + |
|
|
@Select("SELECT ROUND(abs(SUM(amount)),2) FROM `tbs_budget_log` WHERE opt_type in (1,4,5,6,11,12,13,14,15) and del_flag = '0'") |
|
|
" and i.del_flag = '0' and year(i.start_date) = #{year} and year(i.end_date) = #{year}") |
|
|
BigDecimal countUsedBudgetAmount(); |
|
|
BigDecimal countPlannedBudgetAmount(@Param("year")String year); |
|
|
|
|
|
|
|
|
|
|
|
@Select("SELECT ROUND(abs(SUM(l.amount)),2) FROM `tbs_budget_log` l left join tbs_schedule_item_budget i " + |
|
|
|
|
|
" on l.schedule_item_budget_id = i.id WHERE l.opt_type in (1,4,5,6,11,12,13,14,15) " + |
|
|
|
|
|
" and l.del_flag = '0' and i.del_flag = '0' and year(i.start_date) = #{year} and year(i.end_date) = #{year}") |
|
|
|
|
|
BigDecimal countUsedBudgetAmount(@Param("year")String year); |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 更新删除预算log记录,用于异动 |
|
|
* 更新删除预算log记录,用于异动 |
|
|