Commit 3271a3b67713d760daf6a6a32dc11cc5bbc5ed2c

Authored by liquanyu
1 parent 7faaa6be87

统计

Showing 2 changed files with 15 additions and 2 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java View file @ 3271a3b
... ... @@ -62,7 +62,10 @@
62 62 @Autowired
63 63 private BasicConfigService basicConfigService;
64 64  
  65 + @Autowired
  66 + private AccessPermissionFacade accessPermissionFacade;
65 67  
  68 +
66 69 @Autowired
67 70 private AutoMatchFacade autoMatchFacade;
68 71  
... ... @@ -274,6 +277,10 @@
274 277 basicQuery.setYn(YnEnums.YES.getId());
275 278 basicQuery.setTypeId("b7ea005c-dfac-4c2a-bdae-25239b3f44fd");
276 279  
  280 + List<DataPermissionsModel> permissionsModelList = accessPermissionFacade.findAccessPerminssionByUserId(userId);
  281 +
  282 + String permission = permissionsModelList.get(0).getAreaPermission();
  283 + System.out.println("permission======"+permission);
277 284  
278 285 String parentId = "";
279 286 if (StringUtils.isNotEmpty(countRequest.getProvinceId()))
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ 3271a3b
... ... @@ -29,7 +29,9 @@
29 29 import org.apache.http.util.EntityUtils;
30 30 import org.joda.time.DateTime;
31 31 import org.springframework.beans.factory.annotation.Autowired;
  32 +import org.springframework.beans.factory.annotation.Qualifier;
32 33 import org.springframework.data.domain.Sort;
  34 +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
33 35 import org.springframework.stereotype.Service;
34 36  
35 37 import javax.print.attribute.standard.DateTimeAtCompleted;
... ... @@ -92,6 +94,10 @@
92 94 @Autowired
93 95 private AntenatalExaminationService antenatalExaminationService;
94 96  
  97 + @Autowired
  98 + @Qualifier("commonThreadPool")
  99 + private ThreadPoolTaskExecutor commonThreadPool;
  100 +
95 101 /**
96 102 * 该方法是区域或者单体医院部署的把数据定时往某个环境上传
97 103 * (如往线上环境上传,mongo_sync_url就配置相应的线上的接收地址)
... ... @@ -176,7 +182,7 @@
176 182 end = list.size();
177 183 }
178 184 final List<SyncDataModel> tempList = list.subList(i, end);
179   - new Thread(new Runnable() {
  185 + commonThreadPool.execute(new Runnable() {
180 186 @Override
181 187 public void run() {
182 188 if (CollectionUtils.isNotEmpty(tempList))
... ... @@ -196,7 +202,7 @@
196 202 }
197 203 }
198 204 }
199   - }).start();
  205 + });
200 206 }
201 207 }
202 208 }catch(Exception ex){