|
@@ -26,11 +26,15 @@
|
|
t1.*, t2.name as company_name, t2.social_credit_code, t2.tax_type, t2.is_zero, t2.customer_label_id, t4.lable as customerLabelName,
|
|
t1.*, t2.name as company_name, t2.social_credit_code, t2.tax_type, t2.is_zero, t2.customer_label_id, t4.lable as customerLabelName,
|
|
(select concat(frtd.year, '-', frtd.month) from biz_financial_report_tax_detail frtd where
|
|
(select concat(frtd.year, '-', frtd.month) from biz_financial_report_tax_detail frtd where
|
|
frtd.financial_report_tax_id = t1.id order by year desc, month desc limit 1) currentDate,
|
|
frtd.financial_report_tax_id = t1.id order by year desc, month desc limit 1) currentDate,
|
|
- t3.account_name as from_company_name
|
|
|
|
|
|
+ t3.account_name as from_company_name,t6.nick_name as verifierName,
|
|
|
|
+ t5.verifier_time
|
|
from biz_financial_report_tax t1
|
|
from biz_financial_report_tax t1
|
|
left join biz_company t2 on t2.id = t1.company_id
|
|
left join biz_company t2 on t2.id = t1.company_id
|
|
left join biz_tenant t3 on t3.id = t1.tenant_id
|
|
left join biz_tenant t3 on t3.id = t1.tenant_id
|
|
left join biz_lable t4 on t4.id = t2.customer_label_id
|
|
left join biz_lable t4 on t4.id = t2.customer_label_id
|
|
|
|
+ left join biz_financial_report_tax_detail t5 on t5.financial_report_tax_id = t1.id
|
|
|
|
+ and t5.deleted = 0 and t5.month = #{month} and t5.year = #{year} and t5.financial_report_tax_id = t1.id
|
|
|
|
+ left join sys_user t6 on t6.user_id = t5.verifier_id
|
|
<!-- left join fxy_financial_checkout t3 on t3.account_sets_id = t1.account_sets_id-->
|
|
<!-- left join fxy_financial_checkout t3 on t3.account_sets_id = t1.account_sets_id-->
|
|
WHERE
|
|
WHERE
|
|
t1.deleted = 0
|
|
t1.deleted = 0
|
|
@@ -53,6 +57,16 @@
|
|
<if test="socialCreditCode != null and socialCreditCode!=''">
|
|
<if test="socialCreditCode != null and socialCreditCode!=''">
|
|
AND t2.social_credit_code = #{socialCreditCode}
|
|
AND t2.social_credit_code = #{socialCreditCode}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="verifierName != null">
|
|
|
|
+ AND t6.nick_name like concat('%', #{verifierName}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dateFilter != null and dateFilter.size()>0 ">
|
|
|
|
+ AND (
|
|
|
|
+ DATE_FORMAT(t5.verifier_time,'%Y-%m-%d') >= #{dateFilter[0]}
|
|
|
|
+ AND
|
|
|
|
+ DATE_FORMAT(t5.verifier_time,'%Y-%m-%d') <= #{dateFilter[1]}
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
<if test="fromCompanyName != null and fromCompanyName != ''">
|
|
<if test="fromCompanyName != null and fromCompanyName != ''">
|
|
AND t3.account_name like concat('%', #{fromCompanyName}, '%')
|
|
AND t3.account_name like concat('%', #{fromCompanyName}, '%')
|
|
</if>
|
|
</if>
|