基于javaweb+jsp的设备维修管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)
基于javaweb+jsp的設備維修管理系統(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap
基礎JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可
開發工具:eclipse/idea/myeclipse/sts等均可配置運行
適用
課程設計,大作業,畢業設計,項目練習,學習演示等
<div class="container-fluid"><ul class="nav nav-tabs"><li><a href="weixiuList">維修列表</a></li><li class="active"><a href="#">編輯</a></li></ul><br/><form class="form-horizontal" role="form" action="weixiuEdit" method="post" onsubmit="return check()"><input type="hidden" class="form-control" id="id" name="id" value="${vo.id}"/><div class="form-group"><label class="col-sm-3 control-label">設備編號:</label><div class="col-sm-5"><input type="text" class="form-control" id="weixiuNo" name="weixiuNo" value="${vo.weixiuNo}"></div></div><div class="form-group"><label class="col-sm-3 control-label">設備名稱:</label><div class="col-sm-5"><input type="text" class="form-control" id="weixiuName" name="weixiuName" value="${vo.weixiuName}"></div></div><div class="form-group"><label class="col-sm-3 control-label">故障:</label><div class="col-sm-5"> <if test ='weixiuRen != null'>`weixiu_ren` = #{weixiuRen},</if><if test ='weixiuPhone != null'>`weixiu_phone` = #{weixiuPhone},</if><if test ='weixiuStatus != null'>`weixiu_status` = #{weixiuStatus},</if><if test ='weixiuText != null'>`weixiu_text` = #{weixiuText}</if></set>WHERE `id` = #{id}</update><!--獲取--><select id="findById" resultMap="BaseResultMap">SELECT <include refid="Base_Column_List" /> FROM `t_weixiu` WHERE `id` = #{id}</select><!--列表--><select id="findAllSplit" parameterType="java.util.Map" resultMap="BaseResultMap"> </trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test ='id != null'>#{id},</if><if test ='shebeiName != null'>#{shebeiName},</if><if test ='shebeiNo != null'>#{shebeiNo},</if><if test ='shebeiType != null'>#{shebeiType},</if><if test ='shebeiCangjia != null'>#{shebeiCangjia},</if><if test ='shebeiIndate != null'>#{shebeiIndate},</if><if test ='shebeiInprice != null'>#{shebeiInprice},</if><if test ='shebeiDept != null'>#{shebeiDept},</if><if test ='shebeiStatus != null'>#{shebeiStatus}</if></trim></insert><!--批量刪除--><delete id="doRemoveBatch" parameterType="java.util.Collection">DELETE FROM `t_shebei` WHERE `id` IN<foreach collection="list" item="id" separator="," open="(" close=")">#{id}</foreach></delete> * @throws IOException*/@RequestMapping("userList")public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {this.redirectList(request, response);}/*** 跳轉到列表頁面** @param request* @param response*/private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查詢列和關鍵字String searchColumn = Util.decode(request, "searchColumn");String keyword = Util.decode(request, "keyword");Map<String, Object> params = new HashMap();//用來保存控制層傳進來的參數(查詢條件)params.put("searchColumn", searchColumn);//要查詢的列params.put("keyword", keyword);//查詢的關鍵字Map<String, Object> map = userService.list(params);request.getSession().setAttribute("list", map.get("list")); function check() {//根據ID獲取值if (document.getElementById("username").value.trim().length == 0) {alert("用戶名不能為空!");return false;}if (document.getElementById("password").value.trim().length == 0) {alert("密碼不能為空!");return false;}if (document.getElementById("realName").value.trim().length == 0) {alert("姓名不能為空!");return false;} <if test ='shebeiStatus != null'>`shebei_status` = #{shebeiStatus}</if></set>WHERE `id` = #{id}</update><!--獲取--><select id="findById" resultMap="BaseResultMap">SELECT <include refid="Base_Column_List" /> FROM `t_shebei` WHERE `id` = #{id}</select><!--列表--><select id="findAllSplit" parameterType="java.util.Map" resultMap="BaseResultMap">SELECT <include refid="Base_Column_List" /> FROM `t_shebei`<where><if test="searchColumn != null and searchColumn != '' and keyword != null and keyword != ''">${searchColumn} LIKE CONCAT('%',#{keyword},'%') AND</if>1=1</where>ORDER BY id ASC<if test="startIndex != null and pageSize != null">LIMIT #{startIndex},#{pageSize}; @Controller @RequestMapping public class ShebeiController {@Autowiredprivate ShebeiService shebeiService;/*** 增加設備** @param response* @param request* @throws IOException*/@RequestMapping("shebeiAdd") vo.setNoticeText(Util.decode(request, "noticeText"));vo.setNoticeType(Util.decode(request, "noticeType"));vo.setCreateDate(Util.decode(request, "createDate"));//調用Service層的增加(insert)方法noticeService.insert(vo);this.redirectList(request, response);}/*** 刪除公告** @param response* @param request* @throws IOException*/ <select id="findById" resultMap="BaseResultMap">SELECT <include refid="Base_Column_List" /> FROM `t_user` WHERE `id` = #{id}</select><!--列表--><select id="findAllSplit" parameterType="java.util.Map" resultMap="BaseResultMap">SELECT <include refid="Base_Column_List" /> FROM `t_user`<where><if test="searchColumn != null and searchColumn != '' and keyword != null and keyword != ''">${searchColumn} LIKE CONCAT('%',#{keyword},'%') AND</if>1=1</where>ORDER BY id ASC<if test="startIndex != null and pageSize != null"> * @param request* @param response*/private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查詢列和關鍵字String searchColumn = Util.decode(request, "searchColumn");String keyword = Util.decode(request, "keyword");Map<String, Object> params = new HashMap();//用來保存控制層傳進來的參數(查詢條件)params.put("searchColumn", searchColumn);//要查詢的列params.put("keyword", keyword);//查詢的關鍵字Map<String, Object> map = noticeService.list(params);request.getSession().setAttribute("list", map.get("list")); <result column="weixiu_name" property="weixiuName" /><result column="weixiu_guzhang" property="weixiuGuzhang" /><result column="weixiu_feiyong" property="weixiuFeiyong" /><result column="weixiu_date" property="weixiuDate" /><result column="weixiu_ren" property="weixiuRen" /><result column="weixiu_phone" property="weixiuPhone" /><result column="weixiu_status" property="weixiuStatus" /><result column="weixiu_text" property="weixiuText" /></resultMap><sql id="Base_Column_List">`id`,`weixiu_no`,`weixiu_name`,`weixiu_guzhang`,`weixiu_feiyong`,`weixiu_date`,`weixiu_ren`,`weixiu_phone`,`weixiu_status`,`weixiu_text`</sql><!--新增--><insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.Weixiu">INSERT INTO `t_weixiu`<trim prefix="(" suffix=")" suffixOverrides=","><if test ='id != null'>`id`,</if><if test ='weixiuNo != null'>`weixiu_no`,</if><if test ='weixiuName != null'>`weixiu_name`,</if><if test ='weixiuGuzhang != null'>`weixiu_guzhang`,</if><if test ='weixiuFeiyong != null'>`weixiu_feiyong`,</if><if test ='weixiuDate != null'>`weixiu_date`,</if><if test ='weixiuRen != null'>`weixiu_ren`,</if>運行環境
Java≥6、Tomcat≥7.0、MySQL≥5.5
開發工具
eclipse/idea/myeclipse/sts等均可配置運行
技術框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap
基礎JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可
適用
課程設計,大作業,畢業設計,項目練習,學習演示等
功能說明
登錄、注冊、退出、用戶模塊、公告模塊、設備模塊、維修模塊的增刪改查管理
總結
以上是生活随笔為你收集整理的基于javaweb+jsp的设备维修管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C#_串口调试助手-网络拓扑显示
- 下一篇: 【一天又一天】04