Commit 3598907a5f51b1f2b2fd021ffd3d018b006293ba
1 parent
e4a508f683
Exists in
master
and in
1 other branch
修复患者/医生删除时同时删除环信账户。修复问诊卡默认给4张
Showing 3 changed files with 17 additions and 5 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java
View file @
3598907
... | ... | @@ -168,8 +168,12 @@ |
168 | 168 | BaseResponse baseResponse=new BaseResponse(); |
169 | 169 | boolean f=lymsDoctorService.removeById(doctor.getDid()); |
170 | 170 | if (f){ |
171 | - JSONObject rs=hxService.delUser(doctor.getDlogin()); | |
172 | - log.info(rs); | |
171 | + final LymsDoctor lymsDoctor = lymsDoctorService.getById(doctor.getDid()); | |
172 | + if (StringUtil.isNotEmpty(lymsDoctor.getHxid())) { | |
173 | + JSONObject rs=hxService.delUser(doctor.getDlogin()); | |
174 | + log.info(rs); | |
175 | + } | |
176 | + | |
173 | 177 | } |
174 | 178 | //保存操作记录 |
175 | 179 | lymsLogsCrud(doctor,null); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
3598907
... | ... | @@ -292,6 +292,14 @@ |
292 | 292 | public BaseResponse delPatient(int id) { |
293 | 293 | BaseResponse baseResponse = new BaseResponse(); |
294 | 294 | boolean f = lymsPatientService.removeById(id); |
295 | + if (f){ | |
296 | + final LymsPatient patient = lymsPatientService.getById(id); | |
297 | + if (StringUtil.isNotEmpty(patient.getHxid())) { | |
298 | + JSONObject rs=hxService.delUser(patient.getIdno()); | |
299 | + log.info(rs); | |
300 | + } | |
301 | + | |
302 | + } | |
295 | 303 | baseResponse.setErrorcode(f == true ? 0 : 1); |
296 | 304 | return baseResponse; |
297 | 305 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsHisInfoServiceImpl.java
View file @
3598907
... | ... | @@ -228,7 +228,8 @@ |
228 | 228 | if (!StringUtil.isEmpty(patient.getCode())) { |
229 | 229 | patient.setOpenid(WeiXinUtil.getWxOpenId(patient.getCode())); |
230 | 230 | } |
231 | - | |
231 | + //his患者上传默认给4张问诊卡 | |
232 | + patient.setCcnt(4); | |
232 | 233 | boolean f = lymsPatientService.saveOrUpdate(patient); |
233 | 234 | |
234 | 235 | // 添加病例 |
... | ... | @@ -269,8 +270,7 @@ |
269 | 270 | } |
270 | 271 | |
271 | 272 | Date instDate = new Date(); |
272 | - //需要添加医院购买卡记录(his患者上传默认给4张问诊卡) | |
273 | - patient.setCcnt(4); | |
273 | + //需要添问诊卡记录 | |
274 | 274 | for (int i = 0; i < patient.getCcnt() && Objects.nonNull(patient.getCcnt()); i++) { |
275 | 275 | LymsTcard tcard = new LymsTcard(); |
276 | 276 | tcard.setCnt(1); |