Merge branch '0418_小程序开发' of http://182.92.166.109:3000/zhuangyuanke/PostDischargePatientManage into 0418_小程序开发
This commit is contained in:
commit
a55c23ef3f
@ -22,24 +22,35 @@ public class SystemHomePageController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private SystemHomePageService systemHomePageService;
|
private SystemHomePageService systemHomePageService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶部统计
|
||||||
|
*/
|
||||||
@GetMapping("topStatistics")
|
@GetMapping("topStatistics")
|
||||||
public AjaxResult topStatistics() {
|
public AjaxResult topStatistics() {
|
||||||
return AjaxResult.success(systemHomePageService.topStatistics());
|
return AjaxResult.success(systemHomePageService.topStatistics());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者签约情况
|
||||||
|
*/
|
||||||
@GetMapping("signPatientCount")
|
@GetMapping("signPatientCount")
|
||||||
public AjaxResult signPatientCount() {
|
public AjaxResult signPatientCount() {
|
||||||
return AjaxResult.success(systemHomePageService.signPatientCount());
|
return AjaxResult.success(systemHomePageService.signPatientCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务方式
|
||||||
|
*/
|
||||||
@GetMapping("serviceModeStatistics")
|
@GetMapping("serviceModeStatistics")
|
||||||
public AjaxResult serviceModeStatistics() {
|
public AjaxResult serviceModeStatistics() {
|
||||||
return AjaxResult.success(systemHomePageService.serviceModeStatistics());
|
return AjaxResult.success(systemHomePageService.serviceModeStatistics());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代办任务
|
||||||
|
*/
|
||||||
@GetMapping("taskSituation")
|
@GetMapping("taskSituation")
|
||||||
public AjaxResult taskSituation(){
|
public AjaxResult taskSituation() {
|
||||||
return AjaxResult.success(systemHomePageService.taskSituation());
|
return AjaxResult.success(systemHomePageService.taskSituation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,9 +117,26 @@ public interface PatientInfoMapper {
|
|||||||
*/
|
*/
|
||||||
int getPatientInfoCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
int getPatientInfoCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据签约时间查询患者数量
|
||||||
|
*
|
||||||
|
* @param firstDay 本月第一天
|
||||||
|
* @param now 当前时间
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int selectPatientInfoCountBySignTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
int selectPatientInfoCountBySignTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已签约总数
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int selectPatientSignTotalCount();
|
int selectPatientSignTotalCount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务中患者总数
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int selectPatientSignServiceCount();
|
int selectPatientSignServiceCount();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,9 +153,29 @@ public interface SignPatientManageRouteNodeMapper {
|
|||||||
*/
|
*/
|
||||||
int updateNodeExecuteStatusByIds(@Param("manageRouteNodeIds") List<Long> manageRouteNodeIds, @Param("nodeExecuteStatus") String nodeExecuteStatus, @Param("appletStatus") String appletStatus, @Param("messageStatus") String messageStatus, @Param("officialStatus") String officialStatus);
|
int updateNodeExecuteStatusByIds(@Param("manageRouteNodeIds") List<Long> manageRouteNodeIds, @Param("nodeExecuteStatus") String nodeExecuteStatus, @Param("appletStatus") String appletStatus, @Param("messageStatus") String messageStatus, @Param("officialStatus") String officialStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据创建时间查询任务数量
|
||||||
|
*
|
||||||
|
* @param firstDay 本月第一天
|
||||||
|
* @param now 当前时间
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int selectNodeCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
int selectNodeCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送方式
|
||||||
|
*
|
||||||
|
* @param phoneDialMethod 人工或ai
|
||||||
|
* @param messagePushSign 短信标识
|
||||||
|
* @param appletPushSign 微信标识
|
||||||
|
* @return BigDecimal
|
||||||
|
*/
|
||||||
BigDecimal selectNodeCount(@Param("phoneDialMethod") String phoneDialMethod, @Param("messagePushSign") Long messagePushSign, @Param("appletPushSign") Long appletPushSign);
|
BigDecimal selectNodeCount(@Param("phoneDialMethod") String phoneDialMethod, @Param("messagePushSign") Long messagePushSign, @Param("appletPushSign") Long appletPushSign);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点信息
|
||||||
|
*
|
||||||
|
* @return PatientAndNode
|
||||||
|
*/
|
||||||
List<PatientAndNode> selectNodeExecuteStatus();
|
List<PatientAndNode> selectNodeExecuteStatus();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,5 +45,12 @@ public interface SignPatientRecordMapper {
|
|||||||
*/
|
*/
|
||||||
IntentionalSignVo getIntentionalSign(Long id);
|
IntentionalSignVo getIntentionalSign(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未审核
|
||||||
|
*
|
||||||
|
* @param routeCheckStatus 审核状态
|
||||||
|
* @param serviceStatus 患者庄国泰
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int selectCheckStatus(@Param("routeCheckStatus") String routeCheckStatus, @Param("serviceStatus") String serviceStatus);
|
int selectCheckStatus(@Param("routeCheckStatus") String routeCheckStatus, @Param("serviceStatus") String serviceStatus);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.xinelu.manage.service.homepage;
|
package com.xinelu.manage.service.homepage;
|
||||||
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
|
||||||
import com.xinelu.manage.vo.homepage.ServiceModeStatistics;
|
import com.xinelu.manage.vo.homepage.ServiceModeStatistics;
|
||||||
import com.xinelu.manage.vo.homepage.SignPatientCount;
|
import com.xinelu.manage.vo.homepage.SignPatientCount;
|
||||||
import com.xinelu.manage.vo.homepage.TaskSituation;
|
import com.xinelu.manage.vo.homepage.TaskSituation;
|
||||||
@ -16,11 +15,31 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface SystemHomePageService {
|
public interface SystemHomePageService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶部统计
|
||||||
|
*
|
||||||
|
* @return TopStatisticsVO
|
||||||
|
*/
|
||||||
TopStatisticsVO topStatistics();
|
TopStatisticsVO topStatistics();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者签约情况
|
||||||
|
*
|
||||||
|
* @return SignPatientCount
|
||||||
|
*/
|
||||||
List<SignPatientCount> signPatientCount();
|
List<SignPatientCount> signPatientCount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务方式
|
||||||
|
*
|
||||||
|
* @return ServiceModeStatistics
|
||||||
|
*/
|
||||||
List<ServiceModeStatistics> serviceModeStatistics();
|
List<ServiceModeStatistics> serviceModeStatistics();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代办任务
|
||||||
|
*
|
||||||
|
* @return TaskSituation
|
||||||
|
*/
|
||||||
List<TaskSituation> taskSituation();
|
List<TaskSituation> taskSituation();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,23 +37,42 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
@Resource
|
@Resource
|
||||||
private SignPatientRecordMapper signPatientRecordMapper;
|
private SignPatientRecordMapper signPatientRecordMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶部统计
|
||||||
|
*
|
||||||
|
* @return TopStatisticsVO
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TopStatisticsVO topStatistics() {
|
public TopStatisticsVO topStatistics() {
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
TopStatisticsVO topStatisticsVO = new TopStatisticsVO();
|
TopStatisticsVO topStatisticsVO = new TopStatisticsVO();
|
||||||
|
//本月第一天
|
||||||
LocalDate firstDay = now.with(TemporalAdjusters.firstDayOfMonth());
|
LocalDate firstDay = now.with(TemporalAdjusters.firstDayOfMonth());
|
||||||
|
//本月患者数量
|
||||||
int createPatientCount = patientInfoMapper.getPatientInfoCountByCreateTime(firstDay, now);
|
int createPatientCount = patientInfoMapper.getPatientInfoCountByCreateTime(firstDay, now);
|
||||||
|
//本月预住院数量
|
||||||
int patientPreHospitalizationCount = patientPreHospitalizationMapper.getPatientPreHospitalizationCountByCreateTime(firstDay, now);
|
int patientPreHospitalizationCount = patientPreHospitalizationMapper.getPatientPreHospitalizationCountByCreateTime(firstDay, now);
|
||||||
|
//本月患者数
|
||||||
topStatisticsVO.setThisMonthPatient(createPatientCount + patientPreHospitalizationCount);
|
topStatisticsVO.setThisMonthPatient(createPatientCount + patientPreHospitalizationCount);
|
||||||
|
//本月签约数
|
||||||
topStatisticsVO.setSignPatientCount(patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, now));
|
topStatisticsVO.setSignPatientCount(patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, now));
|
||||||
|
//本月任务数
|
||||||
topStatisticsVO.setNodeCount(signPatientManageRouteNodeMapper.selectNodeCountByCreateTime(firstDay, now));
|
topStatisticsVO.setNodeCount(signPatientManageRouteNodeMapper.selectNodeCountByCreateTime(firstDay, now));
|
||||||
|
//已签约总数
|
||||||
topStatisticsVO.setPatientSignCount(patientInfoMapper.selectPatientSignTotalCount());
|
topStatisticsVO.setPatientSignCount(patientInfoMapper.selectPatientSignTotalCount());
|
||||||
|
//服务中患者数
|
||||||
topStatisticsVO.setPatientSignServiceCount(patientInfoMapper.selectPatientSignServiceCount());
|
topStatisticsVO.setPatientSignServiceCount(patientInfoMapper.selectPatientSignServiceCount());
|
||||||
return topStatisticsVO;
|
return topStatisticsVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者签约情况
|
||||||
|
*
|
||||||
|
* @return SignPatientCount
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SignPatientCount> signPatientCount() {
|
public List<SignPatientCount> signPatientCount() {
|
||||||
|
//时间集合
|
||||||
List<LocalDate> localDates = new ArrayList<>();
|
List<LocalDate> localDates = new ArrayList<>();
|
||||||
List<SignPatientCount> signPatientCounts = new ArrayList<>();
|
List<SignPatientCount> signPatientCounts = new ArrayList<>();
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
@ -61,10 +80,12 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
LocalDate localDate = now.minusMonths(i);
|
LocalDate localDate = now.minusMonths(i);
|
||||||
localDates.add(localDate);
|
localDates.add(localDate);
|
||||||
}
|
}
|
||||||
|
//数据
|
||||||
for (LocalDate localDate : localDates) {
|
for (LocalDate localDate : localDates) {
|
||||||
SignPatientCount signPatientCount = new SignPatientCount();
|
SignPatientCount signPatientCount = new SignPatientCount();
|
||||||
LocalDate firstDay = localDate.with(TemporalAdjusters.firstDayOfMonth());
|
LocalDate firstDay = localDate.with(TemporalAdjusters.firstDayOfMonth());
|
||||||
LocalDate lastDay = localDate.with(TemporalAdjusters.lastDayOfMonth());
|
LocalDate lastDay = localDate.with(TemporalAdjusters.lastDayOfMonth());
|
||||||
|
//患者数量
|
||||||
int createPatientCount = patientInfoMapper.getPatientInfoCountByCreateTime(firstDay, lastDay);
|
int createPatientCount = patientInfoMapper.getPatientInfoCountByCreateTime(firstDay, lastDay);
|
||||||
int i = patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, lastDay);
|
int i = patientInfoMapper.selectPatientInfoCountBySignTime(firstDay, lastDay);
|
||||||
signPatientCount.setTime(localDate);
|
signPatientCount.setTime(localDate);
|
||||||
@ -75,13 +96,23 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
return signPatientCounts;
|
return signPatientCounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务方式
|
||||||
|
*
|
||||||
|
* @return ServiceModeStatistics
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ServiceModeStatistics> serviceModeStatistics() {
|
public List<ServiceModeStatistics> serviceModeStatistics() {
|
||||||
ArrayList<ServiceModeStatistics> serviceModeStatisticsList = new ArrayList<>();
|
ArrayList<ServiceModeStatistics> serviceModeStatisticsList = new ArrayList<>();
|
||||||
|
//人工随访
|
||||||
BigDecimal common = signPatientManageRouteNodeMapper.selectNodeCount(PhoneDialMethodEnum.COMMON.getInfo(), null, null);
|
BigDecimal common = signPatientManageRouteNodeMapper.selectNodeCount(PhoneDialMethodEnum.COMMON.getInfo(), null, null);
|
||||||
|
//ai
|
||||||
BigDecimal AI = signPatientManageRouteNodeMapper.selectNodeCount(PhoneDialMethodEnum.AI.getInfo(), null, null);
|
BigDecimal AI = signPatientManageRouteNodeMapper.selectNodeCount(PhoneDialMethodEnum.AI.getInfo(), null, null);
|
||||||
|
//短信
|
||||||
BigDecimal messagePushSign = signPatientManageRouteNodeMapper.selectNodeCount(null, 0L, null);
|
BigDecimal messagePushSign = signPatientManageRouteNodeMapper.selectNodeCount(null, 0L, null);
|
||||||
|
//微信
|
||||||
BigDecimal appletPushSign = signPatientManageRouteNodeMapper.selectNodeCount(null, null, 0L);
|
BigDecimal appletPushSign = signPatientManageRouteNodeMapper.selectNodeCount(null, null, 0L);
|
||||||
|
//全部
|
||||||
BigDecimal all = common.add(AI).add(messagePushSign).add(appletPushSign);
|
BigDecimal all = common.add(AI).add(messagePushSign).add(appletPushSign);
|
||||||
serviceModeStatisticsList.add(new ServiceModeStatistics("AI", AI.divide(all, 2, RoundingMode.HALF_UP), AI));
|
serviceModeStatisticsList.add(new ServiceModeStatistics("AI", AI.divide(all, 2, RoundingMode.HALF_UP), AI));
|
||||||
serviceModeStatisticsList.add(new ServiceModeStatistics("短信", messagePushSign.divide(all, 2, RoundingMode.HALF_UP), messagePushSign));
|
serviceModeStatisticsList.add(new ServiceModeStatistics("短信", messagePushSign.divide(all, 2, RoundingMode.HALF_UP), messagePushSign));
|
||||||
@ -90,6 +121,11 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
return serviceModeStatisticsList;
|
return serviceModeStatisticsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代办任务
|
||||||
|
*
|
||||||
|
* @return TaskSituation
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<TaskSituation> taskSituation() {
|
public List<TaskSituation> taskSituation() {
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
@ -100,7 +136,9 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
int signTimeCount = signPatientRecordMapper.selectCheckStatus(null, "SERVICE_CENTER");
|
int signTimeCount = signPatientRecordMapper.selectCheckStatus(null, "SERVICE_CENTER");
|
||||||
//任务
|
//任务
|
||||||
List<PatientAndNode> patientAndNodes = signPatientManageRouteNodeMapper.selectNodeExecuteStatus();
|
List<PatientAndNode> patientAndNodes = signPatientManageRouteNodeMapper.selectNodeExecuteStatus();
|
||||||
|
//未审核
|
||||||
int unExecutedCount = 0;
|
int unExecutedCount = 0;
|
||||||
|
//全部
|
||||||
int allCount = 0;
|
int allCount = 0;
|
||||||
if (CollectionUtils.isNotEmpty(patientAndNodes)) {
|
if (CollectionUtils.isNotEmpty(patientAndNodes)) {
|
||||||
allCount = patientAndNodes.size();
|
allCount = patientAndNodes.size();
|
||||||
@ -117,6 +155,7 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
}
|
}
|
||||||
boolean before = localDate.isBefore(LocalDate.now()) || localDate.isEqual(LocalDate.now());
|
boolean before = localDate.isBefore(LocalDate.now()) || localDate.isEqual(LocalDate.now());
|
||||||
if (before) {
|
if (before) {
|
||||||
|
//未执行
|
||||||
if (!NodeExecuteStatusEnum.EXECUTED.getInfo().equals(patientAndNode.getNodeExecuteStatus())) {
|
if (!NodeExecuteStatusEnum.EXECUTED.getInfo().equals(patientAndNode.getNodeExecuteStatus())) {
|
||||||
unExecutedCount++;
|
unExecutedCount++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,12 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者节点任务参数对象
|
||||||
|
*
|
||||||
|
* @author zh
|
||||||
|
* @date 2024-08-14
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class PatientAndNode {
|
public class PatientAndNode {
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,12 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务方式
|
||||||
|
*
|
||||||
|
* @author zh
|
||||||
|
* @date 2024-08-14
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class ServiceModeStatistics {
|
public class ServiceModeStatistics {
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,12 @@ import lombok.Data;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者、签约率
|
||||||
|
*
|
||||||
|
* @author zh
|
||||||
|
* @date 2024-08-14
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SignPatientCount {
|
public class SignPatientCount {
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,12 @@ package com.xinelu.manage.vo.homepage;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务代办
|
||||||
|
*
|
||||||
|
* @author zh
|
||||||
|
* @date 2024-08-14
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class TaskSituation {
|
public class TaskSituation {
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,12 @@ package com.xinelu.manage.vo.homepage;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶部统计
|
||||||
|
*
|
||||||
|
* @author zh
|
||||||
|
* @date 2024-08-14
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class TopStatisticsVO {
|
public class TopStatisticsVO {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user