Commit efd25dfb by java-温文海

修改bug

parent fbd86118
...@@ -18,7 +18,7 @@ public class StatisticalListBean extends GenericBean { ...@@ -18,7 +18,7 @@ public class StatisticalListBean extends GenericBean {
@Min(value = 1, message = "pageSize必须大于等于1") @Min(value = 1, message = "pageSize必须大于等于1")
private int pageSize = GConstants.PAGE_SIZE;//每页条数 private int pageSize = GConstants.PAGE_SIZE;//每页条数
private String benchmarkingTime; private String benchmarkingTime;
private int airlineStatus; private Integer airlineStatus;
public String getDepIata() { public String getDepIata() {
return depIata; return depIata;
...@@ -68,11 +68,11 @@ public class StatisticalListBean extends GenericBean { ...@@ -68,11 +68,11 @@ public class StatisticalListBean extends GenericBean {
this.benchmarkingTime = benchmarkingTime; this.benchmarkingTime = benchmarkingTime;
} }
public int getAirlineStatus() { public Integer getAirlineStatus() {
return airlineStatus; return airlineStatus;
} }
public void setAirlineStatus(int airlineStatus) { public void setAirlineStatus(Integer airlineStatus) {
this.airlineStatus = airlineStatus; this.airlineStatus = airlineStatus;
} }
} }
...@@ -146,23 +146,18 @@ public class StatisticalService extends BaseService<StatisticalDao> { ...@@ -146,23 +146,18 @@ public class StatisticalService extends BaseService<StatisticalDao> {
PageInfo<StatisticalListEntity> pageInfo = null; PageInfo<StatisticalListEntity> pageInfo = null;
List<StatisticalListEntity> lists = null; List<StatisticalListEntity> lists = null;
lists = statisticalDao.getList(statisticalListBean); lists = statisticalDao.getList(statisticalListBean);
if (Objects.nonNull(statisticalListBean.getAirlineStatus())){
//使用迭代器进行筛选
Iterator<StatisticalListEntity> iter = lists.iterator();
while (iter.hasNext()) {
StatisticalListEntity s = iter.next();
//使用迭代器进行筛选
Iterator<StatisticalListEntity> iter = lists.iterator();
while (iter.hasNext()) {
StatisticalListEntity s = iter.next();
if (Objects.nonNull(statisticalListBean.getAirlineStatus())){
//当此对象状态与传入状态不一致时remove对象 //当此对象状态与传入状态不一致时remove对象
if (s.getAirlineStatus() != statisticalListBean.getAirlineStatus()){ if (s.getAirlineStatus() != statisticalListBean.getAirlineStatus()){
lists.remove(s); lists.remove(s);
} }
}
}
for (StatisticalListEntity s:lists) {
}
} }
pageInfo = new PageInfo<StatisticalListEntity>(lists); pageInfo = new PageInfo<StatisticalListEntity>(lists);
page.setPageNo(pageInfo.getPageNum()); page.setPageNo(pageInfo.getPageNum());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment