小程序消息修改
This commit is contained in:
parent
15ae7531d6
commit
40b960951e
@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小程序首页Controller
|
* 小程序首页Controller
|
||||||
@ -35,11 +36,11 @@ public class HomePageController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取话术信息详细信息
|
* 获取话术信息详细信息(随访)
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectScriptInfo")
|
@GetMapping("/selectScriptInfo")
|
||||||
public AjaxResult selectScriptInfo(Long templateId) {
|
public AjaxResult selectScriptInfo(Long patientTaskExecuteRecordId) {
|
||||||
return AjaxResult.success(homePageService.selectScriptInfo(templateId));
|
return AjaxResult.success(homePageService.selectScriptInfo(patientTaskExecuteRecordId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,15 +52,18 @@ public class HomePageController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 问卷记录信息
|
* 问卷记录信息(消息记录)
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectQuestionSubmit")
|
@GetMapping("/selectQuestionSubmit")
|
||||||
public AjaxResult selectQuestionSubmit(Long patientQuestionSubmitResultId, Long patientTaskExecuteRecordId) {
|
public AjaxResult selectQuestionSubmit(Long patientQuestionSubmitResultId, Long patientTaskExecuteRecordId) {
|
||||||
|
if (Objects.isNull(patientQuestionSubmitResultId) && Objects.isNull(patientTaskExecuteRecordId)) {
|
||||||
|
return AjaxResult.error("请选择记录信息!");
|
||||||
|
}
|
||||||
return homePageService.selectQuestionSubmit(patientQuestionSubmitResultId, patientTaskExecuteRecordId);
|
return homePageService.selectQuestionSubmit(patientQuestionSubmitResultId, patientTaskExecuteRecordId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 问卷提交
|
* 问卷提交(消息记录)
|
||||||
*/
|
*/
|
||||||
@PostMapping("/updateTaskExecuteRecord")
|
@PostMapping("/updateTaskExecuteRecord")
|
||||||
public AjaxResult updatePatientTaskExecuteRecord(@RequestBody PatientQuestionSubmitResultDTO dto) {
|
public AjaxResult updatePatientTaskExecuteRecord(@RequestBody PatientQuestionSubmitResultDTO dto) {
|
||||||
@ -85,7 +89,7 @@ public class HomePageController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息通知列表
|
* 消息通知列表(消息记录)
|
||||||
*/
|
*/
|
||||||
@GetMapping("/messageNotification")
|
@GetMapping("/messageNotification")
|
||||||
public AjaxResult selectSignPatientManageRouteNode(Long residentId) {
|
public AjaxResult selectSignPatientManageRouteNode(Long residentId) {
|
||||||
@ -93,7 +97,7 @@ public class HomePageController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息推送内容
|
* 消息推送内容(消息记录)
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectMessageContent")
|
@GetMapping("/selectMessageContent")
|
||||||
public AjaxResult selectMessageContent(Long manageRouteNodeId) {
|
public AjaxResult selectMessageContent(Long manageRouteNodeId) {
|
||||||
@ -101,7 +105,7 @@ public class HomePageController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改消息状态
|
* 修改消息状态(消息记录)
|
||||||
*/
|
*/
|
||||||
@PostMapping("/updateMessageStatus")
|
@PostMapping("/updateMessageStatus")
|
||||||
public AjaxResult updateMessageStatus(@RequestBody SignPatientManageRouteNode signPatientManageRouteNode) {
|
public AjaxResult updateMessageStatus(@RequestBody SignPatientManageRouteNode signPatientManageRouteNode) {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.xinelu.mobile.mapper.homepage;
|
package com.xinelu.mobile.mapper.homepage;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||||
|
import com.xinelu.manage.vo.signpatientmanageroute.PhonePush;
|
||||||
import com.xinelu.mobile.vo.homepage.MessageTabulationVO;
|
import com.xinelu.mobile.vo.homepage.MessageTabulationVO;
|
||||||
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
||||||
import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire;
|
import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire;
|
||||||
@ -67,8 +68,6 @@ public interface HomePageMapper {
|
|||||||
*/
|
*/
|
||||||
int updateNodeExecuteStatusByIds(@Param("signPatientManageRouteNodeIds") List<Long> signPatientManageRouteNodeIds);
|
int updateNodeExecuteStatusByIds(@Param("signPatientManageRouteNodeIds") List<Long> signPatientManageRouteNodeIds);
|
||||||
|
|
||||||
PatientTaskExecuteRecord selectPatientTaskExecuteRecordByManageRouteNodeId(Long manageRouteNodeId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询个人任务消息
|
* 查询个人任务消息
|
||||||
*
|
*
|
||||||
@ -78,5 +77,16 @@ public interface HomePageMapper {
|
|||||||
*/
|
*/
|
||||||
List<MessageTabulationVO> selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus);
|
List<MessageTabulationVO> selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询患者管理任务执行记录表
|
||||||
|
*
|
||||||
|
* @param manageRouteNodeId id
|
||||||
|
* @return PatientTaskExecuteRecord
|
||||||
|
*/
|
||||||
PatientTaskExecuteRecord selectPatientManageRouteByManageRouteNodeId(Long manageRouteNodeId);
|
PatientTaskExecuteRecord selectPatientManageRouteByManageRouteNodeId(Long manageRouteNodeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 话术类型代办处理详情
|
||||||
|
*/
|
||||||
|
PhonePush selectPhoneNodeContent(Long patientTaskExecuteRecordId);
|
||||||
}
|
}
|
||||||
@ -3,9 +3,9 @@ package com.xinelu.mobile.service.homepage;
|
|||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.core.page.TableDataInfo;
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
|
||||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||||
|
import com.xinelu.manage.vo.signpatientmanageroute.PhonePush;
|
||||||
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -23,10 +23,10 @@ public interface HomePageService {
|
|||||||
/**
|
/**
|
||||||
* 查询话术信息
|
* 查询话术信息
|
||||||
*
|
*
|
||||||
* @param templateId 话术信息主键
|
* @param patientTaskExecuteRecordId 话术信息主键
|
||||||
* @return 话术信息
|
* @return 话术信息
|
||||||
*/
|
*/
|
||||||
ScriptInfo selectScriptInfo(Long templateId);
|
PhonePush selectScriptInfo(Long patientTaskExecuteRecordId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 问卷信息
|
* 问卷信息
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import com.xinelu.manage.domain.patientquestionsubmitresult.PatientQuestionSubmi
|
|||||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||||
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
import com.xinelu.manage.domain.questioninfo.QuestionInfo;
|
||||||
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
import com.xinelu.manage.domain.questionsubject.QuestionSubject;
|
||||||
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
|
||||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||||
import com.xinelu.manage.dto.patientquestionoptionresult.PatientQuestionOptionResultDTO;
|
import com.xinelu.manage.dto.patientquestionoptionresult.PatientQuestionOptionResultDTO;
|
||||||
import com.xinelu.manage.dto.patientquestionsubjectresult.PatientQuestionSubjectResultDTO;
|
import com.xinelu.manage.dto.patientquestionsubjectresult.PatientQuestionSubjectResultDTO;
|
||||||
@ -32,6 +31,7 @@ import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo;
|
|||||||
import com.xinelu.manage.vo.questionInfo.QuestionVO;
|
import com.xinelu.manage.vo.questionInfo.QuestionVO;
|
||||||
import com.xinelu.manage.vo.questionsubject.QuestionSubjectVO;
|
import com.xinelu.manage.vo.questionsubject.QuestionSubjectVO;
|
||||||
import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO;
|
import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO;
|
||||||
|
import com.xinelu.manage.vo.signpatientmanageroute.PhonePush;
|
||||||
import com.xinelu.mobile.mapper.homepage.HomePageMapper;
|
import com.xinelu.mobile.mapper.homepage.HomePageMapper;
|
||||||
import com.xinelu.mobile.service.homepage.HomePageService;
|
import com.xinelu.mobile.service.homepage.HomePageService;
|
||||||
import com.xinelu.mobile.vo.homepage.MessageContentVO;
|
import com.xinelu.mobile.vo.homepage.MessageContentVO;
|
||||||
@ -91,7 +91,7 @@ public class HomePageServiceImpl implements HomePageService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo myFollowUp(MyFollowUpVO myFollowUp) {
|
public TableDataInfo myFollowUp(MyFollowUpVO myFollowUp) {
|
||||||
myFollowUp.setRouteNodeName(RouteNodeNameEnum.AFTER_DISCHARGE.getInfo());
|
myFollowUp.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getInfo());
|
||||||
List<MyFollowUpVO> myFollowUpList = homePageMapper.selectManageRouteNode(myFollowUp);
|
List<MyFollowUpVO> myFollowUpList = homePageMapper.selectManageRouteNode(myFollowUp);
|
||||||
int total = myFollowUpList.size();
|
int total = myFollowUpList.size();
|
||||||
if (CollectionUtils.isEmpty(myFollowUpList)) {
|
if (CollectionUtils.isEmpty(myFollowUpList)) {
|
||||||
@ -101,7 +101,7 @@ public class HomePageServiceImpl implements HomePageService {
|
|||||||
if (Objects.nonNull(myFollowUpVO) && Objects.nonNull(myFollowUpVO.getDischargeTime())) {
|
if (Objects.nonNull(myFollowUpVO) && Objects.nonNull(myFollowUpVO.getDischargeTime())) {
|
||||||
myFollowUpVO.setFollowDate(myFollowUpVO.getDischargeTime().plusDays(myFollowUpVO.getRouteNodeDay()));
|
myFollowUpVO.setFollowDate(myFollowUpVO.getDischargeTime().plusDays(myFollowUpVO.getRouteNodeDay()));
|
||||||
}
|
}
|
||||||
myFollowUpVO.setFollowName("出院后第" + myFollowUpVO.getRouteNodeDay() + "天");
|
myFollowUpVO.setFollowName(myFollowUpVO.getManageRouteNodeName() + myFollowUpVO.getRouteNodeDay() + "天");
|
||||||
}
|
}
|
||||||
myFollowUpList.sort(Comparator.comparing(MyFollowUpVO::getFollowDate).reversed());
|
myFollowUpList.sort(Comparator.comparing(MyFollowUpVO::getFollowDate).reversed());
|
||||||
//处理上面查询的list集合
|
//处理上面查询的list集合
|
||||||
@ -118,12 +118,12 @@ public class HomePageServiceImpl implements HomePageService {
|
|||||||
/**
|
/**
|
||||||
* 查询话术信息
|
* 查询话术信息
|
||||||
*
|
*
|
||||||
* @param templateId 话术信息主键
|
* @param patientTaskExecuteRecordId 话术信息主键
|
||||||
* @return 话术信息
|
* @return 话术信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ScriptInfo selectScriptInfo(Long templateId) {
|
public PhonePush selectScriptInfo(Long patientTaskExecuteRecordId) {
|
||||||
return scriptInfoMapper.selectScriptInfoById(templateId);
|
return homePageMapper.selectPhoneNodeContent(patientTaskExecuteRecordId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -341,8 +341,13 @@ public class HomePageServiceImpl implements HomePageService {
|
|||||||
//副文本塞值
|
//副文本塞值
|
||||||
if (!TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(signPatientManageRouteNode.getTaskType()) && !TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(signPatientManageRouteNode.getTaskType()) && !TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(signPatientManageRouteNode.getTaskType())) {
|
if (!TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(signPatientManageRouteNode.getTaskType()) && !TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(signPatientManageRouteNode.getTaskType()) && !TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(signPatientManageRouteNode.getTaskType())) {
|
||||||
messageContentVO.setTaskType(TaskContentEnum.TEXT_REMIND.getInfo());
|
messageContentVO.setTaskType(TaskContentEnum.TEXT_REMIND.getInfo());
|
||||||
|
if (StringUtils.isNotBlank(signPatientManageRouteNode.getNodeContent())) {
|
||||||
messageContentVO.setNodeContent(signPatientManageRouteNode.getNodeContent());
|
messageContentVO.setNodeContent(signPatientManageRouteNode.getNodeContent());
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(signPatientManageRouteNode.getTextRemindContent())) {
|
||||||
|
messageContentVO.setNodeContent(signPatientManageRouteNode.getTextRemindContent());
|
||||||
|
}
|
||||||
|
}
|
||||||
return AjaxResult.success(messageContentVO);
|
return AjaxResult.success(messageContentVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,8 @@ public class MyFollowUpVO {
|
|||||||
|
|
||||||
private String manageRouteNodeName;
|
private String manageRouteNodeName;
|
||||||
|
|
||||||
|
private String nodeExecuteStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -20,21 +20,23 @@
|
|||||||
IF(pter.id is NULL,0,1) sign,
|
IF(pter.id is NULL,0,1) sign,
|
||||||
CASE
|
CASE
|
||||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_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
|
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
||||||
END AS templateId
|
END AS templateId
|
||||||
FROM patient_info pi
|
FROM sign_patient_manage_route_node spmrn
|
||||||
LEFT JOIN sign_patient_manage_route spmr ON spmr.patient_id = pi.id
|
LEFT JOIN sign_patient_manage_route spmr ON spmrn.manage_route_id = spmr.id
|
||||||
LEFT JOIN sign_patient_manage_route_node spmrn ON spmrn.manage_route_id = spmr.id
|
LEFT JOIN patient_info pi ON spmr.id = pi.id
|
||||||
LEFT JOIN patient_task_execute_record pter ON pter.manage_route_node_id = spmrn.id
|
LEFT JOIN patient_task_execute_record pter ON pter.manage_route_node_id = spmrn.id
|
||||||
<where>
|
<where>
|
||||||
spmrn.task_type in('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE','ARTIFICIAL_FOLLOW_UP')
|
spmrn.task_type in('PHONE_OUTBOUND','ARTIFICIAL_FOLLOW_UP')
|
||||||
<if test="residentId != null ">
|
<if test="residentId != null ">
|
||||||
and pi.resident_id = #{residentId}
|
and pi.resident_id = #{residentId}
|
||||||
</if>
|
</if>
|
||||||
<if test="routeNodeName != null and routeNodeName != ''">
|
<if test="routeNodeName != null and routeNodeName != ''">
|
||||||
and spmrn.route_node_name = #{routeNodeName}
|
and spmrn.route_node_name = #{routeNodeName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="nodeExecuteStatus != null and nodeExecuteStatus != ''">
|
||||||
|
and spmrn.node_execute_status = #{nodeExecuteStatus}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -149,13 +151,6 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectPatientTaskExecuteRecordByManageRouteNodeId"
|
|
||||||
resultType="com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord">
|
|
||||||
select *
|
|
||||||
from patient_task_execute_record
|
|
||||||
where manage_route_node_id = #{manageRouteNodeId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectManageRouteByResidentId"
|
<select id="selectManageRouteByResidentId"
|
||||||
resultType="com.xinelu.mobile.vo.homepage.MessageTabulationVO">
|
resultType="com.xinelu.mobile.vo.homepage.MessageTabulationVO">
|
||||||
select spmrn.id manageRouteNodeId,
|
select spmrn.id manageRouteNodeId,
|
||||||
@ -192,4 +187,26 @@
|
|||||||
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = spmrn.manage_route_id
|
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = spmrn.manage_route_id
|
||||||
where spmrn.id = #{manageRouteNodeId}
|
where spmrn.id = #{manageRouteNodeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPhoneNodeContent"
|
||||||
|
resultType="com.xinelu.manage.vo.signpatientmanageroute.PhonePush">
|
||||||
|
select spmrn.route_node_name,
|
||||||
|
spmrn.phone_push_sign,
|
||||||
|
spmrn.route_node_day,
|
||||||
|
spmrn.phone_id,
|
||||||
|
spmrn.phone_template_id,
|
||||||
|
spmrn.phone_template_name,
|
||||||
|
spmrn.phone_redial_times,
|
||||||
|
spmrn.phone_time_interval,
|
||||||
|
spmrn.phone_message_remind,
|
||||||
|
spmrn.phone_connect_status,
|
||||||
|
spmrn.route_handle_remark,
|
||||||
|
spmrn.phone_message_template_id,
|
||||||
|
spmrn.phone_message_template_name,
|
||||||
|
spmrn.phone_node_content
|
||||||
|
from patient_task_execute_record pter
|
||||||
|
LEFT JOIN sign_patient_manage_route_node spmrn ON pter.manage_route_node_id = spmrn.id
|
||||||
|
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = pter.manage_route_id
|
||||||
|
where pter.id = #{patientTaskExecuteRecordId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user