Commit 1977b6e742dd05c1f3c40b15fd4b4d31ed23d517
1 parent
b0b21ccb8d
Exists in
master
and in
1 other branch
滦平数据同步
Showing 1 changed file with 36 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
View file @
1977b6e
| ... | ... | @@ -95,12 +95,15 @@ |
| 95 | 95 | |
| 96 | 96 | private void savePatients(Patients patients) |
| 97 | 97 | { |
| 98 | - MysqlPatients mysqlPatientsdb = new MysqlPatients(); | |
| 99 | - mysqlPatientsdb.setPatientId(patients.getId()); | |
| 100 | - mysqlPatientsService.deleteMysqlPatients(mysqlPatientsdb); | |
| 101 | - Map<String, Object> map = viewFacade.getPatientViewData(patients, patients.getId()); | |
| 102 | - MysqlPatients mysqlPatients = new MysqlPatients(); | |
| 98 | + | |
| 103 | 99 | try { |
| 100 | + | |
| 101 | + MysqlPatients mysqlPatientsdb = new MysqlPatients(); | |
| 102 | + mysqlPatientsdb.setPatientId(patients.getId()); | |
| 103 | + mysqlPatientsService.deleteMysqlPatients(mysqlPatientsdb); | |
| 104 | + Map<String, Object> map = viewFacade.getPatientViewData(patients, patients.getId()); | |
| 105 | + MysqlPatients mysqlPatients = new MysqlPatients(); | |
| 106 | + | |
| 104 | 107 | ConvertUtils.register(new DateLocaleConverter(), Date.class); |
| 105 | 108 | BeanUtils.populate(mysqlPatients, map); |
| 106 | 109 | mysqlPatients.setPatientId(patients.getId()); |
| 107 | 110 | |
| ... | ... | @@ -179,8 +182,14 @@ |
| 179 | 182 | mysqlAntexcDb.setCid(antExChuModel.getId()); |
| 180 | 183 | mysqlAntexcService.deleteMysqlAntexc(mysqlAntexcDb); |
| 181 | 184 | |
| 182 | - Map<String, Object> map = (Map<String, Object>)viewFacade.findAntExChu(antExChuModel.getId()).getData(); | |
| 185 | + | |
| 183 | 186 | try { |
| 187 | + Map<String, Object> map = (Map<String, Object>)viewFacade.findAntExChu(antExChuModel.getId()).getData(); | |
| 188 | + if (map == null) | |
| 189 | + { | |
| 190 | + continue; | |
| 191 | + } | |
| 192 | + | |
| 184 | 193 | MysqlAntexc mysqlAntexc = new MysqlAntexc(); |
| 185 | 194 | ConvertUtils.register(new DateLocaleConverter(), Date.class); |
| 186 | 195 | BeanUtils.populate(mysqlAntexc, map); |
| 187 | 196 | |
| ... | ... | @@ -325,8 +334,14 @@ |
| 325 | 334 | mysqlAntexcDb.setCid(examinationModel.getId()); |
| 326 | 335 | mysqlAntexcService.deleteMysqlAntex(mysqlAntexcDb); |
| 327 | 336 | |
| 328 | - Map<String, Object> map = (Map<String, Object>)viewFacade.findAntenatalExamination(examinationModel.getId()).getData(); | |
| 337 | + | |
| 329 | 338 | try { |
| 339 | + Map<String, Object> map = (Map<String, Object>)viewFacade.findAntenatalExamination(examinationModel.getId()).getData(); | |
| 340 | + if (map == null) | |
| 341 | + { | |
| 342 | + continue; | |
| 343 | + } | |
| 344 | + | |
| 330 | 345 | MysqlAntex mysqlAntex = new MysqlAntex(); |
| 331 | 346 | ConvertUtils.register(new DateLocaleConverter(), Date.class); |
| 332 | 347 | BeanUtils.populate(mysqlAntex, map); |
| 333 | 348 | |
| ... | ... | @@ -660,8 +675,15 @@ |
| 660 | 675 | mysqlBabyDb.setBabyId(babyModel.getId()); |
| 661 | 676 | mysqlAntexcService.deleteMysqlBaby(mysqlBabyDb); |
| 662 | 677 | |
| 663 | - BabyPageResult map = (BabyPageResult)viewFacade.getBabyBuildInfo(babyModel.getId()).getData(); | |
| 678 | + | |
| 664 | 679 | try { |
| 680 | + | |
| 681 | + BabyPageResult map = (BabyPageResult)viewFacade.getBabyBuildInfo(babyModel.getId()).getData(); | |
| 682 | + if (map == null) | |
| 683 | + { | |
| 684 | + continue; | |
| 685 | + } | |
| 686 | + | |
| 665 | 687 | MysqlBaby mysqlBaby = new MysqlBaby(); |
| 666 | 688 | ConvertUtils.register(new DateLocaleConverter(), Date.class); |
| 667 | 689 | BeanUtils.copyProperties(mysqlBaby, map); |
| 668 | 690 | |
| ... | ... | @@ -728,9 +750,13 @@ |
| 728 | 750 | MysqlBabyCheck mysqlBabyCheckdb = new MysqlBabyCheck(); |
| 729 | 751 | mysqlBabyCheckdb.setCheckId(babyCheckModel.getId()); |
| 730 | 752 | mysqlAntexcService.deleteMysqlBabyCheck(mysqlBabyCheckdb); |
| 731 | - | |
| 732 | - BabyCheckPageResult map = (BabyCheckPageResult)viewFacade.getBabyCheckPageInfo(babyCheckModel.getId()).getData(); | |
| 733 | 753 | try { |
| 754 | + | |
| 755 | + BabyCheckPageResult map = (BabyCheckPageResult)viewFacade.getBabyCheckPageInfo(babyCheckModel.getId()).getData(); | |
| 756 | + if (map == null) | |
| 757 | + { | |
| 758 | + continue; | |
| 759 | + } | |
| 734 | 760 | MysqlBabyCheck mysqlBabyCheck = new MysqlBabyCheck(); |
| 735 | 761 | ConvertUtils.register(new DateLocaleConverter(), Date.class); |
| 736 | 762 | BeanUtils.copyProperties(mysqlBabyCheck, map); |