Commit 4a2475b53bcbf38a8649c2ad27eab47d451d1976
1 parent
df5d3d885c
Exists in
master
and in
8 other branches
增加是否通知
Showing 2 changed files with 56 additions and 14 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
4a2475b
... | ... | @@ -58,18 +58,18 @@ |
58 | 58 | * @param antExAddRequest |
59 | 59 | * @return |
60 | 60 | */ |
61 | - public BaseResponse addOneAntEx(AntExAddRequest antExAddRequest,Integer userId) { | |
61 | + public BaseResponse addOneAntEx(AntExAddRequest antExAddRequest, Integer userId) { | |
62 | 62 | if (StringUtils.isNotEmpty(antExAddRequest.getId())) { |
63 | 63 | AntenatalExaminationModel antenatalExamination = antExAddRequest.convertToDataModel(); |
64 | - antenatalExamination.setHospitalId(autoMatchFacade.matchOrgId(userId).get(0)+""); | |
64 | + antenatalExamination.setHospitalId(autoMatchFacade.matchOrgId(userId).get(0) + ""); | |
65 | 65 | antenatalExaminationService.updateOneAnt(antenatalExamination, antExAddRequest.getId()); |
66 | 66 | updateApplyOrder(antenatalExamination, antExAddRequest.getParentId()); |
67 | 67 | } else { |
68 | 68 | AntenatalExaminationModel model = antExAddRequest.convertToDataModel(); |
69 | 69 | model.setYn(YnEnums.YES.getId()); |
70 | - List list1 = autoMatchFacade.matchOrgId(userId); | |
71 | - if(CollectionUtils.isNotEmpty(list1)){ | |
72 | - model.setHospitalId(list1.get(0)+""); | |
70 | + List list1 = autoMatchFacade.matchOrgId(userId); | |
71 | + if (CollectionUtils.isNotEmpty(list1)) { | |
72 | + model.setHospitalId(list1.get(0) + ""); | |
73 | 73 | } |
74 | 74 | antenatalExaminationService.addOneBabyAnt(model); |
75 | 75 | updateApplyOrder(model, antExAddRequest.getParentId()); |
76 | 76 | |
... | ... | @@ -100,14 +100,14 @@ |
100 | 100 | * @param excAddRequest |
101 | 101 | * @return |
102 | 102 | */ |
103 | - public BaseResponse addOneAnetExChu(AntExcAddRequest excAddRequest,Integer userId) { | |
103 | + public BaseResponse addOneAnetExChu(AntExcAddRequest excAddRequest, Integer userId) { | |
104 | 104 | AntExChuModel antExChuModel = excAddRequest.convertToDataModel(); |
105 | 105 | if (StringUtils.isNotEmpty(antExChuModel.getId()) && StringUtils.isNotEmpty(antExChuModel.getParentId())) { |
106 | 106 | antenatalExaminationService.updateAntExChu(antExChuModel, antExChuModel.getId()); |
107 | 107 | } else { |
108 | - List list1 = autoMatchFacade.matchOrgId(userId); | |
109 | - if(CollectionUtils.isNotEmpty(list1)){ | |
110 | - antExChuModel.setHospitalId(list1.get(0)+""); | |
108 | + List list1 = autoMatchFacade.matchOrgId(userId); | |
109 | + if (CollectionUtils.isNotEmpty(list1)) { | |
110 | + antExChuModel.setHospitalId(list1.get(0) + ""); | |
111 | 111 | } |
112 | 112 | antExChuModel.setYn(YnEnums.YES.getId()); |
113 | 113 | antenatalExaminationService.addOneAntEx(antExChuModel); |
... | ... | @@ -116,6 +116,44 @@ |
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | + * 获取最后一次高危产检的高危信息 | |
120 | + * | |
121 | + * 先取复诊最后一条,在取初诊 | |
122 | + * | |
123 | + * @return | |
124 | + */ | |
125 | + private List findLastRisk(String parentId) { | |
126 | + List<AntenatalExaminationModel> list = antenatalExaminationService.findAllByParentId(parentId); | |
127 | + AntenatalExaminationModel model = null; | |
128 | + if (CollectionUtils.isNotEmpty(list)) { | |
129 | + model = list.get(0); | |
130 | + } | |
131 | + try { | |
132 | + if(null!=model){ | |
133 | + List list1 = JsonUtil.toList(model.getRiskFactor(), List.class); | |
134 | + return queryRisk(list1); | |
135 | + } | |
136 | + } catch (Exception e) { | |
137 | + } | |
138 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
139 | + antExChuQuery.setParentId(parentId); | |
140 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
141 | + List<AntExChuModel> list1 = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
142 | + AntExChuModel antExChuModel = null; | |
143 | + if (CollectionUtils.isNotEmpty(list1)) { | |
144 | + antExChuModel = list1.get(0); | |
145 | + } | |
146 | + try { | |
147 | + if(null!=antExChuModel){ | |
148 | + List list2 = JsonUtil.toList(antExChuModel.getHighrisk(), List.class); | |
149 | + return queryRisk(list2); | |
150 | + } | |
151 | + } catch (Exception e) { | |
152 | + } | |
153 | + return Collections.emptyList(); | |
154 | + } | |
155 | + | |
156 | + /** | |
119 | 157 | * 查询产妇所有产检的数据 |
120 | 158 | * |
121 | 159 | * @param exListQueryRequest |
... | ... | @@ -160,8 +198,8 @@ |
160 | 198 | List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery); |
161 | 199 | if (CollectionUtils.isNotEmpty(antExChuModels)) { |
162 | 200 | for (AntExChuModel an : antExChuModels) { |
163 | - organization = organizationService.getOrganization(Integer.valueOf(an.getHospitalId())); | |
164 | - data.add(new AntData(an,null != organization ? organization.getName() : "")); | |
201 | + organization = organizationService.getOrganization(Integer.valueOf(an.getHospitalId())); | |
202 | + data.add(new AntData(an, null != organization ? organization.getName() : "")); | |
165 | 203 | } |
166 | 204 | } |
167 | 205 | //复诊记录 |
... | ... | @@ -174,7 +212,7 @@ |
174 | 212 | if (CollectionUtils.isNotEmpty(list1)) { |
175 | 213 | for (AntenatalExaminationModel an : list1) { |
176 | 214 | organization = organizationService.getOrganization(Integer.valueOf(an.getHospitalId())); |
177 | - data.add(new AntData(an,null != organization ? organization.getName() : "")); | |
215 | + data.add(new AntData(an, null != organization ? organization.getName() : "")); | |
178 | 216 | } |
179 | 217 | } |
180 | 218 | postReviewQuery = new PostReviewQuery(); |
181 | 219 | |
... | ... | @@ -192,14 +230,14 @@ |
192 | 230 | //分娩记录 |
193 | 231 | if (CollectionUtils.isNotEmpty(modelList)) { |
194 | 232 | organization = organizationService.getOrganization(Integer.valueOf(modelList.get(0).getHospitalId())); |
195 | - data.add(new AntData(modelList.get(0), patients.getLastMenses(),null != organization ? organization.getName() : "")); | |
233 | + data.add(new AntData(modelList.get(0), patients.getLastMenses(), null != organization ? organization.getName() : "")); | |
196 | 234 | } |
197 | 235 | //产后复查记录 |
198 | 236 | List<PostReviewModel> reviewModels = postReviewService.findWithList(postReviewQuery); |
199 | 237 | if (CollectionUtils.isNotEmpty(reviewModels)) { |
200 | 238 | for (PostReviewModel postReviewModel : reviewModels) { |
201 | 239 | organization = organizationService.getOrganization(Integer.valueOf(postReviewModel.getHospitalId())); |
202 | - data.add(new AntData(postReviewModel,null != organization ? organization.getName() : "")); | |
240 | + data.add(new AntData(postReviewModel, null != organization ? organization.getName() : "")); | |
203 | 241 | } |
204 | 242 | } |
205 | 243 | listDate.add(data); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
4a2475b
... | ... | @@ -52,6 +52,8 @@ |
52 | 52 | @Autowired |
53 | 53 | private AntenatalExaminationFacade antenatalExaminationFacade; |
54 | 54 | |
55 | + | |
56 | + | |
55 | 57 | /** |
56 | 58 | * 修改产妇的社区 |
57 | 59 | * |
... | ... | @@ -240,6 +242,8 @@ |
240 | 242 | } |
241 | 243 | return new BaseObjectResponse().setData(patientBaseResult).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); |
242 | 244 | } |
245 | + | |
246 | + | |
243 | 247 | |
244 | 248 | /** |
245 | 249 | * 转成全部产妇的返回数据 |