Commit 68e1ee6767cd09869b9a37584b846d5a3285244f
1 parent
f875ee7005
Exists in
master
and in
1 other branch
患者小程序端,注册用户
Showing 1 changed file with 7 additions and 2 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
68e1ee6
| ... | ... | @@ -134,7 +134,7 @@ |
| 134 | 134 | } else { |
| 135 | 135 | patient.setId(patient2.getId()); |
| 136 | 136 | patient.setUpdatedtime(new Date()); |
| 137 | - patient.setCcnt(patient2.getCcnt()+patient.getCcnt()); | |
| 137 | + patient.setCcnt(patient2.getCcnt()+ (null== patient.getCcnt()?0:patient.getCcnt())); | |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | if (result.hasErrors()) { |
| ... | ... | @@ -146,6 +146,11 @@ |
| 146 | 146 | return baseResponse; |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | + | |
| 150 | + if (!StringUtils.isEmpty(patient.getCode())) { | |
| 151 | + patient.setOpenid(WeiXinUtil.getWxOpenId(patient.getCode())); | |
| 152 | + } | |
| 153 | + | |
| 149 | 154 | boolean f = lymsPatientService.saveOrUpdate(patient); |
| 150 | 155 | |
| 151 | 156 | // 添加病例 |
| ... | ... | @@ -198,7 +203,7 @@ |
| 198 | 203 | |
| 199 | 204 | lymsTcardService.saveOrUpdate(tcard); |
| 200 | 205 | } |
| 201 | - | |
| 206 | + baseResponse.setObject(patient); | |
| 202 | 207 | baseResponse.setErrorcode(f == true ? 0 : 1); |
| 203 | 208 | return baseResponse; |
| 204 | 209 | } |