Merge remote-tracking branch 'origin/main'
commit
f8bcdf1361
@ -1,76 +1,76 @@
|
|||||||
//package com.cuit.solarenergy.controller;
|
package com.cuit.solarenergy.controller;
|
||||||
//
|
|
||||||
//import com.cuit.solarenergy.base.annotation.AopLog;
|
import com.cuit.solarenergy.base.annotation.AopLog;
|
||||||
//import com.cuit.solarenergy.base.annotation.AuthToken;
|
import com.cuit.solarenergy.base.annotation.AuthToken;
|
||||||
//import com.cuit.solarenergy.entity.vo.req.DataQueryGetVoReq;
|
import com.cuit.solarenergy.entity.vo.req.DataQueryGetVoReq;
|
||||||
//import com.cuit.solarenergy.entity.vo.ret.*;
|
import com.cuit.solarenergy.entity.vo.ret.*;
|
||||||
//import com.cuit.solarenergy.exception.ParamsException;
|
import com.cuit.solarenergy.exception.ParamsException;
|
||||||
//import com.cuit.solarenergy.service.DataManagerService;
|
import com.cuit.solarenergy.service.DataManagerService;
|
||||||
//import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
//import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
//import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
//import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
//import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
//import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
//import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
//import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
//import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
//import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
//import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
//import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
//
|
|
||||||
//import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
//
|
|
||||||
///**
|
/**
|
||||||
// * @BelongsProject: railway
|
* @BelongsProject: railway
|
||||||
// * @BelongsPackage: com.cuit.railway.controller
|
* @BelongsPackage: com.cuit.railway.controller
|
||||||
// * @Author: Luolw
|
* @Author: Luolw
|
||||||
// * @Date: 2023/8/4 9:45
|
* @Date: 2023/8/4 9:45
|
||||||
// * @Description:
|
* @Description:
|
||||||
// */
|
*/
|
||||||
//
|
|
||||||
//
|
|
||||||
//@Api(tags = "9、数据查询模块")
|
@Api(tags = "9、数据查询模块")
|
||||||
//@ApiSupport(order = 9)
|
@ApiSupport(order = 9)
|
||||||
//@Slf4j
|
@Slf4j
|
||||||
//@RestController()
|
@RestController()
|
||||||
//@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
//public class DataQueryController {
|
public class DataQueryController {
|
||||||
// @Resource
|
@Resource
|
||||||
// private DataManagerService dataManagerService;
|
private DataManagerService dataManagerService;
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * @Description: 数据查询-采样点查询
|
* @Description: 数据查询-采样点查询
|
||||||
// * @Param: DataQueryGetVoReq
|
* @Param: DataQueryGetVoReq
|
||||||
// * @return: DataManageGetVoRetList
|
* @return: DataManageGetVoRetList
|
||||||
// * @Author: LuoSir
|
* @Author: LuoSir
|
||||||
// * @Date: 2023/8/4
|
* @Date: 2023/8/4
|
||||||
// */
|
*/
|
||||||
// @AuthToken
|
@AuthToken
|
||||||
// @AopLog
|
@AopLog
|
||||||
// @ApiOperationSupport(order = 1)
|
@ApiOperationSupport(order = 1)
|
||||||
// @ApiOperation("1、数据查询-采样点查询接口")
|
@ApiOperation("1、数据查询-采样点查询接口")
|
||||||
// @PreAuthorize("hasAuthority('data:query:getSamplePointData')")
|
@PreAuthorize("hasAuthority('data:query:getSamplePointData')")
|
||||||
// @RequestMapping(value = "/data/query/getSamplePointData", method = {RequestMethod.POST})
|
@RequestMapping(value = "/data/query/getSamplePointData", method = {RequestMethod.POST})
|
||||||
// @ApiResponses({
|
@ApiResponses({
|
||||||
// @ApiResponse(code = 200, message = "成功"),
|
@ApiResponse(code = 200, message = "成功"),
|
||||||
// @ApiResponse(code = 401, message = "访问未经授权"),
|
@ApiResponse(code = 401, message = "访问未经授权"),
|
||||||
// @ApiResponse(code = 403, message = "访问被禁止的"),
|
@ApiResponse(code = 403, message = "访问被禁止的"),
|
||||||
// @ApiResponse(code = 404, message = "未找到访问接口"),
|
@ApiResponse(code = 404, message = "未找到访问接口"),
|
||||||
// @ApiResponse(code = 500, message = "服务器内部错误"),
|
@ApiResponse(code = 500, message = "服务器内部错误"),
|
||||||
// @ApiResponse(code = 900, message = "失败")
|
@ApiResponse(code = 900, message = "失败")
|
||||||
// })
|
})
|
||||||
// public RetResult<PageVo<StatisticQueryVoRet>> getSamplePointData(@RequestBody DataQueryGetVoReq dataQueryGetVoReq) {
|
public RetResult<PageVo<StatisticQueryVoRet>> getSamplePointData(@RequestBody DataQueryGetVoReq dataQueryGetVoReq) {
|
||||||
// PageVo<StatisticQueryVoRet> statisticQueryVoRetPageVo;
|
PageVo<StatisticQueryVoRet> statisticQueryVoRetPageVo;
|
||||||
// try {
|
try {
|
||||||
// statisticQueryVoRetPageVo = dataManagerService.getSamplePointData(dataQueryGetVoReq);
|
statisticQueryVoRetPageVo = dataManagerService.getSamplePointData(dataQueryGetVoReq);
|
||||||
// return RetResponse.makeOKRsp(statisticQueryVoRetPageVo);
|
return RetResponse.makeOKRsp(statisticQueryVoRetPageVo);
|
||||||
// } catch (ParamsException paramsException) {
|
} catch (ParamsException paramsException) {
|
||||||
// return RetResponse.makeErrRsp(paramsException.getMessage());
|
return RetResponse.makeErrRsp(paramsException.getMessage());
|
||||||
// } catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// e.printStackTrace();
|
e.printStackTrace();
|
||||||
// return RetResponse.makeErrRsp("服务器异常.....");
|
return RetResponse.makeErrRsp("服务器异常.....");
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.cuit.solarenergy.entity.vo.req;
|
||||||
|
|
||||||
|
import com.cuit.solarenergy.base.BasePageQuery;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import static com.cuit.solarenergy.utils.DateUtil.DATE_FORMAT;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: railway
|
||||||
|
* @BelongsPackage: com.cuit.solarenergy.entity.vo.req
|
||||||
|
* @Author: Luolw
|
||||||
|
* @Date: 2023/8/4 10:01
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@ApiModel(description = "站点详情类")
|
||||||
|
public class SiteListVoReq extends BasePageQuery {
|
||||||
|
@ApiModelProperty(value = "站点名")
|
||||||
|
private String siteName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "数据类型")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "开始时间")
|
||||||
|
@DateTimeFormat(pattern = DATE_FORMAT)
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "结束时间")
|
||||||
|
@DateTimeFormat(pattern = DATE_FORMAT)
|
||||||
|
private String endTime;
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.cuit.solarenergy.entity.vo.ret;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: Tjb
|
||||||
|
* @CreateTime: 2023-07-15 14:37
|
||||||
|
* @Description: 监测模块首页站点信息返回类
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@ApiModel(description = "站点信息返回类")
|
||||||
|
public class SiteListVoRet {
|
||||||
|
|
||||||
|
@ApiModelProperty("站点名称")
|
||||||
|
private String siteName;
|
||||||
|
|
||||||
|
@ApiModelProperty("类型")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据时间")
|
||||||
|
private String dataTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("小时")
|
||||||
|
private String dataHour;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据值")
|
||||||
|
private String dataValue;
|
||||||
|
}
|
Loading…
Reference in New Issue