Merge branch 'master' of http://git.xdadan.loc/tanex/emis-service
This commit is contained in:
commit
ede7e53286
@ -121,6 +121,10 @@ public class EmisSettleInvoiceChRecord extends BaseEntity
|
|||||||
private String billCode;
|
private String billCode;
|
||||||
// 销售员
|
// 销售员
|
||||||
private String salesmen;
|
private String salesmen;
|
||||||
|
// 回款联系人
|
||||||
|
private String payee;
|
||||||
|
// 收款状态
|
||||||
|
private String paymentStatus;
|
||||||
// 申请人
|
// 申请人
|
||||||
private String applyManName;
|
private String applyManName;
|
||||||
// 申请备注
|
// 申请备注
|
||||||
@ -128,6 +132,8 @@ public class EmisSettleInvoiceChRecord extends BaseEntity
|
|||||||
|
|
||||||
// 发送月份
|
// 发送月份
|
||||||
private String sendMonth;
|
private String sendMonth;
|
||||||
|
// 月结客户
|
||||||
|
private String custNo;
|
||||||
// 结算类型
|
// 结算类型
|
||||||
private String settleType;
|
private String settleType;
|
||||||
// 开票备注
|
// 开票备注
|
||||||
|
|||||||
@ -140,7 +140,7 @@
|
|||||||
tba.settle_day as settleDay,
|
tba.settle_day as settleDay,
|
||||||
tba.send_piece_sum as sendPieceSum,
|
tba.send_piece_sum as sendPieceSum,
|
||||||
tba.credit_period as creditPeriod,
|
tba.credit_period as creditPeriod,
|
||||||
tba.payment_due_date as paymentDueDate,
|
DATE(tba.payment_due_date) as paymentDueDate,
|
||||||
tba.rec_money as recMoney,
|
tba.rec_money as recMoney,
|
||||||
tba.reced_money as recedMoney,
|
tba.reced_money as recedMoney,
|
||||||
tba.salesmen as salesmen,
|
tba.salesmen as salesmen,
|
||||||
|
|||||||
@ -168,6 +168,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
and create_time <![CDATA[ <= ]]> #{params.endCreateTime}
|
and create_time <![CDATA[ <= ]]> #{params.endCreateTime}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<!-- 客户编号查询条件 -->
|
||||||
|
<if test="custNo != null and params.custNo != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_rel ir
|
||||||
|
inner join emis_waybill w on w.bill_code = ir.bill_no and w.del_flag = '0'
|
||||||
|
where ir.del_flag = '0' and a.apply_seq_no = ir.apply_seq_no
|
||||||
|
and w.cust_no = #{custNo}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 收款人查询条件 -->
|
||||||
|
<if test="payee != null and params.payee != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_bill_rel ibr
|
||||||
|
inner join emis_settle_bill b on b.settle_bill_no = ibr.settle_bill_no and b.del_flag = '0'
|
||||||
|
where ibr.del_flag = '0' and a.apply_seq_no = ibr.apply_seq_no
|
||||||
|
and b.payee = #{payee}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 业务员查询条件 -->
|
||||||
|
<if test="salesmen != null and params.salesmen != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_bill_rel ibr
|
||||||
|
inner join emis_settle_bill b on b.settle_bill_no = ibr.settle_bill_no and b.del_flag = '0'
|
||||||
|
where ibr.del_flag = '0' and a.apply_seq_no = ibr.apply_seq_no
|
||||||
|
and b.salesmen = #{salesmen}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 账单月份查询条件 -->
|
||||||
|
<if test="billMonth != null and params.billMonth != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_bill_rel ibr
|
||||||
|
inner join emis_settle_bill b on b.settle_bill_no = ibr.settle_bill_no and b.del_flag = '0'
|
||||||
|
where ibr.del_flag = '0' and a.apply_seq_no = ibr.apply_seq_no
|
||||||
|
and b.bill_month = #{billMonth}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 付款状态查询条件 -->
|
||||||
|
<if test="paymentStatus != null and params.paymentStatus != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_bill_rel ibr
|
||||||
|
inner join emis_settle_pay_bill_rel pbr on pbr.settle_bill_no = ibr.settle_bill_no
|
||||||
|
inner join emis_settle_pay_record pr on pr.pay_id = pbr.pay_id
|
||||||
|
where ibr.del_flag = '0' and a.apply_seq_no = ibr.apply_seq_no
|
||||||
|
and pr.pay_status = #{paymentStatus}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="params.billCode != null and params.billCode != ''">
|
<if test="params.billCode != null and params.billCode != ''">
|
||||||
and EXISTS(
|
and EXISTS(
|
||||||
@ -458,6 +508,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 客户编号查询条件 -->
|
||||||
|
<if test="custNo != null and params.custNo != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_rel ir
|
||||||
|
inner join emis_waybill w on w.bill_code = ir.bill_no and w.del_flag = '0'
|
||||||
|
where ir.del_flag = '0' and a.apply_seq_no = ir.apply_seq_no
|
||||||
|
and w.cust_no = #{custNo}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 收款人查询条件 -->
|
||||||
|
<if test="payee != null and params.payee != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_bill_rel ibr
|
||||||
|
inner join emis_settle_bill b on b.settle_bill_no = ibr.settle_bill_no and b.del_flag = '0'
|
||||||
|
where ibr.del_flag = '0' and a.apply_seq_no = ibr.apply_seq_no
|
||||||
|
and b.payee = #{payee}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 业务员查询条件 -->
|
||||||
|
<if test="salesmen != null and params.salesmen != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_bill_rel ibr
|
||||||
|
inner join emis_settle_bill b on b.settle_bill_no = ibr.settle_bill_no and b.del_flag = '0'
|
||||||
|
where ibr.del_flag = '0' and a.apply_seq_no = ibr.apply_seq_no
|
||||||
|
and b.salesmen = #{salesmen}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 账单月份查询条件 -->
|
||||||
|
<if test="billMonth != null and params.billMonth != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_bill_rel ibr
|
||||||
|
inner join emis_settle_bill b on b.settle_bill_no = ibr.settle_bill_no and b.del_flag = '0'
|
||||||
|
where ibr.del_flag = '0' and a.apply_seq_no = ibr.apply_seq_no
|
||||||
|
and b.bill_month = #{billMonth}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 付款状态查询条件 -->
|
||||||
|
<if test="paymentStatus != null and params.paymentStatus != ''">
|
||||||
|
and EXISTS (
|
||||||
|
select 1 from emis_settle_invoice_bill_rel ibr
|
||||||
|
inner join emis_settle_pay_bill_rel pbr on pbr.settle_bill_no = ibr.settle_bill_no
|
||||||
|
inner join emis_settle_pay_record pr on pr.pay_id = pbr.pay_id
|
||||||
|
where ibr.del_flag = '0' and a.apply_seq_no = ibr.apply_seq_no
|
||||||
|
and pr.pay_status = #{paymentStatus}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
group by a.id
|
group by a.id
|
||||||
ORDER BY a.create_time DESC
|
ORDER BY a.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user