| @@ -2675,21 +2675,6 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| String needpay = WxRentContractHelper.getNeedPayMoney(freePeriods,rentcontract, priceDecimal.toPlainString(),rentBill.getStarttime(), | |||
| rentBill.getEndtime(),0,0,false,rentcontract.getReceivePeriodUnit(),rentcontract.getReceivePeriod()); | |||
| //根据租金来计算 | |||
| String rentNeedpay = WxRentContractHelper.getNeedPayMoney(freePeriods,rentcontract, rentPriceArrs[yearIndex],rentBill.getStarttime(), | |||
| rentBill.getEndtime(),0,0,false,rentcontract.getReceivePeriodUnit(),rentcontract.getReceivePeriod()); | |||
| String bussinessNeedPay = "0"; | |||
| if (null != bussinessManagerPriceArrs && new BigDecimal(bussinessManagerPriceArrs[yearIndex]).compareTo(new BigDecimal(0)) > 0 ) { | |||
| bussinessNeedPay = WxRentContractHelper.getNeedPayMoney(freePeriods,rentcontract, bussinessManagerPriceArrs[yearIndex],rentBill.getStarttime(), | |||
| rentBill.getEndtime(),0,0,false,rentcontract.getReceivePeriodUnit(),rentcontract.getReceivePeriod()); | |||
| } | |||
| String operationNeedPay = "0"; | |||
| if (null != operationManagerPriceArrs && new BigDecimal(operationManagerPriceArrs[yearIndex]).compareTo(new BigDecimal(0)) > 0 ) { | |||
| operationNeedPay = WxRentContractHelper.getNeedPayMoney(freePeriods,rentcontract, operationManagerPriceArrs[yearIndex],rentBill.getStarttime(), | |||
| rentBill.getEndtime(),0,0,false,rentcontract.getReceivePeriodUnit(),rentcontract.getReceivePeriod()); | |||
| } | |||
| //计算跳点。 | |||
| BigDecimal[] jumppays = calcuteReveneuJump(salesDeciaml, rentcontract,rentBill.getStarttime(), rentBill.getEndtime(),freePeriods); | |||
| BigDecimal jumpRevenuePay = jumppays[0]; | |||
| @@ -2702,12 +2687,12 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| } | |||
| StringBuffer sb = new StringBuffer(); | |||
| if (jumppay.compareTo(new BigDecimal(needpay)) > 0 ) { | |||
| sb.append("跳点规则计算金额:"+jumppay.toPlainString()+",合同租金扣点规则计算金额:"+needpay+".(其中包含租金:"+rentNeedpay+",商业管理费:"+bussinessNeedPay+",营运管理费:"+operationNeedPay+",物业费:"+propertyPrice.toPlainString()+")"); | |||
| sb.append("跳点规则计算金额:"+jumppay.toPlainString()+",合同租金扣点规则计算金额:"+needpay+"."); | |||
| needpay = jumppay.toPlainString(); | |||
| }else { | |||
| sb.append("跳点规则计算金额:"+jumppay.toPlainString()+",合同租金扣点规则计算金额:"+needpay+".(其中包含租金:"+rentNeedpay+",商业管理费:"+bussinessNeedPay+",营运管理费:"+operationNeedPay+",物业费:"+propertyPrice.toPlainString()+")"); | |||
| sb.append("跳点规则计算金额:"+jumppay.toPlainString()+",合同租金扣点规则计算金额:"+needpay+"."); | |||
| } | |||
| sb.append("取高后总金额为:"+needpay+"."); | |||
| //保存销售额 | |||
| WxRentContractRevenueSales rs = new WxRentContractRevenueSales(); | |||
| rs.updateTenantInfo(rentcontract); | |||
| @@ -2739,8 +2724,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| String operaterRate = moneyShareRates[2]; | |||
| String propertyRate = moneyShareRates[3]; | |||
| //更新账单费用 | |||
| String rentneedpay = new BigDecimal(needpay).multiply(new BigDecimal(rentRate)).setScale(rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP).toPlainString(); | |||
| sb.append("原合同租金金额:"+rentBill.getNeedPay()+"元,计算之后为:"+rentneedpay+"元。"); | |||
| String rentneedpay = new BigDecimal(needpay).multiply(new BigDecimal(rentRate)).divide(new BigDecimal(100)).setScale(rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP).toPlainString(); | |||
| sb.append("租金原合同租金金额:"+rentBill.getNeedPay()+"元,计算之后为:"+rentneedpay+"元。"); | |||
| rentBill.setMoneyChangeDetail(sb.toString()); | |||
| rentBill.setReceivePay(rentneedpay); | |||
| rentBill.setBillRemark("设置销售额,自动计算"); | |||
| @@ -2753,7 +2738,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| wxAllBillMapper.updateById(rentBill); | |||
| //物业账单应收就改为0,因为金额已经合并了 | |||
| if (null != propertyBill) { | |||
| String propertymoney = new BigDecimal(needpay).multiply(new BigDecimal(propertyRate)).setScale(rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP).toPlainString(); | |||
| String propertymoney = new BigDecimal(needpay).multiply(new BigDecimal(propertyRate)).divide(new BigDecimal(100)).setScale(rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP).toPlainString(); | |||
| propertyBill.setMoneyChangeDetail("原合同物业金额:"+propertyBill.getNeedPay()+"元,计算调整为:"+propertymoney+"元。"); | |||
| propertyBill.setReceivePay(propertymoney); | |||
| propertyBill.setBillRemark("设置销售额,自动计算"); | |||
| @@ -2779,7 +2764,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| WxAllBill bmbill = null; | |||
| if (null != bmbillList && bmbillList.size() > 0 ) { | |||
| bmbill = bmbillList.get(0); | |||
| String bussinessmoney = new BigDecimal(needpay).multiply(new BigDecimal(bussinessRate)).setScale(rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP).toPlainString(); | |||
| String bussinessmoney = new BigDecimal(needpay).multiply(new BigDecimal(bussinessRate)).divide(new BigDecimal(100)).setScale(rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP).toPlainString(); | |||
| bmbill.setMoneyChangeDetail("原合同商业管理费金额:"+bmbill.getNeedPay()+"元,计算调整为:"+bussinessmoney+"元。"); | |||
| bmbill.setReceivePay(bussinessmoney); | |||
| bmbill.setBillRemark("设置销售额,自动计算"); | |||
| @@ -2804,7 +2789,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| WxAllBill ombill = null; | |||
| if (null != ombillList && ombillList.size() > 0 ) { | |||
| ombill = ombillList.get(0); | |||
| String operatermoney = new BigDecimal(needpay).multiply(new BigDecimal(operaterRate)).setScale(rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP).toPlainString(); | |||
| String operatermoney = new BigDecimal(needpay).multiply(new BigDecimal(operaterRate)).divide(new BigDecimal(100)).setScale(rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP).toPlainString(); | |||
| ombill.setMoneyChangeDetail("原合同营业管理费金额:"+bmbill.getNeedPay()+"元,计算调整为:"+operatermoney+"元。"); | |||
| ombill.setReceivePay(operatermoney); | |||
| ombill.setBillRemark("设置销售额,自动计算"); | |||