Commit be797c186d6cfcdef0b2a54ef9e9d996fb363283
1 parent
8d70e7286a
Exists in
master
and in
1 other branch
产前诊断条件查询
Showing 2 changed files with 34 additions and 7 deletions
platform-dal/src/main/java/com/lyms/platform/query/DiagnosisQuery.java
View file @
be797c1
... | ... | @@ -39,8 +39,16 @@ |
39 | 39 | private Date resultDateEnd;//诊断出具结束时间 |
40 | 40 | private String specimenNo;//标本号 |
41 | 41 | private String collectHospitalId;//申请医院 |
42 | + private List<String> parentIdList;//孕妇ID集合 | |
42 | 43 | |
44 | + public List<String> getParentIdList() { | |
45 | + return parentIdList; | |
46 | + } | |
43 | 47 | |
48 | + public void setParentIdList(List<String> parentIdList) { | |
49 | + this.parentIdList = parentIdList; | |
50 | + } | |
51 | + | |
44 | 52 | public String getId() { |
45 | 53 | return id; |
46 | 54 | } |
... | ... | @@ -243,6 +251,9 @@ |
243 | 251 | if(null != diaStatus2){ |
244 | 252 | condition = condition.and("diaStatus", diaStatus2, MongoOper.IN); |
245 | 253 | } |
254 | + if(null != parentIdList){ | |
255 | + condition = condition.and("parentId", parentIdList, MongoOper.IN); | |
256 | + } | |
246 | 257 | |
247 | 258 | Criteria c = null; |
248 | 259 | if(null != applyDateStart && null != applyDateEnd){ |
... | ... | @@ -262,6 +273,7 @@ |
262 | 273 | c = Criteria.where("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); |
263 | 274 | } |
264 | 275 | } |
276 | + | |
265 | 277 | if (StringUtils.isNotEmpty(queryNo)) { |
266 | 278 | MongoCondition c1 = MongoCondition.newInstance(); |
267 | 279 | MongoCondition con1 = MongoCondition.newInstance("name", queryNo, MongoOper.LIKE); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DiagnosisFacaed.java
View file @
be797c1
... | ... | @@ -264,23 +264,40 @@ |
264 | 264 | */ |
265 | 265 | public DiagnosisManagerResult queryDiagnosisList(DiagnosisAddRequest dataresult,Integer userId){ |
266 | 266 | DiagnosisManagerResult diagnosisManagerResult = new DiagnosisManagerResult(); |
267 | + List<String> pList = new ArrayList<String>(); | |
267 | 268 | String hospital = autoMatchFacade.getHospitalId(userId); |
268 | 269 | dataresult.setHospitalId(hospital); |
269 | 270 | DiagnosisQuery diagnosisQuery = new DiagnosisQuery(); |
270 | 271 | List<Map<String,String>> mList = new ArrayList<Map<String,String>>(); |
272 | + if(null != dataresult.getQueryNo()){ | |
273 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
274 | + patientsQuery.setQueryNo(dataresult.getQueryNo()); | |
275 | + patientsQuery.setHospitalId(hospital); | |
276 | + List<Patients> list = patientsService.queryPatient(patientsQuery); | |
277 | + if(list != null && list.size() > 0){ | |
278 | + for(Patients patient : list){ | |
279 | + pList.add(patient.getId()); | |
280 | + } | |
281 | + }else{ | |
282 | + return diagnosisManagerResult; | |
283 | + } | |
284 | + } | |
285 | + if(pList != null && pList.size() > 0){ | |
286 | + diagnosisQuery.setParentIdList(pList); | |
287 | + } | |
271 | 288 | if(null != dataresult.getDiaResult()){ |
272 | 289 | diagnosisQuery.setDiaResult(dataresult.getDiaResult()); |
273 | 290 | } |
274 | - if(null != dataresult.getApplyWeekStart()){ | |
291 | + if (null != dataresult.getApplyWeekStart()){ | |
275 | 292 | diagnosisQuery.setApplyWeeksStart(7 * Integer.valueOf(dataresult.getApplyWeekStart())); |
276 | 293 | } |
277 | - if(null != dataresult.getApplyWeekEnd()){ | |
294 | + if (null != dataresult.getApplyWeekEnd()){ | |
278 | 295 | diagnosisQuery.setApplyWeeksEnd(7 * Integer.valueOf(dataresult.getApplyWeekEnd()) + 6); |
279 | 296 | } |
280 | - if(null != dataresult.getNowWeeksStart()){ | |
297 | + if (null != dataresult.getNowWeeksStart()) { | |
281 | 298 | diagnosisQuery.setLastMensesEnd(DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(dataresult.getNowWeeksStart() * 7))); |
282 | 299 | } |
283 | - if(null != dataresult.getNowWeeksEnd()){ | |
300 | + if (null != dataresult.getNowWeeksEnd()) { | |
284 | 301 | diagnosisQuery.setLastMensesStart(DateUtil.addDay(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date())), -(dataresult.getNowWeeksEnd() * 7) - 6)); |
285 | 302 | } |
286 | 303 | if(null != dataresult.getDiaStatus()){ |
... | ... | @@ -289,9 +306,7 @@ |
289 | 306 | if(null != dataresult.getRsResult()){ |
290 | 307 | diagnosisQuery.setRsResult(dataresult.getRsResult()); |
291 | 308 | } |
292 | - if(null != dataresult.getQueryNo()){ | |
293 | - diagnosisQuery.setQueryNo(dataresult.getQueryNo()); | |
294 | - } | |
309 | + | |
295 | 310 | if(StringUtils.isNotEmpty(dataresult.getApplyDate())){ |
296 | 311 | String[] dates = dataresult.getApplyDate().split(" - "); |
297 | 312 | diagnosisQuery.setApplyDateStart(DateUtil.parseYMD(dates[0])); |