|  |  |  | 
|---|
|  |  |  | import com.ruoyi.common.constant.AmountConstant; | 
|---|
|  |  |  | import com.ruoyi.common.constant.CacheConstants; | 
|---|
|  |  |  | import com.ruoyi.common.core.redis.RedisCache; | 
|---|
|  |  |  | import com.ruoyi.common.enums.DisabledEnum; | 
|---|
|  |  |  | import com.ruoyi.common.exception.ServiceException; | 
|---|
|  |  |  | import com.ruoyi.common.utils.DateUtils; | 
|---|
|  |  |  | import com.ruoyi.common.utils.OrderNos; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | public void saveBill(TbillSaveDto bill) { | 
|---|
|  |  |  | bill.setManualAddition(DisabledEnum.YES.getCode()); | 
|---|
|  |  |  | save(bill); | 
|---|
|  |  |  | if (bill.getBillType().equals("3")){ | 
|---|
|  |  |  | if (bill.getDetails()==null || bill.getDetails().size()==0){ | 
|---|
|  |  |  | 
|---|
|  |  |  | TFlowManagement save = new TFlowManagement(); | 
|---|
|  |  |  | save.setPayType(3); | 
|---|
|  |  |  | save.setPayer(dto.getPayer()); | 
|---|
|  |  |  | save.setBusinessDeptId(bill.getBusinessDeptId()); | 
|---|
|  |  |  | save.setPayTime(bankflow.getPayTime()); | 
|---|
|  |  |  | save.setSysSerialNumber(OrderNos.getDid(30)); | 
|---|
|  |  |  | save.setBankSerialNumber(bankflow.getBankSerialNumber()); | 
|---|
|  |  |  | 
|---|
|  |  |  | TFlowManagement saveFlow = new TFlowManagement(); | 
|---|
|  |  |  | saveFlow.setPayType(1); | 
|---|
|  |  |  | saveFlow.setPayer(order.getUserId()); | 
|---|
|  |  |  | saveFlow.setBusinessDeptId(bill.getBusinessDeptId()); | 
|---|
|  |  |  | saveFlow.setPayTime(DateUtils.dateToLocalDateTime(save.getPayTime())); | 
|---|
|  |  |  | saveFlow.setSysSerialNumber(OrderNos.getDid(30)); | 
|---|
|  |  |  | saveFlow.setBankSerialNumber(save.getPayNo()); | 
|---|
|  |  |  | 
|---|
|  |  |  | TFlowManagement save = new TFlowManagement(); | 
|---|
|  |  |  | save.setPayType(3); | 
|---|
|  |  |  | save.setPayer(dto.getPayer()); | 
|---|
|  |  |  | save.setBusinessDeptId(bill.getBusinessDeptId()); | 
|---|
|  |  |  | save.setPayTime(bankflow!=null?bankflow.getPayTime():DateUtils.dateToLocalDateTime(new Date())); | 
|---|
|  |  |  | save.setSysSerialNumber(OrderNos.getDid()); | 
|---|
|  |  |  | save.setBankSerialNumber(bankflow!=null?bankflow.getBankSerialNumber():null); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public BillStatisticsDto statistics() { | 
|---|
|  |  |  | public BillStatisticsDto statistics(String busDeptId) { | 
|---|
|  |  |  | BillStatisticsDto dto = new BillStatisticsDto(); | 
|---|
|  |  |  | dto.setRent(getBaseMapper().statisticsAllRent()); | 
|---|
|  |  |  | dto.setNopay(getBaseMapper().statisticsNoPay()); | 
|---|
|  |  |  | dto.setPayed(getBaseMapper().statisticsPayed()); | 
|---|
|  |  |  | dto.setOverdue(getBaseMapper().statisticsOverdue()); | 
|---|
|  |  |  | dto.setRent(getBaseMapper().statisticsAllRent(busDeptId)); | 
|---|
|  |  |  | dto.setNopay(getBaseMapper().statisticsNoPay(busDeptId)); | 
|---|
|  |  |  | dto.setPayed(getBaseMapper().statisticsPayed(busDeptId)); | 
|---|
|  |  |  | dto.setOverdue(getBaseMapper().statisticsOverdue(busDeptId)); | 
|---|
|  |  |  | return dto; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<ScreenRentRankVO> getStreetRentRank() { | 
|---|
|  |  |  | return baseMapper.getStreetRentRank(); | 
|---|
|  |  |  | public List<ScreenRentRankVO> getStreetRentRank(String businessDeptId) { | 
|---|
|  |  |  | return baseMapper.getStreetRentRank(businessDeptId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询季付账单 | 
|---|
|  |  |  | * @param businessDeptId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<TBill> getJiFuBillList(String businessDeptId) { | 
|---|
|  |  |  | return baseMapper.getJiFuBillList(businessDeptId,null,null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询当前季度的季付账单 | 
|---|
|  |  |  | * @param businessDeptId | 
|---|
|  |  |  | * @param first | 
|---|
|  |  |  | * @param last | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<TBill> getJiFuBillListByTime(String businessDeptId, Date first, Date last) { | 
|---|
|  |  |  | return baseMapper.getJiFuBillList(businessDeptId,first,last); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|