健康日历
This commit is contained in:
parent
1708d21ca4
commit
5e51aaf1f9
@ -22,7 +22,7 @@ public enum ReleaseStatusEnum {
|
|||||||
UNPUBLISHED("UNPUBLISHED"),
|
UNPUBLISHED("UNPUBLISHED"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不同意
|
* 全部
|
||||||
*/
|
*/
|
||||||
ALL("ALL"),
|
ALL("ALL"),
|
||||||
;
|
;
|
||||||
|
|||||||
@ -1,13 +1,18 @@
|
|||||||
package com.xinelu.mobile.controller.homepage;
|
package com.xinelu.mobile.controller.homepage;
|
||||||
|
|
||||||
|
import com.xinelu.common.core.controller.BaseController;
|
||||||
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.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||||
import com.xinelu.mobile.service.homepage.HomePageService;
|
import com.xinelu.mobile.service.homepage.HomePageService;
|
||||||
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.xinelu.common.utils.PageUtils.startPage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构信息Controller
|
* 机构信息Controller
|
||||||
@ -17,7 +22,7 @@ import javax.annotation.Resource;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/postDischarge/homePage")
|
@RequestMapping("/postDischarge/homePage")
|
||||||
public class HomePageController {
|
public class HomePageController extends BaseController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private HomePageService homePageService;
|
private HomePageService homePageService;
|
||||||
@ -54,8 +59,21 @@ public class HomePageController {
|
|||||||
return homePageService.selectQuestionSubmit(patientTaskExecuteRecordId);
|
return homePageService.selectQuestionSubmit(patientTaskExecuteRecordId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷提交
|
||||||
|
*/
|
||||||
@PostMapping("/updateTaskExecuteRecord")
|
@PostMapping("/updateTaskExecuteRecord")
|
||||||
public AjaxResult updatePatientTaskExecuteRecord(@RequestBody PatientQuestionSubmitResultDTO dto) {
|
public AjaxResult updatePatientTaskExecuteRecord(@RequestBody PatientQuestionSubmitResultDTO dto) {
|
||||||
return homePageService.updatePatientTaskExecuteRecord(dto);
|
return homePageService.updatePatientTaskExecuteRecord(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 健康日志
|
||||||
|
*/
|
||||||
|
@GetMapping("/selectTaskExecuteRecord")
|
||||||
|
public TableDataInfo selectPatientTaskExecuteRecord(Long residentId) {
|
||||||
|
startPage();
|
||||||
|
List<PatientTaskExecuteRecord> list = homePageService.selectPatientTaskExecuteRecord(residentId);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package com.xinelu.mobile.mapper.homepage;
|
package com.xinelu.mobile.mapper.homepage;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
|
||||||
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -19,4 +21,13 @@ public interface HomePageMapper {
|
|||||||
* @return TableDataInfo
|
* @return TableDataInfo
|
||||||
*/
|
*/
|
||||||
List<MyFollowUpVO> selectManageRouteNode(MyFollowUpVO myFollowUp);
|
List<MyFollowUpVO> selectManageRouteNode(MyFollowUpVO myFollowUp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 健康日志
|
||||||
|
*
|
||||||
|
* @param residentId 用户id
|
||||||
|
* @param nodeExecuteStatus 节点状态
|
||||||
|
* @return PatientTaskExecuteRecord
|
||||||
|
*/
|
||||||
|
List<PatientTaskExecuteRecord> selectTaskExecuteRecordByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus);
|
||||||
}
|
}
|
||||||
@ -2,10 +2,13 @@ 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.scriptInfo.ScriptInfo;
|
import com.xinelu.manage.domain.scriptInfo.ScriptInfo;
|
||||||
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
import com.xinelu.manage.dto.patientquestionsubmitresult.PatientQuestionSubmitResultDTO;
|
||||||
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface HomePageService {
|
public interface HomePageService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,5 +43,19 @@ public interface HomePageService {
|
|||||||
*/
|
*/
|
||||||
AjaxResult selectQuestionSubmit(Long patientTaskExecuteRecordId);
|
AjaxResult selectQuestionSubmit(Long patientTaskExecuteRecordId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷提交
|
||||||
|
*
|
||||||
|
* @param dto 提交信息
|
||||||
|
* @return AjaxResult
|
||||||
|
*/
|
||||||
AjaxResult updatePatientTaskExecuteRecord(PatientQuestionSubmitResultDTO dto);
|
AjaxResult updatePatientTaskExecuteRecord(PatientQuestionSubmitResultDTO dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 健康日志
|
||||||
|
*
|
||||||
|
* @param residentId 用户id
|
||||||
|
* @return AjaxResult
|
||||||
|
*/
|
||||||
|
List<PatientTaskExecuteRecord> selectPatientTaskExecuteRecord(Long residentId);
|
||||||
}
|
}
|
||||||
@ -228,6 +228,17 @@ public class HomePageServiceImpl implements HomePageService {
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 健康日志
|
||||||
|
*
|
||||||
|
* @param residentId 用户id
|
||||||
|
* @return AjaxResult
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PatientTaskExecuteRecord> selectPatientTaskExecuteRecord(Long residentId) {
|
||||||
|
return homePageMapper.selectTaskExecuteRecordByResidentId(residentId, NodeExecuteStatusEnum.EXECUTED.getInfo());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新节点任务表
|
* 更新节点任务表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -24,11 +24,38 @@
|
|||||||
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>
|
||||||
<if test="residentId != null ">
|
<if test="residentId != null ">
|
||||||
and resident_id = #{residentId}
|
and pi.resident_id = #{residentId}
|
||||||
</if>
|
</if>
|
||||||
<if test="routeNodeName != null and routeNodeName != ''">
|
<if test="routeNodeName != null and routeNodeName != ''">
|
||||||
and route_node_name = #{routeNodeName}
|
and spmrn.route_node_name = #{routeNodeName}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTaskExecuteRecordByResidentId"
|
||||||
|
resultType="com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord">
|
||||||
|
select
|
||||||
|
CASE
|
||||||
|
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_template_name
|
||||||
|
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.questionnaire_name
|
||||||
|
WHEN spmrn.task_type = 'PROPAGANDA_ARTICLE' THEN spmrn.propaganda_title
|
||||||
|
WHEN spmrn.task_type = 'TEXT_REMIND' THEN '文字提醒'
|
||||||
|
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_name
|
||||||
|
END AS manageRouteNodeName,
|
||||||
|
pter.execute_time
|
||||||
|
from resident_info ri
|
||||||
|
LEFT JOIN patient_info pi ON ri.id = pi.resident_id
|
||||||
|
LEFT JOIN patient_task_execute_record pter ON pter.patient_id = pi.id
|
||||||
|
LEFT JOIN sign_patient_manage_route_node spmrn ON spmrn.id = pter.manage_route_node_id
|
||||||
|
<where>
|
||||||
|
ri.del_flag = 0 AND pi.del_flag = 0
|
||||||
|
<if test="residentId != null ">
|
||||||
|
and pi.resident_id = #{residentId}
|
||||||
|
</if>
|
||||||
|
<if test="nodeExecuteStatus != null and nodeExecuteStatus != ''">
|
||||||
|
and spmrn.node_execute_status = #{nodeExecuteStatus}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY pter.execute_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user