| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取当前有效的计费模板 |
| | | * @param accountingStrategyId |
| | | * @return |
| | | */ |
| | | @PostMapping("/getNowData") |
| | | public R<TAccountingStrategyDetail> getNowData(@RequestParam("accountingStrategyId") Integer accountingStrategyId){ |
| | | TAccountingStrategyDetail one = accountingStrategyDetailService.getOne(new LambdaQueryWrapper<TAccountingStrategyDetail>() |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, accountingStrategyId) |
| | | .last(" and DATE_FORMAT(now(), '%H:%i') between start_time and end_time")); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过站点id查询当前时段使用的策略明细 |
| | |
| | | return R.ok(dto.getStrategyDetailId().equals(one.getId())); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据计费策略主表id策略明细 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/getListByAccountingStrategyId") |
| | | public R<List<TAccountingStrategyDetail>> getListByAccountingStrategyId(@RequestParam("id") Integer id){ |
| | | List<TAccountingStrategyDetail> list = accountingStrategyDetailService.list(new LambdaQueryWrapper<TAccountingStrategyDetail>().eq(TAccountingStrategyDetail::getAccountingStrategyId, id)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | /** |
| | | * 通过桩编号查询当前使用的策略明细列表 |
| | | * @param code |