• 大小: 113KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-12
  • 语言: 其他
  • 标签: 北大青鸟  ssh  

资源简介

北大青鸟ssh航班查询系统ajax异步查询

资源截图

代码片段和文件信息

package com.flight.action;

import java.util.Date;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.flight.biz.FlightBiz;
import com.flight.entity.FlightTickets;
import com.flight.entity.Flights;
import com.opensymphony.xwork2.ActionSupport;

public class FlightAction extends ActionSupport {
private Date flightriqi; //起飞日期
private String cityA; //起飞地
private String cityB; //降落地
private FlightBiz iflightBiz;
private List flightsList;
private FlightTickets flightTickets; //航空公司
private int id;
private String msg;


public FlightTickets getFlightTickets() {
return flightTickets;
}
public void setFlightTickets(FlightTickets flightTickets) {
this.flightTickets = flightTickets;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Date getFlightriqi() {
return flightriqi;
}
public void setFlightriqi(Date flightriqi) {
this.flightriqi = flightriqi;
}
public String getCityA() {
return cityA;
}
public void setCityA(String cityA) {
this.cityA = cityA;
}
public String getCityB() {
return cityB;
}
public void setCityB(String cityB) {
this.cityB = cityB;
}
public FlightBiz getIflightBiz() {
return iflightBiz;
}
public void setIflightBiz(FlightBiz iflightBiz) {
this.iflightBiz = iflightBiz;
}
public List getFlightsList() {
return flightsList;
}
public void setFlightsList(List flightsList) {
this.flightsList = flightsList;
}

@Override
public String execute() throws Exception {
// TODO Auto-generated method stub
System.out.println(flightriqi);
System.out.println(cityA);
System.out.println(cityB);

DetachedCriteria dc = DetachedCriteria.forClass(Flights.class “d“)
.createAlias(“d.airportsByTakeAirportId“ “t“)
.createAlias(“d.airportsByLandingAirportId“ “l“);
if (flightriqi != null) {
dc.add(Restrictions.eq(“d.flightDate“ flightriqi));
}

if (cityA != null) {
dc.add(Restrictions.eq(“t.cityName“ cityA));
}
if (cityB != null) {
dc.add(Restrictions.eq(“l.cityName“ cityB));
}

flightsList = iflightBiz.findAllSearch(dc);
System.out.println(flightsList.size());

if (flightsList.size() > 0) {
return SUCCESS;
}else {
msg = “没有查到相关内容!“;
return INPUT;
}

}

public String findIdInfo(){
try {
System.out.println(id);
flightTickets = iflightBiz.findIdByFlightTicketsInfo(id);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return SUCCESS;
}

public String findflight(){
flightsList = iflightBiz.findAllflight();
return SUCCESS;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        2792  2016-07-20 09:19  filght.sql
     目录           0  2016-11-06 17:43  FlightInformation\
     文件         586  2016-07-21 14:14  FlightInformation\.classpath
     文件        1050  2016-07-21 14:14  FlightInformation\.project
     目录           0  2016-11-06 17:43  FlightInformation\.settings\
     文件         503  2016-07-21 14:14  FlightInformation\.settings\.jsdtscope
     文件         364  2016-07-21 14:14  FlightInformation\.settings\org.eclipse.jdt.core.prefs
     文件         503  2016-07-21 14:14  FlightInformation\.settings\org.eclipse.wst.common.component
     文件         305  2016-07-21 14:14  FlightInformation\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-07-21 14:14  FlightInformation\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-07-21 14:14  FlightInformation\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2016-11-06 17:43  FlightInformation\WebContent\
     目录           0  2016-11-06 17:43  FlightInformation\WebContent\meta-INF\
     文件          39  2016-07-21 14:14  FlightInformation\WebContent\meta-INF\MANIFEST.MF
     目录           0  2016-11-06 17:43  FlightInformation\WebContent\WEB-INF\
     目录           0  2016-11-06 17:46  FlightInformation\WebContent\WEB-INF\lib\
     文件        1750  2016-07-21 14:50  FlightInformation\WebContent\WEB-INF\web.xml
     文件         599  2016-07-21 18:56  FlightInformation\WebContent\ajax.jsp
     文件        3121  2016-07-21 18:58  FlightInformation\WebContent\index.jsp
     目录           0  2016-11-06 17:43  FlightInformation\WebContent\js\
     文件      275529  2016-07-21 14:14  FlightInformation\WebContent\js\jquery-1.8.3.js
     目录           0  2016-11-06 17:43  FlightInformation\build\
     目录           0  2016-11-06 17:43  FlightInformation\build\classes\
     文件        2548  2016-07-21 14:29  FlightInformation\build\classes\beans.xml
     目录           0  2016-11-06 17:43  FlightInformation\build\classes\com\
     目录           0  2016-11-06 17:43  FlightInformation\build\classes\com\flight\
     目录           0  2016-11-06 17:43  FlightInformation\build\classes\com\flight\action\
     文件        4325  2016-09-22 11:05  FlightInformation\build\classes\com\flight\action\FlightAction.class
     目录           0  2016-11-06 17:43  FlightInformation\build\classes\com\flight\biz\
     文件         556  2016-09-22 11:05  FlightInformation\build\classes\com\flight\biz\FlightBiz.class
     目录           0  2016-11-06 17:43  FlightInformation\build\classes\com\flight\biz\impl\
............此处省略43个文件信息

评论

共有 条评论