Commit 1302072a by java-李谡

申请单管理列表根据更新时间排序

parent 31a0426a
...@@ -176,14 +176,8 @@ ...@@ -176,14 +176,8 @@
favt.arr_iata_name AS arrIataName, favt.arr_iata_name AS arrIataName,
favt.dep_iata AS depIata, favt.dep_iata AS depIata,
favt.dep_iata_name AS depIataName, favt.dep_iata_name AS depIataName,
favt.depart_id AS departId,
favt.roundtrip_type AS roundtripType,
favt.verif_id AS verifId,
favt.verif_no AS verifNo,
favt.last_airline_time AS lastAirlineTime, favt.last_airline_time AS lastAirlineTime,
CASE CASE
WHEN WHEN
DATE_SUB( #{benchmarkingTime}, INTERVAL 180 DAY ) <![CDATA[<=]]> favt.last_airline_time DATE_SUB( #{benchmarkingTime}, INTERVAL 180 DAY ) <![CDATA[<=]]> favt.last_airline_time
AND AND
...@@ -196,14 +190,14 @@ ...@@ -196,14 +190,14 @@
favt.airline_json AS airlineJson, favt.airline_json AS airlineJson,
favt.update_date as updateTime favt.update_date as updateTime
FROM FROM
foc_airline_verify_test favt foc_airline_sta favt
WHERE WHERE
favt.del_flag = #{DEL_FLAG_NORMAL} favt.del_flag = #{DEL_FLAG_NORMAL}
<if test="depIata != null and depIata != ''"> <if test="depIata != null and depIata != ''">
and favt.dep_iata = #{depIata} and (favt.dep_iata = #{depIata} or favt.arr_iata= #{depIata})
</if> </if>
<if test="arrIata != null and arrIata != ''"> <if test="arrIata != null and arrIata != ''">
and favt.arr_iata = #{arrIata} and (favt.arr_iata = #{arrIata} or favt.arr_iata = #{depIata})
</if> </if>
</select> </select>
......
...@@ -79,11 +79,6 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo ...@@ -79,11 +79,6 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo
} }
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(Util.phoneReg("18501501226")); System.out.println(DES3Utils.decrypt("f5c9d35c1df1eb31c0f15d23ee5af33d15ee14d1133b16ae580893ec603fc77c0057d3cccb34407d0505fc99a849cd7ee060d2c605d68b21ea7fea2a325dd4026e7f13e65e216d967bc7696f608fe56ef11ae4801b727c51d09bc4beb44b24f0", CONF_DESC_KEY));
System.out.println(Util.phoneReg("018501501226".replaceAll("^0+", "")));
System.out.println(Util.phoneReg("0018501501226".replaceAll("^0+", "")));
System.out.println(Util.phoneReg("51018501501226".replaceAll("^0+", "")));
System.out.println(Util.phoneReg("8618501501226".replaceAll("^0+", "")));
System.out.println(Util.phoneReg("+8618501501226".replaceAll("^0+", "")));
} }
} }
...@@ -3,19 +3,6 @@ ...@@ -3,19 +3,6 @@
*/ */
package com.ejweb.modules.airport.api; package com.ejweb.modules.airport.api;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ejweb.modules.airport.bean.StatisticalListBean;
import com.ejweb.modules.airport.entity.StatisticalListEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ejweb.core.api.RequestBean; import com.ejweb.core.api.RequestBean;
import com.ejweb.core.api.ResponseBean; import com.ejweb.core.api.ResponseBean;
import com.ejweb.core.base.PageEntity; import com.ejweb.core.base.PageEntity;
...@@ -23,36 +10,48 @@ import com.ejweb.core.conf.ErrorCode; ...@@ -23,36 +10,48 @@ import com.ejweb.core.conf.ErrorCode;
import com.ejweb.core.conf.GConstants; import com.ejweb.core.conf.GConstants;
import com.ejweb.core.utils.excel.ExportExcel; import com.ejweb.core.utils.excel.ExportExcel;
import com.ejweb.modules.airport.bean.StatisticalBean; import com.ejweb.modules.airport.bean.StatisticalBean;
import com.ejweb.modules.airport.bean.StatisticalListBean;
import com.ejweb.modules.airport.entity.StatisticalEntity; import com.ejweb.modules.airport.entity.StatisticalEntity;
import com.ejweb.modules.airport.entity.StatisticalListEntity;
import com.ejweb.modules.airport.service.StatisticalService; import com.ejweb.modules.airport.service.StatisticalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/** /**
* 数据统计 * 数据统计
* @team suzhou *
* @author huhy * @author huhy
* @version 1.0 * @version 1.0
* @team suzhou
* @time 2016年9月7日 * @time 2016年9月7日
*/ */
@Controller @Controller
@RequestMapping(value = "/api/airline/statistical") @RequestMapping(value = "/api/airline/statistical")
public class StatisticalController{ public class StatisticalController {
@Autowired @Autowired
private StatisticalService statisticalService; private StatisticalService statisticalService;
@ResponseBody @ResponseBody
@RequestMapping(value = "/list") @RequestMapping(value = "/list")
public ResponseBean getStatisticalList(RequestBean requestBean){ public ResponseBean getStatisticalList(RequestBean requestBean) {
ResponseBean responseBean = new ResponseBean(); ResponseBean responseBean = new ResponseBean();
StatisticalBean bean = requestBean.getObjectBean(StatisticalBean.class); StatisticalBean bean = requestBean.getObjectBean(StatisticalBean.class);
String sort=bean.getSort(); String sort = bean.getSort();
if(sort!=null && !"".equals(sort)){ if (sort != null && !"".equals(sort)) {
if(",".equals(sort.substring(0, 1))){ if (",".equals(sort.substring(0, 1))) {
sort=sort.substring(1,sort.length()); sort = sort.substring(1, sort.length());
} }
} }
String message = statisticalService.validate(bean); String message = statisticalService.validate(bean);
if(message == null){ if (message == null) {
// 参数校验为通过 // 参数校验为通过
PageEntity<StatisticalEntity> list = statisticalService.getStatisticalList(bean); PageEntity<StatisticalEntity> list = statisticalService.getStatisticalList(bean);
// 查询结果为空 // 查询结果为空
...@@ -72,23 +71,24 @@ public class StatisticalController{ ...@@ -72,23 +71,24 @@ public class StatisticalController{
} }
@RequestMapping(value = "export") @RequestMapping(value = "export")
public ResponseBean exportExcel(RequestBean requestBean,HttpServletResponse response){ public ResponseBean exportExcel(RequestBean requestBean, HttpServletResponse response) {
ResponseBean responseBean = new ResponseBean(); ResponseBean responseBean = new ResponseBean();
StatisticalBean bean = requestBean.getObjectBean(StatisticalBean.class); StatisticalBean bean = requestBean.getObjectBean(StatisticalBean.class);
String message = statisticalService.validate(bean); String message = statisticalService.validate(bean);
if(message == null){ if (message == null) {
bean.setPageSize(1000); bean.setPageSize(1000);
// 参数校验为通过 // 参数校验为通过
PageEntity<StatisticalEntity> page = statisticalService.getStatisticalList(bean); PageEntity<StatisticalEntity> page = statisticalService.getStatisticalList(bean);
List<StatisticalEntity> list=new ArrayList<StatisticalEntity>(); List<StatisticalEntity> list = new ArrayList<StatisticalEntity>();
if(page != null){// 查询结果为空 // 查询结果为空
list=page.getList(); if (page != null) {
list = page.getList();
} }
String fileName = "航线论证数据统计.xlsx"; String fileName = "航线论证数据统计.xlsx";
try { try {
new ExportExcel("航线论证数据统计", StatisticalEntity.class).setDataList(list).write(response, fileName).dispose(); new ExportExcel("航线论证数据统计", StatisticalEntity.class).setDataList(list).write(response, fileName).dispose();
} catch (IOException e) { } catch (IOException e) {
responseBean.setMessage("导出数据失败"+e.getMessage()); responseBean.setMessage("导出数据失败" + e.getMessage());
return responseBean; return responseBean;
} }
return null; return null;
...@@ -100,11 +100,11 @@ public class StatisticalController{ ...@@ -100,11 +100,11 @@ public class StatisticalController{
@ResponseBody @ResponseBody
@RequestMapping(value = "/getList") @RequestMapping(value = "/getList")
public ResponseBean getList(RequestBean requestBean){ public ResponseBean getList(RequestBean requestBean) {
ResponseBean responseBean = new ResponseBean(); ResponseBean responseBean = new ResponseBean();
StatisticalListBean bean = requestBean.getObjectBean(StatisticalListBean.class); StatisticalListBean bean = requestBean.getObjectBean(StatisticalListBean.class);
String message = statisticalService.validate(bean); String message = statisticalService.validate(bean);
if(message == null){ if (message == null) {
bean.setPageSize(1000); bean.setPageSize(1000);
// 参数校验为通过 // 参数校验为通过
PageEntity<StatisticalListEntity> list = statisticalService.getList(bean); PageEntity<StatisticalListEntity> list = statisticalService.getList(bean);
...@@ -125,23 +125,23 @@ public class StatisticalController{ ...@@ -125,23 +125,23 @@ public class StatisticalController{
} }
@RequestMapping(value = "newExport") @RequestMapping(value = "newExport")
public ResponseBean newExport(RequestBean requestBean,HttpServletResponse response){ public ResponseBean newExport(RequestBean requestBean, HttpServletResponse response) {
ResponseBean responseBean = new ResponseBean(); ResponseBean responseBean = new ResponseBean();
StatisticalListBean bean = requestBean.getObjectBean(StatisticalListBean.class); StatisticalListBean bean = requestBean.getObjectBean(StatisticalListBean.class);
String message = statisticalService.validate(bean); String message = statisticalService.validate(bean);
if(message == null){ if (message == null) {
bean.setPageSize(1000); bean.setPageSize(1000);
// 参数校验为通过 // 参数校验为通过
PageEntity<StatisticalListEntity> page = statisticalService.getList(bean); PageEntity<StatisticalListEntity> page = statisticalService.getList(bean);
List<StatisticalListEntity> list=new ArrayList<StatisticalListEntity>(); List<StatisticalListEntity> list = new ArrayList<StatisticalListEntity>();
if(page != null){// 查询结果为空 if (page != null) {// 查询结果为空
list=page.getList(); list = page.getList();
String fileName = "航线论证数据统计.xlsx"; String fileName = "航线论证数据统计.xlsx";
try { try {
new ExportExcel("航线论证数据统计", StatisticalEntity.class).setDataList(list).write(response, fileName).dispose(); new ExportExcel("航线论证数据统计", StatisticalEntity.class).setDataList(list).write(response, fileName).dispose();
} catch (IOException e) { } catch (IOException e) {
responseBean.setMessage("导出数据失败"+e.getMessage()); responseBean.setMessage("导出数据失败" + e.getMessage());
return responseBean; return responseBean;
} }
return null; return null;
......
...@@ -11,10 +11,6 @@ public class StatisticalListEntity extends BaseEntity { ...@@ -11,10 +11,6 @@ public class StatisticalListEntity extends BaseEntity {
private String arrIataName; private String arrIataName;
private String depIata; private String depIata;
private String depIataName; private String depIataName;
private String departId;
private String roundtripType;
private String verifId; // 拟用机型
private String verifNo ;
private String lastAirlineTime; private String lastAirlineTime;
private String updateTime; private String updateTime;
private int airlineStatus; private int airlineStatus;
...@@ -52,38 +48,6 @@ public class StatisticalListEntity extends BaseEntity { ...@@ -52,38 +48,6 @@ public class StatisticalListEntity extends BaseEntity {
this.depIataName = depIataName; this.depIataName = depIataName;
} }
public String getDepartId() {
return departId;
}
public void setDepartId(String departId) {
this.departId = departId;
}
public String getRoundtripType() {
return roundtripType;
}
public void setRoundtripType(String roundtripType) {
this.roundtripType = roundtripType;
}
public String getVerifId() {
return verifId;
}
public void setVerifId(String verifId) {
this.verifId = verifId;
}
public String getVerifNo() {
return verifNo;
}
public void setVerifNo(String verifNo) {
this.verifNo = verifNo;
}
public String getLastAirlineTime() { public String getLastAirlineTime() {
return lastAirlineTime; return lastAirlineTime;
} }
......
...@@ -150,12 +150,10 @@ public class StatisticalService extends BaseService<StatisticalDao> { ...@@ -150,12 +150,10 @@ public class StatisticalService extends BaseService<StatisticalDao> {
//使用迭代器进行筛选 //使用迭代器进行筛选
Iterator<StatisticalListEntity> iter = lists.iterator(); Iterator<StatisticalListEntity> iter = lists.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
//当此对象状态与传入状态不一致时remove对象 //当此对象状态与传入状态不一致时remove对象
if (iter.next().getAirlineStatus() != statisticalListBean.getAirlineStatus()){ if (iter.next().getAirlineStatus() != statisticalListBean.getAirlineStatus()){
iter.remove(); iter.remove();
} }
} }
} }
pageInfo = new PageInfo<StatisticalListEntity>(lists); pageInfo = new PageInfo<StatisticalListEntity>(lists);
......
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