Commit ca193885228f470233e78417929027c8a7c12c3d
1 parent
bcfd82207e
Exists in
master
and in
6 other branches
秦皇岛-科研导出优化
Showing 3 changed files with 33 additions and 17 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
ca19388
... | ... | @@ -3942,7 +3942,7 @@ |
3942 | 3942 | matDeliverQuery.setCreatedStart(patientsQuery.getFmDateStart()); |
3943 | 3943 | matDeliverQuery.setEndStart(patientsQuery.getFmDateEnd()); |
3944 | 3944 | } |
3945 | - matDeliverQuery.setHospitalId(hid); | |
3945 | +// matDeliverQuery.setHospitalId(hid); | |
3946 | 3946 | } |
3947 | 3947 | matDeliverQuery.setLimit(childbirthManagerRequest.getLimit()); |
3948 | 3948 | matDeliverQuery.setYn(YnEnums.YES.getId()); |
3949 | 3949 | |
3950 | 3950 | |
... | ... | @@ -3951,11 +3951,10 @@ |
3951 | 3951 | matDeliverQuery.setDeliveryModeQueryJson(StringUtils.isEmpty(childbirthManagerRequest.getDeliveryMode()) ? null : deliveryModeQueryJson); |
3952 | 3952 | List <MaternalDeliverModel> maternalDeliverModelList = matDeliverService.pageQuery(matDeliverQuery); |
3953 | 3953 | |
3954 | - | |
3955 | 3954 | List<Map> date = new LinkedList<>(); |
3956 | - int batchSize = 20; | |
3955 | + int batchSize = 4; | |
3957 | 3956 | int end = 0; |
3958 | - List <Future> futures = new ArrayList <>(); | |
3957 | + List <Future> listFuture = new ArrayList <>(); | |
3959 | 3958 | for (int i = 0; i < maternalDeliverModelList.size(); i += batchSize) { |
3960 | 3959 | end = (end + batchSize); |
3961 | 3960 | if (end > maternalDeliverModelList.size()) { |
3962 | 3961 | |
3963 | 3962 | |
3964 | 3963 | |
... | ... | @@ -3966,20 +3965,18 @@ |
3966 | 3965 | mlist, patientsMap,mongoTemplate); |
3967 | 3966 | Future f = commonThreadPool.submit(c); |
3968 | 3967 | if (f != null) { |
3969 | - futures.add(f); | |
3968 | + listFuture.add(f); | |
3970 | 3969 | } |
3971 | 3970 | } |
3972 | - | |
3973 | - if (CollectionUtils.isNotEmpty(futures)) { | |
3974 | - for (Future f : futures) { | |
3971 | + if (CollectionUtils.isNotEmpty(listFuture)) { | |
3972 | + for (Future f : listFuture) { | |
3975 | 3973 | try { |
3976 | - date.addAll((List <Map>) f.get()); | |
3974 | + date.addAll((List) f.get(30, TimeUnit.SECONDS)); | |
3977 | 3975 | } catch (Exception e) { |
3978 | 3976 | ExceptionUtils.catchException(e, "fm list error."); |
3979 | 3977 | } |
3980 | 3978 | } |
3981 | 3979 | } |
3982 | - | |
3983 | 3980 | childbirthManagerResult.setData(date); |
3984 | 3981 | childbirthManagerResult.setErrorcode(ErrorCodeConstants.SUCCESS); |
3985 | 3982 | childbirthManagerResult.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
View file @
ca19388
... | ... | @@ -837,7 +837,7 @@ |
837 | 837 | initQueryMapqhdky.put("ctgab", "TGAb甲状腺球蛋白"); |
838 | 838 | initQueryMapqhdky.put("ctpoab", "TPOAb抗甲状腺过氧化物抗体"); |
839 | 839 | initQueryMapqhdky.put("babyWeight", "新生儿体重"); |
840 | - initQueryMapqhdky.put("", "新生儿血糖"); | |
840 | + initQueryMapqhdky.put("xsext", "新生儿血糖"); | |
841 | 841 | initQueryMapqhdky.put("apgarScore", "新生儿评分"); |
842 | 842 | |
843 | 843 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/MaterDeliverWorker2.java
View file @
ca19388
... | ... | @@ -60,8 +60,9 @@ |
60 | 60 | if(MapUtils.isNotEmpty(patientsMap)){ |
61 | 61 | patients = patientsMap.get(maternalDeliverModel.getParentId()); |
62 | 62 | }else { |
63 | - Criteria criteria= Criteria.where("_id").is(maternalDeliverModel.getParentId()); | |
63 | + Criteria criteria= Criteria.where("id").is(maternalDeliverModel.getParentId()); | |
64 | 64 | patients = mongoTemplate.findOne(Query.query(criteria), Patients.class); |
65 | +// System.out.println(Query.query(criteria).toString()+"--------------1"); | |
65 | 66 | } |
66 | 67 | |
67 | 68 | if (null == patients) { |
... | ... | @@ -73,6 +74,7 @@ |
73 | 74 | if(StringUtils.isNotEmpty(patients.getId())){ |
74 | 75 | Criteria criteria= Criteria.where("parentId").is(patients.getId()); |
75 | 76 | AntExChuModel exChuModel = mongoTemplate.findOne(Query.query(criteria), AntExChuModel.class); |
77 | +// System.out.println(Query.query(criteria).toString()+"--------------2"); | |
76 | 78 | if(null!=exChuModel){ |
77 | 79 | initQueryMapqhdky.put("cc", null!=exChuModel.getProdTime()?0 == exChuModel.getProdTime()?"是":"否":""); |
78 | 80 | initQueryMapqhdky.put("jc", null!=exChuModel.getProdTime()?0<exChuModel.getProdTime()?"是":"否":""); |
79 | 81 | |
80 | 82 | |
... | ... | @@ -108,17 +110,23 @@ |
108 | 110 | antExRecordQuery.setParentId(patients.getId()); |
109 | 111 | antExRecordQuery.setcDueWeekStart(168); |
110 | 112 | antExRecordQuery.setcDueWeekEnd(196); |
111 | - List<AntExRecordModel> antExRecordModels = recordService.queryAntExRecords(antExRecordQuery); | |
113 | + antExRecordQuery.setNeed("yse"); | |
114 | + antExRecordQuery.setPage(1); | |
115 | + antExRecordQuery.setLimit(1); | |
116 | + List<AntExRecordModel> antExRecordModels = recordService.queryAntExRecords(antExRecordQuery,Sort.Direction.DESC, "checkTime"); | |
117 | +// System.out.println(antExRecordQuery.convertToQuery().convertToMongoQuery().toString()+"--------------3"); | |
112 | 118 | if(CollectionUtils.isNotEmpty(antExRecordModels)){ |
113 | 119 | AntExRecordModel antExRecordModel= antExRecordModels.get(0); |
114 | 120 | if(null!=antExRecordModel){ |
115 | 121 | if(2==antExRecordModel.getType()){ //初诊 |
116 | 122 | Criteria criteriaf= Criteria.where("id").is(antExRecordModel.getfId()); |
117 | 123 | AntExChuModel AntExChu = mongoTemplate.findOne(Query.query(criteriaf), AntExChuModel.class); |
124 | +// System.out.println(Query.query(criteriaf).toString()+"--------------4"); | |
118 | 125 | initQueryMapqhdky.put("mweight", null!=AntExChu.getWeight()?AntExChu.getWeight().toString():""); |
119 | 126 | }else { //复诊 |
120 | 127 | Criteria criteriaf= Criteria.where("id").is(antExRecordModel.getfId()); |
121 | 128 | AntenatalExaminationModel AntExFu = mongoTemplate.findOne(Query.query(criteriaf), AntenatalExaminationModel.class); |
129 | +// System.out.println(Query.query(criteriaf).toString()+"--------------5"); | |
122 | 130 | initQueryMapqhdky.put("mweight", null!=AntExFu.getWeight()?AntExFu.getWeight().toString():""); |
123 | 131 | } |
124 | 132 | }else { |
125 | 133 | |
126 | 134 | |
... | ... | @@ -130,17 +138,23 @@ |
130 | 138 | //体重3kg(最后一次检查) |
131 | 139 | AntExRecordQuery antExRecordQuery2=new AntExRecordQuery(); |
132 | 140 | antExRecordQuery2.setParentId(patients.getId()); |
133 | - List<AntExRecordModel> antExRecordModels2 = recordService.queryAntExRecords(antExRecordQuery2); | |
141 | + antExRecordQuery2.setNeed("yes"); | |
142 | + antExRecordQuery2.setPage(1); | |
143 | + antExRecordQuery2.setLimit(1); | |
144 | + List<AntExRecordModel> antExRecordModels2 = recordService.queryAntExRecords(antExRecordQuery2,Sort.Direction.DESC, "checkTime"); | |
145 | +// System.out.println(antExRecordQuery2.convertToQuery().convertToMongoQuery().toString()+"--------------6"); | |
134 | 146 | if(CollectionUtils.isNotEmpty(antExRecordModels2)){ |
135 | 147 | AntExRecordModel antExRecordModel= antExRecordModels2.get(0); |
136 | 148 | if(null!=antExRecordModel){ |
137 | 149 | if(2==antExRecordModel.getType()){ //初诊 |
138 | 150 | Criteria criteriaf= Criteria.where("id").is(antExRecordModel.getfId()); |
139 | 151 | AntExChuModel AntExChu = mongoTemplate.findOne(Query.query(criteriaf), AntExChuModel.class); |
152 | +// System.out.println(Query.query(criteriaf).toString()+"--------------7"); | |
140 | 153 | initQueryMapqhdky.put("cweight", null!=AntExChu?null!=AntExChu.getWeight()?AntExChu.getWeight().toString():"":""); |
141 | 154 | }else { //复诊 |
142 | 155 | Criteria criteriaf= Criteria.where("id").is(antExRecordModel.getfId()); |
143 | 156 | AntenatalExaminationModel AntExFu = mongoTemplate.findOne(Query.query(criteriaf), AntenatalExaminationModel.class); |
157 | +// System.out.println(Query.query(criteriaf).toString()+"--------------8"); | |
144 | 158 | initQueryMapqhdky.put("cweight", null!=AntExFu?null!=AntExFu.getWeight()?AntExFu.getWeight().toString():"":""); |
145 | 159 | } |
146 | 160 | }else { |
147 | 161 | |
148 | 162 | |
... | ... | @@ -222,11 +236,16 @@ |
222 | 236 | antExRecordQuery3.setcDueWeekStart(168); |
223 | 237 | antExRecordQuery3.setcDueWeekEnd(196); |
224 | 238 | antExRecordQuery3.setType(1);//复诊 |
239 | + antExRecordQuery3.setNeed("yse"); | |
240 | + antExRecordQuery3.setPage(1); | |
241 | + antExRecordQuery3.setLimit(1); | |
225 | 242 | List<AntExRecordModel> antExRecordModels3 = recordService.queryAntExRecords(antExRecordQuery3, Sort.Direction.ASC,"checkTime"); |
243 | +// System.out.println(antExRecordQuery3.convertToQuery().convertToMongoQuery().toString()+"--------------9"); | |
226 | 244 | if(CollectionUtils.isNotEmpty(antExRecordModels3)) { |
227 | 245 | AntExRecordModel antExRecordModel = antExRecordModels3.get(0); |
228 | 246 | Criteria criteriaf= Criteria.where("id").is(antExRecordModel.getfId()); |
229 | 247 | AntenatalExaminationModel AntExFu = mongoTemplate.findOne(Query.query(criteriaf), AntenatalExaminationModel.class); |
248 | +// System.out.println(Query.query(criteriaf).toString()+"--------------10"); | |
230 | 249 | if(null!=AntExFu){ |
231 | 250 | initQueryMapqhdky.put("bloodSugarKf", StringUtils.isNotEmpty(AntExFu.getBloodSugarKf())?AntExFu.getBloodSugarKf():""); |
232 | 251 | initQueryMapqhdky.put("bloodSugar1h", StringUtils.isNotEmpty(AntExFu.getBloodSugar1h())?AntExFu.getBloodSugar1h():""); |
233 | 252 | |
... | ... | @@ -276,11 +295,11 @@ |
276 | 295 | } |
277 | 296 | } |
278 | 297 | initQueryMapqhdky.put("babyWeight", StringUtils.isNotEmpty(weight)?weight.substring(0,weight.length()-1):weight); |
279 | - initQueryMapqhdky.put("", ""); | |
298 | + initQueryMapqhdky.put("xsext", "");//新生儿血糖 | |
280 | 299 | initQueryMapqhdky.put("apgarScore", StringUtils.isNotEmpty(apgarScore)?apgarScore.substring(0,apgarScore.length()-1):apgarScore); |
281 | 300 | }else { |
282 | 301 | initQueryMapqhdky.put("babyWeight", ""); |
283 | - initQueryMapqhdky.put("", ""); | |
302 | + initQueryMapqhdky.put("xsext", "");//新生儿血糖 | |
284 | 303 | initQueryMapqhdky.put("apgarScore", ""); |
285 | 304 | } |
286 | 305 | |
... | ... | @@ -322,7 +341,7 @@ |
322 | 341 | initQueryMapqhdky.put("ctgab", ""); |
323 | 342 | initQueryMapqhdky.put("ctpoab", ""); |
324 | 343 | initQueryMapqhdky.put("babyWeight", ""); |
325 | - initQueryMapqhdky.put("", ""); | |
344 | + initQueryMapqhdky.put("xsext", ""); | |
326 | 345 | initQueryMapqhdky.put("apgarScore", ""); |
327 | 346 | } |
328 | 347 | date.add(initQueryMapqhdky); |