小程序消息推送修改
This commit is contained in:
parent
a86c961b7f
commit
ecf25b604f
@ -111,4 +111,12 @@ public class HomePageController extends BaseController {
|
||||
public AjaxResult updateMessageStatus(@RequestBody SignPatientManageRouteNode signPatientManageRouteNode) {
|
||||
return homePageService.updateMessageStatus(signPatientManageRouteNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务完成情况
|
||||
*/
|
||||
@GetMapping("/nodeExecuteStatus")
|
||||
public AjaxResult nodeExecuteStatus(Long manageRouteNodeId) {
|
||||
return homePageService.nodeExecuteStatus(manageRouteNodeId);
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.xinelu.mobile.mapper.homepage;
|
||||
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.NodeExecuteStatus;
|
||||
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
||||
import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire;
|
||||
import com.xinelu.mobile.vo.wechatofficialaccountcallback.PatientVO;
|
||||
@ -88,4 +89,12 @@ public interface HomePageMapper {
|
||||
* 话术类型代办处理详情
|
||||
*/
|
||||
PhonePush selectPhoneNodeContent(Long patientTaskExecuteRecordId);
|
||||
|
||||
/**
|
||||
* 任务完成情况
|
||||
*
|
||||
* @param manageRouteNodeId 节点id
|
||||
* @return AjaxResult
|
||||
*/
|
||||
NodeExecuteStatus nodeExecuteStatus(Long manageRouteNodeId);
|
||||
}
|
||||
@ -97,4 +97,12 @@ public interface HomePageService {
|
||||
* @return int
|
||||
*/
|
||||
AjaxResult updateMessageStatus(SignPatientManageRouteNode signPatientManageRouteNode);
|
||||
|
||||
/**
|
||||
* 任务完成情况
|
||||
*
|
||||
* @param manageRouteNodeId 节点id
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult nodeExecuteStatus(Long manageRouteNodeId);
|
||||
}
|
||||
@ -35,6 +35,7 @@ import com.xinelu.mobile.mapper.homepage.HomePageMapper;
|
||||
import com.xinelu.mobile.service.homepage.HomePageService;
|
||||
import com.xinelu.mobile.vo.homepage.MessageContentVO;
|
||||
import com.xinelu.mobile.vo.homepage.MessageTabulationVO;
|
||||
import com.xinelu.mobile.vo.homepage.NodeExecuteStatus;
|
||||
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
||||
import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -291,7 +292,7 @@ public class HomePageServiceImpl implements HomePageService {
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectSignPatientManageRouteNode(Long residentId) {
|
||||
//查询已执行人工随访
|
||||
//查询已执行
|
||||
List<MessageTabulationVO> signPatientManageRouteNodes = homePageMapper.selectManageRouteByResidentId(residentId, NodeExecuteStatusEnum.EXECUTED.getInfo());
|
||||
if (CollectionUtils.isEmpty(signPatientManageRouteNodes)) {
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
@ -379,4 +380,24 @@ public class HomePageServiceImpl implements HomePageService {
|
||||
public AjaxResult updateMessageStatus(SignPatientManageRouteNode signPatientManageRouteNode) {
|
||||
return AjaxResult.success(signPatientManageRouteNodeMapper.updateMessageStatus(signPatientManageRouteNode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务完成情况
|
||||
*
|
||||
* @param manageRouteNodeId 节点id
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult nodeExecuteStatus(Long manageRouteNodeId) {
|
||||
//查询任务信息
|
||||
NodeExecuteStatus nodeExecuteStatus = homePageMapper.nodeExecuteStatus(manageRouteNodeId);
|
||||
//判断完成情况
|
||||
if (Objects.nonNull(nodeExecuteStatus) && Objects.isNull(nodeExecuteStatus.getPatientQuestionSubmitResultId())) {
|
||||
nodeExecuteStatus.setSign(0);
|
||||
}
|
||||
if (Objects.nonNull(nodeExecuteStatus) && Objects.nonNull(nodeExecuteStatus.getPatientQuestionSubmitResultId())) {
|
||||
nodeExecuteStatus.setSign(1);
|
||||
}
|
||||
return AjaxResult.success(nodeExecuteStatus);
|
||||
}
|
||||
}
|
||||
@ -57,4 +57,9 @@ public class MessageTabulationVO {
|
||||
private Integer sign;
|
||||
|
||||
private String messageStatus;
|
||||
|
||||
/**
|
||||
* 模版名称
|
||||
*/
|
||||
private String manageRouteNodeName;
|
||||
}
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package com.xinelu.mobile.vo.homepage;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 任务完成状态VO
|
||||
*
|
||||
* @Author zh
|
||||
* @Date 2024-07-19
|
||||
*/
|
||||
@Data
|
||||
public class NodeExecuteStatus {
|
||||
|
||||
/**
|
||||
* 患者问卷提交结果信息表
|
||||
*/
|
||||
private Long patientQuestionSubmitResultId;
|
||||
|
||||
/**
|
||||
* 患者管理任务执行记录id
|
||||
*/
|
||||
private Long patientTaskExecuteRecordId;
|
||||
|
||||
|
||||
/**
|
||||
* 问卷是否完成标记 0:否 1:是
|
||||
*/
|
||||
private Integer sign;
|
||||
|
||||
/**
|
||||
* 任务节点id
|
||||
*/
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
/**
|
||||
* 居民信息
|
||||
*/
|
||||
private Long residentId;
|
||||
|
||||
/**
|
||||
* 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND
|
||||
*/
|
||||
private String taskNodeType;
|
||||
}
|
||||
@ -134,9 +134,10 @@
|
||||
where
|
||||
spmrn.node_execute_status = 'UNEXECUTED'
|
||||
and spmrn.del_flag = 0
|
||||
and spmrn.applet_push_sign = 1
|
||||
and pi.del_flag = 0
|
||||
and (spmrn.task_node_type = 'PROPAGANDA_ARTICLE' or spmrn.task_node_type = 'TEXT_REMIND' or
|
||||
spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' and phone_dial_method = 'COMMON')
|
||||
spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' and phone_dial_method != 'COMMON')
|
||||
<if test="patientId != null and patientId.size() > 0">
|
||||
and spmr.patient_id in
|
||||
<foreach item="patientId" collection="patientId" open="(" separator="," close=")">
|
||||
@ -166,7 +167,12 @@
|
||||
spmrn.message_status,
|
||||
IF(pter.id is NULL, 0, 1) sign,
|
||||
pter.id patientTaskExecuteRecordId,
|
||||
spmrn.task_node_type
|
||||
spmrn.task_node_type,
|
||||
CASE
|
||||
WHEN spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.questionnaire_name
|
||||
WHEN spmrn.task_node_type = 'PROPAGANDA_ARTICLE' THEN spmrn.propaganda_title
|
||||
WHEN spmrn.task_node_type = 'TEXT_REMIND' THEN '文字提醒'
|
||||
END AS manageRouteNodeName
|
||||
from sign_patient_manage_route_node spmrn
|
||||
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = spmrn.manage_route_id
|
||||
LEFT JOIN patient_info pi on pi.id = spmr.patient_id
|
||||
@ -176,7 +182,7 @@
|
||||
and spmrn.del_flag = 0
|
||||
and pi.del_flag = 0
|
||||
and (spmrn.task_node_type = 'PROPAGANDA_ARTICLE' or spmrn.task_node_type = 'TEXT_REMIND' or
|
||||
spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' and phone_dial_method = 'COMMON')
|
||||
spmrn.task_node_type = 'QUESTIONNAIRE_SCALE' and phone_dial_method != 'COMMON')
|
||||
Order BY spmrn.update_time DESC
|
||||
</select>
|
||||
|
||||
@ -215,4 +221,15 @@
|
||||
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = pter.manage_route_id
|
||||
where pter.id = #{patientTaskExecuteRecordId}
|
||||
</select>
|
||||
|
||||
<select id="nodeExecuteStatus" resultType="com.xinelu.mobile.vo.homepage.NodeExecuteStatus">
|
||||
select spmrn.id manageRouteNodeId,
|
||||
spmrn.task_node_type,
|
||||
pter.id patientTaskExecuteRecordId,
|
||||
pqsr.id patientQuestionSubmitResultId
|
||||
from sign_patient_manage_route_node spmrn
|
||||
LEFT JOIN patient_task_execute_record pter on spmrn.id = pter.manage_route_node_id
|
||||
LEFT JOIN patient_question_submit_result pqsr ON pqsr.manage_route_node_id = spmrn.id
|
||||
where spmrn.id = #{manageRouteNodeId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user