資源簡介
使用Oracle,Myeclipse數據表大概為35張左右,實現酒店的工作流程。里面附當時的需求文檔,數據庫轉存文件。
代碼片段和文件信息
package?com.controller;
import?java.io.IOException;
import?java.text.SimpleDateFormat;
import?java.util.ArrayList;
import?java.util.Date;
import?java.util.HashMap;
import?java.util.List;
import?java.util.Map;
import?javax.annotation.Resource;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;
import?org.codehaus.jackson.JsonGenerationException;
import?org.codehaus.jackson.map.JsonMappingException;
import?org.codehaus.jackson.map.objectMapper;
import?org.springframework.stereotype.Controller;
import?org.springframework.ui.Model;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.bind.annotation.RequestParam;
import?org.springframework.web.bind.annotation.ResponseBody;
import?com.entity.Bad;
import?com.entity.BreakDetai;
import?com.entity.CustomerBreak;
import?com.entity.DepotProduct;
import?com.entity.LiveInfo;
import?com.entity.Spend;
import?com.service.ProductSalService;
@Controller
public?class?BreakDown?{//損壞?高輝
@Resource
private?ProductSalService?service;
public?ProductSalService?getService()?{
return?service;
}
public?void?setService(ProductSalService?service)?{
this.service?=?service;
}
@RequestMapping(“/Break“)//先創建損壞的單號
public?String?Selectt(Model?modelHttpServletRequest?request){
SimpleDateFormat?df=new?SimpleDateFormat(“yyyyMMddHHmmss“);
String?Spend=“Break“+df.format(new?Date());
model.addAttribute(“Spned“Spend);
//先假想一個損壞房間
String?liviid=request.getParameter(“roomId“);
String?name=null;//保存損壞人姓名
Listlist=service.SelectLiveInfo(liviid);
for?(LiveInfo?liveInfo?:?list)?{
name=liveInfo.getCustomerName();
}
model.addAttribute(“name“name);
model.addAttribute(“liveid“liviid);
return?“BreakDown“;
}
@RequestMapping(“/InsertBreak“)//先錄入總表
public?String?InsertSpend(Model?modelHttpServletRequest?request){
String?Spnedid=request.getParameter(“Spnedid“);//單號
String?liveid=request.getParameter(“liveid“);//房間號
String?mark=request.getParameter(“mark“);//備注
int?userId=Integer.parseInt(request.getParameter(“userId“));//操作人
String?[]?productId=request.getParameterValues(“productId“);//獲取所有損壞物品
String?[]?sum=request.getParameterValues(“productName“);//所有價格
service.zonr2(Spnedid?liveid?mark?userId?productId?sum);
return?“SerchBreak“;
}
@RequestMapping(“/SerchBreak“)
@ResponseBody//所有的損壞記錄查詢
public?String?SerchBreak(HttpServletRequest?request@RequestParam?int?page@RequestParam?int?rows)throws?JsonGenerationException?JsonMappingException?IOException{
Mapject>?map=new?HashMapject>();
int?pageNumber=page==0?1:page;
int?pageSize=rows;
int?a=(pageNumber-1)*pageSize;
int?b=pageSize*pageNumber;
map.put(“a“a);
????map.put(“b“b);
String?spendId=request.getParameter(“spendId“);
String?liveId=request.getParameter(“liveId“);
String?spendName=request.getParameter(
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-12-29?15:26??項目終篇\
?????文件???????25571??2017-06-09?17:39??項目終篇\6-9.sql
?????目錄???????????0??2017-12-29?15:24??項目終篇\TongFuHotelMS\
?????文件????????3350??2017-06-09?17:31??項目終篇\TongFuHotelMS\.classpath
?????文件?????????312??2017-06-09?17:31??項目終篇\TongFuHotelMS\.myme
?????文件????????1286??2017-05-10?15:51??項目終篇\TongFuHotelMS\.project
?????目錄???????????0??2017-12-29?15:24??項目終篇\TongFuHotelMS\.settings\
?????目錄???????????0??2017-12-29?15:24??項目終篇\TongFuHotelMS\.settings\.svn\
?????文件?????????242??2017-05-10?15:51??項目終篇\TongFuHotelMS\.settings\.svn\all-wcprops
?????文件?????????347??2017-05-10?15:54??項目終篇\TongFuHotelMS\.settings\.svn\entries
?????目錄???????????0??2017-12-29?15:26??項目終篇\TongFuHotelMS\.settings\.svn\prop-ba
?????目錄???????????0??2017-12-29?15:26??項目終篇\TongFuHotelMS\.settings\.svn\props\
?????目錄???????????0??2017-12-29?15:24??項目終篇\TongFuHotelMS\.settings\.svn\text-ba
?????文件?????????330??2017-05-10?15:51??項目終篇\TongFuHotelMS\.settings\.svn\text-ba
?????目錄???????????0??2017-12-29?15:24??項目終篇\TongFuHotelMS\.settings\.svn\tmp\
?????目錄???????????0??2017-12-29?15:26??項目終篇\TongFuHotelMS\.settings\.svn\tmp\prop-ba
?????目錄???????????0??2017-12-29?15:26??項目終篇\TongFuHotelMS\.settings\.svn\tmp\props\
?????目錄???????????0??2017-12-29?15:26??項目終篇\TongFuHotelMS\.settings\.svn\tmp\text-ba
?????文件?????????105??2017-06-01?20:27??項目終篇\TongFuHotelMS\.settings\com.genuitec.eclipse.core.prefs
?????文件?????????330??2017-05-10?15:51??項目終篇\TongFuHotelMS\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2017-12-29?15:24??項目終篇\TongFuHotelMS\.svn\
?????文件?????????401??2017-05-10?15:54??項目終篇\TongFuHotelMS\.svn\all-wcprops
?????文件?????????645??2017-05-10?15:54??項目終篇\TongFuHotelMS\.svn\entries
?????目錄???????????0??2017-12-29?15:26??項目終篇\TongFuHotelMS\.svn\prop-ba
?????目錄???????????0??2017-12-29?15:26??項目終篇\TongFuHotelMS\.svn\props\
?????目錄???????????0??2017-12-29?15:24??項目終篇\TongFuHotelMS\.svn\text-ba
?????文件????????3350??2017-05-10?15:51??項目終篇\TongFuHotelMS\.svn\text-ba
?????文件?????????312??2017-05-10?15:51??項目終篇\TongFuHotelMS\.svn\text-ba
?????文件????????1286??2017-05-10?15:51??項目終篇\TongFuHotelMS\.svn\text-ba
?????目錄???????????0??2017-12-29?15:24??項目終篇\TongFuHotelMS\.svn\tmp\
?????目錄???????????0??2017-12-29?15:26??項目終篇\TongFuHotelMS\.svn\tmp\prop-ba
............此處省略3473個文件信息
評論
共有 條評論