| | |
| | | |
| | | import cn.hutool.core.img.ImgUtil; |
| | | import cn.hutool.core.io.FileUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.chargingPile.api.dto.GetSiteListDTO; |
| | | import com.ruoyi.chargingPile.api.dto.TChargingGunDTO; |
| | |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | import com.ruoyi.chargingPile.api.model.TFaultMessage; |
| | | import com.ruoyi.chargingPile.api.query.TChargingGunQuery; |
| | | import com.ruoyi.chargingPile.api.vo.GetChargingGunByCode; |
| | | import com.ruoyi.chargingPile.api.vo.GunStatusStatisticsVO; |
| | | import com.ruoyi.chargingPile.api.vo.SiteNameVO; |
| | | import com.ruoyi.chargingPile.api.vo.TChargingGunVO; |
| | |
| | | * @param code |
| | | * @return |
| | | */ |
| | | @PostMapping("/getChargingGunByCode/{code}") |
| | | public R<TChargingGun> getChargingGunByCode(@PathVariable("code") String code){ |
| | | @PostMapping("/getChargingGunByCode") |
| | | public R<TChargingGun> getChargingGunByCode(@RequestBody GetChargingGunByCode code){ |
| | | TChargingPile chargingPile = chargingPileService.getOne(new LambdaQueryWrapper<TChargingPile>().eq(TChargingPile::getCode, code.getCharging_pile_code()).eq(TChargingPile::getDelFlag, 0)); |
| | | return R.ok(chargingGunService.getOne(Wrappers.lambdaQuery(TChargingGun.class) |
| | | .eq(TChargingGun::getCode, code) |
| | | .last("LIMIT 1"))); |
| | | .eq(TChargingGun::getChargingPileId, chargingPile.getId()) |
| | | .eq(TChargingGun::getCode, code.getCharging_gun_code()) |
| | | .eq(TChargingGun::getDelFlag, 0) |
| | | .last("LIMIT 1"))); |
| | | } |
| | | /** |
| | | * 根据枪编号获取充电枪 |