| | |
| | | |
| | | private BigDecimal getTotalFeeByStartEnd(YwContract model, YwContractDetail d, YwContractBill bill,Date freeStart,Date freeEnd) { |
| | | BigDecimal totalFee = new BigDecimal(0); |
| | | DateCompare dateCompare = DateCompare.dayCompare(bill.getStartDate(),bill.getEndDate(),freeStart,freeEnd); |
| | | DateCompare dateCompare = DateCompare.dayCompare(bill.getStartDate(),DateUtil.addDaysToDate(bill.getEndDate(),1),freeStart,freeEnd); |
| | | if(Constants.equalsInteger(d.getCircleType(),Constants.ZERO)){ |
| | | //0=元每平米天 |
| | | int days = dateCompare.getDay(); |
| | | int days = dateCompare.getDay() ; |
| | | BigDecimal areas = getAreasNumBYRooms(model.getRoomList()); |
| | | totalFee = new BigDecimal(days).multiply(areas).multiply(Constants.formatBigdecimal(d.getPrice()));//总价格 |
| | | }else if(Constants.equalsInteger(d.getCircleType(),Constants.ONE)){ |
| | |
| | | totalFee = year.multiply(areas).multiply(Constants.formatBigdecimal(d.getPrice()));//总价格 |
| | | }else if(Constants.equalsInteger(d.getCircleType(),Constants.THREE)){ |
| | | //3=元每天 |
| | | int days = dateCompare.getDay(); |
| | | int days = dateCompare.getDay() ; |
| | | totalFee = new BigDecimal(days).multiply(Constants.formatBigdecimal(d.getPrice()));//总价格 |
| | | }else if(Constants.equalsInteger(d.getCircleType(),Constants.FOUR)){ |
| | | //4=元每月 |