Commit 8fe40ca8e78dff4be304247feefd142b3ee063ae
1 parent
6d2a556185
Exists in
master
and in
6 other branches
设置修改末次月经
Showing 2 changed files with 32 additions and 3 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.java
View file @
8fe40ca
... | ... | @@ -21,6 +21,8 @@ |
21 | 21 | private String barCode; |
22 | 22 | private String pid; |
23 | 23 | private String parentId; |
24 | + //末次月经 | |
25 | + private Date lastMenses; | |
24 | 26 | /* //名字 |
25 | 27 | private String name; |
26 | 28 | //年龄 |
... | ... | @@ -445,6 +447,13 @@ |
445 | 447 | return tireData; |
446 | 448 | } |
447 | 449 | |
450 | + public Date getLastMenses() { | |
451 | + return lastMenses; | |
452 | + } | |
453 | + | |
454 | + public void setLastMenses(Date lastMenses) { | |
455 | + this.lastMenses = lastMenses; | |
456 | + } | |
448 | 457 | |
449 | 458 | public void setTireData(List tireData) { |
450 | 459 | this.tireData = tireData; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
8fe40ca
... | ... | @@ -63,9 +63,6 @@ |
63 | 63 | |
64 | 64 | |
65 | 65 | @Autowired |
66 | - private AntenatalExaminationService antenatalExaminationService; | |
67 | - | |
68 | - @Autowired | |
69 | 66 | private AutoMatchFacade autoMatchFacade; |
70 | 67 | |
71 | 68 | @Autowired |
... | ... | @@ -81,6 +78,9 @@ |
81 | 78 | private AntenatalExaminationFacade antenatalExaminationFacade; |
82 | 79 | |
83 | 80 | @Autowired |
81 | + private AntenatalExaminationService antenatalExaminationService; | |
82 | + | |
83 | + @Autowired | |
84 | 84 | private SmsConfigFacade smsConfigFacade; |
85 | 85 | |
86 | 86 | @Autowired |
87 | 87 | |
88 | 88 | |
... | ... | @@ -746,13 +746,33 @@ |
746 | 746 | patient.setOperator(userId); |
747 | 747 | |
748 | 748 | yunBookbuildingService.updatePregnant(patient, id); |
749 | + | |
749 | 750 | //如果当前是建档医院,那么需要修改其他非建档医院的数据 |
750 | 751 | if (autoMatchFacade.checkBStatus(userId)) { |
751 | 752 | patientsService.updateBaseData(patient); |
752 | 753 | } |
754 | + Patients patients = patientsService.findOnePatientById(id); | |
755 | + updateAntExLastMenses(patients.getLastMenses(), patients.getPid(), patients.getBookbuildingDate()); | |
753 | 756 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
754 | 757 | } |
755 | 758 | |
759 | + /** | |
760 | + * 修改初诊 复诊的末次月经字段 | |
761 | + * @param lastMenses | |
762 | + */ | |
763 | + private void updateAntExLastMenses(Date lastMenses,String pid,Date bookBuildDate){ | |
764 | + AntExQuery antExQuery=new AntExQuery(); | |
765 | + antExQuery.setStart(bookBuildDate); | |
766 | + antExQuery.setPid(pid); | |
767 | + antExQuery.setYn(YnEnums.YES.getId()); | |
768 | + List<AntenatalExaminationModel> antexList = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
769 | + if(CollectionUtils.isNotEmpty(antexList)){ | |
770 | + for(AntenatalExaminationModel antex:antexList){ | |
771 | + antex.setLastMenses(lastMenses); | |
772 | + antenatalExaminationService.updateOneAnt(antex,antex.getId()); | |
773 | + } | |
774 | + } | |
775 | + } | |
756 | 776 | /** |
757 | 777 | * 查询孕妇建档记录 |
758 | 778 | * |