| | |
| | | .last(" and DATE_FORMAT(now(), '%H:%i') between start_time and end_time")); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前有效的计费模板 |
| | | * @param accountingStrategyId |
| | | * @return |
| | | */ |
| | | /** |
| | | * 通过站点id查询当前时段使用的策略明细 |
| | | * @param siteId |
| | | * @return |
| | | */ |
| | | @PostMapping("/getDetailBySiteId") |
| | | public R<TAccountingStrategyDetail> getDetailBySiteId(@RequestParam("siteId") Integer siteId){ |
| | | Site site = siteService.getById(siteId); |
| | | TAccountingStrategy accountingStrategy = accountingStrategyService.getById(site.getAccountingStrategyId()); |
| | | TAccountingStrategyDetail one = accountingStrategyDetailService.getOne(Wrappers.<TAccountingStrategyDetail>lambdaQuery() |
| | | .eq(TAccountingStrategyDetail::getAccountingStrategyId, accountingStrategy.getId()) |
| | | .last(" and DATE_FORMAT(now(), '%H:%i') between start_time and end_time")); |
| | | return R.ok(one); |
| | | } |
| | | } |
| | | |