diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index e18419642..61e86c3ee 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -120,11 +120,15 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService } wxPropertyContract.setRentInfo(rentInfoArray.toJSONString()); }else{ - if(wxPropertyContract.getRentPrice() == null){ + if(wxPropertyContract.getRentPrice() == null || "0".equals(wxPropertyContract.getRentPrice())){ Long price = wxPropertyContract.getPrice()/100; Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea()); Double rentPrice = new BigDecimal((float)price/rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); - wxPropertyContract.setRentPrice(rentPrice.toString()); + if(rentPrice > 0){ + wxPropertyContract.setRentPrice(rentPrice.toString()); + }else{ + wxPropertyContract.setRentPrice("0"); + } } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 5785b46ed..c834a656d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -151,11 +151,15 @@ public class WxRentContractServiceImpl implements WxRentContractService { } wxRentContract.setRentInfo(rentInfoArray.toJSONString()); }else{ - if(wxRentContract.getRentPrice() == null){ + if(wxRentContract.getRentPrice() == null || "0".equals(wxRentContract.getRentPrice())){ Long price = wxRentContract.getPrice()/100; Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); Double rentPrice = new BigDecimal((float)price/rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); - wxRentContract.setRentPrice(rentPrice.toString()); + if(rentPrice > 0){ + wxRentContract.setRentPrice(rentPrice.toString()); + }else{ + wxRentContract.setRentPrice("0"); + } } } diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml index ac2e54c67..8561be3ec 100644 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml @@ -543,36 +543,64 @@ select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type from wx_bill_rent where is_preview = 0 and status = #{status} and tenant_id = #{tenantId} + endtime,rent_shop_type from wx_bill_rent where is_preview = 0 and tenant_id = #{tenantId} + and status !=6 + + and status = #{status} + union select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,(need_pay-pay),DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type from wx_bill_property where is_preview = 0 and status = #{status} and tenant_id = #{tenantId} + endtime,rent_shop_type from wx_bill_property where is_preview = 0 and tenant_id = #{tenantId} + and status !=6 + + and status = #{status} + union select res.id,res.merchant_id,res.shop_id,res.tenant_id,res.name,res.bill_type_value,res.bill_type,res.need_pay, res.receive_pay,res.pay,res.owe owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type from( select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,2 bill_type_value,'欠缴押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type from wx_bill_rent_deposit where status = #{status} and tenant_id = #{tenantId} + endtime,rent_shop_type from wx_bill_rent_deposit where tenant_id = #{tenantId} + and status !=6 + + and status = #{status} + union select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,4 bill_type_value,'欠缴押金' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type from wx_bill_property_deposit where status = #{status} and tenant_id = #{tenantId} + endtime,rent_shop_type from wx_bill_property_deposit where tenant_id = #{tenantId} + and status !=6 + + and status = #{status} + union select id,merchant_id,shop_id,tenant_id,'欠缴押金' name,8 bill_type_value,'欠缴押金' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type - from wx_bill_other_deposit where status = #{status} and tenant_id = #{tenantId} + from wx_bill_other_deposit where tenant_id = #{tenantId} + and status !=6 + + and status = #{status} + ) res union select res.id,res.merchant_id,res.shop_id,res.tenant_id,res.name,res.bill_type_value,res.bill_type,res.need_pay, res.receive_pay,res.pay,res.owe owe,res.receive_date,res.pay_date,res.expired_day,res.status,res.starttime,res.endtime,res.rent_shop_type from( select id,merchant_id,shop_id,tenant_id,'其他费用' name,5 bill_type_value,'其他费用' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type - from wx_bill_daily where type in(1,2) and status = #{status} and tenant_id = #{tenantId} + from wx_bill_daily where type in(1,2) and tenant_id = #{tenantId} + and status !=6 + + and status = #{status} + union select id,merchant_id,shop_id,tenant_id,'其他费用' name,7 bill_type_value,'其他费用' bill_type,0 as need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type - from wx_bill_other where status = #{status} and tenant_id = #{tenantId} + from wx_bill_other where tenant_id = #{tenantId} + and status !=6 + + and status = #{status} + ) res ) bill