Commit 77bd661e849ef25d7d91f1475604a492f37ac0e6
1 parent
0c617f31a2
Exists in
master
and in
6 other branches
update code
Showing 3 changed files with 43 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
77bd661
| ... | ... | @@ -510,6 +510,17 @@ |
| 510 | 510 | private Integer postViewTimesStart; |
| 511 | 511 | private Integer postViewTimesEnd; |
| 512 | 512 | |
| 513 | + //孕妇证件类型 | |
| 514 | + private String pcerteTypeId; | |
| 515 | + | |
| 516 | + public String getPcerteTypeId() { | |
| 517 | + return pcerteTypeId; | |
| 518 | + } | |
| 519 | + | |
| 520 | + public void setPcerteTypeId(String pcerteTypeId) { | |
| 521 | + this.pcerteTypeId = pcerteTypeId; | |
| 522 | + } | |
| 523 | + | |
| 513 | 524 | public List<String> getFmHospitalList() { |
| 514 | 525 | return fmHospitalList; |
| 515 | 526 | } |
| ... | ... | @@ -1063,6 +1074,9 @@ |
| 1063 | 1074 | condition = condition.and("buildType", buildTypeNot, MongoOper.NE); |
| 1064 | 1075 | } |
| 1065 | 1076 | |
| 1077 | + if(pcerteTypeId != null){ | |
| 1078 | + condition = condition.and("pcerteTypeId", pcerteTypeId, MongoOper.IS); | |
| 1079 | + } | |
| 1066 | 1080 | |
| 1067 | 1081 | if (bookbuildingDoctor != null) { |
| 1068 | 1082 | condition = condition.and("bookbuildingDoctor", bookbuildingDoctor, MongoOper.IS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java
View file @
77bd661
| ... | ... | @@ -59,6 +59,18 @@ |
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | + * 查询孕妇是否有建档记录 有就返回patientid | |
| 63 | + * | |
| 64 | + * @return | |
| 65 | + */ | |
| 66 | + @RequestMapping(value = "/getPatientBuildId", method = RequestMethod.GET) | |
| 67 | + @ResponseBody | |
| 68 | + public BaseObjectResponse getPatientBuildId(@RequestParam(required = true) String certType, | |
| 69 | + @RequestParam(required = true) String certNo) { | |
| 70 | + return bookbuildingFacade.getPatientBuildId(certType,certNo); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /** | |
| 62 | 74 | * 查询孕妇建档记录 |
| 63 | 75 | * @return |
| 64 | 76 | */ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
77bd661
| ... | ... | @@ -1865,5 +1865,22 @@ |
| 1865 | 1865 | } |
| 1866 | 1866 | |
| 1867 | 1867 | |
| 1868 | + public BaseObjectResponse getPatientBuildId(String certType, String certNo) { | |
| 1869 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 1870 | + patientsQuery.setCardNo(certNo); | |
| 1871 | + patientsQuery.setPcerteTypeId(certType); | |
| 1872 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 1873 | + List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
| 1874 | + String patientId = ""; | |
| 1875 | + if (CollectionUtils.isNotEmpty(patients)) | |
| 1876 | + { | |
| 1877 | + patientId = patients.get(0).getId(); | |
| 1878 | + } | |
| 1879 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
| 1880 | + objectResponse.setData(patientId); | |
| 1881 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 1882 | + objectResponse.setErrormsg("成功"); | |
| 1883 | + return objectResponse; | |
| 1884 | + } | |
| 1868 | 1885 | } |