资源简介
Javaweb课程设计,也可以作为毕业设计的点餐系统(前后端+sql文件+图片介绍)
代码片段和文件信息
package cn.dinner.action;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.List;
import org.apache.struts2.ServletActionContext;
import cn.dinner.entity.DiningTable;
import cn.dinner.entity.DinnerNotice;
import cn.dinner.entity.DinnerOrder;
import cn.dinner.entity.Menu;
import cn.dinner.entity.MenuType;
import cn.dinner.service.DiningTableservice;
import cn.dinner.service.DinnerNoticeservice;
import cn.dinner.service.DinnerOrderservice;
import cn.dinner.service.MenuTypeservice;
import cn.dinner.service.Menuservice;
public class DianCanAction {
private Menuservice menuservice;
private DinnerOrderservice dinnerOrderservice;
private DinnerNoticeservice dinnerNoticeservice;
private MenuTypeservice menuTypeservice;
private List mtlist;
private DiningTableservice diningTableservice;
private List dtList;
//进入点餐主页
public String diancan(){
return “success“;
}
//分类获取菜谱
public String OrderMenu(){
mtlist = menuTypeservice.getAllMenuType();
dtList = diningTableservice.getdiningTable();
return “success“;
}
//生成订单以及小票
private String tableid;
private String userCode;
private Integer personNum;
private String ids;
private String counts;
private String ranks;
public void dianCan() throws IOException{
PrintWriter out = ServletActionContext.getResponse().getWriter();
DinnerOrder order = new DinnerOrder(tableidnew Date()userCodepersonNum00.00);
int orderid = dinnerOrderservice.addOrder(order);
String[] newids = ids.split(““);
String[] newcounts = counts.split(““);
String[] newranks = ranks.split(““);
if(orderid>0){
int res=0;
for (int i = 0; i < newids.length; i++) {
Menu menu = menuservice.getMenuByid(Integer.parseInt(newids[i]));
DinnerNotice notice = new DinnerNotice(menu.getMName()orderidInteger.parseInt(newcounts[i])newranks[i]menu.getMPrice());
res = dinnerNoticeservice.addNotice(notice);
}
if(res>0){
out.print(1);
}else{
out.print(-1);
}
}else{
out.print(-1);
}
}
//封装
public Menuservice getMenuservice() {
return menuservice;
}
public void setMenuservice(Menuservice menuservice) {
this.menuservice = menuservice;
}
public MenuTypeservice getMenuTypeservice() {
return menuTypeservice;
}
public void setMenuTypeservice(MenuTypeservice menuTypeservice) {
this.menuTypeservice = menuTypeservice;
}
public List getMtlist() {
return mtlist;
}
public void setMtlist(List mtlist) {
this.mtlist = mtlist;
}
public String getTableid() {
return tableid;
}
public void setTableid(String tableid) {
this.tableid = tableid;
}
public String getUserCode() {
return userCode;
}
public void setUserCode(String userCode) {
this.userCode = userCode;
}
public Integer getPersonNum() {
return personNum;
}
public void setPersonNum(Integer perso
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-06-14 14:15 order\
目录 0 2019-06-14 14:14 order\DinnerRoom\
文件 1140 2018-03-19 14:13 order\DinnerRoom\.classpath
文件 1060 2018-03-19 14:10 order\DinnerRoom\.project
目录 0 2019-06-14 13:46 order\DinnerRoom\.settings\
文件 564 2018-03-19 14:10 order\DinnerRoom\.settings\.jsdtscope
文件 364 2018-03-19 14:10 order\DinnerRoom\.settings\org.eclipse.jdt.core.prefs
文件 568 2018-03-19 14:13 order\DinnerRoom\.settings\org.eclipse.wst.common.component
文件 414 2018-03-19 14:10 order\DinnerRoom\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2018-03-19 14:10 order\DinnerRoom\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2018-03-19 14:10 order\DinnerRoom\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2019-06-14 13:46 order\DinnerRoom\resource\
文件 2992 2018-03-19 14:40 order\DinnerRoom\resource\applicationContext.xm
文件 921 2018-03-19 14:13 order\DinnerRoom\resource\app_dao.xm
文件 1029 2018-03-19 14:13 order\DinnerRoom\resource\app_service.xm
文件 1358 2018-03-19 14:13 order\DinnerRoom\resource\log4j.properties
文件 8833 2018-03-19 14:57 order\DinnerRoom\resource\struts.xm
目录 0 2019-06-14 13:46 order\DinnerRoom\src\
目录 0 2019-06-14 13:46 order\DinnerRoom\src\cn\
目录 0 2019-06-14 13:46 order\DinnerRoom\src\cn\dinner\
目录 0 2019-06-14 13:46 order\DinnerRoom\src\cn\dinner\action\
文件 4242 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\DianCanAction.java
文件 4141 2018-03-19 14:22 order\DinnerRoom\src\cn\dinner\action\DiningTableAction.java
文件 1197 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\DinnerNoticeAction.java
文件 3671 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\DinnerOrderAction.java
文件 2701 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\HomeAction.java
文件 2374 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\HouChuActionn.java
文件 5336 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\MemberAction.java
文件 3857 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\MemberTypeAction.java
文件 9663 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\MenuAction.java
文件 4118 2018-03-19 14:15 order\DinnerRoom\src\cn\dinner\action\MenuTypeAction.java
............此处省略628个文件信息
相关资源
- java工程师简历模版多套合集包含具体
- [中文]Java并发编程的艺术pdf
- 基于Android的个人理财系统
- 1z0-809 128q.pdf(ocp jdk8)-CSDN
- vsm向量空间模型java实现源码
- 深入嵌入式Java虚拟机
- Java 并发编程实战pdf + 随书源码 书高
- 基于Java的企业人事管理系统
- flume-ng-sql-source-1.5.2.jar
- 基于Java的聊天软件
- JSP MYSQL学生实习管理系统 源代码
- java轻量级智能快速开发平台框架
- Java性能权威指南 高清完整版 pdf
- Java OpenCV 3.0 中文版
- Java 并发编程的艺术PDF清晰完整版+源
- Java Socket 通信服务与客户端完整
- lucene 全文检索系统 java源码 信息检
- java 实现word 转PDF
- 医院门诊预约系统JavaWeb设计
- 2018-2019年黑马最新版Java程序员面试宝
- JSP+MYSQL宾馆酒店客房管理系统
- JAVAWeb聊天室184508
- JAVA教程(史上最全)
- JavaEE项目源码及文档
- 在线小区物业管理系统
- 网上花店系统java附带数据库。论文
- jsp+javaBean+mysql在线调查问卷系统-Jav
- apache-ant-1.9.4-bin
- jsp+mysql工资管理系统
- 学生信息管理系统含Java源代码 毕业论
评论
共有 条评论