Commit 28748bd3e59479c577100d80e89e59113e41dfbc
1 parent
9ff8e4eaff
Exists in
master
update
Showing 11 changed files with 429 additions and 0 deletions
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsChatInfo.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsReturnVisitRecord.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsChatInfoMapper.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsReturnVisitRecordMapper.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsChatInfoService.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsReturnVisitRecordService.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsChatInfoServiceImpl.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsReturnVisitRecordServiceImpl.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushChatInfoTask.java
- talkonlineweb/src/main/resources/mapper/LymsChatInfoMapper.xml
- talkonlineweb/src/main/resources/mapper/LymsReturnVisitRecordMapper.xml
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsChatInfo.java
View file @
28748bd
| 1 | +package com.lyms.talkonlineweb.domain; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.IdType; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 7 | +import java.io.Serializable; | |
| 8 | +import java.util.Date; | |
| 9 | +import lombok.Data; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 回访聊天信息自动回复话术 | |
| 13 | + * @TableName lyms_chat_Info | |
| 14 | + */ | |
| 15 | +@TableName(value ="lyms_chat_Info") | |
| 16 | +@Data | |
| 17 | +public class LymsChatInfo implements Serializable { | |
| 18 | + /** | |
| 19 | + * | |
| 20 | + */ | |
| 21 | + @TableId(value = "id", type = IdType.AUTO) | |
| 22 | + private Integer id; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 自动回复内容 | |
| 26 | + */ | |
| 27 | + @TableField(value = "conten") | |
| 28 | + private String conten; | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 自动回复周期建档后-1:第二天2:第五天3:第十天4:第二十天5:第三十天 | |
| 32 | + */ | |
| 33 | + @TableField(value = "type") | |
| 34 | + private Integer type; | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 疾病id | |
| 38 | + */ | |
| 39 | + @TableField(value = "illid") | |
| 40 | + private String illid; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 创建时间 | |
| 44 | + */ | |
| 45 | + @TableField(value = "createdtime") | |
| 46 | + private Date createdtime; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 修改时间 | |
| 50 | + */ | |
| 51 | + @TableField(value = "update_time") | |
| 52 | + private Date updateTime; | |
| 53 | + | |
| 54 | + @TableField(exist = false) | |
| 55 | + private static final long serialVersionUID = 1L; | |
| 56 | + | |
| 57 | + @Override | |
| 58 | + public boolean equals(Object that) { | |
| 59 | + if (this == that) { | |
| 60 | + return true; | |
| 61 | + } | |
| 62 | + if (that == null) { | |
| 63 | + return false; | |
| 64 | + } | |
| 65 | + if (getClass() != that.getClass()) { | |
| 66 | + return false; | |
| 67 | + } | |
| 68 | + LymsChatInfo other = (LymsChatInfo) that; | |
| 69 | + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) | |
| 70 | + && (this.getConten() == null ? other.getConten() == null : this.getConten().equals(other.getConten())) | |
| 71 | + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) | |
| 72 | + && (this.getIllid() == null ? other.getIllid() == null : this.getIllid().equals(other.getIllid())) | |
| 73 | + && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime())) | |
| 74 | + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); | |
| 75 | + } | |
| 76 | + | |
| 77 | + @Override | |
| 78 | + public int hashCode() { | |
| 79 | + final int prime = 31; | |
| 80 | + int result = 1; | |
| 81 | + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); | |
| 82 | + result = prime * result + ((getConten() == null) ? 0 : getConten().hashCode()); | |
| 83 | + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); | |
| 84 | + result = prime * result + ((getIllid() == null) ? 0 : getIllid().hashCode()); | |
| 85 | + result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode()); | |
| 86 | + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); | |
| 87 | + return result; | |
| 88 | + } | |
| 89 | + | |
| 90 | + @Override | |
| 91 | + public String toString() { | |
| 92 | + StringBuilder sb = new StringBuilder(); | |
| 93 | + sb.append(getClass().getSimpleName()); | |
| 94 | + sb.append(" ["); | |
| 95 | + sb.append("Hash = ").append(hashCode()); | |
| 96 | + sb.append(", id=").append(id); | |
| 97 | + sb.append(", conten=").append(conten); | |
| 98 | + sb.append(", type=").append(type); | |
| 99 | + sb.append(", illid=").append(illid); | |
| 100 | + sb.append(", createdtime=").append(createdtime); | |
| 101 | + sb.append(", updateTime=").append(updateTime); | |
| 102 | + sb.append(", serialVersionUID=").append(serialVersionUID); | |
| 103 | + sb.append("]"); | |
| 104 | + return sb.toString(); | |
| 105 | + } | |
| 106 | +} |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsReturnVisitRecord.java
View file @
28748bd
| 1 | +package com.lyms.talkonlineweb.domain; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.IdType; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 7 | +import java.io.Serializable; | |
| 8 | +import java.util.Date; | |
| 9 | +import lombok.Data; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 医生回访记录 | |
| 13 | + * @TableName lyms_return_visit_record | |
| 14 | + */ | |
| 15 | +@TableName(value ="lyms_return_visit_record") | |
| 16 | +@Data | |
| 17 | +public class LymsReturnVisitRecord implements Serializable { | |
| 18 | + /** | |
| 19 | + * | |
| 20 | + */ | |
| 21 | + @TableId(value = "id", type = IdType.AUTO) | |
| 22 | + private Integer id; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 回访医生dlogin组 | |
| 26 | + */ | |
| 27 | + @TableField(value = "dlogins") | |
| 28 | + private String dlogins; | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 科室id | |
| 32 | + */ | |
| 33 | + @TableField(value = "dpid") | |
| 34 | + private Integer dpid; | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 患者身份证 | |
| 38 | + */ | |
| 39 | + @TableField(value = "idno") | |
| 40 | + private String idno; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * 回访类型0:自动回访 1:医生回访 | |
| 44 | + */ | |
| 45 | + @TableField(value = "type") | |
| 46 | + private Integer type; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 环信群组id | |
| 50 | + */ | |
| 51 | + @TableField(value = "hxgroupid") | |
| 52 | + private String hxgroupid; | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 创建时间 | |
| 56 | + */ | |
| 57 | + @TableField(value = "createdtime") | |
| 58 | + private Date createdtime; | |
| 59 | + | |
| 60 | + /** | |
| 61 | + * 修改时间 | |
| 62 | + */ | |
| 63 | + @TableField(value = "update_time") | |
| 64 | + private Date updateTime; | |
| 65 | + | |
| 66 | + @TableField(exist = false) | |
| 67 | + private static final long serialVersionUID = 1L; | |
| 68 | + | |
| 69 | + @Override | |
| 70 | + public boolean equals(Object that) { | |
| 71 | + if (this == that) { | |
| 72 | + return true; | |
| 73 | + } | |
| 74 | + if (that == null) { | |
| 75 | + return false; | |
| 76 | + } | |
| 77 | + if (getClass() != that.getClass()) { | |
| 78 | + return false; | |
| 79 | + } | |
| 80 | + LymsReturnVisitRecord other = (LymsReturnVisitRecord) that; | |
| 81 | + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) | |
| 82 | + && (this.getDlogins() == null ? other.getDlogins() == null : this.getDlogins().equals(other.getDlogins())) | |
| 83 | + && (this.getDpid() == null ? other.getDpid() == null : this.getDpid().equals(other.getDpid())) | |
| 84 | + && (this.getIdno() == null ? other.getIdno() == null : this.getIdno().equals(other.getIdno())) | |
| 85 | + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) | |
| 86 | + && (this.getHxgroupid() == null ? other.getHxgroupid() == null : this.getHxgroupid().equals(other.getHxgroupid())) | |
| 87 | + && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime())) | |
| 88 | + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @Override | |
| 92 | + public int hashCode() { | |
| 93 | + final int prime = 31; | |
| 94 | + int result = 1; | |
| 95 | + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); | |
| 96 | + result = prime * result + ((getDlogins() == null) ? 0 : getDlogins().hashCode()); | |
| 97 | + result = prime * result + ((getDpid() == null) ? 0 : getDpid().hashCode()); | |
| 98 | + result = prime * result + ((getIdno() == null) ? 0 : getIdno().hashCode()); | |
| 99 | + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); | |
| 100 | + result = prime * result + ((getHxgroupid() == null) ? 0 : getHxgroupid().hashCode()); | |
| 101 | + result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode()); | |
| 102 | + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); | |
| 103 | + return result; | |
| 104 | + } | |
| 105 | + | |
| 106 | + @Override | |
| 107 | + public String toString() { | |
| 108 | + StringBuilder sb = new StringBuilder(); | |
| 109 | + sb.append(getClass().getSimpleName()); | |
| 110 | + sb.append(" ["); | |
| 111 | + sb.append("Hash = ").append(hashCode()); | |
| 112 | + sb.append(", id=").append(id); | |
| 113 | + sb.append(", dlogins=").append(dlogins); | |
| 114 | + sb.append(", dpid=").append(dpid); | |
| 115 | + sb.append(", idno=").append(idno); | |
| 116 | + sb.append(", type=").append(type); | |
| 117 | + sb.append(", hxgroupid=").append(hxgroupid); | |
| 118 | + sb.append(", createdtime=").append(createdtime); | |
| 119 | + sb.append(", updateTime=").append(updateTime); | |
| 120 | + sb.append(", serialVersionUID=").append(serialVersionUID); | |
| 121 | + sb.append("]"); | |
| 122 | + return sb.toString(); | |
| 123 | + } | |
| 124 | +} |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsChatInfoMapper.java
View file @
28748bd
| 1 | +package com.lyms.talkonlineweb.mapper; | |
| 2 | + | |
| 3 | +import com.lyms.talkonlineweb.domain.LymsChatInfo; | |
| 4 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * @Entity com.lyms.talkonlineweb.domain.LymsChatInfo | |
| 8 | + */ | |
| 9 | +public interface LymsChatInfoMapper extends BaseMapper<LymsChatInfo> { | |
| 10 | + | |
| 11 | +} |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsReturnVisitRecordMapper.java
View file @
28748bd
| 1 | +package com.lyms.talkonlineweb.mapper; | |
| 2 | + | |
| 3 | +import com.lyms.talkonlineweb.domain.LymsReturnVisitRecord; | |
| 4 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * @Entity com.lyms.talkonlineweb.domain.LymsReturnVisitRecord | |
| 8 | + */ | |
| 9 | +public interface LymsReturnVisitRecordMapper extends BaseMapper<LymsReturnVisitRecord> { | |
| 10 | + | |
| 11 | +} |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsChatInfoService.java
View file @
28748bd
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsReturnVisitRecordService.java
View file @
28748bd
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsChatInfoServiceImpl.java
View file @
28748bd
| 1 | +package com.lyms.talkonlineweb.service.impl; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
| 4 | +import com.lyms.talkonlineweb.domain.LymsChatInfo; | |
| 5 | +import com.lyms.talkonlineweb.service.LymsChatInfoService; | |
| 6 | +import com.lyms.talkonlineweb.mapper.LymsChatInfoMapper; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * | |
| 11 | + */ | |
| 12 | +@Service | |
| 13 | +public class LymsChatInfoServiceImpl extends ServiceImpl<LymsChatInfoMapper, LymsChatInfo> | |
| 14 | + implements LymsChatInfoService{ | |
| 15 | + | |
| 16 | +} |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsReturnVisitRecordServiceImpl.java
View file @
28748bd
| 1 | +package com.lyms.talkonlineweb.service.impl; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
| 4 | +import com.lyms.talkonlineweb.domain.LymsReturnVisitRecord; | |
| 5 | +import com.lyms.talkonlineweb.service.LymsReturnVisitRecordService; | |
| 6 | +import com.lyms.talkonlineweb.mapper.LymsReturnVisitRecordMapper; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * | |
| 11 | + */ | |
| 12 | +@Service | |
| 13 | +public class LymsReturnVisitRecordServiceImpl extends ServiceImpl<LymsReturnVisitRecordMapper, LymsReturnVisitRecord> | |
| 14 | + implements LymsReturnVisitRecordService{ | |
| 15 | + | |
| 16 | +} |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushChatInfoTask.java
View file @
28748bd
| 1 | +package com.lyms.talkonlineweb.task; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |
| 5 | +import com.lyms.talkonlineweb.domain.*; | |
| 6 | +import com.lyms.talkonlineweb.service.*; | |
| 7 | +import com.lyms.talkonlineweb.util.Constant; | |
| 8 | +import com.lyms.talkonlineweb.util.StringUtil; | |
| 9 | +import com.lyms.talkonlineweb.util.WeiXinUtil; | |
| 10 | +import lombok.Data; | |
| 11 | +import lombok.extern.log4j.Log4j2; | |
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 13 | +import org.springframework.scheduling.annotation.Scheduled; | |
| 14 | +import org.springframework.stereotype.Component; | |
| 15 | + | |
| 16 | +import java.util.Date; | |
| 17 | +import java.util.HashMap; | |
| 18 | +import java.util.List; | |
| 19 | +import java.util.Map; | |
| 20 | + | |
| 21 | +/** | |
| 22 | + * 回访信息回复 | |
| 23 | + */ | |
| 24 | + | |
| 25 | +@Component | |
| 26 | +@Log4j2 | |
| 27 | +public class PushChatInfoTask { | |
| 28 | + | |
| 29 | + @Autowired | |
| 30 | + private LymsArticleService lymsArticleService; | |
| 31 | + @Autowired | |
| 32 | + private PatientInfoService patientInfoService; | |
| 33 | + @Autowired | |
| 34 | + private LymsPushedartService lymsPushedartService;//推送的历史记录 | |
| 35 | + @Autowired | |
| 36 | + private PushArticleService pushArticleService;//推送文章新逻辑shiy改 | |
| 37 | + @Autowired | |
| 38 | + private LymsPatientService lymsPatientService; | |
| 39 | + @Autowired | |
| 40 | + private LymsPushMessagesService lymsPushMessagesService; | |
| 41 | + @Autowired | |
| 42 | + private LymsPcaseService lymsPcaseService;//病例 | |
| 43 | + @Autowired | |
| 44 | + private LymsDictService lymsDictService; | |
| 45 | + @Autowired | |
| 46 | + public LymsPushAttentionRecordService lymsPushAttentionRecordService; | |
| 47 | + @Autowired | |
| 48 | + private LymsChatgroupService lymsChatgroupService; | |
| 49 | + @Autowired | |
| 50 | + private LymsReturnVisitRecordService lymsReturnVisitRecordService; | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 每天12点执行回访信息系统回复 | |
| 54 | + */ | |
| 55 | +// @Scheduled(cron = "0 0 12 * * ?") | |
| 56 | + public void pushChatInfo() { | |
| 57 | + final List<LymsChatgroup> chatgroupList = lymsChatgroupService.list(); | |
| 58 | + for (LymsChatgroup lymsChatgroup : chatgroupList) { | |
| 59 | + final List<LymsReturnVisitRecord> lymsReturnVisitRecords = lymsReturnVisitRecordService.list(new QueryWrapper<LymsReturnVisitRecord>() | |
| 60 | + .lambda().eq(LymsReturnVisitRecord::getHxgroupid, lymsChatgroup.getHxgroupid())); | |
| 61 | + } | |
| 62 | + } | |
| 63 | +} |
talkonlineweb/src/main/resources/mapper/LymsChatInfoMapper.xml
View file @
28748bd
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.lyms.talkonlineweb.mapper.LymsChatInfoMapper"> | |
| 6 | + | |
| 7 | + <resultMap id="BaseResultMap" type="com.lyms.talkonlineweb.domain.LymsChatInfo"> | |
| 8 | + <id property="id" column="id" jdbcType="INTEGER"/> | |
| 9 | + <result property="conten" column="conten" jdbcType="VARCHAR"/> | |
| 10 | + <result property="type" column="type" jdbcType="INTEGER"/> | |
| 11 | + <result property="illid" column="illid" jdbcType="VARCHAR"/> | |
| 12 | + <result property="createdtime" column="createdtime" jdbcType="TIMESTAMP"/> | |
| 13 | + <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |
| 14 | + </resultMap> | |
| 15 | + | |
| 16 | + <sql id="Base_Column_List"> | |
| 17 | + id,conten,type, | |
| 18 | + illid,createdtime,update_time | |
| 19 | + </sql> | |
| 20 | +</mapper> |
talkonlineweb/src/main/resources/mapper/LymsReturnVisitRecordMapper.xml
View file @
28748bd
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.lyms.talkonlineweb.mapper.LymsReturnVisitRecordMapper"> | |
| 6 | + | |
| 7 | + <resultMap id="BaseResultMap" type="com.lyms.talkonlineweb.domain.LymsReturnVisitRecord"> | |
| 8 | + <id property="id" column="id" jdbcType="INTEGER"/> | |
| 9 | + <result property="dlogins" column="dlogins" jdbcType="VARCHAR"/> | |
| 10 | + <result property="dpid" column="dpid" jdbcType="INTEGER"/> | |
| 11 | + <result property="idno" column="idno" jdbcType="VARCHAR"/> | |
| 12 | + <result property="type" column="type" jdbcType="INTEGER"/> | |
| 13 | + <result property="hxgroupid" column="hxgroupid" jdbcType="VARCHAR"/> | |
| 14 | + <result property="createdtime" column="createdtime" jdbcType="TIMESTAMP"/> | |
| 15 | + <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |
| 16 | + </resultMap> | |
| 17 | + | |
| 18 | + <sql id="Base_Column_List"> | |
| 19 | + id,dlogins,dpid, | |
| 20 | + idno,type,hxgroupid, | |
| 21 | + createdtime,update_time | |
| 22 | + </sql> | |
| 23 | +</mapper> |