小程序消息修改
This commit is contained in:
parent
af9a5ed6a1
commit
25bec878d1
@ -94,15 +94,6 @@ public interface SignPatientManageRouteNodeMapper {
|
||||
*/
|
||||
List<PatientTaskVo> selectPatientTaskList(PatientTaskDto patientTaskDto);
|
||||
|
||||
/**
|
||||
* 查询个人任务消息
|
||||
*
|
||||
* @param residentId 用户id
|
||||
* @param nodeExecuteStatus 状态
|
||||
* @return SignPatientManageRouteNode
|
||||
*/
|
||||
List<SignPatientManageRouteNode> selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus);
|
||||
|
||||
/**
|
||||
* 修改消息状态
|
||||
*
|
||||
|
||||
@ -764,25 +764,6 @@
|
||||
group by patient.hospital_agency_id, patient.id
|
||||
</select>
|
||||
|
||||
<select id="selectManageRouteByResidentId"
|
||||
resultType="com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode">
|
||||
select spmrn.id,
|
||||
spmrn.manage_route_name,
|
||||
spmrn.route_node_name,
|
||||
spmrn.route_node_day,
|
||||
spmrn.update_time,
|
||||
spmrn.message_status
|
||||
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
|
||||
where pi.resident_id = #{residentId}
|
||||
and spmrn.node_execute_status = #{nodeExecuteStatus}
|
||||
and (spmrn.applet_push_sign = 1 or spmrn.official_push_sign = 1)
|
||||
and spmrn.del_flag = 0
|
||||
and pi.del_flag = 0
|
||||
Order BY spmrn.update_time DESC
|
||||
</select>
|
||||
|
||||
<update id="updateMessageStatus">
|
||||
update sign_patient_manage_route_node
|
||||
set message_status = #{messageStatus}
|
||||
|
||||
@ -84,14 +84,6 @@ public class HomePageController extends BaseController {
|
||||
return homePageService.satisfactionQuestionnaire(residentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信小程序消息通知跳转页面
|
||||
*/
|
||||
@GetMapping("/subscriptionMessage")
|
||||
public AjaxResult subscriptionMessage(Long id) {
|
||||
return homePageService.subscriptionMessage(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息通知列表
|
||||
*/
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.mobile.mapper.homepage;
|
||||
|
||||
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||
import com.xinelu.mobile.vo.homepage.MessageTabulationVO;
|
||||
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
||||
import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire;
|
||||
import com.xinelu.mobile.vo.wechatofficialaccountcallback.PatientVO;
|
||||
@ -61,8 +62,19 @@ public interface HomePageMapper {
|
||||
/**
|
||||
* 修改执行状态
|
||||
*
|
||||
* @param signPatientManageRouteNodeIds
|
||||
* @param signPatientManageRouteNodeIds 节点id
|
||||
* @return int
|
||||
*/
|
||||
int updateNodeExecuteStatusByIds(@Param("signPatientManageRouteNodeIds") List<Long> signPatientManageRouteNodeIds);
|
||||
|
||||
PatientTaskExecuteRecord selectPatientTaskExecuteRecordByManageRouteNodeId(Long manageRouteNodeId);
|
||||
|
||||
/**
|
||||
* 查询个人任务消息
|
||||
*
|
||||
* @param residentId 用户id
|
||||
* @param nodeExecuteStatus 状态
|
||||
* @return SignPatientManageRouteNode
|
||||
*/
|
||||
List<MessageTabulationVO> selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus);
|
||||
}
|
||||
@ -68,14 +68,6 @@ public interface HomePageService {
|
||||
*/
|
||||
TableDataInfo satisfactionQuestionnaire(Long residentId);
|
||||
|
||||
/**
|
||||
* 微信小程序消息通知跳转页面
|
||||
*
|
||||
* @param id 节点
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult subscriptionMessage(Long id);
|
||||
|
||||
/**
|
||||
* 消息通知列表
|
||||
*
|
||||
|
||||
@ -34,6 +34,7 @@ import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO;
|
||||
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.myfollowup.MyFollowUpVO;
|
||||
import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -253,20 +254,6 @@ public class HomePageServiceImpl implements HomePageService {
|
||||
return pageServiceUtil.getDataTable(satisfactionQuestionnaires);
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信小程序消息通知跳转页面
|
||||
*
|
||||
* @param id 节点
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult subscriptionMessage(Long id) {
|
||||
if (Objects.isNull(id)) {
|
||||
return AjaxResult.error("该节点以清空!");
|
||||
}
|
||||
return AjaxResult.success(signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息通知列表
|
||||
*
|
||||
@ -275,11 +262,11 @@ public class HomePageServiceImpl implements HomePageService {
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectSignPatientManageRouteNode(Long residentId) {
|
||||
List<SignPatientManageRouteNode> signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectManageRouteByResidentId(residentId, NodeExecuteStatusEnum.EXECUTED.getInfo());
|
||||
List<MessageTabulationVO> signPatientManageRouteNodes = homePageMapper.selectManageRouteByResidentId(residentId, NodeExecuteStatusEnum.EXECUTED.getInfo());
|
||||
if (CollectionUtils.isEmpty(signPatientManageRouteNodes)) {
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
for (SignPatientManageRouteNode manageRouteNode : signPatientManageRouteNodes) {
|
||||
for (MessageTabulationVO manageRouteNode : signPatientManageRouteNodes) {
|
||||
if (Objects.isNull(manageRouteNode) || TaskContentEnum.PHONE_OUTBOUND.getInfo().equals(manageRouteNode.getTaskType())) {
|
||||
signPatientManageRouteNodes.remove(manageRouteNode);
|
||||
}
|
||||
@ -333,7 +320,7 @@ public class HomePageServiceImpl implements HomePageService {
|
||||
if (TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(signPatientManageRouteNode.getTaskType())) {
|
||||
//查询宣教信息
|
||||
PropagandaMaterialsVo propagandaMaterialsVo = propagandaInfoService.selectPropagandaInfoById(signPatientManageRouteNode.getPropagandaInfoId());
|
||||
messageContentVO.setTaskType(messageContentVO.getTaskType());
|
||||
messageContentVO.setTaskType(TaskContentEnum.PROPAGANDA_ARTICLE.getInfo());
|
||||
messageContentVO.setPropagandaContent(JSONObject.parseObject(JSONObject.toJSONString(propagandaMaterialsVo)));
|
||||
}
|
||||
//副文本塞值
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
package com.xinelu.mobile.vo.homepage;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 消息列表返回VO
|
||||
*/
|
||||
@Data
|
||||
public class MessageTabulationVO {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long residentId;
|
||||
|
||||
/**
|
||||
* 执行记录表id
|
||||
*/
|
||||
private Long patientTaskExecuteRecordId;
|
||||
|
||||
/**
|
||||
* 路径名称(任务名称)
|
||||
*/
|
||||
private String manageRouteName;
|
||||
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
/**
|
||||
* 管理路径节点名称
|
||||
*/
|
||||
private String routeNodeName;
|
||||
|
||||
/**
|
||||
* 管理路径节点时间,时间单位为:天
|
||||
*/
|
||||
private Integer routeNodeDay;
|
||||
|
||||
/**
|
||||
* 任务类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP,短信提醒:SMS_REMIND
|
||||
*/
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 是否随访标记 0:否 1:是
|
||||
*/
|
||||
private Integer sign;
|
||||
}
|
||||
@ -148,4 +148,33 @@
|
||||
#{signPatientManageRouteNodeIds}
|
||||
</foreach>
|
||||
</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"
|
||||
resultType="com.xinelu.mobile.vo.homepage.MessageTabulationVO">
|
||||
select spmrn.id manageRouteNodeId,
|
||||
spmrn.manage_route_name,
|
||||
spmrn.route_node_name,
|
||||
spmrn.route_node_day,
|
||||
spmrn.update_time,
|
||||
spmrn.message_status,
|
||||
IF(pter.id is NULL, 0, 1) sign,
|
||||
pter.id patientTaskExecuteRecordId
|
||||
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
|
||||
LEFT JOIN patient_task_execute_record pter ON pter.manage_route_node_id = spmrn.id
|
||||
where pi.resident_id = #{residentId}
|
||||
and spmrn.node_execute_status = #{nodeExecuteStatus}
|
||||
and (spmrn.applet_push_sign = 1 or spmrn.official_push_sign = 1)
|
||||
and spmrn.del_flag = 0
|
||||
and pi.del_flag = 0
|
||||
Order BY spmrn.update_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user