| | |
| | | TDriverResp tDriverResp = new TDriverResp(); |
| | | BeanUtils.copyProperties(tDriver,tDriverResp); |
| | | |
| | | if(Objects.nonNull(tDriver.getBackgroundBalance()) && Objects.nonNull(tDriver.getBalance())){ |
| | | if(Objects.nonNull(tDriver.getBackgroundBalance()) && Objects.nonNull(tDriver.getBalance()) && Objects.nonNull(tDriver.getCouponBalance())){ |
| | | // 设置余额 |
| | | tDriverResp.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance())); |
| | | tDriverResp.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance()).add(tDriver.getCouponBalance())); |
| | | } |
| | | |
| | | // 所属代理商 |
| | |
| | | |
| | | String monthDate = new SimpleDateFormat("yyyyMM").format(new Date()); |
| | | |
| | | if(Objects.nonNull(tDriver.getBackgroundBalance()) && Objects.nonNull(tDriver.getBalance())){ |
| | | if(Objects.nonNull(tDriver.getBackgroundBalance()) && Objects.nonNull(tDriver.getBalance()) && Objects.nonNull(tDriver.getCouponBalance())){ |
| | | // 设置余额 |
| | | tDriver.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance())); |
| | | tDriver.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance()).add(tDriver.getCouponBalance())); |
| | | model.addAttribute("balance",tDriver.getBalance()); |
| | | }else { |
| | | model.addAttribute("balance",BigDecimal.ZERO); |
| | |
| | | tBranchOffice = tBranchOfficeMapper.selectList(new EntityWrapper<TBranchOffice>().eq("provinceCode", province.getCode()) |
| | | .eq("cityCode", city.getCode()) |
| | | .eq("status", StatusEnum.NORMAL.getCode()) |
| | | .eq("districtCode", city.getCode()) |
| | | .last("LIMIT 1")); |
| | | // tBranchOffice = tBranchOfficeMapper.selectList(new EntityWrapper<TBranchOffice>().eq("provinceCode", province.getCode()) |
| | | // .eq("cityCode", city.getCode()) |
| | | // .eq("status", StatusEnum.NORMAL.getCode()) |
| | | // .eq("districtCode", city.getCode()) |
| | | // .last("LIMIT 1")); |
| | | } |
| | | if(!CollectionUtils.isEmpty(tBranchOffice)){ |
| | | tDriver.setBranchOfficeId(tBranchOffice.get(0).getId()); |