diff --git a/equipment-SpringMVCProject/equipment-SpringMVCProject.iml b/equipment-SpringMVCProject/equipment-SpringMVCProject.iml index 28b5132..989b328 100644 --- a/equipment-SpringMVCProject/equipment-SpringMVCProject.iml +++ b/equipment-SpringMVCProject/equipment-SpringMVCProject.iml @@ -21,5 +21,6 @@ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/controller/FirstController.java b/equipment-SpringMVCProject/src/com/ssm/controller/FirstController.java new file mode 100644 index 0000000..19fb5f7 --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/controller/FirstController.java @@ -0,0 +1,12 @@ +package com.ssm.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +public class FirstController { + @RequestMapping("hello") + public String hello(){ + return "showFirst"; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/controller/LabController.java b/equipment-SpringMVCProject/src/com/ssm/controller/LabController.java new file mode 100644 index 0000000..c32d57f --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/controller/LabController.java @@ -0,0 +1,24 @@ +package com.ssm.controller; + +import com.ssm.entity.Lab; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/lab") +public class LabController { + + @RequestMapping("/add") + public String addLab(Lab lab) { + System.out.println("实验室信息:" + lab.toString()); + return "showLab"; + } + + @RequestMapping("/newadd") + public String newAddLab(Lab lab, Model model) { + System.out.println("实验室信息:" + lab.toString()); + model.addAttribute("lab", lab); + return "showLab"; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/controller/MaterialController.java b/equipment-SpringMVCProject/src/com/ssm/controller/MaterialController.java new file mode 100644 index 0000000..b3276cf --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/controller/MaterialController.java @@ -0,0 +1,25 @@ +package com.ssm.controller; + +import com.ssm.entity.Material; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +//标记 +@Controller +//请求地址与方法 +@RequestMapping("/material") +public class MaterialController { + + @RequestMapping("/add") + public String addMaterial(Material material) { + System.out.println("材料信息:" + material.toString()); + return "showMaterial"; + } + + @RequestMapping("/newadd") + public String newAddMaterial(Material material, Model model) { + System.out.println("材料信息:" + material.toString()); + model.addAttribute("material", material); + return "showMaterial"; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/controller/MaterialStockController.java b/equipment-SpringMVCProject/src/com/ssm/controller/MaterialStockController.java new file mode 100644 index 0000000..2685dbd --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/controller/MaterialStockController.java @@ -0,0 +1,24 @@ +package com.ssm.controller; + +import com.ssm.entity.MaterialStock; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/stock") +public class MaterialStockController { + + @RequestMapping("/add") + public String addStock(MaterialStock stock) { + System.out.println("材料出入库信息:" + stock.toString()); + return "showMaterialStock"; + } + + @RequestMapping("/newadd") + public String newAddStock(MaterialStock stock, Model model) { + System.out.println("材料出入库信息:" + stock.toString()); + model.addAttribute("stock", stock); + return "showMaterialStock"; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/controller/ProductController.java b/equipment-SpringMVCProject/src/com/ssm/controller/ProductController.java deleted file mode 100644 index bfc2421..0000000 --- a/equipment-SpringMVCProject/src/com/ssm/controller/ProductController.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.ssm.controller; - -import com.ssm.entity.Product; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.ModelAndView; - -@Controller -@RequestMapping("/product") -public class ProductController { - - - @RequestMapping("/add") - public String add(Product product){ - System.out.println("商品信息:" + product.toString()); - return "showProduct"; - } - - @RequestMapping("/newadd") - public ModelAndView newadd(Product product){ - - ModelAndView mv = new ModelAndView("showProduct"); - - mv.addObject("productInfo", product); - - return mv; - } -} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/controller/ReservationController.java b/equipment-SpringMVCProject/src/com/ssm/controller/ReservationController.java new file mode 100644 index 0000000..898d2d8 --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/controller/ReservationController.java @@ -0,0 +1,24 @@ +package com.ssm.controller; + +import com.ssm.entity.Reservation; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/reservation") +public class ReservationController { + + @RequestMapping("/add") + public String addReservation(Reservation reservation) { + System.out.println("预约信息:" + reservation.toString()); + return "showReservation"; + } + + @RequestMapping("/newadd") + public String newAddReservation(Reservation reservation, Model model) { + System.out.println("预约信息:" + reservation.toString()); + model.addAttribute("reservation", reservation); + return "showReservation"; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/controller/UserController.java b/equipment-SpringMVCProject/src/com/ssm/controller/UserController.java new file mode 100644 index 0000000..89a30df --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/controller/UserController.java @@ -0,0 +1,27 @@ +package com.ssm.controller; + +import com.ssm.entity.User; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/user") +public class UserController { + + // 原方法(可选保留) + @RequestMapping("/add") + public String addUser(User user) { + System.out.println("用户信息:" + user.toString()); + return "showUser"; + } + + // 新增方法:接收数据并响应到页面 + @RequestMapping("/newadd") + public String newAddUser(User user, Model model) { + System.out.println("用户信息:" + user.toString()); + // 把用户数据存入Model,传给JSP + model.addAttribute("user", user); + return "showUser"; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/entity/Category.java b/equipment-SpringMVCProject/src/com/ssm/entity/Category.java deleted file mode 100644 index 78fe575..0000000 --- a/equipment-SpringMVCProject/src/com/ssm/entity/Category.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ssm.entity; - -public class Category { - private String cname; // 分类名称 - - public String getCname() { - return cname; - } - - public void setCname(String cname) { - this.cname = cname; - } - - @Override - public String toString() { - return "Category{" + - "cname='" + cname + '\'' + - '}'; - } -} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/entity/Lab.java b/equipment-SpringMVCProject/src/com/ssm/entity/Lab.java new file mode 100644 index 0000000..7577894 --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/entity/Lab.java @@ -0,0 +1,39 @@ +package com.ssm.entity; + +public class Lab { + private Integer labId; // 实验室编号 + private String labName; // 实验室名称 + private String location; // 位置 + private Integer capacity; // 容纳人数 + private String status; // 状态(可用/维修中/停用) + private String manager; // 管理员 + + // 无参构造 + public Lab() {} + + // Getter/Setter + public Integer getLabId() { return labId; } + public void setLabId(Integer labId) { this.labId = labId; } + public String getLabName() { return labName; } + public void setLabName(String labName) { this.labName = labName; } + public String getLocation() { return location; } + public void setLocation(String location) { this.location = location; } + public Integer getCapacity() { return capacity; } + public void setCapacity(Integer capacity) { this.capacity = capacity; } + public String getStatus() { return status; } + public void setStatus(String status) { this.status = status; } + public String getManager() { return manager; } + public void setManager(String manager) { this.manager = manager; } + + @Override + public String toString() { + return "Lab{" + + "labId=" + labId + + ", labName='" + labName + '\'' + + ", location='" + location + '\'' + + ", capacity=" + capacity + + ", status='" + status + '\'' + + ", manager='" + manager + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/entity/Material.java b/equipment-SpringMVCProject/src/com/ssm/entity/Material.java new file mode 100644 index 0000000..fcc6bb2 --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/entity/Material.java @@ -0,0 +1,43 @@ +package com.ssm.entity; + +public class Material { + private Integer mid; // 材料编号 + private String mname; // 材料名称 + private String spec; // 规格型号 + private Integer stockNum; // 库存数量 + private String unit; // 单位 + private Double price; // 单价 + private String supplier; // 供应商 + + // 无参构造 + public Material() {} + + // Getter/Setter + public Integer getMid() { return mid; } + public void setMid(Integer mid) { this.mid = mid; } + public String getMname() { return mname; } + public void setMname(String mname) { this.mname = mname; } + public String getSpec() { return spec; } + public void setSpec(String spec) { this.spec = spec; } + public Integer getStockNum() { return stockNum; } + public void setStockNum(Integer stockNum) { this.stockNum = stockNum; } + public String getUnit() { return unit; } + public void setUnit(String unit) { this.unit = unit; } + public Double getPrice() { return price; } + public void setPrice(Double price) { this.price = price; } + public String getSupplier() { return supplier; } + public void setSupplier(String supplier) { this.supplier = supplier; } + + @Override + public String toString() { + return "Material{" + + "mid=" + mid + + ", mname='" + mname + '\'' + + ", spec='" + spec + '\'' + + ", stockNum=" + stockNum + + ", unit='" + unit + '\'' + + ", price=" + price + + ", supplier='" + supplier + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/entity/MaterialStock.java b/equipment-SpringMVCProject/src/com/ssm/entity/MaterialStock.java new file mode 100644 index 0000000..1f39530 --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/entity/MaterialStock.java @@ -0,0 +1,46 @@ +package com.ssm.entity; + +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; + +public class MaterialStock { + private Integer stockId; // 出入库记录编号 + private Integer mid; // 材料编号 + private String type; // 类型(入库/出库) + private Integer num; // 数量 + + // 关键:加上日期格式注解,匹配input type="date"提交的格式 + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date opDate; // 操作日期 + + private String operator; // 操作人 + + // 无参构造 + public MaterialStock() {} + + // Getter/Setter + public Integer getStockId() { return stockId; } + public void setStockId(Integer stockId) { this.stockId = stockId; } + public Integer getMid() { return mid; } + public void setMid(Integer mid) { this.mid = mid; } + public String getType() { return type; } + public void setType(String type) { this.type = type; } + public Integer getNum() { return num; } + public void setNum(Integer num) { this.num = num; } + public Date getOpDate() { return opDate; } + public void setOpDate(Date opDate) { this.opDate = opDate; } + public String getOperator() { return operator; } + public void setOperator(String operator) { this.operator = operator; } + + @Override + public String toString() { + return "MaterialStock{" + + "stockId=" + stockId + + ", mid=" + mid + + ", type='" + type + '\'' + + ", num=" + num + + ", opDate=" + opDate + + ", operator='" + operator + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/entity/Product.java b/equipment-SpringMVCProject/src/com/ssm/entity/Product.java deleted file mode 100644 index 1522e95..0000000 --- a/equipment-SpringMVCProject/src/com/ssm/entity/Product.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.ssm.entity; - -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - -public class Product { - private Integer pid; // 商品id - private String pname; // 商品名 - private Double marketPrice;// 商品单价 - private Double shopPrice; // 商城价 - private String image; // 商品图片 - private String pdesc; // 描述 - private Integer isHot; // 是否热门 - @DateTimeFormat(pattern = "yyyy-MM-dd") // 日期格式化,和你表单的日期格式匹配 - private Date pdate; // 上架日期 - private Category category; // 关联分类对象 - private Integer state = 0; // 状态 - - // Getter/Setter 方法(必须写,否则Spring无法自动注入参数) - public Integer getPid() { - return pid; - } - - public void setPid(Integer pid) { - this.pid = pid; - } - - public String getPname() { - return pname; - } - - public void setPname(String pname) { - this.pname = pname; - } - - public Double getMarketPrice() { - return marketPrice; - } - - public void setMarketPrice(Double marketPrice) { - this.marketPrice = marketPrice; - } - - public Double getShopPrice() { - return shopPrice; - } - - public void setShopPrice(Double shopPrice) { - this.shopPrice = shopPrice; - } - - public String getImage() { - return image; - } - - public void setImage(String image) { - this.image = image; - } - - public String getPdesc() { - return pdesc; - } - - public void setPdesc(String pdesc) { - this.pdesc = pdesc; - } - - public Integer getIsHot() { - return isHot; - } - - public void setIsHot(Integer isHot) { - this.isHot = isHot; - } - - public Date getPdate() { - return pdate; - } - - public void setPdate(Date pdate) { - this.pdate = pdate; - } - - public Category getCategory() { - return category; - } - - public void setCategory(Category category) { - this.category = category; - } - - public Integer getState() { - return state; - } - - public void setState(Integer state) { - this.state = state; - } - - // toString方法,控制台打印用,和你输出格式一致 - @Override - public String toString() { - return "Product{" + - "pid=" + pid + - ", pname='" + pname + '\'' + - ", marketPrice=" + marketPrice + - ", shopPrice=" + shopPrice + - ", image='" + image + '\'' + - ", pdesc='" + pdesc + '\'' + - ", isHot=" + isHot + - ", pdate=" + pdate + - ", categoryName=" + (category != null ? category.getCname() : null) + - ", state=" + state + - '}'; - } -} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/entity/Reservation.java b/equipment-SpringMVCProject/src/com/ssm/entity/Reservation.java new file mode 100644 index 0000000..5909f61 --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/entity/Reservation.java @@ -0,0 +1,48 @@ +package com.ssm.entity; + +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; + +public class Reservation { + private Integer rid; // 预约编号 + private Integer uid; // 用户编号 + private Integer labId; // 实验室编号 + + // 关键:加上日期格式注解,匹配表单提交的 yyyy-MM-dd 格式 + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date startDate; // 预约开始时间 + + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date endDate; // 预约结束时间 + + private String status; // 状态(待审核/已通过/已拒绝) + + // 无参构造 + public Reservation() {} + + // Getter/Setter + public Integer getRid() { return rid; } + public void setRid(Integer rid) { this.rid = rid; } + public Integer getUid() { return uid; } + public void setUid(Integer uid) { this.uid = uid; } + public Integer getLabId() { return labId; } + public void setLabId(Integer labId) { this.labId = labId; } + public Date getStartDate() { return startDate; } + public void setStartDate(Date startDate) { this.startDate = startDate; } + public Date getEndDate() { return endDate; } + public void setEndDate(Date endDate) { this.endDate = endDate; } + public String getStatus() { return status; } + public void setStatus(String status) { this.status = status; } + + @Override + public String toString() { + return "Reservation{" + + "rid=" + rid + + ", uid=" + uid + + ", labId=" + labId + + ", startDate=" + startDate + + ", endDate=" + endDate + + ", status='" + status + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/src/com/ssm/entity/User.java b/equipment-SpringMVCProject/src/com/ssm/entity/User.java new file mode 100644 index 0000000..32064e3 --- /dev/null +++ b/equipment-SpringMVCProject/src/com/ssm/entity/User.java @@ -0,0 +1,39 @@ +package com.ssm.entity; + +public class User { + private Integer uid; // 用户编号 + private String username; // 用户名 + private String password; // 密码 + private String realName; // 真实姓名 + private String phone; // 手机号 + private String role; // 角色(管理员/普通用户) + + // 无参构造 + public User() {} + + // Getter/Setter + public Integer getUid() { return uid; } + public void setUid(Integer uid) { this.uid = uid; } + public String getUsername() { return username; } + public void setUsername(String username) { this.username = username; } + public String getPassword() { return password; } + public void setPassword(String password) { this.password = password; } + public String getRealName() { return realName; } + public void setRealName(String realName) { this.realName = realName; } + public String getPhone() { return phone; } + public void setPhone(String phone) { this.phone = phone; } + public String getRole() { return role; } + public void setRole(String role) { this.role = role; } + + @Override + public String toString() { + return "User{" + + "uid=" + uid + + ", username='" + username + '\'' + + ", password='" + password + '\'' + + ", realName='" + realName + '\'' + + ", phone='" + phone + '\'' + + ", role='" + role + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/WEB-INF/lib/aspectjweaver-1.9.7.jar b/equipment-SpringMVCProject/web/WEB-INF/lib/aspectjweaver-1.9.7.jar new file mode 100644 index 0000000..aae2690 Binary files /dev/null and b/equipment-SpringMVCProject/web/WEB-INF/lib/aspectjweaver-1.9.7.jar differ diff --git a/equipment-SpringMVCProject/src/springmvc.xml b/equipment-SpringMVCProject/web/WEB-INF/springmvc.xml similarity index 61% rename from equipment-SpringMVCProject/src/springmvc.xml rename to equipment-SpringMVCProject/web/WEB-INF/springmvc.xml index 885e547..c810f6f 100644 --- a/equipment-SpringMVCProject/src/springmvc.xml +++ b/equipment-SpringMVCProject/web/WEB-INF/springmvc.xml @@ -5,19 +5,19 @@ xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans - https://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context - https://www.springframework.org/schema/context/spring-context.xsd + http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc - https://www.springframework.org/schema/mvc/spring-mvc.xsd"> + http://www.springframework.org/schema/mvc/spring-mvc.xsd"> + + + - - - - + diff --git a/equipment-SpringMVCProject/web/WEB-INF/view/showFirst.jsp b/equipment-SpringMVCProject/web/WEB-INF/view/showFirst.jsp new file mode 100644 index 0000000..c4292f2 --- /dev/null +++ b/equipment-SpringMVCProject/web/WEB-INF/view/showFirst.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: AA7 + Date: 2026/4/23 + Time: 14:21 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 入门程序 + + +success! + + diff --git a/equipment-SpringMVCProject/web/WEB-INF/view/showLab.jsp b/equipment-SpringMVCProject/web/WEB-INF/view/showLab.jsp new file mode 100644 index 0000000..6c08b67 --- /dev/null +++ b/equipment-SpringMVCProject/web/WEB-INF/view/showLab.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 操作成功 + + +

Success!

+

实验室编号:${lab.labId}

+

实验室名称:${lab.labName}

+

位置:${lab.location}

+

容纳人数:${lab.capacity}

+

状态:${lab.status}

+

管理员:${lab.manager}

+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/WEB-INF/view/showMaterial.jsp b/equipment-SpringMVCProject/web/WEB-INF/view/showMaterial.jsp new file mode 100644 index 0000000..0cc553d --- /dev/null +++ b/equipment-SpringMVCProject/web/WEB-INF/view/showMaterial.jsp @@ -0,0 +1,17 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 操作成功 + + +

Success!

+

材料编号:${material.mid}

+

材料名称:${material.mname}

+

规格型号:${material.spec}

+

库存数量:${material.stockNum}

+

单位:${material.unit}

+

单价:${material.price}

+

供应商:${material.supplier}

+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/WEB-INF/view/showMaterialStock.jsp b/equipment-SpringMVCProject/web/WEB-INF/view/showMaterialStock.jsp new file mode 100644 index 0000000..9a39aa4 --- /dev/null +++ b/equipment-SpringMVCProject/web/WEB-INF/view/showMaterialStock.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 操作成功 + + +

Success!

+

记录编号:${stock.stockId}

+

材料编号:${stock.mid}

+

操作类型:${stock.type}

+

数量:${stock.num}

+

操作日期:${stock.opDate}

+

操作人:${stock.operator}

+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/WEB-INF/view/showProduct.jsp b/equipment-SpringMVCProject/web/WEB-INF/view/showProduct.jsp deleted file mode 100644 index f10ccda..0000000 --- a/equipment-SpringMVCProject/web/WEB-INF/view/showProduct.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> - - - 结果页面 - - -

Success!

- -

商品名称:${productInfo.pname}

-

是否热门:${productInfo.isHot}

-

市场价格:${productInfo.marketPrice}

-

销售价格:${productInfo.shopPrice}

-

商品图片:${productInfo.image}

-

分类名称:${productInfo.category.cname}

-

商品描述:${productInfo.pdesc}

-

上架日期:${productInfo.pdate}

- - - \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/WEB-INF/view/showReservation.jsp b/equipment-SpringMVCProject/web/WEB-INF/view/showReservation.jsp new file mode 100644 index 0000000..9a39d4d --- /dev/null +++ b/equipment-SpringMVCProject/web/WEB-INF/view/showReservation.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 操作成功 + + +

Success!

+

预约编号:${reservation.rid}

+

用户编号:${reservation.uid}

+

实验室编号:${reservation.labId}

+

开始日期:${reservation.startDate}

+

结束日期:${reservation.endDate}

+

状态:${reservation.status}

+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/WEB-INF/view/showUser.jsp b/equipment-SpringMVCProject/web/WEB-INF/view/showUser.jsp new file mode 100644 index 0000000..ca289f7 --- /dev/null +++ b/equipment-SpringMVCProject/web/WEB-INF/view/showUser.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 操作成功 + + +

Success!

+

用户编号:${user.uid}

+

用户名:${user.username}

+

真实姓名:${user.realName}

+

手机号:${user.phone}

+

角色:${user.role}

+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/WEB-INF/web.xml b/equipment-SpringMVCProject/web/WEB-INF/web.xml index 9aaebf0..959f1ab 100644 --- a/equipment-SpringMVCProject/web/WEB-INF/web.xml +++ b/equipment-SpringMVCProject/web/WEB-INF/web.xml @@ -1,10 +1,11 @@ - + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee + http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" + version="3.0"> + - encodingFilter org.springframework.web.filter.CharacterEncodingFilter @@ -22,19 +23,17 @@ /* - - DispatcherServlet + springmvc org.springframework.web.servlet.DispatcherServlet contextConfigLocation - classpath:springmvc.xml + /WEB-INF/springmvc.xml 1 - - DispatcherServlet + springmvc / diff --git a/equipment-SpringMVCProject/web/addLab.jsp b/equipment-SpringMVCProject/web/addLab.jsp new file mode 100644 index 0000000..9a647d7 --- /dev/null +++ b/equipment-SpringMVCProject/web/addLab.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 实验室管理 + + +

实验室信息

+
+ 实验室编号:

+ 实验室名称:

+ 位置:

+ 容纳人数:

+ 状态: +

+ 管理员:

+ + +
+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/addMaterial.jsp b/equipment-SpringMVCProject/web/addMaterial.jsp new file mode 100644 index 0000000..9012cdb --- /dev/null +++ b/equipment-SpringMVCProject/web/addMaterial.jsp @@ -0,0 +1,21 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 添加材料 + + +

材料信息

+
+ 材料编号:

+ 材料名称:

+ 规格型号:

+ 库存数量:

+ 单位:

+ 单价:

+ 供应商:

+ + +
+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/addMaterialStock.jsp b/equipment-SpringMVCProject/web/addMaterialStock.jsp new file mode 100644 index 0000000..3399535 --- /dev/null +++ b/equipment-SpringMVCProject/web/addMaterialStock.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 材料出入库 + + +

材料出入库记录

+
+ 记录编号:

+ 材料编号:

+ 操作类型: +

+ 数量:

+ 操作日期:

+ 操作人:

+ + +
+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/addProduct.jsp b/equipment-SpringMVCProject/web/addProduct.jsp deleted file mode 100644 index e72d1bf..0000000 --- a/equipment-SpringMVCProject/web/addProduct.jsp +++ /dev/null @@ -1,62 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - - - 添加商品 - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
商品编号:
商品名称:
是否热门: - -
市场价格:
销售价格:
商品图片:
分类名称:
商品描述:
上架日期:
- -
-
- - \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/addReservation.jsp b/equipment-SpringMVCProject/web/addReservation.jsp new file mode 100644 index 0000000..6ea9abd --- /dev/null +++ b/equipment-SpringMVCProject/web/addReservation.jsp @@ -0,0 +1,25 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 预约管理 + + +

预约信息

+
+ 预约编号:

+ 用户编号:

+ 实验室编号:

+ 开始日期:

+ 结束日期:

+ 状态: +

+ + +
+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/addUser.jsp b/equipment-SpringMVCProject/web/addUser.jsp new file mode 100644 index 0000000..9d411cb --- /dev/null +++ b/equipment-SpringMVCProject/web/addUser.jsp @@ -0,0 +1,24 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + + 添加用户 + + +

添加用户信息

+
+ 用户编号:

+ 用户名:

+ 密码:

+ 真实姓名:

+ 手机号:

+ 角色: +

+ + +
+ + \ No newline at end of file diff --git a/equipment-SpringMVCProject/web/First.jsp b/equipment-SpringMVCProject/web/first.jsp similarity index 90% rename from equipment-SpringMVCProject/web/First.jsp rename to equipment-SpringMVCProject/web/first.jsp index b415e6b..cd91836 100644 --- a/equipment-SpringMVCProject/web/First.jsp +++ b/equipment-SpringMVCProject/web/first.jsp @@ -8,7 +8,7 @@ <%@ page contentType="text/html;charset=UTF-8" language="java" %> - 入门程序 + 入门程序 hello world diff --git a/equipment-SpringMVCProject/web/showFirst.jsp b/equipment-SpringMVCProject/web/showFirst.jsp deleted file mode 100644 index 987fa73..0000000 --- a/equipment-SpringMVCProject/web/showFirst.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> - - - 结果页面 - - -

Success!

- -<%-- 从ModelAndView中取出商品对象,展示到页面上 --%> -<%-- 注意:这里的productInfo和Controller里addObject的键名一致 --%> -

商品名称:${productInfo.pname}

-

是否热门:${productInfo.isHot}

-

市场价格:${productInfo.marketPrice}

-

销售价格:${productInfo.shopPrice}

-

商品图片:${productInfo.image}

-

分类名称:${productInfo.category.cname}

-

商品描述:${productInfo.pdesc}

-

上架日期:${productInfo.pdate}

- - - \ No newline at end of file