Commit 024cf673b9b90055d2b7864a9288c0124ec5ceae

Authored by jiangjiazhi
1 parent 4a6cb657bc

1

Showing 4 changed files with 25 additions and 3 deletions

platform-dal/src/main/java/com/lyms/platform/query/AreaCodeQuery.java View file @ 024cf67
... ... @@ -11,7 +11,9 @@
11 11 */
12 12 public class AreaCodeQuery extends BaseQuery implements IConvertToNativeQuery {
13 13 private String areaId;
  14 + private Integer yn;
14 15  
  16 +
15 17 @Override
16 18 public MongoQuery convertToQuery() {
17 19 MongoCondition condition = MongoCondition.newInstance();
... ... @@ -19,6 +21,10 @@
19 21 if(null!=areaId){
20 22 condition=condition.and("areaId", areaId, MongoOper.IS);
21 23 }
  24 +
  25 + if(null!=yn){
  26 + condition=condition.and("yn", yn, MongoOper.IS);
  27 + }
22 28 return condition.toMongoQuery();
23 29 }
24 30  
... ... @@ -28,6 +34,14 @@
28 34  
29 35 public void setAreaId(String areaId) {
30 36 this.areaId = areaId;
  37 + }
  38 +
  39 + public Integer getYn() {
  40 + return yn;
  41 + }
  42 +
  43 + public void setYn(Integer yn) {
  44 + this.yn = yn;
31 45 }
32 46 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 024cf67
... ... @@ -268,6 +268,7 @@
268 268 if (null != organization) {
269 269 AreaCodeQuery areaCodeQuery = new AreaCodeQuery();
270 270 areaCodeQuery.setAreaId(organization.getCityId());
  271 + areaCodeQuery.setYn(YnEnums.YES.getId());
271 272 List<AreaCodeModel> code = areaCodeService.queryList(areaCodeQuery);
272 273 AreaCodeModel areaCode = null;
273 274 if (CollectionUtils.isNotEmpty(code)) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientCheckTicketFacade.java View file @ 024cf67
... ... @@ -19,6 +19,8 @@
19 19 import com.lyms.platform.query.PatientsQuery;
20 20 import org.apache.commons.collections.CollectionUtils;
21 21 import org.springframework.beans.factory.annotation.Autowired;
  22 +import org.springframework.beans.factory.annotation.Qualifier;
  23 +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
22 24 import org.springframework.stereotype.Component;
23 25  
24 26 import java.util.ArrayList;
... ... @@ -48,6 +50,10 @@
48 50 @Autowired
49 51 private OrganizationService organizationService;
50 52  
  53 + @Autowired
  54 + @Qualifier("commonThreadPool")
  55 + private ThreadPoolTaskExecutor commonThreadPool;
  56 +
51 57 /**
52 58 * 补发以前建档的产检劵
53 59 *
... ... @@ -72,7 +78,7 @@
72 78 if (end > patientses.size()) {
73 79 end = patientses.size();
74 80 }
75   - new SupplyCheckTicketThread(patientses.subList(i, end)).start();
  81 + commonThreadPool.execute(new SupplyCheckTicketThread(patientses.subList(i, end)));
76 82 }
77 83 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
78 84 }
... ... @@ -96,6 +102,8 @@
96 102 if (null != organization) {
97 103 AreaCodeQuery areaCodeQuery = new AreaCodeQuery();
98 104 areaCodeQuery.setAreaId(organization.getCityId());
  105 + areaCodeQuery.setYn(YnEnums.YES.getId()
  106 + );
99 107 List<AreaCodeModel> code = areaCodeService.queryList(areaCodeQuery);
100 108 AreaCodeModel areaCode = null;
101 109 if (CollectionUtils.isNotEmpty(code)) {
platform-operate-api/src/main/resources/spring/applicationContext.xml View file @ 024cf67
... ... @@ -56,7 +56,7 @@
56 56  
57 57 <bean id="commonThreadPool" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
58 58 <!-- 核心线程数,默认为1 -->
59   - <property name="corePoolSize" value="10" />
  59 + <property name="corePoolSize" value="10"/>
60 60  
61 61 <!-- 最大线程数,默认为Integer.MAX_VALUE -->
62 62 <property name="maxPoolSize" value="50" />
... ... @@ -73,7 +73,6 @@
73 73 <!-- CallerRunsPolicy:主线程直接执行该任务,执行完之后尝试添加下一个任务到线程池中,可以有效降低向线程池内添加任务的速度 -->
74 74 <!-- DiscardOldestPolicy:抛弃旧的任务、暂不支持;会导致被丢弃的任务无法再次被执行 -->
75 75 <!-- DiscardPolicy:抛弃当前任务、暂不支持;会导致被丢弃的任务无法再次被执行 -->
76   -
77 76 </bean>
78 77 </beans>