| | |
| | | .replace("{param3}",DateUtil.getDateLongSlash(model.getBtDate())) |
| | | .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"收":"付") |
| | | .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0? |
| | | Constants.formatBigdecimal(model.getBtFee()).intValue() |
| | | :(Constants.formatBigdecimal(model.getBtFee()).intValue() * -1))+"" ); |
| | | Constants.formatBigdecimal2Float(model.getBtFee()).intValue() |
| | | :(Constants.formatBigdecimal2Float(model.getBtFee()).intValue() * -1))+"" ); |
| | | return str; |
| | | } |
| | | private String getbackRentLogByParam(YwContract model) { |
| | |
| | | } |
| | | if(Constants.equalsInteger(bill.getPayStatus(),Constants.ZERO) |
| | | ||Constants.equalsInteger(bill.getPayStatus(),Constants.THREE)){ |
| | | if(bill.getStartDate().getTime()<param.getBtDate().getTime()){ |
| | | if(bill.getStartDate().getTime()<=param.getBtDate().getTime()){ |
| | | canBills.add(bill); |
| | | }else{ |
| | | //如果还没开始,账单直接关闭 |
| | |
| | | |
| | | BigDecimal totalBackFee = new BigDecimal(0); |
| | | if(canBills.size()>0){ |
| | | //直接关闭关闭账单 |
| | | // |
| | | for(YwContractBill b : canBills){ |
| | | BigDecimal fee = new BigDecimal(0); |
| | | YwContractBill editBill = getEditBillFromListByParam(b,param.getCanBackRentBills()); |
| | | if(editBill != null){ |
| | | //付款状态:0=待收款;1=已结清;2=部分结清;3=待付款;4=待退款;5=已关闭 |
| | | //如果账单信息做了编辑,金额计算 实收金额 和 修改后应收金额作对比,判断是否应该退款 |
| | | fee = Constants.formatBigdecimal(b.getActReceivableFee()).subtract(editBill.getReceivableFee()); |
| | | fee = editBill.getReceivableFee().subtract(Constants.formatBigdecimal(b.getActReceivableFee())); |
| | | if(fee.compareTo(new BigDecimal(0))== 0){ |
| | | //如果费用正好,则修改账单信息为已结清 |
| | | b.setPayStatus(Constants.ONE); |
| | |
| | | } |
| | | if(Constants.equalsInteger(addBill.getBillType(),Constants.ZERO)){ |
| | | //如果是收款 |
| | | totalBackFee = totalBackFee.add(Constants.formatBigdecimal(addBill.getActReceivableFee())); |
| | | // totalBackFee = totalBackFee.add(Constants.formatBigdecimal(addBill.getActReceivableFee())); |
| | | addBill.setPayStatus(Constants.ZERO); |
| | | addBill.setBtFee(Constants.formatBigdecimal(addBill.getActReceivableFee())); |
| | | addBill.setBtFee(Constants.formatBigdecimal(addBill.getReceivableFee())); |
| | | }else{ |
| | | //如果是付款 |
| | | addBill.setPayStatus(Constants.THREE); |
| | | addBill.setBtFee(Constants.formatBigdecimal(addBill.getActReceivableFee()).multiply(new BigDecimal(-1))); |
| | | addBill.setBtFee(Constants.formatBigdecimal(addBill.getReceivableFee()).multiply(new BigDecimal(-1))); |
| | | } |
| | | totalBackFee = totalBackFee.add(Constants.formatBigdecimal(addBill.getBtFee())); |
| | | addBill.setEditDate(param.getEditDate()); |
| | |
| | | yjBill.setEditDate(param.getEditDate()); |
| | | yjBill.setEditor(param.getEditor()); |
| | | yjBill.setReceivableFee(BigDecimal.ZERO); |
| | | yjBill.setPayStatus(Constants.FOUR); |
| | | yjBill.setPlanPayDate(canBill.getPlanPayDate()); |
| | | if(Constants.formatBigdecimal(canBill.getActReceivableFee()).compareTo(new BigDecimal(0)) == 0){ |
| | | //未支付的押金,直接关闭 |
| | | yjBill.setStatus(Constants.ONE); |
| | | closeBills.add(yjBill); |
| | | }else{ |
| | | yjBill.setBtFee(Constants.formatBigdecimal(canBill.getActReceivableFee()).multiply(new BigDecimal(-1))); |
| | | yjBill.setPayStatus(Constants.FOUR); |
| | | yjBill.setPlanPayDate(canBill.getPlanPayDate()); |
| | | totalBackFee = totalBackFee.add(Constants.formatBigdecimal(yjBill.getBtFee())); |
| | | yjNoBills ++; |
| | | } |
| | | ywContractBillMapper.updateById(yjBill); |
| | | } |
| | | } |
| | | yjNoBills ++; |
| | | } |
| | | } |
| | | param.setBtWaitBill(canBills.size() + newBills.size()+yjNoBills);//未清算的账单数量 |
| | |
| | | } |
| | | model.setCanBackRentBills(new ArrayList<>()); |
| | | long nowStart = Utils.Date.getStart(date).getTime(); |
| | | long nowEnd = Utils.Date.getEnd(date).getTime(); |
| | | long nowEnd = Utils.Date.getDayEnd(date).getTime(); |
| | | if(model.getBillList()!=null && model.getBillList().size()>0){ |
| | | for(YwContractBill bill: model.getBillList()){ |
| | | //付款状态:0=待收款;1=已结清;2=部分结清;3=待付款;4=待退款;5=已关闭 |
| | |
| | | queryWrapper.ge(YwContract::getWyFreeEndDate, Utils.Date.getStart(pageWrap.getModel().getWyFreeEndDate())); |
| | | queryWrapper.le(YwContract::getWyFreeEndDate, Utils.Date.getEnd(pageWrap.getModel().getWyFreeEndDate())); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | if (pageWrap.getModel().getZlTotalFee() != null) { |
| | | queryWrapper.eq(YwContract::getZlTotalFee, pageWrap.getModel().getZlTotalFee()); |
| | | } |