辽宁稳态指标超标明细等页面丰富查询条件;
This commit is contained in:
@@ -11,6 +11,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.njcn.common.config.GeneralInfo;
|
||||
import com.njcn.device.biz.commApi.CommLineClient;
|
||||
import com.njcn.device.biz.pojo.dto.LineALLInfoDTO;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.api.UserLedgerFeignClient;
|
||||
@@ -48,6 +50,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
@@ -83,7 +86,7 @@ public class AnalyzeServiceImpl implements IAnalyzeService {
|
||||
private final EventDetailFeignClient eventDetailFeignClient;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
private final UserLedgerFeignClient userLedgerFeignClient;
|
||||
|
||||
private final CommLineClient commLineClient;
|
||||
@Override
|
||||
public Page<OverAreaLimitVO> getAreaData(OverAreaVO param) {
|
||||
Page<OverAreaLimitVO> page = new Page<>();
|
||||
@@ -301,8 +304,31 @@ public class AnalyzeServiceImpl implements IAnalyzeService {
|
||||
lineList.addAll(item.getLineIndexes());
|
||||
});
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(lineList)) {
|
||||
page = targetMapper.getSumLimitTargetPage(page, lineList, DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())),
|
||||
List<String> filterLineList = new ArrayList<>();
|
||||
|
||||
if(CollectionUtil.isNotEmpty(lineList)){
|
||||
//根据searchvalue过滤
|
||||
String searchvalue=param.getSearchValue();
|
||||
List<LineALLInfoDTO> data = commLineClient.getLineAllDetailList(lineList).getData();
|
||||
filterLineList= data.stream()
|
||||
.filter(dto -> {
|
||||
LineALLInfoDTO.LineLineDTO lineDTO = dto.getLineLineDTO();
|
||||
String linename = lineDTO != null ? lineDTO.getLinename() : null;
|
||||
String objName2 = lineDTO != null ? lineDTO.getObjName2() : null;
|
||||
|
||||
LineALLInfoDTO.LineSubStationDTO subStationDTO = dto.getLineSubStationDTO();
|
||||
String subStationName = subStationDTO != null ? subStationDTO.getSubStationName() : null;
|
||||
|
||||
// 大小写敏感的模糊匹配(相当于 MySQL 的 LIKE '%keyword%')
|
||||
return (linename != null && linename.contains(searchvalue))
|
||||
|| (objName2 != null && objName2.contains(searchvalue))
|
||||
|| (subStationName != null && subStationName.contains(searchvalue));
|
||||
}).map(dto -> dto.getLineLineDTO() != null ? dto.getLineLineDTO().getLineId() : null)
|
||||
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(filterLineList)) {
|
||||
page = targetMapper.getSumLimitTargetPage(page, filterLineList, DateUtil.beginOfDay(DateUtil.parse(param.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(param.getSearchEndTime())));
|
||||
List<MonitorOverLimitVO> pageRecords = page.getRecords();
|
||||
if (CollectionUtils.isEmpty(pageRecords)) {
|
||||
|
||||
Reference in New Issue
Block a user