Commit 366a4e7af3a3b351da69eebf84d2f35bbf5c63bc

Authored by liquanyu
1 parent 10174e9aac

服务同步

Showing 3 changed files with 52 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java View file @ 366a4e7
... ... @@ -13,6 +13,7 @@
13 13 import com.lyms.platform.operate.web.result.*;
14 14 import com.lyms.platform.operate.web.utils.AreaHighRiskCountExportTask;
15 15 import com.lyms.platform.operate.web.utils.HiskCountTask;
  16 +import com.lyms.platform.operate.web.utils.MathUtil;
16 17 import com.lyms.platform.operate.web.utils.MongoUtil;
17 18 import com.lyms.platform.permission.model.Organization;
18 19 import com.lyms.platform.permission.model.OrganizationQuery;
... ... @@ -528,6 +529,7 @@
528 529 idQuery.setYn(YnEnums.YES.getId());
529 530  
530 531 List<String> items = new ArrayList<>();
  532 +
531 533 for (Map<String, Object> addr : list)
532 534 {
533 535 String id = String.valueOf(addr.get("id"));
... ... @@ -555,6 +557,38 @@
555 557 }
556 558 map.put("data",items);
557 559 series.add(map);
  560 +
  561 +// List<Map<String,Object>> bfbItem = new ArrayList<>();
  562 +//
  563 +// if (CollectionUtils.isNotEmpty(series))
  564 +// {
  565 +// int index = 0;
  566 +// for (Map<String,Object> seriseMap : series)
  567 +// {
  568 +// Map<String,Object> percent = new HashMap<>();
  569 +// percent.put("name",seriseMap.get("name"));
  570 +// percent.put("type","line");
  571 +//
  572 +//
  573 +// //占比/环比百分比
  574 +// List<String> bfb = new ArrayList<>();
  575 +//
  576 +//
  577 +// index++;
  578 +// List colums = (List)seriseMap.get("data");
  579 +// Object obj = colums.get(index);
  580 +// int total = 0;
  581 +//
  582 +// for (Map<String,Object> sMap : series)
  583 +// {
  584 +// List colums1 = (List)sMap.get("data");
  585 +// Object obj1 = colums1.get(index);
  586 +//
  587 +// total += Integer.valueOf(String.valueOf(obj1));
  588 +// }
  589 +// bfb.add(MathUtil.getProportion(Integer.valueOf(String.valueOf(obj)),total);
  590 +// }
  591 +// }
558 592 }
559 593 }
560 594 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ 366a4e7
... ... @@ -199,6 +199,7 @@
199 199 }
200 200 }catch(Exception ex){
201 201 ExceptionUtils.catchException(ex, url+": syncData Error.");
  202 + continue;
202 203 }
203 204 }
204 205  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/HttpClientUtil.java View file @ 366a4e7
... ... @@ -83,7 +83,8 @@
83 83 }
84 84 }
85 85 }catch(Exception ex){
86   - ex.printStackTrace();
  86 + ExceptionUtils.catchException(ex, url + ": doPost syncData Error.");
  87 + return null;
87 88 }
88 89 return result;
89 90 }
... ... @@ -199,5 +200,20 @@
199 200 }
200 201 return json1;
201 202 }
  203 +//
  204 +// public static void main(String[] args)
  205 +// {
  206 +// SqlRequest request = new SqlRequest();
  207 +// try {
  208 +// request.setSql(org.apache.commons.codec.binary.Base64.encodeBase64String("asdafsd".getBytes("utf-8")));
  209 +// } catch (UnsupportedEncodingException e) {
  210 +// e.printStackTrace();
  211 +// }
  212 +// request.setSqlId("11");
  213 +// String json = JsonUtil.obj2Str(request);
  214 +// String result = HttpClientUtil.doPostSSL("https://area-lc-api.healthbaby.com.cn:55581/syncMysqlData",json,"3d19960bf3e81e7d816c4f26051c49ba");
  215 +// System.out.print(result);
  216 +// }
  217 +
202 218 }