package cn.jmu.controller;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Scanner;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import cn.jmu.po.ExFlight;
import cn.jmu.po.ExFlightProduct;
import cn.jmu.po.Flight;
import cn.jmu.service.ExFlightService;
@Controller
public class ExFlightController {
@Resource(name="exFlightServiceImpl")
private ExFlightService exFlightService;
@RequestMapping(value="/manageFlight/allExFlight.do")
public String manage_getAllExFlight(HttpSession session,HttpServletRequest request, HttpServletResponse response) throws Exception {
List<ExFlight> allExFlight = null;
allExFlight = exFlightService.getAllExFlight();
request.setAttribute("allExFlight", allExFlight);
if(session.getAttribute("allExFlight")!=null) {
session.removeAttribute("allExFlight");
}
return "manageFlight/manageExFlight";
}
@RequestMapping(value="/manageFlight/exFlight.do")
public String manage_getExFlightByFlightIDAndexFlightDate(HttpServletRequest request, HttpServletResponse response) throws Exception {
ExFlight exFlight = null;
String flightID = request.getParameter("flightID");
String exFlightDate = request.getParameter("exFlightDate");
exFlight = exFlightService.getExFlightAndFlightStateAndFlightByDateaAndFlightID(flightID, exFlightDate);
if(exFlight==null) {
request.setAttribute("flag", "no");
return "manageFlight/manageExFlight";
}
request.setAttribute("exFlight", exFlight);
return "manageFlight/manageExFlightUpdate";
}
@RequestMapping(value="/manageFlight/exFlightUpdate.do")
public String manage_updateExFlight(HttpSession session,HttpServletRequest request, HttpServletResponse response) throws Exception {
SimpleDateFormat format = new SimpleDateFormat("yy-MM-dd");
ExFlight exFlight = null;
String flightID = request.getParameter("flightID");
Date exFlightDate = new java.sql.Date(format.parse(request.getParameter("exFlightDate")).getTime());
int flightStateID = Integer.parseInt(request.getParameter("flightStateID"));
int foodTypeID = Integer.parseInt(request.getParameter("foodTypeID"));
String totalTime = request.getParameter("totalTime");
format = new SimpleDateFormat("HH:mm:ss");
Time departTime = new java.sql.Time(format.parse(request.getParameter("departTime")).getTime());
Time arriveTime = new java.sql.Time(format.parse(request.getParameter("arriveTime")).getTime());
boolean onRevise = Boolean.parseBoolean(request.getParameter("onRevise"));
boolean onRefund = Boolean.parseBoolean(request.getParameter("onRefund"));
exFlight = new ExFlight( flightID, exFlightDate,flightStateID,foodTypeID,totalTime, departTime,arriveTime,onRevise,onRefund);
this.exFlightService.updateExFlight(exFlight);
request.setAttribute("update", "ok");
if(session.getAttribute("allExFlight")!=null) {
session.removeAttribute("allExFlight");
}
return "manageFlight/manageExFlight";
}
@RequestMapping(value="index_allExFlight3.do")
public String index_getAllExFlightByFlightIDAndDate(HttpServletRequest request, HttpServletResponse response) throws Exception {
String exFlightDate = request.getParameter("exFlightDate");
String flightID = request.getParameter("flightID");
ExFlight ExFlight = null;
ExFlight = exFlightService.getExFlightAndFlightStateAndFlightByDateaAndFlightID(flightID, exFlightDate);
request.setAttribute("ExFlight", ExFlight);
request.setAttribute("exFlightDate", exFlightDate);
return "index_QueryFlightState2";
}
@RequestMapping(value="index_allExFlight2.do")
public String index_getAllExFlightByCityAndDate(HttpSession session,HttpServletRequest request, HttpServletResponse response) throws Exception {
String exFlightDate = request.getParameter("exFlightDate");
String departCity = request.getParameter("departCity");
String arriveCity = request.getParameter("arriveCity");
List<ExFlight> allExFlight = null;
allExFlight = exFlightService.getAllExFlightAndFligtStateAndFlightByCityAndDate(exFlightDate, departCity, arriveCity);
request.setAttribute("allExFlight", allExFlight);
request.setAttribute("exFlightDate", exFlightDate);
request.setAttribute("departCity", departCity);
request.setAttribute("arriveCity", arriveCity);
if(session.getAttribute("allExFlight")!=null) {
session.removeAttribute("allExFlight");
}
return "index_QueryFlightState";
}
@RequestMapping(value="index_allExFlight.do")
public String index_getAllExFlightAndExFlightProductByCityAndDate(HttpSession session,HttpServletRequest request, HttpServletResponse response) throws Exception {
String exFlightDate = request.getParameter("exFlightDate");
String departCity = request.getParameter("departCity");
String arriveCity = request.getParameter("arriveCity");
List<ExFlight> allExFlightAndProduct = null;
allExFlightAndProduct = exFlightService.getAllExFlightAndFlightProductByCityAndDate(exFlightDate, departCity, arriveCity);
request.setAttribute("allExFlightAndProduct", allExFlightAndProduct);
request.setAttribute("exFlightDate", exFlightDate);
request.setAttribute("departCity", departCity);
request.setAttribute("arriveCity", arriveCity);
if(session.getAttribute("allExFlightAndProduct")!=null) {
session.removeAttribute("allExFlightAndProduct");
}
return "index_QueryFlightOrder";
}
@RequestMapping(value="user/allExFlight.do")
public String user_getAllExFlightAndExFlightProductByCityAndDate(HttpSession session,HttpServletRequest request, HttpServletResponse response) throws Exception {
String exFlightDate = request.getParameter("exFlightDate");
String departCity = request.getParameter("departCity");
String arriveCity = request.getParameter("arriveCity");
List<ExFlight> allExFlightAndProduct = null;
allExFlightAndProduct = exFlightService.getAllExFlightAndFlightProductByCityAndDate(exFlightDate, departCity, arriveCity);
if(session.getAttribute("allExFlightAndProduct")!=null) {
session.removeAttribute("allExFlightAndProduct");
}
if(session.getAttribute("passengerList")!=null) {
session.removeAttribute("passengerList");
}
request.setAttribute("allExFlightAndProduct", allExFlightAndProduct);
request.setAttribute("exFlightDate", exFlightDate);
request.setAttribute("departCity", departCity);
request.setAttribute("arriveCity", arriveCity);
return "user/user_QueryFlightOrder";
}
@RequestMapping(value="user/allExFlight2.do")
public String user_getAllExFlightByCityAndDate(HttpSession session,HttpServletRequest request, HttpServletResponse response) throws Exception {
String exFlightDate = request.getParameter("exFlightDate");
String departCity = request.getParameter("departCity");
String arriveCity = request.getParameter("arriveCity");
List<ExFlight> allExFlight = null;
allExFlight = exFlightService.getAllExFlightAndFligtStateAndFlightByCityAndDate(exFlightDate, departCity, arriveCity);
request.setAttribute("allExFlight", allExFlight);
request.setAttribute("exFlightDate", exFlightDate);
request.setAttribute("departCity", departCity);
request.setAttribute("arriveCity", arriveCity);
if(session.getAttribute("allExFlight")!=null) {
session.removeAttribute("allExFlight");
}
return "user/user_QueryFlightState";
}
@RequestMapping(value="user/allExFlight3.do")
public String user_getAllExFlightByFlightIDAndDate(HttpServletRequest request, HttpServletResponse response) throws Exception {
String exFlightDate = request.getParameter("exFlightDate");
String flightID = request.getParameter("flightID");
ExFlight ExFlight = null;
ExFlight = exFlightService.getExFlightAndFlightStateAndFlightByDateaAndFlightID(flightID, exFlightDate);
request.setAttribut
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于SSM开发的航空订票管理系统(前台订票+后台票务管理)-优秀毕设.zip 【资源说明】 更改config/db.properties下的数据库连接,确保连接本地数据库 创建数据库,数据铺底,sql文件在db目录下 在eclipse或idea中打开项目,配置tomcat 启动tomcat,访问主页http://localhost:8080/proj/index.jsp 登录密码,数据铺底文件有写account:13515070051 password:123456 项目部分页面预览在资源内
资源推荐
资源详情
资源评论
收起资源包目录
基于SSM开发的航空订票管理系统(前台订票+后台票务管理)-优秀毕设.zip (262个子文件)
ExFlightController.class 7KB
TicketController.class 6KB
FlightController.class 5KB
Ticket.class 4KB
ExFlightProductController.class 4KB
ExFlight.class 4KB
RegisterController.class 3KB
User.class 3KB
RuleListController.class 3KB
ExFlightProduct.class 3KB
LoginController.class 3KB
UserController.class 3KB
Flight.class 2KB
ExFlightServiceImpl.class 2KB
ExFlightProductServiceImpl.class 2KB
Statement.class 2KB
FlightAndFlightProduct.class 2KB
Passenger.class 2KB
ExitController.class 2KB
SSMTest.class 2KB
MonthReportController.class 2KB
RuleList.class 2KB
Account.class 1KB
UserServiceImpl.class 1KB
AccountServiceImpl.class 1KB
FlightServiceImpl.class 1KB
ExFlightMapper.class 1KB
ExFlightProductMapper.class 1KB
OrderList.class 1KB
FlightProductServiceImpl.class 1KB
TicketServiceImpl.class 1KB
ExFlightService.class 1006B
OrderListServiceImpl.class 986B
ExFlightProductService.class 960B
FlightProduct.class 937B
FlightState.class 928B
RuleListServiceImpl.class 924B
StatementServiceImpl.class 906B
Member.class 874B
FlightProductMapper.class 566B
UserMapper.class 515B
AccountService.class 451B
AccountMapper.class 448B
FlightService.class 437B
FlightMapper.class 434B
StatementMapper.class 428B
FlightProductService.class 426B
UserService.class 386B
TicketService.class 373B
TicketMapper.class 370B
OrderListService.class 283B
OrderListMapper.class 280B
StatementService.class 280B
RuleListService.class 274B
RuleListMapper.class 271B
.classpath 3KB
org.eclipse.wst.common.component 539B
org.eclipse.wst.jsdt.ui.superType.container 49B
bootstrap.css 115KB
font-awesome.css 21KB
bootstrap-theme.min.css 19KB
select2.min.css 15KB
custom-styles.css 12KB
laydate.css 8KB
checkbox3.min.css 7KB
user.css 2KB
index.css 2KB
cityselector.css 2KB
manage.css 2KB
myAccount.css 1KB
rules.css 1KB
queryResult1_1.css 1KB
queryResult1.css 1KB
myOrder.css 1KB
login.css 1KB
booking.css 1KB
addUser.css 999B
common.css 682B
morris-0.4.3.min.css 442B
addNew.css 130B
fontawesome-webfontd41d.eot 37KB
fontawesome-webfontba72.eot 37KB
glyphicons-halflings-regular.eot 20KB
glyphicons-halflings-regulard41d.eot 20KB
iconfont.eot 2KB
ant-1.9.6.jar 1.94MB
aspectjweaver-1.8.10.jar 1.84MB
mybatis-3.4.5.jar 1.55MB
jfreechart-1.0.19.jar 1.5MB
spring-context-4.3.6.RELEASE.jar 1.08MB
spring-core-4.3.6.RELEASE.jar 1.07MB
spring-webmvc-4.3.6.RELEASE.jar 893KB
log4j-core-2.3.jar 808KB
spring-web-4.3.6.RELEASE.jar 798KB
spring-beans-4.3.6.RELEASE.jar 745KB
javassist-3.22.0-CR2.jar 721KB
mysql.jar 528KB
log4j-1.2.17.jar 478KB
spring-jdbc-4.3.6.RELEASE.jar 417KB
jstl-1.2.jar 405KB
共 262 条
- 1
- 2
- 3
资源评论
z同学的编程之路
- 粉丝: 1865
- 资源: 2130
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- #P0015. 全排列 超级简单
- pta题库答案c语言之排序4统计工龄.zip
- pta题库答案c语言之树结构7堆中的路径.zip
- pta题库答案c语言之树结构3TreeTraversalsAgain.zip
- pta题库答案c语言之树结构2ListLeaves.zip
- pta题库答案c语言之树结构1树的同构.zip
- 基于C++实现民航飞行与地图简易管理系统可执行程序+说明+详细注释.zip
- pta题库答案c语言之复杂度1最大子列和问题.zip
- 三维装箱问题(Three-Dimensional Bin Packing Problem,3D-BPP)是一个经典的组合优化问题
- 以下是一些关于Linux线程同步的基本概念和方法.txt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功