|
|
@ -96,28 +96,25 @@ public class TianQingCLDASDataHandler { |
|
|
|
XxlJobHelper.log("read job end"); |
|
|
|
} |
|
|
|
|
|
|
|
public TianQingResponse<List<TianQingFileVO>> request(String timeRang, Map<String, Object> params) throws JsonProcessingException { |
|
|
|
synchronized (this){ |
|
|
|
if (results.containsKey(timeRang)){ |
|
|
|
return results.get(timeRang); |
|
|
|
} |
|
|
|
public synchronized TianQingResponse<List<TianQingFileVO>> request(String timeRang, Map<String, Object> params) throws JsonProcessingException { |
|
|
|
if (results.containsKey(timeRang)){ |
|
|
|
return results.get(timeRang); |
|
|
|
} |
|
|
|
|
|
|
|
results.clear(); |
|
|
|
params.put("timeRange", timeRang); |
|
|
|
int index = 0; |
|
|
|
while (index < 3){ |
|
|
|
String result = WebUtil.get(applicationCommon.getUrl(), params); |
|
|
|
TianQingResponse<List<TianQingFileVO>> tianQingResponse = objectMapper.readValue(result, new TypeReference<>() {}); |
|
|
|
if (tianQingResponse.getReturnCode() == 0){ |
|
|
|
results.put(timeRang, tianQingResponse); |
|
|
|
return tianQingResponse; |
|
|
|
} |
|
|
|
|
|
|
|
index++; |
|
|
|
results.clear(); |
|
|
|
params.put("timeRange", timeRang); |
|
|
|
int index = 0; |
|
|
|
while (index < 3){ |
|
|
|
String result = WebUtil.get(applicationCommon.getUrl(), params); |
|
|
|
TianQingResponse<List<TianQingFileVO>> tianQingResponse = objectMapper.readValue(result, new TypeReference<>() {}); |
|
|
|
if (tianQingResponse.getReturnCode() == 0){ |
|
|
|
results.put(timeRang, tianQingResponse); |
|
|
|
return tianQingResponse; |
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
index++; |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
private Map<DealInfo, Map.Entry<MetaInfo, Coordinate>> download(List<TianQingFileVO> tianQingFileVOs, String elementCode, List<DealInfo> dealInfos){ |
|
|
|