Commit 58fecec38bb729035769ef9fba48a25f6dad2256
1 parent
92d9d5ba24
Exists in
master
and in
1 other branch
预产期管理 修改buildType!=1并且type=3
Showing 2 changed files with 41 additions and 9 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
58fecec
... | ... | @@ -301,12 +301,14 @@ |
301 | 301 | * 1:孕妇,2:儿童 |
302 | 302 | */ |
303 | 303 | private Integer type = -1; |
304 | + private List<Integer> typeList; | |
304 | 305 | |
305 | 306 | private String hospitalId; |
306 | 307 | |
307 | 308 | private String hcertificateNum; |
308 | 309 | |
309 | 310 | private Integer buildType = -1; |
311 | + private Integer buildTypeNot = -1; | |
310 | 312 | |
311 | 313 | private List<Integer> buildTypeList; |
312 | 314 | |
313 | 315 | |
... | ... | @@ -435,7 +437,14 @@ |
435 | 437 | this.buildType = buildType; |
436 | 438 | } |
437 | 439 | |
440 | + public Integer getBuildTypeNot() { | |
441 | + return buildTypeNot; | |
442 | + } | |
438 | 443 | |
444 | + public void setBuildTypeNot(Integer buildTypeNot) { | |
445 | + this.buildTypeNot = buildTypeNot; | |
446 | + } | |
447 | + | |
439 | 448 | public Integer getBuildTypeEq() { |
440 | 449 | return buildTypeEq; |
441 | 450 | } |
... | ... | @@ -540,6 +549,14 @@ |
540 | 549 | this.type = type; |
541 | 550 | } |
542 | 551 | |
552 | + public List<Integer> getTypeList() { | |
553 | + return typeList; | |
554 | + } | |
555 | + | |
556 | + public void setTypeList(List<Integer> typeList) { | |
557 | + this.typeList = typeList; | |
558 | + } | |
559 | + | |
543 | 560 | public String getCardNo() { |
544 | 561 | return cardNo; |
545 | 562 | } |
546 | 563 | |
... | ... | @@ -727,7 +744,11 @@ |
727 | 744 | condition = condition.and("buildType", buildTypeEq, MongoOper.IS); |
728 | 745 | } |
729 | 746 | |
747 | + if(buildTypeNot!=null){ | |
748 | + condition = condition.and("buildType", buildTypeNot, MongoOper.NE); | |
749 | + } | |
730 | 750 | |
751 | + | |
731 | 752 | if (bookbuildingDoctor != null) { |
732 | 753 | condition = condition.and("bookbuildingDoctor", bookbuildingDoctor, MongoOper.IS); |
733 | 754 | } |
... | ... | @@ -867,6 +888,9 @@ |
867 | 888 | //去掉type为3 的情况 |
868 | 889 | if (type != null && -1 != type) { |
869 | 890 | condition = condition.and("type", type, MongoOper.IS); |
891 | + } | |
892 | + if(typeList!=null&&typeList.size()>0){ | |
893 | + condition = condition.and("type",typeList,MongoOper.IN); | |
870 | 894 | } |
871 | 895 | if(null!=postViewTimes){ |
872 | 896 | if(gtePostTimes){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PredictedStatisticsFacade.java
View file @
58fecec
... | ... | @@ -70,12 +70,16 @@ |
70 | 70 | patientsQuery.setNeed(YnEnums.YES.name()); |
71 | 71 | patientsQuery.setYn(YnEnums.YES.getId()); |
72 | 72 | patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(predictedStatisticsRequest.getOperatorId())); |
73 | - patientsQuery.setType(1); | |
73 | + List<Integer> typeList = new ArrayList<>(); | |
74 | + typeList.add(1); | |
75 | + typeList.add(3); | |
76 | + patientsQuery.setTypeList(typeList); | |
74 | 77 | patientsQuery.setSort("dueDate"); |
75 | 78 | String doctorId = predictedStatisticsRequest.getDoctorId(); |
76 | 79 | if (!StringUtils.isEmpty(doctorId)) { |
77 | 80 | patientsQuery.setLastCheckEmployeeId(doctorId); |
78 | 81 | } |
82 | + patientsQuery.setBuildTypeNot(1); | |
79 | 83 | // 查列表 |
80 | 84 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
81 | 85 | List<PredictedStatisticsQueryModel> predictedStatisticsQueryModelList = new ArrayList<>(); |
82 | 86 | |
... | ... | @@ -109,19 +113,23 @@ |
109 | 113 | // List<PredictedStatisticsCountModel> predictedStatisticsCountModelList = patientsService.predictedStatistics(); |
110 | 114 | List<PredictedStatisticsCountModel> predictedStatisticsCountModelList = new ArrayList<>(); |
111 | 115 | Date date = new Date(); |
116 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
117 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
118 | + List<Integer> typeList = new ArrayList<>(); | |
119 | + typeList.add(1); | |
120 | + typeList.add(3); | |
121 | + patientsQuery.setTypeList(typeList); | |
122 | + patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(predictedStatisticsRequest.getOperatorId())); | |
123 | + String doctorId = predictedStatisticsRequest.getDoctorId(); | |
124 | + if (!StringUtils.isEmpty(doctorId)) { | |
125 | + patientsQuery.setLastCheckEmployeeId(doctorId); | |
126 | + } | |
127 | + patientsQuery.setBuildTypeNot(1); | |
112 | 128 | for (int i = 0; i < 10; i++) { |
113 | 129 | Date temp = DateUtil.addMonth(date, i); |
114 | 130 | System.out.println(temp); |
115 | 131 | Date startDate = DateUtil.getMonthStart(temp); |
116 | 132 | Date endDate = DateUtil.getMonthEndTime(temp); |
117 | - PatientsQuery patientsQuery = new PatientsQuery(); | |
118 | - String doctorId = predictedStatisticsRequest.getDoctorId(); | |
119 | - patientsQuery.setYn(YnEnums.YES.getId()); | |
120 | - patientsQuery.setType(1); | |
121 | - patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(predictedStatisticsRequest.getOperatorId())); | |
122 | - if (!StringUtils.isEmpty(doctorId)) { | |
123 | - patientsQuery.setLastCheckEmployeeId(doctorId); | |
124 | - } | |
125 | 133 | patientsQuery.setDueDateStart(startDate); |
126 | 134 | patientsQuery.setDueDateEnd(endDate); |
127 | 135 | int count = patientsService.queryPatientCount(patientsQuery); |