Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -6,6 +6,7 @@ import com.njcn.advance.pojo.po.PqsRelevanceLog;
|
||||
import com.njcn.advance.service.EventRelevantAnalysisService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
@@ -14,17 +15,20 @@ import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailAssPO;
|
||||
import com.njcn.event.pojo.vo.AdvanceEventDetailVO;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
@@ -33,11 +37,11 @@ import java.util.Map;
|
||||
* @author cdf
|
||||
* @date 2023/6/30
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("process")
|
||||
@Api(tags = "暂降事件关联分析")
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class EventRelevantAnalysisController extends BaseController {
|
||||
|
||||
private final EventRelevantAnalysisService eventRelevantAnalysisService;
|
||||
@@ -78,6 +82,11 @@ public class EventRelevantAnalysisController extends BaseController {
|
||||
@ApiOperation("事件波形分析主列表")
|
||||
public HttpResult<Page<RmpEventDetailAssPO>> queryEventsAssPage(@RequestBody BaseParam baseParam){
|
||||
String methodDescribe = getMethodDescribe("queryEventsAssPage");
|
||||
String searchValue = baseParam.getSearchValue();
|
||||
Pattern pattern = Pattern.compile(PatternRegex.SPECIAL_REGEX);
|
||||
if(pattern.matcher(searchValue).find()){
|
||||
throw new BusinessException(ValidMessage.SPECIAL_REGEX);
|
||||
}
|
||||
Page<RmpEventDetailAssPO> page = eventRelevantAnalysisService.queryEventsAssPage(baseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class CarryCapacityServiceImpl implements CarryCapacityService {
|
||||
//前2周的数据
|
||||
List<CarryCapcityData> dataHarmPowerP2List;
|
||||
List<CarryCapcityData> dataHarmPowerQ2List;
|
||||
List<CarryCapcityData> dataHarmPowerU2List ;
|
||||
List<CarryCapcityData> dataHarmPowerU2List;
|
||||
|
||||
CarryCapacityDataVO carryCapacityDataVO = new CarryCapacityDataVO();
|
||||
String lineId = queryParam.getLineId();
|
||||
@@ -512,7 +512,7 @@ public class CarryCapacityServiceImpl implements CarryCapacityService {
|
||||
carryCapacitydResultVO.setILevel(iLevel);
|
||||
//统计安全,3级预警,2级预警1级预警个数
|
||||
List<Integer> list = Stream.of(utLevel, pftLevel, btLevel, iLevel).collect(Collectors.toList());
|
||||
int safeCount, warnCount3 , warnCount2 , warnCount1 ;
|
||||
int safeCount, warnCount3, warnCount2, warnCount1;
|
||||
safeCount = (int) list.stream()
|
||||
.filter(temp -> temp == 1)
|
||||
.count();
|
||||
@@ -711,7 +711,6 @@ public class CarryCapacityServiceImpl implements CarryCapacityService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public CarryCapacityDResultVO carryCapacityEvaluate(CarryCapacityEvaluateParam calParam) {
|
||||
CarryCapacityDResultVO vo = new CarryCapacityDResultVO();
|
||||
@@ -918,21 +917,22 @@ public class CarryCapacityServiceImpl implements CarryCapacityService {
|
||||
|
||||
public static ExcelDataDTO parsingFile(LocalDate startDate, LocalDate endDate, InputStream is) {
|
||||
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
List<CarryCapcityData> dataHarmPowerpList ;
|
||||
List<CarryCapcityData> dataHarmPowerqList ;
|
||||
List<DataI> dataiList ;
|
||||
List<CarryCapcityData> dataHarmPowerpList;
|
||||
List<CarryCapcityData> dataHarmPowerqList;
|
||||
List<DataI> dataiList;
|
||||
|
||||
//前2周的时间
|
||||
LocalDate startDate2 = startDate.plusWeeks(-1);
|
||||
LocalDate endDate2 = endDate.plusWeeks(-1);
|
||||
|
||||
//前一周的数据
|
||||
List<CarryCapcityData> dataHarmPowerP2List ;
|
||||
List<CarryCapcityData> dataHarmPowerQ2List ;
|
||||
List<CarryCapcityData> dataHarmPowerU2List ;
|
||||
List<CarryCapcityData> dataHarmPowerP2List;
|
||||
List<CarryCapcityData> dataHarmPowerQ2List;
|
||||
List<CarryCapcityData> dataHarmPowerU2List;
|
||||
|
||||
try {
|
||||
List<CarryCapcityDataEexcel> objects = EasyExcelUtil.syncReadModel(is, CarryCapcityDataEexcel.class, 0, 3);
|
||||
objects = objects.stream().filter(temp -> Objects.nonNull(temp.getTime())).collect(Collectors.toList());
|
||||
List<CarryCapcityDataIEexcel> iEexcelList = new ArrayList<>();
|
||||
List<CarryCapcityDataVEexcel> vEexcelList = new ArrayList<>();
|
||||
List<CarryCapcityDataPEexcel> pEexcelList = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user