安眼接口对接
This commit is contained in:
+16
-1
@@ -3,6 +3,7 @@ package com.renkang.anyan.client;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.renkang.anyan.model.dto.HealthRoomDTO;
|
||||
import com.renkang.anyan.model.dto.HealthSignListParam;
|
||||
import com.renkang.anyan.model.dto.MedicalAbnormalDTO;
|
||||
import com.renkang.anyan.model.vo.*;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -27,7 +28,7 @@ public interface AnYanClient {
|
||||
void refreshToken();
|
||||
|
||||
/**
|
||||
* 体检人数统计查询
|
||||
* 体检医院人数统计查询
|
||||
* @param medicalYear 体检年份
|
||||
* @return
|
||||
*/
|
||||
@@ -80,4 +81,18 @@ public interface AnYanClient {
|
||||
* @return
|
||||
*/
|
||||
IPage<HealthPlaceHomDetailsVO> bloodSugarClockSList(HealthRoomDTO healthRoomDTO);
|
||||
|
||||
/**
|
||||
* 当年体检异常人数统计
|
||||
* @param medicalYear 年份
|
||||
* @return
|
||||
*/
|
||||
MedicalAbnormalStatisticsVO medicalAbnormalStatistics(Integer medicalYear);
|
||||
|
||||
/**
|
||||
* 当年体检异常人员列表
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<MedicalAbnormalVO> medicalAbnormalList(MedicalAbnormalDTO param);
|
||||
}
|
||||
|
||||
+16
@@ -13,6 +13,7 @@ import com.renkang.anyan.enums.AnYanApiEnum;
|
||||
import com.renkang.anyan.model.dto.AuthParam;
|
||||
import com.renkang.anyan.model.dto.HealthRoomDTO;
|
||||
import com.renkang.anyan.model.dto.HealthSignListParam;
|
||||
import com.renkang.anyan.model.dto.MedicalAbnormalDTO;
|
||||
import com.renkang.anyan.model.vo.*;
|
||||
import com.renkang.anyan.utils.PageResultToBeanUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -147,4 +148,19 @@ public class AnYanClientExecutor implements AnYanClient {
|
||||
return new PageResultToBeanUtil<HealthPlaceHomDetailsVO>().transform(result,HealthPlaceHomDetailsVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MedicalAbnormalStatisticsVO medicalAbnormalStatistics(Integer medicalYear) {
|
||||
if(null == medicalYear){ medicalYear = DateUtil.year(new Date()); }
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("medicalYear",medicalYear);
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.MEDICAL_ABNORMAL_STATISTICS, buildTokenHeader(), param);
|
||||
return BeanUtil.toBean(result.getResult(),MedicalAbnormalStatisticsVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<MedicalAbnormalVO> medicalAbnormalList(MedicalAbnormalDTO param) {
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.MEDICAL_ABNORMAL_LIST, buildTokenHeader(), param);
|
||||
return new PageResultToBeanUtil<MedicalAbnormalVO>().transform(result,MedicalAbnormalVO.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.renkang.anyan.model.dto;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class MedicalAbnormalDTO {
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String departName;
|
||||
/**
|
||||
* 员工姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 检查日期起期 参数为空时,默认为今年第一天,如:2025-01-01
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(title = "检查日期起期 参数为空时,默认为今年第一天,如:2025-01-01")
|
||||
private Date checkInDateBegin;
|
||||
/**
|
||||
* 检查日期止期 参数为空时,默认为今天
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(title = "检查日期止期 参数为空时,默认为今天")
|
||||
private Date checkInDateEnd;
|
||||
/**
|
||||
* 查询类型 1:心血管异常/2:脑血管异常/3:冠脉CT异常
|
||||
*/
|
||||
@Schema(title = "查询类型 1:心血管异常/2:脑血管异常/3:冠脉CT异常")
|
||||
@NotNull
|
||||
private String queryType;
|
||||
/**
|
||||
* 页码 从1开始
|
||||
*/
|
||||
@Schema(title = "页码 从1开始")
|
||||
private Integer pageNo;
|
||||
/**
|
||||
* 每页数量
|
||||
*/
|
||||
@Schema(title = "每页数量")
|
||||
private Integer pageSize;
|
||||
|
||||
public MedicalAbnormalDTO() {
|
||||
Date date = new Date();
|
||||
this.checkInDateBegin = DateUtil.beginOfYear(date);
|
||||
this.checkInDateEnd = DateUtil.endOfDay(date);
|
||||
this.pageNo = 1;
|
||||
this.pageSize = 10;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MedicalAbnormalStatisticsVO {
|
||||
private Integer totalCount;
|
||||
// 心血管异常人数
|
||||
private Integer cardiovaAbCount;
|
||||
// 脑血管异常人数
|
||||
private Integer cerebrovAbCount;
|
||||
// 冠脉ct异常人数
|
||||
private Integer cctaAbCount;
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
@Data
|
||||
public class MedicalAbnormalVO {
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Schema(title = "单位")
|
||||
private String departName;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Schema(title = "姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@Schema(title = "身份证号")
|
||||
private String idCard;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@Schema(title = "性别")
|
||||
@Dict(dicCode = "sex2")
|
||||
private Integer sex;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@Schema(title = "年龄")
|
||||
private Integer age;
|
||||
/**
|
||||
* 体检医院
|
||||
*/
|
||||
@Schema(title = "体检医院")
|
||||
private String hospitalName;
|
||||
/**
|
||||
* 检查日期
|
||||
*/
|
||||
@Schema(title = "检查日期")
|
||||
private String checkInDate;
|
||||
}
|
||||
Reference in New Issue
Block a user