| | |
| | | import com.ruoyi.common.log.enums.OperatorType; |
| | | import com.ruoyi.common.security.annotation.Logical; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderClient; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Autowired |
| | | private FileUploadConfig fileUploadConfig; |
| | | |
| | | |
| | | /** |
| | | * 查询所有枪 |
| | | */ |
| | | @PostMapping(value = "/getAllGun") |
| | | public R<List<TChargingGun>> getAllGun() { |
| | | return R.ok(chargingGunService.list(null)); |
| | | } |
| | | /** |
| | | * 查询所有桩 |
| | | */ |
| | | @PostMapping(value = "/getAllPile") |
| | | public R<List<TChargingPile>> getAllPile() { |
| | | return R.ok(chargingPileService.list(null)); |
| | | } |
| | | |
| | | /** |
| | | * 查询充电枪列表 |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | /** |
| | | * 设备状态统计 |
| | | */ |
| | |
| | | @PutMapping(value = "/gunStatusStatistics") |
| | | public R<GunStatusStatisticsVO> gunStatusStatistics() { |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | Long userId = SecurityUtils.getUserId(); |
| | | Long userId = tokenService.getLoginUser().getUserid(); |
| | | //获取当前登录的siteIds |
| | | PageInfo<GetSiteListDTO> siteList1 = siteService.getSiteList1(userId); |
| | | for (GetSiteListDTO datum : siteList1.getRecords()) { |