|
|
@ -20,49 +20,51 @@ |
|
|
|
<if test="query.costTitle != null and query.costTitle != ''"> and `tbs_cost_apply`.`charge_theme` like concat('%',#{query.costTitle},'%') </if> |
|
|
|
</sql> |
|
|
|
|
|
|
|
<resultMap id="vtbActivityCheckDTOMap" type="com.qs.serve.modules.vtb.entity.dto.VtbActivityCheckDTO"> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<select id="pageActivityCheck" resultType="com.qs.serve.modules.vtb.entity.dto.VtbActivityCheckDTO"> |
|
|
|
select |
|
|
|
tbs_cost_apply.`id` as costApplyId, |
|
|
|
tbs_cost_apply.`code` as costApplyCode, |
|
|
|
tbs_cost_apply.charge_theme as costTitle, |
|
|
|
tbs_cost_apply.supplier_id , |
|
|
|
tbs_cost_apply.supplier_code , |
|
|
|
tbs_cost_apply.supplier_name , |
|
|
|
tbs_cost_apply.submit_time , |
|
|
|
tbs_activity.activity_code, |
|
|
|
tbs_activity.act_title as activity_title, |
|
|
|
tbs_activity.total_amount as activity_amount, |
|
|
|
vvtb.act_check_amt as check_amount, |
|
|
|
vvtb.vtb_finished_date as check_finished_date, |
|
|
|
tbs_activity.`release_flag`, |
|
|
|
tbs_activity.`release_amount`, |
|
|
|
tbs_activity.`release_time`, |
|
|
|
tbs_activity.`release_user_id`, |
|
|
|
tbs_activity.`release_user_name` |
|
|
|
tbs_cost_apply.`id` as costApplyId, |
|
|
|
tbs_cost_apply.`code` as costApplyCode, |
|
|
|
tbs_cost_apply.charge_theme as costTitle, |
|
|
|
tbs_cost_apply.supplier_id , |
|
|
|
tbs_cost_apply.supplier_code , |
|
|
|
tbs_cost_apply.supplier_name , |
|
|
|
tbs_cost_apply.submit_time , |
|
|
|
tbs_activity.activity_code, |
|
|
|
tbs_activity.act_title as activity_title, |
|
|
|
tbs_activity.total_amount as activity_amount, |
|
|
|
vvtb.act_check_amt as check_amount, |
|
|
|
vvtb.vtb_finished_date as check_finished_date, |
|
|
|
tbs_activity.`release_flag`, |
|
|
|
tbs_activity.`release_amount`, |
|
|
|
tbs_activity.`release_time`, |
|
|
|
tbs_activity.`release_user_id`, |
|
|
|
tbs_activity.`release_user_name` |
|
|
|
from tbs_activity |
|
|
|
left join tbs_cost_apply on tbs_activity.cost_apply_id = tbs_cost_apply.id |
|
|
|
left join ( |
|
|
|
select |
|
|
|
vtb.activity_id, |
|
|
|
sum(vtb.amount) as act_check_amt, |
|
|
|
max(vtb.finished_time) as vtb_finished_date |
|
|
|
from vtb_verification vtb |
|
|
|
where |
|
|
|
vtb.del_flag = 0 |
|
|
|
<if test="query.queryStartCheckTime != null and query.queryStartCheckTime != ''"> |
|
|
|
and vtb.finished_time >= #{query.queryStartCheckTime} </if> |
|
|
|
<if test="query.queryEndSubmitTime != null and query.queryEndSubmitTime != ''"> |
|
|
|
and vtb.finished_time <= #{query.queryEndSubmitTime} </if> |
|
|
|
select |
|
|
|
vtb.activity_id, |
|
|
|
sum(vtb.amount) as act_check_amt, |
|
|
|
max(vtb.finished_time) as vtb_finished_date |
|
|
|
from vtb_verification vtb |
|
|
|
where |
|
|
|
vtb.del_flag = 0 |
|
|
|
<if test="query.queryStartCheckTime != null and query.queryStartCheckTime != ''"> |
|
|
|
and vtb.finished_time >= #{query.queryStartCheckTime} </if> |
|
|
|
<if test="query.queryEndSubmitTime != null and query.queryEndSubmitTime != ''"> |
|
|
|
and vtb.finished_time <= #{query.queryEndSubmitTime} </if> |
|
|
|
group by vtb.activity_id |
|
|
|
) vvtb on vvtb.activity_id = tbs_activity.id |
|
|
|
<include refid="baseSelectCheckWhere"></include> |
|
|
|
limit #{query.startRow},#{query.pageSize} |
|
|
|
<if test="query.openPage!=null and query.openPage==1"> |
|
|
|
limit #{query.startRow},#{query.pageSize} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<resultMap id="vtbActivityCheckDTOMap" type="com.qs.serve.modules.vtb.entity.dto.VtbActivityCheckDTO"> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<select id="countActivityCheck" resultType="java.lang.Long"> |
|
|
|
select |
|
|
|
count(1) |
|
|
@ -155,7 +157,9 @@ |
|
|
|
<if test="query.chargeTheme != null and query.chargeTheme != ''"> and `cost`.`charge_theme` like concat('%',#{query.chargeTheme},'%')</if> |
|
|
|
<if test="query.startCheckTime != null and query.startCheckTime != ''"> and `vtb`.`finished_time` >= #{query.startCheckTime}</if> |
|
|
|
<if test="query.startCheckTime != null and query.startCheckTime != ''"> and `vtb`.`finished_time` <= #{query.endCheckTime}</if> |
|
|
|
limit #{query.startRow},#{query.pageSize} |
|
|
|
<if test="query.openPage!=null and query.openPage==1"> |
|
|
|
limit #{query.startRow},#{query.pageSize} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="countVerificationCheck" resultType="java.lang.Long"> |
|
|
|