| | |
| | | public R<TAccountingStrategyDetail> getDetailByCode(@RequestParam("code") String code){ |
| | | // 查询桩 |
| | | TChargingPile chargingPile = chargingPileService.getOne(Wrappers.lambdaQuery(TChargingPile.class) |
| | | .eq(TChargingPile::getCode,code) |
| | | .eq(TChargingPile::getCode,code).eq(TChargingPile::getDelFlag, 0) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(chargingPile)){ |
| | | return R.fail("未查询到该桩设备"); |
| | | } |
| | | TChargingGun chargingGun = chargingGunService.getOne(Wrappers.lambdaQuery(TChargingGun.class) |
| | | .eq(TChargingGun::getChargingPileId, chargingPile.getId()) |
| | | .eq(TChargingGun::getChargingPileId, chargingPile.getId()).eq(TChargingGun::getDelFlag, 0) |
| | | .last("LIMIT 1")); |
| | | TAccountingStrategy accountingStrategy = accountingStrategyService.getById(chargingGun.getAccountingStrategyId()); |
| | | TAccountingStrategyDetail one; |
| | |
| | | public R<Boolean> checkChargingStrategy(@RequestBody CheckChargingStrategyDTO dto){ |
| | | // 查询桩 |
| | | TChargingPile chargingPile = chargingPileService.getOne(Wrappers.lambdaQuery(TChargingPile.class) |
| | | .eq(TChargingPile::getCode,dto.getCode()) |
| | | .eq(TChargingPile::getCode,dto.getCode()).eq(TChargingPile::getDelFlag, 0) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(chargingPile)){ |
| | | return R.ok(false); |
| | |
| | | public R<List<TAccountingStrategyDetail>> getDetailListByCode(@RequestParam("code") String code){ |
| | | // 查询桩 |
| | | TChargingPile chargingPile = chargingPileService.getOne(Wrappers.lambdaQuery(TChargingPile.class) |
| | | .eq(TChargingPile::getCode,code) |
| | | .eq(TChargingPile::getCode,code).eq(TChargingPile::getDelFlag, 0) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(chargingPile)){ |
| | | return R.fail("未查询到该桩设备"); |
| | | } |
| | | TChargingGun chargingGun = chargingGunService.getOne(Wrappers.lambdaQuery(TChargingGun.class) |
| | | .eq(TChargingGun::getChargingPileId, chargingPile.getId()) |
| | | .eq(TChargingGun::getChargingPileId, chargingPile.getId()).eq(TChargingGun::getDelFlag, 0) |
| | | .last("LIMIT 1")); |
| | | TAccountingStrategy accountingStrategy = accountingStrategyService.getById(chargingGun.getAccountingStrategyId()); |
| | | if(Objects.nonNull(accountingStrategy)){ |