Commit 855bb0c3ac7614017d26e90ff40ba68918820225
1 parent
dcaae0f8a5
Exists in
master
and in
6 other branches
测量
Showing 1 changed file with 14 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
855bb0c
| ... | ... | @@ -35,9 +35,11 @@ |
| 35 | 35 | import org.apache.commons.dbutils.handlers.BeanListHandler; |
| 36 | 36 | import org.apache.commons.lang.StringUtils; |
| 37 | 37 | import org.springframework.beans.factory.annotation.Autowired; |
| 38 | +import org.springframework.beans.factory.annotation.Qualifier; | |
| 38 | 39 | import org.springframework.data.mongodb.core.MongoTemplate; |
| 39 | 40 | import org.springframework.data.mongodb.core.query.Criteria; |
| 40 | 41 | import org.springframework.data.mongodb.core.query.Query; |
| 42 | +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | |
| 41 | 43 | import org.springframework.stereotype.Component; |
| 42 | 44 | |
| 43 | 45 | import java.sql.Connection; |
| ... | ... | @@ -104,6 +106,10 @@ |
| 104 | 106 | |
| 105 | 107 | private static Integer MAX_TODAY_COUNT = 10000; |
| 106 | 108 | |
| 109 | + @Autowired | |
| 110 | + @Qualifier("commonThreadPool") | |
| 111 | + private ThreadPoolTaskExecutor commonThreadPool; | |
| 112 | + | |
| 107 | 113 | public BaseListResponse queryMeasureInfoList(String queryNo, |
| 108 | 114 | Integer valueType, String vcCardNo, |
| 109 | 115 | String recordTime, String age, |
| ... | ... | @@ -1232,9 +1238,14 @@ |
| 1232 | 1238 | * @param measureInfoRequest |
| 1233 | 1239 | * @return |
| 1234 | 1240 | */ |
| 1235 | - public BaseResponse addToDataInfo(MeasureInfoRequest measureInfoRequest) { | |
| 1236 | - MAX_TODAY_COUNT = 100; | |
| 1237 | - return addMeasureDataInfo(measureInfoRequest); | |
| 1241 | + public void addToDataInfo(final MeasureInfoRequest measureInfoRequest) { | |
| 1242 | + commonThreadPool.execute(new Runnable() { | |
| 1243 | + @Override | |
| 1244 | + public void run() { | |
| 1245 | + MAX_TODAY_COUNT = 100; | |
| 1246 | + addMeasureDataInfo(measureInfoRequest); | |
| 1247 | + } | |
| 1248 | + }); | |
| 1238 | 1249 | } |
| 1239 | 1250 | |
| 1240 | 1251 | public BaseResponse addBloodSugar(BloodSugar bloodSugar) { |