|
@@ -596,6 +596,72 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getEffectiveDataByNumbers2" resultType="string">
|
|
|
+ SELECT GROUP_CONCAT(CAST(count AS CHAR) SEPARATOR ',') AS counts
|
|
|
+ FROM (
|
|
|
+ select a.number as count from ccpm_reimbursement_amount_info a
|
|
|
+ left join ccpm_reimbursement_info ri on ri.id = a.info_id
|
|
|
+ <where>
|
|
|
+ a.number in
|
|
|
+ <foreach collection="invoiceNumber" item="number" index="index" open="(" close=")" separator=",">
|
|
|
+ #{number}
|
|
|
+ </foreach>
|
|
|
+ and a.del_flag = 0
|
|
|
+ and ri.del_flag = 0
|
|
|
+ and (ri.type = '2' or ri.type = '5')
|
|
|
+ </where>
|
|
|
+ union all
|
|
|
+ select a.number as count from reimbursement_amount_info a
|
|
|
+ left join reimbursement_info ri on ri.id = a.info_id
|
|
|
+ <where>
|
|
|
+ a.number in
|
|
|
+ <foreach collection="invoiceNumber" item="number" index="index" open="(" close=")" separator=",">
|
|
|
+ #{number}
|
|
|
+ </foreach>
|
|
|
+ and a.del_flag = 0
|
|
|
+ and ri.del_flag = 0
|
|
|
+ and (ri.type = '2' or ri.type = '5')
|
|
|
+ </where>
|
|
|
+ union all
|
|
|
+ select a.number as count from cw_reimbursement_amount_info a
|
|
|
+ left join cw_reimbursement_info ri on ri.id = a.info_id
|
|
|
+ <where>
|
|
|
+ a.number in
|
|
|
+ <foreach collection="invoiceNumber" item="number" index="index" open="(" close=")" separator=",">
|
|
|
+ #{number}
|
|
|
+ </foreach>
|
|
|
+ and a.del_flag = 0
|
|
|
+ and ri.del_flag = 0
|
|
|
+ and (ri.type = '2' or ri.type = '5')
|
|
|
+ </where>
|
|
|
+ union all
|
|
|
+ select a.number as count from zs_reimbursement_amount_info a
|
|
|
+ left join zs_reimbursement_info ri on ri.id = a.info_id
|
|
|
+ <where>
|
|
|
+ a.number in
|
|
|
+ <foreach collection="invoiceNumber" item="number" index="index" open="(" close=")" separator=",">
|
|
|
+ #{number}
|
|
|
+ </foreach>
|
|
|
+ and a.del_flag = 0
|
|
|
+ and ri.del_flag = 0
|
|
|
+ and (ri.type = '2' or ri.type = '5')
|
|
|
+ </where>
|
|
|
+ union all
|
|
|
+ select a.number as count from consultancy_reimbursement_amount_info a
|
|
|
+ left join consultancy_reimbursement_info ri on ri.id = a.info_id
|
|
|
+ <where>
|
|
|
+ a.number in
|
|
|
+ <foreach collection="invoiceNumber" item="number" index="index" open="(" close=")" separator=",">
|
|
|
+ #{number}
|
|
|
+ </foreach>
|
|
|
+ and a.del_flag = 0
|
|
|
+ and ri.del_flag = 0
|
|
|
+ and (ri.type = '2' or ri.type = '5')
|
|
|
+ </where>
|
|
|
+ )AS result;
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
<delete id="deleteByIdAndNumber">
|
|
|
delete from cw_reimbursement_amount_info
|
|
|
<where>
|