Commit 45213c57d2ebaf940307823ed3cebbb78e456531
Merge branch 'develop' of http://120.78.57.84/Elvis/SunvoteEducation into develop
Showing
33 changed files
with
5774 additions
and
2 deletions
WebRoot/WEB-INF/jsp/sunvote/instantpaper1/instantpaper1_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="instantpaper1/${msg }.do" name="Form" id="Form" method="post"> | ||
31 | + <input type="hidden" name="INSTANTPAPER1_ID" id="INSTANTPAPER1_ID" value="${pd.INSTANTPAPER1_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="PAPER_NAME" id="PAPER_NAME" value="${pd.PAPER_NAME}" maxlength="100" 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="TAG" id="TAG" value="${pd.TAG}" maxlength="300" 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="PERMISSION" id="PERMISSION" value="${pd.PERMISSION}" maxlength="100" 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="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="50" 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="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" maxlength="50" 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="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="50" 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="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="50" 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="COMBINATION" id="COMBINATION" value="${pd.COMBINATION}" 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="PAPER_SCORE" id="PAPER_SCORE" value="${pd.PAPER_SCORE}" maxlength="10" 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="USER_ID" id="USER_ID" value="${pd.USER_ID}" maxlength="50" placeholder="这里输入用户" title="用户" style="width:98%;"/></td> | ||
73 | + </tr> | ||
74 | + <tr> | ||
75 | + <td style="width:75px;text-align: right;padding-top: 13px;">考试次数:</td> | ||
76 | + <td><input type="text" name="COUNT" id="COUNT" value="${pd.COUNT}" maxlength="10" placeholder="这里输入考试次数" title="考试次数" style="width:98%;"/></td> | ||
77 | + </tr> | ||
78 | + <tr> | ||
79 | + <td style="text-align: center;" colspan="10"> | ||
80 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | ||
81 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | ||
82 | + </td> | ||
83 | + </tr> | ||
84 | + </table> | ||
85 | + </div> | ||
86 | + <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> | ||
87 | + </form> | ||
88 | + </div> | ||
89 | + <!-- /.col --> | ||
90 | + </div> | ||
91 | + <!-- /.row --> | ||
92 | + </div> | ||
93 | + <!-- /.page-content --> | ||
94 | + </div> | ||
95 | + </div> | ||
96 | + <!-- /.main-content --> | ||
97 | +</div> | ||
98 | +<!-- /.main-container --> | ||
99 | + | ||
100 | + | ||
101 | + <!-- 页面底部js¨ --> | ||
102 | + <%@ include file="../../system/index/foot.jsp"%> | ||
103 | + <!-- 下拉框 --> | ||
104 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
105 | + <!-- 日期框 --> | ||
106 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
107 | + <!--提示框--> | ||
108 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
109 | + <script type="text/javascript"> | ||
110 | + $(top.hangge()); | ||
111 | + //保存 | ||
112 | + function save(){ | ||
113 | + if($("#PAPER_NAME").val()==""){ | ||
114 | + $("#PAPER_NAME").tips({ | ||
115 | + side:3, | ||
116 | + msg:'请输入试卷名称', | ||
117 | + bg:'#AE81FF', | ||
118 | + time:2 | ||
119 | + }); | ||
120 | + $("#PAPER_NAME").focus(); | ||
121 | + return false; | ||
122 | + } | ||
123 | + if($("#TAG").val()==""){ | ||
124 | + $("#TAG").tips({ | ||
125 | + side:3, | ||
126 | + msg:'请输入标签', | ||
127 | + bg:'#AE81FF', | ||
128 | + time:2 | ||
129 | + }); | ||
130 | + $("#TAG").focus(); | ||
131 | + return false; | ||
132 | + } | ||
133 | + if($("#PERMISSION").val()==""){ | ||
134 | + $("#PERMISSION").tips({ | ||
135 | + side:3, | ||
136 | + msg:'请输入权限', | ||
137 | + bg:'#AE81FF', | ||
138 | + time:2 | ||
139 | + }); | ||
140 | + $("#PERMISSION").focus(); | ||
141 | + return false; | ||
142 | + } | ||
143 | + if($("#SUBJECT_ID").val()==""){ | ||
144 | + $("#SUBJECT_ID").tips({ | ||
145 | + side:3, | ||
146 | + msg:'请输入科目', | ||
147 | + bg:'#AE81FF', | ||
148 | + time:2 | ||
149 | + }); | ||
150 | + $("#SUBJECT_ID").focus(); | ||
151 | + return false; | ||
152 | + } | ||
153 | + if($("#GRADE_ID").val()==""){ | ||
154 | + $("#GRADE_ID").tips({ | ||
155 | + side:3, | ||
156 | + msg:'请输入年级', | ||
157 | + bg:'#AE81FF', | ||
158 | + time:2 | ||
159 | + }); | ||
160 | + $("#GRADE_ID").focus(); | ||
161 | + return false; | ||
162 | + } | ||
163 | + if($("#CLASS_ID").val()==""){ | ||
164 | + $("#CLASS_ID").tips({ | ||
165 | + side:3, | ||
166 | + msg:'请输入班级', | ||
167 | + bg:'#AE81FF', | ||
168 | + time:2 | ||
169 | + }); | ||
170 | + $("#CLASS_ID").focus(); | ||
171 | + return false; | ||
172 | + } | ||
173 | + if($("#SCHOOL_ID").val()==""){ | ||
174 | + $("#SCHOOL_ID").tips({ | ||
175 | + side:3, | ||
176 | + msg:'请输入学校', | ||
177 | + bg:'#AE81FF', | ||
178 | + time:2 | ||
179 | + }); | ||
180 | + $("#SCHOOL_ID").focus(); | ||
181 | + return false; | ||
182 | + } | ||
183 | + if($("#COMBINATION").val()==""){ | ||
184 | + $("#COMBINATION").tips({ | ||
185 | + side:3, | ||
186 | + msg:'请输入是否组合试卷', | ||
187 | + bg:'#AE81FF', | ||
188 | + time:2 | ||
189 | + }); | ||
190 | + $("#COMBINATION").focus(); | ||
191 | + return false; | ||
192 | + } | ||
193 | + if($("#PAPER_SCORE").val()==""){ | ||
194 | + $("#PAPER_SCORE").tips({ | ||
195 | + side:3, | ||
196 | + msg:'请输入试卷总分', | ||
197 | + bg:'#AE81FF', | ||
198 | + time:2 | ||
199 | + }); | ||
200 | + $("#PAPER_SCORE").focus(); | ||
201 | + return false; | ||
202 | + } | ||
203 | + if($("#USER_ID").val()==""){ | ||
204 | + $("#USER_ID").tips({ | ||
205 | + side:3, | ||
206 | + msg:'请输入用户', | ||
207 | + bg:'#AE81FF', | ||
208 | + time:2 | ||
209 | + }); | ||
210 | + $("#USER_ID").focus(); | ||
211 | + return false; | ||
212 | + } | ||
213 | + if($("#COUNT").val()==""){ | ||
214 | + $("#COUNT").tips({ | ||
215 | + side:3, | ||
216 | + msg:'请输入考试次数', | ||
217 | + bg:'#AE81FF', | ||
218 | + time:2 | ||
219 | + }); | ||
220 | + $("#COUNT").focus(); | ||
221 | + return false; | ||
222 | + } | ||
223 | + $("#Form").submit(); | ||
224 | + $("#zhongxin").hide(); | ||
225 | + $("#zhongxin2").show(); | ||
226 | + } | ||
227 | + | ||
228 | + $(function() { | ||
229 | + //日期框 | ||
230 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | ||
231 | + }); | ||
232 | + </script> | ||
233 | +</body> | ||
234 | +</html> | ||
0 | \ No newline at end of file | 235 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/instantpaper1/instantpaper1_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="instantpaper1/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 | + <th class="center">考试次数</th> | ||
81 | + <th class="center">操作</th> | ||
82 | + </tr> | ||
83 | + </thead> | ||
84 | + | ||
85 | + <tbody> | ||
86 | + <!-- 开始循环 --> | ||
87 | + <c:choose> | ||
88 | + <c:when test="${not empty varList}"> | ||
89 | + <c:if test="${QX.cha == 1 }"> | ||
90 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
91 | + <tr> | ||
92 | + <td class='center'> | ||
93 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.INSTANTPAPER1_ID}" class="ace" /><span class="lbl"></span></label> | ||
94 | + </td> | ||
95 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | ||
96 | + <td class='center'>${var.PAPER_NAME}</td> | ||
97 | + <td class='center'>${var.TAG}</td> | ||
98 | + <td class='center'>${var.PERMISSION}</td> | ||
99 | + <td class='center'>${var.SUBJECT_ID}</td> | ||
100 | + <td class='center'>${var.GRADE_ID}</td> | ||
101 | + <td class='center'>${var.CLASS_ID}</td> | ||
102 | + <td class='center'>${var.SCHOOL_ID}</td> | ||
103 | + <td class='center'>${var.COMBINATION}</td> | ||
104 | + <td class='center'>${var.PAPER_SCORE}</td> | ||
105 | + <td class='center'>${var.USER_ID}</td> | ||
106 | + <td class='center'>${var.CREATE_TIME}</td> | ||
107 | + <td class='center'>${var.COUNT}</td> | ||
108 | + <td class="center"> | ||
109 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | ||
110 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | ||
111 | + </c:if> | ||
112 | + <div class="hidden-sm hidden-xs btn-group"> | ||
113 | + <c:if test="${QX.edit == 1 }"> | ||
114 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.INSTANTPAPER1_ID}');"> | ||
115 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | ||
116 | + </a> | ||
117 | + </c:if> | ||
118 | + <c:if test="${QX.del == 1 }"> | ||
119 | + <a class="btn btn-xs btn-danger" onclick="del('${var.INSTANTPAPER1_ID}');"> | ||
120 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | ||
121 | + </a> | ||
122 | + </c:if> | ||
123 | + </div> | ||
124 | + <div class="hidden-md hidden-lg"> | ||
125 | + <div class="inline pos-rel"> | ||
126 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | ||
127 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | ||
128 | + </button> | ||
129 | + | ||
130 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | ||
131 | + <c:if test="${QX.edit == 1 }"> | ||
132 | + <li> | ||
133 | + <a style="cursor:pointer;" onclick="edit('${var.INSTANTPAPER1_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | ||
134 | + <span class="green"> | ||
135 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | ||
136 | + </span> | ||
137 | + </a> | ||
138 | + </li> | ||
139 | + </c:if> | ||
140 | + <c:if test="${QX.del == 1 }"> | ||
141 | + <li> | ||
142 | + <a style="cursor:pointer;" onclick="del('${var.INSTANTPAPER1_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | ||
143 | + <span class="red"> | ||
144 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | ||
145 | + </span> | ||
146 | + </a> | ||
147 | + </li> | ||
148 | + </c:if> | ||
149 | + </ul> | ||
150 | + </div> | ||
151 | + </div> | ||
152 | + </td> | ||
153 | + </tr> | ||
154 | + | ||
155 | + </c:forEach> | ||
156 | + </c:if> | ||
157 | + <c:if test="${QX.cha == 0 }"> | ||
158 | + <tr> | ||
159 | + <td colspan="100" class="center">您无权查看</td> | ||
160 | + </tr> | ||
161 | + </c:if> | ||
162 | + </c:when> | ||
163 | + <c:otherwise> | ||
164 | + <tr class="main_info"> | ||
165 | + <td colspan="100" class="center" >没有相关数据</td> | ||
166 | + </tr> | ||
167 | + </c:otherwise> | ||
168 | + </c:choose> | ||
169 | + </tbody> | ||
170 | + </table> | ||
171 | + <div class="page-header position-relative"> | ||
172 | + <table style="width:100%;"> | ||
173 | + <tr> | ||
174 | + <td style="vertical-align:top;"> | ||
175 | + <c:if test="${QX.add == 1 }"> | ||
176 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | ||
177 | + </c:if> | ||
178 | + <c:if test="${QX.del == 1 }"> | ||
179 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | ||
180 | + </c:if> | ||
181 | + </td> | ||
182 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | ||
183 | + </tr> | ||
184 | + </table> | ||
185 | + </div> | ||
186 | + </form> | ||
187 | + | ||
188 | + </div> | ||
189 | + <!-- /.col --> | ||
190 | + </div> | ||
191 | + <!-- /.row --> | ||
192 | + </div> | ||
193 | + <!-- /.page-content --> | ||
194 | + </div> | ||
195 | + </div> | ||
196 | + <!-- /.main-content --> | ||
197 | + | ||
198 | + <!-- 返回顶部 --> | ||
199 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | ||
200 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | ||
201 | + </a> | ||
202 | + | ||
203 | + </div> | ||
204 | + <!-- /.main-container --> | ||
205 | + | ||
206 | + <!-- basic scripts --> | ||
207 | + <!-- 页面底部js¨ --> | ||
208 | + <%@ include file="../../system/index/foot.jsp"%> | ||
209 | + <!-- 删除时确认窗口 --> | ||
210 | + <script src="static/ace/js/bootbox.js"></script> | ||
211 | + <!-- ace scripts --> | ||
212 | + <script src="static/ace/js/ace/ace.js"></script> | ||
213 | + <!-- 下拉框 --> | ||
214 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
215 | + <!-- 日期框 --> | ||
216 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
217 | + <!--提示框--> | ||
218 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
219 | + <script type="text/javascript"> | ||
220 | + $(top.hangge());//关闭加载状态 | ||
221 | + //检索 | ||
222 | + function tosearch(){ | ||
223 | + top.jzts(); | ||
224 | + $("#Form").submit(); | ||
225 | + } | ||
226 | + $(function() { | ||
227 | + | ||
228 | + //日期框 | ||
229 | + $('.date-picker').datepicker({ | ||
230 | + autoclose: true, | ||
231 | + todayHighlight: true | ||
232 | + }); | ||
233 | + | ||
234 | + //下拉框 | ||
235 | + if(!ace.vars['touch']) { | ||
236 | + $('.chosen-select').chosen({allow_single_deselect:true}); | ||
237 | + $(window) | ||
238 | + .off('resize.chosen') | ||
239 | + .on('resize.chosen', function() { | ||
240 | + $('.chosen-select').each(function() { | ||
241 | + var $this = $(this); | ||
242 | + $this.next().css({'width': $this.parent().width()}); | ||
243 | + }); | ||
244 | + }).trigger('resize.chosen'); | ||
245 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | ||
246 | + if(event_name != 'sidebar_collapsed') return; | ||
247 | + $('.chosen-select').each(function() { | ||
248 | + var $this = $(this); | ||
249 | + $this.next().css({'width': $this.parent().width()}); | ||
250 | + }); | ||
251 | + }); | ||
252 | + $('#chosen-multiple-style .btn').on('click', function(e){ | ||
253 | + var target = $(this).find('input[type=radio]'); | ||
254 | + var which = parseInt(target.val()); | ||
255 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | ||
256 | + else $('#form-field-select-4').removeClass('tag-input-style'); | ||
257 | + }); | ||
258 | + } | ||
259 | + | ||
260 | + | ||
261 | + //复选框全选控制 | ||
262 | + var active_class = 'active'; | ||
263 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | ||
264 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
265 | + $(this).closest('table').find('tbody > tr').each(function(){ | ||
266 | + var row = this; | ||
267 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
268 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
269 | + }); | ||
270 | + }); | ||
271 | + }); | ||
272 | + | ||
273 | + //新增 | ||
274 | + function add(){ | ||
275 | + top.jzts(); | ||
276 | + var diag = new top.Dialog(); | ||
277 | + diag.Drag=true; | ||
278 | + diag.Title ="新增"; | ||
279 | + diag.URL = '<%=basePath%>instantpaper1/goAdd.do'; | ||
280 | + diag.Width = 450; | ||
281 | + diag.Height = 355; | ||
282 | + diag.Modal = true; //有无遮罩窗口 | ||
283 | + diag. ShowMaxButton = true; //最大化按钮 | ||
284 | + diag.ShowMinButton = true; //最小化按钮 | ||
285 | + diag.CancelEvent = function(){ //关闭事件 | ||
286 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
287 | + if('${page.currentPage}' == '0'){ | ||
288 | + tosearch(); | ||
289 | + }else{ | ||
290 | + tosearch(); | ||
291 | + } | ||
292 | + } | ||
293 | + diag.close(); | ||
294 | + }; | ||
295 | + diag.show(); | ||
296 | + } | ||
297 | + | ||
298 | + //删除 | ||
299 | + function del(Id){ | ||
300 | + bootbox.confirm("确定要删除吗?", function(result) { | ||
301 | + if(result) { | ||
302 | + top.jzts(); | ||
303 | + var url = "<%=basePath%>instantpaper1/delete.do?INSTANTPAPER1_ID="+Id+"&tm="+new Date().getTime(); | ||
304 | + $.get(url,function(data){ | ||
305 | + tosearch(); | ||
306 | + }); | ||
307 | + } | ||
308 | + }); | ||
309 | + } | ||
310 | + | ||
311 | + //修改 | ||
312 | + function edit(Id){ | ||
313 | + top.jzts(); | ||
314 | + var diag = new top.Dialog(); | ||
315 | + diag.Drag=true; | ||
316 | + diag.Title ="编辑"; | ||
317 | + diag.URL = '<%=basePath%>instantpaper1/goEdit.do?INSTANTPAPER1_ID='+Id; | ||
318 | + diag.Width = 450; | ||
319 | + diag.Height = 355; | ||
320 | + diag.Modal = true; //有无遮罩窗口 | ||
321 | + diag. ShowMaxButton = true; //最大化按钮 | ||
322 | + diag.ShowMinButton = true; //最小化按钮 | ||
323 | + diag.CancelEvent = function(){ //关闭事件 | ||
324 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
325 | + tosearch(); | ||
326 | + } | ||
327 | + diag.close(); | ||
328 | + }; | ||
329 | + diag.show(); | ||
330 | + } | ||
331 | + | ||
332 | + //批量操作 | ||
333 | + function makeAll(msg){ | ||
334 | + bootbox.confirm(msg, function(result) { | ||
335 | + if(result) { | ||
336 | + var str = ''; | ||
337 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
338 | + if(document.getElementsByName('ids')[i].checked){ | ||
339 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
340 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
341 | + } | ||
342 | + } | ||
343 | + if(str==''){ | ||
344 | + bootbox.dialog({ | ||
345 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | ||
346 | + buttons: | ||
347 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | ||
348 | + }); | ||
349 | + $("#zcheckbox").tips({ | ||
350 | + side:1, | ||
351 | + msg:'点这里全选', | ||
352 | + bg:'#AE81FF', | ||
353 | + time:8 | ||
354 | + }); | ||
355 | + return; | ||
356 | + }else{ | ||
357 | + if(msg == '确定要删除选中的数据吗?'){ | ||
358 | + top.jzts(); | ||
359 | + $.ajax({ | ||
360 | + type: "POST", | ||
361 | + url: '<%=basePath%>instantpaper1/deleteAll.do?tm='+new Date().getTime(), | ||
362 | + data: {DATA_IDS:str}, | ||
363 | + dataType:'json', | ||
364 | + //beforeSend: validateData, | ||
365 | + cache: false, | ||
366 | + success: function(data){ | ||
367 | + $.each(data.list, function(i, list){ | ||
368 | + tosearch(); | ||
369 | + }); | ||
370 | + } | ||
371 | + }); | ||
372 | + } | ||
373 | + } | ||
374 | + } | ||
375 | + }); | ||
376 | + }; | ||
377 | + | ||
378 | + //导出excel | ||
379 | + function toExcel(){ | ||
380 | + window.location.href='<%=basePath%>instantpaper1/excel.do'; | ||
381 | + } | ||
382 | + </script> | ||
383 | + | ||
384 | + | ||
385 | +</body> | ||
386 | +</html> | ||
0 | \ No newline at end of file | 387 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/instantpaper1content/instantpaper1content_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="instantpaper1content/${msg }.do" name="Form" id="Form" method="post"> | ||
31 | + <input type="hidden" name="INSTANTPAPER1CONTENT_ID" id="INSTANTPAPER1CONTENT_ID" value="${pd.INSTANTPAPER1CONTENT_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="PAPER_ID" id="PAPER_ID" value="${pd.PAPER_ID}" maxlength="50" 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="QUESTION_ID" id="QUESTION_ID" value="${pd.QUESTION_ID}" maxlength="50" 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="RANK" id="RANK" value="${pd.RANK}" maxlength="10" 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="TITLE" id="TITLE" value="${pd.TITLE}" maxlength="20" 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="SCORE" id="SCORE" value="${pd.SCORE}" 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="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($("#PAPER_ID").val()==""){ | ||
94 | + $("#PAPER_ID").tips({ | ||
95 | + side:3, | ||
96 | + msg:'请输入试卷', | ||
97 | + bg:'#AE81FF', | ||
98 | + time:2 | ||
99 | + }); | ||
100 | + $("#PAPER_ID").focus(); | ||
101 | + return false; | ||
102 | + } | ||
103 | + if($("#QUESTION_ID").val()==""){ | ||
104 | + $("#QUESTION_ID").tips({ | ||
105 | + side:3, | ||
106 | + msg:'请输入试题', | ||
107 | + bg:'#AE81FF', | ||
108 | + time:2 | ||
109 | + }); | ||
110 | + $("#QUESTION_ID").focus(); | ||
111 | + return false; | ||
112 | + } | ||
113 | + if($("#RANK").val()==""){ | ||
114 | + $("#RANK").tips({ | ||
115 | + side:3, | ||
116 | + msg:'请输入排序', | ||
117 | + bg:'#AE81FF', | ||
118 | + time:2 | ||
119 | + }); | ||
120 | + $("#RANK").focus(); | ||
121 | + return false; | ||
122 | + } | ||
123 | + if($("#TITLE").val()==""){ | ||
124 | + $("#TITLE").tips({ | ||
125 | + side:3, | ||
126 | + msg:'请输入题号', | ||
127 | + bg:'#AE81FF', | ||
128 | + time:2 | ||
129 | + }); | ||
130 | + $("#TITLE").focus(); | ||
131 | + return false; | ||
132 | + } | ||
133 | + if($("#SCORE").val()==""){ | ||
134 | + $("#SCORE").tips({ | ||
135 | + side:3, | ||
136 | + msg:'请输入分数', | ||
137 | + bg:'#AE81FF', | ||
138 | + time:2 | ||
139 | + }); | ||
140 | + $("#SCORE").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 | \ No newline at end of file | 165 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/instantpaper1content/instantpaper1content_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="instantpaper1content/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 | + </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.INSTANTPAPER1CONTENT_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.PAPER_ID}</td> | ||
91 | + <td class='center'>${var.QUESTION_ID}</td> | ||
92 | + <td class='center'>${var.RANK}</td> | ||
93 | + <td class='center'>${var.TITLE}</td> | ||
94 | + <td class='center'>${var.SCORE}</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.INSTANTPAPER1CONTENT_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.INSTANTPAPER1CONTENT_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.INSTANTPAPER1CONTENT_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.INSTANTPAPER1CONTENT_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%>instantpaper1content/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%>instantpaper1content/delete.do?INSTANTPAPER1CONTENT_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%>instantpaper1content/goEdit.do?INSTANTPAPER1CONTENT_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%>instantpaper1content/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%>instantpaper1content/excel.do'; | ||
369 | + } | ||
370 | + </script> | ||
371 | + | ||
372 | + | ||
373 | +</body> | ||
374 | +</html> | ||
0 | \ No newline at end of file | 375 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/instantquestiondatasource1/instantquestiondatasource1_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="instantquestiondatasource1/${msg }.do" name="Form" id="Form" method="post"> | ||
31 | + <input type="hidden" name="INSTANTQUESTIONDATASOURCE1_ID" id="INSTANTQUESTIONDATASOURCE1_ID" value="${pd.INSTANTQUESTIONDATASOURCE1_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="IMAGE_URL" id="IMAGE_URL" value="${pd.IMAGE_URL}" maxlength="100" 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="number" name="SCORE" id="SCORE" value="${pd.SCORE}" maxlength="32" 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="ANSWER_CONTENT" id="ANSWER_CONTENT" value="${pd.ANSWER_CONTENT}" maxlength="100" 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="RIGHT_ANSWER" id="RIGHT_ANSWER" value="${pd.RIGHT_ANSWER}" maxlength="100" 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="TAG" id="TAG" value="${pd.TAG}" maxlength="300" 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="PERMISSION" id="PERMISSION" value="${pd.PERMISSION}" maxlength="100" 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="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="50" 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="text" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" maxlength="50" 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="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="50" placeholder="这里输入学校" title="学校" style="width:98%;"/></td> | ||
69 | + </tr> | ||
70 | + <tr> | ||
71 | + <td style="width:75px;text-align: right;padding-top: 13px;">用户ID:</td> | ||
72 | + <td><input type="text" name="USER_ID" id="USER_ID" value="${pd.USER_ID}" maxlength="50" placeholder="这里输入用户ID" title="用户ID" style="width:98%;"/></td> | ||
73 | + </tr> | ||
74 | + <tr> | ||
75 | + <td style="width:75px;text-align: right;padding-top: 13px;">create_time:</td> | ||
76 | + <td><input class="span10 date-picker" name="创建时间" id="创建时间" value="${pd.创建时间}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="create_time" title="create_time" style="width:98%;"/></td> | ||
77 | + </tr> | ||
78 | + <tr> | ||
79 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级:</td> | ||
80 | + <td><input type="text" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="50" placeholder="这里输入班级" title="班级" style="width:98%;"/></td> | ||
81 | + </tr> | ||
82 | + <tr> | ||
83 | + <td style="text-align: center;" colspan="10"> | ||
84 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | ||
85 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | ||
86 | + </td> | ||
87 | + </tr> | ||
88 | + </table> | ||
89 | + </div> | ||
90 | + <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> | ||
91 | + </form> | ||
92 | + </div> | ||
93 | + <!-- /.col --> | ||
94 | + </div> | ||
95 | + <!-- /.row --> | ||
96 | + </div> | ||
97 | + <!-- /.page-content --> | ||
98 | + </div> | ||
99 | + </div> | ||
100 | + <!-- /.main-content --> | ||
101 | +</div> | ||
102 | +<!-- /.main-container --> | ||
103 | + | ||
104 | + | ||
105 | + <!-- 页面底部js¨ --> | ||
106 | + <%@ include file="../../system/index/foot.jsp"%> | ||
107 | + <!-- 下拉框 --> | ||
108 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
109 | + <!-- 日期框 --> | ||
110 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
111 | + <!--提示框--> | ||
112 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
113 | + <script type="text/javascript"> | ||
114 | + $(top.hangge()); | ||
115 | + //保存 | ||
116 | + function save(){ | ||
117 | + if($("#IMAGE_URL").val()==""){ | ||
118 | + $("#IMAGE_URL").tips({ | ||
119 | + side:3, | ||
120 | + msg:'请输入图片路径', | ||
121 | + bg:'#AE81FF', | ||
122 | + time:2 | ||
123 | + }); | ||
124 | + $("#IMAGE_URL").focus(); | ||
125 | + return false; | ||
126 | + } | ||
127 | + if($("#SCORE").val()==""){ | ||
128 | + $("#SCORE").tips({ | ||
129 | + side:3, | ||
130 | + msg:'请输入分数', | ||
131 | + bg:'#AE81FF', | ||
132 | + time:2 | ||
133 | + }); | ||
134 | + $("#SCORE").focus(); | ||
135 | + return false; | ||
136 | + } | ||
137 | + if($("#ANSWER_CONTENT").val()==""){ | ||
138 | + $("#ANSWER_CONTENT").tips({ | ||
139 | + side:3, | ||
140 | + msg:'请输入答案内容', | ||
141 | + bg:'#AE81FF', | ||
142 | + time:2 | ||
143 | + }); | ||
144 | + $("#ANSWER_CONTENT").focus(); | ||
145 | + return false; | ||
146 | + } | ||
147 | + if($("#RIGHT_ANSWER").val()==""){ | ||
148 | + $("#RIGHT_ANSWER").tips({ | ||
149 | + side:3, | ||
150 | + msg:'请输入标准答案', | ||
151 | + bg:'#AE81FF', | ||
152 | + time:2 | ||
153 | + }); | ||
154 | + $("#RIGHT_ANSWER").focus(); | ||
155 | + return false; | ||
156 | + } | ||
157 | + if($("#TAG").val()==""){ | ||
158 | + $("#TAG").tips({ | ||
159 | + side:3, | ||
160 | + msg:'请输入标签', | ||
161 | + bg:'#AE81FF', | ||
162 | + time:2 | ||
163 | + }); | ||
164 | + $("#TAG").focus(); | ||
165 | + return false; | ||
166 | + } | ||
167 | + if($("#PERMISSION").val()==""){ | ||
168 | + $("#PERMISSION").tips({ | ||
169 | + side:3, | ||
170 | + msg:'请输入权限', | ||
171 | + bg:'#AE81FF', | ||
172 | + time:2 | ||
173 | + }); | ||
174 | + $("#PERMISSION").focus(); | ||
175 | + return false; | ||
176 | + } | ||
177 | + if($("#SUBJECT_ID").val()==""){ | ||
178 | + $("#SUBJECT_ID").tips({ | ||
179 | + side:3, | ||
180 | + msg:'请输入科目', | ||
181 | + bg:'#AE81FF', | ||
182 | + time:2 | ||
183 | + }); | ||
184 | + $("#SUBJECT_ID").focus(); | ||
185 | + return false; | ||
186 | + } | ||
187 | + if($("#GRADE_ID").val()==""){ | ||
188 | + $("#GRADE_ID").tips({ | ||
189 | + side:3, | ||
190 | + msg:'请输入年级', | ||
191 | + bg:'#AE81FF', | ||
192 | + time:2 | ||
193 | + }); | ||
194 | + $("#GRADE_ID").focus(); | ||
195 | + return false; | ||
196 | + } | ||
197 | + if($("#SCHOOL_ID").val()==""){ | ||
198 | + $("#SCHOOL_ID").tips({ | ||
199 | + side:3, | ||
200 | + msg:'请输入学校', | ||
201 | + bg:'#AE81FF', | ||
202 | + time:2 | ||
203 | + }); | ||
204 | + $("#SCHOOL_ID").focus(); | ||
205 | + return false; | ||
206 | + } | ||
207 | + if($("#USER_ID").val()==""){ | ||
208 | + $("#USER_ID").tips({ | ||
209 | + side:3, | ||
210 | + msg:'请输入用户ID', | ||
211 | + bg:'#AE81FF', | ||
212 | + time:2 | ||
213 | + }); | ||
214 | + $("#USER_ID").focus(); | ||
215 | + return false; | ||
216 | + } | ||
217 | + if($("#创建时间").val()==""){ | ||
218 | + $("#创建时间").tips({ | ||
219 | + side:3, | ||
220 | + msg:'请输入create_time', | ||
221 | + bg:'#AE81FF', | ||
222 | + time:2 | ||
223 | + }); | ||
224 | + $("#创建时间").focus(); | ||
225 | + return false; | ||
226 | + } | ||
227 | + if($("#CLASS_ID").val()==""){ | ||
228 | + $("#CLASS_ID").tips({ | ||
229 | + side:3, | ||
230 | + msg:'请输入班级', | ||
231 | + bg:'#AE81FF', | ||
232 | + time:2 | ||
233 | + }); | ||
234 | + $("#CLASS_ID").focus(); | ||
235 | + return false; | ||
236 | + } | ||
237 | + $("#Form").submit(); | ||
238 | + $("#zhongxin").hide(); | ||
239 | + $("#zhongxin2").show(); | ||
240 | + } | ||
241 | + | ||
242 | + $(function() { | ||
243 | + //日期框 | ||
244 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | ||
245 | + }); | ||
246 | + </script> | ||
247 | +</body> | ||
248 | +</html> | ||
0 | \ No newline at end of file | 249 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/instantquestiondatasource1/instantquestiondatasource1_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="instantquestiondatasource1/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">用户ID</th> | ||
79 | + <th class="center">create_time</th> | ||
80 | + <th class="center">班级</th> | ||
81 | + <th class="center">操作</th> | ||
82 | + </tr> | ||
83 | + </thead> | ||
84 | + | ||
85 | + <tbody> | ||
86 | + <!-- 开始循环 --> | ||
87 | + <c:choose> | ||
88 | + <c:when test="${not empty varList}"> | ||
89 | + <c:if test="${QX.cha == 1 }"> | ||
90 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
91 | + <tr> | ||
92 | + <td class='center'> | ||
93 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.INSTANTQUESTIONDATASOURCE1_ID}" class="ace" /><span class="lbl"></span></label> | ||
94 | + </td> | ||
95 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | ||
96 | + <td class='center'>${var.IMAGE_URL}</td> | ||
97 | + <td class='center'>${var.SCORE}</td> | ||
98 | + <td class='center'>${var.ANSWER_CONTENT}</td> | ||
99 | + <td class='center'>${var.RIGHT_ANSWER}</td> | ||
100 | + <td class='center'>${var.TAG}</td> | ||
101 | + <td class='center'>${var.PERMISSION}</td> | ||
102 | + <td class='center'>${var.SUBJECT_ID}</td> | ||
103 | + <td class='center'>${var.GRADE_ID}</td> | ||
104 | + <td class='center'>${var.SCHOOL_ID}</td> | ||
105 | + <td class='center'>${var.USER_ID}</td> | ||
106 | + <td class='center'>${var.创建时间}</td> | ||
107 | + <td class='center'>${var.CLASS_ID}</td> | ||
108 | + <td class="center"> | ||
109 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | ||
110 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | ||
111 | + </c:if> | ||
112 | + <div class="hidden-sm hidden-xs btn-group"> | ||
113 | + <c:if test="${QX.edit == 1 }"> | ||
114 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.INSTANTQUESTIONDATASOURCE1_ID}');"> | ||
115 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | ||
116 | + </a> | ||
117 | + </c:if> | ||
118 | + <c:if test="${QX.del == 1 }"> | ||
119 | + <a class="btn btn-xs btn-danger" onclick="del('${var.INSTANTQUESTIONDATASOURCE1_ID}');"> | ||
120 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | ||
121 | + </a> | ||
122 | + </c:if> | ||
123 | + </div> | ||
124 | + <div class="hidden-md hidden-lg"> | ||
125 | + <div class="inline pos-rel"> | ||
126 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | ||
127 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | ||
128 | + </button> | ||
129 | + | ||
130 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | ||
131 | + <c:if test="${QX.edit == 1 }"> | ||
132 | + <li> | ||
133 | + <a style="cursor:pointer;" onclick="edit('${var.INSTANTQUESTIONDATASOURCE1_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | ||
134 | + <span class="green"> | ||
135 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | ||
136 | + </span> | ||
137 | + </a> | ||
138 | + </li> | ||
139 | + </c:if> | ||
140 | + <c:if test="${QX.del == 1 }"> | ||
141 | + <li> | ||
142 | + <a style="cursor:pointer;" onclick="del('${var.INSTANTQUESTIONDATASOURCE1_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | ||
143 | + <span class="red"> | ||
144 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | ||
145 | + </span> | ||
146 | + </a> | ||
147 | + </li> | ||
148 | + </c:if> | ||
149 | + </ul> | ||
150 | + </div> | ||
151 | + </div> | ||
152 | + </td> | ||
153 | + </tr> | ||
154 | + | ||
155 | + </c:forEach> | ||
156 | + </c:if> | ||
157 | + <c:if test="${QX.cha == 0 }"> | ||
158 | + <tr> | ||
159 | + <td colspan="100" class="center">您无权查看</td> | ||
160 | + </tr> | ||
161 | + </c:if> | ||
162 | + </c:when> | ||
163 | + <c:otherwise> | ||
164 | + <tr class="main_info"> | ||
165 | + <td colspan="100" class="center" >没有相关数据</td> | ||
166 | + </tr> | ||
167 | + </c:otherwise> | ||
168 | + </c:choose> | ||
169 | + </tbody> | ||
170 | + </table> | ||
171 | + <div class="page-header position-relative"> | ||
172 | + <table style="width:100%;"> | ||
173 | + <tr> | ||
174 | + <td style="vertical-align:top;"> | ||
175 | + <c:if test="${QX.add == 1 }"> | ||
176 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | ||
177 | + </c:if> | ||
178 | + <c:if test="${QX.del == 1 }"> | ||
179 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | ||
180 | + </c:if> | ||
181 | + </td> | ||
182 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | ||
183 | + </tr> | ||
184 | + </table> | ||
185 | + </div> | ||
186 | + </form> | ||
187 | + | ||
188 | + </div> | ||
189 | + <!-- /.col --> | ||
190 | + </div> | ||
191 | + <!-- /.row --> | ||
192 | + </div> | ||
193 | + <!-- /.page-content --> | ||
194 | + </div> | ||
195 | + </div> | ||
196 | + <!-- /.main-content --> | ||
197 | + | ||
198 | + <!-- 返回顶部 --> | ||
199 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | ||
200 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | ||
201 | + </a> | ||
202 | + | ||
203 | + </div> | ||
204 | + <!-- /.main-container --> | ||
205 | + | ||
206 | + <!-- basic scripts --> | ||
207 | + <!-- 页面底部js¨ --> | ||
208 | + <%@ include file="../../system/index/foot.jsp"%> | ||
209 | + <!-- 删除时确认窗口 --> | ||
210 | + <script src="static/ace/js/bootbox.js"></script> | ||
211 | + <!-- ace scripts --> | ||
212 | + <script src="static/ace/js/ace/ace.js"></script> | ||
213 | + <!-- 下拉框 --> | ||
214 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
215 | + <!-- 日期框 --> | ||
216 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
217 | + <!--提示框--> | ||
218 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
219 | + <script type="text/javascript"> | ||
220 | + $(top.hangge());//关闭加载状态 | ||
221 | + //检索 | ||
222 | + function tosearch(){ | ||
223 | + top.jzts(); | ||
224 | + $("#Form").submit(); | ||
225 | + } | ||
226 | + $(function() { | ||
227 | + | ||
228 | + //日期框 | ||
229 | + $('.date-picker').datepicker({ | ||
230 | + autoclose: true, | ||
231 | + todayHighlight: true | ||
232 | + }); | ||
233 | + | ||
234 | + //下拉框 | ||
235 | + if(!ace.vars['touch']) { | ||
236 | + $('.chosen-select').chosen({allow_single_deselect:true}); | ||
237 | + $(window) | ||
238 | + .off('resize.chosen') | ||
239 | + .on('resize.chosen', function() { | ||
240 | + $('.chosen-select').each(function() { | ||
241 | + var $this = $(this); | ||
242 | + $this.next().css({'width': $this.parent().width()}); | ||
243 | + }); | ||
244 | + }).trigger('resize.chosen'); | ||
245 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | ||
246 | + if(event_name != 'sidebar_collapsed') return; | ||
247 | + $('.chosen-select').each(function() { | ||
248 | + var $this = $(this); | ||
249 | + $this.next().css({'width': $this.parent().width()}); | ||
250 | + }); | ||
251 | + }); | ||
252 | + $('#chosen-multiple-style .btn').on('click', function(e){ | ||
253 | + var target = $(this).find('input[type=radio]'); | ||
254 | + var which = parseInt(target.val()); | ||
255 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | ||
256 | + else $('#form-field-select-4').removeClass('tag-input-style'); | ||
257 | + }); | ||
258 | + } | ||
259 | + | ||
260 | + | ||
261 | + //复选框全选控制 | ||
262 | + var active_class = 'active'; | ||
263 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | ||
264 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
265 | + $(this).closest('table').find('tbody > tr').each(function(){ | ||
266 | + var row = this; | ||
267 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
268 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
269 | + }); | ||
270 | + }); | ||
271 | + }); | ||
272 | + | ||
273 | + //新增 | ||
274 | + function add(){ | ||
275 | + top.jzts(); | ||
276 | + var diag = new top.Dialog(); | ||
277 | + diag.Drag=true; | ||
278 | + diag.Title ="新增"; | ||
279 | + diag.URL = '<%=basePath%>instantquestiondatasource1/goAdd.do'; | ||
280 | + diag.Width = 450; | ||
281 | + diag.Height = 355; | ||
282 | + diag.Modal = true; //有无遮罩窗口 | ||
283 | + diag. ShowMaxButton = true; //最大化按钮 | ||
284 | + diag.ShowMinButton = true; //最小化按钮 | ||
285 | + diag.CancelEvent = function(){ //关闭事件 | ||
286 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
287 | + if('${page.currentPage}' == '0'){ | ||
288 | + tosearch(); | ||
289 | + }else{ | ||
290 | + tosearch(); | ||
291 | + } | ||
292 | + } | ||
293 | + diag.close(); | ||
294 | + }; | ||
295 | + diag.show(); | ||
296 | + } | ||
297 | + | ||
298 | + //删除 | ||
299 | + function del(Id){ | ||
300 | + bootbox.confirm("确定要删除吗?", function(result) { | ||
301 | + if(result) { | ||
302 | + top.jzts(); | ||
303 | + var url = "<%=basePath%>instantquestiondatasource1/delete.do?INSTANTQUESTIONDATASOURCE1_ID="+Id+"&tm="+new Date().getTime(); | ||
304 | + $.get(url,function(data){ | ||
305 | + tosearch(); | ||
306 | + }); | ||
307 | + } | ||
308 | + }); | ||
309 | + } | ||
310 | + | ||
311 | + //修改 | ||
312 | + function edit(Id){ | ||
313 | + top.jzts(); | ||
314 | + var diag = new top.Dialog(); | ||
315 | + diag.Drag=true; | ||
316 | + diag.Title ="编辑"; | ||
317 | + diag.URL = '<%=basePath%>instantquestiondatasource1/goEdit.do?INSTANTQUESTIONDATASOURCE1_ID='+Id; | ||
318 | + diag.Width = 450; | ||
319 | + diag.Height = 355; | ||
320 | + diag.Modal = true; //有无遮罩窗口 | ||
321 | + diag. ShowMaxButton = true; //最大化按钮 | ||
322 | + diag.ShowMinButton = true; //最小化按钮 | ||
323 | + diag.CancelEvent = function(){ //关闭事件 | ||
324 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
325 | + tosearch(); | ||
326 | + } | ||
327 | + diag.close(); | ||
328 | + }; | ||
329 | + diag.show(); | ||
330 | + } | ||
331 | + | ||
332 | + //批量操作 | ||
333 | + function makeAll(msg){ | ||
334 | + bootbox.confirm(msg, function(result) { | ||
335 | + if(result) { | ||
336 | + var str = ''; | ||
337 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
338 | + if(document.getElementsByName('ids')[i].checked){ | ||
339 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
340 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
341 | + } | ||
342 | + } | ||
343 | + if(str==''){ | ||
344 | + bootbox.dialog({ | ||
345 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | ||
346 | + buttons: | ||
347 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | ||
348 | + }); | ||
349 | + $("#zcheckbox").tips({ | ||
350 | + side:1, | ||
351 | + msg:'点这里全选', | ||
352 | + bg:'#AE81FF', | ||
353 | + time:8 | ||
354 | + }); | ||
355 | + return; | ||
356 | + }else{ | ||
357 | + if(msg == '确定要删除选中的数据吗?'){ | ||
358 | + top.jzts(); | ||
359 | + $.ajax({ | ||
360 | + type: "POST", | ||
361 | + url: '<%=basePath%>instantquestiondatasource1/deleteAll.do?tm='+new Date().getTime(), | ||
362 | + data: {DATA_IDS:str}, | ||
363 | + dataType:'json', | ||
364 | + //beforeSend: validateData, | ||
365 | + cache: false, | ||
366 | + success: function(data){ | ||
367 | + $.each(data.list, function(i, list){ | ||
368 | + tosearch(); | ||
369 | + }); | ||
370 | + } | ||
371 | + }); | ||
372 | + } | ||
373 | + } | ||
374 | + } | ||
375 | + }); | ||
376 | + }; | ||
377 | + | ||
378 | + //导出excel | ||
379 | + function toExcel(){ | ||
380 | + window.location.href='<%=basePath%>instantquestiondatasource1/excel.do'; | ||
381 | + } | ||
382 | + </script> | ||
383 | + | ||
384 | + | ||
385 | +</body> | ||
386 | +</html> | ||
0 | \ No newline at end of file | 387 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/paperanswer1/paperanswer1_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="paperanswer1/${msg }.do" name="Form" id="Form" method="post"> | ||
31 | + <input type="hidden" name="PAPERANSWER1_ID" id="PAPERANSWER1_ID" value="${pd.PAPERANSWER1_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="PAPER_ID" id="PAPER_ID" value="${pd.PAPER_ID}" maxlength="35" 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="PAPER_NAME" id="PAPER_NAME" value="${pd.PAPER_NAME}" maxlength="30" 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="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="35" placeholder="这里输入科目" title="科目" style="width:98%;"/></td> | ||
45 | + </tr> | ||
46 | + <tr> | ||
47 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级ID:</td> | ||
48 | + <td><input type="text" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="35" placeholder="这里输入班级ID" title="班级ID" 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="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" maxlength="35" 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="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="35" 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="USER_ID" id="USER_ID" value="${pd.USER_ID}" maxlength="35" 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 class="span10 date-picker" name="CREATE_DATE" id="CREATE_DATE" value="${pd.CREATE_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" 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="AVG_SCORE" id="AVG_SCORE" value="${pd.AVG_SCORE}" maxlength="35" 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="HIGHT_SCORE" id="HIGHT_SCORE" value="${pd.HIGHT_SCORE}" maxlength="35" placeholder="这里输入最高分" title="最高分" style="width:98%;"/></td> | ||
73 | + </tr> | ||
74 | + <tr> | ||
75 | + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | ||
76 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | ||
77 | + </tr> | ||
78 | + <tr> | ||
79 | + <td style="text-align: center;" colspan="10"> | ||
80 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | ||
81 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | ||
82 | + </td> | ||
83 | + </tr> | ||
84 | + </table> | ||
85 | + </div> | ||
86 | + <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> | ||
87 | + </form> | ||
88 | + </div> | ||
89 | + <!-- /.col --> | ||
90 | + </div> | ||
91 | + <!-- /.row --> | ||
92 | + </div> | ||
93 | + <!-- /.page-content --> | ||
94 | + </div> | ||
95 | + </div> | ||
96 | + <!-- /.main-content --> | ||
97 | +</div> | ||
98 | +<!-- /.main-container --> | ||
99 | + | ||
100 | + | ||
101 | + <!-- 页面底部js¨ --> | ||
102 | + <%@ include file="../../system/index/foot.jsp"%> | ||
103 | + <!-- 下拉框 --> | ||
104 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
105 | + <!-- 日期框 --> | ||
106 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
107 | + <!--提示框--> | ||
108 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
109 | + <script type="text/javascript"> | ||
110 | + $(top.hangge()); | ||
111 | + //保存 | ||
112 | + function save(){ | ||
113 | + if($("#PAPER_ID").val()==""){ | ||
114 | + $("#PAPER_ID").tips({ | ||
115 | + side:3, | ||
116 | + msg:'请输入试卷', | ||
117 | + bg:'#AE81FF', | ||
118 | + time:2 | ||
119 | + }); | ||
120 | + $("#PAPER_ID").focus(); | ||
121 | + return false; | ||
122 | + } | ||
123 | + if($("#PAPER_NAME").val()==""){ | ||
124 | + $("#PAPER_NAME").tips({ | ||
125 | + side:3, | ||
126 | + msg:'请输入试卷名称', | ||
127 | + bg:'#AE81FF', | ||
128 | + time:2 | ||
129 | + }); | ||
130 | + $("#PAPER_NAME").focus(); | ||
131 | + return false; | ||
132 | + } | ||
133 | + if($("#SUBJECT_ID").val()==""){ | ||
134 | + $("#SUBJECT_ID").tips({ | ||
135 | + side:3, | ||
136 | + msg:'请输入科目', | ||
137 | + bg:'#AE81FF', | ||
138 | + time:2 | ||
139 | + }); | ||
140 | + $("#SUBJECT_ID").focus(); | ||
141 | + return false; | ||
142 | + } | ||
143 | + if($("#CLASS_ID").val()==""){ | ||
144 | + $("#CLASS_ID").tips({ | ||
145 | + side:3, | ||
146 | + msg:'请输入班级ID', | ||
147 | + bg:'#AE81FF', | ||
148 | + time:2 | ||
149 | + }); | ||
150 | + $("#CLASS_ID").focus(); | ||
151 | + return false; | ||
152 | + } | ||
153 | + if($("#GRADE_ID").val()==""){ | ||
154 | + $("#GRADE_ID").tips({ | ||
155 | + side:3, | ||
156 | + msg:'请输入年级', | ||
157 | + bg:'#AE81FF', | ||
158 | + time:2 | ||
159 | + }); | ||
160 | + $("#GRADE_ID").focus(); | ||
161 | + return false; | ||
162 | + } | ||
163 | + if($("#SCHOOL_ID").val()==""){ | ||
164 | + $("#SCHOOL_ID").tips({ | ||
165 | + side:3, | ||
166 | + msg:'请输入学校', | ||
167 | + bg:'#AE81FF', | ||
168 | + time:2 | ||
169 | + }); | ||
170 | + $("#SCHOOL_ID").focus(); | ||
171 | + return false; | ||
172 | + } | ||
173 | + if($("#USER_ID").val()==""){ | ||
174 | + $("#USER_ID").tips({ | ||
175 | + side:3, | ||
176 | + msg:'请输入创建者', | ||
177 | + bg:'#AE81FF', | ||
178 | + time:2 | ||
179 | + }); | ||
180 | + $("#USER_ID").focus(); | ||
181 | + return false; | ||
182 | + } | ||
183 | + if($("#CREATE_DATE").val()==""){ | ||
184 | + $("#CREATE_DATE").tips({ | ||
185 | + side:3, | ||
186 | + msg:'请输入考试时间', | ||
187 | + bg:'#AE81FF', | ||
188 | + time:2 | ||
189 | + }); | ||
190 | + $("#CREATE_DATE").focus(); | ||
191 | + return false; | ||
192 | + } | ||
193 | + if($("#AVG_SCORE").val()==""){ | ||
194 | + $("#AVG_SCORE").tips({ | ||
195 | + side:3, | ||
196 | + msg:'请输入平均分', | ||
197 | + bg:'#AE81FF', | ||
198 | + time:2 | ||
199 | + }); | ||
200 | + $("#AVG_SCORE").focus(); | ||
201 | + return false; | ||
202 | + } | ||
203 | + if($("#HIGHT_SCORE").val()==""){ | ||
204 | + $("#HIGHT_SCORE").tips({ | ||
205 | + side:3, | ||
206 | + msg:'请输入最高分', | ||
207 | + bg:'#AE81FF', | ||
208 | + time:2 | ||
209 | + }); | ||
210 | + $("#HIGHT_SCORE").focus(); | ||
211 | + return false; | ||
212 | + } | ||
213 | + if($("#REMARK").val()==""){ | ||
214 | + $("#REMARK").tips({ | ||
215 | + side:3, | ||
216 | + msg:'请输入备注', | ||
217 | + bg:'#AE81FF', | ||
218 | + time:2 | ||
219 | + }); | ||
220 | + $("#REMARK").focus(); | ||
221 | + return false; | ||
222 | + } | ||
223 | + $("#Form").submit(); | ||
224 | + $("#zhongxin").hide(); | ||
225 | + $("#zhongxin2").show(); | ||
226 | + } | ||
227 | + | ||
228 | + $(function() { | ||
229 | + //日期框 | ||
230 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | ||
231 | + }); | ||
232 | + </script> | ||
233 | +</body> | ||
234 | +</html> | ||
0 | \ No newline at end of file | 235 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/paperanswer1/paperanswer1_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="paperanswer1/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">班级ID</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 | + <th class="center">操作</th> | ||
81 | + </tr> | ||
82 | + </thead> | ||
83 | + | ||
84 | + <tbody> | ||
85 | + <!-- 开始循环 --> | ||
86 | + <c:choose> | ||
87 | + <c:when test="${not empty varList}"> | ||
88 | + <c:if test="${QX.cha == 1 }"> | ||
89 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
90 | + <tr> | ||
91 | + <td class='center'> | ||
92 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.PAPERANSWER1_ID}" class="ace" /><span class="lbl"></span></label> | ||
93 | + </td> | ||
94 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | ||
95 | + <td class='center'>${var.PAPER_ID}</td> | ||
96 | + <td class='center'>${var.PAPER_NAME}</td> | ||
97 | + <td class='center'>${var.SUBJECT_ID}</td> | ||
98 | + <td class='center'>${var.CLASS_ID}</td> | ||
99 | + <td class='center'>${var.GRADE_ID}</td> | ||
100 | + <td class='center'>${var.SCHOOL_ID}</td> | ||
101 | + <td class='center'>${var.USER_ID}</td> | ||
102 | + <td class='center'>${var.CREATE_DATE}</td> | ||
103 | + <td class='center'>${var.AVG_SCORE}</td> | ||
104 | + <td class='center'>${var.HIGHT_SCORE}</td> | ||
105 | + <td class='center'>${var.REMARK}</td> | ||
106 | + <td class="center"> | ||
107 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | ||
108 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | ||
109 | + </c:if> | ||
110 | + <div class="hidden-sm hidden-xs btn-group"> | ||
111 | + <c:if test="${QX.edit == 1 }"> | ||
112 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.PAPERANSWER1_ID}');"> | ||
113 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | ||
114 | + </a> | ||
115 | + </c:if> | ||
116 | + <c:if test="${QX.del == 1 }"> | ||
117 | + <a class="btn btn-xs btn-danger" onclick="del('${var.PAPERANSWER1_ID}');"> | ||
118 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | ||
119 | + </a> | ||
120 | + </c:if> | ||
121 | + </div> | ||
122 | + <div class="hidden-md hidden-lg"> | ||
123 | + <div class="inline pos-rel"> | ||
124 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | ||
125 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | ||
126 | + </button> | ||
127 | + | ||
128 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | ||
129 | + <c:if test="${QX.edit == 1 }"> | ||
130 | + <li> | ||
131 | + <a style="cursor:pointer;" onclick="edit('${var.PAPERANSWER1_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | ||
132 | + <span class="green"> | ||
133 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | ||
134 | + </span> | ||
135 | + </a> | ||
136 | + </li> | ||
137 | + </c:if> | ||
138 | + <c:if test="${QX.del == 1 }"> | ||
139 | + <li> | ||
140 | + <a style="cursor:pointer;" onclick="del('${var.PAPERANSWER1_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | ||
141 | + <span class="red"> | ||
142 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | ||
143 | + </span> | ||
144 | + </a> | ||
145 | + </li> | ||
146 | + </c:if> | ||
147 | + </ul> | ||
148 | + </div> | ||
149 | + </div> | ||
150 | + </td> | ||
151 | + </tr> | ||
152 | + | ||
153 | + </c:forEach> | ||
154 | + </c:if> | ||
155 | + <c:if test="${QX.cha == 0 }"> | ||
156 | + <tr> | ||
157 | + <td colspan="100" class="center">您无权查看</td> | ||
158 | + </tr> | ||
159 | + </c:if> | ||
160 | + </c:when> | ||
161 | + <c:otherwise> | ||
162 | + <tr class="main_info"> | ||
163 | + <td colspan="100" class="center" >没有相关数据</td> | ||
164 | + </tr> | ||
165 | + </c:otherwise> | ||
166 | + </c:choose> | ||
167 | + </tbody> | ||
168 | + </table> | ||
169 | + <div class="page-header position-relative"> | ||
170 | + <table style="width:100%;"> | ||
171 | + <tr> | ||
172 | + <td style="vertical-align:top;"> | ||
173 | + <c:if test="${QX.add == 1 }"> | ||
174 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | ||
175 | + </c:if> | ||
176 | + <c:if test="${QX.del == 1 }"> | ||
177 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | ||
178 | + </c:if> | ||
179 | + </td> | ||
180 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | ||
181 | + </tr> | ||
182 | + </table> | ||
183 | + </div> | ||
184 | + </form> | ||
185 | + | ||
186 | + </div> | ||
187 | + <!-- /.col --> | ||
188 | + </div> | ||
189 | + <!-- /.row --> | ||
190 | + </div> | ||
191 | + <!-- /.page-content --> | ||
192 | + </div> | ||
193 | + </div> | ||
194 | + <!-- /.main-content --> | ||
195 | + | ||
196 | + <!-- 返回顶部 --> | ||
197 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | ||
198 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | ||
199 | + </a> | ||
200 | + | ||
201 | + </div> | ||
202 | + <!-- /.main-container --> | ||
203 | + | ||
204 | + <!-- basic scripts --> | ||
205 | + <!-- 页面底部js¨ --> | ||
206 | + <%@ include file="../../system/index/foot.jsp"%> | ||
207 | + <!-- 删除时确认窗口 --> | ||
208 | + <script src="static/ace/js/bootbox.js"></script> | ||
209 | + <!-- ace scripts --> | ||
210 | + <script src="static/ace/js/ace/ace.js"></script> | ||
211 | + <!-- 下拉框 --> | ||
212 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
213 | + <!-- 日期框 --> | ||
214 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
215 | + <!--提示框--> | ||
216 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
217 | + <script type="text/javascript"> | ||
218 | + $(top.hangge());//关闭加载状态 | ||
219 | + //检索 | ||
220 | + function tosearch(){ | ||
221 | + top.jzts(); | ||
222 | + $("#Form").submit(); | ||
223 | + } | ||
224 | + $(function() { | ||
225 | + | ||
226 | + //日期框 | ||
227 | + $('.date-picker').datepicker({ | ||
228 | + autoclose: true, | ||
229 | + todayHighlight: true | ||
230 | + }); | ||
231 | + | ||
232 | + //下拉框 | ||
233 | + if(!ace.vars['touch']) { | ||
234 | + $('.chosen-select').chosen({allow_single_deselect:true}); | ||
235 | + $(window) | ||
236 | + .off('resize.chosen') | ||
237 | + .on('resize.chosen', function() { | ||
238 | + $('.chosen-select').each(function() { | ||
239 | + var $this = $(this); | ||
240 | + $this.next().css({'width': $this.parent().width()}); | ||
241 | + }); | ||
242 | + }).trigger('resize.chosen'); | ||
243 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | ||
244 | + if(event_name != 'sidebar_collapsed') return; | ||
245 | + $('.chosen-select').each(function() { | ||
246 | + var $this = $(this); | ||
247 | + $this.next().css({'width': $this.parent().width()}); | ||
248 | + }); | ||
249 | + }); | ||
250 | + $('#chosen-multiple-style .btn').on('click', function(e){ | ||
251 | + var target = $(this).find('input[type=radio]'); | ||
252 | + var which = parseInt(target.val()); | ||
253 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | ||
254 | + else $('#form-field-select-4').removeClass('tag-input-style'); | ||
255 | + }); | ||
256 | + } | ||
257 | + | ||
258 | + | ||
259 | + //复选框全选控制 | ||
260 | + var active_class = 'active'; | ||
261 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | ||
262 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
263 | + $(this).closest('table').find('tbody > tr').each(function(){ | ||
264 | + var row = this; | ||
265 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
266 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
267 | + }); | ||
268 | + }); | ||
269 | + }); | ||
270 | + | ||
271 | + //新增 | ||
272 | + function add(){ | ||
273 | + top.jzts(); | ||
274 | + var diag = new top.Dialog(); | ||
275 | + diag.Drag=true; | ||
276 | + diag.Title ="新增"; | ||
277 | + diag.URL = '<%=basePath%>paperanswer1/goAdd.do'; | ||
278 | + diag.Width = 450; | ||
279 | + diag.Height = 355; | ||
280 | + diag.Modal = true; //有无遮罩窗口 | ||
281 | + diag. ShowMaxButton = true; //最大化按钮 | ||
282 | + diag.ShowMinButton = true; //最小化按钮 | ||
283 | + diag.CancelEvent = function(){ //关闭事件 | ||
284 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
285 | + if('${page.currentPage}' == '0'){ | ||
286 | + tosearch(); | ||
287 | + }else{ | ||
288 | + tosearch(); | ||
289 | + } | ||
290 | + } | ||
291 | + diag.close(); | ||
292 | + }; | ||
293 | + diag.show(); | ||
294 | + } | ||
295 | + | ||
296 | + //删除 | ||
297 | + function del(Id){ | ||
298 | + bootbox.confirm("确定要删除吗?", function(result) { | ||
299 | + if(result) { | ||
300 | + top.jzts(); | ||
301 | + var url = "<%=basePath%>paperanswer1/delete.do?PAPERANSWER1_ID="+Id+"&tm="+new Date().getTime(); | ||
302 | + $.get(url,function(data){ | ||
303 | + tosearch(); | ||
304 | + }); | ||
305 | + } | ||
306 | + }); | ||
307 | + } | ||
308 | + | ||
309 | + //修改 | ||
310 | + function edit(Id){ | ||
311 | + top.jzts(); | ||
312 | + var diag = new top.Dialog(); | ||
313 | + diag.Drag=true; | ||
314 | + diag.Title ="编辑"; | ||
315 | + diag.URL = '<%=basePath%>paperanswer1/goEdit.do?PAPERANSWER1_ID='+Id; | ||
316 | + diag.Width = 450; | ||
317 | + diag.Height = 355; | ||
318 | + diag.Modal = true; //有无遮罩窗口 | ||
319 | + diag. ShowMaxButton = true; //最大化按钮 | ||
320 | + diag.ShowMinButton = true; //最小化按钮 | ||
321 | + diag.CancelEvent = function(){ //关闭事件 | ||
322 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
323 | + tosearch(); | ||
324 | + } | ||
325 | + diag.close(); | ||
326 | + }; | ||
327 | + diag.show(); | ||
328 | + } | ||
329 | + | ||
330 | + //批量操作 | ||
331 | + function makeAll(msg){ | ||
332 | + bootbox.confirm(msg, function(result) { | ||
333 | + if(result) { | ||
334 | + var str = ''; | ||
335 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
336 | + if(document.getElementsByName('ids')[i].checked){ | ||
337 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
338 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
339 | + } | ||
340 | + } | ||
341 | + if(str==''){ | ||
342 | + bootbox.dialog({ | ||
343 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | ||
344 | + buttons: | ||
345 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | ||
346 | + }); | ||
347 | + $("#zcheckbox").tips({ | ||
348 | + side:1, | ||
349 | + msg:'点这里全选', | ||
350 | + bg:'#AE81FF', | ||
351 | + time:8 | ||
352 | + }); | ||
353 | + return; | ||
354 | + }else{ | ||
355 | + if(msg == '确定要删除选中的数据吗?'){ | ||
356 | + top.jzts(); | ||
357 | + $.ajax({ | ||
358 | + type: "POST", | ||
359 | + url: '<%=basePath%>paperanswer1/deleteAll.do?tm='+new Date().getTime(), | ||
360 | + data: {DATA_IDS:str}, | ||
361 | + dataType:'json', | ||
362 | + //beforeSend: validateData, | ||
363 | + cache: false, | ||
364 | + success: function(data){ | ||
365 | + $.each(data.list, function(i, list){ | ||
366 | + tosearch(); | ||
367 | + }); | ||
368 | + } | ||
369 | + }); | ||
370 | + } | ||
371 | + } | ||
372 | + } | ||
373 | + }); | ||
374 | + }; | ||
375 | + | ||
376 | + //导出excel | ||
377 | + function toExcel(){ | ||
378 | + window.location.href='<%=basePath%>paperanswer1/excel.do'; | ||
379 | + } | ||
380 | + </script> | ||
381 | + | ||
382 | + | ||
383 | +</body> | ||
384 | +</html> | ||
0 | \ No newline at end of file | 385 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/studentanswer1/studentanswer1_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="studentanswer1/${msg }.do" name="Form" id="Form" method="post"> | ||
31 | + <input type="hidden" name="STUDENTANSWER1_ID" id="STUDENTANSWER1_ID" value="${pd.STUDENTANSWER1_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="STUDENT_ID" id="STUDENT_ID" value="${pd.STUDENT_ID}" maxlength="35" 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="STUDENT_NAME" id="STUDENT_NAME" value="${pd.STUDENT_NAME}" maxlength="30" 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="STUDENT_NO" id="STUDENT_NO" value="${pd.STUDENT_NO}" maxlength="35" 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="CONTENT" id="CONTENT" value="${pd.CONTENT}" maxlength="1000" 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="GET_SCORE" id="GET_SCORE" value="${pd.GET_SCORE}" maxlength="32" 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="PAPER_ID" id="PAPER_ID" value="${pd.PAPER_ID}" maxlength="35" placeholder="这里输入试卷" title="试卷" style="width:98%;"/></td> | ||
57 | + </tr> | ||
58 | + <tr> | ||
59 | + <td style="width:75px;text-align: right;padding-top: 13px;">答卷ID:</td> | ||
60 | + <td><input type="text" name="ANSWER_ID" id="ANSWER_ID" value="${pd.ANSWER_ID}" maxlength="35" placeholder="这里输入答卷ID" title="答卷ID" style="width:98%;"/></td> | ||
61 | + </tr> | ||
62 | + <tr> | ||
63 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级ID:</td> | ||
64 | + <td><input type="text" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="35" placeholder="这里输入班级ID" title="班级ID" style="width:98%;"/></td> | ||
65 | + </tr> | ||
66 | + <tr> | ||
67 | + <td style="width:75px;text-align: right;padding-top: 13px;">年级ID:</td> | ||
68 | + <td><input type="text" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" maxlength="35" placeholder="这里输入年级ID" title="年级ID" style="width:98%;"/></td> | ||
69 | + </tr> | ||
70 | + <tr> | ||
71 | + <td style="width:75px;text-align: right;padding-top: 13px;">学校ID:</td> | ||
72 | + <td><input type="text" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="35" placeholder="这里输入学校ID" title="学校ID" 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($("#STUDENT_ID").val()==""){ | ||
110 | + $("#STUDENT_ID").tips({ | ||
111 | + side:3, | ||
112 | + msg:'请输入学生', | ||
113 | + bg:'#AE81FF', | ||
114 | + time:2 | ||
115 | + }); | ||
116 | + $("#STUDENT_ID").focus(); | ||
117 | + return false; | ||
118 | + } | ||
119 | + if($("#STUDENT_NAME").val()==""){ | ||
120 | + $("#STUDENT_NAME").tips({ | ||
121 | + side:3, | ||
122 | + msg:'请输入学生姓名', | ||
123 | + bg:'#AE81FF', | ||
124 | + time:2 | ||
125 | + }); | ||
126 | + $("#STUDENT_NAME").focus(); | ||
127 | + return false; | ||
128 | + } | ||
129 | + if($("#STUDENT_NO").val()==""){ | ||
130 | + $("#STUDENT_NO").tips({ | ||
131 | + side:3, | ||
132 | + msg:'请输入学生学号', | ||
133 | + bg:'#AE81FF', | ||
134 | + time:2 | ||
135 | + }); | ||
136 | + $("#STUDENT_NO").focus(); | ||
137 | + return false; | ||
138 | + } | ||
139 | + if($("#CONTENT").val()==""){ | ||
140 | + $("#CONTENT").tips({ | ||
141 | + side:3, | ||
142 | + msg:'请输入答案内容(正确与否)', | ||
143 | + bg:'#AE81FF', | ||
144 | + time:2 | ||
145 | + }); | ||
146 | + $("#CONTENT").focus(); | ||
147 | + return false; | ||
148 | + } | ||
149 | + if($("#GET_SCORE").val()==""){ | ||
150 | + $("#GET_SCORE").tips({ | ||
151 | + side:3, | ||
152 | + msg:'请输入学生得分', | ||
153 | + bg:'#AE81FF', | ||
154 | + time:2 | ||
155 | + }); | ||
156 | + $("#GET_SCORE").focus(); | ||
157 | + return false; | ||
158 | + } | ||
159 | + if($("#PAPER_ID").val()==""){ | ||
160 | + $("#PAPER_ID").tips({ | ||
161 | + side:3, | ||
162 | + msg:'请输入试卷', | ||
163 | + bg:'#AE81FF', | ||
164 | + time:2 | ||
165 | + }); | ||
166 | + $("#PAPER_ID").focus(); | ||
167 | + return false; | ||
168 | + } | ||
169 | + if($("#ANSWER_ID").val()==""){ | ||
170 | + $("#ANSWER_ID").tips({ | ||
171 | + side:3, | ||
172 | + msg:'请输入答卷ID', | ||
173 | + bg:'#AE81FF', | ||
174 | + time:2 | ||
175 | + }); | ||
176 | + $("#ANSWER_ID").focus(); | ||
177 | + return false; | ||
178 | + } | ||
179 | + if($("#CLASS_ID").val()==""){ | ||
180 | + $("#CLASS_ID").tips({ | ||
181 | + side:3, | ||
182 | + msg:'请输入班级ID', | ||
183 | + bg:'#AE81FF', | ||
184 | + time:2 | ||
185 | + }); | ||
186 | + $("#CLASS_ID").focus(); | ||
187 | + return false; | ||
188 | + } | ||
189 | + if($("#GRADE_ID").val()==""){ | ||
190 | + $("#GRADE_ID").tips({ | ||
191 | + side:3, | ||
192 | + msg:'请输入年级ID', | ||
193 | + bg:'#AE81FF', | ||
194 | + time:2 | ||
195 | + }); | ||
196 | + $("#GRADE_ID").focus(); | ||
197 | + return false; | ||
198 | + } | ||
199 | + if($("#SCHOOL_ID").val()==""){ | ||
200 | + $("#SCHOOL_ID").tips({ | ||
201 | + side:3, | ||
202 | + msg:'请输入学校ID', | ||
203 | + bg:'#AE81FF', | ||
204 | + time:2 | ||
205 | + }); | ||
206 | + $("#SCHOOL_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 | \ No newline at end of file | 221 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/studentanswer1/studentanswer1_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="studentanswer1/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">答卷ID</th> | ||
76 | + <th class="center">班级ID</th> | ||
77 | + <th class="center">年级ID</th> | ||
78 | + <th class="center">学校ID</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.STUDENTANSWER1_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.STUDENT_ID}</td> | ||
95 | + <td class='center'>${var.STUDENT_NAME}</td> | ||
96 | + <td class='center'>${var.STUDENT_NO}</td> | ||
97 | + <td class='center'>${var.CONTENT}</td> | ||
98 | + <td class='center'>${var.GET_SCORE}</td> | ||
99 | + <td class='center'>${var.PAPER_ID}</td> | ||
100 | + <td class='center'>${var.ANSWER_ID}</td> | ||
101 | + <td class='center'>${var.CLASS_ID}</td> | ||
102 | + <td class='center'>${var.GRADE_ID}</td> | ||
103 | + <td class='center'>${var.SCHOOL_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.STUDENTANSWER1_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.STUDENTANSWER1_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.STUDENTANSWER1_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.STUDENTANSWER1_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%>studentanswer1/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%>studentanswer1/delete.do?STUDENTANSWER1_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%>studentanswer1/goEdit.do?STUDENTANSWER1_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%>studentanswer1/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%>studentanswer1/excel.do'; | ||
377 | + } | ||
378 | + </script> | ||
379 | + | ||
380 | + | ||
381 | +</body> | ||
382 | +</html> | ||
0 | \ No newline at end of file | 383 | \ No newline at end of file |
resources/mybatis1/sunvote/InstantPaper1ContentMapper.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="InstantPaper1ContentMapper"> | ||
4 | + | ||
5 | + <!--表名 --> | ||
6 | + <sql id="tableName"> | ||
7 | + SV_INSTANTPAPER1CONTENT | ||
8 | + </sql> | ||
9 | + | ||
10 | + <!-- 字段 --> | ||
11 | + <sql id="Field"> | ||
12 | + PAPER_ID, | ||
13 | + QUESTION_ID, | ||
14 | + RANK, | ||
15 | + TITLE, | ||
16 | + SCORE, | ||
17 | + REMARK, | ||
18 | + INSTANTPAPER1CONTENT_ID | ||
19 | + </sql> | ||
20 | + | ||
21 | + <!-- 字段值 --> | ||
22 | + <sql id="FieldValue"> | ||
23 | + #{PAPER_ID}, | ||
24 | + #{QUESTION_ID}, | ||
25 | + #{RANK}, | ||
26 | + #{TITLE}, | ||
27 | + #{SCORE}, | ||
28 | + #{REMARK}, | ||
29 | + #{INSTANTPAPER1CONTENT_ID} | ||
30 | + </sql> | ||
31 | + | ||
32 | + <!-- 新增--> | ||
33 | + <insert id="save" parameterType="pd"> | ||
34 | + insert into | ||
35 | + <include refid="tableName"></include> | ||
36 | + ( | ||
37 | + <include refid="Field"></include> | ||
38 | + ) values ( | ||
39 | + <include refid="FieldValue"></include> | ||
40 | + ) | ||
41 | + </insert> | ||
42 | + | ||
43 | + <!-- 删除--> | ||
44 | + <delete id="delete" parameterType="pd"> | ||
45 | + delete from | ||
46 | + <include refid="tableName"></include> | ||
47 | + where | ||
48 | + INSTANTPAPER1CONTENT_ID = #{INSTANTPAPER1CONTENT_ID} | ||
49 | + </delete> | ||
50 | + | ||
51 | + <!-- 修改 --> | ||
52 | + <update id="edit" parameterType="pd"> | ||
53 | + update | ||
54 | + <include refid="tableName"></include> | ||
55 | + set | ||
56 | + PAPER_ID = #{PAPER_ID}, | ||
57 | + QUESTION_ID = #{QUESTION_ID}, | ||
58 | + RANK = #{RANK}, | ||
59 | + TITLE = #{TITLE}, | ||
60 | + SCORE = #{SCORE}, | ||
61 | + REMARK = #{REMARK}, | ||
62 | + INSTANTPAPER1CONTENT_ID = INSTANTPAPER1CONTENT_ID | ||
63 | + where | ||
64 | + INSTANTPAPER1CONTENT_ID = #{INSTANTPAPER1CONTENT_ID} | ||
65 | + </update> | ||
66 | + | ||
67 | + <!-- 通过ID获取数据 --> | ||
68 | + <select id="findById" parameterType="pd" resultType="pd"> | ||
69 | + select | ||
70 | + <include refid="Field"></include> | ||
71 | + from | ||
72 | + <include refid="tableName"></include> | ||
73 | + where | ||
74 | + INSTANTPAPER1CONTENT_ID = #{INSTANTPAPER1CONTENT_ID} | ||
75 | + </select> | ||
76 | + | ||
77 | + <!-- 列表 --> | ||
78 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
79 | + select | ||
80 | + <include refid="Field"></include> | ||
81 | + from | ||
82 | + <include refid="tableName"></include> | ||
83 | + where 1=1 | ||
84 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
85 | + and | ||
86 | + ( | ||
87 | + <!-- 根据需求自己加检索条件 | ||
88 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
89 | + or | ||
90 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
91 | + --> | ||
92 | + ) | ||
93 | + </if> | ||
94 | + </select> | ||
95 | + | ||
96 | + <!-- 列表(全部) --> | ||
97 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
98 | + select | ||
99 | + <include refid="Field"></include> | ||
100 | + from | ||
101 | + <include refid="tableName"></include> | ||
102 | + </select> | ||
103 | + | ||
104 | + <!-- 批量删除 --> | ||
105 | + <delete id="deleteAll" parameterType="String"> | ||
106 | + delete from | ||
107 | + <include refid="tableName"></include> | ||
108 | + where | ||
109 | + INSTANTPAPER1CONTENT_ID in | ||
110 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
111 | + #{item} | ||
112 | + </foreach> | ||
113 | + </delete> | ||
114 | + | ||
115 | + <!-- fh313596790qq(青苔) --> | ||
116 | +</mapper> | ||
0 | \ No newline at end of file | 117 | \ No newline at end of file |
resources/mybatis1/sunvote/InstantPaper1Mapper.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="InstantPaper1Mapper"> | ||
4 | + | ||
5 | + <!--表名 --> | ||
6 | + <sql id="tableName"> | ||
7 | + SV_INSTANTPAPER1 | ||
8 | + </sql> | ||
9 | + | ||
10 | + <!-- 字段 --> | ||
11 | + <sql id="Field"> | ||
12 | + PAPER_NAME, | ||
13 | + TAG, | ||
14 | + PERMISSION, | ||
15 | + SUBJECT_ID, | ||
16 | + GRADE_ID, | ||
17 | + CLASS_ID, | ||
18 | + SCHOOL_ID, | ||
19 | + COMBINATION, | ||
20 | + PAPER_SCORE, | ||
21 | + USER_ID, | ||
22 | + CREATE_TIME, | ||
23 | + COUNT, | ||
24 | + INSTANTPAPER1_ID | ||
25 | + </sql> | ||
26 | + | ||
27 | + <!-- 字段值 --> | ||
28 | + <sql id="FieldValue"> | ||
29 | + #{PAPER_NAME}, | ||
30 | + #{TAG}, | ||
31 | + #{PERMISSION}, | ||
32 | + #{SUBJECT_ID}, | ||
33 | + #{GRADE_ID}, | ||
34 | + #{CLASS_ID}, | ||
35 | + #{SCHOOL_ID}, | ||
36 | + #{COMBINATION}, | ||
37 | + #{PAPER_SCORE}, | ||
38 | + #{USER_ID}, | ||
39 | + #{CREATE_TIME}, | ||
40 | + #{COUNT}, | ||
41 | + #{INSTANTPAPER1_ID} | ||
42 | + </sql> | ||
43 | + | ||
44 | + <!-- 新增--> | ||
45 | + <insert id="save" parameterType="pd"> | ||
46 | + insert into | ||
47 | + <include refid="tableName"></include> | ||
48 | + ( | ||
49 | + <include refid="Field"></include> | ||
50 | + ) values ( | ||
51 | + <include refid="FieldValue"></include> | ||
52 | + ) | ||
53 | + </insert> | ||
54 | + | ||
55 | + <!-- 删除--> | ||
56 | + <delete id="delete" parameterType="pd"> | ||
57 | + delete from | ||
58 | + <include refid="tableName"></include> | ||
59 | + where | ||
60 | + INSTANTPAPER1_ID = #{INSTANTPAPER1_ID} | ||
61 | + </delete> | ||
62 | + | ||
63 | + <!-- 修改 --> | ||
64 | + <update id="edit" parameterType="pd"> | ||
65 | + update | ||
66 | + <include refid="tableName"></include> | ||
67 | + set | ||
68 | + PAPER_NAME = #{PAPER_NAME}, | ||
69 | + TAG = #{TAG}, | ||
70 | + PERMISSION = #{PERMISSION}, | ||
71 | + SUBJECT_ID = #{SUBJECT_ID}, | ||
72 | + GRADE_ID = #{GRADE_ID}, | ||
73 | + CLASS_ID = #{CLASS_ID}, | ||
74 | + SCHOOL_ID = #{SCHOOL_ID}, | ||
75 | + COMBINATION = #{COMBINATION}, | ||
76 | + PAPER_SCORE = #{PAPER_SCORE}, | ||
77 | + USER_ID = #{USER_ID}, | ||
78 | + COUNT = #{COUNT}, | ||
79 | + INSTANTPAPER1_ID = INSTANTPAPER1_ID | ||
80 | + where | ||
81 | + INSTANTPAPER1_ID = #{INSTANTPAPER1_ID} | ||
82 | + </update> | ||
83 | + | ||
84 | + <!-- 通过ID获取数据 --> | ||
85 | + <select id="findById" parameterType="pd" resultType="pd"> | ||
86 | + select | ||
87 | + <include refid="Field"></include> | ||
88 | + from | ||
89 | + <include refid="tableName"></include> | ||
90 | + where | ||
91 | + INSTANTPAPER1_ID = #{INSTANTPAPER1_ID} | ||
92 | + </select> | ||
93 | + | ||
94 | + <!-- 列表 --> | ||
95 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
96 | + select | ||
97 | + <include refid="Field"></include> | ||
98 | + from | ||
99 | + <include refid="tableName"></include> | ||
100 | + where 1=1 | ||
101 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
102 | + and | ||
103 | + ( | ||
104 | + <!-- 根据需求自己加检索条件 | ||
105 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
106 | + or | ||
107 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
108 | + --> | ||
109 | + ) | ||
110 | + </if> | ||
111 | + </select> | ||
112 | + | ||
113 | + <!-- 列表(全部) --> | ||
114 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
115 | + select | ||
116 | + <include refid="Field"></include> | ||
117 | + from | ||
118 | + <include refid="tableName"></include> | ||
119 | + </select> | ||
120 | + | ||
121 | + <!-- 批量删除 --> | ||
122 | + <delete id="deleteAll" parameterType="String"> | ||
123 | + delete from | ||
124 | + <include refid="tableName"></include> | ||
125 | + where | ||
126 | + INSTANTPAPER1_ID in | ||
127 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
128 | + #{item} | ||
129 | + </foreach> | ||
130 | + </delete> | ||
131 | + | ||
132 | + <!-- fh313596790qq(青苔) --> | ||
133 | +</mapper> | ||
0 | \ No newline at end of file | 134 | \ No newline at end of file |
resources/mybatis1/sunvote/InstantQuestionDataSource1Mapper.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="InstantQuestionDataSource1Mapper"> | ||
4 | + | ||
5 | + <!--表名 --> | ||
6 | + <sql id="tableName"> | ||
7 | + SV_INSTANTQUESTIONDATASOURCE1 | ||
8 | + </sql> | ||
9 | + | ||
10 | + <!-- 字段 --> | ||
11 | + <sql id="Field"> | ||
12 | + IMAGE_URL, | ||
13 | + SCORE, | ||
14 | + ANSWER_CONTENT, | ||
15 | + RIGHT_ANSWER, | ||
16 | + TAG, | ||
17 | + PERMISSION, | ||
18 | + SUBJECT_ID, | ||
19 | + GRADE_ID, | ||
20 | + SCHOOL_ID, | ||
21 | + USER_ID, | ||
22 | + 创建时间, | ||
23 | + CLASS_ID, | ||
24 | + INSTANTQUESTIONDATASOURCE1_ID | ||
25 | + </sql> | ||
26 | + | ||
27 | + <!-- 字段值 --> | ||
28 | + <sql id="FieldValue"> | ||
29 | + #{IMAGE_URL}, | ||
30 | + #{SCORE}, | ||
31 | + #{ANSWER_CONTENT}, | ||
32 | + #{RIGHT_ANSWER}, | ||
33 | + #{TAG}, | ||
34 | + #{PERMISSION}, | ||
35 | + #{SUBJECT_ID}, | ||
36 | + #{GRADE_ID}, | ||
37 | + #{SCHOOL_ID}, | ||
38 | + #{USER_ID}, | ||
39 | + #{创建时间}, | ||
40 | + #{CLASS_ID}, | ||
41 | + #{INSTANTQUESTIONDATASOURCE1_ID} | ||
42 | + </sql> | ||
43 | + | ||
44 | + <!-- 新增--> | ||
45 | + <insert id="save" parameterType="pd"> | ||
46 | + insert into | ||
47 | + <include refid="tableName"></include> | ||
48 | + ( | ||
49 | + <include refid="Field"></include> | ||
50 | + ) values ( | ||
51 | + <include refid="FieldValue"></include> | ||
52 | + ) | ||
53 | + </insert> | ||
54 | + | ||
55 | + <!-- 删除--> | ||
56 | + <delete id="delete" parameterType="pd"> | ||
57 | + delete from | ||
58 | + <include refid="tableName"></include> | ||
59 | + where | ||
60 | + INSTANTQUESTIONDATASOURCE1_ID = #{INSTANTQUESTIONDATASOURCE1_ID} | ||
61 | + </delete> | ||
62 | + | ||
63 | + <!-- 修改 --> | ||
64 | + <update id="edit" parameterType="pd"> | ||
65 | + update | ||
66 | + <include refid="tableName"></include> | ||
67 | + set | ||
68 | + IMAGE_URL = #{IMAGE_URL}, | ||
69 | + SCORE = #{SCORE}, | ||
70 | + ANSWER_CONTENT = #{ANSWER_CONTENT}, | ||
71 | + RIGHT_ANSWER = #{RIGHT_ANSWER}, | ||
72 | + TAG = #{TAG}, | ||
73 | + PERMISSION = #{PERMISSION}, | ||
74 | + SUBJECT_ID = #{SUBJECT_ID}, | ||
75 | + GRADE_ID = #{GRADE_ID}, | ||
76 | + SCHOOL_ID = #{SCHOOL_ID}, | ||
77 | + USER_ID = #{USER_ID}, | ||
78 | + 创建时间 = #{创建时间}, | ||
79 | + CLASS_ID = #{CLASS_ID}, | ||
80 | + INSTANTQUESTIONDATASOURCE1_ID = INSTANTQUESTIONDATASOURCE1_ID | ||
81 | + where | ||
82 | + INSTANTQUESTIONDATASOURCE1_ID = #{INSTANTQUESTIONDATASOURCE1_ID} | ||
83 | + </update> | ||
84 | + | ||
85 | + <!-- 通过ID获取数据 --> | ||
86 | + <select id="findById" parameterType="pd" resultType="pd"> | ||
87 | + select | ||
88 | + <include refid="Field"></include> | ||
89 | + from | ||
90 | + <include refid="tableName"></include> | ||
91 | + where | ||
92 | + INSTANTQUESTIONDATASOURCE1_ID = #{INSTANTQUESTIONDATASOURCE1_ID} | ||
93 | + </select> | ||
94 | + | ||
95 | + <!-- 列表 --> | ||
96 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
97 | + select | ||
98 | + <include refid="Field"></include> | ||
99 | + from | ||
100 | + <include refid="tableName"></include> | ||
101 | + where 1=1 | ||
102 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
103 | + and | ||
104 | + ( | ||
105 | + <!-- 根据需求自己加检索条件 | ||
106 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
107 | + or | ||
108 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
109 | + --> | ||
110 | + ) | ||
111 | + </if> | ||
112 | + </select> | ||
113 | + | ||
114 | + <!-- 列表(全部) --> | ||
115 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
116 | + select | ||
117 | + <include refid="Field"></include> | ||
118 | + from | ||
119 | + <include refid="tableName"></include> | ||
120 | + </select> | ||
121 | + | ||
122 | + <!-- 批量删除 --> | ||
123 | + <delete id="deleteAll" parameterType="String"> | ||
124 | + delete from | ||
125 | + <include refid="tableName"></include> | ||
126 | + where | ||
127 | + INSTANTQUESTIONDATASOURCE1_ID in | ||
128 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
129 | + #{item} | ||
130 | + </foreach> | ||
131 | + </delete> | ||
132 | + | ||
133 | + <!-- fh313596790qq(青苔) --> | ||
134 | +</mapper> | ||
0 | \ No newline at end of file | 135 | \ No newline at end of file |
resources/mybatis1/sunvote/PaperAnswer1Mapper.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="PaperAnswer1Mapper"> | ||
4 | + | ||
5 | + <!--表名 --> | ||
6 | + <sql id="tableName"> | ||
7 | + SV_PAPERANSWER1 | ||
8 | + </sql> | ||
9 | + | ||
10 | + <!-- 字段 --> | ||
11 | + <sql id="Field"> | ||
12 | + PAPER_ID, | ||
13 | + PAPER_NAME, | ||
14 | + SUBJECT_ID, | ||
15 | + CLASS_ID, | ||
16 | + GRADE_ID, | ||
17 | + SCHOOL_ID, | ||
18 | + USER_ID, | ||
19 | + CREATE_DATE, | ||
20 | + AVG_SCORE, | ||
21 | + HIGHT_SCORE, | ||
22 | + REMARK, | ||
23 | + PAPERANSWER1_ID | ||
24 | + </sql> | ||
25 | + | ||
26 | + <!-- 字段值 --> | ||
27 | + <sql id="FieldValue"> | ||
28 | + #{PAPER_ID}, | ||
29 | + #{PAPER_NAME}, | ||
30 | + #{SUBJECT_ID}, | ||
31 | + #{CLASS_ID}, | ||
32 | + #{GRADE_ID}, | ||
33 | + #{SCHOOL_ID}, | ||
34 | + #{USER_ID}, | ||
35 | + #{CREATE_DATE}, | ||
36 | + #{AVG_SCORE}, | ||
37 | + #{HIGHT_SCORE}, | ||
38 | + #{REMARK}, | ||
39 | + #{PAPERANSWER1_ID} | ||
40 | + </sql> | ||
41 | + | ||
42 | + <!-- 新增--> | ||
43 | + <insert id="save" parameterType="pd"> | ||
44 | + insert into | ||
45 | + <include refid="tableName"></include> | ||
46 | + ( | ||
47 | + <include refid="Field"></include> | ||
48 | + ) values ( | ||
49 | + <include refid="FieldValue"></include> | ||
50 | + ) | ||
51 | + </insert> | ||
52 | + | ||
53 | + <!-- 删除--> | ||
54 | + <delete id="delete" parameterType="pd"> | ||
55 | + delete from | ||
56 | + <include refid="tableName"></include> | ||
57 | + where | ||
58 | + PAPERANSWER1_ID = #{PAPERANSWER1_ID} | ||
59 | + </delete> | ||
60 | + | ||
61 | + <!-- 修改 --> | ||
62 | + <update id="edit" parameterType="pd"> | ||
63 | + update | ||
64 | + <include refid="tableName"></include> | ||
65 | + set | ||
66 | + PAPER_ID = #{PAPER_ID}, | ||
67 | + PAPER_NAME = #{PAPER_NAME}, | ||
68 | + SUBJECT_ID = #{SUBJECT_ID}, | ||
69 | + CLASS_ID = #{CLASS_ID}, | ||
70 | + GRADE_ID = #{GRADE_ID}, | ||
71 | + SCHOOL_ID = #{SCHOOL_ID}, | ||
72 | + USER_ID = #{USER_ID}, | ||
73 | + CREATE_DATE = #{CREATE_DATE}, | ||
74 | + AVG_SCORE = #{AVG_SCORE}, | ||
75 | + HIGHT_SCORE = #{HIGHT_SCORE}, | ||
76 | + REMARK = #{REMARK}, | ||
77 | + PAPERANSWER1_ID = PAPERANSWER1_ID | ||
78 | + where | ||
79 | + PAPERANSWER1_ID = #{PAPERANSWER1_ID} | ||
80 | + </update> | ||
81 | + | ||
82 | + <!-- 通过ID获取数据 --> | ||
83 | + <select id="findById" parameterType="pd" resultType="pd"> | ||
84 | + select | ||
85 | + <include refid="Field"></include> | ||
86 | + from | ||
87 | + <include refid="tableName"></include> | ||
88 | + where | ||
89 | + PAPERANSWER1_ID = #{PAPERANSWER1_ID} | ||
90 | + </select> | ||
91 | + | ||
92 | + <!-- 列表 --> | ||
93 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
94 | + select | ||
95 | + <include refid="Field"></include> | ||
96 | + from | ||
97 | + <include refid="tableName"></include> | ||
98 | + where 1=1 | ||
99 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
100 | + and | ||
101 | + ( | ||
102 | + <!-- 根据需求自己加检索条件 | ||
103 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
104 | + or | ||
105 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
106 | + --> | ||
107 | + ) | ||
108 | + </if> | ||
109 | + </select> | ||
110 | + | ||
111 | + <!-- 列表(全部) --> | ||
112 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
113 | + select | ||
114 | + <include refid="Field"></include> | ||
115 | + from | ||
116 | + <include refid="tableName"></include> | ||
117 | + </select> | ||
118 | + | ||
119 | + <!-- 批量删除 --> | ||
120 | + <delete id="deleteAll" parameterType="String"> | ||
121 | + delete from | ||
122 | + <include refid="tableName"></include> | ||
123 | + where | ||
124 | + PAPERANSWER1_ID in | ||
125 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
126 | + #{item} | ||
127 | + </foreach> | ||
128 | + </delete> | ||
129 | + | ||
130 | + <!-- fh313596790qq(青苔) --> | ||
131 | +</mapper> | ||
0 | \ No newline at end of file | 132 | \ No newline at end of file |
resources/mybatis1/sunvote/StudentAnswer1Mapper.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="StudentAnswer1Mapper"> | ||
4 | + | ||
5 | + <!--表名 --> | ||
6 | + <sql id="tableName"> | ||
7 | + SV_STUDENTANSWER1 | ||
8 | + </sql> | ||
9 | + | ||
10 | + <!-- 字段 --> | ||
11 | + <sql id="Field"> | ||
12 | + STUDENT_ID, | ||
13 | + STUDENT_NAME, | ||
14 | + STUDENT_NO, | ||
15 | + CONTENT, | ||
16 | + GET_SCORE, | ||
17 | + PAPER_ID, | ||
18 | + ANSWER_ID, | ||
19 | + CLASS_ID, | ||
20 | + GRADE_ID, | ||
21 | + SCHOOL_ID, | ||
22 | + STUDENTANSWER1_ID | ||
23 | + </sql> | ||
24 | + | ||
25 | + <!-- 字段值 --> | ||
26 | + <sql id="FieldValue"> | ||
27 | + #{STUDENT_ID}, | ||
28 | + #{STUDENT_NAME}, | ||
29 | + #{STUDENT_NO}, | ||
30 | + #{CONTENT}, | ||
31 | + #{GET_SCORE}, | ||
32 | + #{PAPER_ID}, | ||
33 | + #{ANSWER_ID}, | ||
34 | + #{CLASS_ID}, | ||
35 | + #{GRADE_ID}, | ||
36 | + #{SCHOOL_ID}, | ||
37 | + #{STUDENTANSWER1_ID} | ||
38 | + </sql> | ||
39 | + | ||
40 | + <!-- 新增--> | ||
41 | + <insert id="save" parameterType="pd"> | ||
42 | + insert into | ||
43 | + <include refid="tableName"></include> | ||
44 | + ( | ||
45 | + <include refid="Field"></include> | ||
46 | + ) values ( | ||
47 | + <include refid="FieldValue"></include> | ||
48 | + ) | ||
49 | + </insert> | ||
50 | + | ||
51 | + <!-- 删除--> | ||
52 | + <delete id="delete" parameterType="pd"> | ||
53 | + delete from | ||
54 | + <include refid="tableName"></include> | ||
55 | + where | ||
56 | + STUDENTANSWER1_ID = #{STUDENTANSWER1_ID} | ||
57 | + </delete> | ||
58 | + | ||
59 | + <!-- 修改 --> | ||
60 | + <update id="edit" parameterType="pd"> | ||
61 | + update | ||
62 | + <include refid="tableName"></include> | ||
63 | + set | ||
64 | + STUDENT_ID = #{STUDENT_ID}, | ||
65 | + STUDENT_NAME = #{STUDENT_NAME}, | ||
66 | + STUDENT_NO = #{STUDENT_NO}, | ||
67 | + CONTENT = #{CONTENT}, | ||
68 | + GET_SCORE = #{GET_SCORE}, | ||
69 | + PAPER_ID = #{PAPER_ID}, | ||
70 | + ANSWER_ID = #{ANSWER_ID}, | ||
71 | + CLASS_ID = #{CLASS_ID}, | ||
72 | + GRADE_ID = #{GRADE_ID}, | ||
73 | + SCHOOL_ID = #{SCHOOL_ID}, | ||
74 | + STUDENTANSWER1_ID = STUDENTANSWER1_ID | ||
75 | + where | ||
76 | + STUDENTANSWER1_ID = #{STUDENTANSWER1_ID} | ||
77 | + </update> | ||
78 | + | ||
79 | + <!-- 通过ID获取数据 --> | ||
80 | + <select id="findById" parameterType="pd" resultType="pd"> | ||
81 | + select | ||
82 | + <include refid="Field"></include> | ||
83 | + from | ||
84 | + <include refid="tableName"></include> | ||
85 | + where | ||
86 | + STUDENTANSWER1_ID = #{STUDENTANSWER1_ID} | ||
87 | + </select> | ||
88 | + | ||
89 | + <!-- 列表 --> | ||
90 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
91 | + select | ||
92 | + <include refid="Field"></include> | ||
93 | + from | ||
94 | + <include refid="tableName"></include> | ||
95 | + where 1=1 | ||
96 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
97 | + and | ||
98 | + ( | ||
99 | + <!-- 根据需求自己加检索条件 | ||
100 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
101 | + or | ||
102 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
103 | + --> | ||
104 | + ) | ||
105 | + </if> | ||
106 | + </select> | ||
107 | + | ||
108 | + <!-- 列表(全部) --> | ||
109 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
110 | + select | ||
111 | + <include refid="Field"></include> | ||
112 | + from | ||
113 | + <include refid="tableName"></include> | ||
114 | + </select> | ||
115 | + | ||
116 | + <!-- 批量删除 --> | ||
117 | + <delete id="deleteAll" parameterType="String"> | ||
118 | + delete from | ||
119 | + <include refid="tableName"></include> | ||
120 | + where | ||
121 | + STUDENTANSWER1_ID in | ||
122 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
123 | + #{item} | ||
124 | + </foreach> | ||
125 | + </delete> | ||
126 | + | ||
127 | + <!-- fh313596790qq(青苔) --> | ||
128 | +</mapper> | ||
0 | \ No newline at end of file | 129 | \ No newline at end of file |
src/com/fh/controller/base/BaseController.java
@@ -203,9 +203,9 @@ public class BaseController { | @@ -203,9 +203,9 @@ public class BaseController { | ||
203 | String lang = getCookieLanguage(); | 203 | String lang = getCookieLanguage(); |
204 | if (lang == null) { | 204 | if (lang == null) { |
205 | lang = getRequest().getLocale().getLanguage(); | 205 | lang = getRequest().getLocale().getLanguage(); |
206 | + Cookie cookies = new Cookie("lang", lang); | ||
207 | + getResponse().addCookie(cookies); | ||
206 | } | 208 | } |
207 | - Cookie cookies = new Cookie("lang", lang); | ||
208 | - getResponse().addCookie(cookies); | ||
209 | return lang; | 209 | return lang; |
210 | } | 210 | } |
211 | 211 |
src/com/fh/controller/sunvote/instantpaper1/InstantPaper1Controller.java
0 → 100644
1 | +package com.fh.controller.sunvote.instantpaper1; | ||
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.instantpaper1.InstantPaper1Manager; | ||
27 | + | ||
28 | +/** | ||
29 | + * 说明:即时测1试卷 | ||
30 | + * 创建人:FH Q313596790 | ||
31 | + * 创建时间:2019-05-29 | ||
32 | + */ | ||
33 | +@Controller | ||
34 | +@RequestMapping(value="/instantpaper1") | ||
35 | +public class InstantPaper1Controller extends BaseController { | ||
36 | + | ||
37 | + String menuUrl = "instantpaper1/list.do"; //菜单地址(权限用) | ||
38 | + @Resource(name="instantpaper1Service") | ||
39 | + private InstantPaper1Manager instantpaper1Service; | ||
40 | + | ||
41 | + /**保存 | ||
42 | + * @param | ||
43 | + * @throws Exception | ||
44 | + */ | ||
45 | + @RequestMapping(value="/save") | ||
46 | + public ModelAndView save() throws Exception{ | ||
47 | + logBefore(logger, Jurisdiction.getUsername()+"新增InstantPaper1"); | ||
48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
49 | + ModelAndView mv = this.getModelAndView(); | ||
50 | + PageData pd = new PageData(); | ||
51 | + pd = this.getPageData(); | ||
52 | + pd.put("INSTANTPAPER1_ID", this.get32UUID()); //主键 | ||
53 | + pd.put("CREATE_TIME", Tools.date2Str(new Date())); //创建时间 | ||
54 | + instantpaper1Service.save(pd); | ||
55 | + mv.addObject("msg","success"); | ||
56 | + mv.setViewName("save_result"); | ||
57 | + return mv; | ||
58 | + } | ||
59 | + | ||
60 | + /**删除 | ||
61 | + * @param out | ||
62 | + * @throws Exception | ||
63 | + */ | ||
64 | + @RequestMapping(value="/delete") | ||
65 | + public void delete(PrintWriter out) throws Exception{ | ||
66 | + logBefore(logger, Jurisdiction.getUsername()+"删除InstantPaper1"); | ||
67 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
68 | + PageData pd = new PageData(); | ||
69 | + pd = this.getPageData(); | ||
70 | + instantpaper1Service.delete(pd); | ||
71 | + out.write("success"); | ||
72 | + out.close(); | ||
73 | + } | ||
74 | + | ||
75 | + /**修改 | ||
76 | + * @param | ||
77 | + * @throws Exception | ||
78 | + */ | ||
79 | + @RequestMapping(value="/edit") | ||
80 | + public ModelAndView edit() throws Exception{ | ||
81 | + logBefore(logger, Jurisdiction.getUsername()+"修改InstantPaper1"); | ||
82 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
83 | + ModelAndView mv = this.getModelAndView(); | ||
84 | + PageData pd = new PageData(); | ||
85 | + pd = this.getPageData(); | ||
86 | + instantpaper1Service.edit(pd); | ||
87 | + mv.addObject("msg","success"); | ||
88 | + mv.setViewName("save_result"); | ||
89 | + return mv; | ||
90 | + } | ||
91 | + | ||
92 | + /**列表 | ||
93 | + * @param page | ||
94 | + * @throws Exception | ||
95 | + */ | ||
96 | + @RequestMapping(value="/list") | ||
97 | + public ModelAndView list(Page page) throws Exception{ | ||
98 | + logBefore(logger, Jurisdiction.getUsername()+"列表InstantPaper1"); | ||
99 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
100 | + ModelAndView mv = this.getModelAndView(); | ||
101 | + PageData pd = new PageData(); | ||
102 | + pd = this.getPageData(); | ||
103 | + String keywords = pd.getString("keywords"); //关键词检索条件 | ||
104 | + if(null != keywords && !"".equals(keywords)){ | ||
105 | + pd.put("keywords", keywords.trim()); | ||
106 | + } | ||
107 | + page.setPd(pd); | ||
108 | + List<PageData> varList = instantpaper1Service.list(page); //列出InstantPaper1列表 | ||
109 | + mv.setViewName("sunvote/instantpaper1/instantpaper1_list"); | ||
110 | + mv.addObject("varList", varList); | ||
111 | + mv.addObject("pd", pd); | ||
112 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | ||
113 | + return mv; | ||
114 | + } | ||
115 | + | ||
116 | + /**去新增页面 | ||
117 | + * @param | ||
118 | + * @throws Exception | ||
119 | + */ | ||
120 | + @RequestMapping(value="/goAdd") | ||
121 | + public ModelAndView goAdd()throws Exception{ | ||
122 | + ModelAndView mv = this.getModelAndView(); | ||
123 | + PageData pd = new PageData(); | ||
124 | + pd = this.getPageData(); | ||
125 | + mv.setViewName("sunvote/instantpaper1/instantpaper1_edit"); | ||
126 | + mv.addObject("msg", "save"); | ||
127 | + mv.addObject("pd", pd); | ||
128 | + return mv; | ||
129 | + } | ||
130 | + | ||
131 | + /**去修改页面 | ||
132 | + * @param | ||
133 | + * @throws Exception | ||
134 | + */ | ||
135 | + @RequestMapping(value="/goEdit") | ||
136 | + public ModelAndView goEdit()throws Exception{ | ||
137 | + ModelAndView mv = this.getModelAndView(); | ||
138 | + PageData pd = new PageData(); | ||
139 | + pd = this.getPageData(); | ||
140 | + pd = instantpaper1Service.findById(pd); //根据ID读取 | ||
141 | + mv.setViewName("sunvote/instantpaper1/instantpaper1_edit"); | ||
142 | + mv.addObject("msg", "edit"); | ||
143 | + mv.addObject("pd", pd); | ||
144 | + return mv; | ||
145 | + } | ||
146 | + | ||
147 | + /**批量删除 | ||
148 | + * @param | ||
149 | + * @throws Exception | ||
150 | + */ | ||
151 | + @RequestMapping(value="/deleteAll") | ||
152 | + @ResponseBody | ||
153 | + public Object deleteAll() throws Exception{ | ||
154 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantPaper1"); | ||
155 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
156 | + PageData pd = new PageData(); | ||
157 | + Map<String,Object> map = new HashMap<String,Object>(); | ||
158 | + pd = this.getPageData(); | ||
159 | + List<PageData> pdList = new ArrayList<PageData>(); | ||
160 | + String DATA_IDS = pd.getString("DATA_IDS"); | ||
161 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | ||
162 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | ||
163 | + instantpaper1Service.deleteAll(ArrayDATA_IDS); | ||
164 | + pd.put("msg", "ok"); | ||
165 | + }else{ | ||
166 | + pd.put("msg", "no"); | ||
167 | + } | ||
168 | + pdList.add(pd); | ||
169 | + map.put("list", pdList); | ||
170 | + return AppUtil.returnObject(pd, map); | ||
171 | + } | ||
172 | + | ||
173 | + /**导出到excel | ||
174 | + * @param | ||
175 | + * @throws Exception | ||
176 | + */ | ||
177 | + @RequestMapping(value="/excel") | ||
178 | + public ModelAndView exportExcel() throws Exception{ | ||
179 | + logBefore(logger, Jurisdiction.getUsername()+"导出InstantPaper1到excel"); | ||
180 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
181 | + ModelAndView mv = new ModelAndView(); | ||
182 | + PageData pd = new PageData(); | ||
183 | + pd = this.getPageData(); | ||
184 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
185 | + List<String> titles = new ArrayList<String>(); | ||
186 | + titles.add("试卷名称"); //1 | ||
187 | + titles.add("标签"); //2 | ||
188 | + titles.add("权限"); //3 | ||
189 | + titles.add("科目"); //4 | ||
190 | + titles.add("年级"); //5 | ||
191 | + titles.add("班级"); //6 | ||
192 | + titles.add("学校"); //7 | ||
193 | + titles.add("是否组合试卷"); //8 | ||
194 | + titles.add("试卷总分"); //9 | ||
195 | + titles.add("用户"); //10 | ||
196 | + titles.add("创建时间"); //11 | ||
197 | + titles.add("考试次数"); //12 | ||
198 | + dataMap.put("titles", titles); | ||
199 | + List<PageData> varOList = instantpaper1Service.listAll(pd); | ||
200 | + List<PageData> varList = new ArrayList<PageData>(); | ||
201 | + for(int i=0;i<varOList.size();i++){ | ||
202 | + PageData vpd = new PageData(); | ||
203 | + vpd.put("var1", varOList.get(i).getString("PAPER_NAME")); //1 | ||
204 | + vpd.put("var2", varOList.get(i).getString("TAG")); //2 | ||
205 | + vpd.put("var3", varOList.get(i).getString("PERMISSION")); //3 | ||
206 | + vpd.put("var4", varOList.get(i).getString("SUBJECT_ID")); //4 | ||
207 | + vpd.put("var5", varOList.get(i).getString("GRADE_ID")); //5 | ||
208 | + vpd.put("var6", varOList.get(i).getString("CLASS_ID")); //6 | ||
209 | + vpd.put("var7", varOList.get(i).getString("SCHOOL_ID")); //7 | ||
210 | + vpd.put("var8", varOList.get(i).get("COMBINATION").toString()); //8 | ||
211 | + vpd.put("var9", varOList.get(i).getString("PAPER_SCORE")); //9 | ||
212 | + vpd.put("var10", varOList.get(i).getString("USER_ID")); //10 | ||
213 | + vpd.put("var11", varOList.get(i).getString("CREATE_TIME")); //11 | ||
214 | + vpd.put("var12", varOList.get(i).getString("COUNT")); //12 | ||
215 | + varList.add(vpd); | ||
216 | + } | ||
217 | + dataMap.put("varList", varList); | ||
218 | + ObjectExcelView erv = new ObjectExcelView(); | ||
219 | + mv = new ModelAndView(erv,dataMap); | ||
220 | + return mv; | ||
221 | + } | ||
222 | + | ||
223 | + @InitBinder | ||
224 | + public void initBinder(WebDataBinder binder){ | ||
225 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
226 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
227 | + } | ||
228 | +} |
src/com/fh/controller/sunvote/instantpaper1content/InstantPaper1ContentController.java
0 → 100644
1 | +package com.fh.controller.sunvote.instantpaper1content; | ||
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.instantpaper1content.InstantPaper1ContentManager; | ||
27 | + | ||
28 | +/** | ||
29 | + * 说明:即时测试卷内容 | ||
30 | + * 创建人:FH Q313596790 | ||
31 | + * 创建时间:2019-06-11 | ||
32 | + */ | ||
33 | +@Controller | ||
34 | +@RequestMapping(value="/instantpaper1content") | ||
35 | +public class InstantPaper1ContentController extends BaseController { | ||
36 | + | ||
37 | + String menuUrl = "instantpaper1content/list.do"; //菜单地址(权限用) | ||
38 | + @Resource(name="instantpaper1contentService") | ||
39 | + private InstantPaper1ContentManager instantpaper1contentService; | ||
40 | + | ||
41 | + /**保存 | ||
42 | + * @param | ||
43 | + * @throws Exception | ||
44 | + */ | ||
45 | + @RequestMapping(value="/save") | ||
46 | + public ModelAndView save() throws Exception{ | ||
47 | + logBefore(logger, Jurisdiction.getUsername()+"新增InstantPaper1Content"); | ||
48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
49 | + ModelAndView mv = this.getModelAndView(); | ||
50 | + PageData pd = new PageData(); | ||
51 | + pd = this.getPageData(); | ||
52 | + pd.put("INSTANTPAPER1CONTENT_ID", this.get32UUID()); //主键 | ||
53 | + instantpaper1contentService.save(pd); | ||
54 | + mv.addObject("msg","success"); | ||
55 | + mv.setViewName("save_result"); | ||
56 | + return mv; | ||
57 | + } | ||
58 | + | ||
59 | + /**删除 | ||
60 | + * @param out | ||
61 | + * @throws Exception | ||
62 | + */ | ||
63 | + @RequestMapping(value="/delete") | ||
64 | + public void delete(PrintWriter out) throws Exception{ | ||
65 | + logBefore(logger, Jurisdiction.getUsername()+"删除InstantPaper1Content"); | ||
66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
67 | + PageData pd = new PageData(); | ||
68 | + pd = this.getPageData(); | ||
69 | + instantpaper1contentService.delete(pd); | ||
70 | + out.write("success"); | ||
71 | + out.close(); | ||
72 | + } | ||
73 | + | ||
74 | + /**修改 | ||
75 | + * @param | ||
76 | + * @throws Exception | ||
77 | + */ | ||
78 | + @RequestMapping(value="/edit") | ||
79 | + public ModelAndView edit() throws Exception{ | ||
80 | + logBefore(logger, Jurisdiction.getUsername()+"修改InstantPaper1Content"); | ||
81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
82 | + ModelAndView mv = this.getModelAndView(); | ||
83 | + PageData pd = new PageData(); | ||
84 | + pd = this.getPageData(); | ||
85 | + instantpaper1contentService.edit(pd); | ||
86 | + mv.addObject("msg","success"); | ||
87 | + mv.setViewName("save_result"); | ||
88 | + return mv; | ||
89 | + } | ||
90 | + | ||
91 | + /**列表 | ||
92 | + * @param page | ||
93 | + * @throws Exception | ||
94 | + */ | ||
95 | + @RequestMapping(value="/list") | ||
96 | + public ModelAndView list(Page page) throws Exception{ | ||
97 | + logBefore(logger, Jurisdiction.getUsername()+"列表InstantPaper1Content"); | ||
98 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
99 | + ModelAndView mv = this.getModelAndView(); | ||
100 | + PageData pd = new PageData(); | ||
101 | + pd = this.getPageData(); | ||
102 | + String keywords = pd.getString("keywords"); //关键词检索条件 | ||
103 | + if(null != keywords && !"".equals(keywords)){ | ||
104 | + pd.put("keywords", keywords.trim()); | ||
105 | + } | ||
106 | + page.setPd(pd); | ||
107 | + List<PageData> varList = instantpaper1contentService.list(page); //列出InstantPaper1Content列表 | ||
108 | + mv.setViewName("sunvote/instantpaper1content/instantpaper1content_list"); | ||
109 | + mv.addObject("varList", varList); | ||
110 | + mv.addObject("pd", pd); | ||
111 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | ||
112 | + return mv; | ||
113 | + } | ||
114 | + | ||
115 | + /**去新增页面 | ||
116 | + * @param | ||
117 | + * @throws Exception | ||
118 | + */ | ||
119 | + @RequestMapping(value="/goAdd") | ||
120 | + public ModelAndView goAdd()throws Exception{ | ||
121 | + ModelAndView mv = this.getModelAndView(); | ||
122 | + PageData pd = new PageData(); | ||
123 | + pd = this.getPageData(); | ||
124 | + mv.setViewName("sunvote/instantpaper1content/instantpaper1content_edit"); | ||
125 | + mv.addObject("msg", "save"); | ||
126 | + mv.addObject("pd", pd); | ||
127 | + return mv; | ||
128 | + } | ||
129 | + | ||
130 | + /**去修改页面 | ||
131 | + * @param | ||
132 | + * @throws Exception | ||
133 | + */ | ||
134 | + @RequestMapping(value="/goEdit") | ||
135 | + public ModelAndView goEdit()throws Exception{ | ||
136 | + ModelAndView mv = this.getModelAndView(); | ||
137 | + PageData pd = new PageData(); | ||
138 | + pd = this.getPageData(); | ||
139 | + pd = instantpaper1contentService.findById(pd); //根据ID读取 | ||
140 | + mv.setViewName("sunvote/instantpaper1content/instantpaper1content_edit"); | ||
141 | + mv.addObject("msg", "edit"); | ||
142 | + mv.addObject("pd", pd); | ||
143 | + return mv; | ||
144 | + } | ||
145 | + | ||
146 | + /**批量删除 | ||
147 | + * @param | ||
148 | + * @throws Exception | ||
149 | + */ | ||
150 | + @RequestMapping(value="/deleteAll") | ||
151 | + @ResponseBody | ||
152 | + public Object deleteAll() throws Exception{ | ||
153 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantPaper1Content"); | ||
154 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
155 | + PageData pd = new PageData(); | ||
156 | + Map<String,Object> map = new HashMap<String,Object>(); | ||
157 | + pd = this.getPageData(); | ||
158 | + List<PageData> pdList = new ArrayList<PageData>(); | ||
159 | + String DATA_IDS = pd.getString("DATA_IDS"); | ||
160 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | ||
161 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | ||
162 | + instantpaper1contentService.deleteAll(ArrayDATA_IDS); | ||
163 | + pd.put("msg", "ok"); | ||
164 | + }else{ | ||
165 | + pd.put("msg", "no"); | ||
166 | + } | ||
167 | + pdList.add(pd); | ||
168 | + map.put("list", pdList); | ||
169 | + return AppUtil.returnObject(pd, map); | ||
170 | + } | ||
171 | + | ||
172 | + /**导出到excel | ||
173 | + * @param | ||
174 | + * @throws Exception | ||
175 | + */ | ||
176 | + @RequestMapping(value="/excel") | ||
177 | + public ModelAndView exportExcel() throws Exception{ | ||
178 | + logBefore(logger, Jurisdiction.getUsername()+"导出InstantPaper1Content到excel"); | ||
179 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
180 | + ModelAndView mv = new ModelAndView(); | ||
181 | + PageData pd = new PageData(); | ||
182 | + pd = this.getPageData(); | ||
183 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
184 | + List<String> titles = new ArrayList<String>(); | ||
185 | + titles.add("试卷"); //1 | ||
186 | + titles.add("试题"); //2 | ||
187 | + titles.add("排序"); //3 | ||
188 | + titles.add("题号"); //4 | ||
189 | + titles.add("分数"); //5 | ||
190 | + titles.add("说明"); //6 | ||
191 | + dataMap.put("titles", titles); | ||
192 | + List<PageData> varOList = instantpaper1contentService.listAll(pd); | ||
193 | + List<PageData> varList = new ArrayList<PageData>(); | ||
194 | + for(int i=0;i<varOList.size();i++){ | ||
195 | + PageData vpd = new PageData(); | ||
196 | + vpd.put("var1", varOList.get(i).getString("PAPER_ID")); //1 | ||
197 | + vpd.put("var2", varOList.get(i).getString("QUESTION_ID")); //2 | ||
198 | + vpd.put("var3", varOList.get(i).getString("RANK")); //3 | ||
199 | + vpd.put("var4", varOList.get(i).getString("TITLE")); //4 | ||
200 | + vpd.put("var5", varOList.get(i).getString("SCORE")); //5 | ||
201 | + vpd.put("var6", varOList.get(i).getString("REMARK")); //6 | ||
202 | + varList.add(vpd); | ||
203 | + } | ||
204 | + dataMap.put("varList", varList); | ||
205 | + ObjectExcelView erv = new ObjectExcelView(); | ||
206 | + mv = new ModelAndView(erv,dataMap); | ||
207 | + return mv; | ||
208 | + } | ||
209 | + | ||
210 | + @InitBinder | ||
211 | + public void initBinder(WebDataBinder binder){ | ||
212 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
213 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
214 | + } | ||
215 | +} |
src/com/fh/controller/sunvote/instantquestiondatasource1/InstantQuestionDataSource1Controller.java
0 → 100644
1 | +package com.fh.controller.sunvote.instantquestiondatasource1; | ||
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.instantquestiondatasource1.InstantQuestionDataSource1Manager; | ||
27 | + | ||
28 | +/** | ||
29 | + * 说明:即时测题库1 | ||
30 | + * 创建人:FH Q313596790 | ||
31 | + * 创建时间:2019-05-29 | ||
32 | + */ | ||
33 | +@Controller | ||
34 | +@RequestMapping(value="/instantquestiondatasource1") | ||
35 | +public class InstantQuestionDataSource1Controller extends BaseController { | ||
36 | + | ||
37 | + String menuUrl = "instantquestiondatasource1/list.do"; //菜单地址(权限用) | ||
38 | + @Resource(name="instantquestiondatasource1Service") | ||
39 | + private InstantQuestionDataSource1Manager instantquestiondatasource1Service; | ||
40 | + | ||
41 | + /**保存 | ||
42 | + * @param | ||
43 | + * @throws Exception | ||
44 | + */ | ||
45 | + @RequestMapping(value="/save") | ||
46 | + public ModelAndView save() throws Exception{ | ||
47 | + logBefore(logger, Jurisdiction.getUsername()+"新增InstantQuestionDataSource1"); | ||
48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
49 | + ModelAndView mv = this.getModelAndView(); | ||
50 | + PageData pd = new PageData(); | ||
51 | + pd = this.getPageData(); | ||
52 | + pd.put("INSTANTQUESTIONDATASOURCE1_ID", this.get32UUID()); //主键 | ||
53 | + instantquestiondatasource1Service.save(pd); | ||
54 | + mv.addObject("msg","success"); | ||
55 | + mv.setViewName("save_result"); | ||
56 | + return mv; | ||
57 | + } | ||
58 | + | ||
59 | + /**删除 | ||
60 | + * @param out | ||
61 | + * @throws Exception | ||
62 | + */ | ||
63 | + @RequestMapping(value="/delete") | ||
64 | + public void delete(PrintWriter out) throws Exception{ | ||
65 | + logBefore(logger, Jurisdiction.getUsername()+"删除InstantQuestionDataSource1"); | ||
66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
67 | + PageData pd = new PageData(); | ||
68 | + pd = this.getPageData(); | ||
69 | + instantquestiondatasource1Service.delete(pd); | ||
70 | + out.write("success"); | ||
71 | + out.close(); | ||
72 | + } | ||
73 | + | ||
74 | + /**修改 | ||
75 | + * @param | ||
76 | + * @throws Exception | ||
77 | + */ | ||
78 | + @RequestMapping(value="/edit") | ||
79 | + public ModelAndView edit() throws Exception{ | ||
80 | + logBefore(logger, Jurisdiction.getUsername()+"修改InstantQuestionDataSource1"); | ||
81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
82 | + ModelAndView mv = this.getModelAndView(); | ||
83 | + PageData pd = new PageData(); | ||
84 | + pd = this.getPageData(); | ||
85 | + instantquestiondatasource1Service.edit(pd); | ||
86 | + mv.addObject("msg","success"); | ||
87 | + mv.setViewName("save_result"); | ||
88 | + return mv; | ||
89 | + } | ||
90 | + | ||
91 | + /**列表 | ||
92 | + * @param page | ||
93 | + * @throws Exception | ||
94 | + */ | ||
95 | + @RequestMapping(value="/list") | ||
96 | + public ModelAndView list(Page page) throws Exception{ | ||
97 | + logBefore(logger, Jurisdiction.getUsername()+"列表InstantQuestionDataSource1"); | ||
98 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
99 | + ModelAndView mv = this.getModelAndView(); | ||
100 | + PageData pd = new PageData(); | ||
101 | + pd = this.getPageData(); | ||
102 | + String keywords = pd.getString("keywords"); //关键词检索条件 | ||
103 | + if(null != keywords && !"".equals(keywords)){ | ||
104 | + pd.put("keywords", keywords.trim()); | ||
105 | + } | ||
106 | + page.setPd(pd); | ||
107 | + List<PageData> varList = instantquestiondatasource1Service.list(page); //列出InstantQuestionDataSource1列表 | ||
108 | + mv.setViewName("sunvote/instantquestiondatasource1/instantquestiondatasource1_list"); | ||
109 | + mv.addObject("varList", varList); | ||
110 | + mv.addObject("pd", pd); | ||
111 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | ||
112 | + return mv; | ||
113 | + } | ||
114 | + | ||
115 | + /**去新增页面 | ||
116 | + * @param | ||
117 | + * @throws Exception | ||
118 | + */ | ||
119 | + @RequestMapping(value="/goAdd") | ||
120 | + public ModelAndView goAdd()throws Exception{ | ||
121 | + ModelAndView mv = this.getModelAndView(); | ||
122 | + PageData pd = new PageData(); | ||
123 | + pd = this.getPageData(); | ||
124 | + mv.setViewName("sunvote/instantquestiondatasource1/instantquestiondatasource1_edit"); | ||
125 | + mv.addObject("msg", "save"); | ||
126 | + mv.addObject("pd", pd); | ||
127 | + return mv; | ||
128 | + } | ||
129 | + | ||
130 | + /**去修改页面 | ||
131 | + * @param | ||
132 | + * @throws Exception | ||
133 | + */ | ||
134 | + @RequestMapping(value="/goEdit") | ||
135 | + public ModelAndView goEdit()throws Exception{ | ||
136 | + ModelAndView mv = this.getModelAndView(); | ||
137 | + PageData pd = new PageData(); | ||
138 | + pd = this.getPageData(); | ||
139 | + pd = instantquestiondatasource1Service.findById(pd); //根据ID读取 | ||
140 | + mv.setViewName("sunvote/instantquestiondatasource1/instantquestiondatasource1_edit"); | ||
141 | + mv.addObject("msg", "edit"); | ||
142 | + mv.addObject("pd", pd); | ||
143 | + return mv; | ||
144 | + } | ||
145 | + | ||
146 | + /**批量删除 | ||
147 | + * @param | ||
148 | + * @throws Exception | ||
149 | + */ | ||
150 | + @RequestMapping(value="/deleteAll") | ||
151 | + @ResponseBody | ||
152 | + public Object deleteAll() throws Exception{ | ||
153 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantQuestionDataSource1"); | ||
154 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
155 | + PageData pd = new PageData(); | ||
156 | + Map<String,Object> map = new HashMap<String,Object>(); | ||
157 | + pd = this.getPageData(); | ||
158 | + List<PageData> pdList = new ArrayList<PageData>(); | ||
159 | + String DATA_IDS = pd.getString("DATA_IDS"); | ||
160 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | ||
161 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | ||
162 | + instantquestiondatasource1Service.deleteAll(ArrayDATA_IDS); | ||
163 | + pd.put("msg", "ok"); | ||
164 | + }else{ | ||
165 | + pd.put("msg", "no"); | ||
166 | + } | ||
167 | + pdList.add(pd); | ||
168 | + map.put("list", pdList); | ||
169 | + return AppUtil.returnObject(pd, map); | ||
170 | + } | ||
171 | + | ||
172 | + /**导出到excel | ||
173 | + * @param | ||
174 | + * @throws Exception | ||
175 | + */ | ||
176 | + @RequestMapping(value="/excel") | ||
177 | + public ModelAndView exportExcel() throws Exception{ | ||
178 | + logBefore(logger, Jurisdiction.getUsername()+"导出InstantQuestionDataSource1到excel"); | ||
179 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
180 | + ModelAndView mv = new ModelAndView(); | ||
181 | + PageData pd = new PageData(); | ||
182 | + pd = this.getPageData(); | ||
183 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
184 | + List<String> titles = new ArrayList<String>(); | ||
185 | + titles.add("图片路径"); //1 | ||
186 | + titles.add("分数"); //2 | ||
187 | + titles.add("答案内容"); //3 | ||
188 | + titles.add("标准答案"); //4 | ||
189 | + titles.add("标签"); //5 | ||
190 | + titles.add("权限"); //6 | ||
191 | + titles.add("科目"); //7 | ||
192 | + titles.add("年级"); //8 | ||
193 | + titles.add("学校"); //9 | ||
194 | + titles.add("用户ID"); //10 | ||
195 | + titles.add("create_time"); //11 | ||
196 | + titles.add("班级"); //12 | ||
197 | + dataMap.put("titles", titles); | ||
198 | + List<PageData> varOList = instantquestiondatasource1Service.listAll(pd); | ||
199 | + List<PageData> varList = new ArrayList<PageData>(); | ||
200 | + for(int i=0;i<varOList.size();i++){ | ||
201 | + PageData vpd = new PageData(); | ||
202 | + vpd.put("var1", varOList.get(i).getString("IMAGE_URL")); //1 | ||
203 | + vpd.put("var2", varOList.get(i).get("SCORE").toString()); //2 | ||
204 | + vpd.put("var3", varOList.get(i).getString("ANSWER_CONTENT")); //3 | ||
205 | + vpd.put("var4", varOList.get(i).getString("RIGHT_ANSWER")); //4 | ||
206 | + vpd.put("var5", varOList.get(i).getString("TAG")); //5 | ||
207 | + vpd.put("var6", varOList.get(i).getString("PERMISSION")); //6 | ||
208 | + vpd.put("var7", varOList.get(i).getString("SUBJECT_ID")); //7 | ||
209 | + vpd.put("var8", varOList.get(i).getString("GRADE_ID")); //8 | ||
210 | + vpd.put("var9", varOList.get(i).getString("SCHOOL_ID")); //9 | ||
211 | + vpd.put("var10", varOList.get(i).getString("USER_ID")); //10 | ||
212 | + vpd.put("var11", varOList.get(i).getString("创建时间")); //11 | ||
213 | + vpd.put("var12", varOList.get(i).getString("CLASS_ID")); //12 | ||
214 | + varList.add(vpd); | ||
215 | + } | ||
216 | + dataMap.put("varList", varList); | ||
217 | + ObjectExcelView erv = new ObjectExcelView(); | ||
218 | + mv = new ModelAndView(erv,dataMap); | ||
219 | + return mv; | ||
220 | + } | ||
221 | + | ||
222 | + @InitBinder | ||
223 | + public void initBinder(WebDataBinder binder){ | ||
224 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
225 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
226 | + } | ||
227 | +} |
src/com/fh/controller/sunvote/paperanswer1/PaperAnswer1Controller.java
0 → 100644
1 | +package com.fh.controller.sunvote.paperanswer1; | ||
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.paperanswer1.PaperAnswer1Manager; | ||
27 | + | ||
28 | +/** | ||
29 | + * 说明:即时测试卷答题 | ||
30 | + * 创建人:FH Q313596790 | ||
31 | + * 创建时间:2019-06-11 | ||
32 | + */ | ||
33 | +@Controller | ||
34 | +@RequestMapping(value="/paperanswer1") | ||
35 | +public class PaperAnswer1Controller extends BaseController { | ||
36 | + | ||
37 | + String menuUrl = "paperanswer1/list.do"; //菜单地址(权限用) | ||
38 | + @Resource(name="paperanswer1Service") | ||
39 | + private PaperAnswer1Manager paperanswer1Service; | ||
40 | + | ||
41 | + /**保存 | ||
42 | + * @param | ||
43 | + * @throws Exception | ||
44 | + */ | ||
45 | + @RequestMapping(value="/save") | ||
46 | + public ModelAndView save() throws Exception{ | ||
47 | + logBefore(logger, Jurisdiction.getUsername()+"新增PaperAnswer1"); | ||
48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
49 | + ModelAndView mv = this.getModelAndView(); | ||
50 | + PageData pd = new PageData(); | ||
51 | + pd = this.getPageData(); | ||
52 | + pd.put("PAPERANSWER1_ID", this.get32UUID()); //主键 | ||
53 | + paperanswer1Service.save(pd); | ||
54 | + mv.addObject("msg","success"); | ||
55 | + mv.setViewName("save_result"); | ||
56 | + return mv; | ||
57 | + } | ||
58 | + | ||
59 | + /**删除 | ||
60 | + * @param out | ||
61 | + * @throws Exception | ||
62 | + */ | ||
63 | + @RequestMapping(value="/delete") | ||
64 | + public void delete(PrintWriter out) throws Exception{ | ||
65 | + logBefore(logger, Jurisdiction.getUsername()+"删除PaperAnswer1"); | ||
66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
67 | + PageData pd = new PageData(); | ||
68 | + pd = this.getPageData(); | ||
69 | + paperanswer1Service.delete(pd); | ||
70 | + out.write("success"); | ||
71 | + out.close(); | ||
72 | + } | ||
73 | + | ||
74 | + /**修改 | ||
75 | + * @param | ||
76 | + * @throws Exception | ||
77 | + */ | ||
78 | + @RequestMapping(value="/edit") | ||
79 | + public ModelAndView edit() throws Exception{ | ||
80 | + logBefore(logger, Jurisdiction.getUsername()+"修改PaperAnswer1"); | ||
81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
82 | + ModelAndView mv = this.getModelAndView(); | ||
83 | + PageData pd = new PageData(); | ||
84 | + pd = this.getPageData(); | ||
85 | + paperanswer1Service.edit(pd); | ||
86 | + mv.addObject("msg","success"); | ||
87 | + mv.setViewName("save_result"); | ||
88 | + return mv; | ||
89 | + } | ||
90 | + | ||
91 | + /**列表 | ||
92 | + * @param page | ||
93 | + * @throws Exception | ||
94 | + */ | ||
95 | + @RequestMapping(value="/list") | ||
96 | + public ModelAndView list(Page page) throws Exception{ | ||
97 | + logBefore(logger, Jurisdiction.getUsername()+"列表PaperAnswer1"); | ||
98 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
99 | + ModelAndView mv = this.getModelAndView(); | ||
100 | + PageData pd = new PageData(); | ||
101 | + pd = this.getPageData(); | ||
102 | + String keywords = pd.getString("keywords"); //关键词检索条件 | ||
103 | + if(null != keywords && !"".equals(keywords)){ | ||
104 | + pd.put("keywords", keywords.trim()); | ||
105 | + } | ||
106 | + page.setPd(pd); | ||
107 | + List<PageData> varList = paperanswer1Service.list(page); //列出PaperAnswer1列表 | ||
108 | + mv.setViewName("sunvote/paperanswer1/paperanswer1_list"); | ||
109 | + mv.addObject("varList", varList); | ||
110 | + mv.addObject("pd", pd); | ||
111 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | ||
112 | + return mv; | ||
113 | + } | ||
114 | + | ||
115 | + /**去新增页面 | ||
116 | + * @param | ||
117 | + * @throws Exception | ||
118 | + */ | ||
119 | + @RequestMapping(value="/goAdd") | ||
120 | + public ModelAndView goAdd()throws Exception{ | ||
121 | + ModelAndView mv = this.getModelAndView(); | ||
122 | + PageData pd = new PageData(); | ||
123 | + pd = this.getPageData(); | ||
124 | + mv.setViewName("sunvote/paperanswer1/paperanswer1_edit"); | ||
125 | + mv.addObject("msg", "save"); | ||
126 | + mv.addObject("pd", pd); | ||
127 | + return mv; | ||
128 | + } | ||
129 | + | ||
130 | + /**去修改页面 | ||
131 | + * @param | ||
132 | + * @throws Exception | ||
133 | + */ | ||
134 | + @RequestMapping(value="/goEdit") | ||
135 | + public ModelAndView goEdit()throws Exception{ | ||
136 | + ModelAndView mv = this.getModelAndView(); | ||
137 | + PageData pd = new PageData(); | ||
138 | + pd = this.getPageData(); | ||
139 | + pd = paperanswer1Service.findById(pd); //根据ID读取 | ||
140 | + mv.setViewName("sunvote/paperanswer1/paperanswer1_edit"); | ||
141 | + mv.addObject("msg", "edit"); | ||
142 | + mv.addObject("pd", pd); | ||
143 | + return mv; | ||
144 | + } | ||
145 | + | ||
146 | + /**批量删除 | ||
147 | + * @param | ||
148 | + * @throws Exception | ||
149 | + */ | ||
150 | + @RequestMapping(value="/deleteAll") | ||
151 | + @ResponseBody | ||
152 | + public Object deleteAll() throws Exception{ | ||
153 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除PaperAnswer1"); | ||
154 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
155 | + PageData pd = new PageData(); | ||
156 | + Map<String,Object> map = new HashMap<String,Object>(); | ||
157 | + pd = this.getPageData(); | ||
158 | + List<PageData> pdList = new ArrayList<PageData>(); | ||
159 | + String DATA_IDS = pd.getString("DATA_IDS"); | ||
160 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | ||
161 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | ||
162 | + paperanswer1Service.deleteAll(ArrayDATA_IDS); | ||
163 | + pd.put("msg", "ok"); | ||
164 | + }else{ | ||
165 | + pd.put("msg", "no"); | ||
166 | + } | ||
167 | + pdList.add(pd); | ||
168 | + map.put("list", pdList); | ||
169 | + return AppUtil.returnObject(pd, map); | ||
170 | + } | ||
171 | + | ||
172 | + /**导出到excel | ||
173 | + * @param | ||
174 | + * @throws Exception | ||
175 | + */ | ||
176 | + @RequestMapping(value="/excel") | ||
177 | + public ModelAndView exportExcel() throws Exception{ | ||
178 | + logBefore(logger, Jurisdiction.getUsername()+"导出PaperAnswer1到excel"); | ||
179 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
180 | + ModelAndView mv = new ModelAndView(); | ||
181 | + PageData pd = new PageData(); | ||
182 | + pd = this.getPageData(); | ||
183 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
184 | + List<String> titles = new ArrayList<String>(); | ||
185 | + titles.add("试卷"); //1 | ||
186 | + titles.add("试卷名称"); //2 | ||
187 | + titles.add("科目"); //3 | ||
188 | + titles.add("班级ID"); //4 | ||
189 | + titles.add("年级"); //5 | ||
190 | + titles.add("学校"); //6 | ||
191 | + titles.add("创建者"); //7 | ||
192 | + titles.add("考试时间"); //8 | ||
193 | + titles.add("平均分"); //9 | ||
194 | + titles.add("最高分"); //10 | ||
195 | + titles.add("备注"); //11 | ||
196 | + dataMap.put("titles", titles); | ||
197 | + List<PageData> varOList = paperanswer1Service.listAll(pd); | ||
198 | + List<PageData> varList = new ArrayList<PageData>(); | ||
199 | + for(int i=0;i<varOList.size();i++){ | ||
200 | + PageData vpd = new PageData(); | ||
201 | + vpd.put("var1", varOList.get(i).getString("PAPER_ID")); //1 | ||
202 | + vpd.put("var2", varOList.get(i).getString("PAPER_NAME")); //2 | ||
203 | + vpd.put("var3", varOList.get(i).getString("SUBJECT_ID")); //3 | ||
204 | + vpd.put("var4", varOList.get(i).getString("CLASS_ID")); //4 | ||
205 | + vpd.put("var5", varOList.get(i).getString("GRADE_ID")); //5 | ||
206 | + vpd.put("var6", varOList.get(i).getString("SCHOOL_ID")); //6 | ||
207 | + vpd.put("var7", varOList.get(i).getString("USER_ID")); //7 | ||
208 | + vpd.put("var8", varOList.get(i).getString("CREATE_DATE")); //8 | ||
209 | + vpd.put("var9", varOList.get(i).getString("AVG_SCORE")); //9 | ||
210 | + vpd.put("var10", varOList.get(i).getString("HIGHT_SCORE")); //10 | ||
211 | + vpd.put("var11", varOList.get(i).getString("REMARK")); //11 | ||
212 | + varList.add(vpd); | ||
213 | + } | ||
214 | + dataMap.put("varList", varList); | ||
215 | + ObjectExcelView erv = new ObjectExcelView(); | ||
216 | + mv = new ModelAndView(erv,dataMap); | ||
217 | + return mv; | ||
218 | + } | ||
219 | + | ||
220 | + @InitBinder | ||
221 | + public void initBinder(WebDataBinder binder){ | ||
222 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
223 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
224 | + } | ||
225 | +} |
src/com/fh/controller/sunvote/studentanswer1/StudentAnswer1Controller.java
0 → 100644
1 | +package com.fh.controller.sunvote.studentanswer1; | ||
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.studentanswer1.StudentAnswer1Manager; | ||
27 | + | ||
28 | +/** | ||
29 | + * 说明:学生答题表 | ||
30 | + * 创建人:FH Q313596790 | ||
31 | + * 创建时间:2019-06-11 | ||
32 | + */ | ||
33 | +@Controller | ||
34 | +@RequestMapping(value="/studentanswer1") | ||
35 | +public class StudentAnswer1Controller extends BaseController { | ||
36 | + | ||
37 | + String menuUrl = "studentanswer1/list.do"; //菜单地址(权限用) | ||
38 | + @Resource(name="studentanswer1Service") | ||
39 | + private StudentAnswer1Manager studentanswer1Service; | ||
40 | + | ||
41 | + /**保存 | ||
42 | + * @param | ||
43 | + * @throws Exception | ||
44 | + */ | ||
45 | + @RequestMapping(value="/save") | ||
46 | + public ModelAndView save() throws Exception{ | ||
47 | + logBefore(logger, Jurisdiction.getUsername()+"新增StudentAnswer1"); | ||
48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
49 | + ModelAndView mv = this.getModelAndView(); | ||
50 | + PageData pd = new PageData(); | ||
51 | + pd = this.getPageData(); | ||
52 | + pd.put("STUDENTANSWER1_ID", this.get32UUID()); //主键 | ||
53 | + studentanswer1Service.save(pd); | ||
54 | + mv.addObject("msg","success"); | ||
55 | + mv.setViewName("save_result"); | ||
56 | + return mv; | ||
57 | + } | ||
58 | + | ||
59 | + /**删除 | ||
60 | + * @param out | ||
61 | + * @throws Exception | ||
62 | + */ | ||
63 | + @RequestMapping(value="/delete") | ||
64 | + public void delete(PrintWriter out) throws Exception{ | ||
65 | + logBefore(logger, Jurisdiction.getUsername()+"删除StudentAnswer1"); | ||
66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
67 | + PageData pd = new PageData(); | ||
68 | + pd = this.getPageData(); | ||
69 | + studentanswer1Service.delete(pd); | ||
70 | + out.write("success"); | ||
71 | + out.close(); | ||
72 | + } | ||
73 | + | ||
74 | + /**修改 | ||
75 | + * @param | ||
76 | + * @throws Exception | ||
77 | + */ | ||
78 | + @RequestMapping(value="/edit") | ||
79 | + public ModelAndView edit() throws Exception{ | ||
80 | + logBefore(logger, Jurisdiction.getUsername()+"修改StudentAnswer1"); | ||
81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
82 | + ModelAndView mv = this.getModelAndView(); | ||
83 | + PageData pd = new PageData(); | ||
84 | + pd = this.getPageData(); | ||
85 | + studentanswer1Service.edit(pd); | ||
86 | + mv.addObject("msg","success"); | ||
87 | + mv.setViewName("save_result"); | ||
88 | + return mv; | ||
89 | + } | ||
90 | + | ||
91 | + /**列表 | ||
92 | + * @param page | ||
93 | + * @throws Exception | ||
94 | + */ | ||
95 | + @RequestMapping(value="/list") | ||
96 | + public ModelAndView list(Page page) throws Exception{ | ||
97 | + logBefore(logger, Jurisdiction.getUsername()+"列表StudentAnswer1"); | ||
98 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
99 | + ModelAndView mv = this.getModelAndView(); | ||
100 | + PageData pd = new PageData(); | ||
101 | + pd = this.getPageData(); | ||
102 | + String keywords = pd.getString("keywords"); //关键词检索条件 | ||
103 | + if(null != keywords && !"".equals(keywords)){ | ||
104 | + pd.put("keywords", keywords.trim()); | ||
105 | + } | ||
106 | + page.setPd(pd); | ||
107 | + List<PageData> varList = studentanswer1Service.list(page); //列出StudentAnswer1列表 | ||
108 | + mv.setViewName("sunvote/studentanswer1/studentanswer1_list"); | ||
109 | + mv.addObject("varList", varList); | ||
110 | + mv.addObject("pd", pd); | ||
111 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | ||
112 | + return mv; | ||
113 | + } | ||
114 | + | ||
115 | + /**去新增页面 | ||
116 | + * @param | ||
117 | + * @throws Exception | ||
118 | + */ | ||
119 | + @RequestMapping(value="/goAdd") | ||
120 | + public ModelAndView goAdd()throws Exception{ | ||
121 | + ModelAndView mv = this.getModelAndView(); | ||
122 | + PageData pd = new PageData(); | ||
123 | + pd = this.getPageData(); | ||
124 | + mv.setViewName("sunvote/studentanswer1/studentanswer1_edit"); | ||
125 | + mv.addObject("msg", "save"); | ||
126 | + mv.addObject("pd", pd); | ||
127 | + return mv; | ||
128 | + } | ||
129 | + | ||
130 | + /**去修改页面 | ||
131 | + * @param | ||
132 | + * @throws Exception | ||
133 | + */ | ||
134 | + @RequestMapping(value="/goEdit") | ||
135 | + public ModelAndView goEdit()throws Exception{ | ||
136 | + ModelAndView mv = this.getModelAndView(); | ||
137 | + PageData pd = new PageData(); | ||
138 | + pd = this.getPageData(); | ||
139 | + pd = studentanswer1Service.findById(pd); //根据ID读取 | ||
140 | + mv.setViewName("sunvote/studentanswer1/studentanswer1_edit"); | ||
141 | + mv.addObject("msg", "edit"); | ||
142 | + mv.addObject("pd", pd); | ||
143 | + return mv; | ||
144 | + } | ||
145 | + | ||
146 | + /**批量删除 | ||
147 | + * @param | ||
148 | + * @throws Exception | ||
149 | + */ | ||
150 | + @RequestMapping(value="/deleteAll") | ||
151 | + @ResponseBody | ||
152 | + public Object deleteAll() throws Exception{ | ||
153 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除StudentAnswer1"); | ||
154 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
155 | + PageData pd = new PageData(); | ||
156 | + Map<String,Object> map = new HashMap<String,Object>(); | ||
157 | + pd = this.getPageData(); | ||
158 | + List<PageData> pdList = new ArrayList<PageData>(); | ||
159 | + String DATA_IDS = pd.getString("DATA_IDS"); | ||
160 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | ||
161 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | ||
162 | + studentanswer1Service.deleteAll(ArrayDATA_IDS); | ||
163 | + pd.put("msg", "ok"); | ||
164 | + }else{ | ||
165 | + pd.put("msg", "no"); | ||
166 | + } | ||
167 | + pdList.add(pd); | ||
168 | + map.put("list", pdList); | ||
169 | + return AppUtil.returnObject(pd, map); | ||
170 | + } | ||
171 | + | ||
172 | + /**导出到excel | ||
173 | + * @param | ||
174 | + * @throws Exception | ||
175 | + */ | ||
176 | + @RequestMapping(value="/excel") | ||
177 | + public ModelAndView exportExcel() throws Exception{ | ||
178 | + logBefore(logger, Jurisdiction.getUsername()+"导出StudentAnswer1到excel"); | ||
179 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
180 | + ModelAndView mv = new ModelAndView(); | ||
181 | + PageData pd = new PageData(); | ||
182 | + pd = this.getPageData(); | ||
183 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
184 | + List<String> titles = new ArrayList<String>(); | ||
185 | + titles.add("学生"); //1 | ||
186 | + titles.add("学生姓名"); //2 | ||
187 | + titles.add("学生学号"); //3 | ||
188 | + titles.add("答案内容(正确与否)"); //4 | ||
189 | + titles.add("学生得分"); //5 | ||
190 | + titles.add("试卷"); //6 | ||
191 | + titles.add("答卷ID"); //7 | ||
192 | + titles.add("班级ID"); //8 | ||
193 | + titles.add("年级ID"); //9 | ||
194 | + titles.add("学校ID"); //10 | ||
195 | + dataMap.put("titles", titles); | ||
196 | + List<PageData> varOList = studentanswer1Service.listAll(pd); | ||
197 | + List<PageData> varList = new ArrayList<PageData>(); | ||
198 | + for(int i=0;i<varOList.size();i++){ | ||
199 | + PageData vpd = new PageData(); | ||
200 | + vpd.put("var1", varOList.get(i).getString("STUDENT_ID")); //1 | ||
201 | + vpd.put("var2", varOList.get(i).getString("STUDENT_NAME")); //2 | ||
202 | + vpd.put("var3", varOList.get(i).getString("STUDENT_NO")); //3 | ||
203 | + vpd.put("var4", varOList.get(i).getString("CONTENT")); //4 | ||
204 | + vpd.put("var5", varOList.get(i).getString("GET_SCORE")); //5 | ||
205 | + vpd.put("var6", varOList.get(i).getString("PAPER_ID")); //6 | ||
206 | + vpd.put("var7", varOList.get(i).getString("ANSWER_ID")); //7 | ||
207 | + vpd.put("var8", varOList.get(i).getString("CLASS_ID")); //8 | ||
208 | + vpd.put("var9", varOList.get(i).getString("GRADE_ID")); //9 | ||
209 | + vpd.put("var10", varOList.get(i).getString("SCHOOL_ID")); //10 | ||
210 | + varList.add(vpd); | ||
211 | + } | ||
212 | + dataMap.put("varList", varList); | ||
213 | + ObjectExcelView erv = new ObjectExcelView(); | ||
214 | + mv = new ModelAndView(erv,dataMap); | ||
215 | + return mv; | ||
216 | + } | ||
217 | + | ||
218 | + @InitBinder | ||
219 | + public void initBinder(WebDataBinder binder){ | ||
220 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
221 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
222 | + } | ||
223 | +} |
src/com/fh/plugin/websocketInstantMsg/TestClient.java
0 → 100644
1 | +package com.fh.plugin.websocketInstantMsg; | ||
2 | + | ||
3 | +import java.io.UnsupportedEncodingException; | ||
4 | +import java.net.InetSocketAddress; | ||
5 | +import java.net.URI; | ||
6 | +import java.net.UnknownHostException; | ||
7 | +import java.nio.ByteBuffer; | ||
8 | +import java.util.ArrayList; | ||
9 | +import java.util.Date; | ||
10 | +import java.util.List; | ||
11 | +import java.util.Scanner; | ||
12 | + | ||
13 | +import net.sf.json.JSONObject; | ||
14 | + | ||
15 | +import org.java_websocket.WebSocket; | ||
16 | +import org.java_websocket.client.WebSocketClient; | ||
17 | +import org.java_websocket.drafts.Draft_17; | ||
18 | +import org.java_websocket.framing.Framedata; | ||
19 | +import org.java_websocket.handshake.ClientHandshake; | ||
20 | +import org.java_websocket.handshake.ServerHandshake; | ||
21 | +import org.java_websocket.server.WebSocketServer; | ||
22 | + | ||
23 | + | ||
24 | +public class TestClient extends WebSocketServer{ | ||
25 | + | ||
26 | + private List<WebSocket> list = new ArrayList<WebSocket>(); | ||
27 | + | ||
28 | + public TestClient(int port) throws UnknownHostException { | ||
29 | + super(new InetSocketAddress(port)); | ||
30 | + } | ||
31 | + | ||
32 | + public TestClient(InetSocketAddress address) { | ||
33 | + super(address); | ||
34 | + } | ||
35 | + | ||
36 | + /** | ||
37 | + * 触发连接事件 | ||
38 | + */ | ||
39 | + @Override | ||
40 | + public void onOpen( WebSocket conn, ClientHandshake handshake ) { | ||
41 | + //this.sendToAll( "new connection: " + handshake.getResourceDescriptor() ); | ||
42 | + //System.out.println("===" + conn.getRemoteSocketAddress().getAddress().getHostAddress()); | ||
43 | + list.add(conn); | ||
44 | + } | ||
45 | + | ||
46 | + /** | ||
47 | + * 触发关闭事件 | ||
48 | + */ | ||
49 | + @Override | ||
50 | + public void onClose( WebSocket conn, int code, String reason, boolean remote ) { | ||
51 | + list.remove(conn); | ||
52 | + } | ||
53 | + | ||
54 | + /** | ||
55 | + * 客户端发送消息到服务器时触发事件 | ||
56 | + */ | ||
57 | + @Override | ||
58 | + public void onMessage(WebSocket conn, String message){ | ||
59 | + for(WebSocket w:list){ | ||
60 | + if(w != conn){ | ||
61 | + w.send(message); | ||
62 | + } | ||
63 | + } | ||
64 | + } | ||
65 | + | ||
66 | + public void onFragment( WebSocket conn, Framedata fragment ) { | ||
67 | + } | ||
68 | + | ||
69 | + /** | ||
70 | + * 触发异常事件 | ||
71 | + */ | ||
72 | + @Override | ||
73 | + public void onError( WebSocket conn, Exception ex ) { | ||
74 | + try{ | ||
75 | + conn.close(0); | ||
76 | + }catch(Exception e){} | ||
77 | + list.remove(conn); | ||
78 | + } | ||
79 | + | ||
80 | + | ||
81 | + /** | ||
82 | + * 用户加入处理 | ||
83 | + * @param user | ||
84 | + */ | ||
85 | + public void userjoin(String user, WebSocket conn){ | ||
86 | + JSONObject result = new JSONObject(); | ||
87 | + result.element("type", "user_join"); | ||
88 | + result.element("user", "<a onclick=\"toUserMsg('"+user+"');\">"+user+"</a>"); | ||
89 | + ChatServerPool.sendMessage(result.toString()); //把当前用户加入到所有在线用户列表中 | ||
90 | + String joinMsg = "{\"from\":\"[系统]\",\"content\":\""+user+"上线了\",\"timestamp\":"+new Date().getTime()+",\"type\":\"message\"}"; | ||
91 | + ChatServerPool.sendMessage(joinMsg); //向所有在线用户推送当前用户上线的消息 | ||
92 | + result = new JSONObject(); | ||
93 | + result.element("type", "get_online_user"); | ||
94 | + ChatServerPool.addUser(user,conn); //向连接池添加当前的连接对象 | ||
95 | + result.element("list", ChatServerPool.getOnlineUser()); | ||
96 | + ChatServerPool.sendMessageToUser(conn, result.toString()); //向当前连接发送当前在线用户的列表 | ||
97 | + } | ||
98 | + | ||
99 | + /** | ||
100 | + * 用户下线处理 | ||
101 | + * @param user | ||
102 | + */ | ||
103 | + public void userLeave(WebSocket conn){ | ||
104 | +// String user = ChatServerPool.getUserByKey(conn); | ||
105 | + boolean b = ChatServerPool.removeUser(conn); //在连接池中移除连接 | ||
106 | +// if(b){ | ||
107 | +// JSONObject result = new JSONObject(); | ||
108 | +// result.element("type", "user_leave"); | ||
109 | +// result.element("user", "<a onclick=\"toUserMsg('"+user+"');\">"+user+"</a>"); | ||
110 | +// ChatServerPool.sendMessage(result.toString()); //把当前用户从所有在线用户列表中删除 | ||
111 | +// String joinMsg = "{\"from\":\"[系统]\",\"content\":\""+user+"下线了\",\"timestamp\":"+new Date().getTime()+",\"type\":\"message\"}"; | ||
112 | +// ChatServerPool.sendMessage(joinMsg); //向在线用户发送当前用户退出的消息 | ||
113 | +// } | ||
114 | + } | ||
115 | + public static void main( String[] args ) throws Exception { | ||
116 | +// WebSocketImpl.DEBUG = false; | ||
117 | +// int port = 8887; //端口 | ||
118 | +// ChatServer s = new ChatServer(port); | ||
119 | +// s.start(); | ||
120 | + //System.out.println( "服务器的端口" + s.getPort() ); | ||
121 | + testClient(); | ||
122 | + Scanner scanner = new Scanner(System.in); | ||
123 | + while(true){ | ||
124 | + String text = scanner.next(); | ||
125 | + if("close".equals(text.toLowerCase())){ | ||
126 | + try{ | ||
127 | + client.close(); | ||
128 | + }catch(Exception ex){ | ||
129 | + | ||
130 | + } | ||
131 | + break; | ||
132 | + } | ||
133 | + if("1".equals(text)){ | ||
134 | + System.out.println("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"login\",\"msg\": {}}"); | ||
135 | + client.send("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"login\",\"msg\": {}}"); | ||
136 | + }else if("2".equals(text)){ | ||
137 | + System.out.println("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"attend\",\"msg\":{\"list\": ['yw']}}"); | ||
138 | + client.send("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"attend\",\"msg\":{\"list\": ['yw']}}"); | ||
139 | + }else if("3".equals(text)){ | ||
140 | + System.out.println("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"teacher1\",\"cmd\": \"attend\",\"msg\":{\"list\": ['yw']}}"); | ||
141 | + client.send("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"teacher1\",\"cmd\": \"attend\",\"msg\":{\"list\": ['yw']}}"); | ||
142 | + }else{ | ||
143 | + System.out.println(text); | ||
144 | + client.send(text); | ||
145 | + } | ||
146 | + } | ||
147 | + } | ||
148 | + | ||
149 | + public static WebSocketClient client; | ||
150 | + | ||
151 | + public static void testClient() throws Exception{ | ||
152 | + client = new WebSocketClient(new URI("ws://120.78.57.84:8888/stw/echo"),new Draft_17()) { | ||
153 | + @Override | ||
154 | + public void onOpen(ServerHandshake arg0) { | ||
155 | + System.out.println("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"login\",\"msg\": {}}"); | ||
156 | + client.send("{\"from\":\"assistant1\",\"role\":\"assistant\",\"to\": \"server\",\"cmd\": \"login\",\"msg\": {}}"); | ||
157 | + } | ||
158 | + | ||
159 | + @Override | ||
160 | + public void onMessage(String arg0) { | ||
161 | + System.out.println(arg0); | ||
162 | + } | ||
163 | + | ||
164 | + @Override | ||
165 | + public void onError(Exception arg0) { | ||
166 | + arg0.printStackTrace(); | ||
167 | + System.out.println("发生错误已关闭"); | ||
168 | + } | ||
169 | + | ||
170 | + @Override | ||
171 | + public void onClose(int arg0, String arg1, boolean arg2) { | ||
172 | + System.out.println("链接已关闭"); | ||
173 | + } | ||
174 | + | ||
175 | + @Override | ||
176 | + public void onMessage(ByteBuffer bytes) { | ||
177 | + try { | ||
178 | + System.out.println(new String(bytes.array(),"utf-8")); | ||
179 | + } catch (UnsupportedEncodingException e) { | ||
180 | + e.printStackTrace(); | ||
181 | + } | ||
182 | + } | ||
183 | + }; | ||
184 | + | ||
185 | + client.connect(); | ||
186 | + | ||
187 | + } | ||
188 | + | ||
189 | + public static void send(byte[] bytes){ | ||
190 | + client.send(bytes); | ||
191 | + } | ||
192 | + | ||
193 | +} | ||
194 | + |
src/com/fh/service/sunvote/instantpaper1/InstantPaper1Manager.java
0 → 100644
1 | +package com.fh.service.sunvote.instantpaper1; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | +import com.fh.entity.Page; | ||
5 | +import com.fh.util.PageData; | ||
6 | + | ||
7 | +/** | ||
8 | + * 说明: 即时测1试卷接口 | ||
9 | + * 创建人:FH Q313596790 | ||
10 | + * 创建时间:2019-05-29 | ||
11 | + * @version | ||
12 | + */ | ||
13 | +public interface InstantPaper1Manager{ | ||
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/instantpaper1/impl/InstantPaper1Service.java
0 → 100644
1 | +package com.fh.service.sunvote.instantpaper1.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.instantpaper1.InstantPaper1Manager; | ||
10 | + | ||
11 | +/** | ||
12 | + * 说明: 即时测1试卷 | ||
13 | + * 创建人:FH Q313596790 | ||
14 | + * 创建时间:2019-05-29 | ||
15 | + * @version | ||
16 | + */ | ||
17 | +@Service("instantpaper1Service") | ||
18 | +public class InstantPaper1Service implements InstantPaper1Manager{ | ||
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("InstantPaper1Mapper.save", pd); | ||
29 | + } | ||
30 | + | ||
31 | + /**删除 | ||
32 | + * @param pd | ||
33 | + * @throws Exception | ||
34 | + */ | ||
35 | + public void delete(PageData pd)throws Exception{ | ||
36 | + dao.delete("InstantPaper1Mapper.delete", pd); | ||
37 | + } | ||
38 | + | ||
39 | + /**修改 | ||
40 | + * @param pd | ||
41 | + * @throws Exception | ||
42 | + */ | ||
43 | + public void edit(PageData pd)throws Exception{ | ||
44 | + dao.update("InstantPaper1Mapper.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("InstantPaper1Mapper.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("InstantPaper1Mapper.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("InstantPaper1Mapper.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("InstantPaper1Mapper.deleteAll", ArrayDATA_IDS); | ||
79 | + } | ||
80 | + | ||
81 | +} | ||
82 | + |
src/com/fh/service/sunvote/instantpaper1content/InstantPaper1ContentManager.java
0 → 100644
1 | +package com.fh.service.sunvote.instantpaper1content; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | +import com.fh.entity.Page; | ||
5 | +import com.fh.util.PageData; | ||
6 | + | ||
7 | +/** | ||
8 | + * 说明: 即时测试卷内容接口 | ||
9 | + * 创建人:FH Q313596790 | ||
10 | + * 创建时间:2019-06-11 | ||
11 | + * @version | ||
12 | + */ | ||
13 | +public interface InstantPaper1ContentManager{ | ||
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/instantpaper1content/impl/InstantPaper1ContentService.java
0 → 100644
1 | +package com.fh.service.sunvote.instantpaper1content.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.instantpaper1content.InstantPaper1ContentManager; | ||
10 | + | ||
11 | +/** | ||
12 | + * 说明: 即时测试卷内容 | ||
13 | + * 创建人:FH Q313596790 | ||
14 | + * 创建时间:2019-06-11 | ||
15 | + * @version | ||
16 | + */ | ||
17 | +@Service("instantpaper1contentService") | ||
18 | +public class InstantPaper1ContentService implements InstantPaper1ContentManager{ | ||
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("InstantPaper1ContentMapper.save", pd); | ||
29 | + } | ||
30 | + | ||
31 | + /**删除 | ||
32 | + * @param pd | ||
33 | + * @throws Exception | ||
34 | + */ | ||
35 | + public void delete(PageData pd)throws Exception{ | ||
36 | + dao.delete("InstantPaper1ContentMapper.delete", pd); | ||
37 | + } | ||
38 | + | ||
39 | + /**修改 | ||
40 | + * @param pd | ||
41 | + * @throws Exception | ||
42 | + */ | ||
43 | + public void edit(PageData pd)throws Exception{ | ||
44 | + dao.update("InstantPaper1ContentMapper.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("InstantPaper1ContentMapper.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("InstantPaper1ContentMapper.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("InstantPaper1ContentMapper.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("InstantPaper1ContentMapper.deleteAll", ArrayDATA_IDS); | ||
79 | + } | ||
80 | + | ||
81 | +} | ||
82 | + |
src/com/fh/service/sunvote/instantquestiondatasource1/InstantQuestionDataSource1Manager.java
0 → 100644
1 | +package com.fh.service.sunvote.instantquestiondatasource1; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | +import com.fh.entity.Page; | ||
5 | +import com.fh.util.PageData; | ||
6 | + | ||
7 | +/** | ||
8 | + * 说明: 即时测题库1接口 | ||
9 | + * 创建人:FH Q313596790 | ||
10 | + * 创建时间:2019-05-29 | ||
11 | + * @version | ||
12 | + */ | ||
13 | +public interface InstantQuestionDataSource1Manager{ | ||
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/instantquestiondatasource1/impl/InstantQuestionDataSource1Service.java
0 → 100644
1 | +package com.fh.service.sunvote.instantquestiondatasource1.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.instantquestiondatasource1.InstantQuestionDataSource1Manager; | ||
10 | + | ||
11 | +/** | ||
12 | + * 说明: 即时测题库1 | ||
13 | + * 创建人:FH Q313596790 | ||
14 | + * 创建时间:2019-05-29 | ||
15 | + * @version | ||
16 | + */ | ||
17 | +@Service("instantquestiondatasource1Service") | ||
18 | +public class InstantQuestionDataSource1Service implements InstantQuestionDataSource1Manager{ | ||
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("InstantQuestionDataSource1Mapper.save", pd); | ||
29 | + } | ||
30 | + | ||
31 | + /**删除 | ||
32 | + * @param pd | ||
33 | + * @throws Exception | ||
34 | + */ | ||
35 | + public void delete(PageData pd)throws Exception{ | ||
36 | + dao.delete("InstantQuestionDataSource1Mapper.delete", pd); | ||
37 | + } | ||
38 | + | ||
39 | + /**修改 | ||
40 | + * @param pd | ||
41 | + * @throws Exception | ||
42 | + */ | ||
43 | + public void edit(PageData pd)throws Exception{ | ||
44 | + dao.update("InstantQuestionDataSource1Mapper.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("InstantQuestionDataSource1Mapper.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("InstantQuestionDataSource1Mapper.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("InstantQuestionDataSource1Mapper.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("InstantQuestionDataSource1Mapper.deleteAll", ArrayDATA_IDS); | ||
79 | + } | ||
80 | + | ||
81 | +} | ||
82 | + |
src/com/fh/service/sunvote/paperanswer1/PaperAnswer1Manager.java
0 → 100644
1 | +package com.fh.service.sunvote.paperanswer1; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | +import com.fh.entity.Page; | ||
5 | +import com.fh.util.PageData; | ||
6 | + | ||
7 | +/** | ||
8 | + * 说明: 即时测试卷答题接口 | ||
9 | + * 创建人:FH Q313596790 | ||
10 | + * 创建时间:2019-06-11 | ||
11 | + * @version | ||
12 | + */ | ||
13 | +public interface PaperAnswer1Manager{ | ||
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/paperanswer1/impl/PaperAnswer1Service.java
0 → 100644
1 | +package com.fh.service.sunvote.paperanswer1.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.paperanswer1.PaperAnswer1Manager; | ||
10 | + | ||
11 | +/** | ||
12 | + * 说明: 即时测试卷答题 | ||
13 | + * 创建人:FH Q313596790 | ||
14 | + * 创建时间:2019-06-11 | ||
15 | + * @version | ||
16 | + */ | ||
17 | +@Service("paperanswer1Service") | ||
18 | +public class PaperAnswer1Service implements PaperAnswer1Manager{ | ||
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("PaperAnswer1Mapper.save", pd); | ||
29 | + } | ||
30 | + | ||
31 | + /**删除 | ||
32 | + * @param pd | ||
33 | + * @throws Exception | ||
34 | + */ | ||
35 | + public void delete(PageData pd)throws Exception{ | ||
36 | + dao.delete("PaperAnswer1Mapper.delete", pd); | ||
37 | + } | ||
38 | + | ||
39 | + /**修改 | ||
40 | + * @param pd | ||
41 | + * @throws Exception | ||
42 | + */ | ||
43 | + public void edit(PageData pd)throws Exception{ | ||
44 | + dao.update("PaperAnswer1Mapper.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("PaperAnswer1Mapper.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("PaperAnswer1Mapper.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("PaperAnswer1Mapper.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("PaperAnswer1Mapper.deleteAll", ArrayDATA_IDS); | ||
79 | + } | ||
80 | + | ||
81 | +} | ||
82 | + |
src/com/fh/service/sunvote/studentanswer1/StudentAnswer1Manager.java
0 → 100644
1 | +package com.fh.service.sunvote.studentanswer1; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | +import com.fh.entity.Page; | ||
5 | +import com.fh.util.PageData; | ||
6 | + | ||
7 | +/** | ||
8 | + * 说明: 学生答题表接口 | ||
9 | + * 创建人:FH Q313596790 | ||
10 | + * 创建时间:2019-06-11 | ||
11 | + * @version | ||
12 | + */ | ||
13 | +public interface StudentAnswer1Manager{ | ||
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/studentanswer1/impl/StudentAnswer1Service.java
0 → 100644
1 | +package com.fh.service.sunvote.studentanswer1.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.studentanswer1.StudentAnswer1Manager; | ||
10 | + | ||
11 | +/** | ||
12 | + * 说明: 学生答题表 | ||
13 | + * 创建人:FH Q313596790 | ||
14 | + * 创建时间:2019-06-11 | ||
15 | + * @version | ||
16 | + */ | ||
17 | +@Service("studentanswer1Service") | ||
18 | +public class StudentAnswer1Service implements StudentAnswer1Manager{ | ||
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("StudentAnswer1Mapper.save", pd); | ||
29 | + } | ||
30 | + | ||
31 | + /**删除 | ||
32 | + * @param pd | ||
33 | + * @throws Exception | ||
34 | + */ | ||
35 | + public void delete(PageData pd)throws Exception{ | ||
36 | + dao.delete("StudentAnswer1Mapper.delete", pd); | ||
37 | + } | ||
38 | + | ||
39 | + /**修改 | ||
40 | + * @param pd | ||
41 | + * @throws Exception | ||
42 | + */ | ||
43 | + public void edit(PageData pd)throws Exception{ | ||
44 | + dao.update("StudentAnswer1Mapper.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("StudentAnswer1Mapper.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("StudentAnswer1Mapper.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("StudentAnswer1Mapper.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("StudentAnswer1Mapper.deleteAll", ArrayDATA_IDS); | ||
79 | + } | ||
80 | + | ||
81 | +} | ||
82 | + |
即时测2sql.sql
0 → 100644
1 | + | ||
2 | +SET FOREIGN_KEY_CHECKS=0; | ||
3 | + | ||
4 | +-- ---------------------------- | ||
5 | +-- Table structure for `SV_INSTANTPAPER1` | ||
6 | +-- ---------------------------- | ||
7 | +DROP TABLE IF EXISTS `SV_INSTANTPAPER1`; | ||
8 | +CREATE TABLE `SV_INSTANTPAPER1` ( | ||
9 | + `INSTANTPAPER1_ID` varchar(100) NOT NULL, | ||
10 | + `PAPER_NAME` varchar(100) DEFAULT NULL COMMENT '试卷名称', | ||
11 | + `TAG` varchar(300) DEFAULT NULL COMMENT '标签', | ||
12 | + `PERMISSION` varchar(100) DEFAULT NULL COMMENT '权限', | ||
13 | + `SUBJECT_ID` varchar(50) DEFAULT NULL COMMENT '科目', | ||
14 | + `GRADE_ID` varchar(50) DEFAULT NULL COMMENT '年级', | ||
15 | + `CLASS_ID` varchar(50) DEFAULT NULL COMMENT '班级', | ||
16 | + `SCHOOL_ID` varchar(50) DEFAULT NULL COMMENT '学校', | ||
17 | + `COMBINATION` int(1) NOT NULL COMMENT '是否组合试卷', | ||
18 | + `PAPER_SCORE` varchar(10) DEFAULT NULL COMMENT '试卷总分', | ||
19 | + `USER_ID` varchar(50) DEFAULT NULL COMMENT '用户', | ||
20 | + `CREATE_TIME` varchar(32) DEFAULT NULL COMMENT '创建时间', | ||
21 | + `COUNT` varchar(10) DEFAULT NULL COMMENT '考试次数', | ||
22 | + PRIMARY KEY (`INSTANTPAPER1_ID`) | ||
23 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
24 | + | ||
25 | +SET FOREIGN_KEY_CHECKS=0; | ||
26 | + | ||
27 | +-- ---------------------------- | ||
28 | +-- Table structure for `SV_INSTANTPAPER1CONTENT` | ||
29 | +-- ---------------------------- | ||
30 | +DROP TABLE IF EXISTS `SV_INSTANTPAPER1CONTENT`; | ||
31 | +CREATE TABLE `SV_INSTANTPAPER1CONTENT` ( | ||
32 | + `INSTANTPAPER1CONTENT_ID` varchar(100) NOT NULL, | ||
33 | + `PAPER_ID` varchar(50) DEFAULT NULL COMMENT '试卷', | ||
34 | + `QUESTION_ID` varchar(50) DEFAULT NULL COMMENT '试题', | ||
35 | + `RANK` varchar(10) DEFAULT NULL COMMENT '排序', | ||
36 | + `TITLE` varchar(20) DEFAULT NULL COMMENT '题号', | ||
37 | + `SCORE` varchar(255) DEFAULT NULL COMMENT '分数', | ||
38 | + `REMARK` varchar(255) DEFAULT NULL COMMENT '说明', | ||
39 | + PRIMARY KEY (`INSTANTPAPER1CONTENT_ID`) | ||
40 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
41 | + | ||
42 | +SET FOREIGN_KEY_CHECKS=0; | ||
43 | + | ||
44 | +-- ---------------------------- | ||
45 | +-- Table structure for `SV_INSTANTQUESTIONDATASOURCE1` | ||
46 | +-- ---------------------------- | ||
47 | +DROP TABLE IF EXISTS `SV_INSTANTQUESTIONDATASOURCE1`; | ||
48 | +CREATE TABLE `SV_INSTANTQUESTIONDATASOURCE1` ( | ||
49 | + `INSTANTQUESTIONDATASOURCE1_ID` varchar(100) NOT NULL, | ||
50 | + `IMAGE_URL` varchar(100) DEFAULT NULL COMMENT '图片路径', | ||
51 | + `SCORE` double(11,2) DEFAULT NULL COMMENT '分数', | ||
52 | + `ANSWER_CONTENT` varchar(100) DEFAULT NULL COMMENT '答案内容', | ||
53 | + `RIGHT_ANSWER` varchar(100) DEFAULT NULL COMMENT '标准答案', | ||
54 | + `TAG` varchar(300) DEFAULT NULL COMMENT '标签', | ||
55 | + `PERMISSION` varchar(100) DEFAULT NULL COMMENT '权限', | ||
56 | + `SUBJECT_ID` varchar(50) DEFAULT NULL COMMENT '科目', | ||
57 | + `GRADE_ID` varchar(50) DEFAULT NULL COMMENT '年级', | ||
58 | + `SCHOOL_ID` varchar(50) DEFAULT NULL COMMENT '学校', | ||
59 | + `USER_ID` varchar(50) DEFAULT NULL COMMENT '用户ID', | ||
60 | + `创建时间` varchar(32) DEFAULT NULL COMMENT 'create_time', | ||
61 | + `CLASS_ID` varchar(50) DEFAULT NULL COMMENT '班级', | ||
62 | + PRIMARY KEY (`INSTANTQUESTIONDATASOURCE1_ID`) | ||
63 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
64 | + | ||
65 | +SET FOREIGN_KEY_CHECKS=0; | ||
66 | + | ||
67 | +-- ---------------------------- | ||
68 | +-- Table structure for `SV_PAPERANSWER1` | ||
69 | +-- ---------------------------- | ||
70 | +DROP TABLE IF EXISTS `SV_PAPERANSWER1`; | ||
71 | +CREATE TABLE `SV_PAPERANSWER1` ( | ||
72 | + `PAPERANSWER1_ID` varchar(100) NOT NULL, | ||
73 | + `PAPER_ID` varchar(35) DEFAULT NULL COMMENT '试卷', | ||
74 | + `PAPER_NAME` varchar(30) DEFAULT NULL COMMENT '试卷名称', | ||
75 | + `SUBJECT_ID` varchar(35) DEFAULT NULL COMMENT '科目', | ||
76 | + `CLASS_ID` varchar(35) DEFAULT NULL COMMENT '班级ID', | ||
77 | + `GRADE_ID` varchar(35) DEFAULT NULL COMMENT '年级', | ||
78 | + `SCHOOL_ID` varchar(35) DEFAULT NULL COMMENT '学校', | ||
79 | + `USER_ID` varchar(35) DEFAULT NULL COMMENT '创建者', | ||
80 | + `CREATE_DATE` varchar(32) DEFAULT NULL COMMENT '考试时间', | ||
81 | + `AVG_SCORE` varchar(35) DEFAULT NULL COMMENT '平均分', | ||
82 | + `HIGHT_SCORE` varchar(35) DEFAULT NULL COMMENT '最高分', | ||
83 | + `REMARK` varchar(255) DEFAULT NULL COMMENT '备注', | ||
84 | + PRIMARY KEY (`PAPERANSWER1_ID`) | ||
85 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
86 | + | ||
87 | +SET FOREIGN_KEY_CHECKS=0; | ||
88 | + | ||
89 | +-- ---------------------------- | ||
90 | +-- Table structure for `SV_STUDENTANSWER1` | ||
91 | +-- ---------------------------- | ||
92 | +DROP TABLE IF EXISTS `SV_STUDENTANSWER1`; | ||
93 | +CREATE TABLE `SV_STUDENTANSWER1` ( | ||
94 | + `STUDENTANSWER1_ID` varchar(100) NOT NULL, | ||
95 | + `STUDENT_ID` varchar(35) DEFAULT NULL COMMENT '学生', | ||
96 | + `STUDENT_NAME` varchar(30) DEFAULT NULL COMMENT '学生姓名', | ||
97 | + `STUDENT_NO` varchar(35) DEFAULT NULL COMMENT '学生学号', | ||
98 | + `CONTENT` varchar(1000) DEFAULT NULL COMMENT '答案内容(正确与否)', | ||
99 | + `GET_SCORE` varchar(32) DEFAULT NULL COMMENT '学生得分', | ||
100 | + `PAPER_ID` varchar(35) DEFAULT NULL COMMENT '试卷', | ||
101 | + `ANSWER_ID` varchar(35) DEFAULT NULL COMMENT '答卷ID', | ||
102 | + `CLASS_ID` varchar(35) DEFAULT NULL COMMENT '班级ID', | ||
103 | + `GRADE_ID` varchar(35) DEFAULT NULL COMMENT '年级ID', | ||
104 | + `SCHOOL_ID` varchar(35) DEFAULT NULL COMMENT '学校ID', | ||
105 | + PRIMARY KEY (`STUDENTANSWER1_ID`) | ||
106 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8; |