Commit c4f0da1b4b3156cf84982381d340126a46024e7e
1 parent
a5aa5e9a7b
Exists in
dev
#fix:优化孕妇学校-课程发布管理新增类型字段,优化预约建档医生查询显示
Showing 9 changed files with 58 additions and 14 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBloodPressureDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BloodPressureDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BloodPressureService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/CourseModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CourseRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/CourseResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBloodPressureDao.java
View file @
c4f0da1
1 | 1 | package com.lyms.platform.biz.dal; |
2 | 2 | |
3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
3 | 4 | import com.lyms.platform.pojo.BloodPressure; |
4 | 5 | import org.springframework.data.mongodb.core.query.Query; |
5 | 6 | |
7 | +import java.util.List; | |
8 | + | |
6 | 9 | /** |
7 | 10 | * 血压 |
8 | 11 | */ |
... | ... | @@ -11,6 +14,8 @@ |
11 | 14 | void add(BloodPressure bloodPressure); |
12 | 15 | |
13 | 16 | void updateXy(Query query, BloodPressure bloodPressure); |
17 | + | |
18 | + List<BloodPressure> query(MongoQuery query); | |
14 | 19 | |
15 | 20 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BloodPressureDaoImpl.java
View file @
c4f0da1
... | ... | @@ -2,10 +2,13 @@ |
2 | 2 | |
3 | 3 | import com.lyms.platform.biz.dal.IBloodPressureDao; |
4 | 4 | import com.lyms.platform.common.dao.BaseMongoDAOImpl; |
5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
5 | 6 | import com.lyms.platform.pojo.BloodPressure; |
6 | 7 | import org.springframework.data.mongodb.core.query.Query; |
7 | 8 | import org.springframework.stereotype.Repository; |
8 | 9 | |
10 | +import java.util.List; | |
11 | + | |
9 | 12 | @Repository |
10 | 13 | public class BloodPressureDaoImpl extends BaseMongoDAOImpl<BloodPressure> implements IBloodPressureDao { |
11 | 14 | |
... | ... | @@ -17,6 +20,11 @@ |
17 | 20 | @Override |
18 | 21 | public void updateXy(Query query, BloodPressure bloodPressure) { |
19 | 22 | update(query, bloodPressure); |
23 | + } | |
24 | + | |
25 | + @Override | |
26 | + public List<BloodPressure> query(MongoQuery query) { | |
27 | + return find(query.convertToMongoQuery()); | |
20 | 28 | } |
21 | 29 | |
22 | 30 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BloodPressureService.java
View file @
c4f0da1
... | ... | @@ -2,12 +2,17 @@ |
2 | 2 | |
3 | 3 | |
4 | 4 | import com.lyms.platform.biz.dal.IBloodPressureDao; |
5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
5 | 6 | import com.lyms.platform.pojo.BloodPressure; |
7 | +import com.lyms.platform.query.BloodPressureQuery; | |
6 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
9 | +import org.springframework.data.domain.Sort; | |
7 | 10 | import org.springframework.data.mongodb.core.query.Criteria; |
8 | 11 | import org.springframework.data.mongodb.core.query.Query; |
9 | 12 | import org.springframework.stereotype.Service; |
10 | 13 | |
14 | +import java.util.List; | |
15 | + | |
11 | 16 | @Service |
12 | 17 | public class BloodPressureService { |
13 | 18 | |
... | ... | @@ -20,6 +25,12 @@ |
20 | 25 | |
21 | 26 | public void update(BloodPressure bloodPressure) { |
22 | 27 | bloodPressureDao.updateXy(Query.query(Criteria.where("id").is(bloodPressure.getId())), bloodPressure); |
28 | + } | |
29 | + | |
30 | + public List<BloodPressure> getList(BloodPressureQuery bloodPressureQuery){ | |
31 | + MongoQuery query = bloodPressureQuery.convertToQuery(); | |
32 | + query.addOrder(Sort.Direction.DESC, "id"); | |
33 | + return bloodPressureDao.query(query); | |
23 | 34 | } |
24 | 35 | |
25 | 36 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/CourseModel.java
View file @
c4f0da1
... | ... | @@ -84,13 +84,13 @@ |
84 | 84 | private byte[][] chunks; |
85 | 85 | |
86 | 86 | //听课方式 1线上 2现场 |
87 | - private Integer courseType; | |
87 | + private String courseType; | |
88 | 88 | |
89 | - public Integer getCourseType() { | |
89 | + public String getCourseType() { | |
90 | 90 | return courseType; |
91 | 91 | } |
92 | 92 | |
93 | - public void setCourseType(Integer courseType) { | |
93 | + public void setCourseType(String courseType) { | |
94 | 94 | this.courseType = courseType; |
95 | 95 | } |
96 | 96 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
View file @
c4f0da1
... | ... | @@ -26,7 +26,9 @@ |
26 | 26 | import com.lyms.platform.operate.web.vo.ArchiveAreas; |
27 | 27 | import com.lyms.platform.operate.web.vo.ArchiveHistoryDTO; |
28 | 28 | import com.lyms.platform.operate.web.vo.ArchiveUsers; |
29 | +import com.lyms.platform.permission.model.Users; | |
29 | 30 | import com.lyms.platform.permission.service.AssistBuildService; |
31 | +import com.lyms.platform.permission.service.UsersService; | |
30 | 32 | import com.lyms.platform.pojo.*; |
31 | 33 | import com.lyms.platform.query.ArchiveDataQuery; |
32 | 34 | import com.lyms.platform.query.GuidelinesQuery; |
... | ... | @@ -79,6 +81,8 @@ |
79 | 81 | |
80 | 82 | @Autowired |
81 | 83 | private BookbuildingFacade bookbuildingFacade; |
84 | + @Autowired | |
85 | + private UsersService usersService; | |
82 | 86 | |
83 | 87 | private static final long TIMES = 24 * 60 * 60 * 1000 - 1; |
84 | 88 | |
85 | 89 | |
... | ... | @@ -259,11 +263,17 @@ |
259 | 263 | String assistUser = ""; |
260 | 264 | if (StringUtils.isNotEmpty(archiveData.getAssistUserId())) |
261 | 265 | { |
262 | - param.put("id", archiveData.getAssistUserId()); | |
263 | - List<AssistBuildUserModel> userModels = assistBuildService.queryAssistBuildUsers(param); | |
264 | - if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(userModels)) { | |
265 | - assistUser = userModels.get(0).getUserName(); | |
266 | + if ("2100002419".equals(hospitalId)){ | |
267 | + Users users = usersService.getUsers(Integer.valueOf(archiveData.getAssistUserId())); | |
268 | + assistUser=users.getName(); | |
269 | + }else { | |
270 | + param.put("id", archiveData.getAssistUserId()); | |
271 | + List<AssistBuildUserModel> userModels = assistBuildService.queryAssistBuildUsers(param); | |
272 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(userModels)) { | |
273 | + assistUser = userModels.get(0).getUserName(); | |
274 | + } | |
266 | 275 | } |
276 | + | |
267 | 277 | } |
268 | 278 | map.put("assistUser", assistUser); |
269 | 279 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
c4f0da1
... | ... | @@ -595,11 +595,11 @@ |
595 | 595 | |
596 | 596 | if (CollectionUtils.isNotEmpty(list)) { |
597 | 597 | Patients patients = new Patients(); |
598 | - if (list.get(0).getAssistUserId() != null && tempP.getId() != null) { | |
598 | + if (StringUtils.isNotEmpty(list.get(0).getAssistUserId()) && StringUtils.isNotEmpty(tempP.getId())) { | |
599 | 599 | patients.setAssistUserId(list.get(0).getAssistUserId()); |
600 | 600 | }else { |
601 | - patients.setAssistUserId(patients.getLastCheckEmployeeId()); | |
602 | - archiveData.setAssistUserId(patients.getLastCheckEmployeeId()); | |
601 | + patients.setAssistUserId(tempP.getBookbuildingDoctor()); | |
602 | + archiveData.setAssistUserId(tempP.getBookbuildingDoctor()); | |
603 | 603 | } |
604 | 604 | yunBookbuildingService.updatePregnant(patients, tempP.getId()); |
605 | 605 | archiveDataServicer.update(archiveData); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java
View file @
c4f0da1
... | ... | @@ -254,7 +254,7 @@ |
254 | 254 | result.setCreated(DateUtil.getyyyy_MM_dd_hms(model.getCreated())); |
255 | 255 | result.setCourseObj(model.getCourseObjId() == null ? "全部" : CourseStatusEnums.CourseObjEnums.getNameById(model.getCourseObjId())); |
256 | 256 | result.setCourseObjId(model.getCourseObjId() == null ? 0 : model.getCourseObjId()); |
257 | - | |
257 | + result.setType(model.getCourseType()); | |
258 | 258 | results.add(result); |
259 | 259 | } |
260 | 260 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CourseRequest.java
View file @
c4f0da1
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | //课程地址 |
18 | 18 | private String courseAddress; |
19 | 19 | //听课方式 1线上 2现场 |
20 | - private Integer courseType; | |
20 | + private String courseType; | |
21 | 21 | |
22 | 22 | //课程时间 |
23 | 23 | private String courseTime; |
24 | 24 | |
... | ... | @@ -45,11 +45,11 @@ |
45 | 45 | |
46 | 46 | private String courseVideo; |
47 | 47 | |
48 | - public Integer getCourseType() { | |
48 | + public String getCourseType() { | |
49 | 49 | return courseType; |
50 | 50 | } |
51 | 51 | |
52 | - public void setCourseType(Integer courseType) { | |
52 | + public void setCourseType(String courseType) { | |
53 | 53 | this.courseType = courseType; |
54 | 54 | } |
55 | 55 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/CourseResult.java
View file @
c4f0da1
... | ... | @@ -62,6 +62,16 @@ |
62 | 62 | |
63 | 63 | private String courseVideo; |
64 | 64 | |
65 | + private String type; | |
66 | + | |
67 | + public String getType() { | |
68 | + return type; | |
69 | + } | |
70 | + | |
71 | + public void setType(String type) { | |
72 | + this.type = type; | |
73 | + } | |
74 | + | |
65 | 75 | public String getCourseVideo() { |
66 | 76 | return courseVideo; |
67 | 77 | } |