Commit e4e84a4dc515094a4115bfe2e19ed43e11649fd3
1 parent
14e6efa602
Exists in
master
and in
7 other branches
1
Showing 2 changed files with 99 additions and 9 deletions
platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
View file @
e4e84a4
... | ... | @@ -21,7 +21,16 @@ |
21 | 21 | private String name; |
22 | 22 | private String cardNo; |
23 | 23 | private String phone; |
24 | + private String barCode; | |
24 | 25 | |
26 | + public String getBarCode() { | |
27 | + return barCode; | |
28 | + } | |
29 | + | |
30 | + public void setBarCode(String barCode) { | |
31 | + this.barCode = barCode; | |
32 | + } | |
33 | + | |
25 | 34 | public String getName() { |
26 | 35 | return name; |
27 | 36 | } |
28 | 37 | |
... | ... | @@ -52,10 +61,24 @@ |
52 | 61 | //孕妇状态 |
53 | 62 | private Integer status; |
54 | 63 | private String levelId; |
64 | + private String rFactor; | |
65 | + | |
66 | + public String getrFactor() { | |
67 | + return rFactor; | |
68 | + } | |
69 | + | |
70 | + public void setrFactor(String rFactor) { | |
71 | + this.rFactor = rFactor; | |
72 | + } | |
73 | + | |
55 | 74 | //产检医生id |
56 | 75 | private String cId; |
57 | 76 | private Date buildTimeStart; |
58 | 77 | private Date buildTimeEnd; |
78 | + | |
79 | + private Date checkTimeStart; | |
80 | + private Date checkTimeEnd; | |
81 | + | |
59 | 82 | private Date dueDateStart; |
60 | 83 | private Date dueDateEnd; |
61 | 84 | //大于修改时间 |
... | ... | @@ -63,6 +86,22 @@ |
63 | 86 | private Date gteCreated; |
64 | 87 | private String pid; |
65 | 88 | |
89 | + public Date getCheckTimeStart() { | |
90 | + return checkTimeStart; | |
91 | + } | |
92 | + | |
93 | + public void setCheckTimeStart(Date checkTimeStart) { | |
94 | + this.checkTimeStart = checkTimeStart; | |
95 | + } | |
96 | + | |
97 | + public Date getCheckTimeEnd() { | |
98 | + return checkTimeEnd; | |
99 | + } | |
100 | + | |
101 | + public void setCheckTimeEnd(Date checkTimeEnd) { | |
102 | + this.checkTimeEnd = checkTimeEnd; | |
103 | + } | |
104 | + | |
66 | 105 | public List getHospitalList() { |
67 | 106 | return hospitalList; |
68 | 107 | } |
... | ... | @@ -236,6 +275,23 @@ |
236 | 275 | c = Criteria.where("dueDate").lte(dueDateEnd); |
237 | 276 | } |
238 | 277 | } |
278 | + | |
279 | + if (null != checkTimeStart) { | |
280 | + if (null != c) { | |
281 | + c = c.and("checkTime").gte(checkTimeStart); | |
282 | + } else { | |
283 | + c = Criteria.where("checkTime").gte(checkTimeStart); | |
284 | + } | |
285 | + } | |
286 | + | |
287 | + if (null != checkTimeEnd) { | |
288 | + if (null != c) { | |
289 | + c = c.lte(checkTimeEnd); | |
290 | + } else { | |
291 | + c = Criteria.where("checkTime").lte(checkTimeEnd); | |
292 | + } | |
293 | + } | |
294 | + | |
239 | 295 | |
240 | 296 | if (null != c) { |
241 | 297 | condition = condition.andCondition(new MongoCondition(c)); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
e4e84a4
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | * @param antExManagerQueryRequest |
71 | 71 | * @param isRegion |
72 | 72 | */ |
73 | - private AntExRecordQuery complayRequest(Integer userId,AntExManagerQueryRequest antExManagerQueryRequest,boolean isRegion){ | |
73 | + private AntExRecordQuery complayRequest(Integer userId, AntExManagerQueryRequest antExManagerQueryRequest, boolean isRegion) { | |
74 | 74 | |
75 | 75 | AntExRecordQuery antExRecordQuery = new AntExRecordQuery(); |
76 | 76 | antExRecordQuery.setNeed("1"); |
77 | 77 | |
78 | 78 | |
... | ... | @@ -78,14 +78,48 @@ |
78 | 78 | antExRecordQuery.setLimit(antExManagerQueryRequest.getLimit()); |
79 | 79 | antExRecordQuery.setName(antExManagerQueryRequest.getName()); |
80 | 80 | antExRecordQuery.setPhone(antExManagerQueryRequest.getPhone()); |
81 | + antExRecordQuery.setrFactor(antExManagerQueryRequest.getRiskFactorId()); | |
82 | + antExRecordQuery.setLevelId(antExManagerQueryRequest.getLevel()); | |
83 | + antExRecordQuery.setBarCode(antExManagerQueryRequest.getBarCode()); | |
81 | 84 | |
85 | + //产检日期 | |
86 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExManagerQueryRequest.getcTime())) { | |
87 | + String nextDateStr = antExManagerQueryRequest.getcTime(); | |
88 | + String[] dates = nextDateStr.split(" - "); | |
89 | + | |
90 | + antExRecordQuery.setCheckTimeStart(DateUtil.parseYMD(dates[0])); | |
91 | + if (dates.length == 2) { | |
92 | + antExRecordQuery.setCheckTimeEnd(DateUtil.parseYMD(dates[1])); | |
93 | + } | |
94 | + } | |
95 | + //建档日期 | |
96 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExManagerQueryRequest.getbTime())) { | |
97 | + String nextDateStr = antExManagerQueryRequest.getbTime(); | |
98 | + String[] dates = nextDateStr.split(" - "); | |
99 | + antExRecordQuery.setBuildTimeStart(DateUtil.parseYMD(dates[0])); | |
100 | + if (dates.length == 2) { | |
101 | + antExRecordQuery.setBuildTimeEnd(DateUtil.parseYMD(dates[1])); | |
102 | + } | |
103 | + } | |
104 | + | |
105 | + | |
106 | + //预产期 | |
107 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(antExManagerQueryRequest.getDueTime())) { | |
108 | + String nextDateStr = antExManagerQueryRequest.getDueTime(); | |
109 | + String[] dates = nextDateStr.split(" - "); | |
110 | + antExRecordQuery.setDueDateStart(DateUtil.parseYMD(dates[0])); | |
111 | + if (dates.length == 2) { | |
112 | + antExRecordQuery.setDueDateEnd(DateUtil.parseYMD(dates[1])); | |
113 | + } | |
114 | + } | |
115 | + | |
82 | 116 | //区域范围内孕妇 |
83 | 117 | if (isRegion) { |
84 | 118 | List<String> hospitalList = null; |
85 | 119 | //王平说的 必须要给区域医院权限,不然他就是蠢逼 201611124 16:41 |
86 | 120 | hospitalList = new ArrayList<>(); |
87 | 121 | String hospital = autoMatchFacade.getHospitalId(userId); |
88 | - if(null!=hospital){ | |
122 | + if (null != hospital) { | |
89 | 123 | hospitalList.add(hospital); |
90 | 124 | } |
91 | 125 | DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); |
... | ... | @@ -140,8 +174,8 @@ |
140 | 174 | * |
141 | 175 | * @return |
142 | 176 | */ |
143 | - public BaseResponse findList(AntExManagerQueryRequest antExManagerQueryRequest, Integer userId,boolean isRegion) { | |
144 | - AntExRecordQuery antExRecordQuery =complayRequest(userId,antExManagerQueryRequest,isRegion); | |
177 | + public BaseResponse findList(AntExManagerQueryRequest antExManagerQueryRequest, Integer userId, boolean isRegion) { | |
178 | + AntExRecordQuery antExRecordQuery = complayRequest(userId, antExManagerQueryRequest, isRegion); | |
145 | 179 | String hospital = autoMatchFacade.getHospitalId(userId); |
146 | 180 | List<AntExManagerResult> data = new ArrayList<>(); |
147 | 181 | List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery); |
148 | 182 | |
149 | 183 | |
150 | 184 | |
... | ... | @@ -151,13 +185,13 @@ |
151 | 185 | for (AntExRecordModel e : antExRecordModelList) { |
152 | 186 | AntExManagerResult antExManagerResult = new AntExManagerResult(); |
153 | 187 | antExManagerResult.convertToResult(e); |
154 | - if(isRegion){ | |
188 | + if (isRegion) { | |
155 | 189 | //产检医院 |
156 | - if(StringUtils.isNotEmpty(e.getHospitalId())){ | |
190 | + if (StringUtils.isNotEmpty(e.getHospitalId())) { | |
157 | 191 | Organization org = organizationService.getOrganization(Integer.valueOf(e.getHospitalId())); |
158 | - if(null!=org){ | |
192 | + if (null != org) { | |
159 | 193 | antExManagerResult.setCheckHospital(org.getName()); |
160 | - }else{ | |
194 | + } else { | |
161 | 195 | antExManagerResult.setCheckHospital(e.getHospitalId()); |
162 | 196 | } |
163 | 197 | } |
... | ... | @@ -180,7 +214,7 @@ |
180 | 214 | } |
181 | 215 | //产检医生 |
182 | 216 | if (org.apache.commons.lang.StringUtils.isNotEmpty(e.getCheckDoctor())) { |
183 | - if (NumberUtils.isNumber(e.getBuildDoctor())) { | |
217 | + if (NumberUtils.isNumber(e.getCheckDoctor())) { | |
184 | 218 | Users users = usersService.getUsers(NumberUtils.toInt(e.getCheckDoctor())); |
185 | 219 | if (null != users) { |
186 | 220 | antExManagerResult.setCheckDoctor(users.getName()); |