沙钢智慧能源系统后端代码
潘志宝
2025-06-03 5a6817e6bcd68375b342dd1e4f234777357fa289
shasteel-biz/src/main/java/com/iailab/module/shasteel/job/task/SyncSegmentedDataTask.java
@@ -37,11 +37,11 @@
    @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";
@@ -118,7 +118,7 @@
        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);
@@ -132,4 +132,5 @@
        cipher.init(Cipher.ENCRYPT_MODE, publicKey);
        return Base64.getEncoder().encodeToString(cipher.doFinal(data.getBytes()));
    }
}