Commit 57330ff4c1a8768111232b2df4c903604452b529
1 parent
7db3ebeb
添加一些模块信息
Showing
20 changed files
with
3103 additions
and
4 deletions
WebRoot/WEB-INF/jsp/sunvote/chapter/chapter_edit.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | |
5 | +<% | |
6 | + String path = request.getContextPath(); | |
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | |
8 | +%> | |
9 | +<!DOCTYPE html> | |
10 | +<html lang="en"> | |
11 | + <head> | |
12 | + <base href="<%=basePath%>"> | |
13 | + <!-- 下拉框 --> | |
14 | + <link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
15 | + <!-- jsp文件头和头部 --> | |
16 | + <%@ include file="../../system/index/top.jsp"%> | |
17 | + <!-- 日期框 --> | |
18 | + <link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
19 | +</head> | |
20 | +<body class="no-skin"> | |
21 | +<!-- /section:basics/navbar.layout --> | |
22 | +<div class="main-container" id="main-container"> | |
23 | + <!-- /section:basics/sidebar --> | |
24 | + <div class="main-content"> | |
25 | + <div class="main-content-inner"> | |
26 | + <div class="page-content"> | |
27 | + <div class="row"> | |
28 | + <div class="col-xs-12"> | |
29 | + | |
30 | + <form action="chapter/${msg }.do" name="Form" id="Form" method="post"> | |
31 | + <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> | |
32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
34 | + <tr> | |
35 | + <td style="width:75px;text-align: right;padding-top: 13px;">章节名称:</td> | |
36 | + <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入章节名称" title="章节名称" style="width:98%;"/></td> | |
37 | + </tr> | |
38 | + <tr> | |
39 | + <td style="width:75px;text-align: right;padding-top: 13px;">章节描述:</td> | |
40 | + <td><input type="text" name="CDESCRIPTION" id="CDESCRIPTION" value="${pd.CDESCRIPTION}" maxlength="255" placeholder="这里输入章节描述" title="章节描述" style="width:98%;"/></td> | |
41 | + </tr> | |
42 | + <tr> | |
43 | + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | |
44 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
45 | + </tr> | |
46 | + <tr> | |
47 | + <td style="text-align: center;" colspan="10"> | |
48 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
49 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
50 | + </td> | |
51 | + </tr> | |
52 | + </table> | |
53 | + </div> | |
54 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
55 | + </form> | |
56 | + </div> | |
57 | + <!-- /.col --> | |
58 | + </div> | |
59 | + <!-- /.row --> | |
60 | + </div> | |
61 | + <!-- /.page-content --> | |
62 | + </div> | |
63 | + </div> | |
64 | + <!-- /.main-content --> | |
65 | +</div> | |
66 | +<!-- /.main-container --> | |
67 | + | |
68 | + | |
69 | + <!-- 页面底部js¨ --> | |
70 | + <%@ include file="../../system/index/foot.jsp"%> | |
71 | + <!-- 下拉框 --> | |
72 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
73 | + <!-- 日期框 --> | |
74 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
75 | + <!--提示框--> | |
76 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
77 | + <script type="text/javascript"> | |
78 | + $(top.hangge()); | |
79 | + //保存 | |
80 | + function save(){ | |
81 | + if($("#NAME").val()==""){ | |
82 | + $("#NAME").tips({ | |
83 | + side:3, | |
84 | + msg:'请输入章节名称', | |
85 | + bg:'#AE81FF', | |
86 | + time:2 | |
87 | + }); | |
88 | + $("#NAME").focus(); | |
89 | + return false; | |
90 | + } | |
91 | + if($("#CDESCRIPTION").val()==""){ | |
92 | + $("#CDESCRIPTION").tips({ | |
93 | + side:3, | |
94 | + msg:'请输入章节描述', | |
95 | + bg:'#AE81FF', | |
96 | + time:2 | |
97 | + }); | |
98 | + $("#CDESCRIPTION").focus(); | |
99 | + return false; | |
100 | + } | |
101 | + if($("#REMARK").val()==""){ | |
102 | + $("#REMARK").tips({ | |
103 | + side:3, | |
104 | + msg:'请输入备注', | |
105 | + bg:'#AE81FF', | |
106 | + time:2 | |
107 | + }); | |
108 | + $("#REMARK").focus(); | |
109 | + return false; | |
110 | + } | |
111 | + $("#Form").submit(); | |
112 | + $("#zhongxin").hide(); | |
113 | + $("#zhongxin2").show(); | |
114 | + } | |
115 | + | |
116 | + $(function() { | |
117 | + //日期框 | |
118 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
119 | + }); | |
120 | + </script> | |
121 | +</body> | |
122 | +</html> | |
0 | 123 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/chapter/chapter_list.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<% | |
5 | + String path = request.getContextPath(); | |
6 | + String basePath = request.getScheme() + "://" | |
7 | + + request.getServerName() + ":" + request.getServerPort() | |
8 | + + path + "/"; | |
9 | +%> | |
10 | +<!DOCTYPE html> | |
11 | +<html lang="en"> | |
12 | +<head> | |
13 | +<base href="<%=basePath%>"> | |
14 | +<!-- 下拉框 --> | |
15 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
16 | +<!-- jsp文件头和头部 --> | |
17 | +<%@ include file="../../system/index/top.jsp"%> | |
18 | +<!-- 日期框 --> | |
19 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
20 | +</head> | |
21 | +<body class="no-skin"> | |
22 | + | |
23 | + <!-- /section:basics/navbar.layout --> | |
24 | + <div class="main-container" id="main-container"> | |
25 | + <!-- /section:basics/sidebar --> | |
26 | + <div class="main-content"> | |
27 | + <div class="main-content-inner"> | |
28 | + <div class="page-content"> | |
29 | + <div class="row"> | |
30 | + <div class="col-xs-12"> | |
31 | + | |
32 | + <!-- 检索 --> | |
33 | + <form action="chapter/list.do" method="post" name="Form" id="Form"> | |
34 | + <table style="margin-top:5px;"> | |
35 | + <tr> | |
36 | + <td> | |
37 | + <div class="nav-search"> | |
38 | + <span class="input-icon"> | |
39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
41 | + </span> | |
42 | + </div> | |
43 | + </td> | |
44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
46 | + <td style="vertical-align:top;padding-left:2px;"> | |
47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
48 | + <option value=""></option> | |
49 | + <option value="">全部</option> | |
50 | + <option value="">1</option> | |
51 | + <option value="">2</option> | |
52 | + </select> | |
53 | + </td> | |
54 | + <c:if test="${QX.cha == 1 }"> | |
55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
56 | + </c:if> | |
57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
58 | + </tr> | |
59 | + </table> | |
60 | + <!-- 检索 --> | |
61 | + | |
62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
63 | + <thead> | |
64 | + <tr> | |
65 | + <th class="center" style="width:35px;"> | |
66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
67 | + </th> | |
68 | + <th class="center" style="width:50px;">序号</th> | |
69 | + <th class="center">章节名称</th> | |
70 | + <th class="center">章节描述</th> | |
71 | + <th class="center">备注</th> | |
72 | + <th class="center">操作</th> | |
73 | + </tr> | |
74 | + </thead> | |
75 | + | |
76 | + <tbody> | |
77 | + <!-- 开始循环 --> | |
78 | + <c:choose> | |
79 | + <c:when test="${not empty varList}"> | |
80 | + <c:if test="${QX.cha == 1 }"> | |
81 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
82 | + <tr> | |
83 | + <td class='center'> | |
84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
85 | + </td> | |
86 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
87 | + <td class='center'>${var.NAME}</td> | |
88 | + <td class='center'>${var.CDESCRIPTION}</td> | |
89 | + <td class='center'>${var.REMARK}</td> | |
90 | + <td class="center"> | |
91 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
92 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
93 | + </c:if> | |
94 | + <div class="hidden-sm hidden-xs btn-group"> | |
95 | + <c:if test="${QX.edit == 1 }"> | |
96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
97 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
98 | + </a> | |
99 | + </c:if> | |
100 | + <c:if test="${QX.del == 1 }"> | |
101 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
102 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
103 | + </a> | |
104 | + </c:if> | |
105 | + </div> | |
106 | + <div class="hidden-md hidden-lg"> | |
107 | + <div class="inline pos-rel"> | |
108 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
109 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
110 | + </button> | |
111 | + | |
112 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
113 | + <c:if test="${QX.edit == 1 }"> | |
114 | + <li> | |
115 | + <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
116 | + <span class="green"> | |
117 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
118 | + </span> | |
119 | + </a> | |
120 | + </li> | |
121 | + </c:if> | |
122 | + <c:if test="${QX.del == 1 }"> | |
123 | + <li> | |
124 | + <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
125 | + <span class="red"> | |
126 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
127 | + </span> | |
128 | + </a> | |
129 | + </li> | |
130 | + </c:if> | |
131 | + </ul> | |
132 | + </div> | |
133 | + </div> | |
134 | + </td> | |
135 | + </tr> | |
136 | + | |
137 | + </c:forEach> | |
138 | + </c:if> | |
139 | + <c:if test="${QX.cha == 0 }"> | |
140 | + <tr> | |
141 | + <td colspan="100" class="center">您无权查看</td> | |
142 | + </tr> | |
143 | + </c:if> | |
144 | + </c:when> | |
145 | + <c:otherwise> | |
146 | + <tr class="main_info"> | |
147 | + <td colspan="100" class="center" >没有相关数据</td> | |
148 | + </tr> | |
149 | + </c:otherwise> | |
150 | + </c:choose> | |
151 | + </tbody> | |
152 | + </table> | |
153 | + <div class="page-header position-relative"> | |
154 | + <table style="width:100%;"> | |
155 | + <tr> | |
156 | + <td style="vertical-align:top;"> | |
157 | + <c:if test="${QX.add == 1 }"> | |
158 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
159 | + </c:if> | |
160 | + <c:if test="${QX.del == 1 }"> | |
161 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
162 | + </c:if> | |
163 | + </td> | |
164 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
165 | + </tr> | |
166 | + </table> | |
167 | + </div> | |
168 | + </form> | |
169 | + | |
170 | + </div> | |
171 | + <!-- /.col --> | |
172 | + </div> | |
173 | + <!-- /.row --> | |
174 | + </div> | |
175 | + <!-- /.page-content --> | |
176 | + </div> | |
177 | + </div> | |
178 | + <!-- /.main-content --> | |
179 | + | |
180 | + <!-- 返回顶部 --> | |
181 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
182 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
183 | + </a> | |
184 | + | |
185 | + </div> | |
186 | + <!-- /.main-container --> | |
187 | + | |
188 | + <!-- basic scripts --> | |
189 | + <!-- 页面底部js¨ --> | |
190 | + <%@ include file="../../system/index/foot.jsp"%> | |
191 | + <!-- 删除时确认窗口 --> | |
192 | + <script src="static/ace/js/bootbox.js"></script> | |
193 | + <!-- ace scripts --> | |
194 | + <script src="static/ace/js/ace/ace.js"></script> | |
195 | + <!-- 下拉框 --> | |
196 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
197 | + <!-- 日期框 --> | |
198 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
199 | + <!--提示框--> | |
200 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
201 | + <script type="text/javascript"> | |
202 | + $(top.hangge());//关闭加载状态 | |
203 | + //检索 | |
204 | + function tosearch(){ | |
205 | + top.jzts(); | |
206 | + $("#Form").submit(); | |
207 | + } | |
208 | + $(function() { | |
209 | + | |
210 | + //日期框 | |
211 | + $('.date-picker').datepicker({ | |
212 | + autoclose: true, | |
213 | + todayHighlight: true | |
214 | + }); | |
215 | + | |
216 | + //下拉框 | |
217 | + if(!ace.vars['touch']) { | |
218 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
219 | + $(window) | |
220 | + .off('resize.chosen') | |
221 | + .on('resize.chosen', function() { | |
222 | + $('.chosen-select').each(function() { | |
223 | + var $this = $(this); | |
224 | + $this.next().css({'width': $this.parent().width()}); | |
225 | + }); | |
226 | + }).trigger('resize.chosen'); | |
227 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
228 | + if(event_name != 'sidebar_collapsed') return; | |
229 | + $('.chosen-select').each(function() { | |
230 | + var $this = $(this); | |
231 | + $this.next().css({'width': $this.parent().width()}); | |
232 | + }); | |
233 | + }); | |
234 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
235 | + var target = $(this).find('input[type=radio]'); | |
236 | + var which = parseInt(target.val()); | |
237 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
238 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
239 | + }); | |
240 | + } | |
241 | + | |
242 | + | |
243 | + //复选框全选控制 | |
244 | + var active_class = 'active'; | |
245 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
246 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
247 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
248 | + var row = this; | |
249 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
250 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
251 | + }); | |
252 | + }); | |
253 | + }); | |
254 | + | |
255 | + //新增 | |
256 | + function add(){ | |
257 | + top.jzts(); | |
258 | + var diag = new top.Dialog(); | |
259 | + diag.Drag=true; | |
260 | + diag.Title ="新增"; | |
261 | + diag.URL = '<%=basePath%>chapter/goAdd.do'; | |
262 | + diag.Width = 450; | |
263 | + diag.Height = 355; | |
264 | + diag.Modal = true; //有无遮罩窗口 | |
265 | + diag. ShowMaxButton = true; //最大化按钮 | |
266 | + diag.ShowMinButton = true; //最小化按钮 | |
267 | + diag.CancelEvent = function(){ //关闭事件 | |
268 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
269 | + if('${page.currentPage}' == '0'){ | |
270 | + tosearch(); | |
271 | + }else{ | |
272 | + tosearch(); | |
273 | + } | |
274 | + } | |
275 | + diag.close(); | |
276 | + }; | |
277 | + diag.show(); | |
278 | + } | |
279 | + | |
280 | + //删除 | |
281 | + function del(Id){ | |
282 | + bootbox.confirm("确定要删除吗?", function(result) { | |
283 | + if(result) { | |
284 | + top.jzts(); | |
285 | + var url = "<%=basePath%>chapter/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
286 | + $.get(url,function(data){ | |
287 | + tosearch(); | |
288 | + }); | |
289 | + } | |
290 | + }); | |
291 | + } | |
292 | + | |
293 | + //修改 | |
294 | + function edit(Id){ | |
295 | + top.jzts(); | |
296 | + var diag = new top.Dialog(); | |
297 | + diag.Drag=true; | |
298 | + diag.Title ="编辑"; | |
299 | + diag.URL = '<%=basePath%>chapter/goEdit.do?ID='+Id; | |
300 | + diag.Width = 450; | |
301 | + diag.Height = 355; | |
302 | + diag.Modal = true; //有无遮罩窗口 | |
303 | + diag. ShowMaxButton = true; //最大化按钮 | |
304 | + diag.ShowMinButton = true; //最小化按钮 | |
305 | + diag.CancelEvent = function(){ //关闭事件 | |
306 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
307 | + tosearch(); | |
308 | + } | |
309 | + diag.close(); | |
310 | + }; | |
311 | + diag.show(); | |
312 | + } | |
313 | + | |
314 | + //批量操作 | |
315 | + function makeAll(msg){ | |
316 | + bootbox.confirm(msg, function(result) { | |
317 | + if(result) { | |
318 | + var str = ''; | |
319 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
320 | + if(document.getElementsByName('ids')[i].checked){ | |
321 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
322 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
323 | + } | |
324 | + } | |
325 | + if(str==''){ | |
326 | + bootbox.dialog({ | |
327 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
328 | + buttons: | |
329 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
330 | + }); | |
331 | + $("#zcheckbox").tips({ | |
332 | + side:1, | |
333 | + msg:'点这里全选', | |
334 | + bg:'#AE81FF', | |
335 | + time:8 | |
336 | + }); | |
337 | + return; | |
338 | + }else{ | |
339 | + if(msg == '确定要删除选中的数据吗?'){ | |
340 | + top.jzts(); | |
341 | + $.ajax({ | |
342 | + type: "POST", | |
343 | + url: '<%=basePath%>chapter/deleteAll.do?tm='+new Date().getTime(), | |
344 | + data: {DATA_IDS:str}, | |
345 | + dataType:'json', | |
346 | + //beforeSend: validateData, | |
347 | + cache: false, | |
348 | + success: function(data){ | |
349 | + $.each(data.list, function(i, list){ | |
350 | + tosearch(); | |
351 | + }); | |
352 | + } | |
353 | + }); | |
354 | + } | |
355 | + } | |
356 | + } | |
357 | + }); | |
358 | + }; | |
359 | + | |
360 | + //导出excel | |
361 | + function toExcel(){ | |
362 | + window.location.href='<%=basePath%>chapter/excel.do'; | |
363 | + } | |
364 | + </script> | |
365 | + | |
366 | + | |
367 | +</body> | |
368 | +</html> | |
0 | 369 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_edit.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | |
5 | +<% | |
6 | + String path = request.getContextPath(); | |
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | |
8 | +%> | |
9 | +<!DOCTYPE html> | |
10 | +<html lang="en"> | |
11 | + <head> | |
12 | + <base href="<%=basePath%>"> | |
13 | + <!-- 下拉框 --> | |
14 | + <link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
15 | + <!-- jsp文件头和头部 --> | |
16 | + <%@ include file="../../system/index/top.jsp"%> | |
17 | + <!-- 日期框 --> | |
18 | + <link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
19 | +</head> | |
20 | +<body class="no-skin"> | |
21 | +<!-- /section:basics/navbar.layout --> | |
22 | +<div class="main-container" id="main-container"> | |
23 | + <!-- /section:basics/sidebar --> | |
24 | + <div class="main-content"> | |
25 | + <div class="main-content-inner"> | |
26 | + <div class="page-content"> | |
27 | + <div class="row"> | |
28 | + <div class="col-xs-12"> | |
29 | + | |
30 | + <form action="coursemanagement/${msg }.do" name="Form" id="Form" method="post"> | |
31 | + <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> | |
32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
34 | + <tr> | |
35 | + <td style="width:75px;text-align: right;padding-top: 13px;">老师:</td> | |
36 | + <td><input type="number" name="TEACHER_ID" id="TEACHER_ID" value="${pd.TEACHER_ID}" maxlength="32" placeholder="这里输入老师" title="老师" style="width:98%;"/></td> | |
37 | + </tr> | |
38 | + <tr> | |
39 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级ID:</td> | |
40 | + <td><input type="number" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="32" placeholder="这里输入班级ID" title="班级ID" style="width:98%;"/></td> | |
41 | + </tr> | |
42 | + <tr> | |
43 | + <td style="width:75px;text-align: right;padding-top: 13px;">科目:</td> | |
44 | + <td><input type="number" name="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="32" placeholder="这里输入科目" title="科目" style="width:98%;"/></td> | |
45 | + </tr> | |
46 | + <tr> | |
47 | + <td style="width:75px;text-align: right;padding-top: 13px;">开始时间:</td> | |
48 | + <td><input class="span10 date-picker" name="START_DATE" id="START_DATE" value="${pd.START_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="开始时间" title="开始时间" style="width:98%;"/></td> | |
49 | + </tr> | |
50 | + <tr> | |
51 | + <td style="width:75px;text-align: right;padding-top: 13px;">结束时间:</td> | |
52 | + <td><input class="span10 date-picker" name="END_DATE" id="END_DATE" value="${pd.END_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="结束时间" title="结束时间" style="width:98%;"/></td> | |
53 | + </tr> | |
54 | + <tr> | |
55 | + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | |
56 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
57 | + </tr> | |
58 | + <tr> | |
59 | + <td style="text-align: center;" colspan="10"> | |
60 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
61 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
62 | + </td> | |
63 | + </tr> | |
64 | + </table> | |
65 | + </div> | |
66 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
67 | + </form> | |
68 | + </div> | |
69 | + <!-- /.col --> | |
70 | + </div> | |
71 | + <!-- /.row --> | |
72 | + </div> | |
73 | + <!-- /.page-content --> | |
74 | + </div> | |
75 | + </div> | |
76 | + <!-- /.main-content --> | |
77 | +</div> | |
78 | +<!-- /.main-container --> | |
79 | + | |
80 | + | |
81 | + <!-- 页面底部js¨ --> | |
82 | + <%@ include file="../../system/index/foot.jsp"%> | |
83 | + <!-- 下拉框 --> | |
84 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
85 | + <!-- 日期框 --> | |
86 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
87 | + <!--提示框--> | |
88 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
89 | + <script type="text/javascript"> | |
90 | + $(top.hangge()); | |
91 | + //保存 | |
92 | + function save(){ | |
93 | + if($("#TEACHER_ID").val()==""){ | |
94 | + $("#TEACHER_ID").tips({ | |
95 | + side:3, | |
96 | + msg:'请输入老师', | |
97 | + bg:'#AE81FF', | |
98 | + time:2 | |
99 | + }); | |
100 | + $("#TEACHER_ID").focus(); | |
101 | + return false; | |
102 | + } | |
103 | + if($("#CLASS_ID").val()==""){ | |
104 | + $("#CLASS_ID").tips({ | |
105 | + side:3, | |
106 | + msg:'请输入班级ID', | |
107 | + bg:'#AE81FF', | |
108 | + time:2 | |
109 | + }); | |
110 | + $("#CLASS_ID").focus(); | |
111 | + return false; | |
112 | + } | |
113 | + if($("#SUBJECT_ID").val()==""){ | |
114 | + $("#SUBJECT_ID").tips({ | |
115 | + side:3, | |
116 | + msg:'请输入科目', | |
117 | + bg:'#AE81FF', | |
118 | + time:2 | |
119 | + }); | |
120 | + $("#SUBJECT_ID").focus(); | |
121 | + return false; | |
122 | + } | |
123 | + if($("#START_DATE").val()==""){ | |
124 | + $("#START_DATE").tips({ | |
125 | + side:3, | |
126 | + msg:'请输入开始时间', | |
127 | + bg:'#AE81FF', | |
128 | + time:2 | |
129 | + }); | |
130 | + $("#START_DATE").focus(); | |
131 | + return false; | |
132 | + } | |
133 | + if($("#END_DATE").val()==""){ | |
134 | + $("#END_DATE").tips({ | |
135 | + side:3, | |
136 | + msg:'请输入结束时间', | |
137 | + bg:'#AE81FF', | |
138 | + time:2 | |
139 | + }); | |
140 | + $("#END_DATE").focus(); | |
141 | + return false; | |
142 | + } | |
143 | + if($("#REMARK").val()==""){ | |
144 | + $("#REMARK").tips({ | |
145 | + side:3, | |
146 | + msg:'请输入备注', | |
147 | + bg:'#AE81FF', | |
148 | + time:2 | |
149 | + }); | |
150 | + $("#REMARK").focus(); | |
151 | + return false; | |
152 | + } | |
153 | + $("#Form").submit(); | |
154 | + $("#zhongxin").hide(); | |
155 | + $("#zhongxin2").show(); | |
156 | + } | |
157 | + | |
158 | + $(function() { | |
159 | + //日期框 | |
160 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
161 | + }); | |
162 | + </script> | |
163 | +</body> | |
164 | +</html> | |
0 | 165 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_list.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<% | |
5 | + String path = request.getContextPath(); | |
6 | + String basePath = request.getScheme() + "://" | |
7 | + + request.getServerName() + ":" + request.getServerPort() | |
8 | + + path + "/"; | |
9 | +%> | |
10 | +<!DOCTYPE html> | |
11 | +<html lang="en"> | |
12 | +<head> | |
13 | +<base href="<%=basePath%>"> | |
14 | +<!-- 下拉框 --> | |
15 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
16 | +<!-- jsp文件头和头部 --> | |
17 | +<%@ include file="../../system/index/top.jsp"%> | |
18 | +<!-- 日期框 --> | |
19 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
20 | +</head> | |
21 | +<body class="no-skin"> | |
22 | + | |
23 | + <!-- /section:basics/navbar.layout --> | |
24 | + <div class="main-container" id="main-container"> | |
25 | + <!-- /section:basics/sidebar --> | |
26 | + <div class="main-content"> | |
27 | + <div class="main-content-inner"> | |
28 | + <div class="page-content"> | |
29 | + <div class="row"> | |
30 | + <div class="col-xs-12"> | |
31 | + | |
32 | + <!-- 检索 --> | |
33 | + <form action="coursemanagement/list.do" method="post" name="Form" id="Form"> | |
34 | + <table style="margin-top:5px;"> | |
35 | + <tr> | |
36 | + <td> | |
37 | + <div class="nav-search"> | |
38 | + <span class="input-icon"> | |
39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
41 | + </span> | |
42 | + </div> | |
43 | + </td> | |
44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
46 | + <td style="vertical-align:top;padding-left:2px;"> | |
47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
48 | + <option value=""></option> | |
49 | + <option value="">全部</option> | |
50 | + <option value="">1</option> | |
51 | + <option value="">2</option> | |
52 | + </select> | |
53 | + </td> | |
54 | + <c:if test="${QX.cha == 1 }"> | |
55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
56 | + </c:if> | |
57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
58 | + </tr> | |
59 | + </table> | |
60 | + <!-- 检索 --> | |
61 | + | |
62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
63 | + <thead> | |
64 | + <tr> | |
65 | + <th class="center" style="width:35px;"> | |
66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
67 | + </th> | |
68 | + <th class="center" style="width:50px;">序号</th> | |
69 | + <th class="center">老师</th> | |
70 | + <th class="center">班级ID</th> | |
71 | + <th class="center">科目</th> | |
72 | + <th class="center">开始时间</th> | |
73 | + <th class="center">结束时间</th> | |
74 | + <th class="center">备注</th> | |
75 | + <th class="center">操作</th> | |
76 | + </tr> | |
77 | + </thead> | |
78 | + | |
79 | + <tbody> | |
80 | + <!-- 开始循环 --> | |
81 | + <c:choose> | |
82 | + <c:when test="${not empty varList}"> | |
83 | + <c:if test="${QX.cha == 1 }"> | |
84 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
85 | + <tr> | |
86 | + <td class='center'> | |
87 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
88 | + </td> | |
89 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
90 | + <td class='center'>${var.TEACHER_ID}</td> | |
91 | + <td class='center'>${var.CLASS_ID}</td> | |
92 | + <td class='center'>${var.SUBJECT_ID}</td> | |
93 | + <td class='center'>${var.START_DATE}</td> | |
94 | + <td class='center'>${var.END_DATE}</td> | |
95 | + <td class='center'>${var.REMARK}</td> | |
96 | + <td class="center"> | |
97 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
98 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
99 | + </c:if> | |
100 | + <div class="hidden-sm hidden-xs btn-group"> | |
101 | + <c:if test="${QX.edit == 1 }"> | |
102 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
103 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
104 | + </a> | |
105 | + </c:if> | |
106 | + <c:if test="${QX.del == 1 }"> | |
107 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
108 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
109 | + </a> | |
110 | + </c:if> | |
111 | + </div> | |
112 | + <div class="hidden-md hidden-lg"> | |
113 | + <div class="inline pos-rel"> | |
114 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
115 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
116 | + </button> | |
117 | + | |
118 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
119 | + <c:if test="${QX.edit == 1 }"> | |
120 | + <li> | |
121 | + <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
122 | + <span class="green"> | |
123 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
124 | + </span> | |
125 | + </a> | |
126 | + </li> | |
127 | + </c:if> | |
128 | + <c:if test="${QX.del == 1 }"> | |
129 | + <li> | |
130 | + <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
131 | + <span class="red"> | |
132 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
133 | + </span> | |
134 | + </a> | |
135 | + </li> | |
136 | + </c:if> | |
137 | + </ul> | |
138 | + </div> | |
139 | + </div> | |
140 | + </td> | |
141 | + </tr> | |
142 | + | |
143 | + </c:forEach> | |
144 | + </c:if> | |
145 | + <c:if test="${QX.cha == 0 }"> | |
146 | + <tr> | |
147 | + <td colspan="100" class="center">您无权查看</td> | |
148 | + </tr> | |
149 | + </c:if> | |
150 | + </c:when> | |
151 | + <c:otherwise> | |
152 | + <tr class="main_info"> | |
153 | + <td colspan="100" class="center" >没有相关数据</td> | |
154 | + </tr> | |
155 | + </c:otherwise> | |
156 | + </c:choose> | |
157 | + </tbody> | |
158 | + </table> | |
159 | + <div class="page-header position-relative"> | |
160 | + <table style="width:100%;"> | |
161 | + <tr> | |
162 | + <td style="vertical-align:top;"> | |
163 | + <c:if test="${QX.add == 1 }"> | |
164 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
165 | + </c:if> | |
166 | + <c:if test="${QX.del == 1 }"> | |
167 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
168 | + </c:if> | |
169 | + </td> | |
170 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
171 | + </tr> | |
172 | + </table> | |
173 | + </div> | |
174 | + </form> | |
175 | + | |
176 | + </div> | |
177 | + <!-- /.col --> | |
178 | + </div> | |
179 | + <!-- /.row --> | |
180 | + </div> | |
181 | + <!-- /.page-content --> | |
182 | + </div> | |
183 | + </div> | |
184 | + <!-- /.main-content --> | |
185 | + | |
186 | + <!-- 返回顶部 --> | |
187 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
188 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
189 | + </a> | |
190 | + | |
191 | + </div> | |
192 | + <!-- /.main-container --> | |
193 | + | |
194 | + <!-- basic scripts --> | |
195 | + <!-- 页面底部js¨ --> | |
196 | + <%@ include file="../../system/index/foot.jsp"%> | |
197 | + <!-- 删除时确认窗口 --> | |
198 | + <script src="static/ace/js/bootbox.js"></script> | |
199 | + <!-- ace scripts --> | |
200 | + <script src="static/ace/js/ace/ace.js"></script> | |
201 | + <!-- 下拉框 --> | |
202 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
203 | + <!-- 日期框 --> | |
204 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
205 | + <!--提示框--> | |
206 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
207 | + <script type="text/javascript"> | |
208 | + $(top.hangge());//关闭加载状态 | |
209 | + //检索 | |
210 | + function tosearch(){ | |
211 | + top.jzts(); | |
212 | + $("#Form").submit(); | |
213 | + } | |
214 | + $(function() { | |
215 | + | |
216 | + //日期框 | |
217 | + $('.date-picker').datepicker({ | |
218 | + autoclose: true, | |
219 | + todayHighlight: true | |
220 | + }); | |
221 | + | |
222 | + //下拉框 | |
223 | + if(!ace.vars['touch']) { | |
224 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
225 | + $(window) | |
226 | + .off('resize.chosen') | |
227 | + .on('resize.chosen', function() { | |
228 | + $('.chosen-select').each(function() { | |
229 | + var $this = $(this); | |
230 | + $this.next().css({'width': $this.parent().width()}); | |
231 | + }); | |
232 | + }).trigger('resize.chosen'); | |
233 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
234 | + if(event_name != 'sidebar_collapsed') return; | |
235 | + $('.chosen-select').each(function() { | |
236 | + var $this = $(this); | |
237 | + $this.next().css({'width': $this.parent().width()}); | |
238 | + }); | |
239 | + }); | |
240 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
241 | + var target = $(this).find('input[type=radio]'); | |
242 | + var which = parseInt(target.val()); | |
243 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
244 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
245 | + }); | |
246 | + } | |
247 | + | |
248 | + | |
249 | + //复选框全选控制 | |
250 | + var active_class = 'active'; | |
251 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
252 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
253 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
254 | + var row = this; | |
255 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
256 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
257 | + }); | |
258 | + }); | |
259 | + }); | |
260 | + | |
261 | + //新增 | |
262 | + function add(){ | |
263 | + top.jzts(); | |
264 | + var diag = new top.Dialog(); | |
265 | + diag.Drag=true; | |
266 | + diag.Title ="新增"; | |
267 | + diag.URL = '<%=basePath%>coursemanagement/goAdd.do'; | |
268 | + diag.Width = 450; | |
269 | + diag.Height = 355; | |
270 | + diag.Modal = true; //有无遮罩窗口 | |
271 | + diag. ShowMaxButton = true; //最大化按钮 | |
272 | + diag.ShowMinButton = true; //最小化按钮 | |
273 | + diag.CancelEvent = function(){ //关闭事件 | |
274 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
275 | + if('${page.currentPage}' == '0'){ | |
276 | + tosearch(); | |
277 | + }else{ | |
278 | + tosearch(); | |
279 | + } | |
280 | + } | |
281 | + diag.close(); | |
282 | + }; | |
283 | + diag.show(); | |
284 | + } | |
285 | + | |
286 | + //删除 | |
287 | + function del(Id){ | |
288 | + bootbox.confirm("确定要删除吗?", function(result) { | |
289 | + if(result) { | |
290 | + top.jzts(); | |
291 | + var url = "<%=basePath%>coursemanagement/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
292 | + $.get(url,function(data){ | |
293 | + tosearch(); | |
294 | + }); | |
295 | + } | |
296 | + }); | |
297 | + } | |
298 | + | |
299 | + //修改 | |
300 | + function edit(Id){ | |
301 | + top.jzts(); | |
302 | + var diag = new top.Dialog(); | |
303 | + diag.Drag=true; | |
304 | + diag.Title ="编辑"; | |
305 | + diag.URL = '<%=basePath%>coursemanagement/goEdit.do?ID='+Id; | |
306 | + diag.Width = 450; | |
307 | + diag.Height = 355; | |
308 | + diag.Modal = true; //有无遮罩窗口 | |
309 | + diag. ShowMaxButton = true; //最大化按钮 | |
310 | + diag.ShowMinButton = true; //最小化按钮 | |
311 | + diag.CancelEvent = function(){ //关闭事件 | |
312 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
313 | + tosearch(); | |
314 | + } | |
315 | + diag.close(); | |
316 | + }; | |
317 | + diag.show(); | |
318 | + } | |
319 | + | |
320 | + //批量操作 | |
321 | + function makeAll(msg){ | |
322 | + bootbox.confirm(msg, function(result) { | |
323 | + if(result) { | |
324 | + var str = ''; | |
325 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
326 | + if(document.getElementsByName('ids')[i].checked){ | |
327 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
328 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
329 | + } | |
330 | + } | |
331 | + if(str==''){ | |
332 | + bootbox.dialog({ | |
333 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
334 | + buttons: | |
335 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
336 | + }); | |
337 | + $("#zcheckbox").tips({ | |
338 | + side:1, | |
339 | + msg:'点这里全选', | |
340 | + bg:'#AE81FF', | |
341 | + time:8 | |
342 | + }); | |
343 | + return; | |
344 | + }else{ | |
345 | + if(msg == '确定要删除选中的数据吗?'){ | |
346 | + top.jzts(); | |
347 | + $.ajax({ | |
348 | + type: "POST", | |
349 | + url: '<%=basePath%>coursemanagement/deleteAll.do?tm='+new Date().getTime(), | |
350 | + data: {DATA_IDS:str}, | |
351 | + dataType:'json', | |
352 | + //beforeSend: validateData, | |
353 | + cache: false, | |
354 | + success: function(data){ | |
355 | + $.each(data.list, function(i, list){ | |
356 | + tosearch(); | |
357 | + }); | |
358 | + } | |
359 | + }); | |
360 | + } | |
361 | + } | |
362 | + } | |
363 | + }); | |
364 | + }; | |
365 | + | |
366 | + //导出excel | |
367 | + function toExcel(){ | |
368 | + window.location.href='<%=basePath%>coursemanagement/excel.do'; | |
369 | + } | |
370 | + </script> | |
371 | + | |
372 | + | |
373 | +</body> | |
374 | +</html> | |
0 | 375 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_edit.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | |
5 | +<% | |
6 | + String path = request.getContextPath(); | |
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | |
8 | +%> | |
9 | +<!DOCTYPE html> | |
10 | +<html lang="en"> | |
11 | + <head> | |
12 | + <base href="<%=basePath%>"> | |
13 | + <!-- 下拉框 --> | |
14 | + <link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
15 | + <!-- jsp文件头和头部 --> | |
16 | + <%@ include file="../../system/index/top.jsp"%> | |
17 | + <!-- 日期框 --> | |
18 | + <link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
19 | +</head> | |
20 | +<body class="no-skin"> | |
21 | +<!-- /section:basics/navbar.layout --> | |
22 | +<div class="main-container" id="main-container"> | |
23 | + <!-- /section:basics/sidebar --> | |
24 | + <div class="main-content"> | |
25 | + <div class="main-content-inner"> | |
26 | + <div class="page-content"> | |
27 | + <div class="row"> | |
28 | + <div class="col-xs-12"> | |
29 | + | |
30 | + <form action="teacher/${msg }.do" name="Form" id="Form" method="post"> | |
31 | + <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> | |
32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
34 | + <tr> | |
35 | + <td style="width:75px;text-align: right;padding-top: 13px;">所在学校:</td> | |
36 | + <td><input type="number" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="32" placeholder="这里输入所在学校" title="所在学校" style="width:98%;"/></td> | |
37 | + </tr> | |
38 | + <tr> | |
39 | + <td style="width:75px;text-align: right;padding-top: 13px;">姓名:</td> | |
40 | + <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入姓名" title="姓名" style="width:98%;"/></td> | |
41 | + </tr> | |
42 | + <tr> | |
43 | + <td style="width:75px;text-align: right;padding-top: 13px;">电话:</td> | |
44 | + <td><input type="text" name="PHONE" id="PHONE" value="${pd.PHONE}" maxlength="255" placeholder="这里输入电话" title="电话" style="width:98%;"/></td> | |
45 | + </tr> | |
46 | + <tr> | |
47 | + <td style="width:75px;text-align: right;padding-top: 13px;">座机电话:</td> | |
48 | + <td><input type="text" name="SEAT_PHONE" id="SEAT_PHONE" value="${pd.SEAT_PHONE}" maxlength="255" placeholder="这里输入座机电话" title="座机电话" style="width:98%;"/></td> | |
49 | + </tr> | |
50 | + <tr> | |
51 | + <td style="width:75px;text-align: right;padding-top: 13px;">证件号:</td> | |
52 | + <td><input type="text" name="CARD_NO" id="CARD_NO" value="${pd.CARD_NO}" maxlength="255" placeholder="这里输入证件号" title="证件号" style="width:98%;"/></td> | |
53 | + </tr> | |
54 | + <tr> | |
55 | + <td style="width:75px;text-align: right;padding-top: 13px;">账号:</td> | |
56 | + <td><input type="text" name="ACCOUT" id="ACCOUT" value="${pd.ACCOUT}" maxlength="255" placeholder="这里输入账号" title="账号" style="width:98%;"/></td> | |
57 | + </tr> | |
58 | + <tr> | |
59 | + <td style="width:75px;text-align: right;padding-top: 13px;">密码:</td> | |
60 | + <td><input type="text" name="PASSWORD" id="PASSWORD" value="${pd.PASSWORD}" maxlength="255" placeholder="这里输入密码" title="密码" style="width:98%;"/></td> | |
61 | + </tr> | |
62 | + <tr> | |
63 | + <td style="width:75px;text-align: right;padding-top: 13px;">性别:</td> | |
64 | + <td><input type="number" name="SEX" id="SEX" value="${pd.SEX}" maxlength="32" placeholder="这里输入性别" title="性别" style="width:98%;"/></td> | |
65 | + </tr> | |
66 | + <tr> | |
67 | + <td style="width:75px;text-align: right;padding-top: 13px;">科目列表:</td> | |
68 | + <td><input type="text" name="SUBJECT_IDS" id="SUBJECT_IDS" value="${pd.SUBJECT_IDS}" maxlength="255" placeholder="这里输入科目列表" title="科目列表" style="width:98%;"/></td> | |
69 | + </tr> | |
70 | + <tr> | |
71 | + <td style="width:75px;text-align: right;padding-top: 13px;">教师卡编号:</td> | |
72 | + <td><input type="text" name="KEYPAD_ID" id="KEYPAD_ID" value="${pd.KEYPAD_ID}" maxlength="255" placeholder="这里输入教师卡编号" title="教师卡编号" style="width:98%;"/></td> | |
73 | + </tr> | |
74 | + <tr> | |
75 | + <td style="text-align: center;" colspan="10"> | |
76 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
77 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
78 | + </td> | |
79 | + </tr> | |
80 | + </table> | |
81 | + </div> | |
82 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
83 | + </form> | |
84 | + </div> | |
85 | + <!-- /.col --> | |
86 | + </div> | |
87 | + <!-- /.row --> | |
88 | + </div> | |
89 | + <!-- /.page-content --> | |
90 | + </div> | |
91 | + </div> | |
92 | + <!-- /.main-content --> | |
93 | +</div> | |
94 | +<!-- /.main-container --> | |
95 | + | |
96 | + | |
97 | + <!-- 页面底部js¨ --> | |
98 | + <%@ include file="../../system/index/foot.jsp"%> | |
99 | + <!-- 下拉框 --> | |
100 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
101 | + <!-- 日期框 --> | |
102 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
103 | + <!--提示框--> | |
104 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
105 | + <script type="text/javascript"> | |
106 | + $(top.hangge()); | |
107 | + //保存 | |
108 | + function save(){ | |
109 | + if($("#SCHOOL_ID").val()==""){ | |
110 | + $("#SCHOOL_ID").tips({ | |
111 | + side:3, | |
112 | + msg:'请输入所在学校', | |
113 | + bg:'#AE81FF', | |
114 | + time:2 | |
115 | + }); | |
116 | + $("#SCHOOL_ID").focus(); | |
117 | + return false; | |
118 | + } | |
119 | + if($("#NAME").val()==""){ | |
120 | + $("#NAME").tips({ | |
121 | + side:3, | |
122 | + msg:'请输入姓名', | |
123 | + bg:'#AE81FF', | |
124 | + time:2 | |
125 | + }); | |
126 | + $("#NAME").focus(); | |
127 | + return false; | |
128 | + } | |
129 | + if($("#PHONE").val()==""){ | |
130 | + $("#PHONE").tips({ | |
131 | + side:3, | |
132 | + msg:'请输入电话', | |
133 | + bg:'#AE81FF', | |
134 | + time:2 | |
135 | + }); | |
136 | + $("#PHONE").focus(); | |
137 | + return false; | |
138 | + } | |
139 | + if($("#SEAT_PHONE").val()==""){ | |
140 | + $("#SEAT_PHONE").tips({ | |
141 | + side:3, | |
142 | + msg:'请输入座机电话', | |
143 | + bg:'#AE81FF', | |
144 | + time:2 | |
145 | + }); | |
146 | + $("#SEAT_PHONE").focus(); | |
147 | + return false; | |
148 | + } | |
149 | + if($("#CARD_NO").val()==""){ | |
150 | + $("#CARD_NO").tips({ | |
151 | + side:3, | |
152 | + msg:'请输入证件号', | |
153 | + bg:'#AE81FF', | |
154 | + time:2 | |
155 | + }); | |
156 | + $("#CARD_NO").focus(); | |
157 | + return false; | |
158 | + } | |
159 | + if($("#ACCOUT").val()==""){ | |
160 | + $("#ACCOUT").tips({ | |
161 | + side:3, | |
162 | + msg:'请输入账号', | |
163 | + bg:'#AE81FF', | |
164 | + time:2 | |
165 | + }); | |
166 | + $("#ACCOUT").focus(); | |
167 | + return false; | |
168 | + } | |
169 | + if($("#PASSWORD").val()==""){ | |
170 | + $("#PASSWORD").tips({ | |
171 | + side:3, | |
172 | + msg:'请输入密码', | |
173 | + bg:'#AE81FF', | |
174 | + time:2 | |
175 | + }); | |
176 | + $("#PASSWORD").focus(); | |
177 | + return false; | |
178 | + } | |
179 | + if($("#SEX").val()==""){ | |
180 | + $("#SEX").tips({ | |
181 | + side:3, | |
182 | + msg:'请输入性别', | |
183 | + bg:'#AE81FF', | |
184 | + time:2 | |
185 | + }); | |
186 | + $("#SEX").focus(); | |
187 | + return false; | |
188 | + } | |
189 | + if($("#SUBJECT_IDS").val()==""){ | |
190 | + $("#SUBJECT_IDS").tips({ | |
191 | + side:3, | |
192 | + msg:'请输入科目列表', | |
193 | + bg:'#AE81FF', | |
194 | + time:2 | |
195 | + }); | |
196 | + $("#SUBJECT_IDS").focus(); | |
197 | + return false; | |
198 | + } | |
199 | + if($("#KEYPAD_ID").val()==""){ | |
200 | + $("#KEYPAD_ID").tips({ | |
201 | + side:3, | |
202 | + msg:'请输入教师卡编号', | |
203 | + bg:'#AE81FF', | |
204 | + time:2 | |
205 | + }); | |
206 | + $("#KEYPAD_ID").focus(); | |
207 | + return false; | |
208 | + } | |
209 | + $("#Form").submit(); | |
210 | + $("#zhongxin").hide(); | |
211 | + $("#zhongxin2").show(); | |
212 | + } | |
213 | + | |
214 | + $(function() { | |
215 | + //日期框 | |
216 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
217 | + }); | |
218 | + </script> | |
219 | +</body> | |
220 | +</html> | |
0 | 221 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_list.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<% | |
5 | + String path = request.getContextPath(); | |
6 | + String basePath = request.getScheme() + "://" | |
7 | + + request.getServerName() + ":" + request.getServerPort() | |
8 | + + path + "/"; | |
9 | +%> | |
10 | +<!DOCTYPE html> | |
11 | +<html lang="en"> | |
12 | +<head> | |
13 | +<base href="<%=basePath%>"> | |
14 | +<!-- 下拉框 --> | |
15 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
16 | +<!-- jsp文件头和头部 --> | |
17 | +<%@ include file="../../system/index/top.jsp"%> | |
18 | +<!-- 日期框 --> | |
19 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
20 | +</head> | |
21 | +<body class="no-skin"> | |
22 | + | |
23 | + <!-- /section:basics/navbar.layout --> | |
24 | + <div class="main-container" id="main-container"> | |
25 | + <!-- /section:basics/sidebar --> | |
26 | + <div class="main-content"> | |
27 | + <div class="main-content-inner"> | |
28 | + <div class="page-content"> | |
29 | + <div class="row"> | |
30 | + <div class="col-xs-12"> | |
31 | + | |
32 | + <!-- 检索 --> | |
33 | + <form action="teacher/list.do" method="post" name="Form" id="Form"> | |
34 | + <table style="margin-top:5px;"> | |
35 | + <tr> | |
36 | + <td> | |
37 | + <div class="nav-search"> | |
38 | + <span class="input-icon"> | |
39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
41 | + </span> | |
42 | + </div> | |
43 | + </td> | |
44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
46 | + <td style="vertical-align:top;padding-left:2px;"> | |
47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
48 | + <option value=""></option> | |
49 | + <option value="">全部</option> | |
50 | + <option value="">1</option> | |
51 | + <option value="">2</option> | |
52 | + </select> | |
53 | + </td> | |
54 | + <c:if test="${QX.cha == 1 }"> | |
55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
56 | + </c:if> | |
57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
58 | + </tr> | |
59 | + </table> | |
60 | + <!-- 检索 --> | |
61 | + | |
62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
63 | + <thead> | |
64 | + <tr> | |
65 | + <th class="center" style="width:35px;"> | |
66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
67 | + </th> | |
68 | + <th class="center" style="width:50px;">序号</th> | |
69 | + <th class="center">所在学校</th> | |
70 | + <th class="center">姓名</th> | |
71 | + <th class="center">电话</th> | |
72 | + <th class="center">座机电话</th> | |
73 | + <th class="center">证件号</th> | |
74 | + <th class="center">账号</th> | |
75 | + <th class="center">密码</th> | |
76 | + <th class="center">性别</th> | |
77 | + <th class="center">科目列表</th> | |
78 | + <th class="center">教师卡编号</th> | |
79 | + <th class="center">操作</th> | |
80 | + </tr> | |
81 | + </thead> | |
82 | + | |
83 | + <tbody> | |
84 | + <!-- 开始循环 --> | |
85 | + <c:choose> | |
86 | + <c:when test="${not empty varList}"> | |
87 | + <c:if test="${QX.cha == 1 }"> | |
88 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
89 | + <tr> | |
90 | + <td class='center'> | |
91 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
92 | + </td> | |
93 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
94 | + <td class='center'>${var.SCHOOL_ID}</td> | |
95 | + <td class='center'>${var.NAME}</td> | |
96 | + <td class='center'>${var.PHONE}</td> | |
97 | + <td class='center'>${var.SEAT_PHONE}</td> | |
98 | + <td class='center'>${var.CARD_NO}</td> | |
99 | + <td class='center'>${var.ACCOUT}</td> | |
100 | + <td class='center'>${var.PASSWORD}</td> | |
101 | + <td class='center'>${var.SEX}</td> | |
102 | + <td class='center'>${var.SUBJECT_IDS}</td> | |
103 | + <td class='center'>${var.KEYPAD_ID}</td> | |
104 | + <td class="center"> | |
105 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
106 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
107 | + </c:if> | |
108 | + <div class="hidden-sm hidden-xs btn-group"> | |
109 | + <c:if test="${QX.edit == 1 }"> | |
110 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
111 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
112 | + </a> | |
113 | + </c:if> | |
114 | + <c:if test="${QX.del == 1 }"> | |
115 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
116 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
117 | + </a> | |
118 | + </c:if> | |
119 | + </div> | |
120 | + <div class="hidden-md hidden-lg"> | |
121 | + <div class="inline pos-rel"> | |
122 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
123 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
124 | + </button> | |
125 | + | |
126 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
127 | + <c:if test="${QX.edit == 1 }"> | |
128 | + <li> | |
129 | + <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
130 | + <span class="green"> | |
131 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
132 | + </span> | |
133 | + </a> | |
134 | + </li> | |
135 | + </c:if> | |
136 | + <c:if test="${QX.del == 1 }"> | |
137 | + <li> | |
138 | + <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
139 | + <span class="red"> | |
140 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
141 | + </span> | |
142 | + </a> | |
143 | + </li> | |
144 | + </c:if> | |
145 | + </ul> | |
146 | + </div> | |
147 | + </div> | |
148 | + </td> | |
149 | + </tr> | |
150 | + | |
151 | + </c:forEach> | |
152 | + </c:if> | |
153 | + <c:if test="${QX.cha == 0 }"> | |
154 | + <tr> | |
155 | + <td colspan="100" class="center">您无权查看</td> | |
156 | + </tr> | |
157 | + </c:if> | |
158 | + </c:when> | |
159 | + <c:otherwise> | |
160 | + <tr class="main_info"> | |
161 | + <td colspan="100" class="center" >没有相关数据</td> | |
162 | + </tr> | |
163 | + </c:otherwise> | |
164 | + </c:choose> | |
165 | + </tbody> | |
166 | + </table> | |
167 | + <div class="page-header position-relative"> | |
168 | + <table style="width:100%;"> | |
169 | + <tr> | |
170 | + <td style="vertical-align:top;"> | |
171 | + <c:if test="${QX.add == 1 }"> | |
172 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
173 | + </c:if> | |
174 | + <c:if test="${QX.del == 1 }"> | |
175 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
176 | + </c:if> | |
177 | + </td> | |
178 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
179 | + </tr> | |
180 | + </table> | |
181 | + </div> | |
182 | + </form> | |
183 | + | |
184 | + </div> | |
185 | + <!-- /.col --> | |
186 | + </div> | |
187 | + <!-- /.row --> | |
188 | + </div> | |
189 | + <!-- /.page-content --> | |
190 | + </div> | |
191 | + </div> | |
192 | + <!-- /.main-content --> | |
193 | + | |
194 | + <!-- 返回顶部 --> | |
195 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
196 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
197 | + </a> | |
198 | + | |
199 | + </div> | |
200 | + <!-- /.main-container --> | |
201 | + | |
202 | + <!-- basic scripts --> | |
203 | + <!-- 页面底部js¨ --> | |
204 | + <%@ include file="../../system/index/foot.jsp"%> | |
205 | + <!-- 删除时确认窗口 --> | |
206 | + <script src="static/ace/js/bootbox.js"></script> | |
207 | + <!-- ace scripts --> | |
208 | + <script src="static/ace/js/ace/ace.js"></script> | |
209 | + <!-- 下拉框 --> | |
210 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
211 | + <!-- 日期框 --> | |
212 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
213 | + <!--提示框--> | |
214 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
215 | + <script type="text/javascript"> | |
216 | + $(top.hangge());//关闭加载状态 | |
217 | + //检索 | |
218 | + function tosearch(){ | |
219 | + top.jzts(); | |
220 | + $("#Form").submit(); | |
221 | + } | |
222 | + $(function() { | |
223 | + | |
224 | + //日期框 | |
225 | + $('.date-picker').datepicker({ | |
226 | + autoclose: true, | |
227 | + todayHighlight: true | |
228 | + }); | |
229 | + | |
230 | + //下拉框 | |
231 | + if(!ace.vars['touch']) { | |
232 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
233 | + $(window) | |
234 | + .off('resize.chosen') | |
235 | + .on('resize.chosen', function() { | |
236 | + $('.chosen-select').each(function() { | |
237 | + var $this = $(this); | |
238 | + $this.next().css({'width': $this.parent().width()}); | |
239 | + }); | |
240 | + }).trigger('resize.chosen'); | |
241 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
242 | + if(event_name != 'sidebar_collapsed') return; | |
243 | + $('.chosen-select').each(function() { | |
244 | + var $this = $(this); | |
245 | + $this.next().css({'width': $this.parent().width()}); | |
246 | + }); | |
247 | + }); | |
248 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
249 | + var target = $(this).find('input[type=radio]'); | |
250 | + var which = parseInt(target.val()); | |
251 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
252 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
253 | + }); | |
254 | + } | |
255 | + | |
256 | + | |
257 | + //复选框全选控制 | |
258 | + var active_class = 'active'; | |
259 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
260 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
261 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
262 | + var row = this; | |
263 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
264 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
265 | + }); | |
266 | + }); | |
267 | + }); | |
268 | + | |
269 | + //新增 | |
270 | + function add(){ | |
271 | + top.jzts(); | |
272 | + var diag = new top.Dialog(); | |
273 | + diag.Drag=true; | |
274 | + diag.Title ="新增"; | |
275 | + diag.URL = '<%=basePath%>teacher/goAdd.do'; | |
276 | + diag.Width = 450; | |
277 | + diag.Height = 355; | |
278 | + diag.Modal = true; //有无遮罩窗口 | |
279 | + diag. ShowMaxButton = true; //最大化按钮 | |
280 | + diag.ShowMinButton = true; //最小化按钮 | |
281 | + diag.CancelEvent = function(){ //关闭事件 | |
282 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
283 | + if('${page.currentPage}' == '0'){ | |
284 | + tosearch(); | |
285 | + }else{ | |
286 | + tosearch(); | |
287 | + } | |
288 | + } | |
289 | + diag.close(); | |
290 | + }; | |
291 | + diag.show(); | |
292 | + } | |
293 | + | |
294 | + //删除 | |
295 | + function del(Id){ | |
296 | + bootbox.confirm("确定要删除吗?", function(result) { | |
297 | + if(result) { | |
298 | + top.jzts(); | |
299 | + var url = "<%=basePath%>teacher/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
300 | + $.get(url,function(data){ | |
301 | + tosearch(); | |
302 | + }); | |
303 | + } | |
304 | + }); | |
305 | + } | |
306 | + | |
307 | + //修改 | |
308 | + function edit(Id){ | |
309 | + top.jzts(); | |
310 | + var diag = new top.Dialog(); | |
311 | + diag.Drag=true; | |
312 | + diag.Title ="编辑"; | |
313 | + diag.URL = '<%=basePath%>teacher/goEdit.do?ID='+Id; | |
314 | + diag.Width = 450; | |
315 | + diag.Height = 355; | |
316 | + diag.Modal = true; //有无遮罩窗口 | |
317 | + diag. ShowMaxButton = true; //最大化按钮 | |
318 | + diag.ShowMinButton = true; //最小化按钮 | |
319 | + diag.CancelEvent = function(){ //关闭事件 | |
320 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
321 | + tosearch(); | |
322 | + } | |
323 | + diag.close(); | |
324 | + }; | |
325 | + diag.show(); | |
326 | + } | |
327 | + | |
328 | + //批量操作 | |
329 | + function makeAll(msg){ | |
330 | + bootbox.confirm(msg, function(result) { | |
331 | + if(result) { | |
332 | + var str = ''; | |
333 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
334 | + if(document.getElementsByName('ids')[i].checked){ | |
335 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
336 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
337 | + } | |
338 | + } | |
339 | + if(str==''){ | |
340 | + bootbox.dialog({ | |
341 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
342 | + buttons: | |
343 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
344 | + }); | |
345 | + $("#zcheckbox").tips({ | |
346 | + side:1, | |
347 | + msg:'点这里全选', | |
348 | + bg:'#AE81FF', | |
349 | + time:8 | |
350 | + }); | |
351 | + return; | |
352 | + }else{ | |
353 | + if(msg == '确定要删除选中的数据吗?'){ | |
354 | + top.jzts(); | |
355 | + $.ajax({ | |
356 | + type: "POST", | |
357 | + url: '<%=basePath%>teacher/deleteAll.do?tm='+new Date().getTime(), | |
358 | + data: {DATA_IDS:str}, | |
359 | + dataType:'json', | |
360 | + //beforeSend: validateData, | |
361 | + cache: false, | |
362 | + success: function(data){ | |
363 | + $.each(data.list, function(i, list){ | |
364 | + tosearch(); | |
365 | + }); | |
366 | + } | |
367 | + }); | |
368 | + } | |
369 | + } | |
370 | + } | |
371 | + }); | |
372 | + }; | |
373 | + | |
374 | + //导出excel | |
375 | + function toExcel(){ | |
376 | + window.location.href='<%=basePath%>teacher/excel.do'; | |
377 | + } | |
378 | + </script> | |
379 | + | |
380 | + | |
381 | +</body> | |
382 | +</html> | |
0 | 383 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/system/index/head.jsp
... | ... | @@ -30,15 +30,15 @@ |
30 | 30 | </div> |
31 | 31 | |
32 | 32 | <!-- #section:basics/navbar.dropdown --> |
33 | - <div class="navbar-buttons navbar-header pull-right" role="navigation"> | |
33 | + <div class="navbar-buttons navbar-header pull-right" role="navigation"> | |
34 | 34 | <ul class="nav ace-nav"> |
35 | - <li class="grey"> | |
35 | + <li class="grey" style="display:none"> | |
36 | 36 | <a data-toggle="dropdown" class="dropdown-toggle" href="#"> |
37 | 37 | <i class="ace-icon fa fa-tasks"></i> |
38 | 38 | <span class="badge badge-grey">2</span> |
39 | 39 | </a> |
40 | 40 | |
41 | - <ul class="dropdown-menu-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close"> | |
41 | + <ul class="dropdown-menu-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close"> | |
42 | 42 | <li class="dropdown-header"> |
43 | 43 | <i class="ace-icon fa fa-check"></i> |
44 | 44 | 预留功能,待开发 |
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | <li> |
69 | 69 | <a onclick="editUserH();" style="cursor:pointer;"><i class="ace-icon fa fa-user"></i>修改资料</a><!-- editUserH()在 WebRoot\static\js\myjs\head.js中 --> |
70 | 70 | </li> |
71 | - <li id="systemset"> | |
71 | + <li id="systemset" style="display:none" > | |
72 | 72 | <a onclick="editSys();" style="cursor:pointer;"><i class="ace-icon fa fa-cog"></i>系统设置</a><!-- editSys()在 WebRoot\static\js\myjs\head.js中 --> |
73 | 73 | </li> |
74 | 74 | <li class="divider"></li> | ... | ... |
resources/mybatis1/sunvote/ChapterMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="ChapterMapper"> | |
4 | + | |
5 | + <!--表名 --> | |
6 | + <sql id="tableName"> | |
7 | + SV_CHAPTER | |
8 | + </sql> | |
9 | + | |
10 | + <!-- 字段 --> | |
11 | + <sql id="Field"> | |
12 | + NAME, | |
13 | + CDESCRIPTION, | |
14 | + REMARK, | |
15 | + ID | |
16 | + </sql> | |
17 | + | |
18 | + <!-- 字段值 --> | |
19 | + <sql id="FieldValue"> | |
20 | + #{NAME}, | |
21 | + #{CDESCRIPTION}, | |
22 | + #{REMARK}, | |
23 | + #{ID} | |
24 | + </sql> | |
25 | + | |
26 | + <!-- 新增--> | |
27 | + <insert id="save" parameterType="pd"> | |
28 | + insert into | |
29 | + <include refid="tableName"></include> | |
30 | + ( | |
31 | + NAME, | |
32 | + CDESCRIPTION, | |
33 | + REMARK | |
34 | + ) values ( | |
35 | + #{NAME}, | |
36 | + #{CDESCRIPTION}, | |
37 | + #{REMARK} | |
38 | + ) | |
39 | + </insert> | |
40 | + | |
41 | + <!-- 删除--> | |
42 | + <delete id="delete" parameterType="pd"> | |
43 | + delete from | |
44 | + <include refid="tableName"></include> | |
45 | + where | |
46 | + ID = #{ID} | |
47 | + </delete> | |
48 | + | |
49 | + <!-- 修改 --> | |
50 | + <update id="edit" parameterType="pd"> | |
51 | + update | |
52 | + <include refid="tableName"></include> | |
53 | + set | |
54 | + NAME = #{NAME}, | |
55 | + CDESCRIPTION = #{CDESCRIPTION}, | |
56 | + REMARK = #{REMARK}, | |
57 | + ID = #{ID} | |
58 | + where | |
59 | + ID = #{ID} | |
60 | + </update> | |
61 | + | |
62 | + <!-- 通过ID获取数据 --> | |
63 | + <select id="findById" parameterType="pd" resultType="pd"> | |
64 | + select | |
65 | + <include refid="Field"></include> | |
66 | + from | |
67 | + <include refid="tableName"></include> | |
68 | + where | |
69 | + ID = #{ID} | |
70 | + </select> | |
71 | + | |
72 | + <!-- 列表 --> | |
73 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
74 | + select | |
75 | + <include refid="Field"></include> | |
76 | + from | |
77 | + <include refid="tableName"></include> | |
78 | + where 1=1 | |
79 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
80 | + and | |
81 | + ( | |
82 | + <!-- 根据需求自己加检索条件 | |
83 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
84 | + or | |
85 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
86 | + --> | |
87 | + ) | |
88 | + </if> | |
89 | + </select> | |
90 | + | |
91 | + <!-- 列表(全部) --> | |
92 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
93 | + select | |
94 | + <include refid="Field"></include> | |
95 | + from | |
96 | + <include refid="tableName"></include> | |
97 | + </select> | |
98 | + | |
99 | + <!-- 批量删除 --> | |
100 | + <delete id="deleteAll" parameterType="String"> | |
101 | + delete from | |
102 | + <include refid="tableName"></include> | |
103 | + where | |
104 | + ID in | |
105 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
106 | + #{item} | |
107 | + </foreach> | |
108 | + </delete> | |
109 | + | |
110 | + <!-- fh313596790qq(青苔) --> | |
111 | +</mapper> | |
0 | 112 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/CourseManagementMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="CourseManagementMapper"> | |
4 | + | |
5 | + <!--表名 --> | |
6 | + <sql id="tableName"> | |
7 | + SV_COURSEMANAGEMENT | |
8 | + </sql> | |
9 | + | |
10 | + <!-- 字段 --> | |
11 | + <sql id="Field"> | |
12 | + TEACHER_ID, | |
13 | + CLASS_ID, | |
14 | + SUBJECT_ID, | |
15 | + START_DATE, | |
16 | + END_DATE, | |
17 | + REMARK, | |
18 | + ID | |
19 | + </sql> | |
20 | + | |
21 | + <!-- 字段值 --> | |
22 | + <sql id="FieldValue"> | |
23 | + #{TEACHER_ID}, | |
24 | + #{CLASS_ID}, | |
25 | + #{SUBJECT_ID}, | |
26 | + #{START_DATE}, | |
27 | + #{END_DATE}, | |
28 | + #{REMARK}, | |
29 | + #{ID} | |
30 | + </sql> | |
31 | + | |
32 | + <!-- 新增--> | |
33 | + <insert id="save" parameterType="pd"> | |
34 | + insert into | |
35 | + <include refid="tableName"></include> | |
36 | + ( | |
37 | + TEACHER_ID, | |
38 | + CLASS_ID, | |
39 | + SUBJECT_ID, | |
40 | + START_DATE, | |
41 | + END_DATE, | |
42 | + REMARK | |
43 | + ) values ( | |
44 | + #{TEACHER_ID}, | |
45 | + #{CLASS_ID}, | |
46 | + #{SUBJECT_ID}, | |
47 | + #{START_DATE}, | |
48 | + #{END_DATE}, | |
49 | + #{REMARK} | |
50 | + ) | |
51 | + </insert> | |
52 | + | |
53 | + <!-- 删除--> | |
54 | + <delete id="delete" parameterType="pd"> | |
55 | + delete from | |
56 | + <include refid="tableName"></include> | |
57 | + where | |
58 | + ID = #{ID} | |
59 | + </delete> | |
60 | + | |
61 | + <!-- 修改 --> | |
62 | + <update id="edit" parameterType="pd"> | |
63 | + update | |
64 | + <include refid="tableName"></include> | |
65 | + set | |
66 | + TEACHER_ID = #{TEACHER_ID}, | |
67 | + CLASS_ID = #{CLASS_ID}, | |
68 | + SUBJECT_ID = #{SUBJECT_ID}, | |
69 | + START_DATE = #{START_DATE}, | |
70 | + END_DATE = #{END_DATE}, | |
71 | + REMARK = #{REMARK}, | |
72 | + ID = ${ID} | |
73 | + where | |
74 | + ID = #{ID} | |
75 | + </update> | |
76 | + | |
77 | + <!-- 通过ID获取数据 --> | |
78 | + <select id="findById" parameterType="pd" resultType="pd"> | |
79 | + select | |
80 | + <include refid="Field"></include> | |
81 | + from | |
82 | + <include refid="tableName"></include> | |
83 | + where | |
84 | + ID = #{ID} | |
85 | + </select> | |
86 | + | |
87 | + <!-- 列表 --> | |
88 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
89 | + select | |
90 | + <include refid="Field"></include> | |
91 | + from | |
92 | + <include refid="tableName"></include> | |
93 | + where 1=1 | |
94 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
95 | + and | |
96 | + ( | |
97 | + <!-- 根据需求自己加检索条件 | |
98 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
99 | + or | |
100 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
101 | + --> | |
102 | + ) | |
103 | + </if> | |
104 | + </select> | |
105 | + | |
106 | + <!-- 列表(全部) --> | |
107 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
108 | + select | |
109 | + <include refid="Field"></include> | |
110 | + from | |
111 | + <include refid="tableName"></include> | |
112 | + </select> | |
113 | + | |
114 | + <!-- 批量删除 --> | |
115 | + <delete id="deleteAll" parameterType="String"> | |
116 | + delete from | |
117 | + <include refid="tableName"></include> | |
118 | + where | |
119 | + ID in | |
120 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
121 | + #{item} | |
122 | + </foreach> | |
123 | + </delete> | |
124 | + | |
125 | + <!-- fh313596790qq(青苔) --> | |
126 | +</mapper> | |
0 | 127 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/TeacherMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="TeacherMapper"> | |
4 | + | |
5 | + <!--表名 --> | |
6 | + <sql id="tableName"> | |
7 | + SV_TEACHER | |
8 | + </sql> | |
9 | + | |
10 | + <!-- 字段 --> | |
11 | + <sql id="Field"> | |
12 | + SCHOOL_ID, | |
13 | + NAME, | |
14 | + PHONE, | |
15 | + SEAT_PHONE, | |
16 | + CARD_NO, | |
17 | + ACCOUT, | |
18 | + PASSWORD, | |
19 | + SEX, | |
20 | + SUBJECT_IDS, | |
21 | + KEYPAD_ID, | |
22 | + ID | |
23 | + </sql> | |
24 | + | |
25 | + <!-- 字段值 --> | |
26 | + <sql id="FieldValue"> | |
27 | + #{SCHOOL_ID}, | |
28 | + #{NAME}, | |
29 | + #{PHONE}, | |
30 | + #{SEAT_PHONE}, | |
31 | + #{CARD_NO}, | |
32 | + #{ACCOUT}, | |
33 | + #{PASSWORD}, | |
34 | + #{SEX}, | |
35 | + #{SUBJECT_IDS}, | |
36 | + #{KEYPAD_ID}, | |
37 | + #{ID} | |
38 | + </sql> | |
39 | + | |
40 | + <!-- 新增--> | |
41 | + <insert id="save" parameterType="pd"> | |
42 | + insert into | |
43 | + <include refid="tableName"></include> | |
44 | + ( | |
45 | + SCHOOL_ID, | |
46 | + NAME, | |
47 | + PHONE, | |
48 | + SEAT_PHONE, | |
49 | + CARD_NO, | |
50 | + ACCOUT, | |
51 | + PASSWORD, | |
52 | + SEX, | |
53 | + SUBJECT_IDS, | |
54 | + KEYPAD_ID | |
55 | + ) values ( | |
56 | + #{SCHOOL_ID}, | |
57 | + #{NAME}, | |
58 | + #{PHONE}, | |
59 | + #{SEAT_PHONE}, | |
60 | + #{CARD_NO}, | |
61 | + #{ACCOUT}, | |
62 | + #{PASSWORD}, | |
63 | + #{SEX}, | |
64 | + #{SUBJECT_IDS}, | |
65 | + #{KEYPAD_ID} | |
66 | + ) | |
67 | + </insert> | |
68 | + | |
69 | + <!-- 删除--> | |
70 | + <delete id="delete" parameterType="pd"> | |
71 | + delete from | |
72 | + <include refid="tableName"></include> | |
73 | + where | |
74 | + ID = #{ID} | |
75 | + </delete> | |
76 | + | |
77 | + <!-- 修改 --> | |
78 | + <update id="edit" parameterType="pd"> | |
79 | + update | |
80 | + <include refid="tableName"></include> | |
81 | + set | |
82 | + SCHOOL_ID = #{SCHOOL_ID}, | |
83 | + NAME = #{NAME}, | |
84 | + PHONE = #{PHONE}, | |
85 | + SEAT_PHONE = #{SEAT_PHONE}, | |
86 | + CARD_NO = #{CARD_NO}, | |
87 | + ACCOUT = #{ACCOUT}, | |
88 | + PASSWORD = #{PASSWORD}, | |
89 | + SEX = #{SEX}, | |
90 | + SUBJECT_IDS = #{SUBJECT_IDS}, | |
91 | + KEYPAD_ID = #{KEYPAD_ID}, | |
92 | + ID = ${ID} | |
93 | + where | |
94 | + ID = #{ID} | |
95 | + </update> | |
96 | + | |
97 | + <!-- 通过ID获取数据 --> | |
98 | + <select id="findById" parameterType="pd" resultType="pd"> | |
99 | + select | |
100 | + <include refid="Field"></include> | |
101 | + from | |
102 | + <include refid="tableName"></include> | |
103 | + where | |
104 | + ID = #{ID} | |
105 | + </select> | |
106 | + | |
107 | + <!-- 列表 --> | |
108 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
109 | + select | |
110 | + <include refid="Field"></include> | |
111 | + from | |
112 | + <include refid="tableName"></include> | |
113 | + where 1=1 | |
114 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
115 | + and | |
116 | + ( | |
117 | + <!-- 根据需求自己加检索条件 | |
118 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
119 | + or | |
120 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
121 | + --> | |
122 | + ) | |
123 | + </if> | |
124 | + </select> | |
125 | + | |
126 | + <!-- 列表(全部) --> | |
127 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
128 | + select | |
129 | + <include refid="Field"></include> | |
130 | + from | |
131 | + <include refid="tableName"></include> | |
132 | + </select> | |
133 | + | |
134 | + <!-- 批量删除 --> | |
135 | + <delete id="deleteAll" parameterType="String"> | |
136 | + delete from | |
137 | + <include refid="tableName"></include> | |
138 | + where | |
139 | + ID in | |
140 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
141 | + #{item} | |
142 | + </foreach> | |
143 | + </delete> | |
144 | + | |
145 | + <!-- fh313596790qq(青苔) --> | |
146 | +</mapper> | |
0 | 147 | \ No newline at end of file | ... | ... |
src/com/fh/controller/sunvote/chapter/ChapterController.java
0 → 100644
1 | +package com.fh.controller.sunvote.chapter; | |
2 | + | |
3 | +import java.io.PrintWriter; | |
4 | +import java.text.DateFormat; | |
5 | +import java.text.SimpleDateFormat; | |
6 | +import java.util.ArrayList; | |
7 | +import java.util.Date; | |
8 | +import java.util.HashMap; | |
9 | +import java.util.List; | |
10 | +import java.util.Map; | |
11 | +import javax.annotation.Resource; | |
12 | +import org.springframework.beans.propertyeditors.CustomDateEditor; | |
13 | +import org.springframework.stereotype.Controller; | |
14 | +import org.springframework.web.bind.WebDataBinder; | |
15 | +import org.springframework.web.bind.annotation.InitBinder; | |
16 | +import org.springframework.web.bind.annotation.RequestMapping; | |
17 | +import org.springframework.web.bind.annotation.ResponseBody; | |
18 | +import org.springframework.web.servlet.ModelAndView; | |
19 | +import com.fh.controller.base.BaseController; | |
20 | +import com.fh.entity.Page; | |
21 | +import com.fh.util.AppUtil; | |
22 | +import com.fh.util.ObjectExcelView; | |
23 | +import com.fh.util.PageData; | |
24 | +import com.fh.util.Jurisdiction; | |
25 | +import com.fh.util.Tools; | |
26 | +import com.fh.service.sunvote.chapter.ChapterManager; | |
27 | + | |
28 | +/** | |
29 | + * 说明:章节管理 | |
30 | + * 创建人:Elvis | |
31 | + * 创建时间:2018-04-26 | |
32 | + */ | |
33 | +@Controller | |
34 | +@RequestMapping(value="/chapter") | |
35 | +public class ChapterController extends BaseController { | |
36 | + | |
37 | + String menuUrl = "chapter/list.do"; //菜单地址(权限用) | |
38 | + @Resource(name="chapterService") | |
39 | + private ChapterManager chapterService; | |
40 | + | |
41 | + /**保存 | |
42 | + * @param | |
43 | + * @throws Exception | |
44 | + */ | |
45 | + @RequestMapping(value="/save") | |
46 | + public ModelAndView save() throws Exception{ | |
47 | + logBefore(logger, Jurisdiction.getUsername()+"新增Chapter"); | |
48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
49 | + ModelAndView mv = this.getModelAndView(); | |
50 | + PageData pd = new PageData(); | |
51 | + pd = this.getPageData(); | |
52 | + chapterService.save(pd); | |
53 | + mv.addObject("msg","success"); | |
54 | + mv.setViewName("save_result"); | |
55 | + return mv; | |
56 | + } | |
57 | + | |
58 | + /**删除 | |
59 | + * @param out | |
60 | + * @throws Exception | |
61 | + */ | |
62 | + @RequestMapping(value="/delete") | |
63 | + public void delete(PrintWriter out) throws Exception{ | |
64 | + logBefore(logger, Jurisdiction.getUsername()+"删除Chapter"); | |
65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
66 | + PageData pd = new PageData(); | |
67 | + pd = this.getPageData(); | |
68 | + chapterService.delete(pd); | |
69 | + out.write("success"); | |
70 | + out.close(); | |
71 | + } | |
72 | + | |
73 | + /**修改 | |
74 | + * @param | |
75 | + * @throws Exception | |
76 | + */ | |
77 | + @RequestMapping(value="/edit") | |
78 | + public ModelAndView edit() throws Exception{ | |
79 | + logBefore(logger, Jurisdiction.getUsername()+"修改Chapter"); | |
80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
81 | + ModelAndView mv = this.getModelAndView(); | |
82 | + PageData pd = new PageData(); | |
83 | + pd = this.getPageData(); | |
84 | + chapterService.edit(pd); | |
85 | + mv.addObject("msg","success"); | |
86 | + mv.setViewName("save_result"); | |
87 | + return mv; | |
88 | + } | |
89 | + | |
90 | + /**列表 | |
91 | + * @param page | |
92 | + * @throws Exception | |
93 | + */ | |
94 | + @RequestMapping(value="/list") | |
95 | + public ModelAndView list(Page page) throws Exception{ | |
96 | + logBefore(logger, Jurisdiction.getUsername()+"列表Chapter"); | |
97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
98 | + ModelAndView mv = this.getModelAndView(); | |
99 | + PageData pd = new PageData(); | |
100 | + pd = this.getPageData(); | |
101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
102 | + if(null != keywords && !"".equals(keywords)){ | |
103 | + pd.put("keywords", keywords.trim()); | |
104 | + } | |
105 | + page.setPd(pd); | |
106 | + List<PageData> varList = chapterService.list(page); //列出Chapter列表 | |
107 | + mv.setViewName("sunvote/chapter/chapter_list"); | |
108 | + mv.addObject("varList", varList); | |
109 | + mv.addObject("pd", pd); | |
110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
111 | + return mv; | |
112 | + } | |
113 | + | |
114 | + /**去新增页面 | |
115 | + * @param | |
116 | + * @throws Exception | |
117 | + */ | |
118 | + @RequestMapping(value="/goAdd") | |
119 | + public ModelAndView goAdd()throws Exception{ | |
120 | + ModelAndView mv = this.getModelAndView(); | |
121 | + PageData pd = new PageData(); | |
122 | + pd = this.getPageData(); | |
123 | + mv.setViewName("sunvote/chapter/chapter_edit"); | |
124 | + mv.addObject("msg", "save"); | |
125 | + mv.addObject("pd", pd); | |
126 | + return mv; | |
127 | + } | |
128 | + | |
129 | + /**去修改页面 | |
130 | + * @param | |
131 | + * @throws Exception | |
132 | + */ | |
133 | + @RequestMapping(value="/goEdit") | |
134 | + public ModelAndView goEdit()throws Exception{ | |
135 | + ModelAndView mv = this.getModelAndView(); | |
136 | + PageData pd = new PageData(); | |
137 | + pd = this.getPageData(); | |
138 | + pd = chapterService.findById(pd); //根据ID读取 | |
139 | + mv.setViewName("sunvote/chapter/chapter_edit"); | |
140 | + mv.addObject("msg", "edit"); | |
141 | + mv.addObject("pd", pd); | |
142 | + return mv; | |
143 | + } | |
144 | + | |
145 | + /**批量删除 | |
146 | + * @param | |
147 | + * @throws Exception | |
148 | + */ | |
149 | + @RequestMapping(value="/deleteAll") | |
150 | + @ResponseBody | |
151 | + public Object deleteAll() throws Exception{ | |
152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除Chapter"); | |
153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
154 | + PageData pd = new PageData(); | |
155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
156 | + pd = this.getPageData(); | |
157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
161 | + chapterService.deleteAll(ArrayDATA_IDS); | |
162 | + pd.put("msg", "ok"); | |
163 | + }else{ | |
164 | + pd.put("msg", "no"); | |
165 | + } | |
166 | + pdList.add(pd); | |
167 | + map.put("list", pdList); | |
168 | + return AppUtil.returnObject(pd, map); | |
169 | + } | |
170 | + | |
171 | + /**导出到excel | |
172 | + * @param | |
173 | + * @throws Exception | |
174 | + */ | |
175 | + @RequestMapping(value="/excel") | |
176 | + public ModelAndView exportExcel() throws Exception{ | |
177 | + logBefore(logger, Jurisdiction.getUsername()+"导出Chapter到excel"); | |
178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
179 | + ModelAndView mv = new ModelAndView(); | |
180 | + PageData pd = new PageData(); | |
181 | + pd = this.getPageData(); | |
182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
183 | + List<String> titles = new ArrayList<String>(); | |
184 | + titles.add("章节名称"); //1 | |
185 | + titles.add("章节描述"); //2 | |
186 | + titles.add("备注"); //3 | |
187 | + dataMap.put("titles", titles); | |
188 | + List<PageData> varOList = chapterService.listAll(pd); | |
189 | + List<PageData> varList = new ArrayList<PageData>(); | |
190 | + for(int i=0;i<varOList.size();i++){ | |
191 | + PageData vpd = new PageData(); | |
192 | + vpd.put("var1", varOList.get(i).getString("NAME")); //1 | |
193 | + vpd.put("var2", varOList.get(i).getString("CDESCRIPTION")); //2 | |
194 | + vpd.put("var3", varOList.get(i).getString("REMARK")); //3 | |
195 | + varList.add(vpd); | |
196 | + } | |
197 | + dataMap.put("varList", varList); | |
198 | + ObjectExcelView erv = new ObjectExcelView(); | |
199 | + mv = new ModelAndView(erv,dataMap); | |
200 | + return mv; | |
201 | + } | |
202 | + | |
203 | + @InitBinder | |
204 | + public void initBinder(WebDataBinder binder){ | |
205 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
206 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
207 | + } | |
208 | +} | ... | ... |
src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java
0 → 100644
1 | +package com.fh.controller.sunvote.coursemanagement; | |
2 | + | |
3 | +import java.io.PrintWriter; | |
4 | +import java.text.DateFormat; | |
5 | +import java.text.SimpleDateFormat; | |
6 | +import java.util.ArrayList; | |
7 | +import java.util.Date; | |
8 | +import java.util.HashMap; | |
9 | +import java.util.List; | |
10 | +import java.util.Map; | |
11 | +import javax.annotation.Resource; | |
12 | +import org.springframework.beans.propertyeditors.CustomDateEditor; | |
13 | +import org.springframework.stereotype.Controller; | |
14 | +import org.springframework.web.bind.WebDataBinder; | |
15 | +import org.springframework.web.bind.annotation.InitBinder; | |
16 | +import org.springframework.web.bind.annotation.RequestMapping; | |
17 | +import org.springframework.web.bind.annotation.ResponseBody; | |
18 | +import org.springframework.web.servlet.ModelAndView; | |
19 | +import com.fh.controller.base.BaseController; | |
20 | +import com.fh.entity.Page; | |
21 | +import com.fh.util.AppUtil; | |
22 | +import com.fh.util.ObjectExcelView; | |
23 | +import com.fh.util.PageData; | |
24 | +import com.fh.util.Jurisdiction; | |
25 | +import com.fh.util.Tools; | |
26 | +import com.fh.service.sunvote.coursemanagement.CourseManagementManager; | |
27 | + | |
28 | +/** | |
29 | + * 说明:任课管理 | |
30 | + * 创建人:Elvis | |
31 | + * 创建时间:2018-04-26 | |
32 | + */ | |
33 | +@Controller | |
34 | +@RequestMapping(value="/coursemanagement") | |
35 | +public class CourseManagementController extends BaseController { | |
36 | + | |
37 | + String menuUrl = "coursemanagement/list.do"; //菜单地址(权限用) | |
38 | + @Resource(name="coursemanagementService") | |
39 | + private CourseManagementManager coursemanagementService; | |
40 | + | |
41 | + /**保存 | |
42 | + * @param | |
43 | + * @throws Exception | |
44 | + */ | |
45 | + @RequestMapping(value="/save") | |
46 | + public ModelAndView save() throws Exception{ | |
47 | + logBefore(logger, Jurisdiction.getUsername()+"新增CourseManagement"); | |
48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
49 | + ModelAndView mv = this.getModelAndView(); | |
50 | + PageData pd = new PageData(); | |
51 | + pd = this.getPageData(); | |
52 | + coursemanagementService.save(pd); | |
53 | + mv.addObject("msg","success"); | |
54 | + mv.setViewName("save_result"); | |
55 | + return mv; | |
56 | + } | |
57 | + | |
58 | + /**删除 | |
59 | + * @param out | |
60 | + * @throws Exception | |
61 | + */ | |
62 | + @RequestMapping(value="/delete") | |
63 | + public void delete(PrintWriter out) throws Exception{ | |
64 | + logBefore(logger, Jurisdiction.getUsername()+"删除CourseManagement"); | |
65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
66 | + PageData pd = new PageData(); | |
67 | + pd = this.getPageData(); | |
68 | + coursemanagementService.delete(pd); | |
69 | + out.write("success"); | |
70 | + out.close(); | |
71 | + } | |
72 | + | |
73 | + /**修改 | |
74 | + * @param | |
75 | + * @throws Exception | |
76 | + */ | |
77 | + @RequestMapping(value="/edit") | |
78 | + public ModelAndView edit() throws Exception{ | |
79 | + logBefore(logger, Jurisdiction.getUsername()+"修改CourseManagement"); | |
80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
81 | + ModelAndView mv = this.getModelAndView(); | |
82 | + PageData pd = new PageData(); | |
83 | + pd = this.getPageData(); | |
84 | + coursemanagementService.edit(pd); | |
85 | + mv.addObject("msg","success"); | |
86 | + mv.setViewName("save_result"); | |
87 | + return mv; | |
88 | + } | |
89 | + | |
90 | + /**列表 | |
91 | + * @param page | |
92 | + * @throws Exception | |
93 | + */ | |
94 | + @RequestMapping(value="/list") | |
95 | + public ModelAndView list(Page page) throws Exception{ | |
96 | + logBefore(logger, Jurisdiction.getUsername()+"列表CourseManagement"); | |
97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
98 | + ModelAndView mv = this.getModelAndView(); | |
99 | + PageData pd = new PageData(); | |
100 | + pd = this.getPageData(); | |
101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
102 | + if(null != keywords && !"".equals(keywords)){ | |
103 | + pd.put("keywords", keywords.trim()); | |
104 | + } | |
105 | + page.setPd(pd); | |
106 | + List<PageData> varList = coursemanagementService.list(page); //列出CourseManagement列表 | |
107 | + mv.setViewName("sunvote/coursemanagement/coursemanagement_list"); | |
108 | + mv.addObject("varList", varList); | |
109 | + mv.addObject("pd", pd); | |
110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
111 | + return mv; | |
112 | + } | |
113 | + | |
114 | + /**去新增页面 | |
115 | + * @param | |
116 | + * @throws Exception | |
117 | + */ | |
118 | + @RequestMapping(value="/goAdd") | |
119 | + public ModelAndView goAdd()throws Exception{ | |
120 | + ModelAndView mv = this.getModelAndView(); | |
121 | + PageData pd = new PageData(); | |
122 | + pd = this.getPageData(); | |
123 | + mv.setViewName("sunvote/coursemanagement/coursemanagement_edit"); | |
124 | + mv.addObject("msg", "save"); | |
125 | + mv.addObject("pd", pd); | |
126 | + return mv; | |
127 | + } | |
128 | + | |
129 | + /**去修改页面 | |
130 | + * @param | |
131 | + * @throws Exception | |
132 | + */ | |
133 | + @RequestMapping(value="/goEdit") | |
134 | + public ModelAndView goEdit()throws Exception{ | |
135 | + ModelAndView mv = this.getModelAndView(); | |
136 | + PageData pd = new PageData(); | |
137 | + pd = this.getPageData(); | |
138 | + pd = coursemanagementService.findById(pd); //根据ID读取 | |
139 | + mv.setViewName("sunvote/coursemanagement/coursemanagement_edit"); | |
140 | + mv.addObject("msg", "edit"); | |
141 | + mv.addObject("pd", pd); | |
142 | + return mv; | |
143 | + } | |
144 | + | |
145 | + /**批量删除 | |
146 | + * @param | |
147 | + * @throws Exception | |
148 | + */ | |
149 | + @RequestMapping(value="/deleteAll") | |
150 | + @ResponseBody | |
151 | + public Object deleteAll() throws Exception{ | |
152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除CourseManagement"); | |
153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
154 | + PageData pd = new PageData(); | |
155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
156 | + pd = this.getPageData(); | |
157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
161 | + coursemanagementService.deleteAll(ArrayDATA_IDS); | |
162 | + pd.put("msg", "ok"); | |
163 | + }else{ | |
164 | + pd.put("msg", "no"); | |
165 | + } | |
166 | + pdList.add(pd); | |
167 | + map.put("list", pdList); | |
168 | + return AppUtil.returnObject(pd, map); | |
169 | + } | |
170 | + | |
171 | + /**导出到excel | |
172 | + * @param | |
173 | + * @throws Exception | |
174 | + */ | |
175 | + @RequestMapping(value="/excel") | |
176 | + public ModelAndView exportExcel() throws Exception{ | |
177 | + logBefore(logger, Jurisdiction.getUsername()+"导出CourseManagement到excel"); | |
178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
179 | + ModelAndView mv = new ModelAndView(); | |
180 | + PageData pd = new PageData(); | |
181 | + pd = this.getPageData(); | |
182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
183 | + List<String> titles = new ArrayList<String>(); | |
184 | + titles.add("老师"); //1 | |
185 | + titles.add("班级ID"); //2 | |
186 | + titles.add("科目"); //3 | |
187 | + titles.add("开始时间"); //4 | |
188 | + titles.add("结束时间"); //5 | |
189 | + titles.add("备注"); //6 | |
190 | + dataMap.put("titles", titles); | |
191 | + List<PageData> varOList = coursemanagementService.listAll(pd); | |
192 | + List<PageData> varList = new ArrayList<PageData>(); | |
193 | + for(int i=0;i<varOList.size();i++){ | |
194 | + PageData vpd = new PageData(); | |
195 | + vpd.put("var1", varOList.get(i).get("TEACHER_ID").toString()); //1 | |
196 | + vpd.put("var2", varOList.get(i).getString("CLASS_ID")); //2 | |
197 | + vpd.put("var3", varOList.get(i).getString("SUBJECT_ID")); //3 | |
198 | + vpd.put("var4", varOList.get(i).getString("START_DATE")); //4 | |
199 | + vpd.put("var5", varOList.get(i).getString("END_DATE")); //5 | |
200 | + vpd.put("var6", varOList.get(i).getString("REMARK")); //6 | |
201 | + varList.add(vpd); | |
202 | + } | |
203 | + dataMap.put("varList", varList); | |
204 | + ObjectExcelView erv = new ObjectExcelView(); | |
205 | + mv = new ModelAndView(erv,dataMap); | |
206 | + return mv; | |
207 | + } | |
208 | + | |
209 | + @InitBinder | |
210 | + public void initBinder(WebDataBinder binder){ | |
211 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
212 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
213 | + } | |
214 | +} | ... | ... |
src/com/fh/controller/sunvote/sclass/SClassController.java
... | ... | @@ -8,7 +8,9 @@ import java.util.Date; |
8 | 8 | import java.util.HashMap; |
9 | 9 | import java.util.List; |
10 | 10 | import java.util.Map; |
11 | + | |
11 | 12 | import javax.annotation.Resource; |
13 | + | |
12 | 14 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
13 | 15 | import org.springframework.stereotype.Controller; |
14 | 16 | import org.springframework.web.bind.WebDataBinder; |
... | ... | @@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.InitBinder; |
16 | 18 | import org.springframework.web.bind.annotation.RequestMapping; |
17 | 19 | import org.springframework.web.bind.annotation.ResponseBody; |
18 | 20 | import org.springframework.web.servlet.ModelAndView; |
21 | + | |
19 | 22 | import com.fh.controller.base.BaseController; |
20 | 23 | import com.fh.entity.Page; |
21 | 24 | import com.fh.util.AppUtil; |
... | ... | @@ -23,7 +26,12 @@ import com.fh.util.ObjectExcelView; |
23 | 26 | import com.fh.util.PageData; |
24 | 27 | import com.fh.util.Jurisdiction; |
25 | 28 | import com.fh.util.Tools; |
29 | +import com.fh.service.sunvote.basestation.BasestationManager; | |
30 | +import com.fh.service.sunvote.classtype.ClassTypeManager; | |
31 | +import com.fh.service.sunvote.grade.GradeManager; | |
32 | +import com.fh.service.sunvote.school.SchoolManager; | |
26 | 33 | import com.fh.service.sunvote.sclass.SClassManager; |
34 | +import com.fh.service.system.fhlog.FHlogManager; | |
27 | 35 | |
28 | 36 | /** |
29 | 37 | * 说明:班级 |
... | ... | @@ -38,6 +46,20 @@ public class SClassController extends BaseController { |
38 | 46 | @Resource(name="sclassService") |
39 | 47 | private SClassManager sclassService; |
40 | 48 | |
49 | + @Resource(name="schoolService") | |
50 | + private SchoolManager schoolService; | |
51 | + | |
52 | + @Resource(name="fhlogService") | |
53 | + private FHlogManager FHLOG; | |
54 | + | |
55 | + @Resource(name="gradeService") | |
56 | + private GradeManager gradeService; | |
57 | + | |
58 | + @Resource(name="classtypeService") | |
59 | + private ClassTypeManager classtypeService; | |
60 | + | |
61 | + @Resource(name="basestationService") | |
62 | + private BasestationManager basestationService; | |
41 | 63 | /**保存 |
42 | 64 | * @param |
43 | 65 | * @throws Exception | ... | ... |
src/com/fh/controller/sunvote/teacher/TeacherController.java
0 → 100644
1 | +package com.fh.controller.sunvote.teacher; | |
2 | + | |
3 | +import java.io.PrintWriter; | |
4 | +import java.text.DateFormat; | |
5 | +import java.text.SimpleDateFormat; | |
6 | +import java.util.ArrayList; | |
7 | +import java.util.Date; | |
8 | +import java.util.HashMap; | |
9 | +import java.util.List; | |
10 | +import java.util.Map; | |
11 | +import javax.annotation.Resource; | |
12 | +import org.springframework.beans.propertyeditors.CustomDateEditor; | |
13 | +import org.springframework.stereotype.Controller; | |
14 | +import org.springframework.web.bind.WebDataBinder; | |
15 | +import org.springframework.web.bind.annotation.InitBinder; | |
16 | +import org.springframework.web.bind.annotation.RequestMapping; | |
17 | +import org.springframework.web.bind.annotation.ResponseBody; | |
18 | +import org.springframework.web.servlet.ModelAndView; | |
19 | +import com.fh.controller.base.BaseController; | |
20 | +import com.fh.entity.Page; | |
21 | +import com.fh.util.AppUtil; | |
22 | +import com.fh.util.ObjectExcelView; | |
23 | +import com.fh.util.PageData; | |
24 | +import com.fh.util.Jurisdiction; | |
25 | +import com.fh.util.Tools; | |
26 | +import com.fh.service.sunvote.teacher.TeacherManager; | |
27 | + | |
28 | +/** | |
29 | + * 说明:教师 | |
30 | + * 创建人:Elvis | |
31 | + * 创建时间:2018-04-26 | |
32 | + */ | |
33 | +@Controller | |
34 | +@RequestMapping(value="/teacher") | |
35 | +public class TeacherController extends BaseController { | |
36 | + | |
37 | + String menuUrl = "teacher/list.do"; //菜单地址(权限用) | |
38 | + @Resource(name="teacherService") | |
39 | + private TeacherManager teacherService; | |
40 | + | |
41 | + /**保存 | |
42 | + * @param | |
43 | + * @throws Exception | |
44 | + */ | |
45 | + @RequestMapping(value="/save") | |
46 | + public ModelAndView save() throws Exception{ | |
47 | + logBefore(logger, Jurisdiction.getUsername()+"新增Teacher"); | |
48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
49 | + ModelAndView mv = this.getModelAndView(); | |
50 | + PageData pd = new PageData(); | |
51 | + pd = this.getPageData(); | |
52 | + teacherService.save(pd); | |
53 | + mv.addObject("msg","success"); | |
54 | + mv.setViewName("save_result"); | |
55 | + return mv; | |
56 | + } | |
57 | + | |
58 | + /**删除 | |
59 | + * @param out | |
60 | + * @throws Exception | |
61 | + */ | |
62 | + @RequestMapping(value="/delete") | |
63 | + public void delete(PrintWriter out) throws Exception{ | |
64 | + logBefore(logger, Jurisdiction.getUsername()+"删除Teacher"); | |
65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
66 | + PageData pd = new PageData(); | |
67 | + pd = this.getPageData(); | |
68 | + teacherService.delete(pd); | |
69 | + out.write("success"); | |
70 | + out.close(); | |
71 | + } | |
72 | + | |
73 | + /**修改 | |
74 | + * @param | |
75 | + * @throws Exception | |
76 | + */ | |
77 | + @RequestMapping(value="/edit") | |
78 | + public ModelAndView edit() throws Exception{ | |
79 | + logBefore(logger, Jurisdiction.getUsername()+"修改Teacher"); | |
80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
81 | + ModelAndView mv = this.getModelAndView(); | |
82 | + PageData pd = new PageData(); | |
83 | + pd = this.getPageData(); | |
84 | + teacherService.edit(pd); | |
85 | + mv.addObject("msg","success"); | |
86 | + mv.setViewName("save_result"); | |
87 | + return mv; | |
88 | + } | |
89 | + | |
90 | + /**列表 | |
91 | + * @param page | |
92 | + * @throws Exception | |
93 | + */ | |
94 | + @RequestMapping(value="/list") | |
95 | + public ModelAndView list(Page page) throws Exception{ | |
96 | + logBefore(logger, Jurisdiction.getUsername()+"列表Teacher"); | |
97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
98 | + ModelAndView mv = this.getModelAndView(); | |
99 | + PageData pd = new PageData(); | |
100 | + pd = this.getPageData(); | |
101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
102 | + if(null != keywords && !"".equals(keywords)){ | |
103 | + pd.put("keywords", keywords.trim()); | |
104 | + } | |
105 | + page.setPd(pd); | |
106 | + List<PageData> varList = teacherService.list(page); //列出Teacher列表 | |
107 | + mv.setViewName("sunvote/teacher/teacher_list"); | |
108 | + mv.addObject("varList", varList); | |
109 | + mv.addObject("pd", pd); | |
110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
111 | + return mv; | |
112 | + } | |
113 | + | |
114 | + /**去新增页面 | |
115 | + * @param | |
116 | + * @throws Exception | |
117 | + */ | |
118 | + @RequestMapping(value="/goAdd") | |
119 | + public ModelAndView goAdd()throws Exception{ | |
120 | + ModelAndView mv = this.getModelAndView(); | |
121 | + PageData pd = new PageData(); | |
122 | + pd = this.getPageData(); | |
123 | + mv.setViewName("sunvote/teacher/teacher_edit"); | |
124 | + mv.addObject("msg", "save"); | |
125 | + mv.addObject("pd", pd); | |
126 | + return mv; | |
127 | + } | |
128 | + | |
129 | + /**去修改页面 | |
130 | + * @param | |
131 | + * @throws Exception | |
132 | + */ | |
133 | + @RequestMapping(value="/goEdit") | |
134 | + public ModelAndView goEdit()throws Exception{ | |
135 | + ModelAndView mv = this.getModelAndView(); | |
136 | + PageData pd = new PageData(); | |
137 | + pd = this.getPageData(); | |
138 | + pd = teacherService.findById(pd); //根据ID读取 | |
139 | + mv.setViewName("sunvote/teacher/teacher_edit"); | |
140 | + mv.addObject("msg", "edit"); | |
141 | + mv.addObject("pd", pd); | |
142 | + return mv; | |
143 | + } | |
144 | + | |
145 | + /**批量删除 | |
146 | + * @param | |
147 | + * @throws Exception | |
148 | + */ | |
149 | + @RequestMapping(value="/deleteAll") | |
150 | + @ResponseBody | |
151 | + public Object deleteAll() throws Exception{ | |
152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除Teacher"); | |
153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
154 | + PageData pd = new PageData(); | |
155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
156 | + pd = this.getPageData(); | |
157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
161 | + teacherService.deleteAll(ArrayDATA_IDS); | |
162 | + pd.put("msg", "ok"); | |
163 | + }else{ | |
164 | + pd.put("msg", "no"); | |
165 | + } | |
166 | + pdList.add(pd); | |
167 | + map.put("list", pdList); | |
168 | + return AppUtil.returnObject(pd, map); | |
169 | + } | |
170 | + | |
171 | + /**导出到excel | |
172 | + * @param | |
173 | + * @throws Exception | |
174 | + */ | |
175 | + @RequestMapping(value="/excel") | |
176 | + public ModelAndView exportExcel() throws Exception{ | |
177 | + logBefore(logger, Jurisdiction.getUsername()+"导出Teacher到excel"); | |
178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
179 | + ModelAndView mv = new ModelAndView(); | |
180 | + PageData pd = new PageData(); | |
181 | + pd = this.getPageData(); | |
182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
183 | + List<String> titles = new ArrayList<String>(); | |
184 | + titles.add("所在学校"); //1 | |
185 | + titles.add("姓名"); //2 | |
186 | + titles.add("电话"); //3 | |
187 | + titles.add("座机电话"); //4 | |
188 | + titles.add("证件号"); //5 | |
189 | + titles.add("账号"); //6 | |
190 | + titles.add("密码"); //7 | |
191 | + titles.add("性别"); //8 | |
192 | + titles.add("科目列表"); //9 | |
193 | + titles.add("教师卡编号"); //10 | |
194 | + dataMap.put("titles", titles); | |
195 | + List<PageData> varOList = teacherService.listAll(pd); | |
196 | + List<PageData> varList = new ArrayList<PageData>(); | |
197 | + for(int i=0;i<varOList.size();i++){ | |
198 | + PageData vpd = new PageData(); | |
199 | + vpd.put("var1", varOList.get(i).get("SCHOOL_ID").toString()); //1 | |
200 | + vpd.put("var2", varOList.get(i).getString("NAME")); //2 | |
201 | + vpd.put("var3", varOList.get(i).getString("PHONE")); //3 | |
202 | + vpd.put("var4", varOList.get(i).getString("SEAT_PHONE")); //4 | |
203 | + vpd.put("var5", varOList.get(i).getString("CARD_NO")); //5 | |
204 | + vpd.put("var6", varOList.get(i).getString("ACCOUT")); //6 | |
205 | + vpd.put("var7", varOList.get(i).getString("PASSWORD")); //7 | |
206 | + vpd.put("var8", varOList.get(i).get("SEX").toString()); //8 | |
207 | + vpd.put("var9", varOList.get(i).getString("SUBJECT_IDS")); //9 | |
208 | + vpd.put("var10", varOList.get(i).getString("KEYPAD_ID")); //10 | |
209 | + varList.add(vpd); | |
210 | + } | |
211 | + dataMap.put("varList", varList); | |
212 | + ObjectExcelView erv = new ObjectExcelView(); | |
213 | + mv = new ModelAndView(erv,dataMap); | |
214 | + return mv; | |
215 | + } | |
216 | + | |
217 | + @InitBinder | |
218 | + public void initBinder(WebDataBinder binder){ | |
219 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
220 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
221 | + } | |
222 | +} | ... | ... |
src/com/fh/service/sunvote/chapter/ChapterManager.java
0 → 100644
1 | +package com.fh.service.sunvote.chapter; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import com.fh.entity.Page; | |
5 | +import com.fh.util.PageData; | |
6 | + | |
7 | +/** | |
8 | + * 说明: 章节管理接口 | |
9 | + * 创建人:Elvis | |
10 | + * 创建时间:2018-04-26 | |
11 | + * @version | |
12 | + */ | |
13 | +public interface ChapterManager{ | |
14 | + | |
15 | + /**新增 | |
16 | + * @param pd | |
17 | + * @throws Exception | |
18 | + */ | |
19 | + public void save(PageData pd)throws Exception; | |
20 | + | |
21 | + /**删除 | |
22 | + * @param pd | |
23 | + * @throws Exception | |
24 | + */ | |
25 | + public void delete(PageData pd)throws Exception; | |
26 | + | |
27 | + /**修改 | |
28 | + * @param pd | |
29 | + * @throws Exception | |
30 | + */ | |
31 | + public void edit(PageData pd)throws Exception; | |
32 | + | |
33 | + /**列表 | |
34 | + * @param page | |
35 | + * @throws Exception | |
36 | + */ | |
37 | + public List<PageData> list(Page page)throws Exception; | |
38 | + | |
39 | + /**列表(全部) | |
40 | + * @param pd | |
41 | + * @throws Exception | |
42 | + */ | |
43 | + public List<PageData> listAll(PageData pd)throws Exception; | |
44 | + | |
45 | + /**通过id获取数据 | |
46 | + * @param pd | |
47 | + * @throws Exception | |
48 | + */ | |
49 | + public PageData findById(PageData pd)throws Exception; | |
50 | + | |
51 | + /**批量删除 | |
52 | + * @param ArrayDATA_IDS | |
53 | + * @throws Exception | |
54 | + */ | |
55 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
56 | + | |
57 | +} | |
58 | + | ... | ... |
src/com/fh/service/sunvote/chapter/impl/ChapterService.java
0 → 100644
1 | +package com.fh.service.sunvote.chapter.impl; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import javax.annotation.Resource; | |
5 | +import org.springframework.stereotype.Service; | |
6 | +import com.fh.dao.DaoSupport; | |
7 | +import com.fh.entity.Page; | |
8 | +import com.fh.util.PageData; | |
9 | +import com.fh.service.sunvote.chapter.ChapterManager; | |
10 | + | |
11 | +/** | |
12 | + * 说明: 章节管理 | |
13 | + * 创建人:FH Q313596790 | |
14 | + * 创建时间:2018-04-26 | |
15 | + * @version | |
16 | + */ | |
17 | +@Service("chapterService") | |
18 | +public class ChapterService implements ChapterManager{ | |
19 | + | |
20 | + @Resource(name = "daoSupport") | |
21 | + private DaoSupport dao; | |
22 | + | |
23 | + /**新增 | |
24 | + * @param pd | |
25 | + * @throws Exception | |
26 | + */ | |
27 | + public void save(PageData pd)throws Exception{ | |
28 | + dao.save("ChapterMapper.save", pd); | |
29 | + } | |
30 | + | |
31 | + /**删除 | |
32 | + * @param pd | |
33 | + * @throws Exception | |
34 | + */ | |
35 | + public void delete(PageData pd)throws Exception{ | |
36 | + dao.delete("ChapterMapper.delete", pd); | |
37 | + } | |
38 | + | |
39 | + /**修改 | |
40 | + * @param pd | |
41 | + * @throws Exception | |
42 | + */ | |
43 | + public void edit(PageData pd)throws Exception{ | |
44 | + dao.update("ChapterMapper.edit", pd); | |
45 | + } | |
46 | + | |
47 | + /**列表 | |
48 | + * @param page | |
49 | + * @throws Exception | |
50 | + */ | |
51 | + @SuppressWarnings("unchecked") | |
52 | + public List<PageData> list(Page page)throws Exception{ | |
53 | + return (List<PageData>)dao.findForList("ChapterMapper.datalistPage", page); | |
54 | + } | |
55 | + | |
56 | + /**列表(全部) | |
57 | + * @param pd | |
58 | + * @throws Exception | |
59 | + */ | |
60 | + @SuppressWarnings("unchecked") | |
61 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
62 | + return (List<PageData>)dao.findForList("ChapterMapper.listAll", pd); | |
63 | + } | |
64 | + | |
65 | + /**通过id获取数据 | |
66 | + * @param pd | |
67 | + * @throws Exception | |
68 | + */ | |
69 | + public PageData findById(PageData pd)throws Exception{ | |
70 | + return (PageData)dao.findForObject("ChapterMapper.findById", pd); | |
71 | + } | |
72 | + | |
73 | + /**批量删除 | |
74 | + * @param ArrayDATA_IDS | |
75 | + * @throws Exception | |
76 | + */ | |
77 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
78 | + dao.delete("ChapterMapper.deleteAll", ArrayDATA_IDS); | |
79 | + } | |
80 | + | |
81 | +} | |
82 | + | ... | ... |
src/com/fh/service/sunvote/coursemanagement/CourseManagementManager.java
0 → 100644
1 | +package com.fh.service.sunvote.coursemanagement; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import com.fh.entity.Page; | |
5 | +import com.fh.util.PageData; | |
6 | + | |
7 | +/** | |
8 | + * 说明: 任课管理接口 | |
9 | + * 创建人:Elvis | |
10 | + * 创建时间:2018-04-26 | |
11 | + * @version | |
12 | + */ | |
13 | +public interface CourseManagementManager{ | |
14 | + | |
15 | + /**新增 | |
16 | + * @param pd | |
17 | + * @throws Exception | |
18 | + */ | |
19 | + public void save(PageData pd)throws Exception; | |
20 | + | |
21 | + /**删除 | |
22 | + * @param pd | |
23 | + * @throws Exception | |
24 | + */ | |
25 | + public void delete(PageData pd)throws Exception; | |
26 | + | |
27 | + /**修改 | |
28 | + * @param pd | |
29 | + * @throws Exception | |
30 | + */ | |
31 | + public void edit(PageData pd)throws Exception; | |
32 | + | |
33 | + /**列表 | |
34 | + * @param page | |
35 | + * @throws Exception | |
36 | + */ | |
37 | + public List<PageData> list(Page page)throws Exception; | |
38 | + | |
39 | + /**列表(全部) | |
40 | + * @param pd | |
41 | + * @throws Exception | |
42 | + */ | |
43 | + public List<PageData> listAll(PageData pd)throws Exception; | |
44 | + | |
45 | + /**通过id获取数据 | |
46 | + * @param pd | |
47 | + * @throws Exception | |
48 | + */ | |
49 | + public PageData findById(PageData pd)throws Exception; | |
50 | + | |
51 | + /**批量删除 | |
52 | + * @param ArrayDATA_IDS | |
53 | + * @throws Exception | |
54 | + */ | |
55 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
56 | + | |
57 | +} | |
58 | + | ... | ... |
src/com/fh/service/sunvote/coursemanagement/impl/CourseManagementService.java
0 → 100644
1 | +package com.fh.service.sunvote.coursemanagement.impl; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import javax.annotation.Resource; | |
5 | +import org.springframework.stereotype.Service; | |
6 | +import com.fh.dao.DaoSupport; | |
7 | +import com.fh.entity.Page; | |
8 | +import com.fh.util.PageData; | |
9 | +import com.fh.service.sunvote.coursemanagement.CourseManagementManager; | |
10 | + | |
11 | +/** | |
12 | + * 说明: 任课管理 | |
13 | + * 创建人:FH Q313596790 | |
14 | + * 创建时间:2018-04-26 | |
15 | + * @version | |
16 | + */ | |
17 | +@Service("coursemanagementService") | |
18 | +public class CourseManagementService implements CourseManagementManager{ | |
19 | + | |
20 | + @Resource(name = "daoSupport") | |
21 | + private DaoSupport dao; | |
22 | + | |
23 | + /**新增 | |
24 | + * @param pd | |
25 | + * @throws Exception | |
26 | + */ | |
27 | + public void save(PageData pd)throws Exception{ | |
28 | + dao.save("CourseManagementMapper.save", pd); | |
29 | + } | |
30 | + | |
31 | + /**删除 | |
32 | + * @param pd | |
33 | + * @throws Exception | |
34 | + */ | |
35 | + public void delete(PageData pd)throws Exception{ | |
36 | + dao.delete("CourseManagementMapper.delete", pd); | |
37 | + } | |
38 | + | |
39 | + /**修改 | |
40 | + * @param pd | |
41 | + * @throws Exception | |
42 | + */ | |
43 | + public void edit(PageData pd)throws Exception{ | |
44 | + dao.update("CourseManagementMapper.edit", pd); | |
45 | + } | |
46 | + | |
47 | + /**列表 | |
48 | + * @param page | |
49 | + * @throws Exception | |
50 | + */ | |
51 | + @SuppressWarnings("unchecked") | |
52 | + public List<PageData> list(Page page)throws Exception{ | |
53 | + return (List<PageData>)dao.findForList("CourseManagementMapper.datalistPage", page); | |
54 | + } | |
55 | + | |
56 | + /**列表(全部) | |
57 | + * @param pd | |
58 | + * @throws Exception | |
59 | + */ | |
60 | + @SuppressWarnings("unchecked") | |
61 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
62 | + return (List<PageData>)dao.findForList("CourseManagementMapper.listAll", pd); | |
63 | + } | |
64 | + | |
65 | + /**通过id获取数据 | |
66 | + * @param pd | |
67 | + * @throws Exception | |
68 | + */ | |
69 | + public PageData findById(PageData pd)throws Exception{ | |
70 | + return (PageData)dao.findForObject("CourseManagementMapper.findById", pd); | |
71 | + } | |
72 | + | |
73 | + /**批量删除 | |
74 | + * @param ArrayDATA_IDS | |
75 | + * @throws Exception | |
76 | + */ | |
77 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
78 | + dao.delete("CourseManagementMapper.deleteAll", ArrayDATA_IDS); | |
79 | + } | |
80 | + | |
81 | +} | |
82 | + | ... | ... |
src/com/fh/service/sunvote/teacher/TeacherManager.java
0 → 100644
1 | +package com.fh.service.sunvote.teacher; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import com.fh.entity.Page; | |
5 | +import com.fh.util.PageData; | |
6 | + | |
7 | +/** | |
8 | + * 说明: 教师接口 | |
9 | + * 创建人:Elvis | |
10 | + * 创建时间:2018-04-26 | |
11 | + * @version | |
12 | + */ | |
13 | +public interface TeacherManager{ | |
14 | + | |
15 | + /**新增 | |
16 | + * @param pd | |
17 | + * @throws Exception | |
18 | + */ | |
19 | + public void save(PageData pd)throws Exception; | |
20 | + | |
21 | + /**删除 | |
22 | + * @param pd | |
23 | + * @throws Exception | |
24 | + */ | |
25 | + public void delete(PageData pd)throws Exception; | |
26 | + | |
27 | + /**修改 | |
28 | + * @param pd | |
29 | + * @throws Exception | |
30 | + */ | |
31 | + public void edit(PageData pd)throws Exception; | |
32 | + | |
33 | + /**列表 | |
34 | + * @param page | |
35 | + * @throws Exception | |
36 | + */ | |
37 | + public List<PageData> list(Page page)throws Exception; | |
38 | + | |
39 | + /**列表(全部) | |
40 | + * @param pd | |
41 | + * @throws Exception | |
42 | + */ | |
43 | + public List<PageData> listAll(PageData pd)throws Exception; | |
44 | + | |
45 | + /**通过id获取数据 | |
46 | + * @param pd | |
47 | + * @throws Exception | |
48 | + */ | |
49 | + public PageData findById(PageData pd)throws Exception; | |
50 | + | |
51 | + /**批量删除 | |
52 | + * @param ArrayDATA_IDS | |
53 | + * @throws Exception | |
54 | + */ | |
55 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
56 | + | |
57 | +} | |
58 | + | ... | ... |
src/com/fh/service/sunvote/teacher/impl/TeacherService.java
0 → 100644
1 | +package com.fh.service.sunvote.teacher.impl; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import javax.annotation.Resource; | |
5 | +import org.springframework.stereotype.Service; | |
6 | +import com.fh.dao.DaoSupport; | |
7 | +import com.fh.entity.Page; | |
8 | +import com.fh.util.PageData; | |
9 | +import com.fh.service.sunvote.teacher.TeacherManager; | |
10 | + | |
11 | +/** | |
12 | + * 说明: 教师 | |
13 | + * 创建人:FH Q313596790 | |
14 | + * 创建时间:2018-04-26 | |
15 | + * @version | |
16 | + */ | |
17 | +@Service("teacherService") | |
18 | +public class TeacherService implements TeacherManager{ | |
19 | + | |
20 | + @Resource(name = "daoSupport") | |
21 | + private DaoSupport dao; | |
22 | + | |
23 | + /**新增 | |
24 | + * @param pd | |
25 | + * @throws Exception | |
26 | + */ | |
27 | + public void save(PageData pd)throws Exception{ | |
28 | + dao.save("TeacherMapper.save", pd); | |
29 | + } | |
30 | + | |
31 | + /**删除 | |
32 | + * @param pd | |
33 | + * @throws Exception | |
34 | + */ | |
35 | + public void delete(PageData pd)throws Exception{ | |
36 | + dao.delete("TeacherMapper.delete", pd); | |
37 | + } | |
38 | + | |
39 | + /**修改 | |
40 | + * @param pd | |
41 | + * @throws Exception | |
42 | + */ | |
43 | + public void edit(PageData pd)throws Exception{ | |
44 | + dao.update("TeacherMapper.edit", pd); | |
45 | + } | |
46 | + | |
47 | + /**列表 | |
48 | + * @param page | |
49 | + * @throws Exception | |
50 | + */ | |
51 | + @SuppressWarnings("unchecked") | |
52 | + public List<PageData> list(Page page)throws Exception{ | |
53 | + return (List<PageData>)dao.findForList("TeacherMapper.datalistPage", page); | |
54 | + } | |
55 | + | |
56 | + /**列表(全部) | |
57 | + * @param pd | |
58 | + * @throws Exception | |
59 | + */ | |
60 | + @SuppressWarnings("unchecked") | |
61 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
62 | + return (List<PageData>)dao.findForList("TeacherMapper.listAll", pd); | |
63 | + } | |
64 | + | |
65 | + /**通过id获取数据 | |
66 | + * @param pd | |
67 | + * @throws Exception | |
68 | + */ | |
69 | + public PageData findById(PageData pd)throws Exception{ | |
70 | + return (PageData)dao.findForObject("TeacherMapper.findById", pd); | |
71 | + } | |
72 | + | |
73 | + /**批量删除 | |
74 | + * @param ArrayDATA_IDS | |
75 | + * @throws Exception | |
76 | + */ | |
77 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
78 | + dao.delete("TeacherMapper.deleteAll", ArrayDATA_IDS); | |
79 | + } | |
80 | + | |
81 | +} | |
82 | + | ... | ... |