Commit f66b64b0 by luoh

航线执行期监控筛选

parent 687b368e
......@@ -226,4 +226,11 @@
dep_stn,
arr_stn;
</select>
<select id="getCheckList" resultType="com.ejweb.modules.airport.bean.StatiscalCheckBean">
SELECT
*
FROM
foc_check_iata
</select>
</mapper>
\ No newline at end of file
package com.ejweb.modules.airport.bean;
import com.ejweb.core.base.GenericBean;
import com.ejweb.core.conf.GConstants;
import javax.validation.constraints.Min;
/**
* 油量分析
*
* @author luoh
* @version 1.0
* @team suzhou
* @time 2020年12月10日
*/
public class StatiscalCheckBean extends GenericBean {
//三字码
private String iata;
//名称
private String name;
public String getIata() {
return iata;
}
public void setIata(String iata) {
this.iata = iata;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
......@@ -4,6 +4,7 @@
package com.ejweb.modules.airport.dao;
import com.ejweb.core.base.BaseDao;
import com.ejweb.modules.airport.bean.StatiscalCheckBean;
import com.ejweb.modules.airport.bean.StatisticalBean;
import com.ejweb.modules.airport.bean.StatisticalListBean;
import com.ejweb.modules.airport.entity.AirportInfoEntity;
......@@ -30,4 +31,11 @@ public interface StatisticalDao extends BaseDao {
List<StatisticalListEntity> getList(@Param("bean") StatisticalListBean statisticalListBean,@Param("list") List<AirportInfoEntity> airportInfoEntities);
List<AirportInfoEntity> getAirporStnList(@Param("beginTime") String beginTime, @Param("endTime") String endTime);
/**
* 筛选不需要展示的航班动态
* @return luoh
*/
List<StatiscalCheckBean> getCheckList ();
}
......@@ -5,6 +5,7 @@ package com.ejweb.modules.airport.service;
import com.ejweb.core.base.BaseService;
import com.ejweb.core.base.PageEntity;
import com.ejweb.modules.airport.bean.StatiscalCheckBean;
import com.ejweb.modules.airport.bean.StatisticalBean;
import com.ejweb.modules.airport.bean.StatisticalListBean;
import com.ejweb.modules.airport.dao.StatisticalDao;
......@@ -17,16 +18,15 @@ import com.ejweb.modules.verify.dao.AirlineVerifyDao;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import net.sf.jasperreports.engine.design.events.CollectionListenerAdapter;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.*;
/**
* @author huhy
......@@ -151,9 +151,12 @@ public class StatisticalService extends BaseService<StatisticalDao> {
if (!(statisticalListBean.getBeginTime().equals(' ') && statisticalListBean.getEndTime().equals(" "))) {
airportInfoEntities = statisticalDao.getAirporStnList(statisticalListBean.getBeginTime(), statisticalListBean.getEndTime());
}
List<StatiscalCheckBean> checkList = statisticalDao.getCheckList();
List<StatisticalListEntity> lists = null;
lists = statisticalDao.getList(statisticalListBean, airportInfoEntities);
if (Objects.nonNull(statisticalListBean.getAirlineStatus())) {
//使用迭代器进行筛选
Iterator<StatisticalListEntity> iter = lists.iterator();
......@@ -164,6 +167,19 @@ public class StatisticalService extends BaseService<StatisticalDao> {
}
}
}
//筛选foc_check_iata中 不需要的航班 add by luoh
Iterator<StatisticalListEntity> iterCheck = lists.iterator();
while (iterCheck.hasNext()) {
StatisticalListEntity entity = iterCheck.next();
String iataStr = entity.getDepIata() + "-" + entity.getArrIata();
for (StatiscalCheckBean check:checkList) {
if (iataStr.equals(check.getIata())){
iterCheck.remove();
break;
}
}
}
//创建Page类
Page page = new Page(statisticalListBean.getPageNo(), statisticalListBean.getPageSize());
//为Page类中的total属性赋值
......
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