|
|
@ -144,7 +144,7 @@ |
|
|
|
tbs_cost_apply.id as tar_id, |
|
|
|
tbs_cost_apply.code as tar_code, |
|
|
|
tbs_cost_apply.charge_theme as tar_title, |
|
|
|
sum(tbs_budget_log.amount) as total_amount, |
|
|
|
-sum(tbs_budget_log.amount) as total_amount, |
|
|
|
tbs_cost_apply.supplier_code, |
|
|
|
tbs_cost_apply.supplier_name, |
|
|
|
tbs_cost_apply.user_code, |
|
|
@ -168,6 +168,15 @@ |
|
|
|
<foreach collection="scheduleItemBudgetIds" item ="selectId" index="i" open="(" close=")" separator=","> |
|
|
|
#{selectId} |
|
|
|
</foreach> |
|
|
|
|
|
|
|
<if test="query.type != null and query.type == 'policy'"> and 1=0 </if> |
|
|
|
<if test="query.tarCode != null and query.tarCode != ''"> and tbs_cost_apply.code like concat('%',#{query.tarCode},'%') </if> |
|
|
|
<if test="query.tarTitle != null and query.tarTitle != ''"> and tbs_cost_apply.charge_theme like concat('%',#{query.tarTitle},'%') </if> |
|
|
|
<if test="query.supplierCode != null and query.supplierCode != ''"> and tbs_cost_apply.supplier_code like concat('%',#{query.supplierCode},'%') </if> |
|
|
|
<if test="query.supplierName != null and query.supplierName != ''"> and tbs_cost_apply.supplier_name like concat('%',#{query.supplierName},'%') </if> |
|
|
|
<if test="query.userCode != null and query.userCode != ''"> and tbs_cost_apply.user_code like concat('%',#{query.userCode},'%') </if> |
|
|
|
<if test="query.userName != null and query.userName != ''"> and tbs_cost_apply.user_name like concat('%',#{query.userName},'%') </if> |
|
|
|
|
|
|
|
group by tbs_budget_log.cost_apply_id |
|
|
|
|
|
|
|
union |
|
|
@ -177,7 +186,7 @@ |
|
|
|
tzc_policy.id as tar_id, |
|
|
|
tzc_policy.policy_code as tar_code, |
|
|
|
tzc_policy.title as tar_title, |
|
|
|
sum(tbs_budget_log.amount) as total_amount, |
|
|
|
-sum(tbs_budget_log.amount) as total_amount, |
|
|
|
tzc_policy.supplier_code, |
|
|
|
tzc_policy.supplier_name, |
|
|
|
tzc_policy.user_code, |
|
|
@ -201,6 +210,15 @@ |
|
|
|
<foreach collection="scheduleItemBudgetIds" item ="selectId" index="i" open="(" close=")" separator=","> |
|
|
|
#{selectId} |
|
|
|
</foreach> |
|
|
|
|
|
|
|
<if test="query.type != null and query.type == 'costApply'"> and 1=0 </if> |
|
|
|
<if test="query.tarCode != null and query.tarCode != ''"> and tzc_policy.policy_code like concat('%',#{query.tarCode},'%') </if> |
|
|
|
<if test="query.tarTitle != null and query.tarTitle != ''"> and tzc_policy.title like concat('%',#{query.tarTitle},'%') </if> |
|
|
|
<if test="query.supplierCode != null and query.supplierCode != ''"> and tzc_policy.supplier_code like concat('%',#{query.supplierCode},'%') </if> |
|
|
|
<if test="query.supplierName != null and query.supplierName != ''"> and tzc_policy.supplier_name like concat('%',#{query.supplierName},'%') </if> |
|
|
|
<if test="query.userCode != null and query.userCode != ''"> and tzc_policy.user_code like concat('%',#{query.userCode},'%') </if> |
|
|
|
<if test="query.userName != null and query.userName != ''"> and tzc_policy.user_name like concat('%',#{query.userName},'%') </if> |
|
|
|
|
|
|
|
group by tbs_budget_log.policy_id |
|
|
|
|
|
|
|
</select> |
|
|
|