Commit 541d2fec335c61076b32e9b7e244b8be752ef475
1 parent
707ea43f55
Exists in
master
and in
7 other branches
分娩作废产检劵
Showing 1 changed file with 28 additions and 11 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java
View file @
541d2fe
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | import com.lyms.platform.permission.service.UsersService; |
| 23 | 23 | import com.lyms.platform.pojo.*; |
| 24 | 24 | import com.lyms.platform.query.MatDeliverQuery; |
| 25 | +import com.lyms.platform.query.PatientsQuery; | |
| 25 | 26 | import com.lyms.platform.query.PostReviewQuery; |
| 26 | 27 | import com.lyms.platform.query.ReferralApplyOrderQuery; |
| 27 | 28 | import org.apache.commons.collections.CollectionUtils; |
| 28 | 29 | |
| 29 | 30 | |
| ... | ... | @@ -208,17 +209,33 @@ |
| 208 | 209 | |
| 209 | 210 | //当非建档医院修改初诊信息时,需要同步给建档医院 |
| 210 | 211 | private void syncMaster(String parentId) { |
| 212 | + if(StringUtils.isNotEmpty(parentId)){ | |
| 213 | + //当前非建档医院最新的状态 | |
| 214 | + Patients patients = patientsService.findOnePatientById(parentId); | |
| 211 | 215 | |
| 212 | - //当前非建档医院最新的状态 | |
| 213 | - Patients patients = patientsService.findOnePatientById(parentId); | |
| 216 | + if (StringUtils.isNotEmpty(patients.getSource())) { | |
| 217 | + Patients masterPatients = patientsService.findOnePatientById(patients.getSource()); | |
| 214 | 218 | |
| 215 | - if (StringUtils.isNotEmpty(patients.getSource())) { | |
| 216 | - Patients masterPatients = patientsService.findOnePatientById(patients.getSource()); | |
| 217 | - | |
| 218 | - masterPatients.setNextCheckTime(patients.getNextCheckTime()); | |
| 219 | - masterPatients.setFmDate(patients.getFmDate()); | |
| 220 | - masterPatients.setLastCheckEmployeeId(patients.getLastCheckEmployeeId()); | |
| 221 | - patientsService.updatePatient(masterPatients); | |
| 219 | + masterPatients.setNextCheckTime(patients.getNextCheckTime()); | |
| 220 | + masterPatients.setFmDate(patients.getFmDate()); | |
| 221 | + masterPatients.setLastCheckEmployeeId(patients.getLastCheckEmployeeId()); | |
| 222 | + patientsService.updatePatient(masterPatients); | |
| 223 | + }else { | |
| 224 | + PatientsQuery patientsQuery1=new PatientsQuery(); | |
| 225 | + patientsQuery1.setSource(parentId); | |
| 226 | + patientsQuery1.setYn(YnEnums.YES.getId()); | |
| 227 | + List<Patients> list= patientsService.queryPatient(patientsQuery1); | |
| 228 | + if(CollectionUtils.isNotEmpty(list)){ | |
| 229 | + for(Patients p:list){ | |
| 230 | + Patients p1= new Patients(); | |
| 231 | + p1.setId(p.getId()); | |
| 232 | + p1.setNextCheckTime(patients.getNextCheckTime()); | |
| 233 | + p1.setFmDate(patients.getFmDate()); | |
| 234 | + p1.setLastCheckEmployeeId(patients.getLastCheckEmployeeId()); | |
| 235 | + patientsService.updatePatient(p1); | |
| 236 | + } | |
| 237 | + } | |
| 238 | + } | |
| 222 | 239 | } |
| 223 | 240 | } |
| 224 | 241 |