|
|
@@ -2605,7 +2605,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
//根据免租期来计算
|
|
|
//根据免租期来计算
|
|
|
List<Date> validDates = WxRentContractHelper.getValidDays(startDate, endDate, freePeriods);
|
|
|
List<Date> validDates = WxRentContractHelper.getValidDays(startDate, endDate, freePeriods);
|
|
|
if (null == validDates || validDates.size() <= 0 ) {
|
|
|
if (null == validDates || validDates.size() <= 0 ) {
|
|
|
BigDecimal[] bs = new BigDecimal[] {revenueDecimal,rentDecimal};
|
|
|
|
|
|
|
|
|
BigDecimal[] bs = new BigDecimal[] {revenueDecimal,rentDecimal,new BigDecimal(0)};
|
|
|
return bs;
|
|
|
return bs;
|
|
|
}
|
|
|
}
|
|
|
int allDays = DateUtils.daysBetween(startDate,endDate)+1;
|
|
|
int allDays = DateUtils.daysBetween(startDate,endDate)+1;
|
|
|
@@ -2672,7 +2672,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
endDate,0,0,false,rentcontract.getReceivePeriodUnit(),rentcontract.getReceivePeriod());
|
|
|
endDate,0,0,false,rentcontract.getReceivePeriodUnit(),rentcontract.getReceivePeriod());
|
|
|
}
|
|
|
}
|
|
|
rentDecimal = new BigDecimal(rentNeedpay);
|
|
|
rentDecimal = new BigDecimal(rentNeedpay);
|
|
|
BigDecimal[] bs = new BigDecimal[] {revenueDecimal,rentDecimal};
|
|
|
|
|
|
|
|
|
BigDecimal[] bs = new BigDecimal[] {revenueDecimal,rentDecimal,sales};
|
|
|
return bs;
|
|
|
return bs;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2789,13 +2789,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
BigDecimal[] jumppays = calcuteReveneuJump(salesDeciaml, rentcontract,rentBill.getStarttime(), rentBill.getEndtime(),freePeriods);
|
|
|
BigDecimal[] jumppays = calcuteReveneuJump(salesDeciaml, rentcontract,rentBill.getStarttime(), rentBill.getEndtime(),freePeriods);
|
|
|
BigDecimal jumpRevenuePay = jumppays[0];
|
|
|
BigDecimal jumpRevenuePay = jumppays[0];
|
|
|
BigDecimal jumpRentPay = jumppays[1];
|
|
|
BigDecimal jumpRentPay = jumppays[1];
|
|
|
|
|
|
BigDecimal saleDecimalValid = jumppays[2];
|
|
|
BigDecimal jumppay = new BigDecimal(0);
|
|
|
BigDecimal jumppay = new BigDecimal(0);
|
|
|
if (jumpRevenuePay.compareTo(jumpRentPay) > 0 ) {
|
|
|
if (jumpRevenuePay.compareTo(jumpRentPay) > 0 ) {
|
|
|
jumppay = jumppay.add(jumpRevenuePay);
|
|
|
jumppay = jumppay.add(jumpRevenuePay);
|
|
|
}else {
|
|
|
}else {
|
|
|
jumppay = jumppay.add(jumpRentPay);
|
|
|
jumppay = jumppay.add(jumpRentPay);
|
|
|
}
|
|
|
}
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
|
|
|
|
|
|
StringBuffer sb = new StringBuffer("有效销售额:"+saleDecimalValid.toPlainString()+",");
|
|
|
if (jumppay.compareTo(new BigDecimal(needpay)) > 0 ) {
|
|
|
if (jumppay.compareTo(new BigDecimal(needpay)) > 0 ) {
|
|
|
sb.append("跳点规则计算金额:"+jumppay.toPlainString()+",合同租金扣点规则计算金额:"+needpay+".");
|
|
|
sb.append("跳点规则计算金额:"+jumppay.toPlainString()+",合同租金扣点规则计算金额:"+needpay+".");
|
|
|
needpay = jumppay.toPlainString();
|
|
|
needpay = jumppay.toPlainString();
|
|
|
@@ -2811,6 +2812,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
List<WxRentContractRevenueSales> saleList = wxRentContractRevenueSalesMapper.findList(rs);
|
|
|
List<WxRentContractRevenueSales> saleList = wxRentContractRevenueSalesMapper.findList(rs);
|
|
|
if (null != saleList && saleList.size() > 0 ) {
WxRentContractRevenueSales sale = saleList.get(0); |
|
|
if (null != saleList && saleList.size() > 0 ) {
WxRentContractRevenueSales sale = saleList.get(0); |
|
|
sale.setSaleMoney(sales);
|
|
|
sale.setSaleMoney(sales);
|
|
|
|
|
|
sale.setSaleMoneyValid(saleDecimalValid.toPlainString());
|
|
|
sale.setUpdateTime(new Date());
|
|
|
sale.setUpdateTime(new Date());
|
|
|
wxRentContractRevenueSalesMapper.updateById(sale);
|
|
|
wxRentContractRevenueSalesMapper.updateById(sale);
|
|
|
}else {
|
|
|
}else {
|
|
|
@@ -2822,6 +2824,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
sale.setRentContractId(rentcontract.getId());
|
|
|
sale.setRentContractId(rentcontract.getId());
|
|
|
sale.setBillMoney(rentBill.getReceivePay());
|
|
|
sale.setBillMoney(rentBill.getReceivePay());
|
|
|
sale.setSaleMoney(sales);
|
|
|
sale.setSaleMoney(sales);
|
|
|
|
|
|
sale.setSaleMoneyValid(saleDecimalValid.toPlainString());
|
|
|
sale.setCalcuteMoney(needpay);
|
|
|
sale.setCalcuteMoney(needpay);
|
|
|
sale.setPropertyContractId(propertyContractId);
|
|
|
sale.setPropertyContractId(propertyContractId);
|
|
|
sale.setCreateTime(new Date());
|
|
|
sale.setCreateTime(new Date());
|
|
|
@@ -3050,7 +3053,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
WxRentContractRevenueSales rsq = new WxRentContractRevenueSales();
|
|
|
WxRentContractRevenueSales rsq = new WxRentContractRevenueSales();
|
|
|
rsq.updateTenantInfo(rentcontract);
|
|
|
rsq.updateTenantInfo(rentcontract);
|
|
|
rsq.setRentContractId(rentcontract.getId());
|
|
|
rsq.setRentContractId(rentcontract.getId());
|
|
|
BigDecimal sum = wxRentContractRevenueSalesMapper.findSumSalesMoney(rsq);
|
|
|
|
|
|
|
|
|
BigDecimal sum = wxRentContractRevenueSalesMapper.findSumSalesMoneyValid(rsq);
|
|
|
if (null == sum || sum.compareTo(new BigDecimal(0)) <= 0 ) {
|
|
|
if (null == sum || sum.compareTo(new BigDecimal(0)) <= 0 ) {
|
|
|
WxRentContractYearsSumVo vo = new WxRentContractYearsSumVo();
|
|
|
WxRentContractYearsSumVo vo = new WxRentContractYearsSumVo();
|
|
|
vo.setTotalSales("0");
|
|
|
vo.setTotalSales("0");
|
|
|
|