• 大小: 14.58MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-22
  • 语言: Java
  • 标签: 酒店管理  SQL  JAVA  

资源简介

基于JSP和SQL数据库的酒店管理系统,用于java作品验收,代码风格清新,运行高效,Eclipse,NETBEANs可用

资源截图

代码片段和文件信息

package com.hotelmaster.action;

import java.io.PrintWriter;
import java.sql.Timestamp;
import java.util.Iterator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONArray;
import net.sf.json.JSONobject;

import org.apache.log4j.Logger;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

import com.hotelmaster.po.Operator;
import com.hotelmaster.po.Page;
import com.hotelmaster.po.Room;
import com.hotelmaster.po.RoomCatalog;
import com.hotelmaster.service.BusinessService;

public class BasicSettingController extends MultiActionController {
private final static Logger log = Logger.getLogger(BasicSettingController.class);
private BusinessService businessService;
public String json;
String start = null; 
String limit = null;
public ModelAndView init(HttpServletRequest request
HttpServletResponse response) throws Exception {
// start to write something to the log
log.info(“Someone come from ip address <“
+ request.getRemoteAddr() + “>“);
System.out.println(“reach BasicSettingController“);

//roomInfo=businessService.findRoomDetails(“8108“);

return new ModelAndView(“basicsetting“);
}

public void listAllRooms(HttpServletRequest request
HttpServletResponse response) throws Exception {
JSONArray jsonItems=new JSONArray();
/*if ((String) request.getParameter(“start“).trim() != null) {
start = (String) request.getParameter(“start“).trim();
log.info(start);
} else {
log.info(“start is null“);
return;
}
if ((String) request.getParameter(“limit“).trim() != null) {
limit = (String) request.getParameter(“limit“).trim();
log.info(limit);
} else {
log.info(“limit is null“);
return;
}
Page page = new Page(Integer.parseInt(start) Integer.parseInt(limit));*/
Page page = new Page(0);
List roomList=businessService.findAllRooms(page);
long cout = businessService.queryRoomCount();
Iterator i=roomList.iterator();
Room room=new Room();
while(i.hasNext()){
room=(Room)i.next();
JSONobject json = JSONobject.fromobject(room);
json.put(“isNew“ “0“);
jsonItems.add(json);

}
JSONobject jsonBack=new JSONobject();
jsonBack.put(“rooms“ jsonItems);
jsonBack.put(“totalSize“ cout);
System.out.println(jsonBack);
request.setCharacterEncoding(“utf-8“);   
response.setContentType(“application/json;charset=utf-8“);
PrintWriter out = response.getWriter();
out.print(jsonBack);
}

/**
 * Methohs description goes here.
 * 
 * @parameter 
 * @Date May 21 2008
 *
 */
public void dealRoomUpdateRequest(HttpServletRequest request
HttpServletResponse response) throws Exception {
/*
 * String gtId = null; String gtName = null; gt

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-03-18 21:26  JavaPrj_9\
     文件        2642  2014-03-18 21:27  JavaPrj_9\.classpath
     目录           0  2014-03-18 21:48  JavaPrj_9\.myeclipse\
     文件         300  2014-03-18 21:27  JavaPrj_9\.mymetadata
     文件        1282  2014-03-18 21:37  JavaPrj_9\.project
     目录           0  2014-03-18 21:26  JavaPrj_9\.settings\
     文件         158  2009-12-03 15:58  JavaPrj_9\.settings\org.eclipse.core.resources.prefs
     文件         330  2009-12-02 15:30  JavaPrj_9\.settings\org.eclipse.jdt.core.prefs
     目录           0  2014-03-18 21:26  JavaPrj_9\WebRoot\
     目录           0  2012-08-29 15:19  JavaPrj_9\WebRoot\meta-INF\
     目录           0  2014-03-18 21:48  JavaPrj_9\WebRoot\meta-INF\.svn\
     文件          39  2009-12-02 15:30  JavaPrj_9\WebRoot\meta-INF\MANIFEST.MF
     目录           0  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\
     目录           0  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\
     目录           0  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\
     目录           0  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\
     目录           0  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\
     文件       11708  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\BasicSettingController.class
     文件        2916  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\BusinessCalculationController.class
     文件        7953  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\CheckinController.class
     文件        2969  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\CheckoutController.class
     文件        6537  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\FrontdeskController.class
     文件        9071  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\GuestHistoryController.class
     文件        9481  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\GuestInforController.class
     文件        1399  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\HomeController.class
     文件       10519  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\action\ReservController.class
     目录           0  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\dao\
     文件         455  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\dao\BalancementDao.class
     文件         343  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\dao\baseInfoDao.class
     文件         274  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\dao\CheckinItemDao.class
     文件        1060  2014-03-18 21:27  JavaPrj_9\WebRoot\WEB-INF\classes\com\hotelmaster\dao\CheckinOrderDao.class
............此处省略2276个文件信息

评论

共有 条评论