超高压数据中心代码提交
This commit is contained in:
@@ -87,7 +87,7 @@ public class ComAssesUtil {
|
|||||||
if (getBysxf()) {
|
if (getBysxf()) {
|
||||||
//G和F得出综合权重A
|
//G和F得出综合权重A
|
||||||
if (getZhqzf()) {
|
if (getZhqzf()) {
|
||||||
//A[0] = 0.28;A[1] = 0.23;A[2] = 0.13;A[3] = 0.16;A[4] = 0.08;A[5] = 0.12;
|
A[0] = 0.28f;A[1] = 0.23f;A[2] = 0.13f;A[3] = 0.16f;A[4] = 0.08f;A[5] = 0.12f;
|
||||||
for (i = 0; i < GRADE_NUM; i++) {
|
for (i = 0; i < GRADE_NUM; i++) {
|
||||||
B[i] = 0;
|
B[i] = 0;
|
||||||
for (j = 0; j < ST_QT_NUM; j++) {
|
for (j = 0; j < ST_QT_NUM; j++) {
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class LargeScreenController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/getLoadType")
|
@PostMapping("/getLoadType")
|
||||||
@ApiOperation("监测点规模(负荷类型)")
|
@ApiOperation("监测点规模(负荷类型)")
|
||||||
@ApiImplicitParam(name = "getLoadType", value = "监测点规模(负荷类型)", required = true)
|
@ApiImplicitParam(name = "largeScreenParam", value = "监测点规模(负荷类型)", required = true)
|
||||||
public HttpResult<MonitoringPointScaleVO> getLoadType(@RequestBody @Validated LargeScreenParam largeScreenParam) {
|
public HttpResult<MonitoringPointScaleVO> getLoadType(@RequestBody @Validated LargeScreenParam largeScreenParam) {
|
||||||
String methodDescribe = getMethodDescribe("getLoadType");
|
String methodDescribe = getMethodDescribe("getLoadType");
|
||||||
MonitoringPointScaleVO result = largeScreenService.getLoadType(largeScreenParam);
|
MonitoringPointScaleVO result = largeScreenService.getLoadType(largeScreenParam);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.controller;
|
|||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.OperateType;
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
@@ -12,14 +13,23 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.device.pq.enums.DeviceResponseEnum;
|
import com.njcn.device.pq.enums.DeviceResponseEnum;
|
||||||
|
import com.njcn.device.pq.mapper.LineDetailMapper;
|
||||||
|
import com.njcn.device.pq.mapper.LineMapper;
|
||||||
|
import com.njcn.device.pq.mapper.OverlimitMapper;
|
||||||
|
import com.njcn.device.pq.mapper.VoltageMapper;
|
||||||
import com.njcn.device.pq.pojo.bo.DeviceType;
|
import com.njcn.device.pq.pojo.bo.DeviceType;
|
||||||
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
||||||
import com.njcn.device.pq.pojo.param.*;
|
import com.njcn.device.pq.pojo.param.*;
|
||||||
import com.njcn.device.pq.pojo.po.Line;
|
import com.njcn.device.pq.pojo.po.Line;
|
||||||
|
import com.njcn.device.pq.pojo.po.LineDetail;
|
||||||
|
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||||
|
import com.njcn.device.pq.pojo.po.Voltage;
|
||||||
import com.njcn.device.pq.pojo.vo.TerminalBaseVO;
|
import com.njcn.device.pq.pojo.vo.TerminalBaseVO;
|
||||||
import com.njcn.device.pq.pojo.vo.TerminalVO;
|
import com.njcn.device.pq.pojo.vo.TerminalVO;
|
||||||
import com.njcn.device.pq.service.TerminalBaseService;
|
import com.njcn.device.pq.service.TerminalBaseService;
|
||||||
import com.njcn.poi.util.PoiUtil;
|
import com.njcn.poi.util.PoiUtil;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -31,6 +41,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -54,6 +65,22 @@ public class TerminalBaseController extends BaseController {
|
|||||||
private final TerminalBaseService terminalBaseService;
|
private final TerminalBaseService terminalBaseService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private final LineDetailMapper lineDetailMapper;
|
||||||
|
|
||||||
|
|
||||||
|
private final OverlimitMapper overlimitMapper;
|
||||||
|
|
||||||
|
|
||||||
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
|
|
||||||
|
private final LineMapper lineMapper;
|
||||||
|
|
||||||
|
|
||||||
|
private final VoltageMapper voltageMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端新增操作
|
* 终端新增操作
|
||||||
*
|
*
|
||||||
@@ -272,4 +299,37 @@ public class TerminalBaseController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新计算限值
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/5/17
|
||||||
|
*/
|
||||||
|
@ApiOperation("监测点-重新计算限值")
|
||||||
|
@GetMapping(value = "updatePqOverLimit")
|
||||||
|
public HttpResult<Integer> updatePqOverLimit() {
|
||||||
|
String methodDescribe = getMethodDescribe("updatePqOverLimit");
|
||||||
|
|
||||||
|
List<LineDetail> lineDetailList = lineDetailMapper.selectList(new LambdaQueryWrapper<>());
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for(LineDetail lineDetail:lineDetailList){
|
||||||
|
overlimitMapper.deleteById(lineDetail.getId());
|
||||||
|
Line line = lineMapper.selectById(lineDetail.getId());
|
||||||
|
if(Objects.nonNull(line)) {
|
||||||
|
Voltage voltage = voltageMapper.selectById(line.getPid());
|
||||||
|
//监测点限值
|
||||||
|
HttpResult<DictData> scaleResult = dicDataFeignClient.getDicDataById(voltage.getScale());
|
||||||
|
if (Objects.isNull(scaleResult.getData())) {
|
||||||
|
throw new BusinessException(CommonResponseEnum.DIC_DATA);
|
||||||
|
}
|
||||||
|
Overlimit overlimit = new Overlimit(line.getId(), scaleResult.getData().getName(), lineDetail.getShortCapacity(), lineDetail.getStandardCapacity(), lineDetail.getDealCapacity(), lineDetail.getDevCapacity());
|
||||||
|
overlimitMapper.insert(overlimit);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, count, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user