• 大小: 8.42MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-17
  • 语言: Java
  • 标签: web  java  sql  eclipse  

资源简介

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.xml
     文件          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.xml
     文件         921  2018-03-19 14:13  order\DinnerRoom\resource\app_dao.xml
     文件        1029  2018-03-19 14:13  order\DinnerRoom\resource\app_service.xml
     文件        1358  2018-03-19 14:13  order\DinnerRoom\resource\log4j.properties
     文件        8833  2018-03-19 14:57  order\DinnerRoom\resource\struts.xml
     目录           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个文件信息

评论

共有 条评论