微调
This commit is contained in:
@@ -9,6 +9,9 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.ADVANCE_BOOT,path = "/waveAnalysis",
|
||||
fallbackFactory = EventWaveAnalysisFeignClientFallbackFactory.class,
|
||||
contextId = "waveAnalysis" )
|
||||
@@ -16,9 +19,9 @@ public interface EventWaveAnalysisFeignClient {
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 波形高级分析
|
||||
* @param eventIndex
|
||||
* @return: com.njcn.common.pojo.response.HttpResult<com.njcn.advance.pojo.dto.waveAnalysis.EntityAdvancedData>
|
||||
* 波形高级分析
|
||||
* @param eventIndex 事件索引
|
||||
* @return com.njcn.common.pojo.response.HttpResult<com.njcn.advance.pojo.dto.waveAnalysis.EntityAdvancedData>
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/1 14:23
|
||||
*/
|
||||
|
||||
@@ -11,6 +11,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class EventWaveAnalysisFeignClientFallbackFactory implements FallbackFactory<EventWaveAnalysisFeignClient> {
|
||||
@@ -24,7 +27,6 @@ public class EventWaveAnalysisFeignClientFallbackFactory implements FallbackFact
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new EventWaveAnalysisFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<EntityAdvancedData> analysis(String eventIndex) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "波形高级分析", throwable.toString());
|
||||
|
||||
@@ -4,8 +4,6 @@ import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description: 承载能力评估相关枚举
|
||||
* @Param:
|
||||
* @return:
|
||||
* @Author: clam
|
||||
* @Date: 2024/1/31
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,6 @@ package com.njcn.advance.enums;
|
||||
* @Author: Sunwei 【sunW2016@163.com】
|
||||
* @Description: 高级分析返回结果
|
||||
* @Date: Create in 9:02 2018/3/6
|
||||
* @Modified By:
|
||||
*/
|
||||
public enum EnumEvt {
|
||||
EVT_NUM("evt_num", "高级算法返回事件个数"), EVT_BUF("evt_buf", "高级算法返回数据"), QVVR_TYPE("qvvr_type", "暂降类型"), POW_A("POW_a",
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.io.Serializable;
|
||||
* @date 2023年07月21日 10:20
|
||||
*/
|
||||
@Data
|
||||
public class ResponsibilityCalculateParam implements Serializable {
|
||||
public class ResponsibilityCalculateParam implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@@ -40,11 +40,11 @@ public class ResponsibilityCalculateParam implements Serializable {
|
||||
@Min(0)
|
||||
@Max(1)
|
||||
@ApiModelProperty("0-电流 1-电压")
|
||||
private int type;
|
||||
private int type;
|
||||
|
||||
@Min(2)
|
||||
@Max(50)
|
||||
@ApiModelProperty("谐波次数")
|
||||
private Integer time;
|
||||
private Integer time;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.njcn.advance.utils;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -33,8 +32,7 @@ public class WaveUtils {
|
||||
public String getFile(String filePath){
|
||||
String temJson = null;
|
||||
try(InputStream inputStream = fileStorageUtil.getFileStream(filePath)){
|
||||
temJson = IoUtil.read(inputStream, CharsetUtil.UTF_8);
|
||||
|
||||
temJson = IoUtil.readUtf8(inputStream);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -109,9 +109,6 @@ public class CarryCapacityController extends BaseController {
|
||||
@ApiOperation("导出数据集模板")
|
||||
@GetMapping(value = "getExcelTemplate")
|
||||
public HttpResult<String> getExcelTemplate(HttpServletResponse response) throws IOException {
|
||||
|
||||
|
||||
|
||||
String sheetName = "数据集模版";
|
||||
List<CarryCapcityDataEexcel> excels = new ArrayList<>();
|
||||
CarryCapcityDataEexcel exportHeadersExcel = new CarryCapcityDataEexcel();
|
||||
@@ -120,10 +117,6 @@ public class CarryCapacityController extends BaseController {
|
||||
.sheet(sheetName)
|
||||
.doWrite(excels);
|
||||
EasyExcelUtil.writeWithSheetsWeb(response, "数据集模版.xlsx");
|
||||
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -132,7 +125,6 @@ public class CarryCapacityController extends BaseController {
|
||||
@ApiOperation("上传数据集")
|
||||
public HttpResult<Boolean> uploadExcel(@Validated ExcelDataParam excelDataParam) throws Exception {
|
||||
String methodDescribe = getMethodDescribe("uploadExcel");
|
||||
|
||||
boolean flag = carryCapcityService.uploadExcel(excelDataParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RestController
|
||||
|
||||
@@ -81,7 +81,7 @@ public class EventWaveAnalysisServiceImpl implements EventWaveAnalysisService {
|
||||
TimeInterval timeInterval = new TimeInterval();
|
||||
//调用方法获取暂降事件详情
|
||||
RmpEventDetailPO rmpEventDetailPO = rmpEventAdvanceMapper.selectById(eventIndex);
|
||||
EntityAdvancedData entityAdvancedData = null;
|
||||
EntityAdvancedData entityAdvancedData ;
|
||||
|
||||
//获取PT变比
|
||||
LineDetailDataVO lineDetailDataVO = lineFeignClient.getLineDetailData(rmpEventDetailPO.getLineId()).getData();
|
||||
|
||||
@@ -15,7 +15,8 @@ public interface PatternRegex {
|
||||
/**
|
||||
* 密码需要包含特殊字符字母数字,长度为8-16
|
||||
*/
|
||||
String PASSWORD_REGEX = "^(?=.*[a-zA-Z])(?=.*\\d)(?=.*[\\=\\[\\]\\{\\}\\.\\,\\。\\、\\@\\#\\_\\!\\$\\%\\^\\&\\*\\(\\)\\?\\<\\>\\/\\|\\~,\\-\\+]).{8,16}$";
|
||||
String PASSWORD_REGEX = "^(?=.*[a-zA-Z])(?=.*\\d)(?=.*[\\=\\[\\]\\{\\}\\.\\,\\。\\@\\#\\_\\!\\$\\%\\^\\&\\*\\(\\)\\?\\<\\>\\/\\|\\~,\\-\\+]).{8,16}$";
|
||||
|
||||
|
||||
/**
|
||||
* APP密码,长度为8-16
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.njcn.system.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -15,7 +17,7 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_area")
|
||||
public class Area extends BaseEntity {
|
||||
public class Area extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
@@ -15,7 +16,7 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_config")
|
||||
public class Config extends BaseEntity {
|
||||
public class Config extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user