| @@ -306,7 +306,7 @@ | |||
| select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'租金' name,1 billTypeValue,'租金' billType, | |||
| need_pay needPay,receive_pay receivePay,pay,(receive_pay+service_charge_pay+ifnull(late_pay_price,0)-pay) owe, | |||
| receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status,starttime,endtime,rent_shop_type rentShopType,'' priceDetail, | |||
| freeze,ifnull(late_pay_price,0) latePayPrice,service_charge_pay serviceChargePay | |||
| freeze,ifnull(late_pay_price,0) latePayPrice,service_charge_pay serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime | |||
| from wx_bill_rent bill | |||
| where bill.is_preview = 0 | |||
| @@ -317,7 +317,7 @@ | |||
| <select id="listRentDepositBillData" resultType="hashmap" parameterType="com.iformall.domain.vo.WxBillAll"> | |||
| select '' settle_number,id,merchant_id merchant_id,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'租赁押金' name,2 billTypeValue,'租赁押金' billType, | |||
| need_pay needPay,receive_pay receivePay,pay,(receive_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay, | |||
| status,starttime,endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,0 serviceChargePay | |||
| status,starttime,endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,0 serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime | |||
| from wx_bill_rent_deposit bill | |||
| where rent_contract_id in (select id from wx_rent_contract where status in (2,3,4)) | |||
| @@ -328,7 +328,7 @@ | |||
| select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'物业费' name,3 billTypeValue,'物业费' billType, | |||
| need_pay needPay,receive_pay receivePay,pay,(receive_pay+service_charge_pay+ifnull(late_pay_price,0)-pay) owe,receive_date receiveDate,pay_date payDate, | |||
| DATEDIFF(now(),receive_date) expiredDay,status,starttime,endtime,rent_shop_type rentShopType,'' priceDetail,freeze,ifnull(late_pay_price,0) latePayPrice, | |||
| service_charge_pay serviceChargePay | |||
| service_charge_pay serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime | |||
| from wx_bill_property bill | |||
| where is_preview = 0 | |||
| @@ -339,7 +339,7 @@ | |||
| <select id="listPropertyDepositBillData" resultType="hashmap" parameterType="com.iformall.domain.vo.WxBillAll"> | |||
| select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'物业押金' name,4 billTypeValue,'物业押金' billType, | |||
| need_pay needPay,receive_pay receivePay,pay,(receive_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status,starttime, | |||
| endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,0 serviceChargePay | |||
| endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,0 serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime | |||
| from wx_bill_property_deposit bill | |||
| where property_contract_id in (select id from wx_property_contract where status in (2,3,4)) | |||
| @@ -352,7 +352,7 @@ | |||
| case when type=1 then 5 when type=2 then 6 else 9 end billTypeValue, | |||
| case when type=1 then '水费' when type=2 then '电费' else '空调费' end billType, 0 as needPay,receive_pay receivePay, | |||
| pay,(receive_pay+service_charge_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status,starttime,endtime, | |||
| rent_shop_type rentShopType,price_detail priceDetail,freeze,0 latePayPrice,service_charge_pay serviceChargePay | |||
| rent_shop_type rentShopType,price_detail priceDetail,freeze,0 latePayPrice,service_charge_pay serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime | |||
| from wx_bill_daily bill where bill.merchant_id=#{merchantId} | |||
| <include refid="billSql"/> | |||
| @@ -361,7 +361,7 @@ | |||
| <select id="listOtherBillData" resultType="hashmap" parameterType="com.iformall.domain.vo.WxBillAll"> | |||
| select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,name,7 billTypeValue,'其他费用' billType,0 as needPay, | |||
| receive_pay receivePay,pay,(receive_pay+service_charge_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status,'' starttime,'' endtime, | |||
| rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,service_charge_pay serviceChargePay | |||
| rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,service_charge_pay serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime | |||
| from wx_bill_other bill where bill.merchant_id=#{merchantId} | |||
| <include refid="billSql"/> | |||
| @@ -370,7 +370,7 @@ | |||
| <select id="listOtherDepositBillData" resultType="hashmap" parameterType="com.iformall.domain.vo.WxBillAll"> | |||
| select '' settle_number,id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,comments as name,8 billTypeValue,'其他押金' billType, | |||
| 0 as needPay,receive_pay receivePay,pay,(receive_pay+service_charge_pay-pay) owe,receive_date receiveDate,pay_date payDate,DATEDIFF(now(),receive_date) expiredDay,status, | |||
| '' starttime,'' endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,service_charge_pay serviceChargePay | |||
| '' starttime,'' endtime,rent_shop_type rentShopType,'' priceDetail,freeze,0 latePayPrice,service_charge_pay serviceChargePay,apply_status applyStatus,apply_pay_img applyPayImg,apply_update_time applyUpdateTime | |||
| from wx_bill_other_deposit bill where bill.merchant_id=#{merchantId} | |||
| <include refid="billSql"/> | |||