Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # postdischarge-admin/src/main/resources/application.yml # postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java
This commit is contained in:
commit
7cef1a057d
@ -26,8 +26,6 @@ xinelu:
|
||||
script-file-url: /scriptFileUrl
|
||||
# 获取管理端富文本的上传路径
|
||||
rich-text-picture-url: /richTextPictureUrl
|
||||
# 资讯富文本的上传路径
|
||||
info-rich-text-picture-url: /infoRichTextPictureUrl
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
@ -82,7 +80,7 @@ spring:
|
||||
# 数据库索引
|
||||
database: 6
|
||||
# 密码
|
||||
password: 123456
|
||||
password: xinelu@6990
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
@ -105,7 +103,8 @@ token:
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
# 请求拦截白名单
|
||||
ant-matchers: /postDischarge/**,/testMobile/**,/mobile/**
|
||||
ant-matchers: /postDischarge/**,/testMobile/**
|
||||
|
||||
## MyBatis-Plus配置
|
||||
mybatis-plus:
|
||||
# 实体扫描,多个package用逗号或者分号分隔
|
||||
|
||||
@ -283,19 +283,4 @@ public class Constants {
|
||||
* 成功
|
||||
*/
|
||||
public static final int SUCCESS_ERROR_CODE = 0;
|
||||
|
||||
/**
|
||||
* 资讯分类编码前缀
|
||||
*/
|
||||
public static final String INFO_CATEGORY_CODE = "ICC";
|
||||
|
||||
/**
|
||||
* 资讯编码前缀
|
||||
*/
|
||||
public static final String INFO_CODE = "IC";
|
||||
|
||||
/**
|
||||
* 科室编码前缀
|
||||
*/
|
||||
public static final String DEPARTMENT_CODE = "HDC";
|
||||
}
|
||||
|
||||
@ -1,18 +1,27 @@
|
||||
package com.xinelu.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 节点执行状态枚举类
|
||||
*
|
||||
* @author haown
|
||||
* @date 2024-04-01
|
||||
*/
|
||||
@Getter
|
||||
public enum NodeExecuteStatusEnum {
|
||||
/**
|
||||
* 已执行
|
||||
*/
|
||||
EXECUTED,
|
||||
/**
|
||||
* 未执行
|
||||
*/
|
||||
UNEXECUTED
|
||||
/**
|
||||
* 已执行
|
||||
*/
|
||||
EXECUTED("EXECUTED"),
|
||||
/**
|
||||
* 未执行
|
||||
*/
|
||||
UNEXECUTED("UNEXECUTED"),
|
||||
;
|
||||
final private String info;
|
||||
|
||||
NodeExecuteStatusEnum(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
package com.xinelu.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description 问卷类型
|
||||
* @Author zh
|
||||
* @Date 2024-04-15
|
||||
*/
|
||||
@Getter
|
||||
public enum QuestionTypeEnum {
|
||||
|
||||
/**
|
||||
* 普通问卷
|
||||
*/
|
||||
REGULAR_QUESTIONNAIRE("REGULAR_QUESTIONNAIRE"),
|
||||
|
||||
/**
|
||||
* 满意度问卷
|
||||
*/
|
||||
SATISFACTION_QUESTIONNAIRE("SATISFACTION_QUESTIONNAIRE"),
|
||||
;
|
||||
|
||||
final private String info;
|
||||
|
||||
QuestionTypeEnum(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.xinelu.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description 任务创建类型
|
||||
* @Author zh
|
||||
* @Date 2024-04-07
|
||||
*/
|
||||
@Getter
|
||||
public enum TaskCreateTypeEnum {
|
||||
|
||||
/**
|
||||
* 手动创建
|
||||
*/
|
||||
MANUAL_CREATE("MANUAL_CREATE"),
|
||||
|
||||
/**
|
||||
* 自动匹配
|
||||
*/
|
||||
MANUAL_MATCHE("MANUAL_MATCHE"),
|
||||
;
|
||||
|
||||
final private String info;
|
||||
|
||||
TaskCreateTypeEnum(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
@ -85,6 +85,7 @@ public class PatientInfoController extends BaseController {
|
||||
/**
|
||||
* 修改患者信息
|
||||
*/
|
||||
@ApiOperation("修改患者信息")
|
||||
@PreAuthorize("@ss.hasPermi('manage:patientInfo:edit')")
|
||||
@Log(title = "患者信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
|
||||
@ -8,6 +8,7 @@ import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult;
|
||||
import com.xinelu.manage.service.patientquestionsubmitresult.IPatientQuestionSubmitResultService;
|
||||
import com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -88,4 +89,23 @@ public class PatientQuestionSubmitResultController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(patientQuestionSubmitResultService.deletePatientQuestionSubmitResultByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 满意度调查问卷列表
|
||||
*/
|
||||
@GetMapping("/satisfactionSurvey")
|
||||
public TableDataInfo satisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey) {
|
||||
startPage();
|
||||
List<SatisfactionSurveyVO> list = patientQuestionSubmitResultService.satisfactionSurvey(satisfactionSurvey);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 满意度调查问卷
|
||||
*/
|
||||
@GetMapping("/selectQuestionnaireResult")
|
||||
public AjaxResult selectQuestionnaireResult(Long patientQuestionSubmitResultId) {
|
||||
return patientQuestionSubmitResultService.selectQuestionnaireResult(patientQuestionSubmitResultId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ public class QuestionInfoController extends BaseController {
|
||||
@Log(title = "问卷基本信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody QuestionVO questionInfo) {
|
||||
if (Objects.isNull(questionInfo) || StringUtils.isBlank(questionInfo.getQuestionnaireName())) {
|
||||
if (Objects.isNull(questionInfo) || StringUtils.isBlank(questionInfo.getQuestionnaireName()) || StringUtils.isBlank(questionInfo.getQuestionType())) {
|
||||
return AjaxResult.error("请添加问卷信息!");
|
||||
}
|
||||
return questionInfoService.insertQuestionInfo(questionInfo);
|
||||
@ -85,6 +85,9 @@ public class QuestionInfoController extends BaseController {
|
||||
@Log(title = "问卷基本信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody QuestionVO question) {
|
||||
if (Objects.isNull(question) || StringUtils.isBlank(question.getQuestionnaireName()) || StringUtils.isBlank(question.getQuestionType())) {
|
||||
return AjaxResult.error("请添加问卷信息!");
|
||||
}
|
||||
return questionInfoService.updateQuestionInfo(question);
|
||||
}
|
||||
|
||||
@ -94,8 +97,8 @@ public class QuestionInfoController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:question:remove')")
|
||||
@Log(title = "问卷基本信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long id) {
|
||||
return toAjax(questionInfoService.deleteQuestionInfoById(id));
|
||||
public AjaxResult remove(@PathVariable Long ids) {
|
||||
return toAjax(questionInfoService.deleteQuestionInfoById(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -110,7 +113,7 @@ public class QuestionInfoController extends BaseController {
|
||||
* 科室问卷数量
|
||||
*/
|
||||
@GetMapping("/departmentQuestionCount")
|
||||
public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus) {
|
||||
return questionInfoService.departmentQuestionCount(departmentName, questionnaireStatus);
|
||||
public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus, String questionType) {
|
||||
return questionInfoService.departmentQuestionCount(departmentName, questionnaireStatus, questionType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,6 +118,4 @@ public class SignPatientManageRouteController extends BaseController {
|
||||
public AjaxResult addPatientQuestionResult(@RequestBody PatientQuestionSubmitResultDTO dto) {
|
||||
return signPatientManageRouteService.addPatientQuestionResult(dto);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -8,12 +8,12 @@ import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto;
|
||||
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -44,12 +44,22 @@ public class SignPatientManageRouteNodeController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据患者主键查询签约路径及节点
|
||||
* 查询患者任务节点列表
|
||||
*/
|
||||
@ApiOperation("根据患者主键查询患者管理路径节点")
|
||||
@GetMapping("/getNodesByPatient/{patientId}")
|
||||
public R<List<SignPatientManageRouteNode>> getNodesByPatient(@PathVariable("patientId") Long patientId) {
|
||||
List<SignPatientManageRouteNode> list = signNodeService.getNodesByPatient(patientId);
|
||||
@ApiOperation("查询患者任务节点列表")
|
||||
@GetMapping("/getNodeList")
|
||||
public R<List<SignPatientManageRouteNode>> getNodeList(PatientTaskDto patientTaskDto) {
|
||||
List<SignPatientManageRouteNode> list = signNodeService.getNodeList(patientTaskDto);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询管理任务路径及节点
|
||||
*/
|
||||
@ApiOperation("查询管理任务路径及节点")
|
||||
@GetMapping("/getRouteNodeList")
|
||||
public R<List<SignPatientManageRouteNodeVo>> getRouteNodeList(PatientTaskDto patientTaskDto) {
|
||||
List<SignPatientManageRouteNodeVo> list = signNodeService.getRouteNodeList(patientTaskDto);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
@ -123,6 +123,12 @@ public class QuestionInfo extends BaseEntity {
|
||||
@Excel(name = "问卷备注信息")
|
||||
private String questionnaireRemark;
|
||||
|
||||
/**
|
||||
* 问卷类型,普通问卷:REGULAR_QUESTIONNAIRE,满意度问卷:SATISFACTION_QUESTIONNAIRE
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷类型")
|
||||
@Excel(name = "问卷类型")
|
||||
private String questionType;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -89,5 +89,8 @@ public class ManualFollowUpDTO {
|
||||
@ApiModelProperty(value = "主治医生姓名")
|
||||
private String attendingPhysicianName;
|
||||
|
||||
@ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED")
|
||||
private String nodeExecuteStatus;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -28,6 +28,9 @@ public class PatientQuestionSubmitResultDTO extends PatientQuestionSubmitResult
|
||||
@ApiModelProperty(value = "任务处理信息")
|
||||
private String routeHandleRemark;
|
||||
|
||||
@ApiModelProperty(value = "患者就诊记录基本信息表id")
|
||||
private Long visitRecordId;
|
||||
|
||||
/**
|
||||
* 患者问卷题目提交结果信息
|
||||
*/
|
||||
|
||||
@ -69,4 +69,11 @@ public class ServiceWayContentEditDTO {
|
||||
@ApiModelProperty(value = "服务频次数字结束值")
|
||||
@Excel(name = "服务频次数字结束值")
|
||||
private Integer serviceFrequencyEnd;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty(value = "排序")
|
||||
@Excel(name = "排序")
|
||||
private Integer serviceSort;
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.xinelu.manage.dto.signpatientmanageroutenode;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* @description: 患者任务查询传输对象
|
||||
@ -15,15 +15,29 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PatientTaskDto {
|
||||
|
||||
/** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */
|
||||
@ApiModelProperty(value = "就诊时间开始,格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime visitDateStart;
|
||||
/**
|
||||
* 患者主键
|
||||
*/
|
||||
@ApiModelProperty("患者主键")
|
||||
private Long patientId;
|
||||
|
||||
/** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */
|
||||
@ApiModelProperty(value = "就诊时间结束,格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime visitDateEnd;
|
||||
/** 签约记录表id */
|
||||
@ApiModelProperty(value = "签约记录表id")
|
||||
private Long signPatientRecordId;
|
||||
|
||||
/** 任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE */
|
||||
@ApiModelProperty(value = "任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE")
|
||||
private String taskCreateType;
|
||||
|
||||
/** 出院时间开始,格式:yyyy-MM-dd HH:mm:ss */
|
||||
@ApiModelProperty(value = "出院时间开始,格式:yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime dischargeTimeStart;
|
||||
|
||||
/** 出院时间结束,格式:yyyy-MM-dd HH:mm:ss */
|
||||
@ApiModelProperty(value = "出院时间结束,格式:yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime dischargeTimeEnd;
|
||||
|
||||
/** 所属医院id */
|
||||
@ApiModelProperty(value = "所属医院id")
|
||||
@ -53,4 +67,8 @@ public class PatientTaskDto {
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
private String patientName;
|
||||
|
||||
/** 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP */
|
||||
@ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
private String taskType;
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@ package com.xinelu.manage.mapper.patientquestionsubmitresult;
|
||||
|
||||
import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult;
|
||||
import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO;
|
||||
import com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -63,8 +65,17 @@ public interface PatientQuestionSubmitResultMapper {
|
||||
/**
|
||||
* 根据任务执行记录查询患者问卷信息
|
||||
*
|
||||
* @param taskExecuteRecordId 患者管理任务执行记录表id
|
||||
* @param taskExecuteRecordId 患者管理任务执行记录表id
|
||||
* @param patientQuestionSubmitResultId 患者问卷提交结果信息表
|
||||
* @return PatientQuestionSubmitResultVO
|
||||
*/
|
||||
PatientQuestionSubmitResultVO selectResultByTaskExecuteRecordId(Long taskExecuteRecordId);
|
||||
PatientQuestionSubmitResultVO selectResultByTaskExecuteRecordId(@Param("taskExecuteRecordId") Long taskExecuteRecordId, @Param("patientQuestionSubmitResultId") Long patientQuestionSubmitResultId);
|
||||
|
||||
/**
|
||||
* 满意度调查问卷列表
|
||||
*
|
||||
* @param satisfactionSurvey 居民信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
List<SatisfactionSurveyVO> selectSatisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey);
|
||||
}
|
||||
|
||||
@ -69,5 +69,5 @@ public interface QuestionInfoMapper {
|
||||
* @param questionnaireStatus 问卷状态
|
||||
* @return DepartmentVO
|
||||
*/
|
||||
List<DepartmentVO> departmentQuestionByDepartmentName(@Param("departmentName") String departmentName, @Param("questionnaireStatus") String questionnaireStatus);
|
||||
List<DepartmentVO> departmentQuestionByDepartmentName(@Param("departmentName") String departmentName, @Param("questionnaireStatus") String questionnaireStatus, @Param("questionType") String questionType);
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.xinelu.manage.mapper.residentinfo;
|
||||
|
||||
import com.xinelu.manage.domain.residentinfo.ResidentInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -17,7 +19,7 @@ public interface ResidentInfoMapper {
|
||||
* @param id 居民信息主键
|
||||
* @return 居民信息
|
||||
*/
|
||||
public ResidentInfo selectResidentInfoById(Long id);
|
||||
ResidentInfo selectResidentInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询居民信息列表
|
||||
@ -58,4 +60,13 @@ public interface ResidentInfoMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteResidentInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据电话号码和微信小程序openid查询居民基本信息
|
||||
*
|
||||
* @param phone 手机号
|
||||
* @param openId 微信小程序openId
|
||||
* @return 被护理人基本信息
|
||||
*/
|
||||
ResidentInfo getResidentInfoByPhoneAndOpenId(@Param("phone") String phone, @Param("openId") String openId);
|
||||
}
|
||||
|
||||
@ -6,8 +6,6 @@ import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径节点Mapper接口
|
||||
*
|
||||
@ -23,6 +21,13 @@ public interface SignPatientManageRouteNodeMapper {
|
||||
*/
|
||||
public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询患者管理路径节点
|
||||
* @param patientTaskDto 任务查询传输对象
|
||||
* @return 患者管理任务路径节点
|
||||
*/
|
||||
List<SignPatientManageRouteNode> getNodeList(PatientTaskDto patientTaskDto);
|
||||
|
||||
/**
|
||||
* 查询签约患者管理任务路径节点列表
|
||||
*
|
||||
|
||||
@ -17,7 +17,7 @@ public interface IPatientQuestionSubjectResultService {
|
||||
* @param id 患者问卷题目提交结果信息主键
|
||||
* @return 患者问卷题目提交结果信息
|
||||
*/
|
||||
public PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long id);
|
||||
PatientQuestionSubjectResult selectPatientQuestionSubjectResultById(Long id);
|
||||
|
||||
/**
|
||||
* 查询患者问卷题目提交结果信息列表
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.xinelu.manage.service.patientquestionsubmitresult;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult;
|
||||
import com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -58,4 +60,20 @@ public interface IPatientQuestionSubmitResultService {
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePatientQuestionSubmitResultById(Long id);
|
||||
|
||||
/**
|
||||
* 满意度调查问卷列表
|
||||
*
|
||||
* @param satisfactionSurvey 居民信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
List<SatisfactionSurveyVO> satisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey);
|
||||
|
||||
/**
|
||||
* 满意度调查问卷
|
||||
*
|
||||
* @param patientQuestionSubmitResultId 问卷信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult selectQuestionnaireResult(Long patientQuestionSubmitResultId);
|
||||
}
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.xinelu.manage.service.patientquestionsubmitresult.impl;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.QuestionTypeEnum;
|
||||
import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmitResult;
|
||||
import com.xinelu.manage.mapper.patientquestionsubmitresult.PatientQuestionSubmitResultMapper;
|
||||
import com.xinelu.manage.service.patientquestionsubmitresult.IPatientQuestionSubmitResultService;
|
||||
import com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -87,4 +90,28 @@ public class PatientQuestionSubmitResultServiceImpl implements IPatientQuestionS
|
||||
public int deletePatientQuestionSubmitResultById(Long id) {
|
||||
return patientQuestionSubmitResultMapper.deletePatientQuestionSubmitResultById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 满意度调查问卷列表
|
||||
*
|
||||
* @param satisfactionSurvey 居民信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public List<SatisfactionSurveyVO> satisfactionSurvey(SatisfactionSurveyVO satisfactionSurvey) {
|
||||
satisfactionSurvey.setQuestionType(QuestionTypeEnum.SATISFACTION_QUESTIONNAIRE.getInfo());
|
||||
return patientQuestionSubmitResultMapper.selectSatisfactionSurvey(satisfactionSurvey);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 满意度调查问卷
|
||||
*
|
||||
* @param patientQuestionSubmitResultId 问卷信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectQuestionnaireResult(Long patientQuestionSubmitResultId) {
|
||||
return AjaxResult.success(patientQuestionSubmitResultMapper.selectResultByTaskExecuteRecordId(null, patientQuestionSubmitResultId));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,22 +1,18 @@
|
||||
package com.xinelu.manage.service.patienttaskexecuterecord.impl;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.TaskContentEnum;
|
||||
import com.xinelu.common.utils.AgeUtil;
|
||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||
import com.xinelu.manage.mapper.patientquestionsubmitresult.PatientQuestionSubmitResultMapper;
|
||||
import com.xinelu.manage.mapper.patienttaskexecuterecord.PatientTaskExecuteRecordMapper;
|
||||
import com.xinelu.manage.service.patienttaskexecuterecord.IPatientTaskExecuteRecordService;
|
||||
import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService;
|
||||
import com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO;
|
||||
import com.xinelu.manage.vo.patienttaskexecuterecord.PatientTaskExecuteRecordVO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 患者管理任务执行记录Service业务层处理
|
||||
@ -122,29 +118,6 @@ public class PatientTaskExecuteRecordServiceImpl implements IPatientTaskExecuteR
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectPatientQuestionSubmit(Long taskExecuteRecordId) {
|
||||
//判断任务类型
|
||||
PatientTaskExecuteRecord patientTaskExecuteRecord = patientTaskExecuteRecordMapper.selectPatientTaskExecuteRecordById(taskExecuteRecordId);
|
||||
if (Objects.isNull(patientTaskExecuteRecord) || StringUtils.isBlank(patientTaskExecuteRecord.getTaskContent())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
//如果是人工随访或问卷表
|
||||
if (TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(patientTaskExecuteRecord.getTaskContent()) || TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) {
|
||||
PatientQuestionSubmitResultVO patientQuestionSubmitResult = submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId);
|
||||
patientQuestionSubmitResult.setTaskContent(patientTaskExecuteRecord.getTaskContent());
|
||||
return AjaxResult.success(patientQuestionSubmitResult);
|
||||
}
|
||||
//如果是电话外呼
|
||||
if (TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
//如果是宣教文章
|
||||
if (TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
if (TaskContentEnum.TEXT_REMIND.getInfo().equals(patientTaskExecuteRecord.getTaskContent())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.success();
|
||||
return AjaxResult.success(submitResultMapper.selectResultByTaskExecuteRecordId(taskExecuteRecordId, null));
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,5 +75,5 @@ public interface IQuestionInfoService {
|
||||
* @param departmentName 科室名称
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus);
|
||||
AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus,String questionType);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xinelu.manage.service.questioninfo.impl;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
||||
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
||||
import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
|
||||
@ -94,6 +95,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
||||
BeanUtils.copyBeanProp(questionInfo, question);
|
||||
questionInfo.setCreateTime(LocalDateTime.now());
|
||||
questionInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
questionInfo.setQuestionnaireId(IdUtils.fastUUID());
|
||||
int questionCount = questionInfoMapper.insertQuestionInfo(questionInfo);
|
||||
if (questionCount <= 0) {
|
||||
log.info("新增问卷表失败," + questionInfo);
|
||||
@ -110,7 +112,9 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
||||
saveQuestionSubject.setCreateTime(LocalDateTime.now());
|
||||
saveQuestionSubject.setCreateBy(SecurityUtils.getUsername());
|
||||
questionSubjects.add(saveQuestionSubject);
|
||||
questionSubjectOptions.addAll(questionSubject.getQuestionSubjectOptionList());
|
||||
if (CollectionUtils.isNotEmpty(questionSubject.getQuestionSubjectOptionList())) {
|
||||
questionSubjectOptions.addAll(questionSubject.getQuestionSubjectOptionList());
|
||||
}
|
||||
}
|
||||
int questionSubjectCount = questionSubjectMapper.insertQuestionSubjectList(questionSubjects);
|
||||
if (questionSubjectCount <= 0) {
|
||||
@ -190,6 +194,9 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
||||
log.info("修改问卷题目表失败," + questionSubjects);
|
||||
throw new SecurityException("修改问卷失败!请联系管理员!");
|
||||
}
|
||||
if (CollectionUtils.isEmpty(questionSubjectOptions)) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
List<QuestionSubjectOption> saveQuestionSubjectOptions = new ArrayList<>();
|
||||
for (QuestionSubjectOptionVO questionSubjectOption : questionSubjectOptions) {
|
||||
QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption();
|
||||
@ -251,6 +258,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
||||
* @param questionInfo 问卷基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult updateQuestionByDepartment(QuestionInfo questionInfo) {
|
||||
if (Objects.isNull(questionInfo) || Objects.isNull(questionInfo.getId())) {
|
||||
@ -290,12 +298,12 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus) {
|
||||
public AjaxResult departmentQuestionCount(String departmentName, String questionnaireStatus, String questionType) {
|
||||
DepartmentVO departmentVO = new DepartmentVO();
|
||||
List<DepartmentVO> department = new ArrayList<>();
|
||||
departmentVO.setDepartmentName("全部");
|
||||
departmentVO.setCountNum(0);
|
||||
List<DepartmentVO> departmentVOS = questionInfoMapper.departmentQuestionByDepartmentName(departmentName, questionnaireStatus);
|
||||
List<DepartmentVO> departmentVOS = questionInfoMapper.departmentQuestionByDepartmentName(departmentName, questionnaireStatus, questionType);
|
||||
if (CollectionUtils.isNotEmpty(departmentVOS)) {
|
||||
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
|
||||
departmentVO.setCountNum(result);
|
||||
|
||||
@ -6,6 +6,7 @@ import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.file.FileUploadUtils;
|
||||
import com.xinelu.common.utils.file.MimeTypeUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
||||
import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper;
|
||||
import com.xinelu.manage.service.scriptInfo.IScriptInfoService;
|
||||
@ -71,6 +72,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
||||
// 设置创建人与创建时间
|
||||
scriptInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
scriptInfo.setCreateTime(LocalDateTime.now());
|
||||
scriptInfo.setScriptId(IdUtils.fastUUID());
|
||||
return scriptInfoMapper.insertScriptInfo(scriptInfo);
|
||||
}
|
||||
|
||||
@ -84,7 +86,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateScriptInfo(ScriptInfo scriptInfo) {
|
||||
// 检查除当前记录之外是否存在同名的话术名称
|
||||
if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId(),scriptInfo.getCommonScriptName()) > 0) {
|
||||
if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId(), scriptInfo.getCommonScriptName()) > 0) {
|
||||
// 存在同名的通用话术名称,不能进行更新
|
||||
throw new ServiceException("通用话术名称已存在,请使用其他名称。");
|
||||
}
|
||||
|
||||
@ -94,6 +94,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
|
||||
serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd());
|
||||
serviceFrequency.setCreateBy(username);
|
||||
serviceFrequency.setCreateTime(LocalDateTime.now());
|
||||
serviceFrequency.setServiceSort(serviceWayContentAddDTO.getServiceSort());
|
||||
if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) {
|
||||
throw new ServiceException("新增服务频次失败");
|
||||
}
|
||||
@ -119,6 +120,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
|
||||
serviceFrequency.setCreateBy(username);
|
||||
serviceFrequency.setCreateTime(LocalDateTime.now());
|
||||
serviceFrequency.setServiceSort(serviceWayContentAddDTO.getServiceSort());
|
||||
serviceFrequency.setServiceSort(serviceWayContentAddDTO.getServiceSort());
|
||||
if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) {
|
||||
throw new ServiceException("新增服务频次失败");
|
||||
}
|
||||
@ -192,6 +194,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService {
|
||||
currentFrequency.setServiceFrequencyText(serviceWayContentEditDTO.getServiceFrequencyText());
|
||||
currentFrequency.setServiceFrequencyStart(serviceWayContentEditDTO.getServiceFrequencyStart());
|
||||
currentFrequency.setServiceFrequencyEnd(serviceWayContentEditDTO.getServiceFrequencyEnd());
|
||||
currentFrequency.setServiceSort(serviceWayContentEditDTO.getServiceSort());
|
||||
currentFrequency.setUpdateBy(username);
|
||||
currentFrequency.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ public interface ISignPatientManageRouteService {
|
||||
* @param id 签约患者管理任务路径主键
|
||||
* @return 签约患者管理任务路径
|
||||
*/
|
||||
SignPatientManageRoute selectSignPatientManageRouteById(Long id);
|
||||
SignPatientManageRouteVO selectSignPatientManageRouteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询签约患者管理任务路径列表
|
||||
|
||||
@ -4,6 +4,7 @@ import com.xinelu.common.constant.TaskCreateTypeConstant;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
||||
import com.xinelu.common.enums.TaskContentEnum;
|
||||
import com.xinelu.common.enums.TaskCreateTypeEnum;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.AgeUtil;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
@ -32,6 +33,7 @@ import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||
import com.xinelu.manage.vo.signroutetriggercondition.SignRouteTriggerConditionVO;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -72,8 +74,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
* @return 签约患者管理任务路径
|
||||
*/
|
||||
@Override
|
||||
public SignPatientManageRoute selectSignPatientManageRouteById(Long id) {
|
||||
return signPatientManageRouteMapper.selectSignPatientManageRouteById(id);
|
||||
public SignPatientManageRouteVO selectSignPatientManageRouteById(Long id) {
|
||||
return signPatientManageRouteMapper.selectSignPatientManageRoute(id);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,20 +95,24 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
* @param signPatientManageRoute 签约患者管理任务路径
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult insertSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) {
|
||||
//新增主表
|
||||
signPatientManageRoute.setTaskCreateType(TaskCreateTypeEnum.MANUAL_CREATE.getInfo());
|
||||
signPatientManageRoute.setCreateBy(SecurityUtils.getUsername());
|
||||
signPatientManageRoute.setCreateTime(LocalDateTime.now());
|
||||
int insertRoute = signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute);
|
||||
if (insertRoute < 0) {
|
||||
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
for (SignPatientManageRouteNode signPatientManageRouteNode : signPatientManageRoute.getRouteNodeList()) {
|
||||
signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
||||
signPatientManageRouteNode.setCreateTime(LocalDateTime.now());
|
||||
signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername());
|
||||
//新增节点表
|
||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = new ArrayList<>();
|
||||
SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode();
|
||||
for (SignPatientManageRouteNode routeNode : signPatientManageRoute.getRouteNodeList()) {
|
||||
extracted(signPatientManageRoute, signPatientManageRouteNodes, signPatientManageRouteNode, routeNode);
|
||||
}
|
||||
int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(signPatientManageRoute.getRouteNodeList());
|
||||
int insertBatchCount = signPatientManageRouteNodeMapper.insertBatch(signPatientManageRouteNodes);
|
||||
if (insertBatchCount < 0) {
|
||||
return AjaxResult.error("新增签约患者管理任务路径失败!请联系管理员!");
|
||||
}
|
||||
@ -126,12 +132,14 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改签约患者管理任务路径
|
||||
*
|
||||
* @param signPatientManageRoute 签约患者管理任务路径
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult updateSignPatientManageRoute(SignPatientManageRouteVO signPatientManageRoute) {
|
||||
int deleteRouteNodeCount = signPatientManageRouteNodeMapper.deleteRouteNodeByManageRouteId(signPatientManageRoute.getSignPatientManageRouteId());
|
||||
@ -180,6 +188,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
* @param ids 需要删除的签约患者管理任务路径主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int deleteSignPatientManageRouteByIds(Long[] ids) {
|
||||
return signPatientManageRouteMapper.deleteSignPatientManageRouteByIds(ids);
|
||||
@ -281,10 +290,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
PatientQuestionOptionResult saveQuestionOption = new PatientQuestionOptionResult();
|
||||
BeanUtils.copyBeanProp(saveQuestionOption, patientQuestionOptionResult);
|
||||
// 从已保存的患者问卷题目结果列表中查找当前选项所对应的题目结果
|
||||
PatientQuestionSubjectResult patientQuestionSubjectResult = patientQuestionSubjectResults.stream().
|
||||
filter(Objects::nonNull).
|
||||
filter(item -> Objects.nonNull(item.getQuestionNumber()) && patientQuestionOptionResult.getQuestionNumber().
|
||||
compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new PatientQuestionSubjectResult());
|
||||
PatientQuestionSubjectResult patientQuestionSubjectResult = patientQuestionSubjectResults.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && patientQuestionOptionResult.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new PatientQuestionSubjectResult());
|
||||
saveQuestionOption.setQuestionSubjectResultId(patientQuestionSubjectResult.getId());
|
||||
saveQuestionOption.setCreateTime(time);
|
||||
saveQuestionOption.setCreateBy(routeHandlePerson);
|
||||
@ -334,4 +340,46 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 塞值
|
||||
*/
|
||||
private static void extracted(SignPatientManageRouteVO signPatientManageRoute, List<SignPatientManageRouteNode> signPatientManageRouteNodes, SignPatientManageRouteNode signPatientManageRouteNode, SignPatientManageRouteNode routeNode) {
|
||||
if (Objects.nonNull(routeNode) && TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(routeNode.getTaskType())) {
|
||||
signPatientManageRouteNode.setPhonePushSign(Objects.isNull(routeNode.getPhonePushSign()) ? null : routeNode.getPhonePushSign());
|
||||
signPatientManageRouteNode.setPhoneId(Objects.isNull(routeNode.getPhoneId()) ? null : routeNode.getPhoneId());
|
||||
signPatientManageRouteNode.setPhoneTemplateId(Objects.isNull(routeNode.getPhoneTemplateId()) ? null : routeNode.getPhoneTemplateId());
|
||||
signPatientManageRouteNode.setPhoneTemplateName(StringUtils.isBlank(routeNode.getPhoneTemplateName()) ? null : routeNode.getPhoneTemplateName());
|
||||
signPatientManageRouteNode.setPhoneNodeContent(StringUtils.isBlank(routeNode.getPhoneNodeContent()) ? null : routeNode.getPhoneNodeContent());
|
||||
signPatientManageRouteNode.setPhoneRedialTimes(StringUtils.isBlank(routeNode.getPhoneRedialTimes()) ? null : routeNode.getPhoneRedialTimes());
|
||||
signPatientManageRouteNode.setPhoneTimeInterval(Objects.isNull(routeNode.getPhoneTimeInterval()) ? null : routeNode.getPhoneTimeInterval());
|
||||
}
|
||||
if (Objects.nonNull(routeNode) && TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(routeNode.getTaskType())) {
|
||||
signPatientManageRouteNode.setQuestionInfoId(Objects.isNull(routeNode.getQuestionInfoId()) ? null : routeNode.getQuestionInfoId());
|
||||
signPatientManageRouteNode.setQuestionnaireName(StringUtils.isBlank(routeNode.getQuestionnaireName()) ? null : routeNode.getQuestionnaireName());
|
||||
signPatientManageRouteNode.setQuestionnaireContent(StringUtils.isBlank(routeNode.getQuestionnaireContent()) ? null : routeNode.getQuestionnaireContent());
|
||||
signPatientManageRouteNode.setQuestionExpirationDate(Objects.isNull(routeNode.getQuestionExpirationDate()) ? null : routeNode.getQuestionExpirationDate());
|
||||
}
|
||||
if (Objects.nonNull(routeNode) && TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(routeNode.getTaskType())) {
|
||||
signPatientManageRouteNode.setPropagandaInfoId(Objects.isNull(routeNode.getPropagandaInfoId()) ? null : routeNode.getPropagandaInfoId());
|
||||
signPatientManageRouteNode.setPropagandaTitle(StringUtils.isBlank(routeNode.getPropagandaTitle()) ? null : routeNode.getPropagandaTitle());
|
||||
signPatientManageRouteNode.setPropagandaContent(StringUtils.isBlank(routeNode.getPropagandaContent()) ? null : routeNode.getPropagandaContent());
|
||||
}
|
||||
if (Objects.nonNull(routeNode) && TaskContentEnum.TEXT_REMIND.getInfo().equals(routeNode.getTaskType())) {
|
||||
signPatientManageRouteNode.setTextRemindContent(StringUtils.isBlank(routeNode.getTextRemindContent()) ? null : routeNode.getTextRemindContent());
|
||||
}
|
||||
if (Objects.nonNull(routeNode) && TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(routeNode.getTaskType())) {
|
||||
signPatientManageRouteNode.setFollowTemplateId(Objects.isNull(routeNode.getFollowTemplateId()) ? null : routeNode.getFollowTemplateId());
|
||||
signPatientManageRouteNode.setFollowContent(StringUtils.isBlank(routeNode.getFollowContent()) ? null : routeNode.getFollowContent());
|
||||
signPatientManageRouteNode.setFollowTemplateName(StringUtils.isBlank(routeNode.getFollowTemplateName()) ? null : routeNode.getFollowTemplateName());
|
||||
}
|
||||
signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
||||
signPatientManageRouteNode.setManageRouteName(signPatientManageRoute.getRouteName());
|
||||
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
|
||||
signPatientManageRouteNode.setTaskType(routeNode.getTaskType());
|
||||
signPatientManageRouteNode.setRouteNodeName(routeNode.getRouteNodeName());
|
||||
signPatientManageRouteNode.setRouteNodeDay(routeNode.getRouteNodeDay());
|
||||
signPatientManageRouteNode.setCreateTime(LocalDateTime.now());
|
||||
signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername());
|
||||
signPatientManageRouteNodes.add(signPatientManageRouteNode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRout
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
||||
import com.xinelu.manage.dto.signpatientmanageroutenode.RouteNodeCheckDto;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -23,12 +24,19 @@ public interface ISignPatientManageRouteNodeService {
|
||||
public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id);
|
||||
|
||||
/**
|
||||
* 根据患者主键查询患者管理路径节点
|
||||
*
|
||||
* @param patientId 患者主键
|
||||
* @return 签约患者管理任务路径节点
|
||||
* 查询患者管理路径节点
|
||||
* @param patientTaskDto 任务查询传输对象
|
||||
* @return 患者管理任务路径节点
|
||||
*/
|
||||
List<SignPatientManageRouteNode> getNodesByPatient(Long patientId);
|
||||
List<SignPatientManageRouteNode> getNodeList(PatientTaskDto patientTaskDto);
|
||||
|
||||
/**
|
||||
* 查询患者管理路径节点
|
||||
*
|
||||
* @param patientTaskDto 任务查询传输对象
|
||||
* @return 患者管理任务路径节点
|
||||
*/
|
||||
List<SignPatientManageRouteNodeVo> getRouteNodeList(PatientTaskDto patientTaskDto);
|
||||
|
||||
/**
|
||||
* 查询签约患者管理任务路径节点列表
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xinelu.manage.service.signpatientmanageroutenode.impl;
|
||||
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
@ -10,11 +11,12 @@ import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMap
|
||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.PatientTaskVo;
|
||||
import com.xinelu.manage.vo.signpatientmanageroutenode.SignPatientManageRouteNodeVo;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -44,23 +46,37 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
||||
return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id);
|
||||
}
|
||||
|
||||
@Override public List<SignPatientManageRouteNode> getNodesByPatient(Long patientId) {
|
||||
List<SignPatientManageRouteNode> nodeList = new ArrayList<>();
|
||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
|
||||
if (patientInfo.getSignPatientRecordId() != null) {
|
||||
// 查询签约路径
|
||||
SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute();
|
||||
signPatientManageRoute.setSignPatientRecordId(patientInfo.getSignPatientRecordId());
|
||||
signPatientManageRoute.setPatientId(patientId);
|
||||
List<SignPatientManageRoute> signRoutes = signRouteMapper.selectSignPatientManageRouteList(signPatientManageRoute);
|
||||
if (CollectionUtils.isNotEmpty(signRoutes)) {
|
||||
SignPatientManageRoute signRoute = signRoutes.get(0);
|
||||
SignPatientManageRouteNode nddeQuery = new SignPatientManageRouteNode();
|
||||
nddeQuery.setManageRouteId(signRoute.getId());
|
||||
nodeList = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(nddeQuery);
|
||||
}
|
||||
@Override public List<SignPatientManageRouteNode> getNodeList(PatientTaskDto patientTaskDto) {
|
||||
if (patientTaskDto.getPatientId() == null) {
|
||||
throw new ServiceException("患者信息有误");
|
||||
}
|
||||
return nodeList;
|
||||
return signPatientManageRouteNodeMapper.getNodeList(patientTaskDto);
|
||||
}
|
||||
|
||||
@Override public List<SignPatientManageRouteNodeVo> getRouteNodeList(PatientTaskDto patientTaskDto) {
|
||||
List<SignPatientManageRouteNodeVo> retList = new ArrayList<>();
|
||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientTaskDto.getPatientId());
|
||||
if (patientTaskDto.getPatientId() == null || ObjectUtils.isEmpty(patientInfo)) {
|
||||
throw new ServiceException("请选择患者!");
|
||||
}
|
||||
// 查询任务列表
|
||||
SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute();
|
||||
signPatientManageRoute.setSignPatientRecordId(patientTaskDto.getSignPatientRecordId());
|
||||
signPatientManageRoute.setPatientId(patientTaskDto.getPatientId());
|
||||
signPatientManageRoute.setTaskCreateType(patientTaskDto.getTaskCreateType());
|
||||
List<SignPatientManageRoute> signRoutes = signRouteMapper.selectSignPatientManageRouteList(signPatientManageRoute);
|
||||
for (SignPatientManageRoute route : signRoutes) {
|
||||
SignPatientManageRouteNode nodeQuery = new SignPatientManageRouteNode();
|
||||
nodeQuery.setManageRouteId(route.getId());
|
||||
List<SignPatientManageRouteNode> nodeList = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(nodeQuery);
|
||||
retList.add(SignPatientManageRouteNodeVo.builder().manageRouteId(route.getId())
|
||||
.routeName(route.getRouteName())
|
||||
.taskCreateType(route.getTaskCreateType())
|
||||
.suitRange(route.getSuitRange())
|
||||
.nodeList(nodeList).build());
|
||||
}
|
||||
|
||||
return retList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -163,6 +163,7 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
* @param specialDiseaseNode 节点信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult updateRouteCheckStatus(SpecialDiseaseNode specialDiseaseNode) {
|
||||
if (Objects.isNull(specialDiseaseNode) || Objects.isNull(specialDiseaseNode.getId())) {
|
||||
|
||||
@ -77,6 +77,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
||||
* @param specialDiseaseRoute 专病路径信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult insertSpecialDiseaseRoute(SpecialDiseaseRouteVO specialDiseaseRoute) {
|
||||
specialDiseaseRoute.setCreateTime(LocalDateTime.now());
|
||||
@ -111,6 +112,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
||||
* @param specialDiseaseRoute 专病路径信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult updateSpecialDiseaseRoute(SpecialDiseaseRouteVO specialDiseaseRoute) {
|
||||
int deleteRoutePackageCount = specialDiseaseRoutePackageMapper.deleteSpecialDiseaseRoutePackageByRouteId(specialDiseaseRoute.getId());
|
||||
@ -209,6 +211,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
||||
* @param specialDiseaseRoute 路径信息
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult editReleaseStatus(SpecialDiseaseRoute specialDiseaseRoute) {
|
||||
if (Objects.isNull(specialDiseaseRoute) || StringUtils.isBlank(specialDiseaseRoute.getReleaseStatus())) {
|
||||
|
||||
@ -4,6 +4,7 @@ import com.xinelu.common.core.domain.entity.SysDictData;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.textmessage.TextMessage;
|
||||
import com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask;
|
||||
import com.xinelu.manage.dto.textmessage.TextMessageDTO;
|
||||
@ -112,6 +113,7 @@ public class TextMessageServiceImpl implements ITextMessageService {
|
||||
LocalDateTime currentTime = LocalDateTime.now();
|
||||
textMessageTaskDTO.setCreateBy(currentUsername);
|
||||
textMessageTaskDTO.setCreateTime(currentTime);
|
||||
textMessageTaskDTO.setTextMessageId(IdUtils.fastUUID());
|
||||
|
||||
// 将textMessageTaskDTO对象的属性复制到textMessage对象
|
||||
TextMessage textMessage = new TextMessage();
|
||||
|
||||
@ -4,6 +4,7 @@ import com.xinelu.common.core.domain.entity.SysDictData;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
|
||||
import com.xinelu.manage.domain.wechattemplatesuittask.WechatTemplateSuitTask;
|
||||
import com.xinelu.manage.dto.wechattemplate.WechatTemplateDTO;
|
||||
@ -104,7 +105,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
|
||||
// 将wechatTemplateTaskDTO对象的属性复制到wechatTemplate对象
|
||||
WechatTemplate wechatTemplate = new WechatTemplate();
|
||||
BeanUtils.copyProperties(wechatTemplateTaskDTO, wechatTemplate);
|
||||
|
||||
wechatTemplate.setTemplateId(IdUtils.fastUUID());
|
||||
// 插入wechatTemplate记录并检查结果
|
||||
if (wechatTemplateMapper.insertWechatTemplate(wechatTemplate) <= 0) {
|
||||
throw new ServiceException("新增微信模板失败");
|
||||
|
||||
@ -114,5 +114,14 @@ public class ManualFollowUpVO {
|
||||
@ApiModelProperty(value = "模板id")
|
||||
private String templateId;
|
||||
|
||||
@ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED")
|
||||
private String nodeExecuteStatus;
|
||||
|
||||
@ApiModelProperty(value = "任务执行记录id")
|
||||
private Long taskExecuteRecordId;
|
||||
|
||||
@ApiModelProperty(value = "任务处理信息")
|
||||
private String routeHandleRemark;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import com.xinelu.manage.vo.patientquestionsubjectresult.PatientQuestionSubjectR
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -34,5 +35,18 @@ public class PatientQuestionSubmitResultVO {
|
||||
@ApiModelProperty(value = "问卷说明")
|
||||
private String questionnaireDescription;
|
||||
|
||||
/**
|
||||
* 问卷总分值,小数点后两位
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷总分值,小数点后两位")
|
||||
private BigDecimal questionnaireTotalScore;
|
||||
|
||||
/**
|
||||
* 问卷总得分,根据患者提交问卷得出的分值
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷总得分,根据患者提交问卷得出的分值")
|
||||
private BigDecimal totalScore;
|
||||
|
||||
|
||||
List<PatientQuestionSubjectResultVO> subjectResultList;
|
||||
}
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
package com.xinelu.manage.vo.patientquestionsubmitresult;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 满意度调查
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-04-15
|
||||
*/
|
||||
@Data
|
||||
public class SatisfactionSurveyVO {
|
||||
|
||||
private Long patientQuestionSubmitResultId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "患者姓名")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者电话
|
||||
*/
|
||||
@ApiModelProperty(value = "患者电话")
|
||||
private String patientPhone;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 出生日期,格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate birthDate;
|
||||
|
||||
/**
|
||||
* 性别,男:MALE,女:FEMALE
|
||||
*/
|
||||
@ApiModelProperty(value = "性别,男:MALE,女:FEMALE")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 问卷类型,普通问卷:REGULAR_QUESTIONNAIRE,满意度问卷:SATISFACTION_QUESTIONNAIRE
|
||||
*/
|
||||
@ApiModelProperty(value = "问卷类型")
|
||||
private String questionType;
|
||||
|
||||
/**
|
||||
* 患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT,
|
||||
* 签约患者:CONTRACTED_PATIENT
|
||||
*/
|
||||
@ApiModelProperty(value = "患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT,签约患者:CONTRACTED_PATIENT")
|
||||
private String patientType;
|
||||
|
||||
/**
|
||||
* 签约状态,未签约:UN_SIGN,在签:IN_SIGN,解约:SEPARATE_SIGN, 服务到期:EXPIRE_SIGN
|
||||
*/
|
||||
@ApiModelProperty(value = "签约状态,未签约:UN_SIGN,在签:IN_SIGN,解约:SEPARATE_SIGN, 过期:EXPIRE_SIGN")
|
||||
private String signStatus;
|
||||
|
||||
/**
|
||||
* 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END
|
||||
*/
|
||||
@ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END")
|
||||
private String serviceStatus;
|
||||
|
||||
/**
|
||||
* 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL
|
||||
*/
|
||||
@ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL")
|
||||
private String visitMethod;
|
||||
|
||||
/**
|
||||
* 所属医院名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属医院名称")
|
||||
private String hospitalAgencyName;
|
||||
|
||||
/**
|
||||
* 所属科室名称
|
||||
*/
|
||||
@ApiModelProperty(value = "所属科室名称")
|
||||
private String departmentName;
|
||||
}
|
||||
@ -3,8 +3,10 @@ package com.xinelu.manage.vo.patienttaskexecuterecord;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@ -102,4 +104,19 @@ public class PatientTaskExecuteRecordVO extends PatientTaskExecuteRecord {
|
||||
|
||||
@ApiModelProperty(value = "手术记录")
|
||||
private String surgicalRecord;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
private String taskType;
|
||||
|
||||
@ApiModelProperty(value = "模板id")
|
||||
private String templateId;
|
||||
|
||||
@ApiModelProperty(value = "文字提醒内容(任务类型为文字提醒使用)")
|
||||
private String textRemindContent;
|
||||
|
||||
@ApiModelProperty(value = "任务处理信息")
|
||||
private String routeHandleRemark;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -48,4 +48,9 @@ public class ServiceFrequencyVO {
|
||||
@ApiModelProperty(value = "服务频次数字结束值")
|
||||
@Excel(name = "服务频次数字结束值")
|
||||
private Integer serviceFrequencyEnd;
|
||||
|
||||
@ApiModelProperty(value = "服务频次排序")
|
||||
private Integer serviceFrequencySort;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -67,4 +67,7 @@ public class ServiceWayContentAndFrequencyVO {
|
||||
@ApiModelProperty(value = "服务频次数字结束值")
|
||||
@Excel(name = "服务频次数字结束值")
|
||||
private Integer serviceFrequencyEnd;
|
||||
|
||||
@ApiModelProperty(value = "服务频次排序")
|
||||
private Integer serviceFrequencySort;
|
||||
}
|
||||
|
||||
@ -1,211 +0,0 @@
|
||||
package com.xinelu.manage.vo.signpatientmanageroute;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 居民管理路径查询返回视图类
|
||||
* @author: haown
|
||||
* @create: 2024-04-02 08:58
|
||||
**/
|
||||
@ApiModel("居民管理路径查询返回视图类")
|
||||
@Data
|
||||
public class SignPatientManageRouteNodeVo {
|
||||
|
||||
/** 签约记录表id */
|
||||
@ApiModelProperty(value = "签约记录表id")
|
||||
private Long signPatientRecordId;
|
||||
|
||||
/** 路径主键 */
|
||||
@ApiModelProperty(value = "路径主键")
|
||||
private Long routeId;
|
||||
|
||||
/** 路径名称(任务名称) */
|
||||
@ApiModelProperty(value = "路径名称")
|
||||
private String routeName;
|
||||
|
||||
/** 管理路径节点名称,出院后:AFTER_DISCHARGE,入院后:AFTER_ADMISSION,就诊后:AFTER_CONSULTATION,就诊/出院后:AFTER_VISIT_DISCHARGE,术前:PREOPERATIVE,术后:POSTOPERATIVE*/
|
||||
@ApiModelProperty(value = "管理路径节点名称,出院后:AFTER_DISCHARGE,入院后:AFTER_ADMISSION,就诊后:AFTER_CONSULTATION,"
|
||||
+ "就诊/出院后:AFTER_VISIT_DISCHARGE,术前:PREOPERATIVE,术后:POSTOPERATIVE")
|
||||
private String routeNodeName;
|
||||
|
||||
/** 管理路径节点时间,时间单位为:天 */
|
||||
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
|
||||
private Integer routeNodeDay;
|
||||
|
||||
/** 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP */
|
||||
@ApiModelProperty(value = "任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
private String taskType;
|
||||
|
||||
/** 任务状态 */
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private String taskStatus;
|
||||
|
||||
/** 任务细分 */
|
||||
@ApiModelProperty(value = "任务细分")
|
||||
private String taskSubdivision;
|
||||
|
||||
/** 二级分类描述 */
|
||||
@ApiModelProperty(value = "二级分类描述")
|
||||
private String secondClassifyDescribe;
|
||||
|
||||
/** 执行时间,格式:HH:mm */
|
||||
@ApiModelProperty(value = "执行时间,格式:HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private LocalTime executeTime;
|
||||
|
||||
/** 电话推送标识,0:未开启,1:已开启 */
|
||||
@ApiModelProperty(value = "电话推送标识,0:未开启,1:已开启")
|
||||
private Integer phonePushSign;
|
||||
|
||||
/** 电话话术表id */
|
||||
@ApiModelProperty(value = "电话话术表id")
|
||||
private Long phoneId;
|
||||
|
||||
/** 电话模板ID */
|
||||
@ApiModelProperty(value = "电话模板ID")
|
||||
private String phoneTemplateId;
|
||||
|
||||
/** 电话模板名称 */
|
||||
@ApiModelProperty(value = "电话模板名称")
|
||||
private String phoneTemplateName;
|
||||
|
||||
/** 电话内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
|
||||
@ApiModelProperty(value = "电话内容")
|
||||
private String phoneNodeContent;
|
||||
|
||||
/** 电话重拨次数,重拨一次:REDIAL_ONCE,重拨二次:REDIAL_TWICE,不重播:NOT_REPLAY */
|
||||
@ApiModelProperty(value = "电话重拨次数,重拨一次:REDIAL_ONCE,重拨二次:REDIAL_TWICE,不重播:NOT_REPLAY")
|
||||
private String phoneRedialTimes;
|
||||
|
||||
/** 电话时间间隔,单位为:分钟 */
|
||||
@ApiModelProperty(value = "电话时间间隔,单位为:分钟")
|
||||
private Integer phoneTimeInterval;
|
||||
|
||||
/** 电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE */
|
||||
@ApiModelProperty(value = "电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE")
|
||||
private String phoneMessageRemind;
|
||||
|
||||
/** 电话短信模板表id */
|
||||
@ApiModelProperty(value = "电话短信模板表id")
|
||||
private Long phoneMessageTemplateId;
|
||||
|
||||
/** 电话短信模板名称 */
|
||||
@ApiModelProperty(value = "电话短信模板名称")
|
||||
private String phoneMessageTemplateName;
|
||||
|
||||
/** 问卷表id */
|
||||
@ApiModelProperty(value = "问卷表id")
|
||||
private Long questionInfoId;
|
||||
|
||||
/** 问卷模板名称 */
|
||||
@ApiModelProperty(value = "问卷模板名称")
|
||||
private String questionnaireName;
|
||||
|
||||
/** 问卷模板内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
|
||||
@ApiModelProperty(value = "问卷模板内容")
|
||||
private String questionnaireContent;
|
||||
|
||||
/** 问卷有效期,单位:天 */
|
||||
@ApiModelProperty(value = "问卷有效期,单位:天")
|
||||
private Integer questionExpirationDate;
|
||||
|
||||
/** 宣教文章表id */
|
||||
@ApiModelProperty(value = "宣教文章表id")
|
||||
private Long propagandaInfoId;
|
||||
|
||||
/** 宣教文章模板标题(宣教模板名称) */
|
||||
@ApiModelProperty(value = "宣教文章模板标题")
|
||||
private String propagandaTitle;
|
||||
|
||||
/** 宣教文章内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
|
||||
@ApiModelProperty(value = "宣教文章内容")
|
||||
private String propagandaContent;
|
||||
|
||||
/** 短信推送标识,0:未开启,1:已开启 */
|
||||
@ApiModelProperty(value = "短信推送标识,0:未开启,1:已开启")
|
||||
private Integer messagePushSign;
|
||||
|
||||
/** 短信模板表id */
|
||||
@ApiModelProperty(value = "短信模板表id")
|
||||
private Long messageTemplateId;
|
||||
|
||||
/** 短信模板名称 */
|
||||
@ApiModelProperty(value = "短信模板名称")
|
||||
private String messageTemplateName;
|
||||
|
||||
/** 短信预览 */
|
||||
@ApiModelProperty(value = "短信预览")
|
||||
private String messagePreview;
|
||||
|
||||
/** 短信节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
|
||||
@ApiModelProperty(value = "短信节点内容")
|
||||
private String messageNodeContent;
|
||||
|
||||
/** 公众号推送标识,0:未开启,1:已开启 */
|
||||
@ApiModelProperty(value = "公众号推送标识,0:未开启,1:已开启")
|
||||
private Integer officialPushSign;
|
||||
|
||||
/** 公众号模板表id */
|
||||
@ApiModelProperty(value = "公众号模板表id")
|
||||
private Long officialTemplateId;
|
||||
|
||||
/** 公众号模板名称 */
|
||||
@ApiModelProperty(value = "公众号模板名称")
|
||||
private String officialTemplateName;
|
||||
|
||||
/** 公众号提醒内容 */
|
||||
@ApiModelProperty(value = "公众号提醒内容")
|
||||
private String officialRemindContent;
|
||||
|
||||
/** 公众号节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
|
||||
@ApiModelProperty(value = "公众号节点内容")
|
||||
private String officialNodeContent;
|
||||
|
||||
/** 小程序推送标识,0:未开启,1:已开启 */
|
||||
@ApiModelProperty(value = "小程序推送标识,0:未开启,1:已开启")
|
||||
private Integer appletPushSign;
|
||||
|
||||
/** 小程序模板表id */
|
||||
@ApiModelProperty(value = "小程序模板表id")
|
||||
private Long appletTemplateId;
|
||||
|
||||
/** 小程序模板名称 */
|
||||
@ApiModelProperty(value = "小程序模板名称")
|
||||
private String appletTemplateName;
|
||||
|
||||
/** 小程序提醒内容 */
|
||||
@ApiModelProperty(value = "小程序提醒内容")
|
||||
private String appletRemindContent;
|
||||
|
||||
/** 小程序提示说明 */
|
||||
@ApiModelProperty(value = "小程序提示说明")
|
||||
private String appletPromptDescription;
|
||||
|
||||
/** 小程序节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
|
||||
@ApiModelProperty(value = "小程序节点内容")
|
||||
private String appletNodeContent;
|
||||
|
||||
/** 人工随访模板表id */
|
||||
@ApiModelProperty(value = "人工随访模板表id")
|
||||
private Long followTemplateId;
|
||||
|
||||
/** 人工随访模板名称 */
|
||||
@ApiModelProperty(value = "人工随访模板名称")
|
||||
private String followTemplateName;
|
||||
|
||||
/** 人工随访模板内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
|
||||
@ApiModelProperty(value = "人工随访模板内容")
|
||||
private String followContent;
|
||||
|
||||
/** 节点审核状态,同意:AGREE,不同意:DISAGREE */
|
||||
@ApiModelProperty(value = "节点审核状态,同意:AGREE,不同意:DISAGREE")
|
||||
private String routeCheckStatus;
|
||||
|
||||
/** 节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED */
|
||||
@ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED")
|
||||
private String nodeExecuteStatus;
|
||||
}
|
||||
@ -121,10 +121,21 @@ public class PatientTaskVo {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime visitDate;
|
||||
|
||||
/**
|
||||
* 出院时间(出院患者),时间格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "出院时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime dischargeTime;
|
||||
|
||||
/** 手术名称 */
|
||||
@ApiModelProperty(value = "手术名称")
|
||||
private String surgicalName;
|
||||
|
||||
/** 签约记录表id */
|
||||
@ApiModelProperty(value = "签约记录表id")
|
||||
private Long signPatientRecordId;
|
||||
|
||||
/** 签约患者管理任务路径节点id */
|
||||
@ApiModelProperty(value = "签约患者管理任务路径节点id")
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
package com.xinelu.manage.vo.signpatientmanageroutenode;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @description: 查询管理路任务路径节点返回视图类
|
||||
* @author: haown
|
||||
* @create: 2024-04-10 15:40
|
||||
**/
|
||||
@ApiModel("查询管理路任务路径节点返回视图类")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SignPatientManageRouteNodeVo {
|
||||
|
||||
/** 签约患者管理任务表id */
|
||||
@ApiModelProperty(value = "签约患者管理任务表id")
|
||||
private Long manageRouteId;
|
||||
|
||||
/** 路径名称(任务名称) */
|
||||
@ApiModelProperty(value = "路径名称")
|
||||
private String routeName;
|
||||
|
||||
/** 任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE */
|
||||
@ApiModelProperty(value = "任务创建类型,手动创建:MANUAL_CREATE,自动匹配:MANUAL_MATCHE")
|
||||
private String taskCreateType;
|
||||
|
||||
/** 适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE */
|
||||
@ApiModelProperty(value = "适用范围,在院:IN_THE_HOSPITAL,出院:DISCHARGE,门诊:OUTPATIENT_SERVICE,门诊+出院:OUTPATIENT_SERVICE_DISCHARGE")
|
||||
private String suitRange;
|
||||
|
||||
/**
|
||||
* 节点列表
|
||||
*/
|
||||
@ApiModelProperty(value = "节点列表")
|
||||
List<SignPatientManageRouteNode> nodeList;
|
||||
}
|
||||
@ -189,6 +189,11 @@ public class SignPatientListVo {
|
||||
@ApiModelProperty(value = "服务包名称")
|
||||
private String packageName;
|
||||
|
||||
/** 服务结束时间,格式:yyyy-MM-dd HH:mm:ss */
|
||||
@ApiModelProperty(value = "服务结束时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate serviceEndTime;
|
||||
|
||||
/** 服务周期 */
|
||||
@ApiModelProperty(value = "服务周期")
|
||||
private Integer packageTerm;
|
||||
|
||||
@ -77,6 +77,7 @@
|
||||
#{fieldMark}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectLabelFieldContentById" parameterType="Long"
|
||||
|
||||
@ -57,6 +57,7 @@
|
||||
#{fieldRemark}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@ -37,6 +37,8 @@
|
||||
<result property="submitResulId" column="submitResulId"/>
|
||||
<result property="questionnaireName" column="questionnaire_name"/>
|
||||
<result property="questionnaireDescription" column="questionnaire_description"/>
|
||||
<result property="questionnaireTotalScore" column="questionnaire_total_score"/>
|
||||
<result property="totalScore" column="total_score"/>
|
||||
<collection property="subjectResultList" javaType="java.util.List"
|
||||
resultMap="PatientQuestionSubjectResultResult"/>
|
||||
</resultMap>
|
||||
@ -375,39 +377,85 @@
|
||||
<select id="selectResultByTaskExecuteRecordId"
|
||||
resultType="com.xinelu.manage.vo.patientquestionsubmitresult.PatientQuestionSubmitResultVO"
|
||||
resultMap="PatientQuestionSubmitResultDTO">
|
||||
select pqsm.id submitResulId,
|
||||
pqsm.questionnaire_name,
|
||||
pqsm.questionnaire_description,
|
||||
pqsj.id subjectResult,
|
||||
pqsj.question_submit_result_id,
|
||||
pqsj.question_info_id,
|
||||
pqsj.question_number,
|
||||
pqsj.question_type,
|
||||
pqsj.question_name,
|
||||
pqsj.question_description,
|
||||
pqsj.write_description,
|
||||
pqsj.fill_blanks_answer,
|
||||
pqsj.option_count,
|
||||
pqsj.whether_score,
|
||||
pqsj.scoring_method,
|
||||
pqsj.scoring_description,
|
||||
pqsj.question_score,
|
||||
pqsj.question_sort,
|
||||
pqsj.question_remark,
|
||||
pqor.id,
|
||||
pqor.question_subject_result_id,
|
||||
pqor.questionnaire_subject_id,
|
||||
pqor.question_name,
|
||||
pqor.option_name,
|
||||
pqor.option_answer,
|
||||
pqor.option_score,
|
||||
pqor.option_choose_sign,
|
||||
pqor.option_submit_answer,
|
||||
pqor.option_sort,
|
||||
pqor.option_remark
|
||||
select
|
||||
pqsm.id submitResulId,
|
||||
pqsm.questionnaire_name,
|
||||
pqsm.questionnaire_description,
|
||||
pqsm.questionnaire_total_score,
|
||||
pqsm.total_score,
|
||||
pqsj.id subjectResult,
|
||||
pqsj.question_submit_result_id,
|
||||
pqsj.question_info_id,
|
||||
pqsj.question_number,
|
||||
pqsj.question_type,
|
||||
pqsj.question_name,
|
||||
pqsj.question_description,
|
||||
pqsj.write_description,
|
||||
pqsj.fill_blanks_answer,
|
||||
pqsj.option_count,
|
||||
pqsj.whether_score,
|
||||
pqsj.scoring_method,
|
||||
pqsj.scoring_description,
|
||||
pqsj.question_score,
|
||||
pqsj.question_sort,
|
||||
pqsj.question_remark,
|
||||
pqor.id,
|
||||
pqor.question_subject_result_id,
|
||||
pqor.questionnaire_subject_id,
|
||||
pqor.question_name,
|
||||
pqor.option_name,
|
||||
pqor.option_answer,
|
||||
pqor.option_score,
|
||||
pqor.option_choose_sign,
|
||||
pqor.option_submit_answer,
|
||||
pqor.option_sort,
|
||||
pqor.option_remark
|
||||
FROM patient_question_submit_result pqsm
|
||||
LEFT JOIN patient_question_subject_result pqsj ON pqsm.id = pqsj.question_submit_result_id
|
||||
LEFT JOIN patient_question_option_result pqor ON pqor.question_subject_result_id = pqsj.id
|
||||
where pqsm.task_execute_record_id = #{taskExecuteRecordId}
|
||||
LEFT JOIN patient_question_subject_result pqsj ON pqsm.id = pqsj.question_submit_result_id
|
||||
LEFT JOIN patient_question_option_result pqor ON pqor.question_subject_result_id = pqsj.id
|
||||
<where>
|
||||
<if test="taskExecuteRecordId != null">
|
||||
and pqsm.task_execute_record_id = #{taskExecuteRecordId}
|
||||
</if>
|
||||
<if test="patientQuestionSubmitResultId != null">
|
||||
and pqsm.id = #{patientQuestionSubmitResultId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSatisfactionSurvey" resultType="com.xinelu.manage.vo.patientquestionsubmitresult.SatisfactionSurveyVO">
|
||||
select
|
||||
pqsr.id patientQuestionSubmitResultId,
|
||||
pqsr.patient_name,
|
||||
pi.patient_phone,
|
||||
pi.birth_date,
|
||||
pi.card_no,
|
||||
pi.sex,
|
||||
pi.patient_type,
|
||||
pi.sign_status,
|
||||
pi.visit_method,
|
||||
pi.patient_health_state,
|
||||
pi.hospital_agency_name,
|
||||
pi.department_name
|
||||
from patient_question_submit_result pqsr
|
||||
LEFT JOIN question_info qi on pqsr.question_info_id = qi.id
|
||||
LEFT JOIN patient_info pi ON pi.id = pqsr.patient_id
|
||||
where
|
||||
pi.del_flag = 0
|
||||
<if test="questionType != null and questionType != ''">
|
||||
and qi.question_type = #{questionType}
|
||||
</if>
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and pi.patient_name like concat('%', #{patientName}, '%')
|
||||
</if>
|
||||
<if test="patientPhone != null and patientPhone != ''">
|
||||
and pi.patient_phone like concat('%', #{patientPhone}, '%')
|
||||
</if>
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and pi.card_no = #{cardNo}
|
||||
</if>
|
||||
<if test="sex != null and sex != ''">
|
||||
and pi.sex = #{sex}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -111,9 +111,19 @@
|
||||
pi.admission_time,
|
||||
pi.discharge_time,
|
||||
pi.in_hospital_number,
|
||||
pi.patient_phone
|
||||
pi.patient_phone,
|
||||
spmrn.task_type,
|
||||
spmrn.route_handle_remark,
|
||||
CASE
|
||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id
|
||||
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id
|
||||
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
||||
WHEN spmrn.task_type = 'PROPAGANDA_ARTICLE' THEN spmrn.propaganda_info_id
|
||||
END AS 'templateId',
|
||||
IF(spmrn.task_type ='TEXT_REMIND',spmrn.text_remind_content,NULL) AS textRemindContent
|
||||
from patient_task_execute_record pter
|
||||
LEFT JOIN patient_info pi ON pi.id = pter.patient_id
|
||||
LEFT JOIN sign_patient_manage_route_node spmrn ON pter.manage_route_node_id = spmrn.id
|
||||
where pi.del_flag = 0
|
||||
<if test="patientName != null and patientName != ''">
|
||||
and pi.patient_name = #{patientName}
|
||||
@ -130,11 +140,11 @@
|
||||
<if test="visitMethod != null and visitMethod != ''">
|
||||
and pi.visit_method = #{visitMethod}
|
||||
</if>
|
||||
<if test="executeTime != null ">
|
||||
and pter.execute_time <= #{startDate}
|
||||
<if test="startDate != null ">
|
||||
and pter.execute_time >=#{startDate}
|
||||
</if>
|
||||
<if test="executeTime != null ">
|
||||
and pter.execute_time >= #{endDate}
|
||||
<if test="endDate != null ">
|
||||
and pter.execute_time <= #{endDate}
|
||||
</if>
|
||||
<if test="manageRouteName != null and manageRouteName != ''">
|
||||
and pter.manage_route_name like concat('%', #{manageRouteName}, '%')
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
<result property="questionnaireStatus" column="questionnaire_status"/>
|
||||
<result property="questionnaireSort" column="questionnaire_sort"/>
|
||||
<result property="questionnaireRemark" column="questionnaire_remark"/>
|
||||
<result property="questionType" column="question_type"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@ -40,6 +41,7 @@
|
||||
questionnaire_status,
|
||||
questionnaire_sort,
|
||||
questionnaire_remark,
|
||||
question_type,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
@ -89,6 +91,9 @@
|
||||
<if test="questionnaireRemark != null and questionnaireRemark != ''">
|
||||
and questionnaire_remark = #{questionnaireRemark}
|
||||
</if>
|
||||
<if test="questionType != null and questionType != ''">
|
||||
and question_type = #{questionType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -128,6 +133,8 @@
|
||||
</if>
|
||||
<if test="questionnaireRemark != null">questionnaire_remark,
|
||||
</if>
|
||||
<if test="questionType != null">question_type,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
@ -164,6 +171,8 @@
|
||||
</if>
|
||||
<if test="questionnaireRemark != null">#{questionnaireRemark},
|
||||
</if>
|
||||
<if test="questionType != null">#{questionType},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
@ -217,6 +226,9 @@
|
||||
<if test="questionnaireRemark != null">questionnaire_remark =
|
||||
#{questionnaireRemark},
|
||||
</if>
|
||||
<if test="questionType != null">question_type =
|
||||
#{questionType},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
@ -254,10 +266,13 @@
|
||||
from department dt left join question_info qi on dt.id = qi.department_id
|
||||
<where>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
dt.department_name like concat('%',#{departmentName},'%')
|
||||
and dt.department_name like concat('%',#{departmentName},'%')
|
||||
</if>
|
||||
<if test="questionnaireStatus != null and questionnaireStatus != ''">
|
||||
qi.questionnaire_status =#{questionnaireStatus}
|
||||
and qi.questionnaire_status =#{questionnaireStatus}
|
||||
</if>
|
||||
<if test="questionType != null and questionType != ''">
|
||||
and qi.question_type = #{questionType}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY dt.id
|
||||
|
||||
@ -183,4 +183,18 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getResidentInfoByPhoneAndOpenId" parameterType="string"
|
||||
resultType="com.xinelu.manage.domain.residentinfo.ResidentInfo">
|
||||
<include refid="selectResidentInfoVo" />
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="phone != null and phone != ''">
|
||||
and patient_phone = #{phone}
|
||||
</if>
|
||||
<if test="openId != null and openId != ''">
|
||||
and open_id = #{openId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -35,6 +35,7 @@
|
||||
<result column="service_frequency_text" property="serviceFrequencyText"/>
|
||||
<result column="service_frequency_start" property="serviceFrequencyStart"/>
|
||||
<result column="service_frequency_end" property="serviceFrequencyEnd"/>
|
||||
<result column="serviceFrequencySort" property="serviceFrequencySort"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
@ -155,7 +156,8 @@
|
||||
swc2.service_frequency_type,
|
||||
swc2.service_frequency_text,
|
||||
swc2.service_frequency_start,
|
||||
swc2.service_frequency_end
|
||||
swc2.service_frequency_end,
|
||||
swc2.service_sort AS 'serviceFrequencySort'
|
||||
FROM service_way_content swc1
|
||||
JOIN service_way_content swc2 on swc1.id = swc2.service_content_id
|
||||
<where>
|
||||
@ -185,7 +187,8 @@
|
||||
swc1.service_frequency_type,
|
||||
swc1.service_frequency_text,
|
||||
swc1.service_frequency_start,
|
||||
swc1.service_frequency_end
|
||||
swc1.service_frequency_end,
|
||||
swc1.service_sort AS 'serviceFrequencySort'
|
||||
FROM service_way_content swc1
|
||||
LEFT JOIN service_way_content swc2 ON swc1.service_content_id = swc2.id
|
||||
WHERE swc1.service_type = 'SERVICE_FREQUENCY'
|
||||
|
||||
@ -307,7 +307,7 @@
|
||||
pvr.surgical_name,
|
||||
pi.attending_physician_id,
|
||||
pi.attending_physician_name,
|
||||
IF(spmr.suit_range = 'IN_THE_HOSPITAL', pi.admission_time, NULL) AS 'admissionTime',
|
||||
IF(spmr.suit_range = 'IN_THE_HOSPITAL' OR spmr.suit_range = 'DISCHARGE', pi.admission_time, NULL) AS 'admissionTime',
|
||||
CASE
|
||||
WHEN spmr.suit_range = 'OUTPATIENT_SERVICE' THEN pi.visit_date
|
||||
WHEN spmr.suit_range = 'DISCHARGE' THEN pi.discharge_time
|
||||
@ -318,6 +318,7 @@
|
||||
WHEN spmr.suit_range = 'OUTPATIENT_SERVICE_DISCHARGE' AND pi.visit_date IS NOT NULL THEN 'OUTPATIENT_SERVICE'
|
||||
WHEN spmr.suit_range = 'OUTPATIENT_SERVICE_DISCHARGE' AND pi.discharge_time IS NOT NULL THEN 'DISCHARGE'
|
||||
END AS 'suitRange',
|
||||
pter.id AS 'taskExecuteRecordId',
|
||||
pter.execute_time AS 'executeTime',
|
||||
spmr.id AS 'manageRouteId',
|
||||
spmrn.id AS 'manageRouteNodeId',
|
||||
@ -330,10 +331,12 @@
|
||||
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_name
|
||||
END AS 'templateName',
|
||||
CASE
|
||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_template_id
|
||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id
|
||||
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id
|
||||
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
||||
END AS 'templateId'
|
||||
END AS 'templateId',
|
||||
spmrn.node_execute_status,
|
||||
spmrn.route_handle_remark
|
||||
FROM
|
||||
sign_patient_manage_route spmr
|
||||
LEFT JOIN sign_patient_manage_route_node spmrn ON spmr.id = spmrn.manage_route_id
|
||||
@ -342,7 +345,7 @@
|
||||
LEFT JOIN patient_visit_record pvr ON pi.patient_visit_record_id = pvr.id
|
||||
<where>
|
||||
pi.del_flag = '0' AND spmr.task_create_type = 'MANUAL_CREATE'
|
||||
AND spmrn.node_execute_status = 'UNEXECUTED'
|
||||
AND spmrn.route_check_status = 'AGREE'
|
||||
AND spmrn.task_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE','ARTIFICIAL_FOLLOW_UP')
|
||||
<if test="patientName != null and patientName != ''">
|
||||
AND pi.patient_name LIKE concat('%', #{patientName}, '%')
|
||||
@ -404,7 +407,17 @@
|
||||
<if test="attendingPhysicianName != null and attendingPhysicianName != ''">
|
||||
AND pi.attending_physician_name LIKE concat('%',#{attendingPhysicianName}, '%')
|
||||
</if>
|
||||
<if test="nodeExecuteStatus != null ">
|
||||
AND spmrn.node_execute_status = #{nodeExecuteStatus}
|
||||
</if>
|
||||
<if test="followStartTime != null ">
|
||||
AND pter.execute_time >= #{followStartTime}
|
||||
</if>
|
||||
<if test="followEndTime != null ">
|
||||
AND pter.execute_time <= #{followEndTime}
|
||||
</if>
|
||||
</where>
|
||||
order by spmr.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectFollowPatientInfo"
|
||||
|
||||
@ -96,12 +96,38 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSignPatientManageRouteNodeById" parameterType="Long"
|
||||
resultMap="SignPatientManageRouteNodeResult">
|
||||
<include refid="selectSignPatientManageRouteNodeVo"/>
|
||||
where id = #{id}
|
||||
<select id="selectSignPatientManageRouteNodeById" parameterType="Long" resultMap="SignPatientManageRouteNodeResult">
|
||||
<include refid="selectSignPatientManageRouteNodeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getNodeList" parameterType="com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto"
|
||||
resultMap="SignPatientManageRouteNodeResult">
|
||||
select node.id, node.manage_route_id, node.manage_route_name, node.route_node_name, node.route_node_day, node.task_type,
|
||||
node.task_status, node.task_subdivision,node.second_classify_describe, node.execute_time, node.phone_push_sign, node.phone_id,
|
||||
node.phone_template_id, node.phone_template_name, node.phone_node_content, node.phone_redial_times, node.phone_time_interval,
|
||||
node.phone_message_remind, node.phone_message_template_id, node.phone_message_template_name,
|
||||
node.question_info_id, node.questionnaire_name, node.questionnaire_content, node.question_expiration_date,
|
||||
node.propaganda_info_id, node.propaganda_title, node.propaganda_content,
|
||||
node.message_push_sign, node.message_template_id, node.message_template_name,node.message_preview, node.message_node_content,
|
||||
node.official_push_sign, node.official_template_id, node.official_template_name, node.official_remind_content, node.official_node_content,
|
||||
node.applet_push_sign, node.applet_template_id, node.applet_template_name, node.applet_remind_content, node.applet_prompt_description, node.applet_node_content,
|
||||
node.follow_template_id, node.follow_template_name, node.follow_content,
|
||||
node.route_check_status, node.route_check_person, node.route_check_date, node.route_check_remark, node.route_node_remark,
|
||||
node.node_execute_status, node.route_handle_remark, node.route_handle_id, node.route_handle_person, node.route_link,node.text_remind_content
|
||||
from sign_patient_manage_route_node node
|
||||
left join sign_patient_manage_route route on node.manage_route_id = route.id
|
||||
<where>
|
||||
<if test="patientId != null">
|
||||
and route.patient_id = #{patientId}
|
||||
</if>
|
||||
<if test="taskType != null and taskType != ''">
|
||||
and node.task_type = #{taskType}
|
||||
</if>
|
||||
</where>
|
||||
order by node.id desc
|
||||
</select>
|
||||
|
||||
<insert id="insertSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into sign_patient_manage_route_node
|
||||
@ -583,8 +609,8 @@
|
||||
patient.address,
|
||||
patient.patient_type, patient.visit_method, patient.attending_physician_id, patient.attending_physician_name, patient.main_diagnosis,
|
||||
patient.hospital_agency_id, patient.hospital_agency_name, patient.campus_agency_id, patient.campus_agency_name,
|
||||
patient.department_id, patient.department_name,patient.ward_id, patient.ward_name, patient.in_hospital_number, patient.visit_date,
|
||||
patient.surgical_name, node.id as manageRouteNodeId, node.manage_route_id, node.manage_route_name,node.route_check_status
|
||||
patient.department_id, patient.department_name,patient.ward_id, patient.ward_name, patient.in_hospital_number, patient.visit_date, patient.discharge_time,
|
||||
patient.surgical_name,patient.sign_patient_record_id, node.id as manageRouteNodeId, node.manage_route_id, node.manage_route_name,node.route_check_status
|
||||
from sign_patient_manage_route_node node
|
||||
left join sign_patient_manage_route route on node.manage_route_id = route.id
|
||||
left join patient_info patient on route.patient_id = patient.id
|
||||
@ -595,9 +621,14 @@
|
||||
<if test="mainDiagnosis != null and mainDiagnosis != ''">
|
||||
and patient.main_diagnosis like concat('%', #{mainDiagnosis}, '%')
|
||||
</if>
|
||||
<if test="routeCheckStatus != null ">
|
||||
and node.route_check_status = #{routeCheckStatus}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="routeCheckStatus != null">
|
||||
and node.route_check_status = #{routeCheckStatus}
|
||||
</when>
|
||||
<otherwise>
|
||||
and node.route_check_status is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="hospitalAgencyId != null ">
|
||||
and patient.hospital_agency_id = #{hospitalAgencyId}
|
||||
</if>
|
||||
@ -610,11 +641,11 @@
|
||||
<if test="wardId != null ">
|
||||
and patient.ward_id = #{wardId}
|
||||
</if>
|
||||
<if test="visitDateStart != null ">
|
||||
and date_format(patient.visit_date,'%y%m%d') >= date_format(#{visitDateStart},'%y%m%d')
|
||||
<if test="dischargeTimeStart != null ">
|
||||
and date_format(patient.discharge_time,'%y%m%d') >= date_format(#{dischargeTimeStart},'%y%m%d')
|
||||
</if>
|
||||
<if test="visitDateEnd != null ">
|
||||
and date_format(patient.visit_date,'%y%m%d') <= date_format(#{visitDateEnd},'%y%m%d')
|
||||
<if test="dischargeTimeEnd != null ">
|
||||
and date_format(patient.discharge_time,'%y%m%d') <= date_format(#{dischargeTimeEnd},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
group by patient_id
|
||||
|
||||
@ -411,7 +411,9 @@
|
||||
left join sign_patient_manage_route route on route.sign_patient_record_id = sign.id
|
||||
<where>
|
||||
sign.del_flag = 0 and sign.id = #{id}
|
||||
and route.task_create_type = 'MANUAL_MATCHE'
|
||||
</where>
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getByPatient" parameterType="java.lang.Long" resultType="com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo">
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
package com.xinelu.mobile.controller.appletpersoncenter;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.mobile.service.appletpersoncenter.AppletPersonCenterService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Description 院后小程序个人中心控制器
|
||||
* @Author 纪寒
|
||||
* @Date 2024-04-16 10:49:14
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/postDischargeApplet")
|
||||
public class AppletPersonCenterController {
|
||||
|
||||
@Resource
|
||||
private AppletPersonCenterService appletPersonCenterService;
|
||||
|
||||
/**
|
||||
* 院后微信小程序一键登录接口
|
||||
*
|
||||
* @param loginCode 登录凭证
|
||||
* @param phoneCode 获取手机号登录凭证
|
||||
* @return 微信小程序用户登录信息
|
||||
*/
|
||||
@GetMapping("/appletLogin")
|
||||
public AjaxResult appletLogin(@RequestParam("loginCode") String loginCode, @RequestParam("phoneCode") String phoneCode) {
|
||||
if (StringUtils.isBlank(loginCode)) {
|
||||
return AjaxResult.error("登录凭证编码不能为空!");
|
||||
}
|
||||
if (StringUtils.isBlank(phoneCode)) {
|
||||
return AjaxResult.error("用户手机号凭证不存在");
|
||||
}
|
||||
return appletPersonCenterService.appletLogin(loginCode, phoneCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据居民表id查询患者个人信息
|
||||
*
|
||||
* @param residentId 居民表id
|
||||
* @return 个人信息
|
||||
*/
|
||||
@GetMapping("/getResidentInfoById")
|
||||
public AjaxResult getResidentInfoById(Long residentId) {
|
||||
return appletPersonCenterService.getResidentInfoById(residentId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.xinelu.mobile.service.appletpersoncenter;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
|
||||
/**
|
||||
* @Description 院后小程序个人中心业务层
|
||||
* @Author 纪寒
|
||||
* @Date 2024-04-16 10:51:28
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface AppletPersonCenterService {
|
||||
|
||||
/**
|
||||
* 院后微信小程序一键登录接口
|
||||
*
|
||||
* @param loginCode 登录凭证
|
||||
* @param phoneCode 获取手机号登录凭证
|
||||
* @return 微信小程序用户登录信息
|
||||
*/
|
||||
AjaxResult appletLogin(String loginCode, String phoneCode);
|
||||
|
||||
/**
|
||||
* 根据居民表id查询患者个人信息
|
||||
*
|
||||
* @param residentId 居民表id
|
||||
* @return 个人信息
|
||||
*/
|
||||
AjaxResult getResidentInfoById(Long residentId);
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
package com.xinelu.mobile.service.appletpersoncenter.Impl;
|
||||
|
||||
import com.xinelu.common.config.WeChatAppletChatConfig;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.residentinfo.ResidentInfo;
|
||||
import com.xinelu.manage.mapper.residentinfo.ResidentInfoMapper;
|
||||
import com.xinelu.mobile.service.appletpersoncenter.AppletPersonCenterService;
|
||||
import com.xinelu.mobile.utils.WeChatAppletUtils;
|
||||
import com.xinelu.mobile.vo.appletpersoncenter.PostDischargeAppletPhoneVO;
|
||||
import com.xinelu.mobile.vo.appletpersoncenter.PostDischargeAppletVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description 院后小程序个人中心业务层实现类
|
||||
* @Author 纪寒
|
||||
* @Date 2024-04-16 10:52:09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AppletPersonCenterServiceImpl implements AppletPersonCenterService {
|
||||
|
||||
@Resource
|
||||
private WeChatAppletUtils weChatAppletUtils;
|
||||
@Resource
|
||||
private WeChatAppletChatConfig weChatAppletChatConfig;
|
||||
@Resource
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
@Resource
|
||||
private ResidentInfoMapper residentInfoMapper;
|
||||
|
||||
/**
|
||||
* 院后微信小程序一键登录接口
|
||||
*
|
||||
* @param loginCode 登录凭证
|
||||
* @param phoneCode 获取手机号登录凭证
|
||||
* @return 微信小程序用户登录信息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult appletLogin(String loginCode, String phoneCode) {
|
||||
//根据code获取用户的微信unionId以及openId等信息
|
||||
PostDischargeAppletVO appletLoginInfo = weChatAppletUtils.getPostDischargeAppletLogin(weChatAppletChatConfig.getAppletId(), weChatAppletChatConfig.getSecret(), loginCode, weChatAppletChatConfig.getGrantType());
|
||||
if (Objects.isNull(appletLoginInfo)) {
|
||||
return AjaxResult.error("获取院后微信小程序用户信息失败");
|
||||
}
|
||||
if (Objects.nonNull(appletLoginInfo.getErrcode()) && appletLoginInfo.getErrcode() != Constants.SUCCESS_CODE) {
|
||||
return AjaxResult.error("获取院后微信小程序用户信息失败,失败信息为:" + appletLoginInfo.getErrmsg());
|
||||
}
|
||||
//获取微信accessToken
|
||||
String accessToken;
|
||||
String accessTokenKey = Constants.POST_DISCHARGE_APPLET_ACCESS_TOKEN + "accessToken";
|
||||
//从Redis中取出accessToken
|
||||
Object object = redisTemplate.opsForValue().get(accessTokenKey);
|
||||
if (Objects.isNull(object)) {
|
||||
accessToken = weChatAppletUtils.getWeChatAppletAccessToken();
|
||||
} else {
|
||||
accessToken = (String) object;
|
||||
}
|
||||
//获取用户手机号
|
||||
PostDischargeAppletPhoneVO appletPhoneInfo = weChatAppletUtils.getPostDischargeAppletPhone(phoneCode, accessToken);
|
||||
if (Objects.isNull(appletPhoneInfo)) {
|
||||
return AjaxResult.error("获取用户手机号失败");
|
||||
}
|
||||
if (Objects.nonNull(appletPhoneInfo.getErrcode()) && appletPhoneInfo.getErrcode() == Constants.ERROR_ACCESS_CODE) {
|
||||
//当前Redis缓存中的access_token无效直接删除
|
||||
if (Objects.nonNull(object)) {
|
||||
redisTemplate.delete(accessTokenKey);
|
||||
//删除之后重新获取获取accessToken
|
||||
accessToken = weChatAppletUtils.getWeChatAppletAccessToken();
|
||||
appletPhoneInfo = weChatAppletUtils.getPostDischargeAppletPhone(phoneCode, accessToken);
|
||||
if (Objects.isNull(appletPhoneInfo)) {
|
||||
return AjaxResult.error("获取用户手机号失败");
|
||||
}
|
||||
if (Objects.nonNull(appletPhoneInfo.getErrcode()) && appletPhoneInfo.getErrcode() == Constants.ERROR_ACCESS_CODE) {
|
||||
return AjaxResult.error("登录失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(appletPhoneInfo.getErrmsg()) && !Constants.OK.equals(appletPhoneInfo.getErrmsg())) {
|
||||
return AjaxResult.error("获取用户手机号失败,失败信息为:" + appletPhoneInfo.getErrmsg());
|
||||
}
|
||||
//根据手机号和微信小程序openid判断当前用户是否存在
|
||||
String phone = StringUtils.isBlank(appletPhoneInfo.getPhoneInfo().getPhoneNumber()) ? "" : appletPhoneInfo.getPhoneInfo().getPhoneNumber();
|
||||
String openId = StringUtils.isBlank(appletLoginInfo.getOpenid()) ? "" : appletLoginInfo.getOpenid();
|
||||
ResidentInfo residentInfoByPhone = residentInfoMapper.getResidentInfoByPhoneAndOpenId(null, openId);
|
||||
ResidentInfo residentInfo = new ResidentInfo();
|
||||
//居民信息为空新增个人信息
|
||||
if (Objects.isNull(residentInfoByPhone)) {
|
||||
residentInfo.setOpenId(openId);
|
||||
residentInfo.setPatientPhone(phone);
|
||||
residentInfo.setCreateTime(LocalDateTime.now());
|
||||
residentInfoMapper.insertResidentInfo(residentInfo);
|
||||
residentInfo.setId(residentInfo.getId());
|
||||
return AjaxResult.success(residentInfo);
|
||||
}
|
||||
//更新居民信息的openid等微信标识信息
|
||||
residentInfo.setId(residentInfoByPhone.getId());
|
||||
residentInfo.setOpenId(openId);
|
||||
residentInfo.setPatientPhone(StringUtils.isBlank(residentInfoByPhone.getPatientPhone()) ? "" : residentInfoByPhone.getPatientPhone());
|
||||
residentInfo.setUpdateTime(LocalDateTime.now());
|
||||
residentInfoMapper.updateResidentInfo(residentInfo);
|
||||
return AjaxResult.success(residentInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据居民表id查询患者个人信息
|
||||
*
|
||||
* @param residentId 居民表id
|
||||
* @return 个人信息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getResidentInfoById(Long residentId) {
|
||||
return AjaxResult.success(residentInfoMapper.selectResidentInfoById(residentId));
|
||||
}
|
||||
}
|
||||
@ -6,11 +6,15 @@ import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.entity.AccessToken;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.http.HttpUtils;
|
||||
import com.xinelu.mobile.vo.appletpersoncenter.PostDischargeAppletPhoneVO;
|
||||
import com.xinelu.mobile.vo.appletpersoncenter.PostDischargeAppletVO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@ -68,4 +72,50 @@ public class WeChatAppletUtils {
|
||||
}
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据登录编码获取微信小程序用户信息
|
||||
*
|
||||
* @param appletId 小程序id
|
||||
* @param secret 小程序秘钥
|
||||
* @param code 登录凭证码
|
||||
* @param grantType 授权类型
|
||||
* @return 登录信息
|
||||
*/
|
||||
public PostDischargeAppletVO getPostDischargeAppletLogin(String appletId, String secret, String code, String grantType) {
|
||||
//请求地址
|
||||
String appletLoginUrl = Constants.APPLET_LOGIN_URL
|
||||
+ "?appid=" + appletId
|
||||
+ "&secret=" + secret
|
||||
+ "&js_code=" + code
|
||||
+ "&grant_type=" + grantType;
|
||||
//发送请求
|
||||
String result = HttpUtils.sendGet(appletLoginUrl);
|
||||
if (StringUtils.isBlank(result)) {
|
||||
throw new ServiceException("获取院后微信小程序用户信息失败", 201);
|
||||
}
|
||||
return JSON.parseObject(result, PostDischargeAppletVO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取院后微信小程序的手机号码
|
||||
*
|
||||
* @param code 登录凭证
|
||||
* @param accessToken 小程序accessToken
|
||||
* @return 手机信息
|
||||
*/
|
||||
public PostDischargeAppletPhoneVO getPostDischargeAppletPhone(String code, String accessToken) {
|
||||
//请求地址
|
||||
String phoneUrl = Constants.PHONE_NUMBER_URL + accessToken;
|
||||
//请求参数
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("code", code);
|
||||
String param = JSON.toJSONString(paramMap);
|
||||
//发送POST请求
|
||||
String result = HttpUtils.sendPostJson(phoneUrl, param);
|
||||
if (StringUtils.isBlank(result)) {
|
||||
throw new ServiceException("获取院后微信小程序手机号失败", 201);
|
||||
}
|
||||
return JSON.parseObject(result, PostDischargeAppletPhoneVO.class);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
package com.xinelu.mobile.vo.appletpersoncenter;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description 获取小程序用户手机号实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2024-04-16 11:15:53
|
||||
* @Version 1.0
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class PostDischargeAppletPhoneVO implements Serializable {
|
||||
private static final long serialVersionUID = 7053513139462975391L;
|
||||
/**
|
||||
* 错误编码,
|
||||
* 0:成功
|
||||
* -1:系统繁忙,此时请开发者稍候再试
|
||||
* 40029:不合法的code(code不存在、已过期或者使用过)
|
||||
*/
|
||||
@JsonProperty("errcode")
|
||||
private Integer errcode;
|
||||
|
||||
/**
|
||||
* 返回提示信息,ok:成功
|
||||
*/
|
||||
@JsonProperty("errmsg")
|
||||
private String errmsg;
|
||||
|
||||
/**
|
||||
* 电话信息实体类
|
||||
*/
|
||||
@JsonProperty("phone_info")
|
||||
private PhoneInfoDTO phoneInfo;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class PhoneInfoDTO {
|
||||
|
||||
/**
|
||||
* 用户绑定的手机号(国外手机号会有区号)
|
||||
*/
|
||||
@JsonProperty("phoneNumber")
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 没有区号的手机号
|
||||
*/
|
||||
@JsonProperty("purePhoneNumber")
|
||||
private String purePhoneNumber;
|
||||
|
||||
/**
|
||||
* 区号
|
||||
*/
|
||||
@JsonProperty("countryCode")
|
||||
private Integer countryCode;
|
||||
|
||||
/**
|
||||
* 数据水印
|
||||
*/
|
||||
@JsonProperty("watermark")
|
||||
private WatermarkDTO watermark;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class WatermarkDTO {
|
||||
|
||||
/**
|
||||
* 用户获取手机号操作的时间戳
|
||||
*/
|
||||
@JsonProperty("timestamp")
|
||||
private Integer timestamp;
|
||||
|
||||
/**
|
||||
* 小程序appid
|
||||
*/
|
||||
@JsonProperty("appid")
|
||||
private String appid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.xinelu.mobile.vo.appletpersoncenter;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description 院后微信小程序用户信息实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2024-04-16 10:56:22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PostDischargeAppletVO implements Serializable {
|
||||
private static final long serialVersionUID = 9163624256938346478L;
|
||||
/**
|
||||
* 小程序unionid
|
||||
*/
|
||||
private String unionid;
|
||||
|
||||
/**
|
||||
* 小程序openid
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 错误状态码,40029:js_code无效,45011:API 调用太频繁,请稍候再试
|
||||
* 40226:高风险等级用户,小程序登录拦截 ,-1:系统繁忙,此时请开发者稍候再试
|
||||
*/
|
||||
private Integer errcode;
|
||||
|
||||
/**
|
||||
* 状态信息,取值有,40029:code 无效,
|
||||
* 45011:api minute-quota reach limit mustslower retry next minute
|
||||
* 40226:code blocked
|
||||
* -1:system error
|
||||
*/
|
||||
private String errmsg;
|
||||
}
|
||||
@ -32,6 +32,10 @@
|
||||
<groupId>com.xinelu</groupId>
|
||||
<artifactId>postdischarge-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.xinelu</groupId>
|
||||
<artifactId>postdischarge-manage</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,54 @@
|
||||
package com.xinelu.quartz.task;
|
||||
|
||||
import com.xinelu.common.constant.SignRecordServiceStatusConstants;
|
||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
|
||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
|
||||
import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @description: 患者签约服务包到期状态修改定时任务
|
||||
* @author: haown
|
||||
* @create: 2024-04-10 10:23
|
||||
**/
|
||||
@Component("SignPackageExpireTask")
|
||||
public class SignPackageExpireTask {
|
||||
@Resource
|
||||
private ISignPatientRecordService signPatientRecordService;
|
||||
|
||||
@Resource
|
||||
private SignPatientRecordMapper signPatientRecordMapper;
|
||||
|
||||
@Resource
|
||||
private PatientInfoMapper patientInfoMapper;
|
||||
|
||||
public void SignPackageExpireTask() {
|
||||
// 查询签约患者
|
||||
SignPatientListDto signPatientListDto = new SignPatientListDto();
|
||||
signPatientListDto.setSignStatus(SignRecordServiceStatusConstants.SERVICE_CENTER);
|
||||
List<SignPatientListVo> signRecordList = signPatientRecordService.selectList(signPatientListDto);
|
||||
for (SignPatientListVo sign : signRecordList) {
|
||||
// 当前日期与服务到期日期比较
|
||||
if (sign.getServiceEndTime().isBefore(LocalDateTime.now().toLocalDate())) {
|
||||
SignPatientRecord signPatientRecord = new SignPatientRecord();
|
||||
signPatientRecord.setId(sign.getId());
|
||||
signPatientRecord.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_END);
|
||||
signPatientRecord.setSignStatus(SignRecordServiceStatusConstants.EXPIRE_SIGN);
|
||||
signPatientRecordMapper.updateByPrimaryKeySelective(signPatientRecord);
|
||||
// 修改患者表签约状态
|
||||
PatientInfo patientInfo = new PatientInfo();
|
||||
patientInfo.setId(sign.getPatientId());
|
||||
patientInfo.setSignStatus(SignRecordServiceStatusConstants.EXPIRE_SIGN);
|
||||
patientInfo.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_END);
|
||||
patientInfoMapper.updatePatientInfo(patientInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user