代码提交
This commit is contained in:
@@ -23,7 +23,9 @@ import com.njcn.system.pojo.po.EleEvtParm;
|
||||
import com.njcn.user.enums.AppRoleEnum;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -202,9 +204,25 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
||||
if(!StringUtils.isEmpty(csEventUserQueryPage.getDeviceId())){
|
||||
list =list.stream().filter(temp->Objects.equals(temp.getDeviceId(),csEventUserQueryPage.getDeviceId())).collect(Collectors.toList());
|
||||
}
|
||||
returnpage.setRecords (list);
|
||||
List list1 = this.startPage(list, csEventUserQueryPage.getPageNum(), csEventUserQueryPage.getPageSize());
|
||||
returnpage.setRecords (list1);
|
||||
returnpage.setTotal(list.size());
|
||||
|
||||
return returnpage;
|
||||
}
|
||||
|
||||
|
||||
public List startPage(List list, Integer pageNum,
|
||||
Integer pageSize) {
|
||||
int total = list.size();
|
||||
int size = pageNum * pageSize > total ? total : pageNum * pageSize;
|
||||
|
||||
int startNum = (pageNum - 1) * pageSize;
|
||||
if (startNum > size){
|
||||
startNum = 1;
|
||||
}
|
||||
List dataList = list.subList(startNum, size);
|
||||
return dataList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ public class StableDataServiceImpl implements StableDataService {
|
||||
List<String> collect = csLinePOList.stream().map(CsLinePO::getLineId).collect(Collectors.toList());
|
||||
String areaId = dicDataFeignClient.getDicDataByCode(DicDataEnum.OUTPUT_SIDE.getCode()).getData().getId();
|
||||
Optional.ofNullable(csLinePOList).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR));
|
||||
collect = csLinePOList.stream().filter(temp->Objects.equals(areaId,temp.getPosition())).map(CsLinePO::getLineId).collect(Collectors.toList());
|
||||
// collect = csLinePOList.stream().filter(temp->Objects.equals(areaId,temp.getPosition())).map(CsLinePO::getLineId).collect(Collectors.toList());
|
||||
|
||||
List<EleEpdPqd> data = csStatisticalSetFeignClient.queryStatisticalSelect(commonStatisticalQueryParam.getStatisticalId()).getData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user