Commit 7b97f50c46b196e1cddfb3ef163e9c3a77d6f05c
1 parent
62f14b2315
Exists in
master
and in
1 other branch
增加权限
Showing 2 changed files with 18 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/VisitFacade.java
View file @
7b97f50
... | ... | @@ -152,7 +152,7 @@ |
152 | 152 | public BaseResponse addOneVisit(VisitAddRequest visitRequest) { |
153 | 153 | // 获取患者id |
154 | 154 | String parentId = visitRequest.getParentId(); |
155 | - if (StringUtils.isNotEmpty(parentId)) { | |
155 | + if (StringUtils.isNotBlank(parentId)) { | |
156 | 156 | Patients model; |
157 | 157 | PatientsQuery patientsQuery = new PatientsQuery(); |
158 | 158 | patientsQuery.setId(parentId); |
159 | 159 | |
160 | 160 | |
... | ... | @@ -174,13 +174,14 @@ |
174 | 174 | Patients patients = visitRequest.getPatients(); |
175 | 175 | patients.setType(3); |
176 | 176 | patients.setYn(1); |
177 | + patients.setId(null); | |
177 | 178 | parentId = patientsService.addPatient(patients).getId(); |
178 | 179 | } |
179 | 180 | |
180 | 181 | // 如果为空表示新增 |
181 | - if (StringUtils.isEmpty(visitRequest.getRequestVisit().getId())) { | |
182 | + if (StringUtils.isBlank(visitRequest.getRequestVisit().getId())) { | |
182 | 183 | VisitModel visitModel = visitRequest.getRequestVisit(); |
183 | - if (StringUtils.isNotEmpty(parentId)) { | |
184 | + if (StringUtils.isNotBlank(parentId)) { | |
184 | 185 | visitModel.setParentId(parentId); |
185 | 186 | } |
186 | 187 | visitService.addVisit(visitModel); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/VisitResult.java
View file @
7b97f50
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | public class VisitResult { |
14 | 14 | private String name; |
15 | 15 | |
16 | - private int age; | |
16 | + private String age; | |
17 | 17 | |
18 | 18 | private String cardNo; |
19 | 19 | |
... | ... | @@ -27,6 +27,8 @@ |
27 | 27 | |
28 | 28 | private List<SimpleVisit> data; |
29 | 29 | |
30 | + private String phone; | |
31 | + | |
30 | 32 | private String id; |
31 | 33 | |
32 | 34 | public String getId() { |
33 | 35 | |
... | ... | @@ -45,11 +47,11 @@ |
45 | 47 | this.name = name; |
46 | 48 | } |
47 | 49 | |
48 | - public int getAge() { | |
50 | + public String getAge() { | |
49 | 51 | return age; |
50 | 52 | } |
51 | 53 | |
52 | - public void setAge(int age) { | |
54 | + public void setAge(String age) { | |
53 | 55 | this.age = age; |
54 | 56 | } |
55 | 57 | |
56 | 58 | |
57 | 59 | |
58 | 60 | |
... | ... | @@ -101,16 +103,24 @@ |
101 | 103 | this.data = data; |
102 | 104 | } |
103 | 105 | |
106 | + public String getPhone() { | |
107 | + return phone; | |
108 | + } | |
104 | 109 | |
110 | + public void setPhone(String phone) { | |
111 | + this.phone = phone; | |
112 | + } | |
113 | + | |
105 | 114 | public void convertToResult1(Patients model,Address address) { |
106 | 115 | try { |
107 | 116 | setAddress(address); |
108 | 117 | } catch (Exception e) { |
109 | 118 | } |
110 | 119 | try { |
111 | - setAge(model.getAge()); | |
120 | + setAge(DateUtil.getyyyy_MM_dd(model.getBirth())); | |
112 | 121 | }catch (Exception e){ |
113 | 122 | } |
123 | + setPhone(model.getPhone()); | |
114 | 124 | setId(model.getId()); |
115 | 125 | // setCardNo(null==model.getCardNo()?"":model.getCardNo()); |
116 | 126 | setCardNo(null==model.getPhone()?"":model.getPhone()); |