Commit 1b8adeecac5ed53bdc238eae67278c6de9a6c487
1 parent
8a30d964c4
Exists in
master
自动回访update
Showing 1 changed file with 8 additions and 6 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushChatInfoTask.java
View file @
1b8adee
... | ... | @@ -95,7 +95,8 @@ |
95 | 95 | |
96 | 96 | if (null!=chatgroup) { |
97 | 97 | final List<LymsReturnVisitRecord> returnVisitRecords = lymsReturnVisitRecordService.list(new QueryWrapper<LymsReturnVisitRecord>() |
98 | - .lambda().eq(LymsReturnVisitRecord::getPcid, (Integer)map.get("pcid"))); | |
98 | + .lambda().eq(LymsReturnVisitRecord::getPcid, (Integer)map.get("pcid")) | |
99 | + .eq(LymsReturnVisitRecord::getType, 0)); | |
99 | 100 | List<LymsDoctor> doctorAminList= lymsDoctorService.list(new QueryWrapper<LymsDoctor>() |
100 | 101 | .lambda().eq(LymsDoctor::getDpid, doctor.getDpid()) |
101 | 102 | .in(LymsDoctor::getAdminType, Arrays.asList(1,2)) |
... | ... | @@ -103,7 +104,7 @@ |
103 | 104 | int day = DateUtil.daysBetween(DateUtil.parseYMD(map.get("createdtime").toString()),new Date()); |
104 | 105 | switch (returnVisitRecords.size()) { |
105 | 106 | case 0: |
106 | - if (day==2) { | |
107 | + if (day==1) { | |
107 | 108 | //就诊医生回复 |
108 | 109 | final List<LymsIllness> lymsIllnessList = lymsIllnessService.list(new QueryWrapper<LymsIllness>() |
109 | 110 | .lambda().eq(LymsIllness::getPcid, (Integer) map.get("pcid"))); |
... | ... | @@ -125,7 +126,7 @@ |
125 | 126 | } |
126 | 127 | break; |
127 | 128 | case 1: |
128 | - if (day==5) { | |
129 | + if (day==4) { | |
129 | 130 | //获取值班护士回复 |
130 | 131 | String dlogin=""; |
131 | 132 | for (LymsDoctor lymsDoctor : doctorAminList) { |
... | ... | @@ -153,7 +154,7 @@ |
153 | 154 | } |
154 | 155 | break; |
155 | 156 | case 2: |
156 | - if (day==10) { | |
157 | + if (day==9) { | |
157 | 158 | //获取值班医生回复 |
158 | 159 | String dlogin=""; |
159 | 160 | for (LymsDoctor lymsDoctor : doctorAminList) { |
... | ... | @@ -182,7 +183,7 @@ |
182 | 183 | } |
183 | 184 | break; |
184 | 185 | case 3: |
185 | - if (day==20) { | |
186 | + if (day==19) { | |
186 | 187 | //就诊医生回复 |
187 | 188 | final List<LymsIllness> lymsIllnessList = lymsIllnessService.list(new QueryWrapper<LymsIllness>() |
188 | 189 | .lambda().eq(LymsIllness::getPcid, (Integer) map.get("pcid"))); |
... | ... | @@ -204,7 +205,7 @@ |
204 | 205 | } |
205 | 206 | break; |
206 | 207 | case 4: |
207 | - if (day==30) { | |
208 | + if (day==29) { | |
208 | 209 | //获取值班医生回复 |
209 | 210 | String dlogin=""; |
210 | 211 | for (LymsDoctor lymsDoctor : doctorAminList) { |
... | ... | @@ -362,6 +363,7 @@ |
362 | 363 | returnVisitRecord.setIdno(patient.getIdno()); |
363 | 364 | returnVisitRecord.setType(0); |
364 | 365 | returnVisitRecord.setHxgroupid(chatgroup.getHxgroupid()); |
366 | + returnVisitRecord.setPcid(chatgroup.getPcid()); | |
365 | 367 | final boolean save = lymsReturnVisitRecordService.save(returnVisitRecord); |
366 | 368 | if (!save) { |
367 | 369 | throw new RuntimeException("回滚状态,执行失败,请联系管理员"); |