| | |
| | | .replace("{param3}",DateUtil.getDateLongSlash(model.getBtDate())) |
| | | .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"收":"付") |
| | | .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0? |
| | | Constants.formatBigdecimal2Float(model.getBtFee()).intValue() |
| | | :(Constants.formatBigdecimal2Float(model.getBtFee()).intValue() * -1))+"" ); |
| | | Constants.formatBigdecimal2Float(model.getBtFee()) |
| | | :(Constants.formatBigdecimal2Float(model.getBtFee()).multiply(new BigDecimal(-1)))).toString()); |
| | | return str; |
| | | } |
| | | private String getbackRentLogByParam(YwContract model) { |
| | | BigDecimal fee = Constants.formatBigdecimal(model.getBtFee()); |
| | | String str = "【退租日{param1},退租原因:{param2},退租协议中统计的费用总计{param3}元。】"; |
| | | String str = "【退租日{param1},退租原因:{param2},退租协议中统计的费用总计需{param4}{param5}元。】"; |
| | | str = str.replace("{param1}",DateUtil.getDateLongSlash(model.getBtDate())) |
| | | .replace("{param2}",StringUtils.defaultString(model.getBtInfo(),"")) |
| | | .replace("{param3}",Constants.formatBigdecimal2Float(model.getBtFee()).doubleValue()+""); |
| | | .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"收":"付") |
| | | .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0? |
| | | Constants.formatBigdecimal2Float(model.getBtFee()) |
| | | :(Constants.formatBigdecimal2Float(model.getBtFee()).multiply(new BigDecimal(-1)))).toString()); |
| | | return str; |
| | | } |
| | | |
| | |
| | | for(YwContractBill addBill : param.getAddBillList()){ |
| | | addBill.setIsdeleted(Constants.ZERO); |
| | | addBill.setContractId(param.getId()); |
| | | addBill.setType(Constants.ONE); |
| | | addBill.setType(Constants.TWO); |
| | | addBill.setStatus(Constants.ZERO); |
| | | addBill.setTotleFee(addBill.getReceivableFee()); |
| | | addBill.setCompanyId(param.getCompanyId()); |
| | | if(Constants.equalsInteger(addBill.getFeeType(),Constants.ONE)){ |
| | | addBill.setStartDate(addBill.getPlanPayDate()); |
| | | addBill.setEndDate(addBill.getPlanPayDate()); |
| | |
| | | if(model.getBillList()!=null && model.getBillList().size()>0){ |
| | | for(YwContractBill bill: model.getBillList()){ |
| | | //付款状态:0=待收款;1=已结清;2=部分结清;3=待付款;4=待退款;5=已关闭 |
| | | if( Constants.formatBigdecimal(bill.getReceivableFee()).compareTo(new BigDecimal(0)) ==0){ |
| | | //如果还没开始,账单直接关闭 |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(bill.getPayStatus(),Constants.ZERO) |
| | | ||Constants.equalsInteger(bill.getPayStatus(),Constants.THREE)){ |
| | | if(bill.getStartDate().getTime()>nowEnd){ |
| | | if(bill.getStartDate().getTime()>nowEnd ){ |
| | | //如果还没开始,账单直接关闭 |
| | | continue; |
| | | } |