Commit 27f9f26d8d07d2257ccb6b6c91af34545f47afb2
1 parent
b955f7e8e6
Exists in
master
and in
1 other branch
unpdate
Showing 5 changed files with 61 additions and 3 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/PatientRegistrationModel.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientRegistrationModelQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientRegistrationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientRegistrationRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientRegistrationResult.java
platform-dal/src/main/java/com/lyms/platform/pojo/PatientRegistrationModel.java
View file @
27f9f26
... | ... | @@ -25,6 +25,8 @@ |
25 | 25 | private String name; |
26 | 26 | //手机号码 |
27 | 27 | private String phone; |
28 | + //身份证号码 | |
29 | + private String cardno; | |
28 | 30 | //是否在我院建档 1是 2 不是 |
29 | 31 | private String type; |
30 | 32 | //末次月经 |
... | ... | @@ -88,6 +90,14 @@ |
88 | 90 | |
89 | 91 | public String getType() { |
90 | 92 | return type; |
93 | + } | |
94 | + | |
95 | + public String getCardno() { | |
96 | + return cardno; | |
97 | + } | |
98 | + | |
99 | + public void setCardno(String cardno) { | |
100 | + this.cardno = cardno; | |
91 | 101 | } |
92 | 102 | |
93 | 103 | public void setType(String type) { |
platform-dal/src/main/java/com/lyms/platform/query/PatientRegistrationModelQuery.java
View file @
27f9f26
... | ... | @@ -26,6 +26,8 @@ |
26 | 26 | private String name; |
27 | 27 | //手机号码 |
28 | 28 | private String phone; |
29 | + //身份证号码 | |
30 | + private String cardno; | |
29 | 31 | //是否在我院建档 1是 2 不是 |
30 | 32 | private String type; |
31 | 33 | |
... | ... | @@ -72,6 +74,14 @@ |
72 | 74 | this.id = id; |
73 | 75 | } |
74 | 76 | |
77 | + public String getCardno() { | |
78 | + return cardno; | |
79 | + } | |
80 | + | |
81 | + public void setCardno(String cardno) { | |
82 | + this.cardno = cardno; | |
83 | + } | |
84 | + | |
75 | 85 | public Integer getYn() { |
76 | 86 | return yn; |
77 | 87 | } |
78 | 88 | |
... | ... | @@ -158,7 +168,11 @@ |
158 | 168 | |
159 | 169 | condition = condition.and("phone", phone, MongoOper.IS); |
160 | 170 | } |
171 | + // 身份证 | |
172 | + if (StringUtils.isNotEmpty(cardno)) { | |
161 | 173 | |
174 | + condition = condition.and("cardno", cardno, MongoOper.IS); | |
175 | + } | |
162 | 176 | //检查医生 |
163 | 177 | if (StringUtils.isNotEmpty(type)) { |
164 | 178 | |
165 | 179 | |
166 | 180 | |
... | ... | @@ -205,11 +219,12 @@ |
205 | 219 | MongoCondition c1 = MongoCondition.newInstance(); |
206 | 220 | MongoCondition con1 = MongoCondition.newInstance("name", queryNo, MongoOper.LIKE); |
207 | 221 | MongoCondition con2 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS); |
222 | + MongoCondition con3 = MongoCondition.newInstance("cardno", queryNo, MongoOper.IS); | |
208 | 223 | if (c != null) { |
209 | - c1.orCondition(new MongoCondition[]{con1, con2, }).getCriteria(); | |
224 | + c1.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria(); | |
210 | 225 | condition.andCondition(c1); |
211 | 226 | } else { |
212 | - c = c1.orCondition(new MongoCondition[]{con1, con2}).getCriteria(); | |
227 | + c = c1.orCondition(new MongoCondition[]{con1, con2,con3}).getCriteria(); | |
213 | 228 | } |
214 | 229 | } |
215 | 230 | if (c != null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientRegistrationFacade.java
View file @
27f9f26
... | ... | @@ -64,6 +64,7 @@ |
64 | 64 | model.setModifyDate(new Date()); |
65 | 65 | model.setName(request.getName()); |
66 | 66 | model.setPhone(request.getPhone()); |
67 | + model.setCardno(request.getCardno()); | |
67 | 68 | model.setType(request.getType()); |
68 | 69 | model.setLastMenses(DateUtil.parseYMD(request.getLastMenses())); |
69 | 70 | return model; |
... | ... | @@ -87,6 +88,15 @@ |
87 | 88 | modelQuery.setSort("ASC"); |
88 | 89 | patientRegistrationModels = patientRegistrationService.queryListOne(modelQuery); |
89 | 90 | } |
91 | + //判断该身份证号存在信息 | |
92 | + if (CollectionUtils.isEmpty(patientRegistrationModels) && StringUtils.isNotEmpty(request.getCardno())) { | |
93 | + PatientRegistrationModelQuery modelQuery = new PatientRegistrationModelQuery(); | |
94 | + modelQuery.setYn(YnEnums.YES.getId()); | |
95 | + modelQuery.setHospitalId(request.getHospitalId()); | |
96 | + modelQuery.setCardno(request.getCardno()); | |
97 | + modelQuery.setSort("ASC"); | |
98 | + patientRegistrationModels = patientRegistrationService.queryListOne(modelQuery); | |
99 | + } | |
90 | 100 | BaseObjectResponse br = new BaseObjectResponse(); |
91 | 101 | if(CollectionUtils.isEmpty(patientRegistrationModels)){ |
92 | 102 | PatientRegistrationModel model = getPatientRegistrationModel(request); |
... | ... | @@ -278,7 +288,8 @@ |
278 | 288 | Map m = new HashMap<>(); |
279 | 289 | //导出: 姓名 手机号码 是否在我院建档 末次月经 登记时间 |
280 | 290 | m.put("name",patientRegistrationResult.getName()); |
281 | - m.put("phone",patientRegistrationResult.getPhone() ); | |
291 | + m.put("phone",patientRegistrationResult.getPhone()); | |
292 | + m.put("cardno",patientRegistrationResult.getCardno()); | |
282 | 293 | m.put("type",StringUtils.isNotEmpty(patientRegistrationResult.getType()) ? ("1".equals(patientRegistrationResult.getType())?"是":"否" ):"_"); |
283 | 294 | m.put("lastMenses",patientRegistrationResult.getLastMenses() ); |
284 | 295 | m.put("createDate",patientRegistrationResult.getCreateDate() ); |
... | ... | @@ -301,6 +312,7 @@ |
301 | 312 | private void cnamesMap(Map<String, String> cnames) { |
302 | 313 | cnames.put("name", "姓名"); |
303 | 314 | cnames.put("phone", "手机号码"); |
315 | + cnames.put("cardno", "身份证号码"); | |
304 | 316 | cnames.put("type", "是否在我院建档"); |
305 | 317 | cnames.put("lastMenses", "末次月经"); |
306 | 318 | cnames.put("createDate", "登记时间"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientRegistrationRequest.java
View file @
27f9f26
... | ... | @@ -24,6 +24,8 @@ |
24 | 24 | @FormParam |
25 | 25 | @NotEmpty(message = "手机号吗不能为空") |
26 | 26 | private String phone; |
27 | + //身份证号码 | |
28 | + private String cardno; | |
27 | 29 | //是否在我院建档 1是 2 不是 |
28 | 30 | private String type; |
29 | 31 | //末次月经 |
... | ... | @@ -71,6 +73,14 @@ |
71 | 73 | |
72 | 74 | public String getHospitalId() { |
73 | 75 | return hospitalId; |
76 | + } | |
77 | + | |
78 | + public String getCardno() { | |
79 | + return cardno; | |
80 | + } | |
81 | + | |
82 | + public void setCardno(String cardno) { | |
83 | + this.cardno = cardno; | |
74 | 84 | } |
75 | 85 | |
76 | 86 | public void setHospitalId(String hospitalId) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientRegistrationResult.java
View file @
27f9f26
... | ... | @@ -19,6 +19,8 @@ |
19 | 19 | private String name; |
20 | 20 | //手机号码 |
21 | 21 | private String phone; |
22 | + //身份证号码 | |
23 | + private String cardno; | |
22 | 24 | //是否在我院建档 1是 2 不是 |
23 | 25 | private String type; |
24 | 26 | //末次月经 |
... | ... | @@ -28,6 +30,14 @@ |
28 | 30 | return id; |
29 | 31 | } |
30 | 32 | |
33 | + public String getCardno() { | |
34 | + return cardno; | |
35 | + } | |
36 | + | |
37 | + public void setCardno(String cardno) { | |
38 | + this.cardno = cardno; | |
39 | + } | |
40 | + | |
31 | 41 | public void setId(String id) { |
32 | 42 | this.id = id; |
33 | 43 | } |
... | ... | @@ -112,6 +122,7 @@ |
112 | 122 | setCreateDate(DateUtil.getYyyyMmDd(destModel.getCreateDate())); |
113 | 123 | setName(destModel.getName()); |
114 | 124 | setPhone(destModel.getPhone()); |
125 | + setCardno(destModel.getCardno()); | |
115 | 126 | setType(destModel.getType()); |
116 | 127 | setLastMenses(DateUtil.getYyyyMmDd(destModel.getLastMenses())); |
117 | 128 | setHospitalId(destModel.getHospitalId()); |