Commit 9350c4ed44f5fda25c9ac51c68de88f6774136e2

Authored by cfl
1 parent edb7280ef9
Exists in dev

修改自测过程中的bug,增加部分注释

Showing 6 changed files with 104 additions and 95 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/XljcArchiveController.java View file @ 9350c4e
... ... @@ -5,7 +5,6 @@
5 5 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6 6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 7 import com.lyms.talkonlineweb.annotation.TokenRequired;
8   -import com.lyms.talkonlineweb.domain.ArticleInfo;
9 8 import com.lyms.talkonlineweb.domain.LymsDoctor;
10 9 import com.lyms.talkonlineweb.domain.LymsUser;
11 10 import com.lyms.talkonlineweb.domain.LymsXljcArchive;
... ... @@ -14,6 +13,7 @@
14 13 import com.lyms.talkonlineweb.service.LymsDoctorService;
15 14 import com.lyms.talkonlineweb.service.LymsUserService;
16 15 import com.lyms.talkonlineweb.service.LymsXljcArchiveService;
  16 +import com.lyms.talkonlineweb.util.BeanUtils;
17 17 import com.lyms.talkonlineweb.util.DateUtil;
18 18 import com.lyms.talkonlineweb.util.StringUtil;
19 19 import org.apache.poi.ss.usermodel.Workbook;
20 20  
21 21  
... ... @@ -24,14 +24,13 @@
24 24  
25 25 import javax.servlet.ServletOutputStream;
26 26 import javax.servlet.http.HttpServletResponse;
27   -import java.io.FileOutputStream;
28 27 import java.net.URLEncoder;
29   -import java.util.ArrayList;
30 28 import java.util.Date;
31 29 import java.util.List;
32 30  
33 31 /**
34 32 * 心理检测档案管理
  33 + * 档案管理已医院为维度,各种操作需要增加当前操作人员的所属医院条件
35 34 */
36 35  
37 36 @RestController
38 37  
39 38  
40 39  
... ... @@ -58,15 +57,15 @@
58 57 @PostMapping
59 58 @TokenRequired
60 59 public BaseResponse saveArchive(@RequestBody @Validated LymsXljcArchive archive,BindingResult result,@RequestHeader String authorization){
61   -
  60 + LymsUser curUser=lymsUserService.getUserByToken(authorization);
62 61 //身份证号转小写
63 62 archive.setIdno(archive.getIdno().toLowerCase());
64   -
65 63 QueryWrapper<LymsXljcArchive> query = new QueryWrapper<>();
66 64 query.eq("idno",archive.getIdno());
  65 + query.eq("hid",curUser.getHid());
67 66 LymsXljcArchive lymsXljcArchive = lymsXljcArchiveService.getOne(query);
68 67 if(lymsXljcArchive != null){
69   - return BaseResponse.error("该身份证号对应的档案已经存在");
  68 + return BaseResponse.error("该身份证号对应的档案已经在该医院存在");
70 69 }
71 70 if(result.hasErrors()){
72 71 BaseResponse baseResponse = new BaseResponse();
... ... @@ -81,7 +80,6 @@
81 80 archive.setHid(lymsDoctor.getHid());
82 81 archive.setDpid(lymsDoctor.getDpid());
83 82 archive.setAge(DateUtil.getAge(DateUtil.parseYMD(archive.getBirth())));
84   - LymsUser curUser=lymsUserService.getUserByToken(authorization);
85 83 archive.setCreatedby(curUser.getUid());
86 84 archive.setCreatedtime(new Date());
87 85 lymsXljcArchiveService.save(archive);
88 86  
89 87  
... ... @@ -92,12 +90,12 @@
92 90 @PutMapping
93 91 @TokenRequired
94 92 public BaseResponse updateArchive(@RequestBody @Validated LymsXljcArchive archive,BindingResult result,@RequestHeader String authorization){
95   -
  93 + LymsUser curUser=lymsUserService.getUserByToken(authorization);
96 94 //身份证号转小写
97 95 archive.setIdno(archive.getIdno().toLowerCase());
98   -
99 96 QueryWrapper<LymsXljcArchive> query = new QueryWrapper<>();
100 97 query.eq("idno",archive.getIdno());
  98 + query.eq("hid",curUser.getHid());
101 99 LymsXljcArchive lymsXljcArchive = lymsXljcArchiveService.getOne(query);
102 100 if(lymsXljcArchive != null && lymsXljcArchive.getId() != archive.getId()){
103 101 return BaseResponse.error("该身份证号对应的档案已经存在");
104 102  
... ... @@ -111,8 +109,11 @@
111 109 baseResponse.setErrorcode(1);
112 110 return baseResponse;
113 111 }
  112 + LymsDoctor lymsDoctor = lymsDoctorService.getById(archive.getBookbuilDoctor());
  113 + archive.setHid(lymsDoctor.getHid());
  114 + archive.setDpid(lymsDoctor.getDpid());
  115 + archive.setAge(DateUtil.getAge(DateUtil.parseYMD(archive.getBirth())));
114 116  
115   - LymsUser curUser=lymsUserService.getUserByToken(authorization);
116 117 archive.setUpdatedby(curUser.getUid());
117 118 archive.setUpdatedtime(new Date());
118 119 lymsXljcArchiveService.updateById(archive);
119 120  
120 121  
... ... @@ -129,9 +130,14 @@
129 130 @GetMapping("/{idno}")
130 131 @TokenRequired
131 132 public BaseResponse archiveByIdno(@PathVariable("idno") String idno,@RequestHeader String authorization){
  133 + LymsUser curUser=lymsUserService.getUserByToken(authorization);
132 134 QueryWrapper<LymsXljcArchive> query = new QueryWrapper<>();
133 135 query.eq("idno",idno);
  136 + query.eq("hid",curUser.getHid());
134 137 LymsXljcArchive lymsXljcArchive = lymsXljcArchiveService.getOne(query);
  138 + if(lymsXljcArchive != null){
  139 + lymsXljcArchive.setSexName(BeanUtils.tranferSexToText(lymsXljcArchive.getSex()));
  140 + }
135 141 return BaseResponse.ok(lymsXljcArchive);
136 142 }
137 143  
... ... @@ -144,6 +150,11 @@
144 150 @TokenRequired
145 151 public BaseResponse archiveList(@RequestBody ArchiveParam archiveParam,@RequestHeader String authorization, int current, int size){
146 152 QueryWrapper<LymsXljcArchive> query = new QueryWrapper<>();
  153 + LymsUser curUser=lymsUserService.getUserByToken(authorization);
  154 + if(curUser.getHid() != null){
  155 + query.eq("hid",curUser.getHid());
  156 + }
  157 +
147 158 if(StringUtil.isNotEmpty(archiveParam.getPname())){
148 159 query.eq("pname",archiveParam.getPname());
149 160 }
150 161  
151 162  
... ... @@ -153,16 +164,11 @@
153 164 if(StringUtil.isNotEmpty(archiveParam.getTel())){
154 165 query.eq("tel",archiveParam.getTel());
155 166 }
156   - //未指定建档医生,则根据登录用户所属医院
157 167 if(archiveParam.getBookbuilDoctor() != null){
158 168 query.eq("bookbuil_doctor",archiveParam.getBookbuilDoctor());
159   - }else {
160   - LymsUser curUser=lymsUserService.getUserByToken(authorization);
161   - if(curUser.getHid() != null){
162   - query.eq("hid",curUser.getHid());
163   - }
164 169 }
165 170  
  171 +
166 172 if(StringUtil.isNotEmpty(archiveParam.getBookbuilDateStart())){
167 173 query.gt("bookbuil_date", DateUtil.parseYMD(archiveParam.getBookbuilDateStart()));
168 174 }
169 175  
... ... @@ -170,14 +176,21 @@
170 176 query.lt("bookbuil_date", DateUtil.parseYMDHMS(archiveParam.getBookbuilDateEnd() + " 23:59:59" ));
171 177 }
172 178 Page<LymsXljcArchive> page = new Page<>(current,size);
173   - Page<LymsXljcArchive> articlePagePage = lymsXljcArchiveService.page(page,query.orderByDesc("bookbuil_date"));
174   - return BaseResponse.ok(articlePagePage);
  179 + Page<LymsXljcArchive> archivePage = lymsXljcArchiveService.page(page,query.orderByDesc("bookbuil_date"));
  180 + for(LymsXljcArchive archive : archivePage.getRecords() ){
  181 + archive.setSexName(BeanUtils.tranferSexToText(archive.getSex()));
  182 + }
  183 + return BaseResponse.ok(archivePage);
175 184 }
176 185  
177 186 @PostMapping("/export")
178 187 public void archiveExport(@RequestBody ArchiveParam archiveParam, @RequestHeader String authorization, HttpServletResponse response)
179 188 throws Exception{
180 189 QueryWrapper<LymsXljcArchive> query = new QueryWrapper<>();
  190 + LymsUser curUser=lymsUserService.getUserByToken(authorization);
  191 + if(curUser.getHid() != null){
  192 + query.eq("hid",curUser.getHid());
  193 + }
181 194 if(StringUtil.isNotEmpty(archiveParam.getPname())){
182 195 query.eq("pname",archiveParam.getPname());
183 196 }
184 197  
... ... @@ -187,12 +200,8 @@
187 200 if(StringUtil.isNotEmpty(archiveParam.getTel())){
188 201 query.eq("tel",archiveParam.getTel());
189 202 }
190   - //未指定建档医生,则根据登录用户所属医院
191 203 if(archiveParam.getBookbuilDoctor() != null){
192 204 query.eq("bookbuil_doctor",archiveParam.getBookbuilDoctor());
193   - }else {
194   - LymsUser curUser=lymsUserService.getUserByToken(authorization);
195   - query.eq("hid",curUser.getHid());
196 205 }
197 206  
198 207 if(StringUtil.isNotEmpty(archiveParam.getBookbuilDateStart())){
... ... @@ -203,10 +212,10 @@
203 212 }
204 213 List<LymsXljcArchive> LymsXljcArchiveList = lymsXljcArchiveService.list(query.orderByDesc("bookbuil_date"));
205 214 int size = LymsXljcArchiveList.size();
206   - for(int i = 1;i <= size; i++){
207   - LymsXljcArchive archive = LymsXljcArchiveList.get(i - 1);
208   - archive.setSequence(i);
209   - archive.setSexName(archive.getSex()==1?"男":"女");
  215 + for(int i = 0 ;i <= size; i++){
  216 + LymsXljcArchive archive = LymsXljcArchiveList.get(i);
  217 + archive.setSequence(i+1);
  218 + archive.setSexName(BeanUtils.tranferSexToText(archive.getSex()));
210 219 }
211 220 Workbook result = ExcelExportUtil.exportExcel(
212 221 new ExportParams("心理检测患者档案表", "档案列表"),
... ... @@ -222,39 +231,6 @@
222 231 outputStream.close();
223 232 result.close();
224 233 }
225   -
226   -
227   -
228   -
229   - public static void main(String[] args) throws Exception {
230   - List<LymsXljcArchive> list = new ArrayList<>();
231   -
232   - LymsXljcArchive archive = new LymsXljcArchive();
233   - archive.setPname("A");
234   - archive.setAge(30);
235   - archive.setIdno("111111111");
236   - archive.setTel("13811111111");
237   - archive.setSex(1);
238   - archive.setBookbuilDate(new Date());
239   - archive.setBookbuilDoctorName("柴医生");
240   - list.add(archive);
241   -
242   - for(int i = 1 ; i<= list.size();i++){
243   - LymsXljcArchive archive1 = list.get(i - 1);
244   - archive1.setSequence(i);
245   - archive1.setSexName(archive1.getSex()==1?"男":"女");
246   - }
247   -
248   - ExportParams exportParams = new ExportParams("患者档案表", "档案列表");
249   - //exportParams.setAddIndex(true);
250   -
251   - Workbook sheets = ExcelExportUtil.exportExcel(exportParams, LymsXljcArchive.class, list);
252   - FileOutputStream stream = new FileOutputStream("D:\\aa.xls");
253   - sheets.write(stream);
254   - stream.close();
255   - sheets.close();
256   - }
257   -
258 234  
259 235  
260 236 }
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/XljcFormController.java View file @ 9350c4e
... ... @@ -10,11 +10,9 @@
10 10 import com.lyms.talkonlineweb.domain.LymsXljcRecord;
11 11 import com.lyms.talkonlineweb.request.ExamineRecordListRequest;
12 12 import com.lyms.talkonlineweb.request.XljcExamineRequest;
13   -import com.lyms.talkonlineweb.request.XljcPatientRequest;
14 13 import com.lyms.talkonlineweb.result.BaseResponse;
15 14 import com.lyms.talkonlineweb.result.ExamineRecordCount;
16 15 import com.lyms.talkonlineweb.result.HisExamineRecord;
17   -import com.lyms.talkonlineweb.result.XljcPatientResult;
18 16 import com.lyms.talkonlineweb.service.*;
19 17 import com.lyms.talkonlineweb.util.BeanUtils;
20 18 import com.lyms.talkonlineweb.util.StringUtil;
21 19  
22 20  
23 21  
... ... @@ -65,17 +63,18 @@
65 63 if(archId == null && StringUtil.isEmpty(idno)){
66 64 return BaseResponse.error("档案ID或者身份证号必须选择一个");
67 65 }
68   -
  66 + LymsUser curUser=lymsUserService.getUserByToken(authorization);
69 67 if(archId == null){
70 68 QueryWrapper<LymsXljcArchive> query = new QueryWrapper<>();
71 69 query.eq("idno",idno);
  70 + query.eq("hid",curUser.getHid());
72 71 LymsXljcArchive lymsXljcArchive = lymsXljcArchiveService.getOne(query);
73 72 if(lymsXljcArchive == null){
74   - return BaseResponse.error("该身份证号未创建档案");
  73 + return BaseResponse.error("该身份证号在该医院未创建档案");
75 74 }
76 75 archId = lymsXljcArchive.getId();
77 76 }
78   - LymsUser curUser=lymsUserService.getUserByToken(authorization);
  77 +
79 78 LymsXljcRecord record = new LymsXljcRecord();
80 79 record.setArchId(archId);
81 80 record.setExamineHid(curUser.getHid());
... ... @@ -153,7 +152,8 @@
153 152 }
154 153  
155 154 /**
156   - * 根据id查询检测记录,用于回显
  155 + * 检测数量统计 按量表种类/医院
  156 + * 该功能超级管理员可查看
157 157 * @param recordListRequest
158 158 * @param authorization
159 159 * @return
... ... @@ -162,6 +162,7 @@
162 162 @TokenRequired
163 163 public BaseResponse countExamineRecordGroupByFormType(ExamineRecordListRequest recordListRequest,@RequestHeader String authorization) {
164 164 LymsUser curUser=lymsUserService.getUserByToken(authorization);
  165 + //超级管理员分配该菜单,对应医院为空
165 166 if(curUser.getHid() != null){
166 167 recordListRequest.setExamineHid(curUser.getHid());
167 168 }
talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsIllnessMapper.java View file @ 9350c4e
... ... @@ -2,11 +2,21 @@
2 2  
3 3 import com.lyms.talkonlineweb.domain.LymsIllness;
4 4 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  5 +import org.apache.ibatis.annotations.Param;
5 6  
6 7 /**
7 8 * @Entity com.lyms.talkonlineweb.domain.LymsIllness
8 9 */
9 10 public interface LymsIllnessMapper extends BaseMapper<LymsIllness> {
  11 +
  12 + /**
  13 + * 查询患者在该医院是否有过诊断的病例信息
  14 + * @param pid
  15 + * @param illCode
  16 + * @param hid
  17 + * @return
  18 + */
  19 + Integer queryPatientHasIllnessCode(@Param("pid") Integer pid, @Param("illCode") Integer illCode,@Param("hid") Integer hid);
10 20  
11 21 }
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsXljcRecordServiceImpl.java View file @ 9350c4e
... ... @@ -103,24 +103,27 @@
103 103 LymsXljcRecordTrace lastRecordTrace = lymsXljcRecordTraceService.getOne(query.orderByDesc("next_examine_date"));
104 104 if(lastRecordTrace != null ){
105 105 log.info("存在未结束的追访记录,archId={}",record.getArchId());
106   - int days = DateUtil.daysBetween(lastRecordTrace.getNextExamineDate(), new Date());
  106 + int days = DateUtil.daysBetween(lastRecordTrace.getNextExamineDate(),currentDate);
107 107 LymsXljcRecordTrace trace = new LymsXljcRecordTrace();
108 108 trace.setId(lastRecordTrace.getId());
109 109 //大于7天,状态变为自主结束
110 110 if(days > 7){
111 111 trace.setNextExamineStatus(TraceStatusEnum.AUTO_TRACE.getCode());
112 112 }else{
  113 + //小于等于7天来院检测,带追访记录标记作废,列表中看不到
113 114 trace.setYn(0);
114 115 }
115 116 lymsXljcRecordTraceService.updateById(trace);
116 117 }
117 118  
  119 + //生成本次待追访记录
118 120 if(xljcExamineRequest.getNextExamineDate() != null){
119 121 LymsXljcRecordTrace trace = new LymsXljcRecordTrace();
120 122 trace.setArchId(record.getArchId());
121 123 trace.setRid(record.getId());
122 124 trace.setNextExamineDate(xljcExamineRequest.getNextExamineDate());
123 125 trace.setNextExamineStatus(0);
  126 + trace.setYn(1);
124 127 trace.setCreatedby(curUser.getUid());
125 128 trace.setCreatedtime(currentDate);
126 129 lymsXljcRecordTraceService.save(trace);
127 130  
... ... @@ -143,11 +146,11 @@
143 146 public XljcExamineRequest queryRecordById(Integer rid) {
144 147 LymsXljcRecord record = lymsXljcRecordMapper.selectById(rid);
145 148 QueryWrapper<LymsXljcRecordResult> queryWrapper = new QueryWrapper();
146   - queryWrapper.eq("r_id",rid);
  149 + queryWrapper.eq("rid",rid);
147 150 LymsXljcRecordResult recordResult = lymsXljcRecordResultService.getOne(queryWrapper);
148 151  
149 152 QueryWrapper<LymsXljcRecordAnswer> query = new QueryWrapper();
150   - query.eq("r_id",rid);
  153 + query.eq("rid",rid);
151 154 List<LymsXljcRecordAnswer> recordAnswers = lymsXljcRecordAnswerService.list(query);
152 155  
153 156 XljcExamineRequest request = new XljcExamineRequest();
... ... @@ -200,6 +203,7 @@
200 203 LymsPatient patientQuery = new LymsPatient();
201 204 patientQuery.setIdno(archive.getIdno());
202 205 LymsPatient patient = lymsPatientService.getOne(Wrappers.query(patientQuery));
  206 +
203 207 if(patient == null){
204 208 patient = new LymsPatient();
205 209 patient.setPname(archive.getPname());
... ... @@ -216,7 +220,7 @@
216 220 }
217 221  
218 222 //病例中机构等信息取record表数据,不取档案表数据
219   - LymsDoctor lymsDoctor = lymsDoctorService.getById(lymsXljcRecord.getExamineDoctor());
  223 + LymsDoctor examineDoctor = lymsDoctorService.getById(lymsXljcRecord.getExamineDoctor());
220 224 LymsHdepart lymsHdepart = lymsHdepartService.getById(lymsXljcRecord.getExamineDpid());
221 225  
222 226 LymsPcase pcase = new LymsPcase();
223 227  
... ... @@ -227,9 +231,9 @@
227 231 pcase.setDid(lymsHdepart.getDid());
228 232 pcase.setDname(lymsHdepart.getDname());
229 233 pcase.setDtid(lymsXljcRecord.getExamineDoctor());
230   - pcase.setDtname(lymsDoctor.getDname());
  234 + pcase.setDtname(examineDoctor.getDname());
231 235 pcase.setCreatedby(currentUser.getUid());
232   - pcase.setCreated(currentDate);
  236 + pcase.setCreatedtime(currentDate);
233 237 lymsPcaseService.save(pcase);
234 238  
235 239 LymsIllness ness = new LymsIllness();
talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/XljcTracePushTask.java View file @ 9350c4e
... ... @@ -30,50 +30,58 @@
30 30  
31 31 @Scheduled(cron = "0 0 16 * * ?")
32 32 public void pushArtcleData(){
  33 + log.info("推送心理检测预约通知开始");
33 34  
34 35 List<LymsXljcTracePushRecord> tracePushRecords = lymsXljcTracePushRecordService.queryNeedPushRecords();
35 36 if(CollectionUtils.isEmpty(tracePushRecords)){
36 37 log.warn("不存在需要推送心理检测预约通知的数据");
37 38 return;
38 39 }
  40 +
  41 + log.info("推送心理检测预约通知,size={}",tracePushRecords.size());
  42 +
39 43 Date currentDate = new Date();
40 44 for(LymsXljcTracePushRecord record: tracePushRecords){
41   - try{
  45 + try {
42 46 record.setStatus(2);
43 47 record.setPushTime(new Date());
44 48 record.setCreatedby(1);
45 49 record.setCreatedtime(currentDate);
46   - if(record.getPid() == null){
  50 + if (record.getPid() == null) {
47 51 record.setMsg("该档案未查询到患者信息");
48   - }else if(StringUtil.isEmpty(record.getGzopenid())){
  52 + } else if (StringUtil.isEmpty(record.getGzopenid())) {
49 53 record.setMsg("该患者未关注公众号");
50   - }else{
51   - Map<String,Object> map=new HashMap<>();
52   - map.put("first",new DataEntity("您预约了"+ DateUtil.getDateTime(record.getNextExamineDate(),"yyyy年MM月dd日")+"复查,请及时复诊","#173177"));
53   - map.put("keyword1",new DataEntity(record.getPname(),"#173177"));
54   - map.put("keyword2",new DataEntity(record.getHname(),"#173177"));
55   - map.put("keyword3",new DataEntity(record.getDpName(),"#173177"));
56   - map.put("keyword4",new DataEntity(record.getDname(),"#173177"));
57   - map.put("keyword5",new DataEntity(record.getDiagnosis(),"#173177"));
58   - map.put("remark",new DataEntity("请遵医嘱及时复诊。","#173177"));
59   - Map<String,Object> mapInfo=new HashMap<>();
60   - Integer code= WeiXinUtil.SendWeChatMsg(record.getGzopenid(), Constant.GZ_TEMPLATE_ID_RETURN_VISIT,map,mapInfo);
61   - //公众号跳转小程序需要的登录信息
62   - if(null==code||code!=0){
63   - record.setMsg("推送心理检测预约通知失败!; code:"+code);
64   - }else{
65   - record.setStatus(1);
  54 + } else {
  55 + Map<String, Object> map = new HashMap<>();
  56 + map.put("first", new DataEntity("您预约了" + DateUtil.getDateTime(record.getNextExamineDate(), "yyyy年MM月dd日") + "复查,请及时复诊", "#173177"));
  57 + map.put("keyword1", new DataEntity(record.getPname(), "#173177"));
  58 + map.put("keyword2", new DataEntity(record.getHname(), "#173177"));
  59 + map.put("keyword3", new DataEntity(record.getDpName(), "#173177"));
  60 + map.put("keyword4", new DataEntity(record.getDname(), "#173177"));
  61 + map.put("keyword5", new DataEntity(record.getDiagnosis(), "#173177"));
  62 + map.put("remark", new DataEntity("请遵医嘱及时复诊。", "#173177"));
  63 + Map<String, Object> mapInfo = new HashMap<>();
  64 + try {
  65 + Integer code = WeiXinUtil.SendWeChatMsg(record.getGzopenid(), Constant.GZ_TEMPLATE_ID_RETURN_VISIT, map, mapInfo);
  66 + //公众号跳转小程序需要的登录信息
  67 + if (null == code || code != 0) {
  68 + record.setMsg("推送心理检测预约通知失败!; code:" + code);
  69 + } else {
  70 + record.setStatus(1);
  71 + }
  72 + } catch (Exception e) {
  73 + log.error("推送心理检测预约通知公众号请求异常,LymsXljcTracePushRecord={}", record, e);
  74 + record.setMsg("推送心理检测预约通知失败,msg=" + e.getMessage());
66 75 }
  76 +
67 77 }
68 78 lymsXljcTracePushRecordService.saveOrUpdate(record);
69   -
70   - }catch (Exception e){
71   - log.error("推送心理检测预约通知异常,LymsXljcTracePushRecord={}",record,e);
  79 + }catch (Exception ee){
  80 + log.error("推送心理检测预约通知异常,LymsXljcTracePushRecord={}", record, ee);
72 81 }
73 82  
74 83 }
75   -
76   -
  84 + log.info("推送心理检测预约通知结束");
77 85  
78 86 }
79 87  
talkonlineweb/src/main/resources/mapper/LymsIllnessMapper.xml View file @ 9350c4e
... ... @@ -19,5 +19,15 @@
19 19 createdby,createdtime,updatedby,
20 20 updated_time
21 21 </sql>
  22 +
  23 + <select id="queryPatientHasIllnessCode" resultType="java.lang.Integer">
  24 + select count(1)
  25 + from lyms_pcase pcase,
  26 + lyms_illness i
  27 + where pcase.pcid = i.pcid
  28 + and pcase.pid = #{pid}
  29 + and pcase.hid = #{hid}
  30 + and i.iid = #{illCode}
  31 + </select>
22 32 </mapper>