Commit 97e6a9b2544bf0f7b93ca8369e2334f94a7fa817
1 parent
c5c9597430
Exists in
master
update
Showing 1 changed file with 5 additions and 19 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
97e6a9b
... | ... | @@ -81,33 +81,20 @@ |
81 | 81 | if (group.getOwnerk() == null) { |
82 | 82 | group.setOwnerk("test"); |
83 | 83 | } |
84 | + LymsPatient patient= lymsPatientService.getOne(new QueryWrapper<LymsPatient>() | |
85 | + .lambda().eq(LymsPatient::getIdno, group.getFromp())); | |
86 | + LymsDoctor doctor= lymsDoctorService.getOne(new QueryWrapper<LymsDoctor>() | |
87 | + .lambda().eq(LymsDoctor::getDlogin, group.getTarget())); | |
84 | 88 | if (gLst.size() > 0) { |
85 | 89 | LymsChatgroup group2 = gLst.get(0); |
86 | 90 | group = group2; |
87 | 91 | //回访的状态才去执行 |
88 | - if (1==group2.getType()) { | |
92 | + if (1==gLst.get(0).getType()) { | |
89 | 93 | group2.setStat(0); |
90 | 94 | //修改群组状态 |
91 | 95 | lymsChatgroupService.updateById(group2); |
92 | - //添加回访记录 | |
93 | - LymsPatient patient= lymsPatientService.getOne(new QueryWrapper<LymsPatient>() | |
94 | - .lambda().eq(LymsPatient::getIdno, group.getFromp())); | |
95 | - LymsDoctor doctor= lymsDoctorService.getOne(new QueryWrapper<LymsDoctor>() | |
96 | - .lambda().eq(LymsDoctor::getDlogin, group.getTarget())); | |
97 | - LymsReturnVisitRecord returnVisitRecord=new LymsReturnVisitRecord(); | |
98 | - returnVisitRecord.setDlogin(group.getRetDlogin());//前端传的当前登录医生账号 | |
99 | - returnVisitRecord.setDpid(doctor.getDpid()); | |
100 | - returnVisitRecord.setIdno(patient.getIdno()); | |
101 | - returnVisitRecord.setType(1); | |
102 | - returnVisitRecord.setPcid(group.getPcid()); | |
103 | - returnVisitRecord.setHxgroupid(group2.getHxgroupid()); | |
104 | - lymsReturnVisitRecordService.save(returnVisitRecord); | |
105 | 96 | } |
106 | 97 | } else { |
107 | - LymsPatient patient= lymsPatientService.getOne(new QueryWrapper<LymsPatient>() | |
108 | - .lambda().eq(LymsPatient::getIdno, group.getFromp())); | |
109 | - LymsDoctor doctor= lymsDoctorService.getOne(new QueryWrapper<LymsDoctor>() | |
110 | - .lambda().eq(LymsDoctor::getDlogin, group.getTarget())); | |
111 | 98 | List<String> adminDlogins=new ArrayList<>(); |
112 | 99 | adminDlogins.add(group.getFromp()); |
113 | 100 | List<String> groupnames=new ArrayList<>(); |
... | ... | @@ -197,7 +184,6 @@ |
197 | 184 | //不作为条件查询 |
198 | 185 | Integer type=chatgroup.getType(); |
199 | 186 | chatgroup.setType(null); |
200 | -// chatgroup = lymsChatgroupService.getOne(Wrappers.query(chatgroup)); | |
201 | 187 | List<LymsChatgroup> gLst = lymsChatgroupService.list(Wrappers.query(chatgroup).orderByDesc("id")); |
202 | 188 | |
203 | 189 | if (gLst.size()>0){ |