|
|
|
@@ -451,18 +451,6 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
if (record.getReceivePeriod() != null && record.getLease() != null
|
|
|
|
&& !record.getReceivePeriod().equals(0) && !record.getLease().equals(0)) {
|
|
|
|
deletePrewBill(record);
|
|
|
|
// //删除预账单,重新生成
|
|
|
|
// wxBillRentMapper.deleteBillByContract(record);
|
|
|
|
// //删除商业管理费账单
|
|
|
|
// WxBillRentManage wxBillRentManage = new WxBillRentManage();
|
|
|
|
// wxBillRentManage.setRentContractId(record.getId());
|
|
|
|
// wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode());
|
|
|
|
// wxBillRentManage.updateTenantInfo(record);
|
|
|
|
// wxBillRentManageMapper.deletePreviewBill(wxBillRentManage);
|
|
|
|
// //删除营业管理费账单
|
|
|
|
// wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode());
|
|
|
|
// wxBillRentManageMapper.deletePreviewBill(wxBillRentManage);
|
|
|
|
|
|
|
|
//联营扣点,不设置保底营业额,不生成账单
|
|
|
|
//if (EnumRentContractType.RENT_BY_JOINT.getCode().equals(record.getType()) && record.getRevenueRatio().equals(0)) {
|
|
|
|
//do nothing
|
|
|
|
@@ -691,9 +679,22 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
}
|
|
|
|
record.setPrice(new BigDecimal(record.getPayRatio()).multiply(new BigDecimal(revenue)).setScale(Constant.default_long_decimal_size,RoundingMode.HALF_UP).toPlainString());
|
|
|
|
}else if (record.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) {
|
|
|
|
String revenue = record.getRevenue();
|
|
|
|
if (StringUtils.isBlank(revenue)) {
|
|
|
|
revenue = "0";
|
|
|
|
}
|
|
|
|
BigDecimal renevuePrice = new BigDecimal(record.getPayRatio()).multiply(new BigDecimal(revenue));
|
|
|
|
BigDecimal rentPrice = null;
|
|
|
|
//联营取高,如果是固定金额的话,取固定金额. 不固定的金额,会传price.
|
|
|
|
if (null != record.getRevenueFixedRentPrice() && record.getRevenueFixedRentPrice().intValue() == EnumYesOrNo.YES.getCode()){
|
|
|
|
record.setPrice(record.getRevenueRentPrice());
|
|
|
|
rentPrice = new BigDecimal(record.getRevenueRentPrice());
|
|
|
|
}else {
|
|
|
|
rentPrice = new BigDecimal(record.getPrice());
|
|
|
|
}
|
|
|
|
if (renevuePrice.compareTo(rentPrice) > 0 ) {
|
|
|
|
record.setPrice(renevuePrice.toPlainString());
|
|
|
|
}else {
|
|
|
|
record.setPrice(rentPrice.toPlainString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1027,9 +1028,6 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
rentList = buildRentMonth(user, wxRentContract, receivePeriod, lease, rentalStartDate, isPreview,saveDb);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// for (int i = 0; i < rentList.size(); i++) {
|
|
|
|
// rentList.get(i).setPeriod(i+1);
|
|
|
|
// }
|
|
|
|
return rentList;
|
|
|
|
}
|
|
|
|
|
|
|
|
|