|
@@ -13,13 +13,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="getList" parameterType="BizFinancialReceiveTicket" resultMap="BizFinancialReceiveTicketResult">
|
|
|
SELECT
|
|
|
- t1.*, t2.name as company_name,
|
|
|
+ t1.*, t2.name as company_name,t2.customer_label_id, t4.lable as customerLabelName,
|
|
|
<!-- (select concat(frtd.year, '-', frtd.month) from biz_financial_receive_ticket_detail frtd where frtd.financial_receive_ticket_id = t1.id order by year desc, month desc limit 1) currentDate,-->
|
|
|
(select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate,
|
|
|
t3.account_name as from_company_name, t2.tax_type
|
|
|
from biz_financial_receive_ticket t1
|
|
|
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_lable t4 on t4.id = t2.customer_label_id
|
|
|
WHERE
|
|
|
t1.deleted = 0
|
|
|
<if test="id != null">
|
|
@@ -31,6 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isZero != null">
|
|
|
AND t2.is_zero = #{isZero}
|
|
|
</if>
|
|
|
+ <if test="customerLabelId != null">
|
|
|
+ AND t2.customer_label_id = #{customerLabelId}
|
|
|
+ </if>
|
|
|
<if test="companyName != null and companyName != ''">
|
|
|
AND (t2.name like concat('%', #{companyName}, '%'))
|
|
|
</if>
|