|  |  |  | 
|---|
|  |  |  | import com.doumee.dao.openapi.request.*; | 
|---|
|  |  |  | import com.doumee.dao.openapi.response.*; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemUser; | 
|---|
|  |  |  | import com.doumee.service.business.PlatformJobService; | 
|---|
|  |  |  | import com.doumee.service.business.PlatformLogService; | 
|---|
|  |  |  | import com.doumee.service.business.PlatformService; | 
|---|
|  |  |  | import com.doumee.service.business.PlatformWaterGasService; | 
|---|
|  |  |  | import com.doumee.service.business.*; | 
|---|
|  |  |  | import com.doumee.service.system.SystemUserService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.data.redis.core.RedisTemplate; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.net.URLDecoder; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | private PlatformJobService platformJobService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PlatformWarnEventService platformWarnEventService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PlatformWaterGasService platformWaterGasService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("token解析") | 
|---|
|  |  |  | @GetMapping("/water/decodeToken") | 
|---|
|  |  |  | public Map<String,Object> decodeToken(@RequestParam String token) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | token = URLDecoder.decode(token,"UTF-8"); | 
|---|
|  |  |  | }catch (Exception e){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | HkBaseTokenRequest hkBaseTokenRequest = new HkBaseTokenRequest(); | 
|---|
|  |  |  | hkBaseTokenRequest.setToken(token); | 
|---|
|  |  |  | return this.decodeTokenForHk(hkBaseTokenRequest); | 
|---|
|  |  |  | 
|---|
|  |  |  | String redisToken = (String) redisTemplate.opsForValue().get(Constants.REDIS_HK_TOKEN_KEY+hkBaseTokenRequest.getToken()); | 
|---|
|  |  |  | if(StringUtils.isBlank(redisToken)){ | 
|---|
|  |  |  | result.put("code","-1"); | 
|---|
|  |  |  | result.put("msg","token参数为空"); | 
|---|
|  |  |  | result.put("msg","token无效!"); | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String userName = DESUtil.verifyHkToken(hkBaseTokenRequest.getToken()); | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("【月台】预警事件集合列表") | 
|---|
|  |  |  | @PostMapping("/platform/warningEventList") | 
|---|
|  |  |  | public ApiResponse<List<PlatformWarnEventListResponse>> warningEventList(@RequestBody PlatformWarnEventListRequest param) { | 
|---|
|  |  |  | return ApiResponse.success(new ArrayList<>()); | 
|---|
|  |  |  | return ApiResponse.success(platformWarnEventService.findListToHk()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginNoRequired | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("【月台】月台状态") | 
|---|
|  |  |  | @PostMapping("/platform/getStatusList") | 
|---|
|  |  |  | public ApiResponse<List<PlatformStatusListResponse>> getStatusList() { | 
|---|
|  |  |  | return ApiResponse.success(platformService.getPlatformStatusList()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|