大屏修改
This commit is contained in:
+1
@@ -1,6 +1,7 @@
|
||||
package com.renkang.emergency.largeScreen.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.renkang.anyan.model.vo.MedicalPeopleNumStatisticsVO;
|
||||
import com.renkang.emergency.entity.dto.*;
|
||||
import com.renkang.emergency.entity.vo.DataDetailVO;
|
||||
import com.renkang.emergency.entity.vo.MedicalDataVO;
|
||||
|
||||
+18
-18
@@ -3,21 +3,21 @@ package com.renkang.emergency.largeScreen.entity.vo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MedicalPeopleNumStatisticsVO {
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@Schema(title = "医院名称")
|
||||
private String hospitalName;
|
||||
/**
|
||||
* 已参检人数
|
||||
*/
|
||||
@Schema(title = "已参检人数")
|
||||
private Integer checkedCount;
|
||||
/**
|
||||
* 应检人数 (可能无法提供 先冗余)
|
||||
*/
|
||||
@Schema(title = "应检人数 (可能无法提供 先冗余)")
|
||||
private Integer totalCount;
|
||||
}
|
||||
//@Data
|
||||
//public class MedicalPeopleNumStatisticsVO {
|
||||
// /**
|
||||
// * 医院名称
|
||||
// */
|
||||
// @Schema(title = "医院名称")
|
||||
// private String hospitalName;
|
||||
// /**
|
||||
// * 已参检人数
|
||||
// */
|
||||
// @Schema(title = "已参检人数")
|
||||
// private Integer checkedCount;
|
||||
// /**
|
||||
// * 应检人数 (可能无法提供 先冗余)
|
||||
// */
|
||||
// @Schema(title = "应检人数 (可能无法提供 先冗余)")
|
||||
// private Integer totalCount;
|
||||
//}
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ package com.renkang.emergency.largeScreen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.renkang.anyan.model.vo.MedicalPeopleNumStatisticsVO;
|
||||
import com.renkang.emergency.largeScreen.entity.dto.*;
|
||||
import com.renkang.emergency.largeScreen.entity.vo.*;
|
||||
|
||||
|
||||
+27
-19
@@ -8,7 +8,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.renkang.emergency.bean.response.XjDemandTypeFakerData;
|
||||
import com.renkang.anyan.client.AnYanClient;
|
||||
import com.renkang.anyan.model.vo.HealthSignStatVO;
|
||||
import com.renkang.anyan.model.vo.MedicalPeopleNumStatisticsVO;
|
||||
import com.renkang.emergency.bean.response.XjHealthSignFakerData;
|
||||
import com.renkang.emergency.bean.response.XjMedicalCountFakerData;
|
||||
import com.renkang.emergency.bean.response.XjMedicalDataFakerData;
|
||||
@@ -23,8 +25,6 @@ import com.renkang.emergency.service.IEmergencyHealthRoomService;
|
||||
import com.renkang.emergency.largeScreen.service.ILargeScreenService;
|
||||
import com.renkang.emergency.service.IResourceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.jeecg.common.api.dto.ServiceFakerData;
|
||||
import org.jeecg.common.api.dto.YcMedicalCenterFakerData;
|
||||
import org.jeecg.common.constant.FakerDataConstant;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.util.RedisClientUtil;
|
||||
@@ -55,6 +55,7 @@ public class LargeScreenServiceImpl extends ServiceImpl<LargeScreenMapper, Large
|
||||
private final RedisClientUtil redisClientUtil;
|
||||
private final RedisUtil redisUtil;
|
||||
private final ILargeScreenDataService screenDataService;
|
||||
private final AnYanClient anYanClient;
|
||||
|
||||
|
||||
private static final double MIN_LONGITUDE = 80.0;
|
||||
@@ -117,6 +118,7 @@ public class LargeScreenServiceImpl extends ServiceImpl<LargeScreenMapper, Large
|
||||
baseVO.setBuildDate(new Date());
|
||||
list.add(baseVO);
|
||||
}
|
||||
List<com.renkang.anyan.model.vo.HealthRoomVO> healthRoomVOS = anYanClient.healthPlaceHomList();
|
||||
// 查询第三方接口返回 此接口返回对象跟原有可能不太一样 要注意
|
||||
return list;
|
||||
}
|
||||
@@ -455,31 +457,37 @@ public class LargeScreenServiceImpl extends ServiceImpl<LargeScreenMapper, Large
|
||||
|
||||
@Override
|
||||
public void runJob(){
|
||||
Date today = new Date();
|
||||
// 体检人数统计查询
|
||||
List<MedicalPeopleNumStatisticsVO> medicalPeopleNumStatisticsList = new ArrayList<>();
|
||||
redisClientUtil.set(MEDICAL,MEDICAL_PEOPLE_NUM_STATISTICS,medicalPeopleNumStatisticsList);
|
||||
List<MedicalPeopleNumStatisticsVO> medicalPeopleNumStatisticsVOS = anYanClient.examinationStatistics(DateUtil.thisYear());
|
||||
redisClientUtil.set(MEDICAL,MEDICAL_PEOPLE_NUM_STATISTICS,medicalPeopleNumStatisticsVOS);
|
||||
|
||||
// 体检异常数据查询
|
||||
List<MedicalAbnormalStatisticsVO> medicalAbnormalStatisticsList = new ArrayList<>();
|
||||
redisClientUtil.set(MEDICAL,MEDICAL_ABNORMAL_STATISTICS,medicalAbnormalStatisticsList);
|
||||
|
||||
// 减重 健康打卡数据今日查询
|
||||
HealthSignDataVO weightLossDay = new HealthSignDataVO();
|
||||
// 减重 健康打卡数据本月查询
|
||||
HealthSignDataVO weightLossMonth = new HealthSignDataVO();
|
||||
|
||||
// 血压 健康打卡数据今日查询
|
||||
HealthSignDataVO bloodPressureDay = new HealthSignDataVO();
|
||||
// 血压 健康打卡数据本月查询
|
||||
HealthSignDataVO bloodPressureMonth = new HealthSignDataVO();
|
||||
|
||||
// 血糖 健康打卡数据今日查询
|
||||
HealthSignDataVO bloodSugarDay = new HealthSignDataVO();
|
||||
// 血糖 健康打卡数据本月查询
|
||||
HealthSignDataVO bloodSugarMonth = new HealthSignDataVO();
|
||||
|
||||
// 健康打卡今日数据查询
|
||||
HealthSignStatVO healthSignToday = anYanClient.healthCheckStatistics(DateUtil.beginOfDay(today), DateUtil.endOfDay(today));
|
||||
// 健康打卡本月数据查询
|
||||
HealthSignStatVO healthSignMonth = anYanClient.healthCheckStatistics(DateUtil.beginOfMonth(today), DateUtil.endOfMonth(today));
|
||||
// 减重 血压 血糖 三种数据整合存
|
||||
HealthSignVO healthSign = new HealthSignVO();
|
||||
|
||||
healthSign.setWeightLossCountDay(Integer.valueOf(healthSignToday.getWeigtTotalCount()));
|
||||
healthSign.setWeightLossAbnormalCountDay(Integer.valueOf(healthSignToday.getWeigtAbCount()));
|
||||
healthSign.setBloodPressureCountDay(Integer.valueOf(healthSignToday.getBpTotalCount()));
|
||||
healthSign.setBloodPressureAbnormalCountDay(Integer.valueOf(healthSignToday.getBpAbCount()));
|
||||
healthSign.setBloodSugarCountDay(Integer.valueOf(healthSignToday.getBsTotalCount()));
|
||||
healthSign.setBloodSugarAbnormalCountDay(Integer.valueOf(healthSignToday.getBsAbCount()));
|
||||
|
||||
healthSign.setWeightLossCountMonth(Integer.valueOf(healthSignMonth.getWeigtTotalCount()));
|
||||
healthSign.setWeightLossAbnormalCountMonth(Integer.valueOf(healthSignMonth.getWeigtAbCount()));
|
||||
healthSign.setBloodPressureCountMonth(Integer.valueOf(healthSignMonth.getBpTotalCount()));
|
||||
healthSign.setBloodPressureAbnormalCountMonth(Integer.valueOf(healthSignMonth.getBpAbCount()));
|
||||
healthSign.setBloodSugarCountMonth(Integer.valueOf(healthSignMonth.getBpTotalCount()));
|
||||
healthSign.setBloodSugarAbnormalCountMonth(Integer.valueOf(healthSignMonth.getBpAbCount()));
|
||||
|
||||
redisClientUtil.set(MEDICAL,HEALTH_SIGN,healthSign);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user