安眼平台接口对接
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
<module>font-resources</module>
|
||||
<module>monitoring-sync</module>
|
||||
<module>renkang-test</module>
|
||||
<module>xj-anyan-api</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>functional-modules</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>xj-anyan-api</artifactId>
|
||||
<description>xj安眼系统API</description>
|
||||
<version>2.0.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.retry</groupId>
|
||||
<artifactId>spring-retry</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
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.vo.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: AnYanClient xj安眼系统接口调用客户端
|
||||
* @Author: feng
|
||||
* @Date: 2025-8-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface AnYanClient {
|
||||
/**
|
||||
* 获取服务访问令牌
|
||||
* @return
|
||||
*/
|
||||
String getAuthToken();
|
||||
|
||||
/**
|
||||
* 刷新口令
|
||||
*/
|
||||
void refreshToken();
|
||||
|
||||
/**
|
||||
* 体检人数统计查询
|
||||
* @param medicalYear 体检年份
|
||||
* @return
|
||||
*/
|
||||
List<MedicalPeopleNumStatisticsVO> examinationStatistics(Integer medicalYear);
|
||||
|
||||
/**
|
||||
* 健康打卡数据统计查询(血压,减重,血糖)
|
||||
* @param beginDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
HealthSignStatVO healthCheckStatistics(Date beginDate, Date endDate);
|
||||
|
||||
/**
|
||||
*健康打卡异常数据详细查询(血压)
|
||||
* @param healthSignListParam
|
||||
* @return
|
||||
*/
|
||||
IPage<BloodPressureList> bloodPressureList(HealthSignListParam healthSignListParam);
|
||||
|
||||
/**
|
||||
*健康打卡异常数据详细查询(减重)
|
||||
* @param healthSignListParam
|
||||
* @return
|
||||
*/
|
||||
IPage<WeightPressureList> weightPressureList(HealthSignListParam healthSignListParam);
|
||||
|
||||
/**
|
||||
*健康打卡异常数据详细查询(血糖)
|
||||
* @param healthSignListParam
|
||||
* @return
|
||||
*/
|
||||
IPage<BloodSugarClockSList> bloodSugarClockSList(HealthSignListParam healthSignListParam);
|
||||
|
||||
/**
|
||||
* 油田医院数据查询
|
||||
* @return
|
||||
*/
|
||||
List<HospitalListVO> hospitalList();
|
||||
|
||||
/**
|
||||
* 健康小屋基础数据查询
|
||||
* @return
|
||||
*/
|
||||
List<HealthRoomVO> healthPlaceHomList();
|
||||
|
||||
/**
|
||||
* 健康小屋详细数据查询
|
||||
* @param healthRoomDTO
|
||||
* @return
|
||||
*/
|
||||
IPage<HealthPlaceHomDetailsVO> bloodSugarClockSList(HealthRoomDTO healthRoomDTO);
|
||||
}
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
package com.renkang.anyan.client;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.renkang.anyan.config.AnYanProperties;
|
||||
import com.renkang.anyan.config.RestTemplateUtil;
|
||||
import com.renkang.anyan.constants.AnYanConstants;
|
||||
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.vo.*;
|
||||
import com.renkang.anyan.utils.PageResultToBeanUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.exception.ExceptionAssertsUtil;
|
||||
import org.jeecg.util.RedisClientUtil;
|
||||
import org.jeecg.util.RedisKeyPrefix;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.retry.annotation.EnableRetry;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: AnYanClientExecutor xj安眼系统接口调用执行器
|
||||
* @Author: feng
|
||||
* @Date: 2025-8-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@EnableRetry
|
||||
@RequiredArgsConstructor
|
||||
public class AnYanClientExecutor implements AnYanClient {
|
||||
private final RedisClientUtil redisClientUtil;
|
||||
private final AnYanProperties anYanProperties;
|
||||
|
||||
@Override
|
||||
public String getAuthToken() {
|
||||
String token = redisClientUtil.get(new RedisKeyPrefix(AnYanConstants.AN_YAN_API_TOKEN_PREFIX) ,"token",String.class);
|
||||
if(StringUtils.isEmpty(token)){
|
||||
AuthResult authResult = getAuthTokenExecutor();
|
||||
if(ObjectUtil.isNotEmpty(authResult) && StrUtil.isNotEmpty(authResult.getAccess_token())){
|
||||
token = authResult.getAccess_token();
|
||||
int expireSeconds = ObjectUtil.isNotEmpty(authResult.getExpires_in())? authResult.getExpires_in() : 7200;
|
||||
redisClientUtil.set(new RedisKeyPrefix(expireSeconds,AnYanConstants.AN_YAN_API_TOKEN_PREFIX),"token", token);
|
||||
}
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
private AuthResult getAuthTokenExecutor(){
|
||||
AuthParam authParam = new AuthParam();
|
||||
authParam.setClient_id(anYanProperties.getClientId());
|
||||
authParam.setClient_secret(anYanProperties.getClientSecret());
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
|
||||
ResponseEntity<AuthResult> responseEntity = RestTemplateUtil.postExchange(AnYanApiEnum.QUERY_AUTH_TOKEN,headers,authParam,AuthResult.class);
|
||||
if(HttpStatus.OK.equals(responseEntity.getStatusCode()) && ObjectUtils.isNotEmpty(responseEntity.getBody())){
|
||||
return responseEntity.getBody();
|
||||
}else {
|
||||
ExceptionAssertsUtil.fail("------安眼系统获取token失败------" + responseEntity.getBody());
|
||||
}
|
||||
return new AuthResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refreshToken() {
|
||||
AuthResult authResult = getAuthTokenExecutor();
|
||||
if(ObjectUtil.isNotEmpty(authResult) && StrUtil.isNotEmpty(authResult.getAccess_token())){
|
||||
int expireSeconds = ObjectUtil.isNotEmpty(authResult.getExpires_in())? authResult.getExpires_in() : 7200;
|
||||
redisClientUtil.set(new RedisKeyPrefix(expireSeconds,AnYanConstants.AN_YAN_API_TOKEN_PREFIX),"token", authResult.getAccess_token());
|
||||
}
|
||||
}
|
||||
|
||||
private HttpHeaders buildTokenHeader(){
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.add(AnYanConstants.AUTHORIZATION, AnYanConstants.TOKEN_TYPE + getAuthToken());
|
||||
return headers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MedicalPeopleNumStatisticsVO> examinationStatistics(Integer medicalYear) {
|
||||
if(null == medicalYear){ medicalYear = DateUtil.year(new Date()); }
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("medicalYear",String.valueOf(medicalYear));
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.HEALTH_EXAMINATION_STATISTICS, buildTokenHeader(), param);
|
||||
List<Object> listMaps = (List<Object>) result.getResult();
|
||||
return listMaps.stream().map(lMap -> BeanUtil.toBean(lMap, MedicalPeopleNumStatisticsVO.class)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HealthSignStatVO healthCheckStatistics(Date beginDate, Date endDate) {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("inputDateBegin",ObjectUtil.isEmpty(beginDate)? DateUtil.today() : DateUtil.formatDate(beginDate));
|
||||
param.put("inputDateEnd",ObjectUtil.isEmpty(endDate)? DateUtil.today() : DateUtil.formatDate(endDate));
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.HEALTH_CHECK_STATISTICS, buildTokenHeader(), param);
|
||||
return BeanUtil.toBean(result.getResult(),HealthSignStatVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<BloodPressureList> bloodPressureList(HealthSignListParam healthSignListParam) {
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.BLOOD_PRESSURE_LIST, buildTokenHeader(), healthSignListParam);
|
||||
return new PageResultToBeanUtil<BloodPressureList>().transform(result,BloodPressureList.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<WeightPressureList> weightPressureList(HealthSignListParam healthSignListParam) {
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.WEIGHT_PRESSURE_LIST, buildTokenHeader(), healthSignListParam);
|
||||
return new PageResultToBeanUtil<WeightPressureList>().transform(result,WeightPressureList.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<BloodSugarClockSList> bloodSugarClockSList(HealthSignListParam healthSignListParam) {
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.BLOOD_SUGAR_CLOCKS_LIST, buildTokenHeader(), healthSignListParam);
|
||||
return new PageResultToBeanUtil<BloodSugarClockSList>().transform(result,BloodSugarClockSList.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HospitalListVO> hospitalList() {
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.HOSPITAL_LIST, buildTokenHeader(), null);
|
||||
List<Object> listMaps = (List<Object>) result.getResult();
|
||||
return listMaps.stream().map(lMap -> BeanUtil.toBean(lMap, HospitalListVO.class)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HealthRoomVO> healthPlaceHomList() {
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.HEALTH_PLACE_ROOM_LIST, buildTokenHeader(),null);
|
||||
List<Object> listMaps = (List<Object>) result.getResult();
|
||||
return listMaps.stream().map(lMap -> BeanUtil.toBean(lMap, HealthRoomVO.class)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<HealthPlaceHomDetailsVO> bloodSugarClockSList(HealthRoomDTO healthRoomDTO) {
|
||||
Result<Object> result = RestTemplateUtil.postExchange(AnYanApiEnum.HEALTH_PLACE_ROOM_INFO_LIST, buildTokenHeader(), healthRoomDTO);
|
||||
return new PageResultToBeanUtil<HealthPlaceHomDetailsVO>().transform(result,HealthPlaceHomDetailsVO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.renkang.anyan.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @Description: AnYanProperties
|
||||
* @Author: feng
|
||||
* @Date: 2025-8-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "variable.anyan")
|
||||
public class AnYanProperties {
|
||||
/**
|
||||
*服务调用地址
|
||||
*/
|
||||
private String host = "";
|
||||
/**
|
||||
* clientId
|
||||
*/
|
||||
private String clientId = "";
|
||||
/**
|
||||
*clientSecret
|
||||
*/
|
||||
private String clientSecret = "";
|
||||
/**
|
||||
*链接超时时间
|
||||
*/
|
||||
private Long timeout = 3000L;
|
||||
/**
|
||||
*读取超时时间
|
||||
*/
|
||||
private Long readTimeout = 30000L;
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.renkang.restaurant.config;
|
||||
|
||||
import com.renkang.anyan.client.AnYanClient;
|
||||
import com.renkang.anyan.config.AnYanProperties;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.exception.ExceptionAssertsUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.springframework.boot.web.client.RestTemplateBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.client.ClientHttpRequestInterceptor;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.http.converter.StringHttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @Description: AnYanClient xj安眼系统接口调用客户端
|
||||
* @Author: feng
|
||||
* @Date: 2025-8-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@RequiredArgsConstructor
|
||||
public class AnYanRestTemplateConfig {
|
||||
private final AnYanProperties properties;
|
||||
|
||||
@Bean
|
||||
public RestTemplate anYanTemplate() {
|
||||
ClientHttpRequestInterceptor authInterceptor = authInterceptor();
|
||||
return new RestTemplateBuilder()
|
||||
.setConnectTimeout(Duration.of(properties.getTimeout(), ChronoUnit.MILLIS))
|
||||
.setReadTimeout(Duration.of(properties.getReadTimeout(), ChronoUnit.MILLIS))
|
||||
.additionalMessageConverters(new StringHttpMessageConverter(StandardCharsets.UTF_8), new MappingJackson2HttpMessageConverter())
|
||||
.additionalInterceptors(authInterceptor)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义拦截器处理接口鉴权失败, 配合spring retry使用从而避免因token失效导致的接口调用失败
|
||||
*/
|
||||
public ClientHttpRequestInterceptor authInterceptor(){
|
||||
return (httpRequest, bytes, clientHttpRequestExecution) -> {
|
||||
ClientHttpResponse execute;
|
||||
try {
|
||||
execute = clientHttpRequestExecution.execute(httpRequest, bytes);
|
||||
HttpStatus httpStatus =execute.getStatusCode();
|
||||
if (Arrays.asList(HttpStatus.UNAUTHORIZED,HttpStatus.FORBIDDEN).contains(httpStatus)) {
|
||||
SpringContextUtils.getBean("anYanClientExecutor", AnYanClient.class).refreshToken();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("---------安眼平台API调用异常-------e{}",e.getMessage(),e);
|
||||
ExceptionAssertsUtil.fail("安眼平台API调用失败");
|
||||
throw e;
|
||||
}
|
||||
return execute;
|
||||
};
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.renkang.anyan.config;
|
||||
|
||||
import com.renkang.anyan.enums.AnYanApiEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: RestTemplate 工具类 (更多请求方式自行封装)
|
||||
* @Author: feng
|
||||
* @Date: 2025-8-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Slf4j
|
||||
public class RestTemplateUtil {
|
||||
private static RestTemplate restTemplate;
|
||||
private static AnYanProperties properties;
|
||||
|
||||
public static RestTemplate getRestTemplate() {
|
||||
if (Objects.isNull(restTemplate)) {
|
||||
restTemplate = SpringContextUtils.getBean("anYanTemplate", RestTemplate.class);
|
||||
}
|
||||
return restTemplate;
|
||||
}
|
||||
|
||||
public static AnYanProperties getProperties() {
|
||||
if (Objects.isNull(properties)) {
|
||||
properties = SpringContextUtils.getBean(AnYanProperties.class);
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用调用方法
|
||||
* @param api 接口
|
||||
* @param requestBody 参数
|
||||
* @return ResponseEntity
|
||||
*/
|
||||
public static <T> ResponseEntity<T> postExchange(AnYanApiEnum api, HttpHeaders headers ,Object requestBody,Class<T> responseType) {
|
||||
String url = getProperties().getHost() + api.getMethodPath() + api.getMethodParam();
|
||||
HttpEntity<Object> requestEntity = new HttpEntity<>(requestBody);
|
||||
return getRestTemplate().exchange(url, api.getHttpMethod(), requestEntity, responseType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用调用方法
|
||||
* @param api 请求接口
|
||||
* @param headers 请求头
|
||||
* @param requestBody body参数
|
||||
* @return Result对象
|
||||
*/
|
||||
public static Result<Object> postExchange(AnYanApiEnum api, HttpHeaders headers,Object requestBody) {
|
||||
String url = getProperties().getHost() + api.getMethodPath() +api.getMethodParam();
|
||||
HttpEntity<Object> requestEntity = new HttpEntity<>(requestBody,headers);
|
||||
return responseHandler(getRestTemplate().exchange(url, api.getHttpMethod(), requestEntity, Result.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* ResponseEntity 转 Result
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
private static <T extends Result<Object>> Result<Object> responseHandler(ResponseEntity<T> entity) {
|
||||
if(HttpStatus.OK.equals(entity.getStatusCode()) && ObjectUtils.isNotEmpty(entity.getBody())){
|
||||
return entity.getBody();
|
||||
}else{
|
||||
return Result.error("天眼系统API调用失败");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.renkang.anyan.constants;
|
||||
|
||||
import org.jeecg.util.RedisKeyPrefix;
|
||||
|
||||
/**
|
||||
* @Description: AnYanConstants 常量
|
||||
* @Author: feng
|
||||
* @Date: 2025-8-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface AnYanConstants {
|
||||
/**
|
||||
* token传递请求头参数
|
||||
*/
|
||||
String AUTHORIZATION = "authorization";
|
||||
/**
|
||||
* token类型
|
||||
*/
|
||||
String TOKEN_TYPE = "bearer ";
|
||||
/**
|
||||
* 缓存调用安眼系统接口鉴权token缓存key
|
||||
*/
|
||||
String AN_YAN_API_TOKEN_PREFIX = "exterior:anyan:api:";
|
||||
}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
package com.renkang.anyan.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.springframework.http.HttpMethod;
|
||||
/**
|
||||
* @Description: AnYanApiEnum xj安眼系统接口枚举类
|
||||
* @Author: feng
|
||||
* @Date: 2025-8-1
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Getter
|
||||
public enum AnYanApiEnum {
|
||||
/**
|
||||
* 1.获取token接口
|
||||
*/
|
||||
QUERY_AUTH_TOKEN("/oauth/oauth/token","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
* 2.体检人数统计查询
|
||||
*/
|
||||
HEALTH_EXAMINATION_STATISTICS("/aygc-znhpt-sys/0/aystatistics/peopleHealthExaminationStatistics","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*3.健康打卡数据统计查询(血压,减重,血糖)
|
||||
*/
|
||||
HEALTH_CHECK_STATISTICS("/aygc-znhpt-sys/0/aystatistics/healthCheckStatistics","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*4.健康打卡异常数据详细查询(血压)
|
||||
*/
|
||||
BLOOD_PRESSURE_LIST("/aygc-znhpt-sys/0/aystatistics/bloodPressureList","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*5.健康打卡异常数据详细查询(减重)
|
||||
*/
|
||||
WEIGHT_PRESSURE_LIST("/aygc-znhpt-sys/0/aystatistics/weightPressureList","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*6.健康打卡异常数据详细查询(血糖)
|
||||
*/
|
||||
BLOOD_SUGAR_CLOCKS_LIST("/aygc-znhpt-sys/0/aystatistics/bloodSugarClockSList","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*7.体检异常数据统计查询(暂定)
|
||||
*/
|
||||
MEDICAL_ABNORMAL_STATISTICS("","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*8.体检异常数据清单(暂定)
|
||||
*/
|
||||
MEDICAL_ABNORMAL_LIST("","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*9.油田医院数据查询
|
||||
*/
|
||||
HOSPITAL_LIST("/aygc-znhpt-sys/0/aystatistics/HospitalList","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*10.健康小屋基础数据查询
|
||||
*/
|
||||
HEALTH_PLACE_ROOM_LIST("/aygc-znhpt-sys/0/aystatistics/HealthPlaceHomList","", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
*11.健康小屋详细数据查询
|
||||
*/
|
||||
HEALTH_PLACE_ROOM_INFO_LIST("/aygc-znhpt-sys/0/aystatistics/initEmpHealthRoomCheckinInfoPages","", HttpMethod.POST);
|
||||
|
||||
/**
|
||||
* 接口路径
|
||||
*/
|
||||
private String methodPath;
|
||||
/**
|
||||
* 接口的路径参数
|
||||
*/
|
||||
private String methodParam;
|
||||
/**
|
||||
* 接口请求方式
|
||||
*/
|
||||
private HttpMethod httpMethod;
|
||||
|
||||
AnYanApiEnum(String methodPath, String methodParam, HttpMethod httpMethod) {
|
||||
this.methodPath = methodPath;
|
||||
this.methodParam = methodParam;
|
||||
this.httpMethod = httpMethod;
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.renkang.anyan.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AuthParam {
|
||||
/**
|
||||
*grant_type
|
||||
*/
|
||||
private String grant_type = "client_credentials";
|
||||
/**
|
||||
* client_id
|
||||
*/
|
||||
private String client_id;
|
||||
/**
|
||||
* client_secret
|
||||
*/
|
||||
private String client_secret;
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
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.jeecg.common.aspect.annotation.Dict;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class HealthRoomDTO {
|
||||
/**
|
||||
* 健康小屋ID
|
||||
*/
|
||||
@Schema(title = "健康小屋ID")
|
||||
@NotNull
|
||||
private String healthRoomId;
|
||||
/**
|
||||
* 检查类型 11:BMI/21:收缩压/22:舒张压/31:血糖/41:低密度脂蛋白/42:总胆固醇/43:甘油三酯/51:尿酸/61:同型半胱氨酸 等等,缺失的可以继续加
|
||||
*/
|
||||
@Schema(title = "检查类型 11:BMI/21:收缩压/22:舒张压/31:血糖/41:低密度脂蛋白/42:总胆固醇/43:甘油三酯/51:尿酸/61:同型半胱氨酸 等等,缺失的可以继续加")
|
||||
@Dict(dicCode = "xj_check_type")
|
||||
private String checkType;
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
@Schema(title = "单位名称")
|
||||
private String departName;
|
||||
/**
|
||||
* 员工姓名
|
||||
*/
|
||||
@Schema(title = "员工姓名")
|
||||
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:是/0.否
|
||||
*/
|
||||
@Schema(title = "是否成功控降 是否成功空降,1:是/0.否")
|
||||
private String successFlag;
|
||||
/**
|
||||
* 页码 从1开始
|
||||
*/
|
||||
@Schema(title = "页码 从1开始")
|
||||
private Integer pageNo;
|
||||
/**
|
||||
* 每页数量
|
||||
*/
|
||||
@Schema(title = "每页数量")
|
||||
private Integer pageSize;
|
||||
|
||||
public HealthRoomDTO() {
|
||||
Date date = new Date();
|
||||
this.checkInDateBegin = DateUtil.beginOfYear(date);
|
||||
this.checkInDateEnd = DateUtil.endOfDay(date);
|
||||
this.pageNo = 1;
|
||||
this.pageSize = 10;
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.renkang.anyan.model.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 健康打卡异常数据详情查询参数
|
||||
*/
|
||||
@Data
|
||||
public class HealthSignListParam {
|
||||
/**
|
||||
*单位
|
||||
*/
|
||||
@Schema(title = "单位")
|
||||
private String departName;
|
||||
/**
|
||||
* 员工姓名
|
||||
*/
|
||||
@Schema(title = "员工姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@Schema(title = "开始时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date inputDateBegin;
|
||||
/**
|
||||
*结束时间
|
||||
*/
|
||||
@Schema(title = "结束时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date inputDateEnd;
|
||||
/**
|
||||
* pageNo
|
||||
*/
|
||||
@Schema(title = "pageNo")
|
||||
private Integer pageNo = 1;
|
||||
/**
|
||||
* pageSize
|
||||
*/
|
||||
@Schema(title = "pageSize")
|
||||
private Integer pageSize = 10;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AuthResult {
|
||||
/**
|
||||
*范围
|
||||
*/
|
||||
private String scope;
|
||||
/**
|
||||
*有效期
|
||||
*/
|
||||
private Integer expires_in;
|
||||
/**
|
||||
* token_type
|
||||
*/
|
||||
private String token_type;
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
private String access_token;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(title="健康打卡血压异常数据详细", description="健康打卡血压异常数据详细")
|
||||
public class BloodPressureList extends XjUserBaseInfo {
|
||||
/**
|
||||
*收缩压
|
||||
*/
|
||||
@Schema(title = "收缩压")
|
||||
private String sbp;
|
||||
/**
|
||||
*收缩压是否异常
|
||||
*/
|
||||
@Schema(title = "收缩压是否异常")
|
||||
private String sbpFlag;
|
||||
/**
|
||||
*舒张压
|
||||
*/
|
||||
@Schema(title = "舒张压")
|
||||
private String dbp;
|
||||
/**
|
||||
*舒张压是否异常
|
||||
*/
|
||||
@Schema(title = "舒张压是否异常")
|
||||
private String dbpFlag;
|
||||
/**
|
||||
*填报时间 YYYY-MM-DD
|
||||
*/
|
||||
@Schema(title = "填报时间")
|
||||
private String inputDate;
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(title="健康打卡血糖异常数据详细", description="健康打卡血糖异常数据详细")
|
||||
public class BloodSugarClockSList extends XjUserBaseInfo {
|
||||
/**
|
||||
*血糖值
|
||||
*/
|
||||
@Schema(title = "血糖值")
|
||||
private String bsVal;
|
||||
/**
|
||||
*血糖是否异常
|
||||
*/
|
||||
@Schema(title = "血糖是否异常")
|
||||
private String bsFlag;
|
||||
/**
|
||||
*填报时间 YYYY-MM-DD
|
||||
*/
|
||||
@Schema(title = "填报时间")
|
||||
private String inputDate;
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
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
|
||||
@Schema(title="健康小屋数据详情列表", description="健康小屋数据详情列表")
|
||||
public class HealthPlaceHomDetailsVO {
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Schema(title = "单位")
|
||||
private String departName;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Schema(title = "姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 检查日期
|
||||
*/
|
||||
@Schema(title = "检查日期")
|
||||
private String checkInDate;
|
||||
/**
|
||||
* 检查类型 11:BMI/21:收缩压/22:舒张压/31:血糖/41:低密度脂蛋白/42:总胆固醇/43:甘油三酯/51:尿酸/61:同型半胱氨酸 等等,缺失的可以继续加
|
||||
*/
|
||||
@Schema(title = "检查类型 11:BMI/21:收缩压/22:舒张压/31:血糖/41:低密度脂蛋白/42:总胆固醇/43:甘油三酯/51:尿酸/61:同型半胱氨酸 等等,缺失的可以继续加")
|
||||
@Dict(dicCode = "xj_check_type")
|
||||
private String checkType;
|
||||
/**
|
||||
* 去年体检值 前一年的体检值(初始值)
|
||||
*/
|
||||
@Schema(title = "去年体检值 前一年的体检值(初始值)")
|
||||
private String lastVal;
|
||||
/**
|
||||
* 控降目标 一人一档(控降目标值)
|
||||
*/
|
||||
@Schema(title = "控降目标 一人一档(控降目标值")
|
||||
private String goalVal;
|
||||
/**
|
||||
* 目前测量值 目前控降数值(可和健康打卡最新值一致)
|
||||
*/
|
||||
@Schema(title = "目前测量值 目前控降数值(可和健康打卡最新值一致)")
|
||||
private String currentVal;
|
||||
/**
|
||||
* 控降差值 和控降目标对比
|
||||
*/
|
||||
@Schema(title = "控降差值 和控降目标对比")
|
||||
private String compareVal;
|
||||
/**
|
||||
* 是否成功空降,1:是/0.否
|
||||
*/
|
||||
@Schema(title = "是否成功空降,1:是/0.否")
|
||||
private String successFlag;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(title="健康小屋数据VO", description="健康小屋数据VO")
|
||||
public class HealthPlaceHomListVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Schema(title = "单位")
|
||||
private String departName;
|
||||
/**
|
||||
* 地点
|
||||
*/
|
||||
@Schema(title = "地点")
|
||||
private String address;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(title = "经度")
|
||||
private String lon;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(title = "纬度")
|
||||
private String lat;
|
||||
/**
|
||||
* 建设时间 YYYY-MM-DD
|
||||
*/
|
||||
@Schema(title = "建设时间(YYYY-MM-DD)")
|
||||
private String buildDate;
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(title="新疆健康小屋对象", description="新疆健康小屋对象")
|
||||
public class HealthRoomVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@Schema(title = "地址")
|
||||
private String address;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Schema(title = "单位")
|
||||
private String departName;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(title = "经度")
|
||||
private String lon;
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(title = "纬度")
|
||||
private String lat;
|
||||
/**
|
||||
* 建设时间 yyyy-MM-dd
|
||||
*/
|
||||
@Schema(title = "建设时间")
|
||||
private String buildDate;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(title="打卡人数统计", description="打卡人数统计")
|
||||
public class HealthSignStatVO {
|
||||
/**
|
||||
* 减重打卡总人数
|
||||
*/
|
||||
@Schema(title = "减重打卡总人数")
|
||||
private String weigtTotalCount;
|
||||
/**
|
||||
* 减重异常人数
|
||||
*/
|
||||
@Schema(title = "减重异常人数")
|
||||
private String weigtAbCount;
|
||||
/**
|
||||
* 血压打卡总人数
|
||||
*/
|
||||
@Schema(title = "血压打卡总人数")
|
||||
private String bpTotalCount;
|
||||
/**
|
||||
* 血压异常人数
|
||||
*/
|
||||
@Schema(title = "血压异常人数")
|
||||
private String bpAbCount;
|
||||
|
||||
/**
|
||||
* 血糖打卡总人数
|
||||
*/
|
||||
@Schema(title = "血糖打卡总人数")
|
||||
private String bsTotalCount;
|
||||
/**
|
||||
* 血糖异常人数
|
||||
*/
|
||||
@Schema(title = "血糖异常人数")
|
||||
private String bsAbCount;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(title="油田医院VO", description="油田医院VO")
|
||||
public class HospitalListVO {
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@Schema(title = "医院名称")
|
||||
private String hospitalName;
|
||||
/**
|
||||
* 别名
|
||||
*/
|
||||
@Schema(title = "别名")
|
||||
private String alias;
|
||||
/**
|
||||
* 地点
|
||||
*/
|
||||
@Schema(title = "地点")
|
||||
private String address;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@Schema(title = "经度")
|
||||
private String lon;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@Schema(title = "纬度")
|
||||
private String lat;
|
||||
/**
|
||||
* 签约时间 YYYY-MM-DD
|
||||
*/
|
||||
@Schema(title = "签约时间(YYYY-MM-DD)")
|
||||
private String contractDate;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MedicalPeopleNumStatisticsVO {
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@Schema(title = "医院名称")
|
||||
private String hospitalName;
|
||||
/**
|
||||
* 别名 为了显示或别的目的,医院名称过长导致不好显示,最好增加短的别名,如果没有则和hospitalName保持一致
|
||||
*/
|
||||
@Schema(title = "别名")
|
||||
private String alias;
|
||||
/**
|
||||
* 已参检人数
|
||||
*/
|
||||
@Schema(title = "已参检人数")
|
||||
private Integer checkedCount;
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Schema(title="健康打卡体重异常数据详细", description="健康打卡体重异常数据详细")
|
||||
public class WeightPressureList extends XjUserBaseInfo {
|
||||
/**
|
||||
*腰围(CM)
|
||||
*/
|
||||
@Schema(title = "腰围(CM)")
|
||||
private String waist;
|
||||
/**
|
||||
*身高(M)
|
||||
*/
|
||||
@Schema(title = "身高(M)")
|
||||
private String height;
|
||||
/**
|
||||
*体重(KG)
|
||||
*/
|
||||
@Schema(title = "体重(KG)")
|
||||
private String weight;
|
||||
/**
|
||||
*BMI
|
||||
*/
|
||||
@Schema(title = "BMI")
|
||||
private String bmi;
|
||||
/**
|
||||
*BMI是否异常(1:是/0:否)
|
||||
*/
|
||||
@Schema(title = "BMI是否异常(1:是/0:否)")
|
||||
private String bmiFlag;
|
||||
/**
|
||||
*填报时间 YYYY-MM-DD
|
||||
*/
|
||||
@Schema(title = "填报时间")
|
||||
private String inputDate;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.renkang.anyan.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 员工基本信息
|
||||
*/
|
||||
@Data
|
||||
public class XjUserBaseInfo {
|
||||
/**
|
||||
*单位
|
||||
*/
|
||||
@Schema(title = "单位")
|
||||
private String departName;
|
||||
/**
|
||||
*姓名
|
||||
*/
|
||||
@Schema(title = "姓名")
|
||||
private String name;
|
||||
/**
|
||||
*身份证号
|
||||
*/
|
||||
@Schema(title = "身份证号")
|
||||
private String idCard;
|
||||
/**
|
||||
*年龄
|
||||
*/
|
||||
@Schema(title = "年龄")
|
||||
private String age;
|
||||
/**
|
||||
*性别
|
||||
*/
|
||||
@Schema(title = "性别")
|
||||
private String sex;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.renkang.anyan.utils;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* IPage 类型装换
|
||||
* @param <T>
|
||||
*/
|
||||
public class PageResultToBeanUtil<T> {
|
||||
|
||||
public IPage<T> transform(Result<Object> result,Class<T> tClass) {
|
||||
IPage<?> page = BeanUtil.toBean(result.getResult(), Page.class);
|
||||
IPage<T> iPage = new Page<>();
|
||||
BeanUtil.copyProperties(page,iPage,"records");
|
||||
if(page.getTotal() > 0){
|
||||
iPage.setRecords(page.getRecords().stream().map(o ->BeanUtil.toBean(o, tClass)).collect(Collectors.toList()));
|
||||
}
|
||||
return iPage;
|
||||
}
|
||||
}
|
||||
+5
@@ -3,15 +3,20 @@ package com.renkang.emergency.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("emergency_health_room")
|
||||
@Schema(title="新疆健康小屋", description="新疆健康小屋表")
|
||||
public class EmergencyHealthRoom {
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>health-im-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>xj-anyan-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -72,7 +72,11 @@
|
||||
<artifactId>data-center-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>xj-anyan-api</artifactId>
|
||||
<version>${renkang.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.renkang</groupId>
|
||||
<artifactId>font-resources</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user