<iftest="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<iftest="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.posting_time = #{postingTime}
<iftest="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">
and t.image_id = #{imageId}
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if
test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.payment_status = #{inAccountStatus}
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if
test="inAccountMonth != null and inAccountMonth != null and inAccountMonth != '' and inAccountMonth != ''">
<iftest="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.payment_status = #{inAccountStatus}
</if>
<iftest="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and posting_time between #{postingTimeStart} and #{postingTimeEnd}
<iftest="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
@ -236,15 +241,24 @@
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<iftest="inAccountMonth != null and inAccountMonth != null and inAccountMonth != '' and inAccountMonth != ''">
and DATE_FORMAT(t.payment_date,'%Y-%m') = #{inAccountMonth}
</if>
<iftest="invoiceSource!=null and invoiceSource!='' and invoiceSource!='99'">
and t.invoice_source = #{invoiceSource}
</if>
<iftest="snVoucherNumber !=null and snVoucherNumber !='' and snVoucherNumber !='99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<!-- <if test="snVoucherNumber !=null and snVoucherNumber !='' and snVoucherNumber !='99'">-->
<!-- and t.sn_voucher_number = #{snVoucherNumber}-->
<iftest="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
AND qs_type = #{qsfs}
</if>
<iftest="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
<iftest="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
AND qs_type = #{qsfs}
</if>
<!-- <if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">-->
<!-- and t.sn_voucher_number = #{snVoucherNumber}-->
<!-- </if>-->
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and sn_voucher_number = #{snVoucherNumber}
</if>
<!-- <if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">-->
<!-- and t.posting_time = #{postingTime}-->
<!-- </if>-->
<iftest="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<!-- <if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">-->
<!-- and t.image_id = #{imageId}-->
<!-- </if>-->
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and image_id = #{imageNumber}
</if>
<!-- <if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">-->
<!-- and t.account_period = #{accountPeriod}-->
<!-- </if>-->
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and account_period = #{accountPeriod}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and inaccount_status = #{inAccountStatus}
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and bzdh = #{bzdh}
</if>
GROUP BY uuid having min(create_date)
ORDER BY create_date DESC
</select>
@ -433,15 +466,24 @@
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<iftest="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.posting_time = #{postingTime}
<iftest="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
<iftest="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
@ -497,12 +541,11 @@
<iftest="listMark != null and listMark != '' and listMark != 'null' and listMark != '99'">
and t.list_status = #{listMark}
</if>
<if
test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.payment_status = #{inAccountStatus}
</if>
<if
test="inAccountMonth != null and inAccountMonth != null and inAccountMonth != '' and inAccountMonth != ''">
<!-- <if-->
<!-- test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">-->
<!-- and t.payment_status = #{inAccountStatus}-->
<!-- </if>-->
<iftest="inAccountMonth != null and inAccountMonth != null and inAccountMonth != '' and inAccountMonth != ''">
and DATE_FORMAT(t.payment_date,'%Y-%m') = #{inAccountMonth}
</if>
<iftest="incentiveFlag !=null and incentiveFlag !='' and incentiveFlag!= '99'">
@ -514,15 +557,27 @@
<iftest="voucherNo != null and voucherNo != '' and voucherNo != 'null' and voucherNo != '99'">
and t.voucher_no = #{voucherNo}
</if>
<iftest="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.posting_time = #{postingTime}
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<iftest="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
GROUP BY t.uuid
ORDER BY t.create_date DESC
</select>
@ -561,6 +616,15 @@
<iftest="companyName!=null and companyName != ''">
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<iftest="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.posting_time = #{postingTime}
<iftest="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">
and t.image_id = #{imageId}
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
t.bzdh = #{bzdh}
</if>
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
t.sn_voucher_number = #{snVoucherNumber}
</if>
</select>
@ -112,10 +118,7 @@
<iftest="company !=null and company !=''">
and t.company = #{company}
</if>
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<iftest="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
<iftest="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<iftest="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
@ -124,5 +127,14 @@
<iftest="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<iftest="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<iftest="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
t.bzdh = #{bzdh}
</if>
<iftest="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">