diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java index 4280caa..8b1851b 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java @@ -130,12 +130,7 @@ public class ChatGroupController { groupnames.add(patient.getPname()); //患者注册环信 if (StringUtil.isEmpty(patient.getHxid())) { - JSONObject json = hxService.addUser(patient.getIdno(), Constant.COMMON_PASSWD, patient.getPname()); - JSONArray rArr = json.getJSONArray("entities"); - if (rArr.size() > 0) { - patient.setHxid(rArr.getJSONObject(0).getString("uuid")); - lymsPatientService.updateById(patient); - } + patient = lymsPatientService.addPatientHxId(patient); } //查询值班医生 List doctorAminList= lymsDoctorService.list(new QueryWrapper() @@ -145,12 +140,7 @@ public class ChatGroupController { //科室值班医生注册环信 for (LymsDoctor lymsDoctor : doctorAminList) { if(StringUtil.isEmpty(lymsDoctor.getHxid())) { - JSONObject json = hxService.addUser(lymsDoctor.getDlogin(), Constant.COMMON_PASSWD, lymsDoctor.getDname()); - JSONArray rArr = json.getJSONArray("entities"); - if (rArr.size() > 0) { - lymsDoctor.setHxid(rArr.getJSONObject(0).getString("uuid")); - lymsDoctorService.updateById(lymsDoctor); - } + lymsDoctorService.addDoctorHxId(lymsDoctor); } adminDlogins.add(lymsDoctor.getDlogin()); groupnames.add(lymsDoctor.getDname()); @@ -158,12 +148,7 @@ public class ChatGroupController { if ( ! adminDlogins.contains(doctor.getDlogin())) { //医生注册环信 if (StringUtil.isEmpty(doctor.getHxid())) { - JSONObject json = hxService.addUser(doctor.getDlogin(), Constant.COMMON_PASSWD, doctor.getDname()); - JSONArray rArr = json.getJSONArray("entities"); - if (rArr.size() > 0) { - doctor.setHxid(rArr.getJSONObject(0).getString("uuid")); - lymsDoctorService.updateById(doctor); - } + lymsDoctorService.addDoctorHxId(doctor); adminDlogins.add(doctor.getDlogin()); groupnames.add(doctor.getDname()); } @@ -328,16 +313,16 @@ public class ChatGroupController { payload.put("unread_num", row.get("unread_num")); - String to = payload.getString("to"); + String hxgroupid = payload.getString("to"); LymsTkrecord tkrecord = new LymsTkrecord(); - tkrecord.setHxgroupid(to); - List rLst = lymsTkrecordService.list(Wrappers.query(tkrecord)); + tkrecord.setHxgroupid(hxgroupid); + List rLst = lymsTkrecordService.list(Wrappers.query(tkrecord).orderByDesc("createdtime")); payload.put("stat", 0); if (rLst.size() > 0) { payload.put("stat", rLst.get(0).getStat()); } LymsChatgroup chatgroup = new LymsChatgroup(); - chatgroup.setHxgroupid(to); + chatgroup.setHxgroupid(hxgroupid); List cLst = lymsChatgroupService.list(Wrappers.query(chatgroup)); if (cLst.size() > 0) { @@ -370,7 +355,7 @@ public class ChatGroupController { getChatRecord(rs, jsonObject); } catch (IOException e) { - e.printStackTrace(); + log.error("getSessionListInfo exception",e); } baseResponse.setObject(rs); return baseResponse; @@ -559,12 +544,14 @@ public class ChatGroupController { final boolean b = lymsChatgroupService.updateById(chatgroup); if(!b){ baseResponse.setErrorcode(1); + log.error("updateGroupStat回滚LymsChatgroup失败,{}",chatgroup); throw new RuntimeException("回滚状态,执行失败,请联系管理员"); } final PatientInfo patientInfo = patientInfoService.getOne(new QueryWrapper() .lambda().eq(PatientInfo::getCid, chatgroup.getPcid())); if (null==patientInfo) { baseResponse.setErrorcode(1); + log.error("updateGroupStat回滚查询患者信息失败,{}",chatgroup); throw new RuntimeException("回滚状态,执行失败,请联系管理员"); } LymsTkrecord tkrecord=new LymsTkrecord(); @@ -572,27 +559,25 @@ public class ChatGroupController { tcard.setPid(patientInfo.getId()); tcard.setPcid(patientInfo.getCid()); // 获取问诊卡按照先从医院购买的问诊卡消费 - List rLst = lymsTcardService.list(Wrappers.query(tcard).notInSql("id", "SELECT r.cid FROM lyms_tkrecord r").orderByDesc("fid")); - -// 小程序购买的问诊卡 - tcard.setPcid(null); - tcard.setFid(1); - List xLst = lymsTcardService.list(Wrappers.query(tcard).notInSql("id", "SELECT r.cid FROM lyms_tkrecord r").orderByDesc("fid")); - - if (rLst.size() > 0 || xLst.size() > 0) { - if (rLst.size() > 0) { - tkrecord.setCid(rLst.get(0).getId()); - tkrecord.setFid((byte) 2); - } else { + List rLst = lymsTcardService.queryUnused(tcard); + if (rLst.size() > 0) { + tkrecord.setCid(rLst.get(0).getId()); + tkrecord.setFid((byte) 2); + }else{ + //小程序购买的问诊卡 + tcard.setPcid(null); + tcard.setFid(1); + List xLst = lymsTcardService.queryUnused(tcard);//lymsTcardService.list(Wrappers.query(tcard).notInSql("id", "SELECT r.cid FROM lyms_tkrecord r").orderByDesc("fid")); + if (xLst.size() > 0) { tkrecord.setCid(xLst.get(0).getId()); tkrecord.setFid((byte) 1); + }else{ + baseResponse.setErrorcode(1); + throw new RuntimeException("已经没有咨询卡,请联系客服购买!"); } - - } else { - baseResponse.setErrorcode(1); - throw new RuntimeException("已经没有咨询卡,请联系客服购买!"); } + tkrecord.setPid(patientInfo.getId()); tkrecord.setPcid(patientInfo.getCid()); tkrecord.setDid(patientInfo.getDtid()); @@ -602,6 +587,7 @@ public class ChatGroupController { final boolean save = lymsTkrecordService.save(tkrecord); if (!save) { baseResponse.setErrorcode(1); + log.error("updateGroupStat回滚保存tkrecode失败,{}",chatgroup); throw new RuntimeException("回滚状态,执行失败,请联系管理员"); } //修改同一群组记录的状态 @@ -619,7 +605,7 @@ public class ChatGroupController { baseResponse.setErrormsg("成功"); } catch (Exception e) { baseResponse.setErrorcode(1); - e.printStackTrace(); + log.error("updateGroupStat异常",e); //这里想触发事务回滚需抛运行时异常 throw new RuntimeException("回滚状态,执行失败,请联系管理员"); } @@ -691,13 +677,24 @@ public class ChatGroupController { * @param jsonObject 参数集合 */ public void getChatRecord(JSONArray rs,JSONObject jsonObject){ - JSONArray rsrjson=new JSONArray(); //环信组id JSONArray groupData=jsonObject.getJSONArray("groupData"); List groupidList=new ArrayList<>(); for (Object groupDatum : groupData) { groupidList.add(((JSONObject) JSON.toJSON(groupDatum)).get("groupid").toString()); } + + //如果结果集中包含了该聊天组,过滤掉 + for (int i=0;i< rs.size(); i++) { + JSONObject rjson = (JSONObject) JSON.toJSON(rs.get(i)); + if(groupidList.contains(rjson.get("to").toString())){ + groupidList.remove(rjson.get("to").toString()); + } + } + if(groupidList.size() == 0){ + return; + } + LambdaQueryWrapper chatgroupQueryWrapper=new QueryWrapper().lambda(); chatgroupQueryWrapper.in(LymsChatgroup::getHxgroupid,groupidList); List chatgroupList=lymsChatgroupService.list(chatgroupQueryWrapper); @@ -735,25 +732,8 @@ public class ChatGroupController { reusltJsonObject.put("to",lymsChatgroup.getHxgroupid()); reusltJsonObject.put("type","groupchat"); reusltJsonObject.put("timestamp",lymsMessageList.size()>0?lymsMessageList.get(0).getSendtime().getTime():""); - if (CollectionUtils.isEmpty(rs)) { - rsrjson.add(reusltJsonObject); - }else { - for (int i=0;i 0){ - patient.setHxid(hxUserJSON.getJSONArray("entities").getJSONObject(0).getString("uuid")); - lymsPatientService.updateById(patient); - }else{ - JSONObject json = hxService.addUser(patient.getIdno(), Constant.COMMON_PASSWD, patient.getPname()); - JSONArray rArr = json.getJSONArray("entities"); - if (rArr.size() > 0) { - patient.setHxid(rArr.getJSONObject(0).getString("uuid")); - lymsPatientService.updateById(patient); - } - } - + patient = lymsPatientService.addPatientHxId(patient); } group.setOwnerk(hxuser); @@ -131,18 +119,7 @@ public class TkRecordController { //科室值班医生注册环信 for (LymsDoctor lymsDoctor : doctorAminList) { if (StringUtil.isEmpty(lymsDoctor.getHxid())) { - JSONObject hxDockerUserJSON = hxService.getUser(lymsDoctor.getDlogin()); - if (hxDockerUserJSON != null && hxDockerUserJSON.getJSONArray("entities") != null && hxDockerUserJSON.getJSONArray("entities").size() > 0) { - lymsDoctor.setHxid(hxDockerUserJSON.getJSONArray("entities").getJSONObject(0).getString("uuid")); - lymsDoctorService.updateById(lymsDoctor); - } else { - JSONObject json = hxService.addUser(lymsDoctor.getDlogin(), Constant.COMMON_PASSWD, lymsDoctor.getDname()); - JSONArray rArr = json.getJSONArray("entities"); - if (rArr.size() > 0) { - lymsDoctor.setHxid(rArr.getJSONObject(0).getString("uuid")); - lymsDoctorService.updateById(lymsDoctor); - } - } + lymsDoctor = lymsDoctorService.addDoctorHxId(lymsDoctor); adminDlogins.add(lymsDoctor.getDlogin()); groupnames.add(lymsDoctor.getDname()); } @@ -151,18 +128,7 @@ public class TkRecordController { if ( ! adminDlogins.contains(doctor.getDlogin())) { //医生注册环信 if (StringUtil.isEmpty(doctor.getHxid())) { - JSONObject hxDockerJSON = hxService.getUser(doctor.getDlogin()); - if (hxDockerJSON != null && hxDockerJSON.getJSONArray("entities") != null && hxDockerJSON.getJSONArray("entities").size() > 0) { - doctor.setHxid(hxDockerJSON.getJSONArray("entities").getJSONObject(0).getString("uuid")); - lymsDoctorService.updateById(doctor); - }else { - JSONObject json = hxService.addUser(doctor.getDlogin(), Constant.COMMON_PASSWD, doctor.getDname()); - JSONArray rArr = json.getJSONArray("entities"); - if (rArr.size() > 0) { - doctor.setHxid(rArr.getJSONObject(0).getString("uuid")); - lymsDoctorService.updateById(doctor); - } - } + doctor = lymsDoctorService.addDoctorHxId(doctor); } adminDlogins.add(doctor.getDlogin()); groupnames.add(doctor.getDname()); diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsTkrecordMapper.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsTkrecordMapper.java index 29f43cb..ebd9474 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsTkrecordMapper.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsTkrecordMapper.java @@ -7,7 +7,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @Entity com.lyms.talkonlineweb.domain.LymsTkrecord */ public interface LymsTkrecordMapper extends BaseMapper { - + /** + * 批量修改未结束的聊天记录为结束 + */ + void batchUpdateStatEnd(); } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsDoctorService.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsDoctorService.java index d237988..3e2c28a 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsDoctorService.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsDoctorService.java @@ -11,4 +11,6 @@ import java.util.Map; public interface LymsDoctorService extends IService { Map statDoctor(Integer hid,Integer dpid,String dname); + + LymsDoctor addDoctorHxId(LymsDoctor doctor); } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java index 24fcd49..3e27ad0 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java @@ -18,4 +18,6 @@ public interface LymsPatientService extends IService { List getPatient(QueryWrapper queryWrapper); List> getPcInfoList(); + + LymsPatient addPatientHxId(LymsPatient patient); } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsTkrecordService.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsTkrecordService.java index 8bb6424..7a09c30 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsTkrecordService.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsTkrecordService.java @@ -7,5 +7,9 @@ import com.baomidou.mybatisplus.extension.service.IService; * */ public interface LymsTkrecordService extends IService { + /** + * 批量修改未结束的聊天记录为结束 + */ + void batchUpdateStatEnd(); } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsDoctorServiceImpl.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsDoctorServiceImpl.java index 8d5d3ed..cb3906a 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsDoctorServiceImpl.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsDoctorServiceImpl.java @@ -1,12 +1,17 @@ package com.lyms.talkonlineweb.service.impl; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.lyms.talkonlineweb.domain.LymsDoctor; import com.lyms.talkonlineweb.service.LymsDoctorService; import com.lyms.talkonlineweb.mapper.LymsDoctorMapper; +import com.lyms.talkonlineweb.util.Constant; +import com.lyms.talkonlineweb.util.HXService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.Map; /** @@ -16,13 +21,33 @@ import java.util.Map; public class LymsDoctorServiceImpl extends ServiceImpl implements LymsDoctorService{ - @Autowired + @Resource private LymsDoctorMapper lymsDoctorMapper; + @Autowired + private HXService hxService; + @Override public Map statDoctor(Integer hid,Integer dpid,String dname) { return lymsDoctorMapper.statDoctor(hid,dpid,dname); } + + @Override + public LymsDoctor addDoctorHxId(LymsDoctor lymsDoctor) { + JSONObject hxDockerUserJSON = hxService.getUser(lymsDoctor.getDlogin()); + if (hxDockerUserJSON != null && hxDockerUserJSON.getJSONArray("entities") != null && hxDockerUserJSON.getJSONArray("entities").size() > 0) { + lymsDoctor.setHxid(hxDockerUserJSON.getJSONArray("entities").getJSONObject(0).getString("uuid")); + updateById(lymsDoctor); + } else { + JSONObject json = hxService.addUser(lymsDoctor.getDlogin(), Constant.COMMON_PASSWD, lymsDoctor.getDname()); + JSONArray rArr = json.getJSONArray("entities"); + if (rArr.size() > 0) { + lymsDoctor.setHxid(rArr.getJSONObject(0).getString("uuid")); + updateById(lymsDoctor); + } + } + return lymsDoctor; + } } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java index cb1465f..8e52ab6 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java @@ -1,10 +1,14 @@ package com.lyms.talkonlineweb.service.impl; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.lyms.talkonlineweb.domain.LymsPatient; import com.lyms.talkonlineweb.service.LymsPatientService; import com.lyms.talkonlineweb.mapper.LymsPatientMapper; +import com.lyms.talkonlineweb.util.Constant; +import com.lyms.talkonlineweb.util.HXService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -20,6 +24,10 @@ public class LymsPatientServiceImpl extends ServiceImpl> getAppPatientHospital(Integer patientId) { return lymsPatientMapper.getAppPatientHospital(patientId); @@ -34,6 +42,25 @@ public class LymsPatientServiceImpl extends ServiceImpl> getPcInfoList() { return lymsPatientMapper.getPcInfoList(); } + + @Override + public LymsPatient addPatientHxId(LymsPatient patient) { + + JSONObject hxUserJSON = hxService.getUser(patient.getIdno()); + if(hxUserJSON != null && hxUserJSON.getJSONArray("entities") != null && hxUserJSON.getJSONArray("entities").size() > 0){ + patient.setHxid(hxUserJSON.getJSONArray("entities").getJSONObject(0).getString("uuid")); + updateById(patient); + }else{ + JSONObject json = hxService.addUser(patient.getIdno(), Constant.COMMON_PASSWD, patient.getPname()); + JSONArray rArr = json.getJSONArray("entities"); + if (rArr.size() > 0) { + patient.setHxid(rArr.getJSONObject(0).getString("uuid")); + updateById(patient); + } + } + + return patient; + } } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsTkrecordServiceImpl.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsTkrecordServiceImpl.java index c6a2c0f..5a90fcb 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsTkrecordServiceImpl.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsTkrecordServiceImpl.java @@ -13,6 +13,10 @@ import org.springframework.stereotype.Service; public class LymsTkrecordServiceImpl extends ServiceImpl implements LymsTkrecordService{ + @Override + public void batchUpdateStatEnd() { + + } } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/AutoEndChatTask.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/AutoEndChatTask.java new file mode 100644 index 0000000..8a970ce --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/AutoEndChatTask.java @@ -0,0 +1,80 @@ +package com.lyms.talkonlineweb.task; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.lyms.talkonlineweb.domain.LymsChatgroup; +import com.lyms.talkonlineweb.domain.LymsTkrecord; +import com.lyms.talkonlineweb.service.LymsChatgroupService; +import com.lyms.talkonlineweb.service.LymsTkrecordService; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 每天12点,自动结束患者聊天 + * cfl + */ +@Component +@Log4j2 +public class AutoEndChatTask { + + @Autowired + private LymsTkrecordService lymsTkrecordService; + @Autowired + private LymsChatgroupService lymsChatgroupService; + + @Scheduled(cron = "0 59 23 * * ?") + public void PushIllnessTypeData(){ + + log.info("自动结束聊天任务开始>>>>>>>>>>auto end chart"); + LymsTkrecord tkrecord = new LymsTkrecord(); + tkrecord.setStat(0); + List recordList = lymsTkrecordService.list(Wrappers.query(tkrecord)); + int size = recordList.size(); + + log.info("自动结束聊天任务开始>>>>>>>>>>size = {}",size); + + if(size == 0){ + return; + } + + for(int i = 0; i < size ; i++ ){ + LymsTkrecord lymsTkrecord = recordList.get(i); + lymsTkrecord.setStat(1); + lymsTkrecord.setUpdatedby(1); + lymsTkrecord.setUpdatedtime(new Date()); + try{ + boolean b = lymsTkrecordService.updateById(lymsTkrecord); + }catch (Exception e){ + log.error("自动结束聊天记录异常",e); + } + } + + List hxGroupIds = recordList.stream().map(LymsTkrecord::getHxgroupid).distinct().collect(Collectors.toList()); + + log.info("自动结束聊天任务需更新聊天组>>>>>>>>>>size = {}",hxGroupIds.size()); + + List hxGroupList = lymsChatgroupService.list(new QueryWrapper() + .lambda().in(LymsChatgroup::getHxgroupid, hxGroupIds)); + + for(int i = 0;i < hxGroupList.size(); i++){ + LymsChatgroup lymsChatgroup = hxGroupList.get(i); + lymsChatgroup.setStat(1); + try{ + lymsChatgroupService.updateById(lymsChatgroup); + }catch (Exception e){ + log.error("自动结束聊天组异常",e); + } + + } + + } + + + +} diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/GetPatientInfoTask.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/GetPatientInfoTask.java index fa91415..1396a4b 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/GetPatientInfoTask.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/GetPatientInfoTask.java @@ -64,7 +64,7 @@ public class GetPatientInfoTask { * 获取医院患者信息。添加到问诊平台患者信息 * 10分钟执行一次 */ - @Scheduled(cron = "0 */10 * * * ?") + // @Scheduled(cron = "0 */10 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")//测试用 public void getPatientInfo() throws Exception { if(!on_off){ diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/HXTask.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/HXTask.java index f9e51f1..02e7fb8 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/HXTask.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/HXTask.java @@ -30,7 +30,7 @@ public class HXTask { @Autowired private LymsDictService lymsDictService; -// @Scheduled(initialDelay=10000, fixedRate=60000) + @Scheduled(initialDelay=10000, fixedRate=60000) public void checkDoctorStat(){ Map param=new HashMap<>(); diff --git a/talkonlineweb/src/main/resources/application.yml b/talkonlineweb/src/main/resources/application.yml index 43002c1..0d8f356 100644 --- a/talkonlineweb/src/main/resources/application.yml +++ b/talkonlineweb/src/main/resources/application.yml @@ -11,7 +11,7 @@ spring: resources: add-mappings: false profiles: - active: prod + active: dev logging: config: classpath:logback-spring.xml diff --git a/talkonlineweb/src/main/resources/mapper/LymsTcardMapper.xml b/talkonlineweb/src/main/resources/mapper/LymsTcardMapper.xml index 9ea90a7..57c7ddc 100644 --- a/talkonlineweb/src/main/resources/mapper/LymsTcardMapper.xml +++ b/talkonlineweb/src/main/resources/mapper/LymsTcardMapper.xml @@ -25,8 +25,8 @@ diff --git a/talkonlineweb/src/main/resources/mapper/LymsTkrecordMapper.xml b/talkonlineweb/src/main/resources/mapper/LymsTkrecordMapper.xml index 68229a4..19be7b0 100644 --- a/talkonlineweb/src/main/resources/mapper/LymsTkrecordMapper.xml +++ b/talkonlineweb/src/main/resources/mapper/LymsTkrecordMapper.xml @@ -24,4 +24,10 @@ stat,createdby,createdtime, updatedby,updatedtime + + + update lyms_tkrecode + set stat = 1 + where stat = 0 +