| @@ -76,23 +76,23 @@ | |||||
| </if> | </if> | ||||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | <if test=" null == nearBillLastTime and null != oweBillLastTime"> | ||||
| and ( | and ( | ||||
| (`starttime` <= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and status not in (3,6,7) and bill_type not in (13,21,5)) | |||||
| (`starttime` <= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and status not in (3,6,7,9) and bill_type not in (13,21,5)) | |||||
| or | or | ||||
| (`starttime` <= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) and bill_type in (13,21,5)) | |||||
| (`starttime` <= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7,9) and bill_type in (13,21,5)) | |||||
| ) | ) | ||||
| </if> | </if> | ||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and ( | and ( | ||||
| (`starttime` > #{oweBillLastTime} and `starttime` <= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and status not in (3,6,7) and bill_type not in (13,21,5)) | |||||
| (`starttime` > #{oweBillLastTime} and `starttime` <= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and status not in (3,6,7,9) and bill_type not in (13,21,5)) | |||||
| or | or | ||||
| (`starttime` > #{oweBillLastTime} and `starttime` <= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) and bill_type in (13,21,5)) | |||||
| (`starttime` > #{oweBillLastTime} and `starttime` <= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7,9) and bill_type in (13,21,5)) | |||||
| ) | ) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | <if test=" null != needPayStartDay"> | ||||
| and ( | and ( | ||||
| (`starttime` <= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and status not in (3,6,7) and bill_type not in (13,21,5)) | |||||
| (`starttime` <= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and status not in (3,6,7,9) and bill_type not in (13,21,5)) | |||||
| or | or | ||||
| (`starttime` <= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) and bill_type in (13,21,5)) | |||||
| (`starttime` <= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and status not in (3,6,7,9) and bill_type in (13,21,5)) | |||||
| ) | ) | ||||
| </if> | </if> | ||||
| <if test=" null != toPayMerchant"> | <if test=" null != toPayMerchant"> | ||||
| @@ -105,9 +105,9 @@ | |||||
| </if> | </if> | ||||
| <if test=" 1 == notifyed "> | <if test=" 1 == notifyed "> | ||||
| and ( | and ( | ||||
| (`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and status not in (3,6,7) and bill_type not in (13,21,5)) | |||||
| (`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and status not in (3,6,7,9) and bill_type not in (13,21,5)) | |||||
| or | or | ||||
| (`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') > 0 and status not in (3,6,7) and bill_type in (13,21,5)) | |||||
| (`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') > 0 and status not in (3,6,7,9) and bill_type in (13,21,5)) | |||||
| ) | ) | ||||
| </if> | </if> | ||||
| <if test=" null != hasMerchant ">and `merchant_id` is not null</if> | <if test=" null != hasMerchant ">and `merchant_id` is not null</if> | ||||