Commit 7c377f43 by wang_jiaxing

法律文书入库

parent 55b99cb1
......@@ -77,11 +77,11 @@ public class FlwsHqServiceImpl implements FlwsHqService {
private void extracted(String url, AtomicInteger cgsl, AtomicInteger sbsl, AtomicInteger dscsl, List<TbStAsjFlws> flwsList) {
flwsList.stream().parallel().forEach(flws -> {
String jsonStr = HttpUtil.doGet(url + "?anjianbianhao=" + flws.getAsjbh() +
"&renyuanbianhao=" + (StringUtils.isEmpty(flws.getRybh()) ? "00000000000000000000000" : flws.getRybh()) +
"&wslb=" + getFlwsdm(flws.getWslb()));
// System.out.println(jsonStr);
try {
String jsonStr = HttpUtil.doGet(url + "?anjianbianhao=" + flws.getAsjbh() +
"&renyuanbianhao=" + (StringUtils.isEmpty(flws.getRybh()) ? "00000000000000000000000" : flws.getRybh()) +
"&wslb=" + getFlwsdm(flws.getWslb()));
JSONObject jsonObject = JSON.parseObject(jsonStr);
String code = jsonObject.getString("code");
// System.out.println("code==========" + code);
......
......@@ -57,6 +57,8 @@ public class HttpUtil {
CloseableHttpClient httpClient = HttpClients.custom()
.setConnectionManager(cm).build();
HttpGet httpget = new HttpGet(url);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(5000).setConnectionRequestTimeout(5000).setSocketTimeout(5000).build();
httpget.setConfig(requestConfig);
String responseStr = "";
try {
responseStr = getResponseStr(httpClient.execute(httpget));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment