预约车位信息管理

main
曲宏瑞 5 months ago
parent 35ecc54e3f
commit 85eb63cdca

@ -1,18 +1,18 @@
package com.ssm.controller;
import com.ssm.entity.YuyueModel;
import com.ssm.entity.StallModel;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("yuyue")
public class YuyueController {
@RequestMapping("stall")
public class StallController {
//对象方式接收车辆预约信息
@RequestMapping("add")
public String test(YuyueModel yuyue){
System.out.println("车辆预约信息:"+yuyue.toString());
return "showYuyue";
public String test(StallModel stall){
System.out.println("车辆预约信息:"+stall.toString());
return "showStall";
}
}

@ -0,0 +1,76 @@
package com.ssm.entity;
/**
*
*/
public class StallModel {
/**
*
*/
private Integer stallphone;
// 车位价格
public String stallprice;
public int stallmessage;//车位信息
public String stallstate;//车位状态
/**
*
*/
private UserModel user;
public Integer getStallphone() {
return stallphone;
}
public void setStallphone(Integer stallphone) {
this.stallphone = stallphone;
}
public String getStallprice() {
return stallprice;
}
public void setStallprice(String stallprice) {
this.stallprice = stallprice;
}
public int getStallmessage() {
return stallmessage;
}
public void setStallmessage(int stallmessage) {
this.stallmessage = stallmessage;
}
public String getStallstate() {
return stallstate;
}
public void setStallstate(String stallstate) {
this.stallstate = stallstate;
}
public UserModel getUser() {
return user;
}
public void setUser(UserModel user) {
this.user = user;
}
@Override
public String toString() {
return "StallModel{" +
"电话=" + stallphone +
// 输出用户姓名
", 用户名=" + user.getUsername() +
// 输出停车区域名称
", 车位信息=" + stallmessage+
", 车位状态=" + stallstate +
'}';
}
}

@ -1,115 +0,0 @@
package com.ssm.entity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
*
*/
public class YuyueModel {
/**
*
*/
private Integer id;
/**
*
*/
private YonghuModel yonghu;
/**
*
*/
private TingchequyuModel tingchequyu;
/**
*
*/
@DateTimeFormat(pattern = "yyyy-mm-dd HH:mm:ss")
private Date insertTime;
/**
*
*/
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
public YonghuModel getYonghu() {
return yonghu;
}
public void setYonghu(YonghuModel yonghu) {
this.yonghu = yonghu;
}
public TingchequyuModel getTingchequyu() {
return tingchequyu;
}
public void setTingchequyu(TingchequyuModel tingchequyu) {
this.tingchequyu = tingchequyu;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "YuyueModel{" +
"id=" + id +
// 输出用户姓名
", yonghuName=" + yonghu.getYonghuName() +
// 输出停车区域名称
", tingchequyuName=" + tingchequyu.getTingchequyuName() +
", insertTime=" + insertTime +
'}';
}
}

@ -7,27 +7,39 @@
<title>添加车辆预约</title>
</head>
<body>
<form action="yuyue/add" method="post">
<form action="stall/add" method="post">
<table>
<tr>
<td>预约编号</td>
<td>预约电话</td>
<td width="20"></td>
<td><input type="text" name="id" placeholder="请输入预约编号" /></td>
<td><input type="text" name="id" placeholder="请输入预约电话" /></td>
</tr>
<tr>
<td>预约用户:</td>
<td>车位价格:</td>
<td width="20"></td>
<td><input type="text" name="stallprice" placeholder="请输入车位价格" /></td>
</tr>
<tr>
<td>车位信息:</td>
<td width="20"></td>
<td><input type="text" name="yonghu.username" placeholder="请输入预约用户" /></td>
<td><input type="text" name="stallmessage" placeholder="请输入车位信息" /></td>
</tr>
<tr>
<td>预约区域:</td>
<td>预约用户</td>
<td width="20"></td>
<td><input type="text" name="tingchequyu.tingchequyuName" placeholder="请输入预约区域" /></td>
<td><input type="text" name="user.username" placeholder="请输入预约用户" /></td>
</tr>
<tr>
<td>预约时间</td>
<td>车位状态</td>
<td width="20"></td>
<td><input type="text" name="insertTime" placeholder="请输入上架日期" /></td>
<td>
<select name="stallstateId">
<option value="">--请选择上级分类--</option>
<option value="1">闲置</option>
<option value="2">预约</option>
<option value="3">占用</option>
</select>
</td>
</tr>
<tr>
<td align="right"><input type="reset" value="重置"></td>
Loading…
Cancel
Save