| | |
| | | @Autowired |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | private static final String PUBLIC_KEY_URL = "http://10.88.7.107:8081/api/api/services/Runtime/Authentication/GetLoginRSAPublicKeyAsync"; |
| | | private static final String PUBLIC_KEY_URL = "http://zhny.shasteel.cn/api/api/services/Runtime/Authentication/GetLoginRSAPublicKeyAsync"; |
| | | |
| | | private static final String ACCESS_TOKEN_URL = "http://10.88.7.107:8081/EP.Web/account/ajaxLogin"; |
| | | private static final String ACCESS_TOKEN_URL = "http://zhny.shasteel.cn/EP.Web/account/ajaxLogin"; |
| | | |
| | | private static final String QUERY_SEGMENTED_DATA_URL = "http://10.88.7.107:8081/SG.Web/api/services/nYJK/DiagnosticsSg/QuerySegmentedDataAsync"; |
| | | private static final String QUERY_SEGMENTED_DATA_URL = "http://zhny.shasteel.cn/SG.Web/api/services/nYJK/DiagnosticsSg/QuerySegmentedDataAsync"; |
| | | |
| | | private static final String USERNAME = "Mx001@sgis"; |
| | | |
| | |
| | | String year = String.valueOf(date.getYear()); |
| | | paramsMap.put("clock", year); |
| | | logger.info("请求参数:" + JSON.toJSONString(paramsMap)); |
| | | String resp = HttpUtils.sendPost(QUERY_SEGMENTED_DATA_URL, JSON.toJSONString(paramsMap), accessToken); |
| | | String resp = HttpUtils.sendPostToken(QUERY_SEGMENTED_DATA_URL, JSON.toJSONString(paramsMap), accessToken); |
| | | logger.info("获取分段数据的返回值:" + resp); |
| | | JSONObject jsonObject = JSON.parseObject(resp); |
| | | List<ElectricityPriceSegmentedDTO> list = jsonObject.getJSONArray("data").toJavaList(ElectricityPriceSegmentedDTO.class); |
| | |
| | | cipher.init(Cipher.ENCRYPT_MODE, publicKey); |
| | | return Base64.getEncoder().encodeToString(cipher.doFinal(data.getBytes())); |
| | | } |
| | | |
| | | } |