Просмотр исходного кода

[合同优化][修改][晚上合同优化需求]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
8872177423
3 измененных файлов: 47 добавлений и 11 удалений
  1. +6
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  2. +6
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  3. +35
    -7
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml

+ 6
- 2
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");
}
}
}



+ 6
- 2
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");
}
}
}



+ 35
- 7
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
<if test="null != status ">
and status = #{status}
</if>
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
<if test="null != status ">
and status = #{status}
</if>
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
<if test="null != status ">
and status = #{status}
</if>
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
<if test="null != status ">
and status = #{status}
</if>
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
<if test="null != status ">
and status = #{status}
</if>
) 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
<if test="null != status ">
and status = #{status}
</if>
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
<if test="null != status ">
and status = #{status}
</if>
) res

) bill


Загрузка…
Отмена
Сохранить