demand: TMS系统 - 客户账单管理 - 收款明细查询 - 查询返回字段增加账单编号、运单号、账单金额、开票金额、开票状态、备注特殊逻辑处理
committer: heyu
This commit is contained in:
parent
f76e912748
commit
1254a1ebaf
@ -279,71 +279,71 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectEmisSettlePayRecordVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="payId != null and payId != ''"> and pay_id = #{payId}</if>
|
||||
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
|
||||
<if test="recType != null and recType != ''"> and rec_type = #{recType}</if>
|
||||
<if test="payMan != null and payMan != ''"> and pay_man like concat('%', #{payMan}, '%')</if>
|
||||
<if test="payManCode != null and payManCode != ''"> and pay_man_code like concat('%', #{payManCode}, '%')</if>
|
||||
<if test="id != null "> and a.id = #{id}</if>
|
||||
<if test="payId != null and payId != ''"> and a.pay_id = #{payId}</if>
|
||||
<if test="payType != null and payType != ''"> and a.pay_type = #{payType}</if>
|
||||
<if test="recType != null and recType != ''"> and a.rec_type = #{recType}</if>
|
||||
<if test="payMan != null and payMan != ''"> and a.pay_man like concat('%', #{payMan}, '%')</if>
|
||||
<if test="payManCode != null and payManCode != ''"> and a.pay_man_code like concat('%', #{payManCode}, '%')</if>
|
||||
|
||||
<if test="blAudit != null and blAudit != ''"> and bl_audit = #{blAudit}</if>
|
||||
<if test="auditDate != null "> and audit_date = #{auditDate}</if>
|
||||
<if test="auditManCode != null and auditManCode != ''"> and audit_man_code = #{auditManCode}</if>
|
||||
<if test="auditSiteCode != null and auditSiteCode != ''"> and audit_site_code = #{auditSiteCode}</if>
|
||||
<if test="customerCode != null and customerCode != ''"> and customer_code = #{customerCode}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="payMoney != null "> and pay_money = #{payMoney}</if>
|
||||
<if test="payStatus != null and payStatus != ''"> and pay_status = #{payStatus}</if>
|
||||
<if test="payStatusDesc != null and payStatusDesc != ''"> and pay_status_desc like concat('%', #{payStatusDesc}, '%')</if>
|
||||
<if test="breakType != null and breakType != ''"> and break_type = #{breakType}</if>
|
||||
<if test="breakReason != null and breakReason != ''"> and break_reason like concat('%', #{breakReason}, '%')</if>
|
||||
<if test="breakEmpCode != null and breakEmpCode != ''"> and break_emp_code = #{breakEmpCode}</if>
|
||||
<if test="recManCode != null and recManCode != ''"> and rec_man_code = #{recManCode}</if>
|
||||
<if test="settleType != null and settleType != ''"> and settle_type = #{settleType}</if>
|
||||
<if test="refundDate != null "> and refund_date = #{refundDate}</if>
|
||||
<if test="refundManCode != null and refundManCode != ''"> and refund_man_code = #{refundManCode}</if>
|
||||
<if test="refundSeq != null and refundSeq != ''"> and refund_seq = #{refundSeq}</if>
|
||||
<if test="refundMode != null and refundMode != ''"> and refund_mode = #{refundMode}</if>
|
||||
<if test="refundMoney != null "> and refund_money = #{refundMoney}</if>
|
||||
<if test="refundReason != null and refundReason != ''"> and refund_reason like concat('%', #{refundReason}, '%')</if>
|
||||
<if test="refundRemark != null and refundRemark != ''"> and refund_remark like concat('%', #{refundRemark}, '%')</if>
|
||||
<if test="refundOpManCode != null and refundOpManCode != ''"> and refund_op_man_code = #{refundOpManCode}</if>
|
||||
<if test="refundRegisterSiteCode != null and refundRegisterSiteCode != ''"> and refund_register_site_code = #{refundRegisterSiteCode}</if>
|
||||
<if test="refundRegisterManCode != null and refundRegisterManCode != ''"> and refund_register_man_code = #{refundRegisterManCode}</if>
|
||||
<if test="satisfyMoney != null "> and satisfy_money = #{satisfyMoney}</if>
|
||||
<if test="satisfyReason != null and satisfyReason != ''"> and satisfy_reason like concat('%', #{satisfyReason}, '%')</if>
|
||||
<if test="allowanceMoney != null "> and allowance_money = #{allowanceMoney}</if>
|
||||
<if test="allowanceReason != null and allowanceReason != ''"> and allowance_reason = #{allowanceReason}</if>
|
||||
<if test="deductionMoney != null "> and deduction_money = #{deductionMoney}</if>
|
||||
<if test="deductionReason != null and deductionReason != ''"> and deduction_reason = #{deductionReason}</if>
|
||||
<if test="otherMoney != null "> and other_money = #{otherMoney}</if>
|
||||
<if test="otherReason != null and otherReason != ''"> and other_reason like concat('%', #{otherReason}, '%')</if>
|
||||
<if test="tradeDate != null "> and trade_date = #{tradeDate}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
<if test="blAudit != null and blAudit != ''"> and a.bl_audit = #{blAudit}</if>
|
||||
<if test="auditDate != null "> and a.audit_date = #{auditDate}</if>
|
||||
<if test="auditManCode != null and auditManCode != ''"> and a.audit_man_code = #{auditManCode}</if>
|
||||
<if test="auditSiteCode != null and auditSiteCode != ''"> and a.audit_site_code = #{auditSiteCode}</if>
|
||||
<if test="customerCode != null and customerCode != ''"> and a.customer_code = #{customerCode}</if>
|
||||
<if test="customerName != null and customerName != ''"> and a.customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="payMoney != null "> and a.pay_money = #{payMoney}</if>
|
||||
<if test="payStatus != null and payStatus != ''"> and a.pay_status = #{payStatus}</if>
|
||||
<if test="payStatusDesc != null and payStatusDesc != ''"> and a.pay_status_desc like concat('%', #{payStatusDesc}, '%')</if>
|
||||
<if test="breakType != null and breakType != ''"> and a.break_type = #{breakType}</if>
|
||||
<if test="breakReason != null and breakReason != ''"> and a.break_reason like concat('%', #{breakReason}, '%')</if>
|
||||
<if test="breakEmpCode != null and breakEmpCode != ''"> and a.break_emp_code = #{breakEmpCode}</if>
|
||||
<if test="recManCode != null and recManCode != ''"> and a.rec_man_code = #{recManCode}</if>
|
||||
<if test="settleType != null and settleType != ''"> and a.settle_type = #{settleType}</if>
|
||||
<if test="refundDate != null "> and a.refund_date = #{refundDate}</if>
|
||||
<if test="refundManCode != null and refundManCode != ''"> and a.refund_man_code = #{refundManCode}</if>
|
||||
<if test="refundSeq != null and refundSeq != ''"> and a.refund_seq = #{refundSeq}</if>
|
||||
<if test="refundMode != null and refundMode != ''"> and a.refund_mode = #{refundMode}</if>
|
||||
<if test="refundMoney != null "> and a.refund_money = #{refundMoney}</if>
|
||||
<if test="refundReason != null and refundReason != ''"> and a.refund_reason like concat('%', #{refundReason}, '%')</if>
|
||||
<if test="refundRemark != null and refundRemark != ''"> and a.refund_remark like concat('%', #{refundRemark}, '%')</if>
|
||||
<if test="refundOpManCode != null and refundOpManCode != ''"> and a.refund_op_man_code = #{refundOpManCode}</if>
|
||||
<if test="refundRegisterSiteCode != null and refundRegisterSiteCode != ''"> and a.refund_register_site_code = #{refundRegisterSiteCode}</if>
|
||||
<if test="refundRegisterManCode != null and refundRegisterManCode != ''"> and a.refund_register_man_code = #{refundRegisterManCode}</if>
|
||||
<if test="satisfyMoney != null "> and a.satisfy_money = #{satisfyMoney}</if>
|
||||
<if test="satisfyReason != null and satisfyReason != ''"> and a.satisfy_reason like concat('%', #{satisfyReason}, '%')</if>
|
||||
<if test="allowanceMoney != null "> and a.allowance_money = #{allowanceMoney}</if>
|
||||
<if test="allowanceReason != null and allowanceReason != ''"> and a.allowance_reason = #{allowanceReason}</if>
|
||||
<if test="deductionMoney != null "> and a.deduction_money = #{deductionMoney}</if>
|
||||
<if test="deductionReason != null and deductionReason != ''"> and a.deduction_reason = #{deductionReason}</if>
|
||||
<if test="otherMoney != null "> and a.other_money = #{otherMoney}</if>
|
||||
<if test="otherReason != null and otherReason != ''"> and a.other_reason like concat('%', #{otherReason}, '%')</if>
|
||||
<if test="tradeDate != null "> and a.trade_date = #{tradeDate}</if>
|
||||
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and a.del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and a.create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and a.create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and a.update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and a.update_time = #{updateTime}</if>
|
||||
<if test="createSite != null and createSite != ''"> and a.create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and a.update_site like concat('%', #{updateSite}, '%')</if>
|
||||
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''">
|
||||
and create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
|
||||
and a.create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
|
||||
</if>
|
||||
<if test="params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and create_time <![CDATA[ <= ]]> #{params.endCreateTime}
|
||||
and a.create_time <![CDATA[ <= ]]> #{params.endCreateTime}
|
||||
</if>
|
||||
|
||||
<if test="params.beginTradeDate != null and params.beginTradeDate != ''">
|
||||
and trade_date <![CDATA[ >= ]]> #{params.beginTradeDate}
|
||||
and a.trade_date <![CDATA[ >= ]]> #{params.beginTradeDate}
|
||||
</if>
|
||||
<if test="params.endTradeDate != null and params.endTradeDate != ''">
|
||||
and trade_date <![CDATA[ <= ]]> #{params.endTradeDate}
|
||||
and a.trade_date <![CDATA[ <= ]]> #{params.endTradeDate}
|
||||
</if>
|
||||
|
||||
<if test="params.billCode != null and params.billCode != ''">
|
||||
and pay_id in(
|
||||
and a.pay_id in(
|
||||
select pay_id from emis_settle_pay_rel espr
|
||||
where espr.del_flag='0'
|
||||
and FIND_IN_SET(espr.`bill_no`,#{params.billCode})
|
||||
@ -351,7 +351,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
|
||||
<if test="settleBillNo != null and settleBillNo != ''">
|
||||
and pay_id in(
|
||||
and a.pay_id in(
|
||||
select pay_id from emis_settle_pay_bill_rel espbr
|
||||
where espbr.del_flag='0'
|
||||
and FIND_IN_SET(espbr.settle_bill_no,#{settleBillNo})
|
||||
@ -360,7 +360,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and settle_bill_no in(
|
||||
and a.settle_bill_no in(
|
||||
select settle_bill_no from emis_settle_sub_bill b where del_flag='0'
|
||||
and (
|
||||
b.salesmen=#{params.privEmpName}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user