diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java index b88371c..ce10b17 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java @@ -89,7 +89,26 @@ public class LymsHisInfoController { return baseResponse; } - + /** + * 修改his医院患者身份证号码 + * @param hisInfo + * @return + */ + @PostMapping("updataHisIdCard") + @TokenRequired + public BaseResponse updataHisIdCard( @RequestBody LymsHisInfo hisInfo){ + BaseResponse baseResponse=new BaseResponse(); + try { + final boolean result = lymsHisInfoService.updateById(hisInfo); + if(!result){ + baseResponse.setErrorcode(1); + baseResponse.setErrormsg("保存异常!"); + } + } catch (Exception e) { + e.printStackTrace(); + } + return baseResponse; + } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index f8cff23..121961f 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -81,6 +81,9 @@ public class PatientController { @Autowired private LymsPatientAttentionService lymsPatientAttentionService; + @Autowired + private RegisterPatientInfoService registerPatientInfoService; + /** * 获取患者列表 * @@ -1104,4 +1107,39 @@ public class PatientController { } return baseResponse; } + + /** + * PC-注册的患者列表(没有病例的患者) + * + * @param registerPatientInfo + * @param current + * @param size + * @return + */ + @GetMapping("getRegisterPatientInfo") + @TokenRequired + public BaseResponse getRegisterPatientInfo(RegisterPatientInfo registerPatientInfo, int current, int size) { + BaseResponse baseResponse = new BaseResponse(); + try { + QueryWrapper query=new QueryWrapper(); + if(StringUtil.isNotEmpty(registerPatientInfo.getSynthesisQuery())){ + query.and(wrapper -> wrapper .like("pname", registerPatientInfo.getSynthesisQuery()) + .or().eq("enrolment_phone", registerPatientInfo.getSynthesisQuery()) + .or().eq("idno", registerPatientInfo.getSynthesisQuery())); + } + if(StringUtil.isNotEmpty(registerPatientInfo.getStartCreatedtime())){ + query.ge("createdtime", registerPatientInfo.getStartCreatedtime()); + } + if(StringUtil.isNotEmpty(registerPatientInfo.getEndCreatedtime())){ + query.le("createdtime", registerPatientInfo.getEndCreatedtime()); + } + query.orderByDesc("createdtime"); + Page page= new Page<>(current,size); + Page registerPatientInfoPage = registerPatientInfoService.page(page,query); + baseResponse.setObject(registerPatientInfoPage); + } catch (Exception e) { + e.printStackTrace(); + } + return baseResponse; + } } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/RegisterPatientInfo.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/RegisterPatientInfo.java new file mode 100644 index 0000000..b9097a2 --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/RegisterPatientInfo.java @@ -0,0 +1,222 @@ +package com.lyms.talkonlineweb.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * + * @TableName register_patient_info + */ +@TableName(value ="register_patient_info") +@Data +public class RegisterPatientInfo implements Serializable { + /** + * + */ + @TableField(value = "id") + private Integer id; + + /** + * + */ + @TableField(value = "pname") + private String pname; + + /** + * + */ + @TableField(value = "idno") + private String idno; + + /** + * + */ + @TableField(value = "ppasswd") + private String ppasswd; + + /** + * + */ + @TableField(value = "sex") + private Integer sex; + + /** + * + */ + @TableField(value = "birth") + private String birth; + + /** + * + */ + @TableField(value = "headimg") + private String headimg; + + /** + * + */ + @TableField(value = "ccnt") + private Integer ccnt; + + /** + * + */ + @TableField(value = "islogin") + private Byte islogin; + + /** + * + */ + @TableField(value = "openid") + private String openid; + + /** + * + */ + @TableField(value = "gzopenid") + private String gzopenid; + + /** + * + */ + @TableField(value = "hxid") + private String hxid; + + /** + * + */ + @TableField(value = "createdby") + private Integer createdby; + + /** + * + */ + @TableField(value = "createdtime") + private Date createdtime; + + /** + * + */ + @TableField(value = "updatedby") + private String updatedby; + + /** + * + */ + @TableField(value = "updatedtime") + private Date updatedtime; + + /** + * + */ + @TableField(value = "enrolment_phone") + private String enrolmentPhone; + + /** + * 综合查询(姓名/电话/身份证) + */ + @TableField(exist = false) + private String synthesisQuery; + + /** + * 筛选开始时间 + */ + @TableField(exist = false) + private String startCreatedtime; + /** + * 筛选结束时间 + */ + @TableField(exist = false) + private String endCreatedtime; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RegisterPatientInfo other = (RegisterPatientInfo) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getPname() == null ? other.getPname() == null : this.getPname().equals(other.getPname())) + && (this.getIdno() == null ? other.getIdno() == null : this.getIdno().equals(other.getIdno())) + && (this.getPpasswd() == null ? other.getPpasswd() == null : this.getPpasswd().equals(other.getPpasswd())) + && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex())) + && (this.getBirth() == null ? other.getBirth() == null : this.getBirth().equals(other.getBirth())) + && (this.getHeadimg() == null ? other.getHeadimg() == null : this.getHeadimg().equals(other.getHeadimg())) + && (this.getCcnt() == null ? other.getCcnt() == null : this.getCcnt().equals(other.getCcnt())) + && (this.getIslogin() == null ? other.getIslogin() == null : this.getIslogin().equals(other.getIslogin())) + && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid())) + && (this.getGzopenid() == null ? other.getGzopenid() == null : this.getGzopenid().equals(other.getGzopenid())) + && (this.getHxid() == null ? other.getHxid() == null : this.getHxid().equals(other.getHxid())) + && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby())) + && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime())) + && (this.getUpdatedby() == null ? other.getUpdatedby() == null : this.getUpdatedby().equals(other.getUpdatedby())) + && (this.getUpdatedtime() == null ? other.getUpdatedtime() == null : this.getUpdatedtime().equals(other.getUpdatedtime())) + && (this.getEnrolmentPhone() == null ? other.getEnrolmentPhone() == null : this.getEnrolmentPhone().equals(other.getEnrolmentPhone())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getPname() == null) ? 0 : getPname().hashCode()); + result = prime * result + ((getIdno() == null) ? 0 : getIdno().hashCode()); + result = prime * result + ((getPpasswd() == null) ? 0 : getPpasswd().hashCode()); + result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode()); + result = prime * result + ((getBirth() == null) ? 0 : getBirth().hashCode()); + result = prime * result + ((getHeadimg() == null) ? 0 : getHeadimg().hashCode()); + result = prime * result + ((getCcnt() == null) ? 0 : getCcnt().hashCode()); + result = prime * result + ((getIslogin() == null) ? 0 : getIslogin().hashCode()); + result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode()); + result = prime * result + ((getGzopenid() == null) ? 0 : getGzopenid().hashCode()); + result = prime * result + ((getHxid() == null) ? 0 : getHxid().hashCode()); + result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode()); + result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode()); + result = prime * result + ((getUpdatedby() == null) ? 0 : getUpdatedby().hashCode()); + result = prime * result + ((getUpdatedtime() == null) ? 0 : getUpdatedtime().hashCode()); + result = prime * result + ((getEnrolmentPhone() == null) ? 0 : getEnrolmentPhone().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", pname=").append(pname); + sb.append(", idno=").append(idno); + sb.append(", ppasswd=").append(ppasswd); + sb.append(", sex=").append(sex); + sb.append(", birth=").append(birth); + sb.append(", headimg=").append(headimg); + sb.append(", ccnt=").append(ccnt); + sb.append(", islogin=").append(islogin); + sb.append(", openid=").append(openid); + sb.append(", gzopenid=").append(gzopenid); + sb.append(", hxid=").append(hxid); + sb.append(", createdby=").append(createdby); + sb.append(", createdtime=").append(createdtime); + sb.append(", updatedby=").append(updatedby); + sb.append(", updatedtime=").append(updatedtime); + sb.append(", enrolmentPhone=").append(enrolmentPhone); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/RegisterPatientInfoMapper.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/RegisterPatientInfoMapper.java new file mode 100644 index 0000000..bc1ebc6 --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/RegisterPatientInfoMapper.java @@ -0,0 +1,15 @@ +package com.lyms.talkonlineweb.mapper; + +import com.lyms.talkonlineweb.domain.RegisterPatientInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Entity com.lyms.talkonlineweb.domain.RegisterPatientInfo + */ +public interface RegisterPatientInfoMapper extends BaseMapper { + +} + + + + diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/RegisterPatientInfoService.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/RegisterPatientInfoService.java new file mode 100644 index 0000000..ddeacc2 --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/RegisterPatientInfoService.java @@ -0,0 +1,11 @@ +package com.lyms.talkonlineweb.service; + +import com.lyms.talkonlineweb.domain.RegisterPatientInfo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * + */ +public interface RegisterPatientInfoService extends IService { + +} diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/RegisterPatientInfoServiceImpl.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/RegisterPatientInfoServiceImpl.java new file mode 100644 index 0000000..149db1c --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/RegisterPatientInfoServiceImpl.java @@ -0,0 +1,20 @@ +package com.lyms.talkonlineweb.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lyms.talkonlineweb.domain.RegisterPatientInfo; +import com.lyms.talkonlineweb.service.RegisterPatientInfoService; +import com.lyms.talkonlineweb.mapper.RegisterPatientInfoMapper; +import org.springframework.stereotype.Service; + +/** + * + */ +@Service +public class RegisterPatientInfoServiceImpl extends ServiceImpl + implements RegisterPatientInfoService{ + +} + + + + diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushIllnessTypeData.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushIllnessTypeData.java new file mode 100644 index 0000000..b7d7438 --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushIllnessTypeData.java @@ -0,0 +1,55 @@ +package com.lyms.talkonlineweb.task; + +import com.lyms.talkonlineweb.service.*; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.scheduling.annotation.Scheduled; + +/** + * 疾病分类推送数据整理(1普通疾病,2慢性病) + * 慢性病:确诊后第一个月推送一次,间隔3个月进行第二次推送 + * 普通疾病:确诊15天后 推送 + */ + +@Component +@Log4j2 +public class PushIllnessTypeData { + + @Autowired + private LymsArticleService lymsArticleService; + @Autowired + private PatientInfoService patientInfoService; + @Autowired + private LymsPushedartService lymsPushedartService;//推送的历史记录 + @Autowired + private PushArticleService pushArticleService;//推送文章新逻辑shiy改 + @Autowired + LymsPushMessagesService lymsPushMessagesService; + @Autowired + private LymsDictService lymsDictService; + @Autowired + public PushArticleTask pushArticleTask; + @Autowired + public LymsPushAttentionRecordService lymsPushAttentionRecordService; + @Autowired + private LymsPatientAttentionService lymsPatientAttentionService; + @Autowired + private LymsPatientService lymsPatientService;//患者 + + + + /** + * 每天00:00点执行-要推送的公众号信息数据整理 + */ +// @Scheduled(cron = "0 0 0 * * ?") + @Transactional(rollbackFor = Exception.class) + public void PushIllnessTypeData(){ + + + } + +} + + diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushIllnessTypeTask.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushIllnessTypeTask.java new file mode 100644 index 0000000..c455805 --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/PushIllnessTypeTask.java @@ -0,0 +1,68 @@ +package com.lyms.talkonlineweb.task; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.lyms.talkonlineweb.domain.*; +import com.lyms.talkonlineweb.service.*; +import com.lyms.talkonlineweb.util.DateUtil; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.scheduling.annotation.Scheduled; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static com.lyms.talkonlineweb.util.DateUtil.YYYY_MM_DD; + +/** + * 疾病分类推送(1普通疾病,2慢性病) + * 慢性病:确诊后第一个月推送一次,间隔3个月进行第二次推送 + * 普通疾病:确诊15天后 推送 + */ + +@Component +@Log4j2 +public class PushIllnessTypeTask { + + @Autowired + private LymsArticleService lymsArticleService; + @Autowired + private PatientInfoService patientInfoService; + @Autowired + private LymsPushedartService lymsPushedartService;//推送的历史记录 + @Autowired + private PushArticleService pushArticleService;//推送文章新逻辑shiy改 + @Autowired + LymsPushMessagesService lymsPushMessagesService; + @Autowired + private LymsDictService lymsDictService; + @Autowired + public PushArticleTask pushArticleTask; + @Autowired + public LymsPushAttentionRecordService lymsPushAttentionRecordService; + @Autowired + private LymsPatientAttentionService lymsPatientAttentionService; + @Autowired + private LymsPatientService lymsPatientService;//患者 + + + + /** + * 每天下18:30点执行-要推送的公众号信息 + */ +// @Scheduled(cron = "0 30 18 * * ?") + @Transactional(rollbackFor = Exception.class) + public void PushIllnessTypeTask(){ + + + } + +} + + diff --git a/talkonlineweb/src/main/resources/mapper/RegisterPatientInfoMapper.xml b/talkonlineweb/src/main/resources/mapper/RegisterPatientInfoMapper.xml new file mode 100644 index 0000000..196e966 --- /dev/null +++ b/talkonlineweb/src/main/resources/mapper/RegisterPatientInfoMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id,pname,idno, + ppasswd,sex,birth, + headimg,ccnt,islogin, + openid,gzopenid,hxid, + createdby,createdtime,updatedby, + updatedtime,enrolment_phone + +