Commit b170276852dff0b9ad97b0c71943e89da6a7ca42
1 parent
5d363d12fb
Exists in
master
and in
1 other branch
code update
Showing 3 changed files with 61 additions and 32 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
b170276
... | ... | @@ -179,7 +179,7 @@ |
179 | 179 | |
180 | 180 | /** |
181 | 181 | * 根据类型查询响应的 基础数据 |
182 | - * | |
182 | + *[[ycs],[jws]] | |
183 | 183 | * @param type |
184 | 184 | * @return |
185 | 185 | */ |
... | ... | @@ -193,6 +193,19 @@ |
193 | 193 | |
194 | 194 | if (!StringUtils.isEmpty(parentId)) { |
195 | 195 | results = getBaseicConfigByParentId(parentId); |
196 | + | |
197 | + if ("jws".equals(ConfigTypeEnums.JWS.getType())) | |
198 | + { | |
199 | + | |
200 | + for(BasicConfigResult result : results) | |
201 | + { | |
202 | + if (results != null && StringUtils.isNotEmpty(result.getId())) | |
203 | + { | |
204 | + List<BasicConfigResult> childConfigs = getBaseicConfigByParentId(result.getId()); | |
205 | + result.setChildConfigs(childConfigs); | |
206 | + } | |
207 | + } | |
208 | + } | |
196 | 209 | } |
197 | 210 | objectResponse.setData(results); |
198 | 211 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
b170276
... | ... | @@ -365,40 +365,44 @@ |
365 | 365 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
366 | 366 | if (CollectionUtils.isNotEmpty(patients)) |
367 | 367 | { |
368 | - br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
369 | - br.setErrormsg("该身份证在医院已经建档"); | |
370 | - return br; | |
371 | - } | |
372 | - } | |
373 | - if (yunRequest.getPregnantPhone() != null) | |
374 | - { | |
375 | - patientsQuery.setCardNo(null); | |
376 | - patientsQuery.setPhone(yunRequest.getPregnantPhone()); | |
377 | - //判断该手机号码在 孕期内有没有建档 | |
378 | - List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
379 | - if (CollectionUtils.isNotEmpty(patients)) | |
380 | - { | |
381 | - br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
382 | - br.setErrormsg("该手机号码已经建档"); | |
383 | - return br; | |
384 | - } | |
385 | - } | |
368 | + Patients pat = patients.get(0); | |
369 | + if (pat != null && !pat.getPhone().equals(yunRequest.getPregnantPhone())) | |
370 | + { | |
371 | + if (StringUtils.isNotEmpty(yunRequest.getPregnantPhone())) { | |
372 | + patientsQuery.setCardNo(null); | |
373 | + patientsQuery.setPhone(yunRequest.getPregnantPhone()); | |
374 | + //判断该手机号码在 孕期内有没有建档 | |
375 | + patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
376 | + if (CollectionUtils.isNotEmpty(patients)) { | |
377 | + br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
378 | + br.setErrormsg("该手机号码已经建档"); | |
379 | + return br; | |
380 | + } | |
381 | + } | |
382 | + } | |
386 | 383 | |
387 | - //就诊卡号判断 | |
388 | - if (StringUtils.isNotEmpty(yunRequest.getVcCardNo())) | |
389 | - { | |
390 | - patientsQuery.setCardNo(null); | |
391 | - patientsQuery.setPhone(null); | |
392 | - patientsQuery.setVcCardNo(yunRequest.getVcCardNo()); | |
393 | - patientsQuery.setHospitalId(yunRequest.getHospitalId()); | |
394 | - List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
395 | - if (CollectionUtils.isNotEmpty(patients)) | |
396 | - { | |
397 | - br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
398 | - br.setErrormsg("该就诊卡号在该医院已经建档"); | |
399 | - return br; | |
384 | + if (pat != null && StringUtils.isNotEmpty(pat.getVcCardNo()) && !pat.getVcCardNo().equals(yunRequest.getVcCardNo())) | |
385 | + { | |
386 | + | |
387 | + //就诊卡号判断 | |
388 | + if (StringUtils.isNotEmpty(yunRequest.getVcCardNo())) | |
389 | + { | |
390 | + patientsQuery.setCardNo(null); | |
391 | + patientsQuery.setPhone(null); | |
392 | + patientsQuery.setVcCardNo(yunRequest.getVcCardNo()); | |
393 | + patientsQuery.setHospitalId(yunRequest.getHospitalId()); | |
394 | + patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
395 | + if (CollectionUtils.isNotEmpty(patients)) | |
396 | + { | |
397 | + br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
398 | + br.setErrormsg("该就诊卡号在该医院已经建档"); | |
399 | + return br; | |
400 | + } | |
401 | + } | |
402 | + } | |
400 | 403 | } |
401 | 404 | } |
405 | + | |
402 | 406 | |
403 | 407 | Patients patient = getPatientsData(yunRequest); |
404 | 408 | patient.setModified(new Date()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BasicConfigResult.java
View file @
b170276
... | ... | @@ -4,6 +4,8 @@ |
4 | 4 | import com.lyms.platform.pojo.BasicConfig; |
5 | 5 | import com.lyms.platform.pojo.PuerperaModel; |
6 | 6 | |
7 | +import java.util.List; | |
8 | + | |
7 | 9 | public class BasicConfigResult implements IBasicResultConvert<BasicConfigResult,BasicConfig> { |
8 | 10 | private String id; |
9 | 11 | private String code; |
... | ... | @@ -11,6 +13,16 @@ |
11 | 13 | private String parentId; |
12 | 14 | private String name; |
13 | 15 | private String desc; |
16 | + | |
17 | + private List<BasicConfigResult> childConfigs; | |
18 | + | |
19 | + public List<BasicConfigResult> getChildConfigs() { | |
20 | + return childConfigs; | |
21 | + } | |
22 | + | |
23 | + public void setChildConfigs(List<BasicConfigResult> childConfigs) { | |
24 | + this.childConfigs = childConfigs; | |
25 | + } | |
14 | 26 | |
15 | 27 | public String getDesc() { |
16 | 28 | return desc; |