Commit 2e6a521cff73b6282bbf9b3efcd9d3c04156b9f8
1 parent
823796182b
Exists in
master
and in
7 other branches
修改产检删除
Showing 5 changed files with 49 additions and 56 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ReferralApplyOrderAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
2e6a521
... | ... | @@ -64,6 +64,8 @@ |
64 | 64 | |
65 | 65 | @Autowired |
66 | 66 | private BabyCheckFacade babyCheckFacade; |
67 | + @Autowired | |
68 | + private OrganizationGroupsFacade groupsFacade; | |
67 | 69 | |
68 | 70 | /** |
69 | 71 | * 增加转诊申请 |
70 | 72 | |
... | ... | @@ -79,9 +81,19 @@ |
79 | 81 | PatientsQuery patientsQuery = new PatientsQuery(); |
80 | 82 | patientsQuery.setId(referralApplyOrderModel.getParentId()); |
81 | 83 | |
84 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
85 | + //表示区域的 | |
86 | + if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospital))) { | |
87 | + String parentId = antenatalExaminationFacade.handHideBuild(referralApplyOrderAddRequest.getPid(), referralApplyOrderAddRequest.getParentId(), userId); | |
88 | + if (StringUtils.isEmpty(parentId)) { | |
89 | + //打印日志 | |
90 | + } | |
91 | + referralApplyOrderModel.setParentId(parentId); | |
92 | + referralApplyOrderAddRequest.setParentId(parentId); | |
93 | + } | |
94 | + | |
82 | 95 | ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery(); |
83 | 96 | referralApplyOrderQuery.setParentId(referralApplyOrderModel.getParentId()); |
84 | - String hospital = autoMatchFacade.getHospitalId(userId); | |
85 | 97 | referralApplyOrderQuery.setOutHospitalId(hospital); |
86 | 98 | //如果填写的汉字,并且改医院在我们系统存在则把他转成id |
87 | 99 | if (StringUtils.isNotEmpty(referralApplyOrderModel.getTransferredHospital()) && !NumberUtils.isNumber(referralApplyOrderModel.getTransferredHospital())) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ReferralApplyOrderAddRequest.java
View file @
2e6a521
... | ... | @@ -12,6 +12,10 @@ |
12 | 12 | */ |
13 | 13 | @Form |
14 | 14 | public class ReferralApplyOrderAddRequest implements IBasicRequestConvert<ReferralApplyOrderModel> { |
15 | + | |
16 | + private | |
17 | + String pid; | |
18 | + | |
15 | 19 | @FormParam |
16 | 20 | private String parentId; |
17 | 21 | @FormParam |
... | ... | @@ -29,6 +33,13 @@ |
29 | 33 | @FormParam |
30 | 34 | private String applyDoctor; |
31 | 35 | |
36 | + public String getPid() { | |
37 | + return pid; | |
38 | + } | |
39 | + | |
40 | + public void setPid(String pid) { | |
41 | + this.pid = pid; | |
42 | + } | |
32 | 43 | |
33 | 44 | public String getApplyDoctor() { |
34 | 45 | return applyDoctor; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java
View file @
2e6a521
... | ... | @@ -126,7 +126,7 @@ |
126 | 126 | if (CollectionUtils.isNotEmpty(withList)) { |
127 | 127 | chanResult.setcTimes(withList.size()); |
128 | 128 | if (null != withList.get(0).getNextCheckTime()) { |
129 | - nextCheckTime = DateUtil.getyyyy_MM_dd(withList.get(0).getNextCheckTime()); | |
129 | + nextCheckTime = DateUtil.getyyyy_MM_dd(patients.getNextCheckTime()); | |
130 | 130 | } |
131 | 131 | postReviewQuery.setHospitalId(hospital); |
132 | 132 | |
... | ... | @@ -138,8 +138,8 @@ |
138 | 138 | }else{ |
139 | 139 | chanResult.setcHTimes(withList.size()); |
140 | 140 | } |
141 | - if (StringUtils.isNotEmpty(withList.get(0).getProdDoctor())) { | |
142 | - Users users = usersService.getUsers(NumberUtils.toInt(withList.get(0).getProdDoctor())); | |
141 | + if (StringUtils.isNotEmpty(patients.getLastCheckEmployeeId())) { | |
142 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId())); | |
143 | 143 | if (null != users) { |
144 | 144 | chanResult.setCheckDoctor(users.getName()); |
145 | 145 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
View file @
2e6a521
... | ... | @@ -177,41 +177,41 @@ |
177 | 177 | patientsService.updatePatient(patients1); |
178 | 178 | } |
179 | 179 | |
180 | - nextCheckTime = DateUtil.getyyyy_MM_dd(examinationModels.get(0).getNextCheckTime()); | |
180 | + nextCheckTime = DateUtil.getyyyy_MM_dd(patients.getNextCheckTime()); | |
181 | 181 | |
182 | - if (StringUtils.isNotEmpty(examinationModels.get(0).getCheckDoctor())) { | |
183 | - if (NumberUtils.isNumber(examinationModels.get(0).getCheckDoctor())) { | |
184 | - Users users = usersService.getUsers(NumberUtils.toInt(examinationModels.get(0).getCheckDoctor())); | |
182 | + if (StringUtils.isNotEmpty(patients.getLastCheckEmployeeId())) { | |
183 | + if (NumberUtils.isNumber(patients.getLastCheckEmployeeId())) { | |
184 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId())); | |
185 | 185 | if (null != users) { |
186 | 186 | quanPatientsResult.setCheckDoctor(users.getName()); |
187 | 187 | } else { |
188 | - quanPatientsResult.setCheckDoctor(examinationModels.get(0).getCheckDoctor()); | |
188 | + quanPatientsResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
189 | 189 | } |
190 | 190 | } else { |
191 | - quanPatientsResult.setCheckDoctor(examinationModels.get(0).getCheckDoctor()); | |
191 | + quanPatientsResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
192 | 192 | } |
193 | 193 | } |
194 | 194 | |
195 | 195 | } else { |
196 | 196 | List<AntExChuModel> list = antExService.queryAntExChu(antExChuQuery); |
197 | 197 | if (CollectionUtils.isNotEmpty(list)) { |
198 | - nextCheckTime = DateUtil.getyyyy_MM_dd(list.get(0).getNextCheckTime()); | |
199 | - if (StringUtils.isNotEmpty(list.get(0).getProdDoctor())) { | |
200 | - if (NumberUtils.isNumber(list.get(0).getProdDoctor())) { | |
201 | - Users users = usersService.getUsers(NumberUtils.toInt(list.get(0).getProdDoctor())); | |
198 | + nextCheckTime = DateUtil.getyyyy_MM_dd(patients.getNextCheckTime()); | |
199 | + if (StringUtils.isNotEmpty(patients.getLastCheckEmployeeId())) { | |
200 | + if (NumberUtils.isNumber(patients.getLastCheckEmployeeId())) { | |
201 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId())); | |
202 | 202 | if (null != users) { |
203 | 203 | quanPatientsResult.setCheckDoctor(users.getName()); |
204 | 204 | } else { |
205 | - quanPatientsResult.setCheckDoctor(list.get(0).getProdDoctor()); | |
205 | + quanPatientsResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
206 | 206 | } |
207 | 207 | } else { |
208 | - quanPatientsResult.setCheckDoctor(list.get(0).getProdDoctor()); | |
208 | + quanPatientsResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
209 | 209 | } |
210 | 210 | } |
211 | - Patients patients1=new Patients(); | |
211 | + /*Patients patients1=new Patients(); | |
212 | 212 | patients1.setId(patients.getId()); |
213 | 213 | patients1.setLastCTime(list.get(0).getCheckTime()); |
214 | - patientsService.updatePatient(patients1); | |
214 | + patientsService.updatePatient(patients1);*/ | |
215 | 215 | } |
216 | 216 | } |
217 | 217 | stopWatch.stop(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
View file @
2e6a521
... | ... | @@ -127,7 +127,6 @@ |
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
130 | - | |
131 | 130 | riskPatientsResult.setbTime(DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); |
132 | 131 | antExChuQuery.setPid(patients.getPid()); |
133 | 132 | antExChuQuery.setYn(YnEnums.YES.getId()); |
134 | 133 | |
135 | 134 | |
136 | 135 | |
137 | 136 | |
138 | 137 | |
... | ... | @@ -149,56 +148,27 @@ |
149 | 148 | List<AntenatalExaminationModel> examinationModels = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created")); |
150 | 149 | if (CollectionUtils.isNotEmpty(examinationModels)) { |
151 | 150 | |
152 | - //设置最后一次检查时间 | |
153 | - if (null == patients.getLastCTime()) { | |
154 | - List<Date> list = new ArrayList<>(); | |
155 | - for (AntenatalExaminationModel antEx : examinationModels) { | |
156 | - list.add(antEx.getCheckDate()); | |
157 | - } | |
158 | - | |
159 | - Collections.sort(list, new Comparator<Date>() { | |
160 | - @Override | |
161 | - public int compare(Date o1, Date o2) { | |
162 | - if (o1 != null && o1.after(o2)) { | |
163 | - return -1; | |
164 | - } | |
165 | - if (o1 != null && o1.before(o2)) { | |
166 | - return 1; | |
167 | - } | |
168 | - return 0; | |
169 | - } | |
170 | - }); | |
171 | - Patients patients1 = new Patients(); | |
172 | - patients1.setId(patients.getId()); | |
173 | - patients1.setLastCTime(list.get(0)); | |
174 | - patientsService.updatePatient(patients1); | |
175 | - } | |
176 | - | |
177 | - if (NumberUtils.isNumber(examinationModels.get(0).getCheckDoctor())) { | |
178 | - Users users = usersService.getUsers(NumberUtils.toInt(examinationModels.get(0).getCheckDoctor())); | |
151 | + if (NumberUtils.isNumber(patients.getLastCheckEmployeeId())) { | |
152 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId())); | |
179 | 153 | if (null != users) { |
180 | 154 | riskPatientsResult.setCheckDoctor(users.getName()); |
181 | 155 | } else { |
182 | - riskPatientsResult.setCheckDoctor(examinationModels.get(0).getCheckDoctor()); | |
156 | + riskPatientsResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
183 | 157 | } |
184 | 158 | } |
185 | - nextCheckTime = DateUtil.getyyyy_MM_dd(examinationModels.get(0).getNextCheckTime()); | |
159 | + nextCheckTime = DateUtil.getyyyy_MM_dd(patients.getNextCheckTime()); | |
186 | 160 | } else { |
187 | 161 | List<AntExChuModel> list = antExService.queryAntExChu(antExChuQuery); |
188 | 162 | if (CollectionUtils.isNotEmpty(list)) { |
189 | - nextCheckTime = DateUtil.getyyyy_MM_dd(list.get(0).getNextCheckTime()); | |
190 | - if (NumberUtils.isNumber(list.get(0).getProdDoctor())) { | |
191 | - Users users = usersService.getUsers(NumberUtils.toInt(list.get(0).getProdDoctor())); | |
163 | + nextCheckTime = DateUtil.getyyyy_MM_dd(patients.getNextCheckTime()); | |
164 | + if (NumberUtils.isNumber(patients.getLastCheckEmployeeId())) { | |
165 | + Users users = usersService.getUsers(NumberUtils.toInt(patients.getLastCheckEmployeeId())); | |
192 | 166 | if (null != users) { |
193 | 167 | riskPatientsResult.setCheckDoctor(users.getName()); |
194 | 168 | } else { |
195 | - riskPatientsResult.setCheckDoctor(list.get(0).getProdDoctor()); | |
169 | + riskPatientsResult.setCheckDoctor(patients.getLastCheckEmployeeId()); | |
196 | 170 | } |
197 | 171 | } |
198 | - Patients patients1 = new Patients(); | |
199 | - patients1.setId(patients.getId()); | |
200 | - patients1.setLastCTime(list.get(0).getCheckTime()); | |
201 | - patientsService.updatePatient(patients1); | |
202 | 172 | } |
203 | 173 | } |
204 | 174 | stopWatch.stop(); |