This commit is contained in:
caozehui
2026-07-22 09:20:17 +08:00
parent c1c2b94469
commit 23c0855794
3 changed files with 8 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import com.njcn.gather.result.service.impl.ResultServiceImpl;
import com.njcn.http.util.RestTemplateUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
@@ -18,8 +19,8 @@ import java.util.Map;
@Component
@RequiredArgsConstructor
public class DataCheckAsyncNotifier {
private final static String url="http://172.17.100.111:18091/steady/checksquare/create";
@Value("${dataCheck.url}")
private String url;
private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
private final RestTemplateUtil restTemplateUtil;

View File

@@ -147,7 +147,8 @@ public class ResultServiceImpl implements IResultService {
private final DataCheckAsyncNotifier dataCheckAsyncNotifier;
private final RestTemplateUtil restTemplateUtil;
public static final String CHECKSQUARE_CREATE_URL = "http://192.168.2.147:18091/api/steady/checksquare/create";
@org.springframework.beans.factory.annotation.Value("${dataCheck.url}")
private String url;
private static final DateTimeFormatter CHECKSQUARE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
private final Map<String, NotifyState> notifyStates = new ConcurrentHashMap<>();
@@ -225,7 +226,7 @@ public class ResultServiceImpl implements IResultService {
request.setIndicatorCodes(Arrays.asList("V_RMS"));
request.setTimeStart("2026-06-08 00:00:00");
request.setTimeEnd("2026-06-08 23:59:59");
String s = restTemplateUtil.postJson(CHECKSQUARE_CREATE_URL, request, String.class);
String s = restTemplateUtil.postJson(url, request, String.class);
JSONObject obj = JSONUtil.parseObj(s);
DataCheckResultVO data = BeanUtil.copyProperties(obj.get("data"), DataCheckResultVO.class);
return data;

View File

@@ -133,4 +133,5 @@ activate:
public-key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnFMmIVanMxsW5S/qP8Wcxf/J3/i4631BP3UtWkRzO7jAw9HIAgK4Y7X53hXj6zMbfme1vMjQc0mq7m/KrH4WlTYpFexLO6Gnk8oH40F04tp+ABZIq93zNOydPEaVoZeTPH/LlkwrrxVGAMNNIKuebcqapp25JiWtlSFMv4kH/nDAj+2m8+P4zYVM1Ed6gO01eKDEYE3SBA1Ket2BfHTgviR/F8WKwlXh11enywsJnrHTM5dJQdlUxCjHy214TpheYOz/cv9elQnDfFAbmZW8mH5/hgMSTkm3h4uR7ITin6Erg+yc/t1kGaTWrzloyBRMSiFN/Pwr5yQjj+1wQqqUkwIDAQAB"
dataCheck:
enable: false
enable: false
url: http://127.0.0.1:18091/steady/checksquare/create