Commit 2fea9dc28721f7ae7f00d0edfd43043f31ee9736
1 parent
518d90eee7
Exists in
master
and in
1 other branch
update
Showing 1 changed file with 44 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
2fea9dc
| ... | ... | @@ -61,6 +61,7 @@ |
| 61 | 61 | import javax.validation.Valid; |
| 62 | 62 | import java.io.File; |
| 63 | 63 | import java.io.IOException; |
| 64 | +import java.lang.reflect.Array; | |
| 64 | 65 | import java.util.*; |
| 65 | 66 | |
| 66 | 67 | /** |
| 67 | 68 | |
| ... | ... | @@ -80,8 +81,9 @@ |
| 80 | 81 | |
| 81 | 82 | @Autowired |
| 82 | 83 | private AntenatalExaminationService antExService; |
| 83 | - | |
| 84 | 84 | @Autowired |
| 85 | + private ResidentsArchiveService residentsArchiveService; | |
| 86 | + @Autowired | |
| 85 | 87 | private PatientsService patientsService; |
| 86 | 88 | |
| 87 | 89 | @Autowired |
| ... | ... | @@ -695,6 +697,47 @@ |
| 695 | 697 | } |
| 696 | 698 | |
| 697 | 699 | return "update finish"; |
| 700 | + } | |
| 701 | + | |
| 702 | + | |
| 703 | + @RequestMapping(value = "/getPatientCardNoById", method = RequestMethod.GET) | |
| 704 | + @ResponseBody | |
| 705 | + public String updateDueDate(@RequestParam(required = true) String id,@RequestParam(required = true) Integer type) { | |
| 706 | + | |
| 707 | + System.out.println(" id = "+id+" ; type = "+type); | |
| 708 | + | |
| 709 | + if (type == 1 || type == 3) | |
| 710 | + { | |
| 711 | + Patients pats = patientsService.findOnePatientById(id); | |
| 712 | + if (pats != null) | |
| 713 | + { | |
| 714 | + return pats.getCardNo(); | |
| 715 | + } | |
| 716 | + } | |
| 717 | + else if (type == 2) | |
| 718 | + { | |
| 719 | + BabyModel babyModel = babyBookbuildingService.queryBabyById(id); | |
| 720 | + if (babyModel != null && babyModel.getMcertNo() != null) | |
| 721 | + { | |
| 722 | + return babyModel.getMcertNo(); | |
| 723 | + } | |
| 724 | + } | |
| 725 | + else if (type == 4) | |
| 726 | + { | |
| 727 | + ResidentsArchiveQuery query = new ResidentsArchiveQuery(); | |
| 728 | + query.setYn(YnEnums.YES.getId()); | |
| 729 | + query.setId(id); | |
| 730 | + List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(query); | |
| 731 | + if (CollectionUtils.isNotEmpty(modelList)) { | |
| 732 | + ResidentsArchiveModel model = modelList.get(0); | |
| 733 | + if (model != null && model.getCertificateNum() != null) | |
| 734 | + { | |
| 735 | + return model.getCertificateNum(); | |
| 736 | + } | |
| 737 | + } | |
| 738 | + } | |
| 739 | + | |
| 740 | + return ""; | |
| 698 | 741 | } |
| 699 | 742 | |
| 700 | 743 |