From 708d518298575efa125975f762db8349d3b97bf2 Mon Sep 17 00:00:00 2001 From: 41288 <3260315424@qq.com> Date: Fri, 4 Apr 2025 16:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/ssm/controller/SblxController.java | 16 +++++ src/com/ssm/entity/Sblx.java | 83 ++++++++++++++++++++++ web/WEB-INF/view/showLaboratory.jsp | 5 +- web/WEB-INF/view/showSblx.jsp | 31 ++++++++ web/addSblx.jsp | 43 +++++++++++ 5 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 src/com/ssm/controller/SblxController.java create mode 100644 src/com/ssm/entity/Sblx.java create mode 100644 web/WEB-INF/view/showSblx.jsp create mode 100644 web/addSblx.jsp diff --git a/src/com/ssm/controller/SblxController.java b/src/com/ssm/controller/SblxController.java new file mode 100644 index 0000000..0472feb --- /dev/null +++ b/src/com/ssm/controller/SblxController.java @@ -0,0 +1,16 @@ +package com.ssm.controller; + +import com.ssm.entity.Sblx; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; +@Component +@RequestMapping("sblx") +public class SblxController { + @RequestMapping("tj") + public ModelAndView test(Sblx sblx){ + ModelAndView mv = new ModelAndView("showSblx"); + mv.addObject("sblxInfo", sblx); + return mv; + } +} diff --git a/src/com/ssm/entity/Sblx.java b/src/com/ssm/entity/Sblx.java new file mode 100644 index 0000000..3ce0415 --- /dev/null +++ b/src/com/ssm/entity/Sblx.java @@ -0,0 +1,83 @@ +package com.ssm.entity; + +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +// 设备类型表的实体类 +public class Sblx { + private String sblxid; // 设备编号 + private String sblxname; // 类型名称 + // 创建日期 + @DateTimeFormat(pattern = "yyyy-mm-dd") + private Date sblxtime; + private String sblxmemo;// 备注 + private String sblxsf;//设备是否有 + private Integer sblxnumber;//数量 + private Float sblxmoney;//价格 + private String sblxfl;//分类名称 + + public String getSblxid() { + return sblxid; + } + + public void setSblxid(String sblxid) { + this.sblxid = sblxid; + } + + public String getSblxname() { + return sblxname; + } + + public void setSblxname(String sblxname) { + this.sblxname = sblxname; + } + + public Date getSblxtime() { + return sblxtime; + } + + public void setSblxtime(Date sblxtime) { + this.sblxtime = sblxtime; + } + + public String getSblxmemo() { + return sblxmemo; + } + + public void setSblxmemo(String sblxmemo) { + this.sblxmemo = sblxmemo; + } + + public String getSblxsf() { + return sblxsf; + } + + public void setSblxsf(String sblxsf) { + this.sblxsf = sblxsf; + } + + public Integer getSblxnumber() { + return sblxnumber; + } + + public void setSblxnumber(Integer sblxnumber) { + this.sblxnumber = sblxnumber; + } + + public Float getSblxmoney() { + return sblxmoney; + } + + public void setSblxmoney(Float sblxmoney) { + this.sblxmoney = sblxmoney; + } + + public String getSblxfl() { + return sblxfl; + } + + public void setSblxfl(String sblxfl) { + this.sblxfl = sblxfl; + } +} \ No newline at end of file diff --git a/web/WEB-INF/view/showLaboratory.jsp b/web/WEB-INF/view/showLaboratory.jsp index bd5b740..5afa142 100644 --- a/web/WEB-INF/view/showLaboratory.jsp +++ b/web/WEB-INF/view/showLaboratory.jsp @@ -1,4 +1,4 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" +0<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> @@ -8,7 +8,6 @@
Success! -