Commit a29fed85e2afeb904ec330cfdc10996bd0613884
1 parent
b8c596d781
Exists in
master
and in
1 other branch
修改小孩已访视了。显示未访视的问题
Showing 4 changed files with 34 additions and 5 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyVisitDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyVisitDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyVisitService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/VisitFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyVisitDao.java
View file @
a29fed8
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyVisitDaoImpl.java
View file @
a29fed8
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyVisitService.java
View file @
a29fed8
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import java.util.List; |
4 | 4 | |
5 | +import com.lyms.platform.query.VisitQuery; | |
5 | 6 | import org.springframework.beans.factory.annotation.Autowired; |
6 | 7 | import org.springframework.stereotype.Service; |
7 | 8 | import org.springframework.util.Assert; |
... | ... | @@ -36,7 +37,11 @@ |
36 | 37 | MongoCondition condition = MongoCondition.newInstance("parentId", parentId, MongoOper.IS); |
37 | 38 | return iBabyVisitDao.queryBabyVisitWithQuery(condition.toMongoQuery()); |
38 | 39 | } |
39 | - | |
40 | + | |
41 | + | |
42 | + public int queryVisitCount(VisitQuery visitQuery){ | |
43 | + return iBabyVisitDao.queryBabyVisitCount(visitQuery.convertToQuery()); | |
44 | + } | |
40 | 45 | /** |
41 | 46 | * |
42 | 47 | * 根据id查询访视记录 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/VisitFacade.java
View file @
a29fed8
... | ... | @@ -28,6 +28,7 @@ |
28 | 28 | import org.springframework.stereotype.Component; |
29 | 29 | |
30 | 30 | import java.util.ArrayList; |
31 | +import java.util.Collections; | |
31 | 32 | import java.util.Date; |
32 | 33 | import java.util.List; |
33 | 34 | |
34 | 35 | |
35 | 36 | |
... | ... | @@ -244,11 +245,18 @@ |
244 | 245 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
245 | 246 | } |
246 | 247 | |
247 | - public String getFindTips(String parentId) { | |
248 | + public String getFindTips(String parentId,boolean isM) { | |
249 | + | |
248 | 250 | VisitQuery visitQuery = new VisitQuery(); |
249 | 251 | visitQuery.setParentId(parentId); |
252 | + int count =0; | |
253 | + if(isM){ | |
250 | 254 | |
251 | - int count = visitService.queryVisitCount(visitQuery); | |
255 | + count= visitService.queryVisitCount(visitQuery); | |
256 | + }else | |
257 | + { | |
258 | + count=babyVisitService.queryVisitCount(visitQuery); | |
259 | + } | |
252 | 260 | |
253 | 261 | return count <= 0 ? "未访视" : "访视" + count + "次"; |
254 | 262 | } |
... | ... | @@ -266,6 +274,22 @@ |
266 | 274 | } |
267 | 275 | return findBabyVisit(puerperaModel);*/ |
268 | 276 | BabyModel babyModel = findOneBabyByMphone(cardNo); |
277 | + | |
278 | + PatientsQuery patientsQuery =new PatientsQuery(); | |
279 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
280 | + patientsQuery.setType(3); | |
281 | + patientsQuery.setPhone(cardNo); | |
282 | + | |
283 | + List<Patients> patientses = patientsService.queryPatient(patientsQuery); | |
284 | + | |
285 | + if(CollectionUtils.isNotEmpty(patientses)){ | |
286 | + Patients patients = patientses.get(0); | |
287 | + BabyVisitResult babyVisitResult = new BabyVisitResult(); | |
288 | + babyVisitResult.convertToResult1(patients, CommonsHelper.fullAddress(patients, basicConfigService)); | |
289 | + babyVisitResult.setData(Collections.EMPTY_LIST); | |
290 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(babyVisitResult); | |
291 | + } | |
292 | + | |
269 | 293 | if (null == babyModel) { |
270 | 294 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.DEPT_NOT_EXISTS).setErrormsg("新生儿信息不存在"); |
271 | 295 | } |