1.配网趋势代码提交

This commit is contained in:
wr
2024-01-22 18:41:13 +08:00
parent 8d68562486
commit 8e357aae97
11 changed files with 1173 additions and 51 deletions

View File

@@ -18,13 +18,15 @@ import com.njcn.harmonic.pojo.vo.StatHarmonicOrgVO;
import com.njcn.harmonic.service.HistoryResultService;
import com.njcn.harmonic.service.IRStatLimitRateDService;
import com.njcn.harmonic.service.IRStatLimitTargetDService;
import com.njcn.harmonic.service.OracleResultService;
import com.njcn.influx.pojo.dto.HarmHistoryDataDTO;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -34,21 +36,25 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author denghuajun
* @author denghuajun
* @date 2022/3/14
* 趋势图
* 趋势图
*/
@Validated
@Slf4j
@RestController
@RequestMapping("/harmonic")
@Api(tags = "稳态数据分析")
@AllArgsConstructor
@RequiredArgsConstructor
public class HistoryResultController extends BaseController {
private final HistoryResultService historyResultService;
private final IRStatLimitTargetDService limitTargetDService;
private final IRStatLimitRateDService limitRateDService;
private final OracleResultService oracleResultService;
@Value("${History.DataSource}")
private Integer HistoryDataSource;
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getHistoryResult")
@@ -56,7 +62,12 @@ public class HistoryResultController extends BaseController {
@ApiImplicitParam(name = "historyParam", value = "稳态数据分析参数", required = true)
public HttpResult<List<HistoryDataResultVO>> getHistoryResult(@RequestBody @Validated HistoryParam historyParam) {
String methodDescribe = getMethodDescribe("getHistoryResult");
List<HistoryDataResultVO> list = historyResultService.getHistoryResult(historyParam);
List<HistoryDataResultVO> list;
if (HistoryDataSource == 1) {
list = oracleResultService.getHistoryResult(historyParam);
} else {
list = historyResultService.getHistoryResult(historyParam);
}
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
@@ -110,8 +121,8 @@ public class HistoryResultController extends BaseController {
List<RStatLimitRateDPO> list = limitRateDService.list(new LambdaQueryWrapper<RStatLimitRateDPO>()
.in(RStatLimitRateDPO::getLineId, param.getIds())
.eq(RStatLimitRateDPO::getPhasicType, "T")
.ge(StrUtil.isNotBlank(param.getStartTime()),RStatLimitRateDPO::getTime, param.getStartTime())
.le(StrUtil.isNotBlank(param.getEndTime()),RStatLimitRateDPO::getTime, param.getEndTime())
.ge(StrUtil.isNotBlank(param.getStartTime()), RStatLimitRateDPO::getTime, param.getStartTime())
.le(StrUtil.isNotBlank(param.getEndTime()), RStatLimitRateDPO::getTime, param.getEndTime())
);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);