Commit 82e7433aebabe78819876672b975caf3796bf32a
Exists in
master
Merge remote-tracking branch 'origin/master'
Showing 5 changed files
- platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
platform-dal/src/main/java/com/lyms/platform/query/AntExRecordQuery.java
View file @
82e7433
... | ... | @@ -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 | } |
... | ... | @@ -187,6 +226,9 @@ |
187 | 226 | if (StringUtils.isNotEmpty(levelId)) { |
188 | 227 | condition = condition.and("hLevel", levelId, MongoOper.IN); |
189 | 228 | } |
229 | + if (StringUtils.isNotEmpty(rFactor)) { | |
230 | + condition = condition.and("hRisk", rFactor, MongoOper.IN); | |
231 | + } | |
190 | 232 | if (null != status) { |
191 | 233 | condition = condition.and("status", status, MongoOper.IS); |
192 | 234 | } |
... | ... | @@ -236,6 +278,23 @@ |
236 | 278 | c = Criteria.where("dueDate").lte(dueDateEnd); |
237 | 279 | } |
238 | 280 | } |
281 | + | |
282 | + if (null != checkTimeStart) { | |
283 | + if (null != c) { | |
284 | + c = c.and("checkTime").gte(checkTimeStart); | |
285 | + } else { | |
286 | + c = Criteria.where("checkTime").gte(checkTimeStart); | |
287 | + } | |
288 | + } | |
289 | + | |
290 | + if (null != checkTimeEnd) { | |
291 | + if (null != c) { | |
292 | + c = c.lte(checkTimeEnd); | |
293 | + } else { | |
294 | + c = Criteria.where("checkTime").lte(checkTimeEnd); | |
295 | + } | |
296 | + } | |
297 | + | |
239 | 298 | |
240 | 299 | if (null != c) { |
241 | 300 | condition = condition.andCondition(new MongoCondition(c)); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
82e7433
... | ... | @@ -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()); |
... | ... | @@ -218,7 +252,7 @@ |
218 | 252 | data.add(antExManagerResult); |
219 | 253 | } |
220 | 254 | } |
221 | - return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
255 | + return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(antExRecordQuery.getPageInfo()); | |
222 | 256 | } |
223 | 257 | |
224 | 258 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
82e7433
... | ... | @@ -101,6 +101,8 @@ |
101 | 101 | patients.setBookbuildingDoctor(userId + ""); |
102 | 102 | patients.setEnable("2"); |
103 | 103 | patients.setBookbuildingDate(new Date()); |
104 | + patients.setVcCardNo(null); | |
105 | + patients.setFileCode(null); | |
104 | 106 | patientsService.addPatient(patients); |
105 | 107 | return patients.getId(); |
106 | 108 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
82e7433
... | ... | @@ -2282,7 +2282,23 @@ |
2282 | 2282 | map.put("age",StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), checkModel.getCheckDate()))); //检查月龄 |
2283 | 2283 | map.put("height",checkModel.getHeight()); //身长 |
2284 | 2284 | map.put("weight", checkModel.getWeight()); //体重 |
2285 | - map.put("growthEvaluate",checkModel.getGrowthEvaluate()); //体格发育评价 | |
2285 | + StringBuffer sb = new StringBuffer(); | |
2286 | + if (StringUtils.isNotEmpty(checkModel.getGrowthEvaluate())) | |
2287 | + { | |
2288 | + List<String> items = JsonUtil.toList(checkModel.getGrowthEvaluate(),String.class); | |
2289 | + if (CollectionUtils.isNotEmpty(items)) | |
2290 | + { | |
2291 | + for(int i = 0 ; i < items.size() ; i++) | |
2292 | + { | |
2293 | + sb.append(items.get(i)); | |
2294 | + if (items.size() -1 != i) | |
2295 | + { | |
2296 | + sb.append(","); | |
2297 | + } | |
2298 | + } | |
2299 | + } | |
2300 | + } | |
2301 | + map.put("growthEvaluate",sb.toString()); //体格发育评价 | |
2286 | 2302 | map.put("checkDate",StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(checkModel.getCheckDate()))); |
2287 | 2303 | String checkDoctorId = checkModel.getCheckDoctor() ; |
2288 | 2304 | String checkDoctor = ""; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
82e7433
... | ... | @@ -95,6 +95,10 @@ |
95 | 95 | postReviewModel.setOperator(userId); |
96 | 96 | //判断是否是同一个医院 |
97 | 97 | if (!patients1.getHospitalId().equals(hospital)) { |
98 | + | |
99 | + if(StringUtils.isNotEmpty(groupId)){ | |
100 | + patients1.setEnable("2"); | |
101 | + } | |
98 | 102 | patients1.setId(null); |
99 | 103 | patients1.setHospitalId(hospital); |
100 | 104 | patients1.setBuildType(0); |