Commit bed6e1fc9e2b1cf87efc7aa4a16448b37c32e506
1 parent
645ab84b
添加其他功能
Showing
104 changed files
with
15301 additions
and
249 deletions
Too many changes.
To preserve performance only 100 of 104 files are displayed.
WebRoot/WEB-INF/jsp/sunvote/classbasetation/classbasetation_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="classbasetation/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="CLASSBASETATION_ID" id="CLASSBASETATION_ID" value="${pd.CLASSBASETATION_ID}"/> | |
| 32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
| 33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
| 34 | + <tr> | |
| 35 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级:</td> | |
| 36 | + <td><input type="number" name="SCLASS_ID" id="SCLASS_ID" value="${pd.SCLASS_ID}" maxlength="32" placeholder="这里输入班级" title="班级" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">基站:</td> | |
| 40 | + <td><input type="number" name="BASESTATION_ID" id="BASESTATION_ID" value="${pd.BASESTATION_ID}" 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 class="span10 date-picker" name="CREATE_TIME" id="CREATE_TIME" value="${pd.CREATE_TIME}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="时间" title="时间" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="text-align: center;" colspan="10"> | |
| 48 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 49 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 50 | + </td> | |
| 51 | + </tr> | |
| 52 | + </table> | |
| 53 | + </div> | |
| 54 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 55 | + </form> | |
| 56 | + </div> | |
| 57 | + <!-- /.col --> | |
| 58 | + </div> | |
| 59 | + <!-- /.row --> | |
| 60 | + </div> | |
| 61 | + <!-- /.page-content --> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <!-- /.main-content --> | |
| 65 | +</div> | |
| 66 | +<!-- /.main-container --> | |
| 67 | + | |
| 68 | + | |
| 69 | + <!-- 页面底部js¨ --> | |
| 70 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 71 | + <!-- 下拉框 --> | |
| 72 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 73 | + <!-- 日期框 --> | |
| 74 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 75 | + <!--提示框--> | |
| 76 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 77 | + <script type="text/javascript"> | |
| 78 | + $(top.hangge()); | |
| 79 | + //保存 | |
| 80 | + function save(){ | |
| 81 | + if($("#SCLASS_ID").val()==""){ | |
| 82 | + $("#SCLASS_ID").tips({ | |
| 83 | + side:3, | |
| 84 | + msg:'请输入班级', | |
| 85 | + bg:'#AE81FF', | |
| 86 | + time:2 | |
| 87 | + }); | |
| 88 | + $("#SCLASS_ID").focus(); | |
| 89 | + return false; | |
| 90 | + } | |
| 91 | + if($("#BASESTATION_ID").val()==""){ | |
| 92 | + $("#BASESTATION_ID").tips({ | |
| 93 | + side:3, | |
| 94 | + msg:'请输入基站', | |
| 95 | + bg:'#AE81FF', | |
| 96 | + time:2 | |
| 97 | + }); | |
| 98 | + $("#BASESTATION_ID").focus(); | |
| 99 | + return false; | |
| 100 | + } | |
| 101 | + if($("#CREATE_TIME").val()==""){ | |
| 102 | + $("#CREATE_TIME").tips({ | |
| 103 | + side:3, | |
| 104 | + msg:'请输入时间', | |
| 105 | + bg:'#AE81FF', | |
| 106 | + time:2 | |
| 107 | + }); | |
| 108 | + $("#CREATE_TIME").focus(); | |
| 109 | + return false; | |
| 110 | + } | |
| 111 | + $("#Form").submit(); | |
| 112 | + $("#zhongxin").hide(); | |
| 113 | + $("#zhongxin2").show(); | |
| 114 | + } | |
| 115 | + | |
| 116 | + $(function() { | |
| 117 | + //日期框 | |
| 118 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 119 | + }); | |
| 120 | + </script> | |
| 121 | +</body> | |
| 122 | +</html> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/classbasetation/classbasetation_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="classbasetation/list.do" method="post" name="Form" id="Form"> | |
| 34 | + <table style="margin-top:5px;"> | |
| 35 | + <tr> | |
| 36 | + <td> | |
| 37 | + <div class="nav-search"> | |
| 38 | + <span class="input-icon"> | |
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + </td> | |
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 48 | + <option value=""></option> | |
| 49 | + <option value="">全部</option> | |
| 50 | + <option value="">1</option> | |
| 51 | + <option value="">2</option> | |
| 52 | + </select> | |
| 53 | + </td> | |
| 54 | + <c:if test="${QX.cha == 1 }"> | |
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 56 | + </c:if> | |
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + <!-- 检索 --> | |
| 61 | + | |
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 63 | + <thead> | |
| 64 | + <tr> | |
| 65 | + <th class="center" style="width:35px;"> | |
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 67 | + </th> | |
| 68 | + <th class="center" style="width:50px;">序号</th> | |
| 69 | + <th class="center">班级</th> | |
| 70 | + <th class="center">基站</th> | |
| 71 | + <th class="center">时间</th> | |
| 72 | + <th class="center">操作</th> | |
| 73 | + </tr> | |
| 74 | + </thead> | |
| 75 | + | |
| 76 | + <tbody> | |
| 77 | + <!-- 开始循环 --> | |
| 78 | + <c:choose> | |
| 79 | + <c:when test="${not empty varList}"> | |
| 80 | + <c:if test="${QX.cha == 1 }"> | |
| 81 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 82 | + <tr> | |
| 83 | + <td class='center'> | |
| 84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.CLASSBASETATION_ID}" class="ace" /><span class="lbl"></span></label> | |
| 85 | + </td> | |
| 86 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 87 | + <td class='center'>${var.SCLASS_ID}</td> | |
| 88 | + <td class='center'>${var.BASESTATION_ID}</td> | |
| 89 | + <td class='center'>${var.CREATE_TIME}</td> | |
| 90 | + <td class="center"> | |
| 91 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 92 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 93 | + </c:if> | |
| 94 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 95 | + <c:if test="${QX.edit == 1 }"> | |
| 96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.CLASSBASETATION_ID}');"> | |
| 97 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 98 | + </a> | |
| 99 | + </c:if> | |
| 100 | + <c:if test="${QX.del == 1 }"> | |
| 101 | + <a class="btn btn-xs btn-danger" onclick="del('${var.CLASSBASETATION_ID}');"> | |
| 102 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 103 | + </a> | |
| 104 | + </c:if> | |
| 105 | + </div> | |
| 106 | + <div class="hidden-md hidden-lg"> | |
| 107 | + <div class="inline pos-rel"> | |
| 108 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 109 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 110 | + </button> | |
| 111 | + | |
| 112 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 113 | + <c:if test="${QX.edit == 1 }"> | |
| 114 | + <li> | |
| 115 | + <a style="cursor:pointer;" onclick="edit('${var.CLASSBASETATION_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 116 | + <span class="green"> | |
| 117 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 118 | + </span> | |
| 119 | + </a> | |
| 120 | + </li> | |
| 121 | + </c:if> | |
| 122 | + <c:if test="${QX.del == 1 }"> | |
| 123 | + <li> | |
| 124 | + <a style="cursor:pointer;" onclick="del('${var.CLASSBASETATION_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 125 | + <span class="red"> | |
| 126 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 127 | + </span> | |
| 128 | + </a> | |
| 129 | + </li> | |
| 130 | + </c:if> | |
| 131 | + </ul> | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | + </td> | |
| 135 | + </tr> | |
| 136 | + | |
| 137 | + </c:forEach> | |
| 138 | + </c:if> | |
| 139 | + <c:if test="${QX.cha == 0 }"> | |
| 140 | + <tr> | |
| 141 | + <td colspan="100" class="center">您无权查看</td> | |
| 142 | + </tr> | |
| 143 | + </c:if> | |
| 144 | + </c:when> | |
| 145 | + <c:otherwise> | |
| 146 | + <tr class="main_info"> | |
| 147 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 148 | + </tr> | |
| 149 | + </c:otherwise> | |
| 150 | + </c:choose> | |
| 151 | + </tbody> | |
| 152 | + </table> | |
| 153 | + <div class="page-header position-relative"> | |
| 154 | + <table style="width:100%;"> | |
| 155 | + <tr> | |
| 156 | + <td style="vertical-align:top;"> | |
| 157 | + <c:if test="${QX.add == 1 }"> | |
| 158 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 159 | + </c:if> | |
| 160 | + <c:if test="${QX.del == 1 }"> | |
| 161 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 162 | + </c:if> | |
| 163 | + </td> | |
| 164 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 165 | + </tr> | |
| 166 | + </table> | |
| 167 | + </div> | |
| 168 | + </form> | |
| 169 | + | |
| 170 | + </div> | |
| 171 | + <!-- /.col --> | |
| 172 | + </div> | |
| 173 | + <!-- /.row --> | |
| 174 | + </div> | |
| 175 | + <!-- /.page-content --> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + <!-- /.main-content --> | |
| 179 | + | |
| 180 | + <!-- 返回顶部 --> | |
| 181 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 182 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 183 | + </a> | |
| 184 | + | |
| 185 | + </div> | |
| 186 | + <!-- /.main-container --> | |
| 187 | + | |
| 188 | + <!-- basic scripts --> | |
| 189 | + <!-- 页面底部js¨ --> | |
| 190 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 191 | + <!-- 删除时确认窗口 --> | |
| 192 | + <script src="static/ace/js/bootbox.js"></script> | |
| 193 | + <!-- ace scripts --> | |
| 194 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 195 | + <!-- 下拉框 --> | |
| 196 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 197 | + <!-- 日期框 --> | |
| 198 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 199 | + <!--提示框--> | |
| 200 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 201 | + <script type="text/javascript"> | |
| 202 | + $(top.hangge());//关闭加载状态 | |
| 203 | + //检索 | |
| 204 | + function tosearch(){ | |
| 205 | + top.jzts(); | |
| 206 | + $("#Form").submit(); | |
| 207 | + } | |
| 208 | + $(function() { | |
| 209 | + | |
| 210 | + //日期框 | |
| 211 | + $('.date-picker').datepicker({ | |
| 212 | + autoclose: true, | |
| 213 | + todayHighlight: true | |
| 214 | + }); | |
| 215 | + | |
| 216 | + //下拉框 | |
| 217 | + if(!ace.vars['touch']) { | |
| 218 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 219 | + $(window) | |
| 220 | + .off('resize.chosen') | |
| 221 | + .on('resize.chosen', function() { | |
| 222 | + $('.chosen-select').each(function() { | |
| 223 | + var $this = $(this); | |
| 224 | + $this.next().css({'width': $this.parent().width()}); | |
| 225 | + }); | |
| 226 | + }).trigger('resize.chosen'); | |
| 227 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 228 | + if(event_name != 'sidebar_collapsed') return; | |
| 229 | + $('.chosen-select').each(function() { | |
| 230 | + var $this = $(this); | |
| 231 | + $this.next().css({'width': $this.parent().width()}); | |
| 232 | + }); | |
| 233 | + }); | |
| 234 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 235 | + var target = $(this).find('input[type=radio]'); | |
| 236 | + var which = parseInt(target.val()); | |
| 237 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 238 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 239 | + }); | |
| 240 | + } | |
| 241 | + | |
| 242 | + | |
| 243 | + //复选框全选控制 | |
| 244 | + var active_class = 'active'; | |
| 245 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 246 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 247 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 248 | + var row = this; | |
| 249 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 250 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 251 | + }); | |
| 252 | + }); | |
| 253 | + }); | |
| 254 | + | |
| 255 | + //新增 | |
| 256 | + function add(){ | |
| 257 | + top.jzts(); | |
| 258 | + var diag = new top.Dialog(); | |
| 259 | + diag.Drag=true; | |
| 260 | + diag.Title ="新增"; | |
| 261 | + diag.URL = '<%=basePath%>classbasetation/goAdd.do'; | |
| 262 | + diag.Width = 450; | |
| 263 | + diag.Height = 355; | |
| 264 | + diag.Modal = true; //有无遮罩窗口 | |
| 265 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 266 | + diag.ShowMinButton = true; //最小化按钮 | |
| 267 | + diag.CancelEvent = function(){ //关闭事件 | |
| 268 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 269 | + if('${page.currentPage}' == '0'){ | |
| 270 | + tosearch(); | |
| 271 | + }else{ | |
| 272 | + tosearch(); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + diag.close(); | |
| 276 | + }; | |
| 277 | + diag.show(); | |
| 278 | + } | |
| 279 | + | |
| 280 | + //删除 | |
| 281 | + function del(Id){ | |
| 282 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 283 | + if(result) { | |
| 284 | + top.jzts(); | |
| 285 | + var url = "<%=basePath%>classbasetation/delete.do?CLASSBASETATION_ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | + $.get(url,function(data){ | |
| 287 | + tosearch(); | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + | |
| 293 | + //修改 | |
| 294 | + function edit(Id){ | |
| 295 | + top.jzts(); | |
| 296 | + var diag = new top.Dialog(); | |
| 297 | + diag.Drag=true; | |
| 298 | + diag.Title ="编辑"; | |
| 299 | + diag.URL = '<%=basePath%>classbasetation/goEdit.do?CLASSBASETATION_ID='+Id; | |
| 300 | + diag.Width = 450; | |
| 301 | + diag.Height = 355; | |
| 302 | + diag.Modal = true; //有无遮罩窗口 | |
| 303 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 304 | + diag.ShowMinButton = true; //最小化按钮 | |
| 305 | + diag.CancelEvent = function(){ //关闭事件 | |
| 306 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 307 | + tosearch(); | |
| 308 | + } | |
| 309 | + diag.close(); | |
| 310 | + }; | |
| 311 | + diag.show(); | |
| 312 | + } | |
| 313 | + | |
| 314 | + //批量操作 | |
| 315 | + function makeAll(msg){ | |
| 316 | + bootbox.confirm(msg, function(result) { | |
| 317 | + if(result) { | |
| 318 | + var str = ''; | |
| 319 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 320 | + if(document.getElementsByName('ids')[i].checked){ | |
| 321 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 322 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 323 | + } | |
| 324 | + } | |
| 325 | + if(str==''){ | |
| 326 | + bootbox.dialog({ | |
| 327 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 328 | + buttons: | |
| 329 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 330 | + }); | |
| 331 | + $("#zcheckbox").tips({ | |
| 332 | + side:1, | |
| 333 | + msg:'点这里全选', | |
| 334 | + bg:'#AE81FF', | |
| 335 | + time:8 | |
| 336 | + }); | |
| 337 | + return; | |
| 338 | + }else{ | |
| 339 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 340 | + top.jzts(); | |
| 341 | + $.ajax({ | |
| 342 | + type: "POST", | |
| 343 | + url: '<%=basePath%>classbasetation/deleteAll.do?tm='+new Date().getTime(), | |
| 344 | + data: {DATA_IDS:str}, | |
| 345 | + dataType:'json', | |
| 346 | + //beforeSend: validateData, | |
| 347 | + cache: false, | |
| 348 | + success: function(data){ | |
| 349 | + $.each(data.list, function(i, list){ | |
| 350 | + tosearch(); | |
| 351 | + }); | |
| 352 | + } | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + } | |
| 356 | + } | |
| 357 | + }); | |
| 358 | + }; | |
| 359 | + | |
| 360 | + //导出excel | |
| 361 | + function toExcel(){ | |
| 362 | + window.location.href='<%=basePath%>classbasetation/excel.do'; | |
| 363 | + } | |
| 364 | + </script> | |
| 365 | + | |
| 366 | + | |
| 367 | +</body> | |
| 368 | +</html> | |
| 0 | 369 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/classroster/classroster_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="classroster/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="CLASSROSTER_ID" id="CLASSROSTER_ID" value="${pd.CLASSROSTER_ID}"/> | |
| 32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
| 33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
| 34 | + <tr> | |
| 35 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级:</td> | |
| 36 | + <td><input type="number" name="SCLASS_ID" id="SCLASS_ID" value="${pd.SCLASS_ID}" maxlength="32" placeholder="这里输入班级" title="班级" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">学生:</td> | |
| 40 | + <td><input type="number" name="STUDENT_ID" id="STUDENT_ID" value="${pd.STUDENT_ID}" 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="TEAMID" id="TEAMID" value="${pd.TEAMID}" maxlength="255" placeholder="这里输入学期名称" title="学期名称" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="text-align: center;" colspan="10"> | |
| 48 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 49 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 50 | + </td> | |
| 51 | + </tr> | |
| 52 | + </table> | |
| 53 | + </div> | |
| 54 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 55 | + </form> | |
| 56 | + </div> | |
| 57 | + <!-- /.col --> | |
| 58 | + </div> | |
| 59 | + <!-- /.row --> | |
| 60 | + </div> | |
| 61 | + <!-- /.page-content --> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <!-- /.main-content --> | |
| 65 | +</div> | |
| 66 | +<!-- /.main-container --> | |
| 67 | + | |
| 68 | + | |
| 69 | + <!-- 页面底部js¨ --> | |
| 70 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 71 | + <!-- 下拉框 --> | |
| 72 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 73 | + <!-- 日期框 --> | |
| 74 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 75 | + <!--提示框--> | |
| 76 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 77 | + <script type="text/javascript"> | |
| 78 | + $(top.hangge()); | |
| 79 | + //保存 | |
| 80 | + function save(){ | |
| 81 | + if($("#SCLASS_ID").val()==""){ | |
| 82 | + $("#SCLASS_ID").tips({ | |
| 83 | + side:3, | |
| 84 | + msg:'请输入班级', | |
| 85 | + bg:'#AE81FF', | |
| 86 | + time:2 | |
| 87 | + }); | |
| 88 | + $("#SCLASS_ID").focus(); | |
| 89 | + return false; | |
| 90 | + } | |
| 91 | + if($("#STUDENT_ID").val()==""){ | |
| 92 | + $("#STUDENT_ID").tips({ | |
| 93 | + side:3, | |
| 94 | + msg:'请输入学生', | |
| 95 | + bg:'#AE81FF', | |
| 96 | + time:2 | |
| 97 | + }); | |
| 98 | + $("#STUDENT_ID").focus(); | |
| 99 | + return false; | |
| 100 | + } | |
| 101 | + if($("#TEAMID").val()==""){ | |
| 102 | + $("#TEAMID").tips({ | |
| 103 | + side:3, | |
| 104 | + msg:'请输入学期名称', | |
| 105 | + bg:'#AE81FF', | |
| 106 | + time:2 | |
| 107 | + }); | |
| 108 | + $("#TEAMID").focus(); | |
| 109 | + return false; | |
| 110 | + } | |
| 111 | + $("#Form").submit(); | |
| 112 | + $("#zhongxin").hide(); | |
| 113 | + $("#zhongxin2").show(); | |
| 114 | + } | |
| 115 | + | |
| 116 | + $(function() { | |
| 117 | + //日期框 | |
| 118 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 119 | + }); | |
| 120 | + </script> | |
| 121 | +</body> | |
| 122 | +</html> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/classroster/classroster_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="classroster/list.do" method="post" name="Form" id="Form"> | |
| 34 | + <table style="margin-top:5px;"> | |
| 35 | + <tr> | |
| 36 | + <td> | |
| 37 | + <div class="nav-search"> | |
| 38 | + <span class="input-icon"> | |
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + </td> | |
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 48 | + <option value=""></option> | |
| 49 | + <option value="">全部</option> | |
| 50 | + <option value="">1</option> | |
| 51 | + <option value="">2</option> | |
| 52 | + </select> | |
| 53 | + </td> | |
| 54 | + <c:if test="${QX.cha == 1 }"> | |
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 56 | + </c:if> | |
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + <!-- 检索 --> | |
| 61 | + | |
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 63 | + <thead> | |
| 64 | + <tr> | |
| 65 | + <th class="center" style="width:35px;"> | |
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 67 | + </th> | |
| 68 | + <th class="center" style="width:50px;">序号</th> | |
| 69 | + <th class="center">班级</th> | |
| 70 | + <th class="center">学生</th> | |
| 71 | + <th class="center">学期名称</th> | |
| 72 | + <th class="center">操作</th> | |
| 73 | + </tr> | |
| 74 | + </thead> | |
| 75 | + | |
| 76 | + <tbody> | |
| 77 | + <!-- 开始循环 --> | |
| 78 | + <c:choose> | |
| 79 | + <c:when test="${not empty varList}"> | |
| 80 | + <c:if test="${QX.cha == 1 }"> | |
| 81 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 82 | + <tr> | |
| 83 | + <td class='center'> | |
| 84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.CLASSROSTER_ID}" class="ace" /><span class="lbl"></span></label> | |
| 85 | + </td> | |
| 86 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 87 | + <td class='center'>${var.SCLASS_ID}</td> | |
| 88 | + <td class='center'>${var.STUDENT_ID}</td> | |
| 89 | + <td class='center'>${var.TEAMID}</td> | |
| 90 | + <td class="center"> | |
| 91 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 92 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 93 | + </c:if> | |
| 94 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 95 | + <c:if test="${QX.edit == 1 }"> | |
| 96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.CLASSROSTER_ID}');"> | |
| 97 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 98 | + </a> | |
| 99 | + </c:if> | |
| 100 | + <c:if test="${QX.del == 1 }"> | |
| 101 | + <a class="btn btn-xs btn-danger" onclick="del('${var.CLASSROSTER_ID}');"> | |
| 102 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 103 | + </a> | |
| 104 | + </c:if> | |
| 105 | + </div> | |
| 106 | + <div class="hidden-md hidden-lg"> | |
| 107 | + <div class="inline pos-rel"> | |
| 108 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 109 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 110 | + </button> | |
| 111 | + | |
| 112 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 113 | + <c:if test="${QX.edit == 1 }"> | |
| 114 | + <li> | |
| 115 | + <a style="cursor:pointer;" onclick="edit('${var.CLASSROSTER_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 116 | + <span class="green"> | |
| 117 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 118 | + </span> | |
| 119 | + </a> | |
| 120 | + </li> | |
| 121 | + </c:if> | |
| 122 | + <c:if test="${QX.del == 1 }"> | |
| 123 | + <li> | |
| 124 | + <a style="cursor:pointer;" onclick="del('${var.CLASSROSTER_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 125 | + <span class="red"> | |
| 126 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 127 | + </span> | |
| 128 | + </a> | |
| 129 | + </li> | |
| 130 | + </c:if> | |
| 131 | + </ul> | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | + </td> | |
| 135 | + </tr> | |
| 136 | + | |
| 137 | + </c:forEach> | |
| 138 | + </c:if> | |
| 139 | + <c:if test="${QX.cha == 0 }"> | |
| 140 | + <tr> | |
| 141 | + <td colspan="100" class="center">您无权查看</td> | |
| 142 | + </tr> | |
| 143 | + </c:if> | |
| 144 | + </c:when> | |
| 145 | + <c:otherwise> | |
| 146 | + <tr class="main_info"> | |
| 147 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 148 | + </tr> | |
| 149 | + </c:otherwise> | |
| 150 | + </c:choose> | |
| 151 | + </tbody> | |
| 152 | + </table> | |
| 153 | + <div class="page-header position-relative"> | |
| 154 | + <table style="width:100%;"> | |
| 155 | + <tr> | |
| 156 | + <td style="vertical-align:top;"> | |
| 157 | + <c:if test="${QX.add == 1 }"> | |
| 158 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 159 | + </c:if> | |
| 160 | + <c:if test="${QX.del == 1 }"> | |
| 161 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 162 | + </c:if> | |
| 163 | + </td> | |
| 164 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 165 | + </tr> | |
| 166 | + </table> | |
| 167 | + </div> | |
| 168 | + </form> | |
| 169 | + | |
| 170 | + </div> | |
| 171 | + <!-- /.col --> | |
| 172 | + </div> | |
| 173 | + <!-- /.row --> | |
| 174 | + </div> | |
| 175 | + <!-- /.page-content --> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + <!-- /.main-content --> | |
| 179 | + | |
| 180 | + <!-- 返回顶部 --> | |
| 181 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 182 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 183 | + </a> | |
| 184 | + | |
| 185 | + </div> | |
| 186 | + <!-- /.main-container --> | |
| 187 | + | |
| 188 | + <!-- basic scripts --> | |
| 189 | + <!-- 页面底部js¨ --> | |
| 190 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 191 | + <!-- 删除时确认窗口 --> | |
| 192 | + <script src="static/ace/js/bootbox.js"></script> | |
| 193 | + <!-- ace scripts --> | |
| 194 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 195 | + <!-- 下拉框 --> | |
| 196 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 197 | + <!-- 日期框 --> | |
| 198 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 199 | + <!--提示框--> | |
| 200 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 201 | + <script type="text/javascript"> | |
| 202 | + $(top.hangge());//关闭加载状态 | |
| 203 | + //检索 | |
| 204 | + function tosearch(){ | |
| 205 | + top.jzts(); | |
| 206 | + $("#Form").submit(); | |
| 207 | + } | |
| 208 | + $(function() { | |
| 209 | + | |
| 210 | + //日期框 | |
| 211 | + $('.date-picker').datepicker({ | |
| 212 | + autoclose: true, | |
| 213 | + todayHighlight: true | |
| 214 | + }); | |
| 215 | + | |
| 216 | + //下拉框 | |
| 217 | + if(!ace.vars['touch']) { | |
| 218 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 219 | + $(window) | |
| 220 | + .off('resize.chosen') | |
| 221 | + .on('resize.chosen', function() { | |
| 222 | + $('.chosen-select').each(function() { | |
| 223 | + var $this = $(this); | |
| 224 | + $this.next().css({'width': $this.parent().width()}); | |
| 225 | + }); | |
| 226 | + }).trigger('resize.chosen'); | |
| 227 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 228 | + if(event_name != 'sidebar_collapsed') return; | |
| 229 | + $('.chosen-select').each(function() { | |
| 230 | + var $this = $(this); | |
| 231 | + $this.next().css({'width': $this.parent().width()}); | |
| 232 | + }); | |
| 233 | + }); | |
| 234 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 235 | + var target = $(this).find('input[type=radio]'); | |
| 236 | + var which = parseInt(target.val()); | |
| 237 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 238 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 239 | + }); | |
| 240 | + } | |
| 241 | + | |
| 242 | + | |
| 243 | + //复选框全选控制 | |
| 244 | + var active_class = 'active'; | |
| 245 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 246 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 247 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 248 | + var row = this; | |
| 249 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 250 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 251 | + }); | |
| 252 | + }); | |
| 253 | + }); | |
| 254 | + | |
| 255 | + //新增 | |
| 256 | + function add(){ | |
| 257 | + top.jzts(); | |
| 258 | + var diag = new top.Dialog(); | |
| 259 | + diag.Drag=true; | |
| 260 | + diag.Title ="新增"; | |
| 261 | + diag.URL = '<%=basePath%>classroster/goAdd.do'; | |
| 262 | + diag.Width = 450; | |
| 263 | + diag.Height = 355; | |
| 264 | + diag.Modal = true; //有无遮罩窗口 | |
| 265 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 266 | + diag.ShowMinButton = true; //最小化按钮 | |
| 267 | + diag.CancelEvent = function(){ //关闭事件 | |
| 268 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 269 | + if('${page.currentPage}' == '0'){ | |
| 270 | + tosearch(); | |
| 271 | + }else{ | |
| 272 | + tosearch(); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + diag.close(); | |
| 276 | + }; | |
| 277 | + diag.show(); | |
| 278 | + } | |
| 279 | + | |
| 280 | + //删除 | |
| 281 | + function del(Id){ | |
| 282 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 283 | + if(result) { | |
| 284 | + top.jzts(); | |
| 285 | + var url = "<%=basePath%>classroster/delete.do?CLASSROSTER_ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | + $.get(url,function(data){ | |
| 287 | + tosearch(); | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + | |
| 293 | + //修改 | |
| 294 | + function edit(Id){ | |
| 295 | + top.jzts(); | |
| 296 | + var diag = new top.Dialog(); | |
| 297 | + diag.Drag=true; | |
| 298 | + diag.Title ="编辑"; | |
| 299 | + diag.URL = '<%=basePath%>classroster/goEdit.do?CLASSROSTER_ID='+Id; | |
| 300 | + diag.Width = 450; | |
| 301 | + diag.Height = 355; | |
| 302 | + diag.Modal = true; //有无遮罩窗口 | |
| 303 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 304 | + diag.ShowMinButton = true; //最小化按钮 | |
| 305 | + diag.CancelEvent = function(){ //关闭事件 | |
| 306 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 307 | + tosearch(); | |
| 308 | + } | |
| 309 | + diag.close(); | |
| 310 | + }; | |
| 311 | + diag.show(); | |
| 312 | + } | |
| 313 | + | |
| 314 | + //批量操作 | |
| 315 | + function makeAll(msg){ | |
| 316 | + bootbox.confirm(msg, function(result) { | |
| 317 | + if(result) { | |
| 318 | + var str = ''; | |
| 319 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 320 | + if(document.getElementsByName('ids')[i].checked){ | |
| 321 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 322 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 323 | + } | |
| 324 | + } | |
| 325 | + if(str==''){ | |
| 326 | + bootbox.dialog({ | |
| 327 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 328 | + buttons: | |
| 329 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 330 | + }); | |
| 331 | + $("#zcheckbox").tips({ | |
| 332 | + side:1, | |
| 333 | + msg:'点这里全选', | |
| 334 | + bg:'#AE81FF', | |
| 335 | + time:8 | |
| 336 | + }); | |
| 337 | + return; | |
| 338 | + }else{ | |
| 339 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 340 | + top.jzts(); | |
| 341 | + $.ajax({ | |
| 342 | + type: "POST", | |
| 343 | + url: '<%=basePath%>classroster/deleteAll.do?tm='+new Date().getTime(), | |
| 344 | + data: {DATA_IDS:str}, | |
| 345 | + dataType:'json', | |
| 346 | + //beforeSend: validateData, | |
| 347 | + cache: false, | |
| 348 | + success: function(data){ | |
| 349 | + $.each(data.list, function(i, list){ | |
| 350 | + tosearch(); | |
| 351 | + }); | |
| 352 | + } | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + } | |
| 356 | + } | |
| 357 | + }); | |
| 358 | + }; | |
| 359 | + | |
| 360 | + //导出excel | |
| 361 | + function toExcel(){ | |
| 362 | + window.location.href='<%=basePath%>classroster/excel.do'; | |
| 363 | + } | |
| 364 | + </script> | |
| 365 | + | |
| 366 | + | |
| 367 | +</body> | |
| 368 | +</html> | |
| 0 | 369 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/keypadcheck/keypadcheck_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="keypadcheck/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="KEYPADCHECK_ID" id="KEYPADCHECK_ID" value="${pd.KEYPADCHECK_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;">键盘ID:</td> | |
| 36 | + <td><input type="text" name="KEYPAD_ID" id="KEYPAD_ID" value="${pd.KEYPAD_ID}" maxlength="255" placeholder="这里输入键盘ID" title="键盘ID" 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="BATTERY_INFO" id="BATTERY_INFO" value="${pd.BATTERY_INFO}" maxlength="255" placeholder="这里输入电量信息" title="电量信息" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">是否在线:</td> | |
| 44 | + <td><input type="number" name="ONLINE" id="ONLINE" value="${pd.ONLINE}" maxlength="32" placeholder="这里输入是否在线" title="是否在线" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="text-align: center;" colspan="10"> | |
| 48 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 49 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 50 | + </td> | |
| 51 | + </tr> | |
| 52 | + </table> | |
| 53 | + </div> | |
| 54 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 55 | + </form> | |
| 56 | + </div> | |
| 57 | + <!-- /.col --> | |
| 58 | + </div> | |
| 59 | + <!-- /.row --> | |
| 60 | + </div> | |
| 61 | + <!-- /.page-content --> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <!-- /.main-content --> | |
| 65 | +</div> | |
| 66 | +<!-- /.main-container --> | |
| 67 | + | |
| 68 | + | |
| 69 | + <!-- 页面底部js¨ --> | |
| 70 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 71 | + <!-- 下拉框 --> | |
| 72 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 73 | + <!-- 日期框 --> | |
| 74 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 75 | + <!--提示框--> | |
| 76 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 77 | + <script type="text/javascript"> | |
| 78 | + $(top.hangge()); | |
| 79 | + //保存 | |
| 80 | + function save(){ | |
| 81 | + if($("#KEYPAD_ID").val()==""){ | |
| 82 | + $("#KEYPAD_ID").tips({ | |
| 83 | + side:3, | |
| 84 | + msg:'请输入键盘ID', | |
| 85 | + bg:'#AE81FF', | |
| 86 | + time:2 | |
| 87 | + }); | |
| 88 | + $("#KEYPAD_ID").focus(); | |
| 89 | + return false; | |
| 90 | + } | |
| 91 | + if($("#BATTERY_INFO").val()==""){ | |
| 92 | + $("#BATTERY_INFO").tips({ | |
| 93 | + side:3, | |
| 94 | + msg:'请输入电量信息', | |
| 95 | + bg:'#AE81FF', | |
| 96 | + time:2 | |
| 97 | + }); | |
| 98 | + $("#BATTERY_INFO").focus(); | |
| 99 | + return false; | |
| 100 | + } | |
| 101 | + if($("#ONLINE").val()==""){ | |
| 102 | + $("#ONLINE").tips({ | |
| 103 | + side:3, | |
| 104 | + msg:'请输入是否在线', | |
| 105 | + bg:'#AE81FF', | |
| 106 | + time:2 | |
| 107 | + }); | |
| 108 | + $("#ONLINE").focus(); | |
| 109 | + return false; | |
| 110 | + } | |
| 111 | + $("#Form").submit(); | |
| 112 | + $("#zhongxin").hide(); | |
| 113 | + $("#zhongxin2").show(); | |
| 114 | + } | |
| 115 | + | |
| 116 | + $(function() { | |
| 117 | + //日期框 | |
| 118 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 119 | + }); | |
| 120 | + </script> | |
| 121 | +</body> | |
| 122 | +</html> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/keypadcheck/keypadcheck_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="keypadcheck/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">键盘ID</th> | |
| 70 | + <th class="center">创建时间</th> | |
| 71 | + <th class="center">电量信息</th> | |
| 72 | + <th class="center">是否在线</th> | |
| 73 | + <th class="center">操作</th> | |
| 74 | + </tr> | |
| 75 | + </thead> | |
| 76 | + | |
| 77 | + <tbody> | |
| 78 | + <!-- 开始循环 --> | |
| 79 | + <c:choose> | |
| 80 | + <c:when test="${not empty varList}"> | |
| 81 | + <c:if test="${QX.cha == 1 }"> | |
| 82 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 83 | + <tr> | |
| 84 | + <td class='center'> | |
| 85 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.KEYPADCHECK_ID}" class="ace" /><span class="lbl"></span></label> | |
| 86 | + </td> | |
| 87 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 88 | + <td class='center'>${var.KEYPAD_ID}</td> | |
| 89 | + <td class='center'>${var.CREATE_DATE}</td> | |
| 90 | + <td class='center'>${var.BATTERY_INFO}</td> | |
| 91 | + <td class='center'>${var.ONLINE}</td> | |
| 92 | + <td class="center"> | |
| 93 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 94 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 95 | + </c:if> | |
| 96 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 97 | + <c:if test="${QX.edit == 1 }"> | |
| 98 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.KEYPADCHECK_ID}');"> | |
| 99 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 100 | + </a> | |
| 101 | + </c:if> | |
| 102 | + <c:if test="${QX.del == 1 }"> | |
| 103 | + <a class="btn btn-xs btn-danger" onclick="del('${var.KEYPADCHECK_ID}');"> | |
| 104 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 105 | + </a> | |
| 106 | + </c:if> | |
| 107 | + </div> | |
| 108 | + <div class="hidden-md hidden-lg"> | |
| 109 | + <div class="inline pos-rel"> | |
| 110 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 111 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 112 | + </button> | |
| 113 | + | |
| 114 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 115 | + <c:if test="${QX.edit == 1 }"> | |
| 116 | + <li> | |
| 117 | + <a style="cursor:pointer;" onclick="edit('${var.KEYPADCHECK_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 118 | + <span class="green"> | |
| 119 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 120 | + </span> | |
| 121 | + </a> | |
| 122 | + </li> | |
| 123 | + </c:if> | |
| 124 | + <c:if test="${QX.del == 1 }"> | |
| 125 | + <li> | |
| 126 | + <a style="cursor:pointer;" onclick="del('${var.KEYPADCHECK_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 127 | + <span class="red"> | |
| 128 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 129 | + </span> | |
| 130 | + </a> | |
| 131 | + </li> | |
| 132 | + </c:if> | |
| 133 | + </ul> | |
| 134 | + </div> | |
| 135 | + </div> | |
| 136 | + </td> | |
| 137 | + </tr> | |
| 138 | + | |
| 139 | + </c:forEach> | |
| 140 | + </c:if> | |
| 141 | + <c:if test="${QX.cha == 0 }"> | |
| 142 | + <tr> | |
| 143 | + <td colspan="100" class="center">您无权查看</td> | |
| 144 | + </tr> | |
| 145 | + </c:if> | |
| 146 | + </c:when> | |
| 147 | + <c:otherwise> | |
| 148 | + <tr class="main_info"> | |
| 149 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 150 | + </tr> | |
| 151 | + </c:otherwise> | |
| 152 | + </c:choose> | |
| 153 | + </tbody> | |
| 154 | + </table> | |
| 155 | + <div class="page-header position-relative"> | |
| 156 | + <table style="width:100%;"> | |
| 157 | + <tr> | |
| 158 | + <td style="vertical-align:top;"> | |
| 159 | + <c:if test="${QX.add == 1 }"> | |
| 160 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 161 | + </c:if> | |
| 162 | + <c:if test="${QX.del == 1 }"> | |
| 163 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 164 | + </c:if> | |
| 165 | + </td> | |
| 166 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 167 | + </tr> | |
| 168 | + </table> | |
| 169 | + </div> | |
| 170 | + </form> | |
| 171 | + | |
| 172 | + </div> | |
| 173 | + <!-- /.col --> | |
| 174 | + </div> | |
| 175 | + <!-- /.row --> | |
| 176 | + </div> | |
| 177 | + <!-- /.page-content --> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + <!-- /.main-content --> | |
| 181 | + | |
| 182 | + <!-- 返回顶部 --> | |
| 183 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 184 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 185 | + </a> | |
| 186 | + | |
| 187 | + </div> | |
| 188 | + <!-- /.main-container --> | |
| 189 | + | |
| 190 | + <!-- basic scripts --> | |
| 191 | + <!-- 页面底部js¨ --> | |
| 192 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 193 | + <!-- 删除时确认窗口 --> | |
| 194 | + <script src="static/ace/js/bootbox.js"></script> | |
| 195 | + <!-- ace scripts --> | |
| 196 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 197 | + <!-- 下拉框 --> | |
| 198 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 199 | + <!-- 日期框 --> | |
| 200 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 201 | + <!--提示框--> | |
| 202 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 203 | + <script type="text/javascript"> | |
| 204 | + $(top.hangge());//关闭加载状态 | |
| 205 | + //检索 | |
| 206 | + function tosearch(){ | |
| 207 | + top.jzts(); | |
| 208 | + $("#Form").submit(); | |
| 209 | + } | |
| 210 | + $(function() { | |
| 211 | + | |
| 212 | + //日期框 | |
| 213 | + $('.date-picker').datepicker({ | |
| 214 | + autoclose: true, | |
| 215 | + todayHighlight: true | |
| 216 | + }); | |
| 217 | + | |
| 218 | + //下拉框 | |
| 219 | + if(!ace.vars['touch']) { | |
| 220 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 221 | + $(window) | |
| 222 | + .off('resize.chosen') | |
| 223 | + .on('resize.chosen', function() { | |
| 224 | + $('.chosen-select').each(function() { | |
| 225 | + var $this = $(this); | |
| 226 | + $this.next().css({'width': $this.parent().width()}); | |
| 227 | + }); | |
| 228 | + }).trigger('resize.chosen'); | |
| 229 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 230 | + if(event_name != 'sidebar_collapsed') return; | |
| 231 | + $('.chosen-select').each(function() { | |
| 232 | + var $this = $(this); | |
| 233 | + $this.next().css({'width': $this.parent().width()}); | |
| 234 | + }); | |
| 235 | + }); | |
| 236 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 237 | + var target = $(this).find('input[type=radio]'); | |
| 238 | + var which = parseInt(target.val()); | |
| 239 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 240 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 241 | + }); | |
| 242 | + } | |
| 243 | + | |
| 244 | + | |
| 245 | + //复选框全选控制 | |
| 246 | + var active_class = 'active'; | |
| 247 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 248 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 249 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 250 | + var row = this; | |
| 251 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 252 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 253 | + }); | |
| 254 | + }); | |
| 255 | + }); | |
| 256 | + | |
| 257 | + //新增 | |
| 258 | + function add(){ | |
| 259 | + top.jzts(); | |
| 260 | + var diag = new top.Dialog(); | |
| 261 | + diag.Drag=true; | |
| 262 | + diag.Title ="新增"; | |
| 263 | + diag.URL = '<%=basePath%>keypadcheck/goAdd.do'; | |
| 264 | + diag.Width = 450; | |
| 265 | + diag.Height = 355; | |
| 266 | + diag.Modal = true; //有无遮罩窗口 | |
| 267 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 268 | + diag.ShowMinButton = true; //最小化按钮 | |
| 269 | + diag.CancelEvent = function(){ //关闭事件 | |
| 270 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 271 | + if('${page.currentPage}' == '0'){ | |
| 272 | + tosearch(); | |
| 273 | + }else{ | |
| 274 | + tosearch(); | |
| 275 | + } | |
| 276 | + } | |
| 277 | + diag.close(); | |
| 278 | + }; | |
| 279 | + diag.show(); | |
| 280 | + } | |
| 281 | + | |
| 282 | + //删除 | |
| 283 | + function del(Id){ | |
| 284 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 285 | + if(result) { | |
| 286 | + top.jzts(); | |
| 287 | + var url = "<%=basePath%>keypadcheck/delete.do?KEYPADCHECK_ID="+Id+"&tm="+new Date().getTime(); | |
| 288 | + $.get(url,function(data){ | |
| 289 | + tosearch(); | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + }); | |
| 293 | + } | |
| 294 | + | |
| 295 | + //修改 | |
| 296 | + function edit(Id){ | |
| 297 | + top.jzts(); | |
| 298 | + var diag = new top.Dialog(); | |
| 299 | + diag.Drag=true; | |
| 300 | + diag.Title ="编辑"; | |
| 301 | + diag.URL = '<%=basePath%>keypadcheck/goEdit.do?KEYPADCHECK_ID='+Id; | |
| 302 | + diag.Width = 450; | |
| 303 | + diag.Height = 355; | |
| 304 | + diag.Modal = true; //有无遮罩窗口 | |
| 305 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 306 | + diag.ShowMinButton = true; //最小化按钮 | |
| 307 | + diag.CancelEvent = function(){ //关闭事件 | |
| 308 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 309 | + tosearch(); | |
| 310 | + } | |
| 311 | + diag.close(); | |
| 312 | + }; | |
| 313 | + diag.show(); | |
| 314 | + } | |
| 315 | + | |
| 316 | + //批量操作 | |
| 317 | + function makeAll(msg){ | |
| 318 | + bootbox.confirm(msg, function(result) { | |
| 319 | + if(result) { | |
| 320 | + var str = ''; | |
| 321 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 322 | + if(document.getElementsByName('ids')[i].checked){ | |
| 323 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 324 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 325 | + } | |
| 326 | + } | |
| 327 | + if(str==''){ | |
| 328 | + bootbox.dialog({ | |
| 329 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 330 | + buttons: | |
| 331 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 332 | + }); | |
| 333 | + $("#zcheckbox").tips({ | |
| 334 | + side:1, | |
| 335 | + msg:'点这里全选', | |
| 336 | + bg:'#AE81FF', | |
| 337 | + time:8 | |
| 338 | + }); | |
| 339 | + return; | |
| 340 | + }else{ | |
| 341 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 342 | + top.jzts(); | |
| 343 | + $.ajax({ | |
| 344 | + type: "POST", | |
| 345 | + url: '<%=basePath%>keypadcheck/deleteAll.do?tm='+new Date().getTime(), | |
| 346 | + data: {DATA_IDS:str}, | |
| 347 | + dataType:'json', | |
| 348 | + //beforeSend: validateData, | |
| 349 | + cache: false, | |
| 350 | + success: function(data){ | |
| 351 | + $.each(data.list, function(i, list){ | |
| 352 | + tosearch(); | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + }); | |
| 356 | + } | |
| 357 | + } | |
| 358 | + } | |
| 359 | + }); | |
| 360 | + }; | |
| 361 | + | |
| 362 | + //导出excel | |
| 363 | + function toExcel(){ | |
| 364 | + window.location.href='<%=basePath%>keypadcheck/excel.do'; | |
| 365 | + } | |
| 366 | + </script> | |
| 367 | + | |
| 368 | + | |
| 369 | +</body> | |
| 370 | +</html> | |
| 0 | 371 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/knowledge/knowledge_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="knowledge/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="KNOWLEDGE_ID" id="KNOWLEDGE_ID" value="${pd.KNOWLEDGE_ID}"/> | |
| 32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
| 33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
| 34 | + <tr> | |
| 35 | + <td style="width:75px;text-align: right;padding-top: 13px;">知识点名称:</td> | |
| 36 | + <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入知识点名称" title="知识点名称" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">父知识点:</td> | |
| 40 | + <td><input type="text" name="P_ID" id="P_ID" value="${pd.P_ID}" maxlength="255" placeholder="这里输入父知识点" title="父知识点" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">排序:</td> | |
| 44 | + <td><input type="number" name="RANK" id="RANK" value="${pd.RANK}" maxlength="32" placeholder="这里输入排序" title="排序" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">编码:</td> | |
| 48 | + <td><input type="text" name="CODE" id="CODE" value="${pd.CODE}" maxlength="255" placeholder="这里输入编码" title="编码" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">知识点备注:</td> | |
| 52 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入知识点备注" title="知识点备注" style="width:98%;"/></td> | |
| 53 | + </tr> | |
| 54 | + <tr> | |
| 55 | + <td style="text-align: center;" colspan="10"> | |
| 56 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 57 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 58 | + </td> | |
| 59 | + </tr> | |
| 60 | + </table> | |
| 61 | + </div> | |
| 62 | + <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> | |
| 63 | + </form> | |
| 64 | + </div> | |
| 65 | + <!-- /.col --> | |
| 66 | + </div> | |
| 67 | + <!-- /.row --> | |
| 68 | + </div> | |
| 69 | + <!-- /.page-content --> | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + <!-- /.main-content --> | |
| 73 | +</div> | |
| 74 | +<!-- /.main-container --> | |
| 75 | + | |
| 76 | + | |
| 77 | + <!-- 页面底部js¨ --> | |
| 78 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 79 | + <!-- 下拉框 --> | |
| 80 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 81 | + <!-- 日期框 --> | |
| 82 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 83 | + <!--提示框--> | |
| 84 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 85 | + <script type="text/javascript"> | |
| 86 | + $(top.hangge()); | |
| 87 | + //保存 | |
| 88 | + function save(){ | |
| 89 | + if($("#NAME").val()==""){ | |
| 90 | + $("#NAME").tips({ | |
| 91 | + side:3, | |
| 92 | + msg:'请输入知识点名称', | |
| 93 | + bg:'#AE81FF', | |
| 94 | + time:2 | |
| 95 | + }); | |
| 96 | + $("#NAME").focus(); | |
| 97 | + return false; | |
| 98 | + } | |
| 99 | + if($("#P_ID").val()==""){ | |
| 100 | + $("#P_ID").tips({ | |
| 101 | + side:3, | |
| 102 | + msg:'请输入父知识点', | |
| 103 | + bg:'#AE81FF', | |
| 104 | + time:2 | |
| 105 | + }); | |
| 106 | + $("#P_ID").focus(); | |
| 107 | + return false; | |
| 108 | + } | |
| 109 | + if($("#RANK").val()==""){ | |
| 110 | + $("#RANK").tips({ | |
| 111 | + side:3, | |
| 112 | + msg:'请输入排序', | |
| 113 | + bg:'#AE81FF', | |
| 114 | + time:2 | |
| 115 | + }); | |
| 116 | + $("#RANK").focus(); | |
| 117 | + return false; | |
| 118 | + } | |
| 119 | + if($("#CODE").val()==""){ | |
| 120 | + $("#CODE").tips({ | |
| 121 | + side:3, | |
| 122 | + msg:'请输入编码', | |
| 123 | + bg:'#AE81FF', | |
| 124 | + time:2 | |
| 125 | + }); | |
| 126 | + $("#CODE").focus(); | |
| 127 | + return false; | |
| 128 | + } | |
| 129 | + if($("#REMARK").val()==""){ | |
| 130 | + $("#REMARK").tips({ | |
| 131 | + side:3, | |
| 132 | + msg:'请输入知识点备注', | |
| 133 | + bg:'#AE81FF', | |
| 134 | + time:2 | |
| 135 | + }); | |
| 136 | + $("#REMARK").focus(); | |
| 137 | + return false; | |
| 138 | + } | |
| 139 | + $("#Form").submit(); | |
| 140 | + $("#zhongxin").hide(); | |
| 141 | + $("#zhongxin2").show(); | |
| 142 | + } | |
| 143 | + | |
| 144 | + $(function() { | |
| 145 | + //日期框 | |
| 146 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 147 | + }); | |
| 148 | + </script> | |
| 149 | +</body> | |
| 150 | +</html> | |
| 0 | 151 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/knowledge/knowledge_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="knowledge/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 | + </tr> | |
| 76 | + </thead> | |
| 77 | + | |
| 78 | + <tbody> | |
| 79 | + <!-- 开始循环 --> | |
| 80 | + <c:choose> | |
| 81 | + <c:when test="${not empty varList}"> | |
| 82 | + <c:if test="${QX.cha == 1 }"> | |
| 83 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 84 | + <tr> | |
| 85 | + <td class='center'> | |
| 86 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.KNOWLEDGE_ID}" class="ace" /><span class="lbl"></span></label> | |
| 87 | + </td> | |
| 88 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 89 | + <td class='center'>${var.NAME}</td> | |
| 90 | + <td class='center'>${var.P_ID}</td> | |
| 91 | + <td class='center'>${var.RANK}</td> | |
| 92 | + <td class='center'>${var.CODE}</td> | |
| 93 | + <td class='center'>${var.REMARK}</td> | |
| 94 | + <td class="center"> | |
| 95 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 96 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 97 | + </c:if> | |
| 98 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 99 | + <c:if test="${QX.edit == 1 }"> | |
| 100 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.KNOWLEDGE_ID}');"> | |
| 101 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 102 | + </a> | |
| 103 | + </c:if> | |
| 104 | + <c:if test="${QX.del == 1 }"> | |
| 105 | + <a class="btn btn-xs btn-danger" onclick="del('${var.KNOWLEDGE_ID}');"> | |
| 106 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 107 | + </a> | |
| 108 | + </c:if> | |
| 109 | + </div> | |
| 110 | + <div class="hidden-md hidden-lg"> | |
| 111 | + <div class="inline pos-rel"> | |
| 112 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 113 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 114 | + </button> | |
| 115 | + | |
| 116 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 117 | + <c:if test="${QX.edit == 1 }"> | |
| 118 | + <li> | |
| 119 | + <a style="cursor:pointer;" onclick="edit('${var.KNOWLEDGE_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 120 | + <span class="green"> | |
| 121 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 122 | + </span> | |
| 123 | + </a> | |
| 124 | + </li> | |
| 125 | + </c:if> | |
| 126 | + <c:if test="${QX.del == 1 }"> | |
| 127 | + <li> | |
| 128 | + <a style="cursor:pointer;" onclick="del('${var.KNOWLEDGE_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 129 | + <span class="red"> | |
| 130 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 131 | + </span> | |
| 132 | + </a> | |
| 133 | + </li> | |
| 134 | + </c:if> | |
| 135 | + </ul> | |
| 136 | + </div> | |
| 137 | + </div> | |
| 138 | + </td> | |
| 139 | + </tr> | |
| 140 | + | |
| 141 | + </c:forEach> | |
| 142 | + </c:if> | |
| 143 | + <c:if test="${QX.cha == 0 }"> | |
| 144 | + <tr> | |
| 145 | + <td colspan="100" class="center">您无权查看</td> | |
| 146 | + </tr> | |
| 147 | + </c:if> | |
| 148 | + </c:when> | |
| 149 | + <c:otherwise> | |
| 150 | + <tr class="main_info"> | |
| 151 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 152 | + </tr> | |
| 153 | + </c:otherwise> | |
| 154 | + </c:choose> | |
| 155 | + </tbody> | |
| 156 | + </table> | |
| 157 | + <div class="page-header position-relative"> | |
| 158 | + <table style="width:100%;"> | |
| 159 | + <tr> | |
| 160 | + <td style="vertical-align:top;"> | |
| 161 | + <c:if test="${QX.add == 1 }"> | |
| 162 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 163 | + </c:if> | |
| 164 | + <c:if test="${QX.del == 1 }"> | |
| 165 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 166 | + </c:if> | |
| 167 | + </td> | |
| 168 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 169 | + </tr> | |
| 170 | + </table> | |
| 171 | + </div> | |
| 172 | + </form> | |
| 173 | + | |
| 174 | + </div> | |
| 175 | + <!-- /.col --> | |
| 176 | + </div> | |
| 177 | + <!-- /.row --> | |
| 178 | + </div> | |
| 179 | + <!-- /.page-content --> | |
| 180 | + </div> | |
| 181 | + </div> | |
| 182 | + <!-- /.main-content --> | |
| 183 | + | |
| 184 | + <!-- 返回顶部 --> | |
| 185 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 186 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 187 | + </a> | |
| 188 | + | |
| 189 | + </div> | |
| 190 | + <!-- /.main-container --> | |
| 191 | + | |
| 192 | + <!-- basic scripts --> | |
| 193 | + <!-- 页面底部js¨ --> | |
| 194 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 195 | + <!-- 删除时确认窗口 --> | |
| 196 | + <script src="static/ace/js/bootbox.js"></script> | |
| 197 | + <!-- ace scripts --> | |
| 198 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 199 | + <!-- 下拉框 --> | |
| 200 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 201 | + <!-- 日期框 --> | |
| 202 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 203 | + <!--提示框--> | |
| 204 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 205 | + <script type="text/javascript"> | |
| 206 | + $(top.hangge());//关闭加载状态 | |
| 207 | + //检索 | |
| 208 | + function tosearch(){ | |
| 209 | + top.jzts(); | |
| 210 | + $("#Form").submit(); | |
| 211 | + } | |
| 212 | + $(function() { | |
| 213 | + | |
| 214 | + //日期框 | |
| 215 | + $('.date-picker').datepicker({ | |
| 216 | + autoclose: true, | |
| 217 | + todayHighlight: true | |
| 218 | + }); | |
| 219 | + | |
| 220 | + //下拉框 | |
| 221 | + if(!ace.vars['touch']) { | |
| 222 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 223 | + $(window) | |
| 224 | + .off('resize.chosen') | |
| 225 | + .on('resize.chosen', function() { | |
| 226 | + $('.chosen-select').each(function() { | |
| 227 | + var $this = $(this); | |
| 228 | + $this.next().css({'width': $this.parent().width()}); | |
| 229 | + }); | |
| 230 | + }).trigger('resize.chosen'); | |
| 231 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 232 | + if(event_name != 'sidebar_collapsed') return; | |
| 233 | + $('.chosen-select').each(function() { | |
| 234 | + var $this = $(this); | |
| 235 | + $this.next().css({'width': $this.parent().width()}); | |
| 236 | + }); | |
| 237 | + }); | |
| 238 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 239 | + var target = $(this).find('input[type=radio]'); | |
| 240 | + var which = parseInt(target.val()); | |
| 241 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 242 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 243 | + }); | |
| 244 | + } | |
| 245 | + | |
| 246 | + | |
| 247 | + //复选框全选控制 | |
| 248 | + var active_class = 'active'; | |
| 249 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 250 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 251 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 252 | + var row = this; | |
| 253 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 254 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 255 | + }); | |
| 256 | + }); | |
| 257 | + }); | |
| 258 | + | |
| 259 | + //新增 | |
| 260 | + function add(){ | |
| 261 | + top.jzts(); | |
| 262 | + var diag = new top.Dialog(); | |
| 263 | + diag.Drag=true; | |
| 264 | + diag.Title ="新增"; | |
| 265 | + diag.URL = '<%=basePath%>knowledge/goAdd.do'; | |
| 266 | + diag.Width = 450; | |
| 267 | + diag.Height = 355; | |
| 268 | + diag.Modal = true; //有无遮罩窗口 | |
| 269 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 270 | + diag.ShowMinButton = true; //最小化按钮 | |
| 271 | + diag.CancelEvent = function(){ //关闭事件 | |
| 272 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 273 | + if('${page.currentPage}' == '0'){ | |
| 274 | + tosearch(); | |
| 275 | + }else{ | |
| 276 | + tosearch(); | |
| 277 | + } | |
| 278 | + } | |
| 279 | + diag.close(); | |
| 280 | + }; | |
| 281 | + diag.show(); | |
| 282 | + } | |
| 283 | + | |
| 284 | + //删除 | |
| 285 | + function del(Id){ | |
| 286 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 287 | + if(result) { | |
| 288 | + top.jzts(); | |
| 289 | + var url = "<%=basePath%>knowledge/delete.do?KNOWLEDGE_ID="+Id+"&tm="+new Date().getTime(); | |
| 290 | + $.get(url,function(data){ | |
| 291 | + tosearch(); | |
| 292 | + }); | |
| 293 | + } | |
| 294 | + }); | |
| 295 | + } | |
| 296 | + | |
| 297 | + //修改 | |
| 298 | + function edit(Id){ | |
| 299 | + top.jzts(); | |
| 300 | + var diag = new top.Dialog(); | |
| 301 | + diag.Drag=true; | |
| 302 | + diag.Title ="编辑"; | |
| 303 | + diag.URL = '<%=basePath%>knowledge/goEdit.do?KNOWLEDGE_ID='+Id; | |
| 304 | + diag.Width = 450; | |
| 305 | + diag.Height = 355; | |
| 306 | + diag.Modal = true; //有无遮罩窗口 | |
| 307 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 308 | + diag.ShowMinButton = true; //最小化按钮 | |
| 309 | + diag.CancelEvent = function(){ //关闭事件 | |
| 310 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 311 | + tosearch(); | |
| 312 | + } | |
| 313 | + diag.close(); | |
| 314 | + }; | |
| 315 | + diag.show(); | |
| 316 | + } | |
| 317 | + | |
| 318 | + //批量操作 | |
| 319 | + function makeAll(msg){ | |
| 320 | + bootbox.confirm(msg, function(result) { | |
| 321 | + if(result) { | |
| 322 | + var str = ''; | |
| 323 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 324 | + if(document.getElementsByName('ids')[i].checked){ | |
| 325 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 326 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 327 | + } | |
| 328 | + } | |
| 329 | + if(str==''){ | |
| 330 | + bootbox.dialog({ | |
| 331 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 332 | + buttons: | |
| 333 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 334 | + }); | |
| 335 | + $("#zcheckbox").tips({ | |
| 336 | + side:1, | |
| 337 | + msg:'点这里全选', | |
| 338 | + bg:'#AE81FF', | |
| 339 | + time:8 | |
| 340 | + }); | |
| 341 | + return; | |
| 342 | + }else{ | |
| 343 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 344 | + top.jzts(); | |
| 345 | + $.ajax({ | |
| 346 | + type: "POST", | |
| 347 | + url: '<%=basePath%>knowledge/deleteAll.do?tm='+new Date().getTime(), | |
| 348 | + data: {DATA_IDS:str}, | |
| 349 | + dataType:'json', | |
| 350 | + //beforeSend: validateData, | |
| 351 | + cache: false, | |
| 352 | + success: function(data){ | |
| 353 | + $.each(data.list, function(i, list){ | |
| 354 | + tosearch(); | |
| 355 | + }); | |
| 356 | + } | |
| 357 | + }); | |
| 358 | + } | |
| 359 | + } | |
| 360 | + } | |
| 361 | + }); | |
| 362 | + }; | |
| 363 | + | |
| 364 | + //导出excel | |
| 365 | + function toExcel(){ | |
| 366 | + window.location.href='<%=basePath%>knowledge/excel.do'; | |
| 367 | + } | |
| 368 | + </script> | |
| 369 | + | |
| 370 | + | |
| 371 | +</body> | |
| 372 | +</html> | |
| 0 | 373 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/knowledgechapter/knowledgechapter_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="knowledgechapter/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="KNOWLEDGECHAPTER_ID" id="KNOWLEDGECHAPTER_ID" value="${pd.KNOWLEDGECHAPTER_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="KNOWLEDGE_ID" id="KNOWLEDGE_ID" value="${pd.KNOWLEDGE_ID}" maxlength="255" placeholder="这里输入知识点" title="知识点" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">章节:</td> | |
| 40 | + <td><input type="text" name="CHAPTER_ID" id="CHAPTER_ID" value="${pd.CHAPTER_ID}" maxlength="255" placeholder="这里输入章节" title="章节" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="text-align: center;" colspan="10"> | |
| 44 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 45 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 46 | + </td> | |
| 47 | + </tr> | |
| 48 | + </table> | |
| 49 | + </div> | |
| 50 | + <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> | |
| 51 | + </form> | |
| 52 | + </div> | |
| 53 | + <!-- /.col --> | |
| 54 | + </div> | |
| 55 | + <!-- /.row --> | |
| 56 | + </div> | |
| 57 | + <!-- /.page-content --> | |
| 58 | + </div> | |
| 59 | + </div> | |
| 60 | + <!-- /.main-content --> | |
| 61 | +</div> | |
| 62 | +<!-- /.main-container --> | |
| 63 | + | |
| 64 | + | |
| 65 | + <!-- 页面底部js¨ --> | |
| 66 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 67 | + <!-- 下拉框 --> | |
| 68 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 69 | + <!-- 日期框 --> | |
| 70 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 71 | + <!--提示框--> | |
| 72 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 73 | + <script type="text/javascript"> | |
| 74 | + $(top.hangge()); | |
| 75 | + //保存 | |
| 76 | + function save(){ | |
| 77 | + if($("#KNOWLEDGE_ID").val()==""){ | |
| 78 | + $("#KNOWLEDGE_ID").tips({ | |
| 79 | + side:3, | |
| 80 | + msg:'请输入知识点', | |
| 81 | + bg:'#AE81FF', | |
| 82 | + time:2 | |
| 83 | + }); | |
| 84 | + $("#KNOWLEDGE_ID").focus(); | |
| 85 | + return false; | |
| 86 | + } | |
| 87 | + if($("#CHAPTER_ID").val()==""){ | |
| 88 | + $("#CHAPTER_ID").tips({ | |
| 89 | + side:3, | |
| 90 | + msg:'请输入章节', | |
| 91 | + bg:'#AE81FF', | |
| 92 | + time:2 | |
| 93 | + }); | |
| 94 | + $("#CHAPTER_ID").focus(); | |
| 95 | + return false; | |
| 96 | + } | |
| 97 | + $("#Form").submit(); | |
| 98 | + $("#zhongxin").hide(); | |
| 99 | + $("#zhongxin2").show(); | |
| 100 | + } | |
| 101 | + | |
| 102 | + $(function() { | |
| 103 | + //日期框 | |
| 104 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 105 | + }); | |
| 106 | + </script> | |
| 107 | +</body> | |
| 108 | +</html> | |
| 0 | 109 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/knowledgechapter/knowledgechapter_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="knowledgechapter/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 | + </tr> | |
| 73 | + </thead> | |
| 74 | + | |
| 75 | + <tbody> | |
| 76 | + <!-- 开始循环 --> | |
| 77 | + <c:choose> | |
| 78 | + <c:when test="${not empty varList}"> | |
| 79 | + <c:if test="${QX.cha == 1 }"> | |
| 80 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 81 | + <tr> | |
| 82 | + <td class='center'> | |
| 83 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.KNOWLEDGECHAPTER_ID}" class="ace" /><span class="lbl"></span></label> | |
| 84 | + </td> | |
| 85 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 86 | + <td class='center'>${var.KNOWLEDGE_ID}</td> | |
| 87 | + <td class='center'>${var.CHAPTER_ID}</td> | |
| 88 | + <td class="center"> | |
| 89 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 90 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 91 | + </c:if> | |
| 92 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 93 | + <c:if test="${QX.edit == 1 }"> | |
| 94 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.KNOWLEDGECHAPTER_ID}');"> | |
| 95 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 96 | + </a> | |
| 97 | + </c:if> | |
| 98 | + <c:if test="${QX.del == 1 }"> | |
| 99 | + <a class="btn btn-xs btn-danger" onclick="del('${var.KNOWLEDGECHAPTER_ID}');"> | |
| 100 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 101 | + </a> | |
| 102 | + </c:if> | |
| 103 | + </div> | |
| 104 | + <div class="hidden-md hidden-lg"> | |
| 105 | + <div class="inline pos-rel"> | |
| 106 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 107 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 108 | + </button> | |
| 109 | + | |
| 110 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 111 | + <c:if test="${QX.edit == 1 }"> | |
| 112 | + <li> | |
| 113 | + <a style="cursor:pointer;" onclick="edit('${var.KNOWLEDGECHAPTER_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 114 | + <span class="green"> | |
| 115 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 116 | + </span> | |
| 117 | + </a> | |
| 118 | + </li> | |
| 119 | + </c:if> | |
| 120 | + <c:if test="${QX.del == 1 }"> | |
| 121 | + <li> | |
| 122 | + <a style="cursor:pointer;" onclick="del('${var.KNOWLEDGECHAPTER_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 123 | + <span class="red"> | |
| 124 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 125 | + </span> | |
| 126 | + </a> | |
| 127 | + </li> | |
| 128 | + </c:if> | |
| 129 | + </ul> | |
| 130 | + </div> | |
| 131 | + </div> | |
| 132 | + </td> | |
| 133 | + </tr> | |
| 134 | + | |
| 135 | + </c:forEach> | |
| 136 | + </c:if> | |
| 137 | + <c:if test="${QX.cha == 0 }"> | |
| 138 | + <tr> | |
| 139 | + <td colspan="100" class="center">您无权查看</td> | |
| 140 | + </tr> | |
| 141 | + </c:if> | |
| 142 | + </c:when> | |
| 143 | + <c:otherwise> | |
| 144 | + <tr class="main_info"> | |
| 145 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 146 | + </tr> | |
| 147 | + </c:otherwise> | |
| 148 | + </c:choose> | |
| 149 | + </tbody> | |
| 150 | + </table> | |
| 151 | + <div class="page-header position-relative"> | |
| 152 | + <table style="width:100%;"> | |
| 153 | + <tr> | |
| 154 | + <td style="vertical-align:top;"> | |
| 155 | + <c:if test="${QX.add == 1 }"> | |
| 156 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 157 | + </c:if> | |
| 158 | + <c:if test="${QX.del == 1 }"> | |
| 159 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 160 | + </c:if> | |
| 161 | + </td> | |
| 162 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 163 | + </tr> | |
| 164 | + </table> | |
| 165 | + </div> | |
| 166 | + </form> | |
| 167 | + | |
| 168 | + </div> | |
| 169 | + <!-- /.col --> | |
| 170 | + </div> | |
| 171 | + <!-- /.row --> | |
| 172 | + </div> | |
| 173 | + <!-- /.page-content --> | |
| 174 | + </div> | |
| 175 | + </div> | |
| 176 | + <!-- /.main-content --> | |
| 177 | + | |
| 178 | + <!-- 返回顶部 --> | |
| 179 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 180 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 181 | + </a> | |
| 182 | + | |
| 183 | + </div> | |
| 184 | + <!-- /.main-container --> | |
| 185 | + | |
| 186 | + <!-- basic scripts --> | |
| 187 | + <!-- 页面底部js¨ --> | |
| 188 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 189 | + <!-- 删除时确认窗口 --> | |
| 190 | + <script src="static/ace/js/bootbox.js"></script> | |
| 191 | + <!-- ace scripts --> | |
| 192 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 193 | + <!-- 下拉框 --> | |
| 194 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 195 | + <!-- 日期框 --> | |
| 196 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 197 | + <!--提示框--> | |
| 198 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 199 | + <script type="text/javascript"> | |
| 200 | + $(top.hangge());//关闭加载状态 | |
| 201 | + //检索 | |
| 202 | + function tosearch(){ | |
| 203 | + top.jzts(); | |
| 204 | + $("#Form").submit(); | |
| 205 | + } | |
| 206 | + $(function() { | |
| 207 | + | |
| 208 | + //日期框 | |
| 209 | + $('.date-picker').datepicker({ | |
| 210 | + autoclose: true, | |
| 211 | + todayHighlight: true | |
| 212 | + }); | |
| 213 | + | |
| 214 | + //下拉框 | |
| 215 | + if(!ace.vars['touch']) { | |
| 216 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 217 | + $(window) | |
| 218 | + .off('resize.chosen') | |
| 219 | + .on('resize.chosen', function() { | |
| 220 | + $('.chosen-select').each(function() { | |
| 221 | + var $this = $(this); | |
| 222 | + $this.next().css({'width': $this.parent().width()}); | |
| 223 | + }); | |
| 224 | + }).trigger('resize.chosen'); | |
| 225 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 226 | + if(event_name != 'sidebar_collapsed') return; | |
| 227 | + $('.chosen-select').each(function() { | |
| 228 | + var $this = $(this); | |
| 229 | + $this.next().css({'width': $this.parent().width()}); | |
| 230 | + }); | |
| 231 | + }); | |
| 232 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 233 | + var target = $(this).find('input[type=radio]'); | |
| 234 | + var which = parseInt(target.val()); | |
| 235 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 236 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 237 | + }); | |
| 238 | + } | |
| 239 | + | |
| 240 | + | |
| 241 | + //复选框全选控制 | |
| 242 | + var active_class = 'active'; | |
| 243 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 244 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 245 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 246 | + var row = this; | |
| 247 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 248 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 249 | + }); | |
| 250 | + }); | |
| 251 | + }); | |
| 252 | + | |
| 253 | + //新增 | |
| 254 | + function add(){ | |
| 255 | + top.jzts(); | |
| 256 | + var diag = new top.Dialog(); | |
| 257 | + diag.Drag=true; | |
| 258 | + diag.Title ="新增"; | |
| 259 | + diag.URL = '<%=basePath%>knowledgechapter/goAdd.do'; | |
| 260 | + diag.Width = 450; | |
| 261 | + diag.Height = 355; | |
| 262 | + diag.Modal = true; //有无遮罩窗口 | |
| 263 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 264 | + diag.ShowMinButton = true; //最小化按钮 | |
| 265 | + diag.CancelEvent = function(){ //关闭事件 | |
| 266 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 267 | + if('${page.currentPage}' == '0'){ | |
| 268 | + tosearch(); | |
| 269 | + }else{ | |
| 270 | + tosearch(); | |
| 271 | + } | |
| 272 | + } | |
| 273 | + diag.close(); | |
| 274 | + }; | |
| 275 | + diag.show(); | |
| 276 | + } | |
| 277 | + | |
| 278 | + //删除 | |
| 279 | + function del(Id){ | |
| 280 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 281 | + if(result) { | |
| 282 | + top.jzts(); | |
| 283 | + var url = "<%=basePath%>knowledgechapter/delete.do?KNOWLEDGECHAPTER_ID="+Id+"&tm="+new Date().getTime(); | |
| 284 | + $.get(url,function(data){ | |
| 285 | + tosearch(); | |
| 286 | + }); | |
| 287 | + } | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + | |
| 291 | + //修改 | |
| 292 | + function edit(Id){ | |
| 293 | + top.jzts(); | |
| 294 | + var diag = new top.Dialog(); | |
| 295 | + diag.Drag=true; | |
| 296 | + diag.Title ="编辑"; | |
| 297 | + diag.URL = '<%=basePath%>knowledgechapter/goEdit.do?KNOWLEDGECHAPTER_ID='+Id; | |
| 298 | + diag.Width = 450; | |
| 299 | + diag.Height = 355; | |
| 300 | + diag.Modal = true; //有无遮罩窗口 | |
| 301 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 302 | + diag.ShowMinButton = true; //最小化按钮 | |
| 303 | + diag.CancelEvent = function(){ //关闭事件 | |
| 304 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 305 | + tosearch(); | |
| 306 | + } | |
| 307 | + diag.close(); | |
| 308 | + }; | |
| 309 | + diag.show(); | |
| 310 | + } | |
| 311 | + | |
| 312 | + //批量操作 | |
| 313 | + function makeAll(msg){ | |
| 314 | + bootbox.confirm(msg, function(result) { | |
| 315 | + if(result) { | |
| 316 | + var str = ''; | |
| 317 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 318 | + if(document.getElementsByName('ids')[i].checked){ | |
| 319 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 320 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 321 | + } | |
| 322 | + } | |
| 323 | + if(str==''){ | |
| 324 | + bootbox.dialog({ | |
| 325 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 326 | + buttons: | |
| 327 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 328 | + }); | |
| 329 | + $("#zcheckbox").tips({ | |
| 330 | + side:1, | |
| 331 | + msg:'点这里全选', | |
| 332 | + bg:'#AE81FF', | |
| 333 | + time:8 | |
| 334 | + }); | |
| 335 | + return; | |
| 336 | + }else{ | |
| 337 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 338 | + top.jzts(); | |
| 339 | + $.ajax({ | |
| 340 | + type: "POST", | |
| 341 | + url: '<%=basePath%>knowledgechapter/deleteAll.do?tm='+new Date().getTime(), | |
| 342 | + data: {DATA_IDS:str}, | |
| 343 | + dataType:'json', | |
| 344 | + //beforeSend: validateData, | |
| 345 | + cache: false, | |
| 346 | + success: function(data){ | |
| 347 | + $.each(data.list, function(i, list){ | |
| 348 | + tosearch(); | |
| 349 | + }); | |
| 350 | + } | |
| 351 | + }); | |
| 352 | + } | |
| 353 | + } | |
| 354 | + } | |
| 355 | + }); | |
| 356 | + }; | |
| 357 | + | |
| 358 | + //导出excel | |
| 359 | + function toExcel(){ | |
| 360 | + window.location.href='<%=basePath%>knowledgechapter/excel.do'; | |
| 361 | + } | |
| 362 | + </script> | |
| 363 | + | |
| 364 | + | |
| 365 | +</body> | |
| 366 | +</html> | |
| 0 | 367 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/paper/paper_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="paper/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="PAPER_ID" id="PAPER_ID" value="${pd.PAPER_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="TITLE" id="TITLE" value="${pd.TITLE}" maxlength="255" placeholder="这里输入试卷标题" title="试卷标题" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">出卷老师:</td> | |
| 40 | + <td><input type="text" name="USER_ID" id="USER_ID" value="${pd.USER_ID}" maxlength="255" placeholder="这里输入出卷老师" title="出卷老师" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">试卷类型:</td> | |
| 44 | + <td><input type="text" name="PAPER_TYPE" id="PAPER_TYPE" value="${pd.PAPER_TYPE}" maxlength="255" placeholder="这里输入试卷类型" title="试卷类型" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">科目:</td> | |
| 48 | + <td><input type="text" name="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="255" placeholder="这里输入科目" title="科目" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">年级:</td> | |
| 52 | + <td><input type="text" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" 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="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="255" placeholder="这里输入学校" title="学校" style="width:98%;"/></td> | |
| 57 | + </tr> | |
| 58 | + <tr> | |
| 59 | + <td style="width:75px;text-align: right;padding-top: 13px;">创建时间:</td> | |
| 60 | + <td><input type="text" name="CREATE_DATE" id="CREATE_DATE" value="${pd.CREATE_DATE}" maxlength="255" placeholder="这里输入创建时间" title="创建时间" style="width:98%;"/></td> | |
| 61 | + </tr> | |
| 62 | + <tr> | |
| 63 | + <td style="width:75px;text-align: right;padding-top: 13px;">修改时间:</td> | |
| 64 | + <td><input type="text" name="MODIFY_DATE" id="MODIFY_DATE" value="${pd.MODIFY_DATE}" maxlength="255" 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="EXAM_TIME" id="EXAM_TIME" value="${pd.EXAM_TIME}" maxlength="255" placeholder="这里输入建议考试时长" title="建议考试时长" style="width:98%;"/></td> | |
| 69 | + </tr> | |
| 70 | + <tr> | |
| 71 | + <td style="width:75px;text-align: right;padding-top: 13px;">试卷状态:</td> | |
| 72 | + <td><input type="text" name="PAPER_STATE" id="PAPER_STATE" value="${pd.PAPER_STATE}" maxlength="255" 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($("#TITLE").val()==""){ | |
| 114 | + $("#TITLE").tips({ | |
| 115 | + side:3, | |
| 116 | + msg:'请输入试卷标题', | |
| 117 | + bg:'#AE81FF', | |
| 118 | + time:2 | |
| 119 | + }); | |
| 120 | + $("#TITLE").focus(); | |
| 121 | + return false; | |
| 122 | + } | |
| 123 | + if($("#USER_ID").val()==""){ | |
| 124 | + $("#USER_ID").tips({ | |
| 125 | + side:3, | |
| 126 | + msg:'请输入出卷老师', | |
| 127 | + bg:'#AE81FF', | |
| 128 | + time:2 | |
| 129 | + }); | |
| 130 | + $("#USER_ID").focus(); | |
| 131 | + return false; | |
| 132 | + } | |
| 133 | + if($("#PAPER_TYPE").val()==""){ | |
| 134 | + $("#PAPER_TYPE").tips({ | |
| 135 | + side:3, | |
| 136 | + msg:'请输入试卷类型', | |
| 137 | + bg:'#AE81FF', | |
| 138 | + time:2 | |
| 139 | + }); | |
| 140 | + $("#PAPER_TYPE").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($("#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($("#CREATE_DATE").val()==""){ | |
| 174 | + $("#CREATE_DATE").tips({ | |
| 175 | + side:3, | |
| 176 | + msg:'请输入创建时间', | |
| 177 | + bg:'#AE81FF', | |
| 178 | + time:2 | |
| 179 | + }); | |
| 180 | + $("#CREATE_DATE").focus(); | |
| 181 | + return false; | |
| 182 | + } | |
| 183 | + if($("#MODIFY_DATE").val()==""){ | |
| 184 | + $("#MODIFY_DATE").tips({ | |
| 185 | + side:3, | |
| 186 | + msg:'请输入修改时间', | |
| 187 | + bg:'#AE81FF', | |
| 188 | + time:2 | |
| 189 | + }); | |
| 190 | + $("#MODIFY_DATE").focus(); | |
| 191 | + return false; | |
| 192 | + } | |
| 193 | + if($("#EXAM_TIME").val()==""){ | |
| 194 | + $("#EXAM_TIME").tips({ | |
| 195 | + side:3, | |
| 196 | + msg:'请输入建议考试时长', | |
| 197 | + bg:'#AE81FF', | |
| 198 | + time:2 | |
| 199 | + }); | |
| 200 | + $("#EXAM_TIME").focus(); | |
| 201 | + return false; | |
| 202 | + } | |
| 203 | + if($("#PAPER_STATE").val()==""){ | |
| 204 | + $("#PAPER_STATE").tips({ | |
| 205 | + side:3, | |
| 206 | + msg:'请输入试卷状态', | |
| 207 | + bg:'#AE81FF', | |
| 208 | + time:2 | |
| 209 | + }); | |
| 210 | + $("#PAPER_STATE").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 | 235 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/paper/paper_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="paper/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 | + </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.PAPER_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.TITLE}</td> | |
| 96 | + <td class='center'>${var.USER_ID}</td> | |
| 97 | + <td class='center'>${var.PAPER_TYPE}</td> | |
| 98 | + <td class='center'>${var.SUBJECT_ID}</td> | |
| 99 | + <td class='center'>${var.GRADE_ID}</td> | |
| 100 | + <td class='center'>${var.SCHOOL_ID}</td> | |
| 101 | + <td class='center'>${var.CREATE_DATE}</td> | |
| 102 | + <td class='center'>${var.MODIFY_DATE}</td> | |
| 103 | + <td class='center'>${var.EXAM_TIME}</td> | |
| 104 | + <td class='center'>${var.PAPER_STATE}</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.PAPER_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.PAPER_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.PAPER_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.PAPER_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%>paper/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%>paper/delete.do?PAPER_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%>paper/goEdit.do?PAPER_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%>paper/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%>paper/excel.do'; | |
| 379 | + } | |
| 380 | + </script> | |
| 381 | + | |
| 382 | + | |
| 383 | +</body> | |
| 384 | +</html> | |
| 0 | 385 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/paperclassteacher/paperclassteacher_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="paperclassteacher/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="PAPERCLASSTEACHER_ID" id="PAPERCLASSTEACHER_ID" value="${pd.PAPERCLASSTEACHER_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="255" placeholder="这里输入试卷" title="试卷" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级:</td> | |
| 40 | + <td><input type="text" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="255" placeholder="这里输入班级" title="班级" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">教师:</td> | |
| 44 | + <td><input type="text" name="TEACHER_ID" id="TEACHER_ID" value="${pd.TEACHER_ID}" maxlength="255" placeholder="这里输入教师" title="教师" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="text-align: center;" colspan="10"> | |
| 48 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 49 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 50 | + </td> | |
| 51 | + </tr> | |
| 52 | + </table> | |
| 53 | + </div> | |
| 54 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 55 | + </form> | |
| 56 | + </div> | |
| 57 | + <!-- /.col --> | |
| 58 | + </div> | |
| 59 | + <!-- /.row --> | |
| 60 | + </div> | |
| 61 | + <!-- /.page-content --> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <!-- /.main-content --> | |
| 65 | +</div> | |
| 66 | +<!-- /.main-container --> | |
| 67 | + | |
| 68 | + | |
| 69 | + <!-- 页面底部js¨ --> | |
| 70 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 71 | + <!-- 下拉框 --> | |
| 72 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 73 | + <!-- 日期框 --> | |
| 74 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 75 | + <!--提示框--> | |
| 76 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 77 | + <script type="text/javascript"> | |
| 78 | + $(top.hangge()); | |
| 79 | + //保存 | |
| 80 | + function save(){ | |
| 81 | + if($("#PAPER_ID").val()==""){ | |
| 82 | + $("#PAPER_ID").tips({ | |
| 83 | + side:3, | |
| 84 | + msg:'请输入试卷', | |
| 85 | + bg:'#AE81FF', | |
| 86 | + time:2 | |
| 87 | + }); | |
| 88 | + $("#PAPER_ID").focus(); | |
| 89 | + return false; | |
| 90 | + } | |
| 91 | + if($("#CLASS_ID").val()==""){ | |
| 92 | + $("#CLASS_ID").tips({ | |
| 93 | + side:3, | |
| 94 | + msg:'请输入班级', | |
| 95 | + bg:'#AE81FF', | |
| 96 | + time:2 | |
| 97 | + }); | |
| 98 | + $("#CLASS_ID").focus(); | |
| 99 | + return false; | |
| 100 | + } | |
| 101 | + if($("#TEACHER_ID").val()==""){ | |
| 102 | + $("#TEACHER_ID").tips({ | |
| 103 | + side:3, | |
| 104 | + msg:'请输入教师', | |
| 105 | + bg:'#AE81FF', | |
| 106 | + time:2 | |
| 107 | + }); | |
| 108 | + $("#TEACHER_ID").focus(); | |
| 109 | + return false; | |
| 110 | + } | |
| 111 | + $("#Form").submit(); | |
| 112 | + $("#zhongxin").hide(); | |
| 113 | + $("#zhongxin2").show(); | |
| 114 | + } | |
| 115 | + | |
| 116 | + $(function() { | |
| 117 | + //日期框 | |
| 118 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 119 | + }); | |
| 120 | + </script> | |
| 121 | +</body> | |
| 122 | +</html> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/paperclassteacher/paperclassteacher_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="paperclassteacher/list.do" method="post" name="Form" id="Form"> | |
| 34 | + <table style="margin-top:5px;"> | |
| 35 | + <tr> | |
| 36 | + <td> | |
| 37 | + <div class="nav-search"> | |
| 38 | + <span class="input-icon"> | |
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + </td> | |
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 48 | + <option value=""></option> | |
| 49 | + <option value="">全部</option> | |
| 50 | + <option value="">1</option> | |
| 51 | + <option value="">2</option> | |
| 52 | + </select> | |
| 53 | + </td> | |
| 54 | + <c:if test="${QX.cha == 1 }"> | |
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 56 | + </c:if> | |
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + <!-- 检索 --> | |
| 61 | + | |
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 63 | + <thead> | |
| 64 | + <tr> | |
| 65 | + <th class="center" style="width:35px;"> | |
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 67 | + </th> | |
| 68 | + <th class="center" style="width:50px;">序号</th> | |
| 69 | + <th class="center">试卷</th> | |
| 70 | + <th class="center">班级</th> | |
| 71 | + <th class="center">教师</th> | |
| 72 | + <th class="center">操作</th> | |
| 73 | + </tr> | |
| 74 | + </thead> | |
| 75 | + | |
| 76 | + <tbody> | |
| 77 | + <!-- 开始循环 --> | |
| 78 | + <c:choose> | |
| 79 | + <c:when test="${not empty varList}"> | |
| 80 | + <c:if test="${QX.cha == 1 }"> | |
| 81 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 82 | + <tr> | |
| 83 | + <td class='center'> | |
| 84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.PAPERCLASSTEACHER_ID}" class="ace" /><span class="lbl"></span></label> | |
| 85 | + </td> | |
| 86 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 87 | + <td class='center'>${var.PAPER_ID}</td> | |
| 88 | + <td class='center'>${var.CLASS_ID}</td> | |
| 89 | + <td class='center'>${var.TEACHER_ID}</td> | |
| 90 | + <td class="center"> | |
| 91 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 92 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 93 | + </c:if> | |
| 94 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 95 | + <c:if test="${QX.edit == 1 }"> | |
| 96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.PAPERCLASSTEACHER_ID}');"> | |
| 97 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 98 | + </a> | |
| 99 | + </c:if> | |
| 100 | + <c:if test="${QX.del == 1 }"> | |
| 101 | + <a class="btn btn-xs btn-danger" onclick="del('${var.PAPERCLASSTEACHER_ID}');"> | |
| 102 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 103 | + </a> | |
| 104 | + </c:if> | |
| 105 | + </div> | |
| 106 | + <div class="hidden-md hidden-lg"> | |
| 107 | + <div class="inline pos-rel"> | |
| 108 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 109 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 110 | + </button> | |
| 111 | + | |
| 112 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 113 | + <c:if test="${QX.edit == 1 }"> | |
| 114 | + <li> | |
| 115 | + <a style="cursor:pointer;" onclick="edit('${var.PAPERCLASSTEACHER_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 116 | + <span class="green"> | |
| 117 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 118 | + </span> | |
| 119 | + </a> | |
| 120 | + </li> | |
| 121 | + </c:if> | |
| 122 | + <c:if test="${QX.del == 1 }"> | |
| 123 | + <li> | |
| 124 | + <a style="cursor:pointer;" onclick="del('${var.PAPERCLASSTEACHER_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 125 | + <span class="red"> | |
| 126 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 127 | + </span> | |
| 128 | + </a> | |
| 129 | + </li> | |
| 130 | + </c:if> | |
| 131 | + </ul> | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | + </td> | |
| 135 | + </tr> | |
| 136 | + | |
| 137 | + </c:forEach> | |
| 138 | + </c:if> | |
| 139 | + <c:if test="${QX.cha == 0 }"> | |
| 140 | + <tr> | |
| 141 | + <td colspan="100" class="center">您无权查看</td> | |
| 142 | + </tr> | |
| 143 | + </c:if> | |
| 144 | + </c:when> | |
| 145 | + <c:otherwise> | |
| 146 | + <tr class="main_info"> | |
| 147 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 148 | + </tr> | |
| 149 | + </c:otherwise> | |
| 150 | + </c:choose> | |
| 151 | + </tbody> | |
| 152 | + </table> | |
| 153 | + <div class="page-header position-relative"> | |
| 154 | + <table style="width:100%;"> | |
| 155 | + <tr> | |
| 156 | + <td style="vertical-align:top;"> | |
| 157 | + <c:if test="${QX.add == 1 }"> | |
| 158 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 159 | + </c:if> | |
| 160 | + <c:if test="${QX.del == 1 }"> | |
| 161 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 162 | + </c:if> | |
| 163 | + </td> | |
| 164 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 165 | + </tr> | |
| 166 | + </table> | |
| 167 | + </div> | |
| 168 | + </form> | |
| 169 | + | |
| 170 | + </div> | |
| 171 | + <!-- /.col --> | |
| 172 | + </div> | |
| 173 | + <!-- /.row --> | |
| 174 | + </div> | |
| 175 | + <!-- /.page-content --> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + <!-- /.main-content --> | |
| 179 | + | |
| 180 | + <!-- 返回顶部 --> | |
| 181 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 182 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 183 | + </a> | |
| 184 | + | |
| 185 | + </div> | |
| 186 | + <!-- /.main-container --> | |
| 187 | + | |
| 188 | + <!-- basic scripts --> | |
| 189 | + <!-- 页面底部js¨ --> | |
| 190 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 191 | + <!-- 删除时确认窗口 --> | |
| 192 | + <script src="static/ace/js/bootbox.js"></script> | |
| 193 | + <!-- ace scripts --> | |
| 194 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 195 | + <!-- 下拉框 --> | |
| 196 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 197 | + <!-- 日期框 --> | |
| 198 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 199 | + <!--提示框--> | |
| 200 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 201 | + <script type="text/javascript"> | |
| 202 | + $(top.hangge());//关闭加载状态 | |
| 203 | + //检索 | |
| 204 | + function tosearch(){ | |
| 205 | + top.jzts(); | |
| 206 | + $("#Form").submit(); | |
| 207 | + } | |
| 208 | + $(function() { | |
| 209 | + | |
| 210 | + //日期框 | |
| 211 | + $('.date-picker').datepicker({ | |
| 212 | + autoclose: true, | |
| 213 | + todayHighlight: true | |
| 214 | + }); | |
| 215 | + | |
| 216 | + //下拉框 | |
| 217 | + if(!ace.vars['touch']) { | |
| 218 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 219 | + $(window) | |
| 220 | + .off('resize.chosen') | |
| 221 | + .on('resize.chosen', function() { | |
| 222 | + $('.chosen-select').each(function() { | |
| 223 | + var $this = $(this); | |
| 224 | + $this.next().css({'width': $this.parent().width()}); | |
| 225 | + }); | |
| 226 | + }).trigger('resize.chosen'); | |
| 227 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 228 | + if(event_name != 'sidebar_collapsed') return; | |
| 229 | + $('.chosen-select').each(function() { | |
| 230 | + var $this = $(this); | |
| 231 | + $this.next().css({'width': $this.parent().width()}); | |
| 232 | + }); | |
| 233 | + }); | |
| 234 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 235 | + var target = $(this).find('input[type=radio]'); | |
| 236 | + var which = parseInt(target.val()); | |
| 237 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 238 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 239 | + }); | |
| 240 | + } | |
| 241 | + | |
| 242 | + | |
| 243 | + //复选框全选控制 | |
| 244 | + var active_class = 'active'; | |
| 245 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 246 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 247 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 248 | + var row = this; | |
| 249 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 250 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 251 | + }); | |
| 252 | + }); | |
| 253 | + }); | |
| 254 | + | |
| 255 | + //新增 | |
| 256 | + function add(){ | |
| 257 | + top.jzts(); | |
| 258 | + var diag = new top.Dialog(); | |
| 259 | + diag.Drag=true; | |
| 260 | + diag.Title ="新增"; | |
| 261 | + diag.URL = '<%=basePath%>paperclassteacher/goAdd.do'; | |
| 262 | + diag.Width = 450; | |
| 263 | + diag.Height = 355; | |
| 264 | + diag.Modal = true; //有无遮罩窗口 | |
| 265 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 266 | + diag.ShowMinButton = true; //最小化按钮 | |
| 267 | + diag.CancelEvent = function(){ //关闭事件 | |
| 268 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 269 | + if('${page.currentPage}' == '0'){ | |
| 270 | + tosearch(); | |
| 271 | + }else{ | |
| 272 | + tosearch(); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + diag.close(); | |
| 276 | + }; | |
| 277 | + diag.show(); | |
| 278 | + } | |
| 279 | + | |
| 280 | + //删除 | |
| 281 | + function del(Id){ | |
| 282 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 283 | + if(result) { | |
| 284 | + top.jzts(); | |
| 285 | + var url = "<%=basePath%>paperclassteacher/delete.do?PAPERCLASSTEACHER_ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | + $.get(url,function(data){ | |
| 287 | + tosearch(); | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + | |
| 293 | + //修改 | |
| 294 | + function edit(Id){ | |
| 295 | + top.jzts(); | |
| 296 | + var diag = new top.Dialog(); | |
| 297 | + diag.Drag=true; | |
| 298 | + diag.Title ="编辑"; | |
| 299 | + diag.URL = '<%=basePath%>paperclassteacher/goEdit.do?PAPERCLASSTEACHER_ID='+Id; | |
| 300 | + diag.Width = 450; | |
| 301 | + diag.Height = 355; | |
| 302 | + diag.Modal = true; //有无遮罩窗口 | |
| 303 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 304 | + diag.ShowMinButton = true; //最小化按钮 | |
| 305 | + diag.CancelEvent = function(){ //关闭事件 | |
| 306 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 307 | + tosearch(); | |
| 308 | + } | |
| 309 | + diag.close(); | |
| 310 | + }; | |
| 311 | + diag.show(); | |
| 312 | + } | |
| 313 | + | |
| 314 | + //批量操作 | |
| 315 | + function makeAll(msg){ | |
| 316 | + bootbox.confirm(msg, function(result) { | |
| 317 | + if(result) { | |
| 318 | + var str = ''; | |
| 319 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 320 | + if(document.getElementsByName('ids')[i].checked){ | |
| 321 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 322 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 323 | + } | |
| 324 | + } | |
| 325 | + if(str==''){ | |
| 326 | + bootbox.dialog({ | |
| 327 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 328 | + buttons: | |
| 329 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 330 | + }); | |
| 331 | + $("#zcheckbox").tips({ | |
| 332 | + side:1, | |
| 333 | + msg:'点这里全选', | |
| 334 | + bg:'#AE81FF', | |
| 335 | + time:8 | |
| 336 | + }); | |
| 337 | + return; | |
| 338 | + }else{ | |
| 339 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 340 | + top.jzts(); | |
| 341 | + $.ajax({ | |
| 342 | + type: "POST", | |
| 343 | + url: '<%=basePath%>paperclassteacher/deleteAll.do?tm='+new Date().getTime(), | |
| 344 | + data: {DATA_IDS:str}, | |
| 345 | + dataType:'json', | |
| 346 | + //beforeSend: validateData, | |
| 347 | + cache: false, | |
| 348 | + success: function(data){ | |
| 349 | + $.each(data.list, function(i, list){ | |
| 350 | + tosearch(); | |
| 351 | + }); | |
| 352 | + } | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + } | |
| 356 | + } | |
| 357 | + }); | |
| 358 | + }; | |
| 359 | + | |
| 360 | + //导出excel | |
| 361 | + function toExcel(){ | |
| 362 | + window.location.href='<%=basePath%>paperclassteacher/excel.do'; | |
| 363 | + } | |
| 364 | + </script> | |
| 365 | + | |
| 366 | + | |
| 367 | +</body> | |
| 368 | +</html> | |
| 0 | 369 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/paperquestion/paperquestion_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="paperquestion/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="PAPERQUESTION_ID" id="PAPERQUESTION_ID" value="${pd.PAPERQUESTION_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="255" placeholder="这里输入试卷" title="试卷" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">题目:</td> | |
| 40 | + <td><input type="text" name="QUESTION_ID" id="QUESTION_ID" value="${pd.QUESTION_ID}" maxlength="255" placeholder="这里输入题目" title="题目" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">分值:</td> | |
| 44 | + <td><input type="number" name="SCORE" id="SCORE" value="${pd.SCORE}" maxlength="32" placeholder="这里输入分值" title="分值" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">部分分:</td> | |
| 48 | + <td><input type="text" name="PART_SCORE" id="PART_SCORE" value="${pd.PART_SCORE}" maxlength="255" placeholder="这里输入部分分" title="部分分" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">排序编号:</td> | |
| 52 | + <td><input type="text" name="RANK" id="RANK" value="${pd.RANK}" 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="NO_NAME" id="NO_NAME" value="${pd.NO_NAME}" 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($("#SCORE").val()==""){ | |
| 114 | + $("#SCORE").tips({ | |
| 115 | + side:3, | |
| 116 | + msg:'请输入分值', | |
| 117 | + bg:'#AE81FF', | |
| 118 | + time:2 | |
| 119 | + }); | |
| 120 | + $("#SCORE").focus(); | |
| 121 | + return false; | |
| 122 | + } | |
| 123 | + if($("#PART_SCORE").val()==""){ | |
| 124 | + $("#PART_SCORE").tips({ | |
| 125 | + side:3, | |
| 126 | + msg:'请输入部分分', | |
| 127 | + bg:'#AE81FF', | |
| 128 | + time:2 | |
| 129 | + }); | |
| 130 | + $("#PART_SCORE").focus(); | |
| 131 | + return false; | |
| 132 | + } | |
| 133 | + if($("#RANK").val()==""){ | |
| 134 | + $("#RANK").tips({ | |
| 135 | + side:3, | |
| 136 | + msg:'请输入排序编号', | |
| 137 | + bg:'#AE81FF', | |
| 138 | + time:2 | |
| 139 | + }); | |
| 140 | + $("#RANK").focus(); | |
| 141 | + return false; | |
| 142 | + } | |
| 143 | + if($("#NO_NAME").val()==""){ | |
| 144 | + $("#NO_NAME").tips({ | |
| 145 | + side:3, | |
| 146 | + msg:'请输入题号', | |
| 147 | + bg:'#AE81FF', | |
| 148 | + time:2 | |
| 149 | + }); | |
| 150 | + $("#NO_NAME").focus(); | |
| 151 | + return false; | |
| 152 | + } | |
| 153 | + $("#Form").submit(); | |
| 154 | + $("#zhongxin").hide(); | |
| 155 | + $("#zhongxin2").show(); | |
| 156 | + } | |
| 157 | + | |
| 158 | + $(function() { | |
| 159 | + //日期框 | |
| 160 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 161 | + }); | |
| 162 | + </script> | |
| 163 | +</body> | |
| 164 | +</html> | |
| 0 | 165 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/paperquestion/paperquestion_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="paperquestion/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.PAPERQUESTION_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.SCORE}</td> | |
| 93 | + <td class='center'>${var.PART_SCORE}</td> | |
| 94 | + <td class='center'>${var.RANK}</td> | |
| 95 | + <td class='center'>${var.NO_NAME}</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.PAPERQUESTION_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.PAPERQUESTION_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.PAPERQUESTION_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.PAPERQUESTION_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%>paperquestion/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%>paperquestion/delete.do?PAPERQUESTION_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%>paperquestion/goEdit.do?PAPERQUESTION_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%>paperquestion/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%>paperquestion/excel.do'; | |
| 369 | + } | |
| 370 | + </script> | |
| 371 | + | |
| 372 | + | |
| 373 | +</body> | |
| 374 | +</html> | |
| 0 | 375 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/question/question_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="question/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="QUESTION_ID" id="QUESTION_ID" value="${pd.QUESTION_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;">父ID:</td> | |
| 36 | + <td><input type="text" name="P_ID" id="P_ID" value="${pd.P_ID}" maxlength="255" placeholder="这里输入父ID" title="父ID" 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="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="255" placeholder="这里输入所属科目" title="所属科目" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">所属章节:</td> | |
| 44 | + <td><input type="text" name="CHAPTER_ID" id="CHAPTER_ID" value="${pd.CHAPTER_ID}" maxlength="255" placeholder="这里输入所属章节" title="所属章节" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">题目类型:</td> | |
| 48 | + <td><input type="text" name="PROBLEM_TYPE_ID" id="PROBLEM_TYPE_ID" value="${pd.PROBLEM_TYPE_ID}" maxlength="255" placeholder="这里输入题目类型" title="题目类型" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">出题老师:</td> | |
| 52 | + <td><input type="text" name="TEACHER_ID" id="TEACHER_ID" value="${pd.TEACHER_ID}" 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="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="255" placeholder="这里输入所属学校" title="所属学校" style="width:98%;"/></td> | |
| 57 | + </tr> | |
| 58 | + <tr> | |
| 59 | + <td style="width:75px;text-align: right;padding-top: 13px;">知识点:</td> | |
| 60 | + <td><input type="text" name="KNOWLEDGE_ID" id="KNOWLEDGE_ID" value="${pd.KNOWLEDGE_ID}" maxlength="255" placeholder="这里输入知识点" title="知识点" style="width:98%;"/></td> | |
| 61 | + </tr> | |
| 62 | + <tr> | |
| 63 | + <td style="width:75px;text-align: right;padding-top: 13px;">题目内容:</td> | |
| 64 | + <td><input type="text" name="CONTENT" id="CONTENT" value="${pd.CONTENT}" maxlength="255" 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="number" name="OPTION_NUM" id="OPTION_NUM" value="${pd.OPTION_NUM}" maxlength="32" 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="OPTION_CONTENT" id="OPTION_CONTENT" value="${pd.OPTION_CONTENT}" maxlength="255" 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="ANSWER" id="ANSWER" value="${pd.ANSWER}" maxlength="255" placeholder="这里输入标准答案" title="标准答案" 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="DIFFICULTY" id="DIFFICULTY" value="${pd.DIFFICULTY}" maxlength="10" placeholder="这里输入难度系数" title="难度系数" style="width:98%;"/></td> | |
| 81 | + </tr> | |
| 82 | + <tr> | |
| 83 | + <td style="width:75px;text-align: right;padding-top: 13px;">题目解析:</td> | |
| 84 | + <td><input type="text" name="ANALYSIS" id="ANALYSIS" value="${pd.ANALYSIS}" maxlength="255" placeholder="这里输入题目解析" title="题目解析" style="width:98%;"/></td> | |
| 85 | + </tr> | |
| 86 | + <tr> | |
| 87 | + <td style="width:75px;text-align: right;padding-top: 13px;">题目来源:</td> | |
| 88 | + <td><input type="text" name="QUESTION_FROM" id="QUESTION_FROM" value="${pd.QUESTION_FROM}" maxlength="255" placeholder="这里输入题目来源" title="题目来源" style="width:98%;"/></td> | |
| 89 | + </tr> | |
| 90 | + <tr> | |
| 91 | + <td style="width:75px;text-align: right;padding-top: 13px;">建议试题总分:</td> | |
| 92 | + <td><input type="text" name="SUG_SCORE" id="SUG_SCORE" value="${pd.SUG_SCORE}" maxlength="255" placeholder="这里输入建议试题总分" title="建议试题总分" style="width:98%;"/></td> | |
| 93 | + </tr> | |
| 94 | + <tr> | |
| 95 | + <td style="width:75px;text-align: right;padding-top: 13px;">建议部分分:</td> | |
| 96 | + <td><input type="text" name="SUG_PART_SCORE" id="SUG_PART_SCORE" value="${pd.SUG_PART_SCORE}" maxlength="255" placeholder="这里输入建议部分分" title="建议部分分" style="width:98%;"/></td> | |
| 97 | + </tr> | |
| 98 | + <tr> | |
| 99 | + <td style="width:75px;text-align: right;padding-top: 13px;">用户ID:</td> | |
| 100 | + <td><input type="text" name="USER_ID" id="USER_ID" value="${pd.USER_ID}" maxlength="255" placeholder="这里输入用户ID" title="用户ID" style="width:98%;"/></td> | |
| 101 | + </tr> | |
| 102 | + <tr> | |
| 103 | + <td style="width:75px;text-align: right;padding-top: 13px;">创建时间:</td> | |
| 104 | + <td><input type="text" name="CREATE_DATE" id="CREATE_DATE" value="${pd.CREATE_DATE}" maxlength="255" placeholder="这里输入创建时间" title="创建时间" style="width:98%;"/></td> | |
| 105 | + </tr> | |
| 106 | + <tr> | |
| 107 | + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | |
| 108 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
| 109 | + </tr> | |
| 110 | + <tr> | |
| 111 | + <td style="text-align: center;" colspan="10"> | |
| 112 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 113 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 114 | + </td> | |
| 115 | + </tr> | |
| 116 | + </table> | |
| 117 | + </div> | |
| 118 | + <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> | |
| 119 | + </form> | |
| 120 | + </div> | |
| 121 | + <!-- /.col --> | |
| 122 | + </div> | |
| 123 | + <!-- /.row --> | |
| 124 | + </div> | |
| 125 | + <!-- /.page-content --> | |
| 126 | + </div> | |
| 127 | + </div> | |
| 128 | + <!-- /.main-content --> | |
| 129 | +</div> | |
| 130 | +<!-- /.main-container --> | |
| 131 | + | |
| 132 | + | |
| 133 | + <!-- 页面底部js¨ --> | |
| 134 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 135 | + <!-- 下拉框 --> | |
| 136 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 137 | + <!-- 日期框 --> | |
| 138 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 139 | + <!--提示框--> | |
| 140 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 141 | + <script type="text/javascript"> | |
| 142 | + $(top.hangge()); | |
| 143 | + //保存 | |
| 144 | + function save(){ | |
| 145 | + if($("#P_ID").val()==""){ | |
| 146 | + $("#P_ID").tips({ | |
| 147 | + side:3, | |
| 148 | + msg:'请输入父ID', | |
| 149 | + bg:'#AE81FF', | |
| 150 | + time:2 | |
| 151 | + }); | |
| 152 | + $("#P_ID").focus(); | |
| 153 | + return false; | |
| 154 | + } | |
| 155 | + if($("#SUBJECT_ID").val()==""){ | |
| 156 | + $("#SUBJECT_ID").tips({ | |
| 157 | + side:3, | |
| 158 | + msg:'请输入所属科目', | |
| 159 | + bg:'#AE81FF', | |
| 160 | + time:2 | |
| 161 | + }); | |
| 162 | + $("#SUBJECT_ID").focus(); | |
| 163 | + return false; | |
| 164 | + } | |
| 165 | + if($("#CHAPTER_ID").val()==""){ | |
| 166 | + $("#CHAPTER_ID").tips({ | |
| 167 | + side:3, | |
| 168 | + msg:'请输入所属章节', | |
| 169 | + bg:'#AE81FF', | |
| 170 | + time:2 | |
| 171 | + }); | |
| 172 | + $("#CHAPTER_ID").focus(); | |
| 173 | + return false; | |
| 174 | + } | |
| 175 | + if($("#PROBLEM_TYPE_ID").val()==""){ | |
| 176 | + $("#PROBLEM_TYPE_ID").tips({ | |
| 177 | + side:3, | |
| 178 | + msg:'请输入题目类型', | |
| 179 | + bg:'#AE81FF', | |
| 180 | + time:2 | |
| 181 | + }); | |
| 182 | + $("#PROBLEM_TYPE_ID").focus(); | |
| 183 | + return false; | |
| 184 | + } | |
| 185 | + if($("#TEACHER_ID").val()==""){ | |
| 186 | + $("#TEACHER_ID").tips({ | |
| 187 | + side:3, | |
| 188 | + msg:'请输入出题老师', | |
| 189 | + bg:'#AE81FF', | |
| 190 | + time:2 | |
| 191 | + }); | |
| 192 | + $("#TEACHER_ID").focus(); | |
| 193 | + return false; | |
| 194 | + } | |
| 195 | + if($("#SCHOOL_ID").val()==""){ | |
| 196 | + $("#SCHOOL_ID").tips({ | |
| 197 | + side:3, | |
| 198 | + msg:'请输入所属学校', | |
| 199 | + bg:'#AE81FF', | |
| 200 | + time:2 | |
| 201 | + }); | |
| 202 | + $("#SCHOOL_ID").focus(); | |
| 203 | + return false; | |
| 204 | + } | |
| 205 | + if($("#KNOWLEDGE_ID").val()==""){ | |
| 206 | + $("#KNOWLEDGE_ID").tips({ | |
| 207 | + side:3, | |
| 208 | + msg:'请输入知识点', | |
| 209 | + bg:'#AE81FF', | |
| 210 | + time:2 | |
| 211 | + }); | |
| 212 | + $("#KNOWLEDGE_ID").focus(); | |
| 213 | + return false; | |
| 214 | + } | |
| 215 | + if($("#CONTENT").val()==""){ | |
| 216 | + $("#CONTENT").tips({ | |
| 217 | + side:3, | |
| 218 | + msg:'请输入题目内容', | |
| 219 | + bg:'#AE81FF', | |
| 220 | + time:2 | |
| 221 | + }); | |
| 222 | + $("#CONTENT").focus(); | |
| 223 | + return false; | |
| 224 | + } | |
| 225 | + if($("#OPTION_NUM").val()==""){ | |
| 226 | + $("#OPTION_NUM").tips({ | |
| 227 | + side:3, | |
| 228 | + msg:'请输入选项个数', | |
| 229 | + bg:'#AE81FF', | |
| 230 | + time:2 | |
| 231 | + }); | |
| 232 | + $("#OPTION_NUM").focus(); | |
| 233 | + return false; | |
| 234 | + } | |
| 235 | + if($("#OPTION_CONTENT").val()==""){ | |
| 236 | + $("#OPTION_CONTENT").tips({ | |
| 237 | + side:3, | |
| 238 | + msg:'请输入选项内容', | |
| 239 | + bg:'#AE81FF', | |
| 240 | + time:2 | |
| 241 | + }); | |
| 242 | + $("#OPTION_CONTENT").focus(); | |
| 243 | + return false; | |
| 244 | + } | |
| 245 | + if($("#ANSWER").val()==""){ | |
| 246 | + $("#ANSWER").tips({ | |
| 247 | + side:3, | |
| 248 | + msg:'请输入标准答案', | |
| 249 | + bg:'#AE81FF', | |
| 250 | + time:2 | |
| 251 | + }); | |
| 252 | + $("#ANSWER").focus(); | |
| 253 | + return false; | |
| 254 | + } | |
| 255 | + if($("#DIFFICULTY").val()==""){ | |
| 256 | + $("#DIFFICULTY").tips({ | |
| 257 | + side:3, | |
| 258 | + msg:'请输入难度系数', | |
| 259 | + bg:'#AE81FF', | |
| 260 | + time:2 | |
| 261 | + }); | |
| 262 | + $("#DIFFICULTY").focus(); | |
| 263 | + return false; | |
| 264 | + } | |
| 265 | + if($("#ANALYSIS").val()==""){ | |
| 266 | + $("#ANALYSIS").tips({ | |
| 267 | + side:3, | |
| 268 | + msg:'请输入题目解析', | |
| 269 | + bg:'#AE81FF', | |
| 270 | + time:2 | |
| 271 | + }); | |
| 272 | + $("#ANALYSIS").focus(); | |
| 273 | + return false; | |
| 274 | + } | |
| 275 | + if($("#QUESTION_FROM").val()==""){ | |
| 276 | + $("#QUESTION_FROM").tips({ | |
| 277 | + side:3, | |
| 278 | + msg:'请输入题目来源', | |
| 279 | + bg:'#AE81FF', | |
| 280 | + time:2 | |
| 281 | + }); | |
| 282 | + $("#QUESTION_FROM").focus(); | |
| 283 | + return false; | |
| 284 | + } | |
| 285 | + if($("#SUG_SCORE").val()==""){ | |
| 286 | + $("#SUG_SCORE").tips({ | |
| 287 | + side:3, | |
| 288 | + msg:'请输入建议试题总分', | |
| 289 | + bg:'#AE81FF', | |
| 290 | + time:2 | |
| 291 | + }); | |
| 292 | + $("#SUG_SCORE").focus(); | |
| 293 | + return false; | |
| 294 | + } | |
| 295 | + if($("#SUG_PART_SCORE").val()==""){ | |
| 296 | + $("#SUG_PART_SCORE").tips({ | |
| 297 | + side:3, | |
| 298 | + msg:'请输入建议部分分', | |
| 299 | + bg:'#AE81FF', | |
| 300 | + time:2 | |
| 301 | + }); | |
| 302 | + $("#SUG_PART_SCORE").focus(); | |
| 303 | + return false; | |
| 304 | + } | |
| 305 | + if($("#USER_ID").val()==""){ | |
| 306 | + $("#USER_ID").tips({ | |
| 307 | + side:3, | |
| 308 | + msg:'请输入用户ID', | |
| 309 | + bg:'#AE81FF', | |
| 310 | + time:2 | |
| 311 | + }); | |
| 312 | + $("#USER_ID").focus(); | |
| 313 | + return false; | |
| 314 | + } | |
| 315 | + if($("#CREATE_DATE").val()==""){ | |
| 316 | + $("#CREATE_DATE").tips({ | |
| 317 | + side:3, | |
| 318 | + msg:'请输入创建时间', | |
| 319 | + bg:'#AE81FF', | |
| 320 | + time:2 | |
| 321 | + }); | |
| 322 | + $("#CREATE_DATE").focus(); | |
| 323 | + return false; | |
| 324 | + } | |
| 325 | + if($("#REMARK").val()==""){ | |
| 326 | + $("#REMARK").tips({ | |
| 327 | + side:3, | |
| 328 | + msg:'请输入备注', | |
| 329 | + bg:'#AE81FF', | |
| 330 | + time:2 | |
| 331 | + }); | |
| 332 | + $("#REMARK").focus(); | |
| 333 | + return false; | |
| 334 | + } | |
| 335 | + $("#Form").submit(); | |
| 336 | + $("#zhongxin").hide(); | |
| 337 | + $("#zhongxin2").show(); | |
| 338 | + } | |
| 339 | + | |
| 340 | + $(function() { | |
| 341 | + //日期框 | |
| 342 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 343 | + }); | |
| 344 | + </script> | |
| 345 | +</body> | |
| 346 | +</html> | |
| 0 | 347 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/question/question_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 | +<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%> | |
| 5 | +<% | |
| 6 | + String path = request.getContextPath(); | |
| 7 | + String basePath = request.getScheme() + "://" | |
| 8 | + + request.getServerName() + ":" + request.getServerPort() | |
| 9 | + + path + "/"; | |
| 10 | +%> | |
| 11 | +<!DOCTYPE html> | |
| 12 | +<html lang="en"> | |
| 13 | +<head> | |
| 14 | +<base href="<%=basePath%>"> | |
| 15 | +<!-- 下拉框 --> | |
| 16 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
| 17 | +<!-- jsp文件头和头部 --> | |
| 18 | +<%@ include file="../../system/index/top.jsp"%> | |
| 19 | +<!-- 日期框 --> | |
| 20 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
| 21 | +</head> | |
| 22 | +<body class="no-skin"> | |
| 23 | + | |
| 24 | + <!-- /section:basics/navbar.layout --> | |
| 25 | + <div class="main-container" id="main-container"> | |
| 26 | + <!-- /section:basics/sidebar --> | |
| 27 | + <div class="main-content"> | |
| 28 | + <div class="main-content-inner"> | |
| 29 | + <div class="page-content"> | |
| 30 | + <div class="row"> | |
| 31 | + <div class="col-xs-12"> | |
| 32 | + | |
| 33 | + <!-- 检索 --> | |
| 34 | + <form action="question/list.do" method="post" name="Form" id="Form"> | |
| 35 | + <table style="margin-top:5px;"> | |
| 36 | + <tr> | |
| 37 | + <td> | |
| 38 | + <div class="nav-search"> | |
| 39 | + <span class="input-icon"> | |
| 40 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 41 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 42 | + </span> | |
| 43 | + </div> | |
| 44 | + </td> | |
| 45 | + <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> | |
| 46 | + <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> | |
| 47 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 48 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 49 | + <option value=""></option> | |
| 50 | + <option value="">全部</option> | |
| 51 | + <option value="">1</option> | |
| 52 | + <option value="">2</option> | |
| 53 | + </select> | |
| 54 | + </td> | |
| 55 | + <c:if test="${QX.cha == 1 }"> | |
| 56 | + <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> | |
| 57 | + </c:if> | |
| 58 | + <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> | |
| 59 | + </tr> | |
| 60 | + </table> | |
| 61 | + <!-- 检索 --> | |
| 62 | + | |
| 63 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 64 | + <thead> | |
| 65 | + <tr> | |
| 66 | + <th class="center" style="width:35px;"> | |
| 67 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 68 | + </th> | |
| 69 | + <th class="center" style="width:50px;">序号</th> | |
| 70 | + <th class="center">父ID</th> | |
| 71 | + <th class="center">所属科目</th> | |
| 72 | + <th class="center">所属章节</th> | |
| 73 | + <th class="center">题目类型</th> | |
| 74 | + <th class="center">出题老师</th> | |
| 75 | + <th class="center">所属学校</th> | |
| 76 | + <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 | + <th class="center">题目解析</th> | |
| 83 | + <th class="center">题目来源</th> | |
| 84 | + <th class="center">建议试题总分</th> | |
| 85 | + <th class="center">建议部分分</th> | |
| 86 | + <th class="center">用户ID</th> | |
| 87 | + <th class="center">创建时间</th> | |
| 88 | + <th class="center">备注</th> | |
| 89 | + <th class="center">操作</th> | |
| 90 | + </tr> | |
| 91 | + </thead> | |
| 92 | + | |
| 93 | + <tbody> | |
| 94 | + <!-- 开始循环 --> | |
| 95 | + <c:choose> | |
| 96 | + <c:when test="${not empty varList}"> | |
| 97 | + <c:if test="${QX.cha == 1 }"> | |
| 98 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 99 | + <tr> | |
| 100 | + <td class='center'> | |
| 101 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.QUESTION_ID}" class="ace" /><span class="lbl"></span></label> | |
| 102 | + </td> | |
| 103 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 104 | + <td class='center'>${var.P_ID}</td> | |
| 105 | + <td class='center'>${var.SUBJECT_ID}</td> | |
| 106 | + <td class='center'>${var.CHAPTER_ID}</td> | |
| 107 | + <td class='center'>${var.PROBLEM_TYPE_ID}</td> | |
| 108 | + <td class='center'>${var.TEACHER_ID}</td> | |
| 109 | + <td class='center'>${var.SCHOOL_ID}</td> | |
| 110 | + <td class='center'>${var.KNOWLEDGE_ID}</td> | |
| 111 | + <td class='center'>${var.CONTENT}</td> | |
| 112 | + <td class='center'>${var.OPTION_NUM}</td> | |
| 113 | + <td class='center'>${var.OPTION_CONTENT}</td> | |
| 114 | + <td class='center'>${var.ANSWER}</td> | |
| 115 | + <td class='center'>${var.DIFFICULTY}</td> | |
| 116 | + <td class='center'>${var.ANALYSIS}</td> | |
| 117 | + <td class='center'>${var.QUESTION_FROM}</td> | |
| 118 | + <td class='center'>${var.SUG_SCORE}</td> | |
| 119 | + <td class='center'>${var.SUG_PART_SCORE}</td> | |
| 120 | + <td class='center'>${var.USER_ID}</td> | |
| 121 | + <td class='center'>${var.CREATE_DATE}</td> | |
| 122 | + <td class='center'>${var.REMARK}</td> | |
| 123 | + <td class="center"> | |
| 124 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 125 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 126 | + </c:if> | |
| 127 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 128 | + <c:if test="${QX.edit == 1 }"> | |
| 129 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.QUESTION_ID}');"> | |
| 130 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 131 | + </a> | |
| 132 | + </c:if> | |
| 133 | + <c:if test="${QX.del == 1 }"> | |
| 134 | + <a class="btn btn-xs btn-danger" onclick="del('${var.QUESTION_ID}');"> | |
| 135 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 136 | + </a> | |
| 137 | + </c:if> | |
| 138 | + </div> | |
| 139 | + <div class="hidden-md hidden-lg"> | |
| 140 | + <div class="inline pos-rel"> | |
| 141 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 142 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 143 | + </button> | |
| 144 | + | |
| 145 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 146 | + <c:if test="${QX.edit == 1 }"> | |
| 147 | + <li> | |
| 148 | + <a style="cursor:pointer;" onclick="edit('${var.QUESTION_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 149 | + <span class="green"> | |
| 150 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 151 | + </span> | |
| 152 | + </a> | |
| 153 | + </li> | |
| 154 | + </c:if> | |
| 155 | + <c:if test="${QX.del == 1 }"> | |
| 156 | + <li> | |
| 157 | + <a style="cursor:pointer;" onclick="del('${var.QUESTION_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 158 | + <span class="red"> | |
| 159 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 160 | + </span> | |
| 161 | + </a> | |
| 162 | + </li> | |
| 163 | + </c:if> | |
| 164 | + </ul> | |
| 165 | + </div> | |
| 166 | + </div> | |
| 167 | + </td> | |
| 168 | + </tr> | |
| 169 | + | |
| 170 | + </c:forEach> | |
| 171 | + </c:if> | |
| 172 | + <c:if test="${QX.cha == 0 }"> | |
| 173 | + <tr> | |
| 174 | + <td colspan="100" class="center">您无权查看</td> | |
| 175 | + </tr> | |
| 176 | + </c:if> | |
| 177 | + </c:when> | |
| 178 | + <c:otherwise> | |
| 179 | + <tr class="main_info"> | |
| 180 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 181 | + </tr> | |
| 182 | + </c:otherwise> | |
| 183 | + </c:choose> | |
| 184 | + </tbody> | |
| 185 | + </table> | |
| 186 | + <div class="page-header position-relative"> | |
| 187 | + <table style="width:100%;"> | |
| 188 | + <tr> | |
| 189 | + <td style="vertical-align:top;"> | |
| 190 | + <c:if test="${QX.add == 1 }"> | |
| 191 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 192 | + </c:if> | |
| 193 | + <c:if test="${QX.del == 1 }"> | |
| 194 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 195 | + </c:if> | |
| 196 | + </td> | |
| 197 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 198 | + </tr> | |
| 199 | + </table> | |
| 200 | + </div> | |
| 201 | + </form> | |
| 202 | + | |
| 203 | + </div> | |
| 204 | + <!-- /.col --> | |
| 205 | + </div> | |
| 206 | + <!-- /.row --> | |
| 207 | + </div> | |
| 208 | + <!-- /.page-content --> | |
| 209 | + </div> | |
| 210 | + </div> | |
| 211 | + <!-- /.main-content --> | |
| 212 | + | |
| 213 | + <!-- 返回顶部 --> | |
| 214 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 215 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 216 | + </a> | |
| 217 | + | |
| 218 | + </div> | |
| 219 | + <!-- /.main-container --> | |
| 220 | + | |
| 221 | + <!-- basic scripts --> | |
| 222 | + <!-- 页面底部js¨ --> | |
| 223 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 224 | + <!-- 删除时确认窗口 --> | |
| 225 | + <script src="static/ace/js/bootbox.js"></script> | |
| 226 | + <!-- ace scripts --> | |
| 227 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 228 | + <!-- 下拉框 --> | |
| 229 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 230 | + <!-- 日期框 --> | |
| 231 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 232 | + <!--提示框--> | |
| 233 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 234 | + <script type="text/javascript"> | |
| 235 | + $(top.hangge());//关闭加载状态 | |
| 236 | + //检索 | |
| 237 | + function tosearch(){ | |
| 238 | + top.jzts(); | |
| 239 | + $("#Form").submit(); | |
| 240 | + } | |
| 241 | + $(function() { | |
| 242 | + | |
| 243 | + //日期框 | |
| 244 | + $('.date-picker').datepicker({ | |
| 245 | + autoclose: true, | |
| 246 | + todayHighlight: true | |
| 247 | + }); | |
| 248 | + | |
| 249 | + //下拉框 | |
| 250 | + if(!ace.vars['touch']) { | |
| 251 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 252 | + $(window) | |
| 253 | + .off('resize.chosen') | |
| 254 | + .on('resize.chosen', function() { | |
| 255 | + $('.chosen-select').each(function() { | |
| 256 | + var $this = $(this); | |
| 257 | + $this.next().css({'width': $this.parent().width()}); | |
| 258 | + }); | |
| 259 | + }).trigger('resize.chosen'); | |
| 260 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 261 | + if(event_name != 'sidebar_collapsed') return; | |
| 262 | + $('.chosen-select').each(function() { | |
| 263 | + var $this = $(this); | |
| 264 | + $this.next().css({'width': $this.parent().width()}); | |
| 265 | + }); | |
| 266 | + }); | |
| 267 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 268 | + var target = $(this).find('input[type=radio]'); | |
| 269 | + var which = parseInt(target.val()); | |
| 270 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 271 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 272 | + }); | |
| 273 | + } | |
| 274 | + | |
| 275 | + | |
| 276 | + //复选框全选控制 | |
| 277 | + var active_class = 'active'; | |
| 278 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 279 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 280 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 281 | + var row = this; | |
| 282 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 283 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 284 | + }); | |
| 285 | + }); | |
| 286 | + }); | |
| 287 | + | |
| 288 | + //新增 | |
| 289 | + function add(){ | |
| 290 | + top.jzts(); | |
| 291 | + var diag = new top.Dialog(); | |
| 292 | + diag.Drag=true; | |
| 293 | + diag.Title ="新增"; | |
| 294 | + diag.URL = '<%=basePath%>question/goAdd.do'; | |
| 295 | + diag.Width = 450; | |
| 296 | + diag.Height = 355; | |
| 297 | + diag.Modal = true; //有无遮罩窗口 | |
| 298 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 299 | + diag.ShowMinButton = true; //最小化按钮 | |
| 300 | + diag.CancelEvent = function(){ //关闭事件 | |
| 301 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 302 | + if('${page.currentPage}' == '0'){ | |
| 303 | + tosearch(); | |
| 304 | + }else{ | |
| 305 | + tosearch(); | |
| 306 | + } | |
| 307 | + } | |
| 308 | + diag.close(); | |
| 309 | + }; | |
| 310 | + diag.show(); | |
| 311 | + } | |
| 312 | + | |
| 313 | + //删除 | |
| 314 | + function del(Id){ | |
| 315 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 316 | + if(result) { | |
| 317 | + top.jzts(); | |
| 318 | + var url = "<%=basePath%>question/delete.do?QUESTION_ID="+Id+"&tm="+new Date().getTime(); | |
| 319 | + $.get(url,function(data){ | |
| 320 | + tosearch(); | |
| 321 | + }); | |
| 322 | + } | |
| 323 | + }); | |
| 324 | + } | |
| 325 | + | |
| 326 | + //修改 | |
| 327 | + function edit(Id){ | |
| 328 | + top.jzts(); | |
| 329 | + var diag = new top.Dialog(); | |
| 330 | + diag.Drag=true; | |
| 331 | + diag.Title ="编辑"; | |
| 332 | + diag.URL = '<%=basePath%>question/goEdit.do?QUESTION_ID='+Id; | |
| 333 | + diag.Width = 450; | |
| 334 | + diag.Height = 355; | |
| 335 | + diag.Modal = true; //有无遮罩窗口 | |
| 336 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 337 | + diag.ShowMinButton = true; //最小化按钮 | |
| 338 | + diag.CancelEvent = function(){ //关闭事件 | |
| 339 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 340 | + tosearch(); | |
| 341 | + } | |
| 342 | + diag.close(); | |
| 343 | + }; | |
| 344 | + diag.show(); | |
| 345 | + } | |
| 346 | + | |
| 347 | + //批量操作 | |
| 348 | + function makeAll(msg){ | |
| 349 | + bootbox.confirm(msg, function(result) { | |
| 350 | + if(result) { | |
| 351 | + var str = ''; | |
| 352 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 353 | + if(document.getElementsByName('ids')[i].checked){ | |
| 354 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 355 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 356 | + } | |
| 357 | + } | |
| 358 | + if(str==''){ | |
| 359 | + bootbox.dialog({ | |
| 360 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 361 | + buttons: | |
| 362 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 363 | + }); | |
| 364 | + $("#zcheckbox").tips({ | |
| 365 | + side:1, | |
| 366 | + msg:'点这里全选', | |
| 367 | + bg:'#AE81FF', | |
| 368 | + time:8 | |
| 369 | + }); | |
| 370 | + return; | |
| 371 | + }else{ | |
| 372 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 373 | + top.jzts(); | |
| 374 | + $.ajax({ | |
| 375 | + type: "POST", | |
| 376 | + url: '<%=basePath%>question/deleteAll.do?tm='+new Date().getTime(), | |
| 377 | + data: {DATA_IDS:str}, | |
| 378 | + dataType:'json', | |
| 379 | + //beforeSend: validateData, | |
| 380 | + cache: false, | |
| 381 | + success: function(data){ | |
| 382 | + $.each(data.list, function(i, list){ | |
| 383 | + tosearch(); | |
| 384 | + }); | |
| 385 | + } | |
| 386 | + }); | |
| 387 | + } | |
| 388 | + } | |
| 389 | + } | |
| 390 | + }); | |
| 391 | + }; | |
| 392 | + | |
| 393 | + //导出excel | |
| 394 | + function toExcel(){ | |
| 395 | + window.location.href='<%=basePath%>question/excel.do'; | |
| 396 | + } | |
| 397 | + </script> | |
| 398 | + | |
| 399 | + | |
| 400 | +</body> | |
| 401 | +</html> | |
| 0 | 402 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/questiontype/questiontype_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="questiontype/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="QUESTIONTYPE_ID" id="QUESTIONTYPE_ID" value="${pd.QUESTIONTYPE_ID}"/> | |
| 32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
| 33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
| 34 | + <tr> | |
| 35 | + <td style="width:75px;text-align: right;padding-top: 13px;">名称:</td> | |
| 36 | + <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入名称" title="名称" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">创建时间:</td> | |
| 40 | + <td><input type="text" name="CREATE_DATE" id="CREATE_DATE" value="${pd.CREATE_DATE}" maxlength="255" placeholder="这里输入创建时间" title="创建时间" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">修改时间:</td> | |
| 44 | + <td><input type="text" name="MODIFY_DATE" id="MODIFY_DATE" value="${pd.MODIFY_DATE}" maxlength="255" placeholder="这里输入修改时间" title="修改时间" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | |
| 48 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="text-align: center;" colspan="10"> | |
| 52 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 53 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 54 | + </td> | |
| 55 | + </tr> | |
| 56 | + </table> | |
| 57 | + </div> | |
| 58 | + <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> | |
| 59 | + </form> | |
| 60 | + </div> | |
| 61 | + <!-- /.col --> | |
| 62 | + </div> | |
| 63 | + <!-- /.row --> | |
| 64 | + </div> | |
| 65 | + <!-- /.page-content --> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <!-- /.main-content --> | |
| 69 | +</div> | |
| 70 | +<!-- /.main-container --> | |
| 71 | + | |
| 72 | + | |
| 73 | + <!-- 页面底部js¨ --> | |
| 74 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 75 | + <!-- 下拉框 --> | |
| 76 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 77 | + <!-- 日期框 --> | |
| 78 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 79 | + <!--提示框--> | |
| 80 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 81 | + <script type="text/javascript"> | |
| 82 | + $(top.hangge()); | |
| 83 | + //保存 | |
| 84 | + function save(){ | |
| 85 | + if($("#NAME").val()==""){ | |
| 86 | + $("#NAME").tips({ | |
| 87 | + side:3, | |
| 88 | + msg:'请输入名称', | |
| 89 | + bg:'#AE81FF', | |
| 90 | + time:2 | |
| 91 | + }); | |
| 92 | + $("#NAME").focus(); | |
| 93 | + return false; | |
| 94 | + } | |
| 95 | + if($("#CREATE_DATE").val()==""){ | |
| 96 | + $("#CREATE_DATE").tips({ | |
| 97 | + side:3, | |
| 98 | + msg:'请输入创建时间', | |
| 99 | + bg:'#AE81FF', | |
| 100 | + time:2 | |
| 101 | + }); | |
| 102 | + $("#CREATE_DATE").focus(); | |
| 103 | + return false; | |
| 104 | + } | |
| 105 | + if($("#MODIFY_DATE").val()==""){ | |
| 106 | + $("#MODIFY_DATE").tips({ | |
| 107 | + side:3, | |
| 108 | + msg:'请输入修改时间', | |
| 109 | + bg:'#AE81FF', | |
| 110 | + time:2 | |
| 111 | + }); | |
| 112 | + $("#MODIFY_DATE").focus(); | |
| 113 | + return false; | |
| 114 | + } | |
| 115 | + if($("#REMARK").val()==""){ | |
| 116 | + $("#REMARK").tips({ | |
| 117 | + side:3, | |
| 118 | + msg:'请输入备注', | |
| 119 | + bg:'#AE81FF', | |
| 120 | + time:2 | |
| 121 | + }); | |
| 122 | + $("#REMARK").focus(); | |
| 123 | + return false; | |
| 124 | + } | |
| 125 | + $("#Form").submit(); | |
| 126 | + $("#zhongxin").hide(); | |
| 127 | + $("#zhongxin2").show(); | |
| 128 | + } | |
| 129 | + | |
| 130 | + $(function() { | |
| 131 | + //日期框 | |
| 132 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 133 | + }); | |
| 134 | + </script> | |
| 135 | +</body> | |
| 136 | +</html> | |
| 0 | 137 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/questiontype/questiontype_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="questiontype/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 | + </tr> | |
| 75 | + </thead> | |
| 76 | + | |
| 77 | + <tbody> | |
| 78 | + <!-- 开始循环 --> | |
| 79 | + <c:choose> | |
| 80 | + <c:when test="${not empty varList}"> | |
| 81 | + <c:if test="${QX.cha == 1 }"> | |
| 82 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 83 | + <tr> | |
| 84 | + <td class='center'> | |
| 85 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.QUESTIONTYPE_ID}" class="ace" /><span class="lbl"></span></label> | |
| 86 | + </td> | |
| 87 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 88 | + <td class='center'>${var.NAME}</td> | |
| 89 | + <td class='center'>${var.CREATE_DATE}</td> | |
| 90 | + <td class='center'>${var.MODIFY_DATE}</td> | |
| 91 | + <td class='center'>${var.REMARK}</td> | |
| 92 | + <td class="center"> | |
| 93 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 94 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 95 | + </c:if> | |
| 96 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 97 | + <c:if test="${QX.edit == 1 }"> | |
| 98 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.QUESTIONTYPE_ID}');"> | |
| 99 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 100 | + </a> | |
| 101 | + </c:if> | |
| 102 | + <c:if test="${QX.del == 1 }"> | |
| 103 | + <a class="btn btn-xs btn-danger" onclick="del('${var.QUESTIONTYPE_ID}');"> | |
| 104 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 105 | + </a> | |
| 106 | + </c:if> | |
| 107 | + </div> | |
| 108 | + <div class="hidden-md hidden-lg"> | |
| 109 | + <div class="inline pos-rel"> | |
| 110 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 111 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 112 | + </button> | |
| 113 | + | |
| 114 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 115 | + <c:if test="${QX.edit == 1 }"> | |
| 116 | + <li> | |
| 117 | + <a style="cursor:pointer;" onclick="edit('${var.QUESTIONTYPE_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 118 | + <span class="green"> | |
| 119 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 120 | + </span> | |
| 121 | + </a> | |
| 122 | + </li> | |
| 123 | + </c:if> | |
| 124 | + <c:if test="${QX.del == 1 }"> | |
| 125 | + <li> | |
| 126 | + <a style="cursor:pointer;" onclick="del('${var.QUESTIONTYPE_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 127 | + <span class="red"> | |
| 128 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 129 | + </span> | |
| 130 | + </a> | |
| 131 | + </li> | |
| 132 | + </c:if> | |
| 133 | + </ul> | |
| 134 | + </div> | |
| 135 | + </div> | |
| 136 | + </td> | |
| 137 | + </tr> | |
| 138 | + | |
| 139 | + </c:forEach> | |
| 140 | + </c:if> | |
| 141 | + <c:if test="${QX.cha == 0 }"> | |
| 142 | + <tr> | |
| 143 | + <td colspan="100" class="center">您无权查看</td> | |
| 144 | + </tr> | |
| 145 | + </c:if> | |
| 146 | + </c:when> | |
| 147 | + <c:otherwise> | |
| 148 | + <tr class="main_info"> | |
| 149 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 150 | + </tr> | |
| 151 | + </c:otherwise> | |
| 152 | + </c:choose> | |
| 153 | + </tbody> | |
| 154 | + </table> | |
| 155 | + <div class="page-header position-relative"> | |
| 156 | + <table style="width:100%;"> | |
| 157 | + <tr> | |
| 158 | + <td style="vertical-align:top;"> | |
| 159 | + <c:if test="${QX.add == 1 }"> | |
| 160 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 161 | + </c:if> | |
| 162 | + <c:if test="${QX.del == 1 }"> | |
| 163 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 164 | + </c:if> | |
| 165 | + </td> | |
| 166 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 167 | + </tr> | |
| 168 | + </table> | |
| 169 | + </div> | |
| 170 | + </form> | |
| 171 | + | |
| 172 | + </div> | |
| 173 | + <!-- /.col --> | |
| 174 | + </div> | |
| 175 | + <!-- /.row --> | |
| 176 | + </div> | |
| 177 | + <!-- /.page-content --> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + <!-- /.main-content --> | |
| 181 | + | |
| 182 | + <!-- 返回顶部 --> | |
| 183 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 184 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 185 | + </a> | |
| 186 | + | |
| 187 | + </div> | |
| 188 | + <!-- /.main-container --> | |
| 189 | + | |
| 190 | + <!-- basic scripts --> | |
| 191 | + <!-- 页面底部js¨ --> | |
| 192 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 193 | + <!-- 删除时确认窗口 --> | |
| 194 | + <script src="static/ace/js/bootbox.js"></script> | |
| 195 | + <!-- ace scripts --> | |
| 196 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 197 | + <!-- 下拉框 --> | |
| 198 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 199 | + <!-- 日期框 --> | |
| 200 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 201 | + <!--提示框--> | |
| 202 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 203 | + <script type="text/javascript"> | |
| 204 | + $(top.hangge());//关闭加载状态 | |
| 205 | + //检索 | |
| 206 | + function tosearch(){ | |
| 207 | + top.jzts(); | |
| 208 | + $("#Form").submit(); | |
| 209 | + } | |
| 210 | + $(function() { | |
| 211 | + | |
| 212 | + //日期框 | |
| 213 | + $('.date-picker').datepicker({ | |
| 214 | + autoclose: true, | |
| 215 | + todayHighlight: true | |
| 216 | + }); | |
| 217 | + | |
| 218 | + //下拉框 | |
| 219 | + if(!ace.vars['touch']) { | |
| 220 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 221 | + $(window) | |
| 222 | + .off('resize.chosen') | |
| 223 | + .on('resize.chosen', function() { | |
| 224 | + $('.chosen-select').each(function() { | |
| 225 | + var $this = $(this); | |
| 226 | + $this.next().css({'width': $this.parent().width()}); | |
| 227 | + }); | |
| 228 | + }).trigger('resize.chosen'); | |
| 229 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 230 | + if(event_name != 'sidebar_collapsed') return; | |
| 231 | + $('.chosen-select').each(function() { | |
| 232 | + var $this = $(this); | |
| 233 | + $this.next().css({'width': $this.parent().width()}); | |
| 234 | + }); | |
| 235 | + }); | |
| 236 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 237 | + var target = $(this).find('input[type=radio]'); | |
| 238 | + var which = parseInt(target.val()); | |
| 239 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 240 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 241 | + }); | |
| 242 | + } | |
| 243 | + | |
| 244 | + | |
| 245 | + //复选框全选控制 | |
| 246 | + var active_class = 'active'; | |
| 247 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 248 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 249 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 250 | + var row = this; | |
| 251 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 252 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 253 | + }); | |
| 254 | + }); | |
| 255 | + }); | |
| 256 | + | |
| 257 | + //新增 | |
| 258 | + function add(){ | |
| 259 | + top.jzts(); | |
| 260 | + var diag = new top.Dialog(); | |
| 261 | + diag.Drag=true; | |
| 262 | + diag.Title ="新增"; | |
| 263 | + diag.URL = '<%=basePath%>questiontype/goAdd.do'; | |
| 264 | + diag.Width = 450; | |
| 265 | + diag.Height = 355; | |
| 266 | + diag.Modal = true; //有无遮罩窗口 | |
| 267 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 268 | + diag.ShowMinButton = true; //最小化按钮 | |
| 269 | + diag.CancelEvent = function(){ //关闭事件 | |
| 270 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 271 | + if('${page.currentPage}' == '0'){ | |
| 272 | + tosearch(); | |
| 273 | + }else{ | |
| 274 | + tosearch(); | |
| 275 | + } | |
| 276 | + } | |
| 277 | + diag.close(); | |
| 278 | + }; | |
| 279 | + diag.show(); | |
| 280 | + } | |
| 281 | + | |
| 282 | + //删除 | |
| 283 | + function del(Id){ | |
| 284 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 285 | + if(result) { | |
| 286 | + top.jzts(); | |
| 287 | + var url = "<%=basePath%>questiontype/delete.do?QUESTIONTYPE_ID="+Id+"&tm="+new Date().getTime(); | |
| 288 | + $.get(url,function(data){ | |
| 289 | + tosearch(); | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + }); | |
| 293 | + } | |
| 294 | + | |
| 295 | + //修改 | |
| 296 | + function edit(Id){ | |
| 297 | + top.jzts(); | |
| 298 | + var diag = new top.Dialog(); | |
| 299 | + diag.Drag=true; | |
| 300 | + diag.Title ="编辑"; | |
| 301 | + diag.URL = '<%=basePath%>questiontype/goEdit.do?QUESTIONTYPE_ID='+Id; | |
| 302 | + diag.Width = 450; | |
| 303 | + diag.Height = 355; | |
| 304 | + diag.Modal = true; //有无遮罩窗口 | |
| 305 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 306 | + diag.ShowMinButton = true; //最小化按钮 | |
| 307 | + diag.CancelEvent = function(){ //关闭事件 | |
| 308 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 309 | + tosearch(); | |
| 310 | + } | |
| 311 | + diag.close(); | |
| 312 | + }; | |
| 313 | + diag.show(); | |
| 314 | + } | |
| 315 | + | |
| 316 | + //批量操作 | |
| 317 | + function makeAll(msg){ | |
| 318 | + bootbox.confirm(msg, function(result) { | |
| 319 | + if(result) { | |
| 320 | + var str = ''; | |
| 321 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 322 | + if(document.getElementsByName('ids')[i].checked){ | |
| 323 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 324 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 325 | + } | |
| 326 | + } | |
| 327 | + if(str==''){ | |
| 328 | + bootbox.dialog({ | |
| 329 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 330 | + buttons: | |
| 331 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 332 | + }); | |
| 333 | + $("#zcheckbox").tips({ | |
| 334 | + side:1, | |
| 335 | + msg:'点这里全选', | |
| 336 | + bg:'#AE81FF', | |
| 337 | + time:8 | |
| 338 | + }); | |
| 339 | + return; | |
| 340 | + }else{ | |
| 341 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 342 | + top.jzts(); | |
| 343 | + $.ajax({ | |
| 344 | + type: "POST", | |
| 345 | + url: '<%=basePath%>questiontype/deleteAll.do?tm='+new Date().getTime(), | |
| 346 | + data: {DATA_IDS:str}, | |
| 347 | + dataType:'json', | |
| 348 | + //beforeSend: validateData, | |
| 349 | + cache: false, | |
| 350 | + success: function(data){ | |
| 351 | + $.each(data.list, function(i, list){ | |
| 352 | + tosearch(); | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + }); | |
| 356 | + } | |
| 357 | + } | |
| 358 | + } | |
| 359 | + }); | |
| 360 | + }; | |
| 361 | + | |
| 362 | + //导出excel | |
| 363 | + function toExcel(){ | |
| 364 | + window.location.href='<%=basePath%>questiontype/excel.do'; | |
| 365 | + } | |
| 366 | + </script> | |
| 367 | + | |
| 368 | + | |
| 369 | +</body> | |
| 370 | +</html> | |
| 0 | 371 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/schoolgradesubject/schoolgradesubject_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="schoolgradesubject/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="SCHOOLGRADESUBJECT_ID" id="SCHOOLGRADESUBJECT_ID" value="${pd.SCHOOLGRADESUBJECT_ID}"/> | |
| 32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
| 33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
| 34 | + <tr> | |
| 35 | + <td style="width:75px;text-align: right;padding-top: 13px;">学校:</td> | |
| 36 | + <td><input type="number" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="32" placeholder="这里输入学校" title="学校" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">年级:</td> | |
| 40 | + <td><input type="number" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" 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="number" name="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="32" placeholder="这里输入科目" title="科目" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="text-align: center;" colspan="10"> | |
| 48 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 49 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 50 | + </td> | |
| 51 | + </tr> | |
| 52 | + </table> | |
| 53 | + </div> | |
| 54 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 55 | + </form> | |
| 56 | + </div> | |
| 57 | + <!-- /.col --> | |
| 58 | + </div> | |
| 59 | + <!-- /.row --> | |
| 60 | + </div> | |
| 61 | + <!-- /.page-content --> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <!-- /.main-content --> | |
| 65 | +</div> | |
| 66 | +<!-- /.main-container --> | |
| 67 | + | |
| 68 | + | |
| 69 | + <!-- 页面底部js¨ --> | |
| 70 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 71 | + <!-- 下拉框 --> | |
| 72 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 73 | + <!-- 日期框 --> | |
| 74 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 75 | + <!--提示框--> | |
| 76 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 77 | + <script type="text/javascript"> | |
| 78 | + $(top.hangge()); | |
| 79 | + //保存 | |
| 80 | + function save(){ | |
| 81 | + if($("#SCHOOL_ID").val()==""){ | |
| 82 | + $("#SCHOOL_ID").tips({ | |
| 83 | + side:3, | |
| 84 | + msg:'请输入学校', | |
| 85 | + bg:'#AE81FF', | |
| 86 | + time:2 | |
| 87 | + }); | |
| 88 | + $("#SCHOOL_ID").focus(); | |
| 89 | + return false; | |
| 90 | + } | |
| 91 | + if($("#GRADE_ID").val()==""){ | |
| 92 | + $("#GRADE_ID").tips({ | |
| 93 | + side:3, | |
| 94 | + msg:'请输入年级', | |
| 95 | + bg:'#AE81FF', | |
| 96 | + time:2 | |
| 97 | + }); | |
| 98 | + $("#GRADE_ID").focus(); | |
| 99 | + return false; | |
| 100 | + } | |
| 101 | + if($("#SUBJECT_ID").val()==""){ | |
| 102 | + $("#SUBJECT_ID").tips({ | |
| 103 | + side:3, | |
| 104 | + msg:'请输入科目', | |
| 105 | + bg:'#AE81FF', | |
| 106 | + time:2 | |
| 107 | + }); | |
| 108 | + $("#SUBJECT_ID").focus(); | |
| 109 | + return false; | |
| 110 | + } | |
| 111 | + $("#Form").submit(); | |
| 112 | + $("#zhongxin").hide(); | |
| 113 | + $("#zhongxin2").show(); | |
| 114 | + } | |
| 115 | + | |
| 116 | + $(function() { | |
| 117 | + //日期框 | |
| 118 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 119 | + }); | |
| 120 | + </script> | |
| 121 | +</body> | |
| 122 | +</html> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/schoolgradesubject/schoolgradesubject_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="schoolgradesubject/list.do" method="post" name="Form" id="Form"> | |
| 34 | + <table style="margin-top:5px;"> | |
| 35 | + <tr> | |
| 36 | + <td> | |
| 37 | + <div class="nav-search"> | |
| 38 | + <span class="input-icon"> | |
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + </td> | |
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 48 | + <option value=""></option> | |
| 49 | + <option value="">全部</option> | |
| 50 | + <option value="">1</option> | |
| 51 | + <option value="">2</option> | |
| 52 | + </select> | |
| 53 | + </td> | |
| 54 | + <c:if test="${QX.cha == 1 }"> | |
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 56 | + </c:if> | |
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + <!-- 检索 --> | |
| 61 | + | |
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 63 | + <thead> | |
| 64 | + <tr> | |
| 65 | + <th class="center" style="width:35px;"> | |
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 67 | + </th> | |
| 68 | + <th class="center" style="width:50px;">序号</th> | |
| 69 | + <th class="center">学校</th> | |
| 70 | + <th class="center">年级</th> | |
| 71 | + <th class="center">科目</th> | |
| 72 | + <th class="center">操作</th> | |
| 73 | + </tr> | |
| 74 | + </thead> | |
| 75 | + | |
| 76 | + <tbody> | |
| 77 | + <!-- 开始循环 --> | |
| 78 | + <c:choose> | |
| 79 | + <c:when test="${not empty varList}"> | |
| 80 | + <c:if test="${QX.cha == 1 }"> | |
| 81 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 82 | + <tr> | |
| 83 | + <td class='center'> | |
| 84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.SCHOOLGRADESUBJECT_ID}" class="ace" /><span class="lbl"></span></label> | |
| 85 | + </td> | |
| 86 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 87 | + <td class='center'>${var.SCHOOL_ID}</td> | |
| 88 | + <td class='center'>${var.GRADE_ID}</td> | |
| 89 | + <td class='center'>${var.SUBJECT_ID}</td> | |
| 90 | + <td class="center"> | |
| 91 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 92 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 93 | + </c:if> | |
| 94 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 95 | + <c:if test="${QX.edit == 1 }"> | |
| 96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.SCHOOLGRADESUBJECT_ID}');"> | |
| 97 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 98 | + </a> | |
| 99 | + </c:if> | |
| 100 | + <c:if test="${QX.del == 1 }"> | |
| 101 | + <a class="btn btn-xs btn-danger" onclick="del('${var.SCHOOLGRADESUBJECT_ID}');"> | |
| 102 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 103 | + </a> | |
| 104 | + </c:if> | |
| 105 | + </div> | |
| 106 | + <div class="hidden-md hidden-lg"> | |
| 107 | + <div class="inline pos-rel"> | |
| 108 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 109 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 110 | + </button> | |
| 111 | + | |
| 112 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 113 | + <c:if test="${QX.edit == 1 }"> | |
| 114 | + <li> | |
| 115 | + <a style="cursor:pointer;" onclick="edit('${var.SCHOOLGRADESUBJECT_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 116 | + <span class="green"> | |
| 117 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 118 | + </span> | |
| 119 | + </a> | |
| 120 | + </li> | |
| 121 | + </c:if> | |
| 122 | + <c:if test="${QX.del == 1 }"> | |
| 123 | + <li> | |
| 124 | + <a style="cursor:pointer;" onclick="del('${var.SCHOOLGRADESUBJECT_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 125 | + <span class="red"> | |
| 126 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 127 | + </span> | |
| 128 | + </a> | |
| 129 | + </li> | |
| 130 | + </c:if> | |
| 131 | + </ul> | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | + </td> | |
| 135 | + </tr> | |
| 136 | + | |
| 137 | + </c:forEach> | |
| 138 | + </c:if> | |
| 139 | + <c:if test="${QX.cha == 0 }"> | |
| 140 | + <tr> | |
| 141 | + <td colspan="100" class="center">您无权查看</td> | |
| 142 | + </tr> | |
| 143 | + </c:if> | |
| 144 | + </c:when> | |
| 145 | + <c:otherwise> | |
| 146 | + <tr class="main_info"> | |
| 147 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 148 | + </tr> | |
| 149 | + </c:otherwise> | |
| 150 | + </c:choose> | |
| 151 | + </tbody> | |
| 152 | + </table> | |
| 153 | + <div class="page-header position-relative"> | |
| 154 | + <table style="width:100%;"> | |
| 155 | + <tr> | |
| 156 | + <td style="vertical-align:top;"> | |
| 157 | + <c:if test="${QX.add == 1 }"> | |
| 158 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 159 | + </c:if> | |
| 160 | + <c:if test="${QX.del == 1 }"> | |
| 161 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 162 | + </c:if> | |
| 163 | + </td> | |
| 164 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 165 | + </tr> | |
| 166 | + </table> | |
| 167 | + </div> | |
| 168 | + </form> | |
| 169 | + | |
| 170 | + </div> | |
| 171 | + <!-- /.col --> | |
| 172 | + </div> | |
| 173 | + <!-- /.row --> | |
| 174 | + </div> | |
| 175 | + <!-- /.page-content --> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + <!-- /.main-content --> | |
| 179 | + | |
| 180 | + <!-- 返回顶部 --> | |
| 181 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 182 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 183 | + </a> | |
| 184 | + | |
| 185 | + </div> | |
| 186 | + <!-- /.main-container --> | |
| 187 | + | |
| 188 | + <!-- basic scripts --> | |
| 189 | + <!-- 页面底部js¨ --> | |
| 190 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 191 | + <!-- 删除时确认窗口 --> | |
| 192 | + <script src="static/ace/js/bootbox.js"></script> | |
| 193 | + <!-- ace scripts --> | |
| 194 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 195 | + <!-- 下拉框 --> | |
| 196 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 197 | + <!-- 日期框 --> | |
| 198 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 199 | + <!--提示框--> | |
| 200 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 201 | + <script type="text/javascript"> | |
| 202 | + $(top.hangge());//关闭加载状态 | |
| 203 | + //检索 | |
| 204 | + function tosearch(){ | |
| 205 | + top.jzts(); | |
| 206 | + $("#Form").submit(); | |
| 207 | + } | |
| 208 | + $(function() { | |
| 209 | + | |
| 210 | + //日期框 | |
| 211 | + $('.date-picker').datepicker({ | |
| 212 | + autoclose: true, | |
| 213 | + todayHighlight: true | |
| 214 | + }); | |
| 215 | + | |
| 216 | + //下拉框 | |
| 217 | + if(!ace.vars['touch']) { | |
| 218 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 219 | + $(window) | |
| 220 | + .off('resize.chosen') | |
| 221 | + .on('resize.chosen', function() { | |
| 222 | + $('.chosen-select').each(function() { | |
| 223 | + var $this = $(this); | |
| 224 | + $this.next().css({'width': $this.parent().width()}); | |
| 225 | + }); | |
| 226 | + }).trigger('resize.chosen'); | |
| 227 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 228 | + if(event_name != 'sidebar_collapsed') return; | |
| 229 | + $('.chosen-select').each(function() { | |
| 230 | + var $this = $(this); | |
| 231 | + $this.next().css({'width': $this.parent().width()}); | |
| 232 | + }); | |
| 233 | + }); | |
| 234 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 235 | + var target = $(this).find('input[type=radio]'); | |
| 236 | + var which = parseInt(target.val()); | |
| 237 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 238 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 239 | + }); | |
| 240 | + } | |
| 241 | + | |
| 242 | + | |
| 243 | + //复选框全选控制 | |
| 244 | + var active_class = 'active'; | |
| 245 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 246 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 247 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 248 | + var row = this; | |
| 249 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 250 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 251 | + }); | |
| 252 | + }); | |
| 253 | + }); | |
| 254 | + | |
| 255 | + //新增 | |
| 256 | + function add(){ | |
| 257 | + top.jzts(); | |
| 258 | + var diag = new top.Dialog(); | |
| 259 | + diag.Drag=true; | |
| 260 | + diag.Title ="新增"; | |
| 261 | + diag.URL = '<%=basePath%>schoolgradesubject/goAdd.do'; | |
| 262 | + diag.Width = 450; | |
| 263 | + diag.Height = 355; | |
| 264 | + diag.Modal = true; //有无遮罩窗口 | |
| 265 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 266 | + diag.ShowMinButton = true; //最小化按钮 | |
| 267 | + diag.CancelEvent = function(){ //关闭事件 | |
| 268 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 269 | + if('${page.currentPage}' == '0'){ | |
| 270 | + tosearch(); | |
| 271 | + }else{ | |
| 272 | + tosearch(); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + diag.close(); | |
| 276 | + }; | |
| 277 | + diag.show(); | |
| 278 | + } | |
| 279 | + | |
| 280 | + //删除 | |
| 281 | + function del(Id){ | |
| 282 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 283 | + if(result) { | |
| 284 | + top.jzts(); | |
| 285 | + var url = "<%=basePath%>schoolgradesubject/delete.do?SCHOOLGRADESUBJECT_ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | + $.get(url,function(data){ | |
| 287 | + tosearch(); | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + | |
| 293 | + //修改 | |
| 294 | + function edit(Id){ | |
| 295 | + top.jzts(); | |
| 296 | + var diag = new top.Dialog(); | |
| 297 | + diag.Drag=true; | |
| 298 | + diag.Title ="编辑"; | |
| 299 | + diag.URL = '<%=basePath%>schoolgradesubject/goEdit.do?SCHOOLGRADESUBJECT_ID='+Id; | |
| 300 | + diag.Width = 450; | |
| 301 | + diag.Height = 355; | |
| 302 | + diag.Modal = true; //有无遮罩窗口 | |
| 303 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 304 | + diag.ShowMinButton = true; //最小化按钮 | |
| 305 | + diag.CancelEvent = function(){ //关闭事件 | |
| 306 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 307 | + tosearch(); | |
| 308 | + } | |
| 309 | + diag.close(); | |
| 310 | + }; | |
| 311 | + diag.show(); | |
| 312 | + } | |
| 313 | + | |
| 314 | + //批量操作 | |
| 315 | + function makeAll(msg){ | |
| 316 | + bootbox.confirm(msg, function(result) { | |
| 317 | + if(result) { | |
| 318 | + var str = ''; | |
| 319 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 320 | + if(document.getElementsByName('ids')[i].checked){ | |
| 321 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 322 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 323 | + } | |
| 324 | + } | |
| 325 | + if(str==''){ | |
| 326 | + bootbox.dialog({ | |
| 327 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 328 | + buttons: | |
| 329 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 330 | + }); | |
| 331 | + $("#zcheckbox").tips({ | |
| 332 | + side:1, | |
| 333 | + msg:'点这里全选', | |
| 334 | + bg:'#AE81FF', | |
| 335 | + time:8 | |
| 336 | + }); | |
| 337 | + return; | |
| 338 | + }else{ | |
| 339 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 340 | + top.jzts(); | |
| 341 | + $.ajax({ | |
| 342 | + type: "POST", | |
| 343 | + url: '<%=basePath%>schoolgradesubject/deleteAll.do?tm='+new Date().getTime(), | |
| 344 | + data: {DATA_IDS:str}, | |
| 345 | + dataType:'json', | |
| 346 | + //beforeSend: validateData, | |
| 347 | + cache: false, | |
| 348 | + success: function(data){ | |
| 349 | + $.each(data.list, function(i, list){ | |
| 350 | + tosearch(); | |
| 351 | + }); | |
| 352 | + } | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + } | |
| 356 | + } | |
| 357 | + }); | |
| 358 | + }; | |
| 359 | + | |
| 360 | + //导出excel | |
| 361 | + function toExcel(){ | |
| 362 | + window.location.href='<%=basePath%>schoolgradesubject/excel.do'; | |
| 363 | + } | |
| 364 | + </script> | |
| 365 | + | |
| 366 | + | |
| 367 | +</body> | |
| 368 | +</html> | |
| 0 | 369 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/term/term_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="term/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="TERM_ID" id="TERM_ID" value="${pd.TERM_ID}"/> | |
| 32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
| 33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
| 34 | + <tr> | |
| 35 | + <td style="width:75px;text-align: right;padding-top: 13px;">名称:</td> | |
| 36 | + <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入名称" title="名称" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">起始时间:</td> | |
| 40 | + <td><input class="span10 date-picker" name="START_DATE" id="START_DATE" value="${pd.START_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="起始时间" title="起始时间" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">结束时间:</td> | |
| 44 | + <td><input class="span10 date-picker" name="END_DATE" id="END_DATE" value="${pd.END_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="结束时间" title="结束时间" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | |
| 48 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="text-align: center;" colspan="10"> | |
| 52 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 53 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 54 | + </td> | |
| 55 | + </tr> | |
| 56 | + </table> | |
| 57 | + </div> | |
| 58 | + <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> | |
| 59 | + </form> | |
| 60 | + </div> | |
| 61 | + <!-- /.col --> | |
| 62 | + </div> | |
| 63 | + <!-- /.row --> | |
| 64 | + </div> | |
| 65 | + <!-- /.page-content --> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <!-- /.main-content --> | |
| 69 | +</div> | |
| 70 | +<!-- /.main-container --> | |
| 71 | + | |
| 72 | + | |
| 73 | + <!-- 页面底部js¨ --> | |
| 74 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 75 | + <!-- 下拉框 --> | |
| 76 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 77 | + <!-- 日期框 --> | |
| 78 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 79 | + <!--提示框--> | |
| 80 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 81 | + <script type="text/javascript"> | |
| 82 | + $(top.hangge()); | |
| 83 | + //保存 | |
| 84 | + function save(){ | |
| 85 | + if($("#NAME").val()==""){ | |
| 86 | + $("#NAME").tips({ | |
| 87 | + side:3, | |
| 88 | + msg:'请输入名称', | |
| 89 | + bg:'#AE81FF', | |
| 90 | + time:2 | |
| 91 | + }); | |
| 92 | + $("#NAME").focus(); | |
| 93 | + return false; | |
| 94 | + } | |
| 95 | + if($("#START_DATE").val()==""){ | |
| 96 | + $("#START_DATE").tips({ | |
| 97 | + side:3, | |
| 98 | + msg:'请输入起始时间', | |
| 99 | + bg:'#AE81FF', | |
| 100 | + time:2 | |
| 101 | + }); | |
| 102 | + $("#START_DATE").focus(); | |
| 103 | + return false; | |
| 104 | + } | |
| 105 | + if($("#END_DATE").val()==""){ | |
| 106 | + $("#END_DATE").tips({ | |
| 107 | + side:3, | |
| 108 | + msg:'请输入结束时间', | |
| 109 | + bg:'#AE81FF', | |
| 110 | + time:2 | |
| 111 | + }); | |
| 112 | + $("#END_DATE").focus(); | |
| 113 | + return false; | |
| 114 | + } | |
| 115 | + if($("#REMARK").val()==""){ | |
| 116 | + $("#REMARK").tips({ | |
| 117 | + side:3, | |
| 118 | + msg:'请输入备注', | |
| 119 | + bg:'#AE81FF', | |
| 120 | + time:2 | |
| 121 | + }); | |
| 122 | + $("#REMARK").focus(); | |
| 123 | + return false; | |
| 124 | + } | |
| 125 | + $("#Form").submit(); | |
| 126 | + $("#zhongxin").hide(); | |
| 127 | + $("#zhongxin2").show(); | |
| 128 | + } | |
| 129 | + | |
| 130 | + $(function() { | |
| 131 | + //日期框 | |
| 132 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 133 | + }); | |
| 134 | + </script> | |
| 135 | +</body> | |
| 136 | +</html> | |
| 0 | 137 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/term/term_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="term/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 | + </tr> | |
| 75 | + </thead> | |
| 76 | + | |
| 77 | + <tbody> | |
| 78 | + <!-- 开始循环 --> | |
| 79 | + <c:choose> | |
| 80 | + <c:when test="${not empty varList}"> | |
| 81 | + <c:if test="${QX.cha == 1 }"> | |
| 82 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 83 | + <tr> | |
| 84 | + <td class='center'> | |
| 85 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.TERM_ID}" class="ace" /><span class="lbl"></span></label> | |
| 86 | + </td> | |
| 87 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 88 | + <td class='center'>${var.NAME}</td> | |
| 89 | + <td class='center'>${var.START_DATE}</td> | |
| 90 | + <td class='center'>${var.END_DATE}</td> | |
| 91 | + <td class='center'>${var.REMARK}</td> | |
| 92 | + <td class="center"> | |
| 93 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 94 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 95 | + </c:if> | |
| 96 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 97 | + <c:if test="${QX.edit == 1 }"> | |
| 98 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.TERM_ID}');"> | |
| 99 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 100 | + </a> | |
| 101 | + </c:if> | |
| 102 | + <c:if test="${QX.del == 1 }"> | |
| 103 | + <a class="btn btn-xs btn-danger" onclick="del('${var.TERM_ID}');"> | |
| 104 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 105 | + </a> | |
| 106 | + </c:if> | |
| 107 | + </div> | |
| 108 | + <div class="hidden-md hidden-lg"> | |
| 109 | + <div class="inline pos-rel"> | |
| 110 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 111 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 112 | + </button> | |
| 113 | + | |
| 114 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 115 | + <c:if test="${QX.edit == 1 }"> | |
| 116 | + <li> | |
| 117 | + <a style="cursor:pointer;" onclick="edit('${var.TERM_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 118 | + <span class="green"> | |
| 119 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 120 | + </span> | |
| 121 | + </a> | |
| 122 | + </li> | |
| 123 | + </c:if> | |
| 124 | + <c:if test="${QX.del == 1 }"> | |
| 125 | + <li> | |
| 126 | + <a style="cursor:pointer;" onclick="del('${var.TERM_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 127 | + <span class="red"> | |
| 128 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 129 | + </span> | |
| 130 | + </a> | |
| 131 | + </li> | |
| 132 | + </c:if> | |
| 133 | + </ul> | |
| 134 | + </div> | |
| 135 | + </div> | |
| 136 | + </td> | |
| 137 | + </tr> | |
| 138 | + | |
| 139 | + </c:forEach> | |
| 140 | + </c:if> | |
| 141 | + <c:if test="${QX.cha == 0 }"> | |
| 142 | + <tr> | |
| 143 | + <td colspan="100" class="center">您无权查看</td> | |
| 144 | + </tr> | |
| 145 | + </c:if> | |
| 146 | + </c:when> | |
| 147 | + <c:otherwise> | |
| 148 | + <tr class="main_info"> | |
| 149 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 150 | + </tr> | |
| 151 | + </c:otherwise> | |
| 152 | + </c:choose> | |
| 153 | + </tbody> | |
| 154 | + </table> | |
| 155 | + <div class="page-header position-relative"> | |
| 156 | + <table style="width:100%;"> | |
| 157 | + <tr> | |
| 158 | + <td style="vertical-align:top;"> | |
| 159 | + <c:if test="${QX.add == 1 }"> | |
| 160 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 161 | + </c:if> | |
| 162 | + <c:if test="${QX.del == 1 }"> | |
| 163 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 164 | + </c:if> | |
| 165 | + </td> | |
| 166 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 167 | + </tr> | |
| 168 | + </table> | |
| 169 | + </div> | |
| 170 | + </form> | |
| 171 | + | |
| 172 | + </div> | |
| 173 | + <!-- /.col --> | |
| 174 | + </div> | |
| 175 | + <!-- /.row --> | |
| 176 | + </div> | |
| 177 | + <!-- /.page-content --> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + <!-- /.main-content --> | |
| 181 | + | |
| 182 | + <!-- 返回顶部 --> | |
| 183 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 184 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 185 | + </a> | |
| 186 | + | |
| 187 | + </div> | |
| 188 | + <!-- /.main-container --> | |
| 189 | + | |
| 190 | + <!-- basic scripts --> | |
| 191 | + <!-- 页面底部js¨ --> | |
| 192 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 193 | + <!-- 删除时确认窗口 --> | |
| 194 | + <script src="static/ace/js/bootbox.js"></script> | |
| 195 | + <!-- ace scripts --> | |
| 196 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 197 | + <!-- 下拉框 --> | |
| 198 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 199 | + <!-- 日期框 --> | |
| 200 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 201 | + <!--提示框--> | |
| 202 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 203 | + <script type="text/javascript"> | |
| 204 | + $(top.hangge());//关闭加载状态 | |
| 205 | + //检索 | |
| 206 | + function tosearch(){ | |
| 207 | + top.jzts(); | |
| 208 | + $("#Form").submit(); | |
| 209 | + } | |
| 210 | + $(function() { | |
| 211 | + | |
| 212 | + //日期框 | |
| 213 | + $('.date-picker').datepicker({ | |
| 214 | + autoclose: true, | |
| 215 | + todayHighlight: true | |
| 216 | + }); | |
| 217 | + | |
| 218 | + //下拉框 | |
| 219 | + if(!ace.vars['touch']) { | |
| 220 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 221 | + $(window) | |
| 222 | + .off('resize.chosen') | |
| 223 | + .on('resize.chosen', function() { | |
| 224 | + $('.chosen-select').each(function() { | |
| 225 | + var $this = $(this); | |
| 226 | + $this.next().css({'width': $this.parent().width()}); | |
| 227 | + }); | |
| 228 | + }).trigger('resize.chosen'); | |
| 229 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 230 | + if(event_name != 'sidebar_collapsed') return; | |
| 231 | + $('.chosen-select').each(function() { | |
| 232 | + var $this = $(this); | |
| 233 | + $this.next().css({'width': $this.parent().width()}); | |
| 234 | + }); | |
| 235 | + }); | |
| 236 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 237 | + var target = $(this).find('input[type=radio]'); | |
| 238 | + var which = parseInt(target.val()); | |
| 239 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 240 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 241 | + }); | |
| 242 | + } | |
| 243 | + | |
| 244 | + | |
| 245 | + //复选框全选控制 | |
| 246 | + var active_class = 'active'; | |
| 247 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 248 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 249 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 250 | + var row = this; | |
| 251 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 252 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 253 | + }); | |
| 254 | + }); | |
| 255 | + }); | |
| 256 | + | |
| 257 | + //新增 | |
| 258 | + function add(){ | |
| 259 | + top.jzts(); | |
| 260 | + var diag = new top.Dialog(); | |
| 261 | + diag.Drag=true; | |
| 262 | + diag.Title ="新增"; | |
| 263 | + diag.URL = '<%=basePath%>term/goAdd.do'; | |
| 264 | + diag.Width = 450; | |
| 265 | + diag.Height = 355; | |
| 266 | + diag.Modal = true; //有无遮罩窗口 | |
| 267 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 268 | + diag.ShowMinButton = true; //最小化按钮 | |
| 269 | + diag.CancelEvent = function(){ //关闭事件 | |
| 270 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 271 | + if('${page.currentPage}' == '0'){ | |
| 272 | + tosearch(); | |
| 273 | + }else{ | |
| 274 | + tosearch(); | |
| 275 | + } | |
| 276 | + } | |
| 277 | + diag.close(); | |
| 278 | + }; | |
| 279 | + diag.show(); | |
| 280 | + } | |
| 281 | + | |
| 282 | + //删除 | |
| 283 | + function del(Id){ | |
| 284 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 285 | + if(result) { | |
| 286 | + top.jzts(); | |
| 287 | + var url = "<%=basePath%>term/delete.do?TERM_ID="+Id+"&tm="+new Date().getTime(); | |
| 288 | + $.get(url,function(data){ | |
| 289 | + tosearch(); | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + }); | |
| 293 | + } | |
| 294 | + | |
| 295 | + //修改 | |
| 296 | + function edit(Id){ | |
| 297 | + top.jzts(); | |
| 298 | + var diag = new top.Dialog(); | |
| 299 | + diag.Drag=true; | |
| 300 | + diag.Title ="编辑"; | |
| 301 | + diag.URL = '<%=basePath%>term/goEdit.do?TERM_ID='+Id; | |
| 302 | + diag.Width = 450; | |
| 303 | + diag.Height = 355; | |
| 304 | + diag.Modal = true; //有无遮罩窗口 | |
| 305 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 306 | + diag.ShowMinButton = true; //最小化按钮 | |
| 307 | + diag.CancelEvent = function(){ //关闭事件 | |
| 308 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 309 | + tosearch(); | |
| 310 | + } | |
| 311 | + diag.close(); | |
| 312 | + }; | |
| 313 | + diag.show(); | |
| 314 | + } | |
| 315 | + | |
| 316 | + //批量操作 | |
| 317 | + function makeAll(msg){ | |
| 318 | + bootbox.confirm(msg, function(result) { | |
| 319 | + if(result) { | |
| 320 | + var str = ''; | |
| 321 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 322 | + if(document.getElementsByName('ids')[i].checked){ | |
| 323 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 324 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 325 | + } | |
| 326 | + } | |
| 327 | + if(str==''){ | |
| 328 | + bootbox.dialog({ | |
| 329 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 330 | + buttons: | |
| 331 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 332 | + }); | |
| 333 | + $("#zcheckbox").tips({ | |
| 334 | + side:1, | |
| 335 | + msg:'点这里全选', | |
| 336 | + bg:'#AE81FF', | |
| 337 | + time:8 | |
| 338 | + }); | |
| 339 | + return; | |
| 340 | + }else{ | |
| 341 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 342 | + top.jzts(); | |
| 343 | + $.ajax({ | |
| 344 | + type: "POST", | |
| 345 | + url: '<%=basePath%>term/deleteAll.do?tm='+new Date().getTime(), | |
| 346 | + data: {DATA_IDS:str}, | |
| 347 | + dataType:'json', | |
| 348 | + //beforeSend: validateData, | |
| 349 | + cache: false, | |
| 350 | + success: function(data){ | |
| 351 | + $.each(data.list, function(i, list){ | |
| 352 | + tosearch(); | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + }); | |
| 356 | + } | |
| 357 | + } | |
| 358 | + } | |
| 359 | + }); | |
| 360 | + }; | |
| 361 | + | |
| 362 | + //导出excel | |
| 363 | + function toExcel(){ | |
| 364 | + window.location.href='<%=basePath%>term/excel.do'; | |
| 365 | + } | |
| 366 | + </script> | |
| 367 | + | |
| 368 | + | |
| 369 | +</body> | |
| 370 | +</html> | |
| 0 | 371 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/testpaper/testpaper_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="testpaper/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="TESTPAPER_ID" id="TESTPAPER_ID" value="${pd.TESTPAPER_ID}"/> | |
| 32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
| 33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
| 34 | + <tr> | |
| 35 | + <td style="width:75px;text-align: right;padding-top: 13px;">测验名称:</td> | |
| 36 | + <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入测验名称" title="测验名称" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">试卷:</td> | |
| 40 | + <td><input type="text" name="PAPER_ID" id="PAPER_ID" value="${pd.PAPER_ID}" maxlength="255" placeholder="这里输入试卷" title="试卷" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级:</td> | |
| 44 | + <td><input type="text" name="SCLASS_ID" id="SCLASS_ID" value="${pd.SCLASS_ID}" maxlength="255" placeholder="这里输入班级" title="班级" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">老师:</td> | |
| 48 | + <td><input type="text" name="TEACHER_ID" id="TEACHER_ID" value="${pd.TEACHER_ID}" maxlength="255" placeholder="这里输入老师" title="老师" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">开始时间:</td> | |
| 52 | + <td><input class="span10 date-picker" name="START_DATE" id="START_DATE" value="${pd.START_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="开始时间" title="开始时间" style="width:98%;"/></td> | |
| 53 | + </tr> | |
| 54 | + <tr> | |
| 55 | + <td style="width:75px;text-align: right;padding-top: 13px;">结束时间:</td> | |
| 56 | + <td><input class="span10 date-picker" name="END_DATE" id="END_DATE" value="${pd.END_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="结束时间" title="结束时间" style="width:98%;"/></td> | |
| 57 | + </tr> | |
| 58 | + <tr> | |
| 59 | + <td style="width:75px;text-align: right;padding-top: 13px;">创建时间:</td> | |
| 60 | + <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> | |
| 61 | + </tr> | |
| 62 | + <tr> | |
| 63 | + <td style="width:75px;text-align: right;padding-top: 13px;">主观题分值:</td> | |
| 64 | + <td><input type="number" name="OTHER_SCORE" id="OTHER_SCORE" value="${pd.OTHER_SCORE}" 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="number" name="HIGHT_SCORE" id="HIGHT_SCORE" value="${pd.HIGHT_SCORE}" maxlength="32" 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="number" name="LOW_SCORE" id="LOW_SCORE" value="${pd.LOW_SCORE}" maxlength="32" 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="number" name="AVG_SCORE" id="AVG_SCORE" value="${pd.AVG_SCORE}" maxlength="32" placeholder="这里输入平均分" title="平均分" 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="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" 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($("#NAME").val()==""){ | |
| 118 | + $("#NAME").tips({ | |
| 119 | + side:3, | |
| 120 | + msg:'请输入测验名称', | |
| 121 | + bg:'#AE81FF', | |
| 122 | + time:2 | |
| 123 | + }); | |
| 124 | + $("#NAME").focus(); | |
| 125 | + return false; | |
| 126 | + } | |
| 127 | + if($("#PAPER_ID").val()==""){ | |
| 128 | + $("#PAPER_ID").tips({ | |
| 129 | + side:3, | |
| 130 | + msg:'请输入试卷', | |
| 131 | + bg:'#AE81FF', | |
| 132 | + time:2 | |
| 133 | + }); | |
| 134 | + $("#PAPER_ID").focus(); | |
| 135 | + return false; | |
| 136 | + } | |
| 137 | + if($("#SCLASS_ID").val()==""){ | |
| 138 | + $("#SCLASS_ID").tips({ | |
| 139 | + side:3, | |
| 140 | + msg:'请输入班级', | |
| 141 | + bg:'#AE81FF', | |
| 142 | + time:2 | |
| 143 | + }); | |
| 144 | + $("#SCLASS_ID").focus(); | |
| 145 | + return false; | |
| 146 | + } | |
| 147 | + if($("#TEACHER_ID").val()==""){ | |
| 148 | + $("#TEACHER_ID").tips({ | |
| 149 | + side:3, | |
| 150 | + msg:'请输入老师', | |
| 151 | + bg:'#AE81FF', | |
| 152 | + time:2 | |
| 153 | + }); | |
| 154 | + $("#TEACHER_ID").focus(); | |
| 155 | + return false; | |
| 156 | + } | |
| 157 | + if($("#START_DATE").val()==""){ | |
| 158 | + $("#START_DATE").tips({ | |
| 159 | + side:3, | |
| 160 | + msg:'请输入开始时间', | |
| 161 | + bg:'#AE81FF', | |
| 162 | + time:2 | |
| 163 | + }); | |
| 164 | + $("#START_DATE").focus(); | |
| 165 | + return false; | |
| 166 | + } | |
| 167 | + if($("#END_DATE").val()==""){ | |
| 168 | + $("#END_DATE").tips({ | |
| 169 | + side:3, | |
| 170 | + msg:'请输入结束时间', | |
| 171 | + bg:'#AE81FF', | |
| 172 | + time:2 | |
| 173 | + }); | |
| 174 | + $("#END_DATE").focus(); | |
| 175 | + return false; | |
| 176 | + } | |
| 177 | + if($("#CREATE_DATE").val()==""){ | |
| 178 | + $("#CREATE_DATE").tips({ | |
| 179 | + side:3, | |
| 180 | + msg:'请输入创建时间', | |
| 181 | + bg:'#AE81FF', | |
| 182 | + time:2 | |
| 183 | + }); | |
| 184 | + $("#CREATE_DATE").focus(); | |
| 185 | + return false; | |
| 186 | + } | |
| 187 | + if($("#OTHER_SCORE").val()==""){ | |
| 188 | + $("#OTHER_SCORE").tips({ | |
| 189 | + side:3, | |
| 190 | + msg:'请输入主观题分值', | |
| 191 | + bg:'#AE81FF', | |
| 192 | + time:2 | |
| 193 | + }); | |
| 194 | + $("#OTHER_SCORE").focus(); | |
| 195 | + return false; | |
| 196 | + } | |
| 197 | + if($("#HIGHT_SCORE").val()==""){ | |
| 198 | + $("#HIGHT_SCORE").tips({ | |
| 199 | + side:3, | |
| 200 | + msg:'请输入测验最高分', | |
| 201 | + bg:'#AE81FF', | |
| 202 | + time:2 | |
| 203 | + }); | |
| 204 | + $("#HIGHT_SCORE").focus(); | |
| 205 | + return false; | |
| 206 | + } | |
| 207 | + if($("#LOW_SCORE").val()==""){ | |
| 208 | + $("#LOW_SCORE").tips({ | |
| 209 | + side:3, | |
| 210 | + msg:'请输入最低分', | |
| 211 | + bg:'#AE81FF', | |
| 212 | + time:2 | |
| 213 | + }); | |
| 214 | + $("#LOW_SCORE").focus(); | |
| 215 | + return false; | |
| 216 | + } | |
| 217 | + if($("#AVG_SCORE").val()==""){ | |
| 218 | + $("#AVG_SCORE").tips({ | |
| 219 | + side:3, | |
| 220 | + msg:'请输入平均分', | |
| 221 | + bg:'#AE81FF', | |
| 222 | + time:2 | |
| 223 | + }); | |
| 224 | + $("#AVG_SCORE").focus(); | |
| 225 | + return false; | |
| 226 | + } | |
| 227 | + if($("#REMARK").val()==""){ | |
| 228 | + $("#REMARK").tips({ | |
| 229 | + side:3, | |
| 230 | + msg:'请输入备注', | |
| 231 | + bg:'#AE81FF', | |
| 232 | + time:2 | |
| 233 | + }); | |
| 234 | + $("#REMARK").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 | 249 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/testpaper/testpaper_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="testpaper/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.TESTPAPER_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.NAME}</td> | |
| 97 | + <td class='center'>${var.PAPER_ID}</td> | |
| 98 | + <td class='center'>${var.SCLASS_ID}</td> | |
| 99 | + <td class='center'>${var.TEACHER_ID}</td> | |
| 100 | + <td class='center'>${var.START_DATE}</td> | |
| 101 | + <td class='center'>${var.END_DATE}</td> | |
| 102 | + <td class='center'>${var.CREATE_DATE}</td> | |
| 103 | + <td class='center'>${var.OTHER_SCORE}</td> | |
| 104 | + <td class='center'>${var.HIGHT_SCORE}</td> | |
| 105 | + <td class='center'>${var.LOW_SCORE}</td> | |
| 106 | + <td class='center'>${var.AVG_SCORE}</td> | |
| 107 | + <td class='center'>${var.REMARK}</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.TESTPAPER_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.TESTPAPER_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.TESTPAPER_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.TESTPAPER_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%>testpaper/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%>testpaper/delete.do?TESTPAPER_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%>testpaper/goEdit.do?TESTPAPER_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%>testpaper/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%>testpaper/excel.do'; | |
| 381 | + } | |
| 382 | + </script> | |
| 383 | + | |
| 384 | + | |
| 385 | +</body> | |
| 386 | +</html> | |
| 0 | 387 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/testpaperinfo/testpaperinfo_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="testpaperinfo/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="TESTPAPERINFO_ID" id="TESTPAPERINFO_ID" value="${pd.TESTPAPERINFO_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="255" placeholder="这里输入试卷" title="试卷" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">学生:</td> | |
| 40 | + <td><input type="text" name="STUDENT_ID" id="STUDENT_ID" value="${pd.STUDENT_ID}" maxlength="255" placeholder="这里输入学生" title="学生" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">测验:</td> | |
| 44 | + <td><input type="text" name="TEST_ID" id="TEST_ID" value="${pd.TEST_ID}" maxlength="255" placeholder="这里输入测验" title="测验" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">题目:</td> | |
| 48 | + <td><input type="text" name="QUESTION_ID" id="QUESTION_ID" value="${pd.QUESTION_ID}" maxlength="255" placeholder="这里输入题目" title="题目" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">学生答案:</td> | |
| 52 | + <td><input type="text" name="ANSWER" id="ANSWER" value="${pd.ANSWER}" 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="number" name="RIGHT" id="RIGHT" value="${pd.RIGHT}" maxlength="32" 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="number" name="SCORE" id="SCORE" value="${pd.SCORE}" maxlength="32" 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="LIKES" id="LIKES" value="${pd.LIKES}" 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="ANSWER_TYPE" id="ANSWER_TYPE" value="${pd.ANSWER_TYPE}" maxlength="255" placeholder="这里输入答题类型" title="答题类型" style="width:98%;"/></td> | |
| 69 | + </tr> | |
| 70 | + <tr> | |
| 71 | + <td style="width:75px;text-align: right;padding-top: 13px;">按键时间:</td> | |
| 72 | + <td><input type="text" name="PRESS_TIME" id="PRESS_TIME" value="${pd.PRESS_TIME}" maxlength="255" 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 class="span10 date-picker" name="RECEIVER_DATE" id="RECEIVER_DATE" value="${pd.RECEIVER_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="接收时间" title="接收时间" style="width:98%;"/></td> | |
| 77 | + </tr> | |
| 78 | + <tr> | |
| 79 | + <td style="width:75px;text-align: right;padding-top: 13px;">是否主观题:</td> | |
| 80 | + <td><input type="number" name="SUBJECTIVE" id="SUBJECTIVE" value="${pd.SUBJECTIVE}" maxlength="32" placeholder="这里输入是否主观题" title="是否主观题" style="width:98%;"/></td> | |
| 81 | + </tr> | |
| 82 | + <tr> | |
| 83 | + <td style="width:75px;text-align: right;padding-top: 13px;">笔记:</td> | |
| 84 | + <td><input type="text" name="NOTE" id="NOTE" value="${pd.NOTE}" maxlength="255" placeholder="这里输入笔记" title="笔记" style="width:98%;"/></td> | |
| 85 | + </tr> | |
| 86 | + <tr> | |
| 87 | + <td style="width:75px;text-align: right;padding-top: 13px;">标记等级:</td> | |
| 88 | + <td><input type="text" name="MARK_NO" id="MARK_NO" value="${pd.MARK_NO}" maxlength="1" placeholder="这里输入标记等级" title="标记等级" style="width:98%;"/></td> | |
| 89 | + </tr> | |
| 90 | + <tr> | |
| 91 | + <td style="text-align: center;" colspan="10"> | |
| 92 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 93 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 94 | + </td> | |
| 95 | + </tr> | |
| 96 | + </table> | |
| 97 | + </div> | |
| 98 | + <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> | |
| 99 | + </form> | |
| 100 | + </div> | |
| 101 | + <!-- /.col --> | |
| 102 | + </div> | |
| 103 | + <!-- /.row --> | |
| 104 | + </div> | |
| 105 | + <!-- /.page-content --> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + <!-- /.main-content --> | |
| 109 | +</div> | |
| 110 | +<!-- /.main-container --> | |
| 111 | + | |
| 112 | + | |
| 113 | + <!-- 页面底部js¨ --> | |
| 114 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 115 | + <!-- 下拉框 --> | |
| 116 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 117 | + <!-- 日期框 --> | |
| 118 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 119 | + <!--提示框--> | |
| 120 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 121 | + <script type="text/javascript"> | |
| 122 | + $(top.hangge()); | |
| 123 | + //保存 | |
| 124 | + function save(){ | |
| 125 | + if($("#PAPER_ID").val()==""){ | |
| 126 | + $("#PAPER_ID").tips({ | |
| 127 | + side:3, | |
| 128 | + msg:'请输入试卷', | |
| 129 | + bg:'#AE81FF', | |
| 130 | + time:2 | |
| 131 | + }); | |
| 132 | + $("#PAPER_ID").focus(); | |
| 133 | + return false; | |
| 134 | + } | |
| 135 | + if($("#STUDENT_ID").val()==""){ | |
| 136 | + $("#STUDENT_ID").tips({ | |
| 137 | + side:3, | |
| 138 | + msg:'请输入学生', | |
| 139 | + bg:'#AE81FF', | |
| 140 | + time:2 | |
| 141 | + }); | |
| 142 | + $("#STUDENT_ID").focus(); | |
| 143 | + return false; | |
| 144 | + } | |
| 145 | + if($("#TEST_ID").val()==""){ | |
| 146 | + $("#TEST_ID").tips({ | |
| 147 | + side:3, | |
| 148 | + msg:'请输入测验', | |
| 149 | + bg:'#AE81FF', | |
| 150 | + time:2 | |
| 151 | + }); | |
| 152 | + $("#TEST_ID").focus(); | |
| 153 | + return false; | |
| 154 | + } | |
| 155 | + if($("#QUESTION_ID").val()==""){ | |
| 156 | + $("#QUESTION_ID").tips({ | |
| 157 | + side:3, | |
| 158 | + msg:'请输入题目', | |
| 159 | + bg:'#AE81FF', | |
| 160 | + time:2 | |
| 161 | + }); | |
| 162 | + $("#QUESTION_ID").focus(); | |
| 163 | + return false; | |
| 164 | + } | |
| 165 | + if($("#ANSWER").val()==""){ | |
| 166 | + $("#ANSWER").tips({ | |
| 167 | + side:3, | |
| 168 | + msg:'请输入学生答案', | |
| 169 | + bg:'#AE81FF', | |
| 170 | + time:2 | |
| 171 | + }); | |
| 172 | + $("#ANSWER").focus(); | |
| 173 | + return false; | |
| 174 | + } | |
| 175 | + if($("#RIGHT").val()==""){ | |
| 176 | + $("#RIGHT").tips({ | |
| 177 | + side:3, | |
| 178 | + msg:'请输入是否正确', | |
| 179 | + bg:'#AE81FF', | |
| 180 | + time:2 | |
| 181 | + }); | |
| 182 | + $("#RIGHT").focus(); | |
| 183 | + return false; | |
| 184 | + } | |
| 185 | + if($("#SCORE").val()==""){ | |
| 186 | + $("#SCORE").tips({ | |
| 187 | + side:3, | |
| 188 | + msg:'请输入得分', | |
| 189 | + bg:'#AE81FF', | |
| 190 | + time:2 | |
| 191 | + }); | |
| 192 | + $("#SCORE").focus(); | |
| 193 | + return false; | |
| 194 | + } | |
| 195 | + if($("#LIKES").val()==""){ | |
| 196 | + $("#LIKES").tips({ | |
| 197 | + side:3, | |
| 198 | + msg:'请输入是否点赞', | |
| 199 | + bg:'#AE81FF', | |
| 200 | + time:2 | |
| 201 | + }); | |
| 202 | + $("#LIKES").focus(); | |
| 203 | + return false; | |
| 204 | + } | |
| 205 | + if($("#ANSWER_TYPE").val()==""){ | |
| 206 | + $("#ANSWER_TYPE").tips({ | |
| 207 | + side:3, | |
| 208 | + msg:'请输入答题类型', | |
| 209 | + bg:'#AE81FF', | |
| 210 | + time:2 | |
| 211 | + }); | |
| 212 | + $("#ANSWER_TYPE").focus(); | |
| 213 | + return false; | |
| 214 | + } | |
| 215 | + if($("#PRESS_TIME").val()==""){ | |
| 216 | + $("#PRESS_TIME").tips({ | |
| 217 | + side:3, | |
| 218 | + msg:'请输入按键时间', | |
| 219 | + bg:'#AE81FF', | |
| 220 | + time:2 | |
| 221 | + }); | |
| 222 | + $("#PRESS_TIME").focus(); | |
| 223 | + return false; | |
| 224 | + } | |
| 225 | + if($("#RECEIVER_DATE").val()==""){ | |
| 226 | + $("#RECEIVER_DATE").tips({ | |
| 227 | + side:3, | |
| 228 | + msg:'请输入接收时间', | |
| 229 | + bg:'#AE81FF', | |
| 230 | + time:2 | |
| 231 | + }); | |
| 232 | + $("#RECEIVER_DATE").focus(); | |
| 233 | + return false; | |
| 234 | + } | |
| 235 | + if($("#SUBJECTIVE").val()==""){ | |
| 236 | + $("#SUBJECTIVE").tips({ | |
| 237 | + side:3, | |
| 238 | + msg:'请输入是否主观题', | |
| 239 | + bg:'#AE81FF', | |
| 240 | + time:2 | |
| 241 | + }); | |
| 242 | + $("#SUBJECTIVE").focus(); | |
| 243 | + return false; | |
| 244 | + } | |
| 245 | + if($("#NOTE").val()==""){ | |
| 246 | + $("#NOTE").tips({ | |
| 247 | + side:3, | |
| 248 | + msg:'请输入笔记', | |
| 249 | + bg:'#AE81FF', | |
| 250 | + time:2 | |
| 251 | + }); | |
| 252 | + $("#NOTE").focus(); | |
| 253 | + return false; | |
| 254 | + } | |
| 255 | + if($("#MARK_NO").val()==""){ | |
| 256 | + $("#MARK_NO").tips({ | |
| 257 | + side:3, | |
| 258 | + msg:'请输入标记等级', | |
| 259 | + bg:'#AE81FF', | |
| 260 | + time:2 | |
| 261 | + }); | |
| 262 | + $("#MARK_NO").focus(); | |
| 263 | + return false; | |
| 264 | + } | |
| 265 | + $("#Form").submit(); | |
| 266 | + $("#zhongxin").hide(); | |
| 267 | + $("#zhongxin2").show(); | |
| 268 | + } | |
| 269 | + | |
| 270 | + $(function() { | |
| 271 | + //日期框 | |
| 272 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 273 | + }); | |
| 274 | + </script> | |
| 275 | +</body> | |
| 276 | +</html> | |
| 0 | 277 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/testpaperinfo/testpaperinfo_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="testpaperinfo/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 | + <th class="center">标记等级</th> | |
| 83 | + <th class="center">操作</th> | |
| 84 | + </tr> | |
| 85 | + </thead> | |
| 86 | + | |
| 87 | + <tbody> | |
| 88 | + <!-- 开始循环 --> | |
| 89 | + <c:choose> | |
| 90 | + <c:when test="${not empty varList}"> | |
| 91 | + <c:if test="${QX.cha == 1 }"> | |
| 92 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 93 | + <tr> | |
| 94 | + <td class='center'> | |
| 95 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.TESTPAPERINFO_ID}" class="ace" /><span class="lbl"></span></label> | |
| 96 | + </td> | |
| 97 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 98 | + <td class='center'>${var.PAPER_ID}</td> | |
| 99 | + <td class='center'>${var.STUDENT_ID}</td> | |
| 100 | + <td class='center'>${var.TEST_ID}</td> | |
| 101 | + <td class='center'>${var.QUESTION_ID}</td> | |
| 102 | + <td class='center'>${var.ANSWER}</td> | |
| 103 | + <td class='center'>${var.RIGHT}</td> | |
| 104 | + <td class='center'>${var.SCORE}</td> | |
| 105 | + <td class='center'>${var.LIKES}</td> | |
| 106 | + <td class='center'>${var.ANSWER_TYPE}</td> | |
| 107 | + <td class='center'>${var.PRESS_TIME}</td> | |
| 108 | + <td class='center'>${var.RECEIVER_DATE}</td> | |
| 109 | + <td class='center'>${var.SUBJECTIVE}</td> | |
| 110 | + <td class='center'>${var.NOTE}</td> | |
| 111 | + <td class='center'>${var.MARK_NO}</td> | |
| 112 | + <td class="center"> | |
| 113 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 114 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 115 | + </c:if> | |
| 116 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 117 | + <c:if test="${QX.edit == 1 }"> | |
| 118 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.TESTPAPERINFO_ID}');"> | |
| 119 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 120 | + </a> | |
| 121 | + </c:if> | |
| 122 | + <c:if test="${QX.del == 1 }"> | |
| 123 | + <a class="btn btn-xs btn-danger" onclick="del('${var.TESTPAPERINFO_ID}');"> | |
| 124 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 125 | + </a> | |
| 126 | + </c:if> | |
| 127 | + </div> | |
| 128 | + <div class="hidden-md hidden-lg"> | |
| 129 | + <div class="inline pos-rel"> | |
| 130 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 131 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 132 | + </button> | |
| 133 | + | |
| 134 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 135 | + <c:if test="${QX.edit == 1 }"> | |
| 136 | + <li> | |
| 137 | + <a style="cursor:pointer;" onclick="edit('${var.TESTPAPERINFO_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 138 | + <span class="green"> | |
| 139 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 140 | + </span> | |
| 141 | + </a> | |
| 142 | + </li> | |
| 143 | + </c:if> | |
| 144 | + <c:if test="${QX.del == 1 }"> | |
| 145 | + <li> | |
| 146 | + <a style="cursor:pointer;" onclick="del('${var.TESTPAPERINFO_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 147 | + <span class="red"> | |
| 148 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 149 | + </span> | |
| 150 | + </a> | |
| 151 | + </li> | |
| 152 | + </c:if> | |
| 153 | + </ul> | |
| 154 | + </div> | |
| 155 | + </div> | |
| 156 | + </td> | |
| 157 | + </tr> | |
| 158 | + | |
| 159 | + </c:forEach> | |
| 160 | + </c:if> | |
| 161 | + <c:if test="${QX.cha == 0 }"> | |
| 162 | + <tr> | |
| 163 | + <td colspan="100" class="center">您无权查看</td> | |
| 164 | + </tr> | |
| 165 | + </c:if> | |
| 166 | + </c:when> | |
| 167 | + <c:otherwise> | |
| 168 | + <tr class="main_info"> | |
| 169 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 170 | + </tr> | |
| 171 | + </c:otherwise> | |
| 172 | + </c:choose> | |
| 173 | + </tbody> | |
| 174 | + </table> | |
| 175 | + <div class="page-header position-relative"> | |
| 176 | + <table style="width:100%;"> | |
| 177 | + <tr> | |
| 178 | + <td style="vertical-align:top;"> | |
| 179 | + <c:if test="${QX.add == 1 }"> | |
| 180 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 181 | + </c:if> | |
| 182 | + <c:if test="${QX.del == 1 }"> | |
| 183 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 184 | + </c:if> | |
| 185 | + </td> | |
| 186 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 187 | + </tr> | |
| 188 | + </table> | |
| 189 | + </div> | |
| 190 | + </form> | |
| 191 | + | |
| 192 | + </div> | |
| 193 | + <!-- /.col --> | |
| 194 | + </div> | |
| 195 | + <!-- /.row --> | |
| 196 | + </div> | |
| 197 | + <!-- /.page-content --> | |
| 198 | + </div> | |
| 199 | + </div> | |
| 200 | + <!-- /.main-content --> | |
| 201 | + | |
| 202 | + <!-- 返回顶部 --> | |
| 203 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 204 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 205 | + </a> | |
| 206 | + | |
| 207 | + </div> | |
| 208 | + <!-- /.main-container --> | |
| 209 | + | |
| 210 | + <!-- basic scripts --> | |
| 211 | + <!-- 页面底部js¨ --> | |
| 212 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 213 | + <!-- 删除时确认窗口 --> | |
| 214 | + <script src="static/ace/js/bootbox.js"></script> | |
| 215 | + <!-- ace scripts --> | |
| 216 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 217 | + <!-- 下拉框 --> | |
| 218 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 219 | + <!-- 日期框 --> | |
| 220 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 221 | + <!--提示框--> | |
| 222 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 223 | + <script type="text/javascript"> | |
| 224 | + $(top.hangge());//关闭加载状态 | |
| 225 | + //检索 | |
| 226 | + function tosearch(){ | |
| 227 | + top.jzts(); | |
| 228 | + $("#Form").submit(); | |
| 229 | + } | |
| 230 | + $(function() { | |
| 231 | + | |
| 232 | + //日期框 | |
| 233 | + $('.date-picker').datepicker({ | |
| 234 | + autoclose: true, | |
| 235 | + todayHighlight: true | |
| 236 | + }); | |
| 237 | + | |
| 238 | + //下拉框 | |
| 239 | + if(!ace.vars['touch']) { | |
| 240 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 241 | + $(window) | |
| 242 | + .off('resize.chosen') | |
| 243 | + .on('resize.chosen', function() { | |
| 244 | + $('.chosen-select').each(function() { | |
| 245 | + var $this = $(this); | |
| 246 | + $this.next().css({'width': $this.parent().width()}); | |
| 247 | + }); | |
| 248 | + }).trigger('resize.chosen'); | |
| 249 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 250 | + if(event_name != 'sidebar_collapsed') return; | |
| 251 | + $('.chosen-select').each(function() { | |
| 252 | + var $this = $(this); | |
| 253 | + $this.next().css({'width': $this.parent().width()}); | |
| 254 | + }); | |
| 255 | + }); | |
| 256 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 257 | + var target = $(this).find('input[type=radio]'); | |
| 258 | + var which = parseInt(target.val()); | |
| 259 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 260 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 261 | + }); | |
| 262 | + } | |
| 263 | + | |
| 264 | + | |
| 265 | + //复选框全选控制 | |
| 266 | + var active_class = 'active'; | |
| 267 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 268 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 269 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 270 | + var row = this; | |
| 271 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 272 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 273 | + }); | |
| 274 | + }); | |
| 275 | + }); | |
| 276 | + | |
| 277 | + //新增 | |
| 278 | + function add(){ | |
| 279 | + top.jzts(); | |
| 280 | + var diag = new top.Dialog(); | |
| 281 | + diag.Drag=true; | |
| 282 | + diag.Title ="新增"; | |
| 283 | + diag.URL = '<%=basePath%>testpaperinfo/goAdd.do'; | |
| 284 | + diag.Width = 450; | |
| 285 | + diag.Height = 355; | |
| 286 | + diag.Modal = true; //有无遮罩窗口 | |
| 287 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 288 | + diag.ShowMinButton = true; //最小化按钮 | |
| 289 | + diag.CancelEvent = function(){ //关闭事件 | |
| 290 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 291 | + if('${page.currentPage}' == '0'){ | |
| 292 | + tosearch(); | |
| 293 | + }else{ | |
| 294 | + tosearch(); | |
| 295 | + } | |
| 296 | + } | |
| 297 | + diag.close(); | |
| 298 | + }; | |
| 299 | + diag.show(); | |
| 300 | + } | |
| 301 | + | |
| 302 | + //删除 | |
| 303 | + function del(Id){ | |
| 304 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 305 | + if(result) { | |
| 306 | + top.jzts(); | |
| 307 | + var url = "<%=basePath%>testpaperinfo/delete.do?TESTPAPERINFO_ID="+Id+"&tm="+new Date().getTime(); | |
| 308 | + $.get(url,function(data){ | |
| 309 | + tosearch(); | |
| 310 | + }); | |
| 311 | + } | |
| 312 | + }); | |
| 313 | + } | |
| 314 | + | |
| 315 | + //修改 | |
| 316 | + function edit(Id){ | |
| 317 | + top.jzts(); | |
| 318 | + var diag = new top.Dialog(); | |
| 319 | + diag.Drag=true; | |
| 320 | + diag.Title ="编辑"; | |
| 321 | + diag.URL = '<%=basePath%>testpaperinfo/goEdit.do?TESTPAPERINFO_ID='+Id; | |
| 322 | + diag.Width = 450; | |
| 323 | + diag.Height = 355; | |
| 324 | + diag.Modal = true; //有无遮罩窗口 | |
| 325 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 326 | + diag.ShowMinButton = true; //最小化按钮 | |
| 327 | + diag.CancelEvent = function(){ //关闭事件 | |
| 328 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 329 | + tosearch(); | |
| 330 | + } | |
| 331 | + diag.close(); | |
| 332 | + }; | |
| 333 | + diag.show(); | |
| 334 | + } | |
| 335 | + | |
| 336 | + //批量操作 | |
| 337 | + function makeAll(msg){ | |
| 338 | + bootbox.confirm(msg, function(result) { | |
| 339 | + if(result) { | |
| 340 | + var str = ''; | |
| 341 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 342 | + if(document.getElementsByName('ids')[i].checked){ | |
| 343 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 344 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 345 | + } | |
| 346 | + } | |
| 347 | + if(str==''){ | |
| 348 | + bootbox.dialog({ | |
| 349 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 350 | + buttons: | |
| 351 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 352 | + }); | |
| 353 | + $("#zcheckbox").tips({ | |
| 354 | + side:1, | |
| 355 | + msg:'点这里全选', | |
| 356 | + bg:'#AE81FF', | |
| 357 | + time:8 | |
| 358 | + }); | |
| 359 | + return; | |
| 360 | + }else{ | |
| 361 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 362 | + top.jzts(); | |
| 363 | + $.ajax({ | |
| 364 | + type: "POST", | |
| 365 | + url: '<%=basePath%>testpaperinfo/deleteAll.do?tm='+new Date().getTime(), | |
| 366 | + data: {DATA_IDS:str}, | |
| 367 | + dataType:'json', | |
| 368 | + //beforeSend: validateData, | |
| 369 | + cache: false, | |
| 370 | + success: function(data){ | |
| 371 | + $.each(data.list, function(i, list){ | |
| 372 | + tosearch(); | |
| 373 | + }); | |
| 374 | + } | |
| 375 | + }); | |
| 376 | + } | |
| 377 | + } | |
| 378 | + } | |
| 379 | + }); | |
| 380 | + }; | |
| 381 | + | |
| 382 | + //导出excel | |
| 383 | + function toExcel(){ | |
| 384 | + window.location.href='<%=basePath%>testpaperinfo/excel.do'; | |
| 385 | + } | |
| 386 | + </script> | |
| 387 | + | |
| 388 | + | |
| 389 | +</body> | |
| 390 | +</html> | |
| 0 | 391 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/tld/elfun.tld
| ... | ... | @@ -80,5 +80,13 @@ |
| 80 | 80 | <example>${myelfun:findTeachingmaterialName(obj1)}</example><!-- 自定义标签的使用示范 ,域参数会自动传递到具体的方法里面--> |
| 81 | 81 | </function> |
| 82 | 82 | |
| 83 | + <function> | |
| 84 | + <description>根据ID查找题目类型</description><!-- 对该标签的说明 --> | |
| 85 | + <name>findQuestionTypeName</name><!-- 定义标签名,放在短标签之后 --> | |
| 86 | + <function-class>com.fh.controller.sunvote.Myelfun</function-class><!-- 标签处理域值的类路径 --> | |
| 87 | + <function-signature>java.lang.String findQuestionTypeName(int)</function-signature><!-- 标签处理域值的具体的类方法 --> | |
| 88 | + <example>${myelfun:findQuestionTypeName(obj1)}</example><!-- 自定义标签的使用示范 ,域参数会自动传递到具体的方法里面--> | |
| 89 | + </function> | |
| 90 | + | |
| 83 | 91 | |
| 84 | 92 | </taglib> | ... | ... |
resources/dbconfig.properties
| 1 | 1 | #数据源 1 |
| 2 | 2 | url:jdbc:mysql://120.78.57.84:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 3 | +#url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | |
| 3 | 4 | driverClassName:com.mysql.jdbc.Driver |
| 4 | 5 | username:root |
| 5 | 6 | #password:elvis | ... | ... |
resources/log4j.properties
| ... | ... | @@ -10,9 +10,9 @@ log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | log4j.appender.A=org.apache.log4j.DailyRollingFileAppender |
| 13 | -log4j.appender.A.File=${catalina.home}/logs/FH_log/PurePro_ | |
| 13 | +log4j.appender.A.File=${catalina.home}/logs/Elvis/PurePro_ | |
| 14 | 14 | log4j.appender.A.DatePattern=yyyy-MM-dd'.log' |
| 15 | 15 | log4j.appender.A.layout=org.apache.log4j.PatternLayout |
| 16 | -log4j.appender.A.layout.ConversionPattern=[FH_sys] %d{yyyy-MM-dd HH\:mm\:ss} %5p %c{1}\:%L \: %m%n | |
| 16 | +log4j.appender.A.layout.ConversionPattern=[Elvis] %d{yyyy-MM-dd HH\:mm\:ss} %5p %c{1}\:%L \: %m%n | |
| 17 | 17 | |
| 18 | 18 | ... | ... |
resources/mybatis1/api/V1Mapper.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="V1Mapper"> | |
| 4 | + | |
| 5 | + <!-- 通过教师ID获取班级数据 --> | |
| 6 | + <select id="getTeacherClassInfo" parameterType="pd" resultType="pd"> | |
| 7 | + SELECT | |
| 8 | + CLASS_ID,CLASS_NAME,CLASS_CODE | |
| 9 | + FROM | |
| 10 | + sv_coursemanagement | |
| 11 | + LEFT JOIN sv_term ON sv_term.TERM_ID = sv_coursemanagement.TERM_ID | |
| 12 | + LEFT JOIN sv_sclass ON sv_coursemanagement.CLASS_ID = sv_sclass.ID | |
| 13 | + WHERE | |
| 14 | + sv_term.START_DATE < NOW() | |
| 15 | + AND sv_term.END_DATE > NOW() | |
| 16 | + AND TEACHER_ID = #{TEACHER_ID} | |
| 17 | + </select> | |
| 18 | + | |
| 19 | + <!-- 通过教师ID获取科目数据 --> | |
| 20 | + <select id="getTeacherSubjectInfo" parameterType="pd" resultType="pd"> | |
| 21 | + SELECT | |
| 22 | + SUBJECT_ID,CNAME,ENAME | |
| 23 | + FROM | |
| 24 | + sv_coursemanagement | |
| 25 | + LEFT JOIN sv_term ON sv_term.TERM_ID = sv_coursemanagement.TERM_ID | |
| 26 | + LEFT JOIN sv_subject ON sv_coursemanagement.SUBJECT_ID = sv_subject.ID | |
| 27 | + WHERE | |
| 28 | + sv_term.START_DATE < NOW() | |
| 29 | + AND sv_term.END_DATE > NOW() | |
| 30 | + AND TEACHER_ID = #{TEACHER_ID} | |
| 31 | + </select> | |
| 32 | + | |
| 33 | + <!-- 通过教师ID获取科目数据 --> | |
| 34 | + <select id="getClassStudent" parameterType="pd" resultType="pd"> | |
| 35 | + SELECT | |
| 36 | + STUDENT_ID, | |
| 37 | + sv_student.`NAME` | |
| 38 | + FROM | |
| 39 | + sv_classroster | |
| 40 | + LEFT JOIN sv_term ON sv_classroster.TEAMID = sv_term.TERM_ID | |
| 41 | + LEFT JOIN sv_student ON sv_classroster.STUDENT_ID = sv_student.ID | |
| 42 | + WHERE | |
| 43 | + sv_term.START_DATE < NOW() | |
| 44 | + AND sv_term.END_DATE > NOW() | |
| 45 | + AND SCLASS_ID = #{SCLASS_ID} | |
| 46 | + </select> | |
| 47 | + | |
| 48 | + <!-- 通过教师ID获取科目数据 --> | |
| 49 | + <select id="getTestPaperInfo" parameterType="pd" resultType="pd"> | |
| 50 | + SELECT | |
| 51 | + * | |
| 52 | + FROM | |
| 53 | + sv_paper | |
| 54 | + LEFT JOIN sv_paperquestion ON sv_paper.PAPER_ID = sv_paperquestion.PAPER_ID | |
| 55 | + LEFT JOIN sv_question ON sv_paperquestion.QUESTION_ID = sv_question.QUESTION_ID | |
| 56 | + where 1 = 1 | |
| 57 | + <if test="PAPER_ID != null and PAPER_ID != ''"> | |
| 58 | + and sv_paper.PAPER_ID = #{PAPER_ID} | |
| 59 | + </if> | |
| 60 | + | |
| 61 | + </select> | |
| 62 | + | |
| 63 | +</mapper> | |
| 0 | 64 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/ClassBasetationMapper.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="ClassBasetationMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_CLASSBASETATION | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + SCLASS_ID, | |
| 13 | + BASESTATION_ID, | |
| 14 | + CREATE_TIME, | |
| 15 | + CLASSBASETATION_ID | |
| 16 | + </sql> | |
| 17 | + | |
| 18 | + <!-- 字段值 --> | |
| 19 | + <sql id="FieldValue"> | |
| 20 | + #{SCLASS_ID}, | |
| 21 | + #{BASESTATION_ID}, | |
| 22 | + #{CREATE_TIME}, | |
| 23 | + #{CLASSBASETATION_ID} | |
| 24 | + </sql> | |
| 25 | + | |
| 26 | + <!-- 新增--> | |
| 27 | + <insert id="save" parameterType="pd"> | |
| 28 | + insert into | |
| 29 | + <include refid="tableName"></include> | |
| 30 | + ( | |
| 31 | + <include refid="Field"></include> | |
| 32 | + ) values ( | |
| 33 | + <include refid="FieldValue"></include> | |
| 34 | + ) | |
| 35 | + </insert> | |
| 36 | + | |
| 37 | + <!-- 删除--> | |
| 38 | + <delete id="delete" parameterType="pd"> | |
| 39 | + delete from | |
| 40 | + <include refid="tableName"></include> | |
| 41 | + where | |
| 42 | + CLASSBASETATION_ID = #{CLASSBASETATION_ID} | |
| 43 | + </delete> | |
| 44 | + | |
| 45 | + <!-- 修改 --> | |
| 46 | + <update id="edit" parameterType="pd"> | |
| 47 | + update | |
| 48 | + <include refid="tableName"></include> | |
| 49 | + set | |
| 50 | + SCLASS_ID = #{SCLASS_ID}, | |
| 51 | + BASESTATION_ID = #{BASESTATION_ID}, | |
| 52 | + CREATE_TIME = #{CREATE_TIME}, | |
| 53 | + CLASSBASETATION_ID = CLASSBASETATION_ID | |
| 54 | + where | |
| 55 | + CLASSBASETATION_ID = #{CLASSBASETATION_ID} | |
| 56 | + </update> | |
| 57 | + | |
| 58 | + <!-- 通过ID获取数据 --> | |
| 59 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 60 | + select | |
| 61 | + <include refid="Field"></include> | |
| 62 | + from | |
| 63 | + <include refid="tableName"></include> | |
| 64 | + where | |
| 65 | + CLASSBASETATION_ID = #{CLASSBASETATION_ID} | |
| 66 | + </select> | |
| 67 | + | |
| 68 | + <!-- 列表 --> | |
| 69 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 70 | + select | |
| 71 | + <include refid="Field"></include> | |
| 72 | + from | |
| 73 | + <include refid="tableName"></include> | |
| 74 | + where 1=1 | |
| 75 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 76 | + and | |
| 77 | + ( | |
| 78 | + <!-- 根据需求自己加检索条件 | |
| 79 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 80 | + or | |
| 81 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 82 | + --> | |
| 83 | + ) | |
| 84 | + </if> | |
| 85 | + </select> | |
| 86 | + | |
| 87 | + <!-- 列表(全部) --> | |
| 88 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 89 | + select | |
| 90 | + <include refid="Field"></include> | |
| 91 | + from | |
| 92 | + <include refid="tableName"></include> | |
| 93 | + </select> | |
| 94 | + | |
| 95 | + <!-- 批量删除 --> | |
| 96 | + <delete id="deleteAll" parameterType="String"> | |
| 97 | + delete from | |
| 98 | + <include refid="tableName"></include> | |
| 99 | + where | |
| 100 | + CLASSBASETATION_ID in | |
| 101 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 102 | + #{item} | |
| 103 | + </foreach> | |
| 104 | + </delete> | |
| 105 | + | |
| 106 | + <!-- fh313596790qq(青苔) --> | |
| 107 | +</mapper> | |
| 0 | 108 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/ClassRosterMapper.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="ClassRosterMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_CLASSROSTER | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + SCLASS_ID, | |
| 13 | + STUDENT_ID, | |
| 14 | + TEAMID, | |
| 15 | + CLASSROSTER_ID | |
| 16 | + </sql> | |
| 17 | + | |
| 18 | + <!-- 字段值 --> | |
| 19 | + <sql id="FieldValue"> | |
| 20 | + #{SCLASS_ID}, | |
| 21 | + #{STUDENT_ID}, | |
| 22 | + #{TEAMID}, | |
| 23 | + #{CLASSROSTER_ID} | |
| 24 | + </sql> | |
| 25 | + | |
| 26 | + <!-- 新增--> | |
| 27 | + <insert id="save" parameterType="pd"> | |
| 28 | + insert into | |
| 29 | + <include refid="tableName"></include> | |
| 30 | + ( | |
| 31 | + <include refid="Field"></include> | |
| 32 | + ) values ( | |
| 33 | + <include refid="FieldValue"></include> | |
| 34 | + ) | |
| 35 | + </insert> | |
| 36 | + | |
| 37 | + <!-- 删除--> | |
| 38 | + <delete id="delete" parameterType="pd"> | |
| 39 | + delete from | |
| 40 | + <include refid="tableName"></include> | |
| 41 | + where | |
| 42 | + CLASSROSTER_ID = #{CLASSROSTER_ID} | |
| 43 | + </delete> | |
| 44 | + | |
| 45 | + <!-- 修改 --> | |
| 46 | + <update id="edit" parameterType="pd"> | |
| 47 | + update | |
| 48 | + <include refid="tableName"></include> | |
| 49 | + set | |
| 50 | + SCLASS_ID = #{SCLASS_ID}, | |
| 51 | + STUDENT_ID = #{STUDENT_ID}, | |
| 52 | + TEAMID = #{TEAMID}, | |
| 53 | + CLASSROSTER_ID = CLASSROSTER_ID | |
| 54 | + where | |
| 55 | + CLASSROSTER_ID = #{CLASSROSTER_ID} | |
| 56 | + </update> | |
| 57 | + | |
| 58 | + <!-- 通过ID获取数据 --> | |
| 59 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 60 | + select | |
| 61 | + <include refid="Field"></include> | |
| 62 | + from | |
| 63 | + <include refid="tableName"></include> | |
| 64 | + where | |
| 65 | + CLASSROSTER_ID = #{CLASSROSTER_ID} | |
| 66 | + </select> | |
| 67 | + | |
| 68 | + <!-- 列表 --> | |
| 69 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 70 | + select | |
| 71 | + <include refid="Field"></include> | |
| 72 | + from | |
| 73 | + <include refid="tableName"></include> | |
| 74 | + where 1=1 | |
| 75 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 76 | + and | |
| 77 | + ( | |
| 78 | + <!-- 根据需求自己加检索条件 | |
| 79 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 80 | + or | |
| 81 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 82 | + --> | |
| 83 | + ) | |
| 84 | + </if> | |
| 85 | + </select> | |
| 86 | + | |
| 87 | + <!-- 列表(全部) --> | |
| 88 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 89 | + select | |
| 90 | + <include refid="Field"></include> | |
| 91 | + from | |
| 92 | + <include refid="tableName"></include> | |
| 93 | + </select> | |
| 94 | + | |
| 95 | + <!-- 批量删除 --> | |
| 96 | + <delete id="deleteAll" parameterType="String"> | |
| 97 | + delete from | |
| 98 | + <include refid="tableName"></include> | |
| 99 | + where | |
| 100 | + CLASSROSTER_ID in | |
| 101 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 102 | + #{item} | |
| 103 | + </foreach> | |
| 104 | + </delete> | |
| 105 | + | |
| 106 | + <!-- fh313596790qq(青苔) --> | |
| 107 | +</mapper> | |
| 0 | 108 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/KeypadCheckMapper.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="KeypadCheckMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_KEYPADCHECK | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + KEYPAD_ID, | |
| 13 | + CREATE_DATE, | |
| 14 | + BATTERY_INFO, | |
| 15 | + ONLINE, | |
| 16 | + KEYPADCHECK_ID | |
| 17 | + </sql> | |
| 18 | + | |
| 19 | + <!-- 字段值 --> | |
| 20 | + <sql id="FieldValue"> | |
| 21 | + #{KEYPAD_ID}, | |
| 22 | + #{CREATE_DATE}, | |
| 23 | + #{BATTERY_INFO}, | |
| 24 | + #{ONLINE}, | |
| 25 | + #{KEYPADCHECK_ID} | |
| 26 | + </sql> | |
| 27 | + | |
| 28 | + <!-- 新增--> | |
| 29 | + <insert id="save" parameterType="pd"> | |
| 30 | + insert into | |
| 31 | + <include refid="tableName"></include> | |
| 32 | + ( | |
| 33 | + <include refid="Field"></include> | |
| 34 | + ) values ( | |
| 35 | + <include refid="FieldValue"></include> | |
| 36 | + ) | |
| 37 | + </insert> | |
| 38 | + | |
| 39 | + <!-- 删除--> | |
| 40 | + <delete id="delete" parameterType="pd"> | |
| 41 | + delete from | |
| 42 | + <include refid="tableName"></include> | |
| 43 | + where | |
| 44 | + KEYPADCHECK_ID = #{KEYPADCHECK_ID} | |
| 45 | + </delete> | |
| 46 | + | |
| 47 | + <!-- 修改 --> | |
| 48 | + <update id="edit" parameterType="pd"> | |
| 49 | + update | |
| 50 | + <include refid="tableName"></include> | |
| 51 | + set | |
| 52 | + KEYPAD_ID = #{KEYPAD_ID}, | |
| 53 | + BATTERY_INFO = #{BATTERY_INFO}, | |
| 54 | + ONLINE = #{ONLINE}, | |
| 55 | + KEYPADCHECK_ID = KEYPADCHECK_ID | |
| 56 | + where | |
| 57 | + KEYPADCHECK_ID = #{KEYPADCHECK_ID} | |
| 58 | + </update> | |
| 59 | + | |
| 60 | + <!-- 通过ID获取数据 --> | |
| 61 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 62 | + select | |
| 63 | + <include refid="Field"></include> | |
| 64 | + from | |
| 65 | + <include refid="tableName"></include> | |
| 66 | + where | |
| 67 | + KEYPADCHECK_ID = #{KEYPADCHECK_ID} | |
| 68 | + </select> | |
| 69 | + | |
| 70 | + <!-- 列表 --> | |
| 71 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 72 | + select | |
| 73 | + <include refid="Field"></include> | |
| 74 | + from | |
| 75 | + <include refid="tableName"></include> | |
| 76 | + where 1=1 | |
| 77 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 78 | + and | |
| 79 | + ( | |
| 80 | + <!-- 根据需求自己加检索条件 | |
| 81 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 82 | + or | |
| 83 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 84 | + --> | |
| 85 | + ) | |
| 86 | + </if> | |
| 87 | + </select> | |
| 88 | + | |
| 89 | + <!-- 列表(全部) --> | |
| 90 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 91 | + select | |
| 92 | + <include refid="Field"></include> | |
| 93 | + from | |
| 94 | + <include refid="tableName"></include> | |
| 95 | + </select> | |
| 96 | + | |
| 97 | + <!-- 批量删除 --> | |
| 98 | + <delete id="deleteAll" parameterType="String"> | |
| 99 | + delete from | |
| 100 | + <include refid="tableName"></include> | |
| 101 | + where | |
| 102 | + KEYPADCHECK_ID in | |
| 103 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 104 | + #{item} | |
| 105 | + </foreach> | |
| 106 | + </delete> | |
| 107 | + | |
| 108 | + <!-- fh313596790qq(青苔) --> | |
| 109 | +</mapper> | |
| 0 | 110 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/KnowledgeChapterMapper.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="KnowledgeChapterMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_KNOWLEDGECHAPTER | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + KNOWLEDGE_ID, | |
| 13 | + CHAPTER_ID, | |
| 14 | + KNOWLEDGECHAPTER_ID | |
| 15 | + </sql> | |
| 16 | + | |
| 17 | + <!-- 字段值 --> | |
| 18 | + <sql id="FieldValue"> | |
| 19 | + #{KNOWLEDGE_ID}, | |
| 20 | + #{CHAPTER_ID}, | |
| 21 | + #{KNOWLEDGECHAPTER_ID} | |
| 22 | + </sql> | |
| 23 | + | |
| 24 | + <!-- 新增--> | |
| 25 | + <insert id="save" parameterType="pd"> | |
| 26 | + insert into | |
| 27 | + <include refid="tableName"></include> | |
| 28 | + ( | |
| 29 | + <include refid="Field"></include> | |
| 30 | + ) values ( | |
| 31 | + <include refid="FieldValue"></include> | |
| 32 | + ) | |
| 33 | + </insert> | |
| 34 | + | |
| 35 | + <!-- 删除--> | |
| 36 | + <delete id="delete" parameterType="pd"> | |
| 37 | + delete from | |
| 38 | + <include refid="tableName"></include> | |
| 39 | + where | |
| 40 | + KNOWLEDGECHAPTER_ID = #{KNOWLEDGECHAPTER_ID} | |
| 41 | + </delete> | |
| 42 | + | |
| 43 | + <!-- 修改 --> | |
| 44 | + <update id="edit" parameterType="pd"> | |
| 45 | + update | |
| 46 | + <include refid="tableName"></include> | |
| 47 | + set | |
| 48 | + KNOWLEDGE_ID = #{KNOWLEDGE_ID}, | |
| 49 | + CHAPTER_ID = #{CHAPTER_ID}, | |
| 50 | + KNOWLEDGECHAPTER_ID = KNOWLEDGECHAPTER_ID | |
| 51 | + where | |
| 52 | + KNOWLEDGECHAPTER_ID = #{KNOWLEDGECHAPTER_ID} | |
| 53 | + </update> | |
| 54 | + | |
| 55 | + <!-- 通过ID获取数据 --> | |
| 56 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 57 | + select | |
| 58 | + <include refid="Field"></include> | |
| 59 | + from | |
| 60 | + <include refid="tableName"></include> | |
| 61 | + where | |
| 62 | + KNOWLEDGECHAPTER_ID = #{KNOWLEDGECHAPTER_ID} | |
| 63 | + </select> | |
| 64 | + | |
| 65 | + <!-- 列表 --> | |
| 66 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 67 | + select | |
| 68 | + <include refid="Field"></include> | |
| 69 | + from | |
| 70 | + <include refid="tableName"></include> | |
| 71 | + where 1=1 | |
| 72 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 73 | + and | |
| 74 | + ( | |
| 75 | + <!-- 根据需求自己加检索条件 | |
| 76 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 77 | + or | |
| 78 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 79 | + --> | |
| 80 | + ) | |
| 81 | + </if> | |
| 82 | + </select> | |
| 83 | + | |
| 84 | + <!-- 列表(全部) --> | |
| 85 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 86 | + select | |
| 87 | + <include refid="Field"></include> | |
| 88 | + from | |
| 89 | + <include refid="tableName"></include> | |
| 90 | + </select> | |
| 91 | + | |
| 92 | + <!-- 批量删除 --> | |
| 93 | + <delete id="deleteAll" parameterType="String"> | |
| 94 | + delete from | |
| 95 | + <include refid="tableName"></include> | |
| 96 | + where | |
| 97 | + KNOWLEDGECHAPTER_ID in | |
| 98 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 99 | + #{item} | |
| 100 | + </foreach> | |
| 101 | + </delete> | |
| 102 | + | |
| 103 | + <!-- fh313596790qq(青苔) --> | |
| 104 | +</mapper> | |
| 0 | 105 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/KnowledgeMapper.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="KnowledgeMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_KNOWLEDGE | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + NAME, | |
| 13 | + P_ID, | |
| 14 | + RANK, | |
| 15 | + CODE, | |
| 16 | + REMARK, | |
| 17 | + KNOWLEDGE_ID | |
| 18 | + </sql> | |
| 19 | + | |
| 20 | + <!-- 字段值 --> | |
| 21 | + <sql id="FieldValue"> | |
| 22 | + #{NAME}, | |
| 23 | + #{P_ID}, | |
| 24 | + #{RANK}, | |
| 25 | + #{CODE}, | |
| 26 | + #{REMARK}, | |
| 27 | + #{KNOWLEDGE_ID} | |
| 28 | + </sql> | |
| 29 | + | |
| 30 | + <!-- 新增--> | |
| 31 | + <insert id="save" parameterType="pd"> | |
| 32 | + insert into | |
| 33 | + <include refid="tableName"></include> | |
| 34 | + ( | |
| 35 | + <include refid="Field"></include> | |
| 36 | + ) values ( | |
| 37 | + <include refid="FieldValue"></include> | |
| 38 | + ) | |
| 39 | + </insert> | |
| 40 | + | |
| 41 | + <!-- 删除--> | |
| 42 | + <delete id="delete" parameterType="pd"> | |
| 43 | + delete from | |
| 44 | + <include refid="tableName"></include> | |
| 45 | + where | |
| 46 | + KNOWLEDGE_ID = #{KNOWLEDGE_ID} | |
| 47 | + </delete> | |
| 48 | + | |
| 49 | + <!-- 修改 --> | |
| 50 | + <update id="edit" parameterType="pd"> | |
| 51 | + update | |
| 52 | + <include refid="tableName"></include> | |
| 53 | + set | |
| 54 | + NAME = #{NAME}, | |
| 55 | + P_ID = #{P_ID}, | |
| 56 | + RANK = #{RANK}, | |
| 57 | + CODE = #{CODE}, | |
| 58 | + REMARK = #{REMARK}, | |
| 59 | + KNOWLEDGE_ID = KNOWLEDGE_ID | |
| 60 | + where | |
| 61 | + KNOWLEDGE_ID = #{KNOWLEDGE_ID} | |
| 62 | + </update> | |
| 63 | + | |
| 64 | + <!-- 通过ID获取数据 --> | |
| 65 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 66 | + select | |
| 67 | + <include refid="Field"></include> | |
| 68 | + from | |
| 69 | + <include refid="tableName"></include> | |
| 70 | + where | |
| 71 | + KNOWLEDGE_ID = #{KNOWLEDGE_ID} | |
| 72 | + </select> | |
| 73 | + | |
| 74 | + <!-- 列表 --> | |
| 75 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 76 | + select | |
| 77 | + <include refid="Field"></include> | |
| 78 | + from | |
| 79 | + <include refid="tableName"></include> | |
| 80 | + where 1=1 | |
| 81 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 82 | + and | |
| 83 | + ( | |
| 84 | + <!-- 根据需求自己加检索条件 | |
| 85 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 86 | + or | |
| 87 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 88 | + --> | |
| 89 | + ) | |
| 90 | + </if> | |
| 91 | + </select> | |
| 92 | + | |
| 93 | + <!-- 列表(全部) --> | |
| 94 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 95 | + select | |
| 96 | + <include refid="Field"></include> | |
| 97 | + from | |
| 98 | + <include refid="tableName"></include> | |
| 99 | + </select> | |
| 100 | + | |
| 101 | + <!-- 批量删除 --> | |
| 102 | + <delete id="deleteAll" parameterType="String"> | |
| 103 | + delete from | |
| 104 | + <include refid="tableName"></include> | |
| 105 | + where | |
| 106 | + KNOWLEDGE_ID in | |
| 107 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 108 | + #{item} | |
| 109 | + </foreach> | |
| 110 | + </delete> | |
| 111 | + | |
| 112 | + <!-- fh313596790qq(青苔) --> | |
| 113 | +</mapper> | |
| 0 | 114 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/PaperClassTeacherMapper.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="PaperClassTeacherMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_PAPERCLASSTEACHER | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + PAPER_ID, | |
| 13 | + CLASS_ID, | |
| 14 | + TEACHER_ID, | |
| 15 | + PAPERCLASSTEACHER_ID | |
| 16 | + </sql> | |
| 17 | + | |
| 18 | + <!-- 字段值 --> | |
| 19 | + <sql id="FieldValue"> | |
| 20 | + #{PAPER_ID}, | |
| 21 | + #{CLASS_ID}, | |
| 22 | + #{TEACHER_ID}, | |
| 23 | + #{PAPERCLASSTEACHER_ID} | |
| 24 | + </sql> | |
| 25 | + | |
| 26 | + <!-- 新增--> | |
| 27 | + <insert id="save" parameterType="pd"> | |
| 28 | + insert into | |
| 29 | + <include refid="tableName"></include> | |
| 30 | + ( | |
| 31 | + <include refid="Field"></include> | |
| 32 | + ) values ( | |
| 33 | + <include refid="FieldValue"></include> | |
| 34 | + ) | |
| 35 | + </insert> | |
| 36 | + | |
| 37 | + <!-- 删除--> | |
| 38 | + <delete id="delete" parameterType="pd"> | |
| 39 | + delete from | |
| 40 | + <include refid="tableName"></include> | |
| 41 | + where | |
| 42 | + PAPERCLASSTEACHER_ID = #{PAPERCLASSTEACHER_ID} | |
| 43 | + </delete> | |
| 44 | + | |
| 45 | + <!-- 修改 --> | |
| 46 | + <update id="edit" parameterType="pd"> | |
| 47 | + update | |
| 48 | + <include refid="tableName"></include> | |
| 49 | + set | |
| 50 | + PAPER_ID = #{PAPER_ID}, | |
| 51 | + CLASS_ID = #{CLASS_ID}, | |
| 52 | + TEACHER_ID = #{TEACHER_ID}, | |
| 53 | + PAPERCLASSTEACHER_ID = PAPERCLASSTEACHER_ID | |
| 54 | + where | |
| 55 | + PAPERCLASSTEACHER_ID = #{PAPERCLASSTEACHER_ID} | |
| 56 | + </update> | |
| 57 | + | |
| 58 | + <!-- 通过ID获取数据 --> | |
| 59 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 60 | + select | |
| 61 | + <include refid="Field"></include> | |
| 62 | + from | |
| 63 | + <include refid="tableName"></include> | |
| 64 | + where | |
| 65 | + PAPERCLASSTEACHER_ID = #{PAPERCLASSTEACHER_ID} | |
| 66 | + </select> | |
| 67 | + | |
| 68 | + <!-- 列表 --> | |
| 69 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 70 | + select | |
| 71 | + <include refid="Field"></include> | |
| 72 | + from | |
| 73 | + <include refid="tableName"></include> | |
| 74 | + where 1=1 | |
| 75 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 76 | + and | |
| 77 | + ( | |
| 78 | + <!-- 根据需求自己加检索条件 | |
| 79 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 80 | + or | |
| 81 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 82 | + --> | |
| 83 | + ) | |
| 84 | + </if> | |
| 85 | + </select> | |
| 86 | + | |
| 87 | + <!-- 列表(全部) --> | |
| 88 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 89 | + select | |
| 90 | + <include refid="Field"></include> | |
| 91 | + from | |
| 92 | + <include refid="tableName"></include> | |
| 93 | + </select> | |
| 94 | + | |
| 95 | + <!-- 批量删除 --> | |
| 96 | + <delete id="deleteAll" parameterType="String"> | |
| 97 | + delete from | |
| 98 | + <include refid="tableName"></include> | |
| 99 | + where | |
| 100 | + PAPERCLASSTEACHER_ID in | |
| 101 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 102 | + #{item} | |
| 103 | + </foreach> | |
| 104 | + </delete> | |
| 105 | + | |
| 106 | + <!-- fh313596790qq(青苔) --> | |
| 107 | +</mapper> | |
| 0 | 108 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/PaperMapper.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="PaperMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_PAPER | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + TITLE, | |
| 13 | + USER_ID, | |
| 14 | + PAPER_TYPE, | |
| 15 | + SUBJECT_ID, | |
| 16 | + GRADE_ID, | |
| 17 | + SCHOOL_ID, | |
| 18 | + CREATE_DATE, | |
| 19 | + MODIFY_DATE, | |
| 20 | + EXAM_TIME, | |
| 21 | + PAPER_STATE, | |
| 22 | + REMARK, | |
| 23 | + PAPER_ID | |
| 24 | + </sql> | |
| 25 | + | |
| 26 | + <!-- 字段值 --> | |
| 27 | + <sql id="FieldValue"> | |
| 28 | + #{TITLE}, | |
| 29 | + #{USER_ID}, | |
| 30 | + #{PAPER_TYPE}, | |
| 31 | + #{SUBJECT_ID}, | |
| 32 | + #{GRADE_ID}, | |
| 33 | + #{SCHOOL_ID}, | |
| 34 | + #{CREATE_DATE}, | |
| 35 | + #{MODIFY_DATE}, | |
| 36 | + #{EXAM_TIME}, | |
| 37 | + #{PAPER_STATE}, | |
| 38 | + #{REMARK}, | |
| 39 | + #{PAPER_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 | + PAPER_ID = #{PAPER_ID} | |
| 59 | + </delete> | |
| 60 | + | |
| 61 | + <!-- 修改 --> | |
| 62 | + <update id="edit" parameterType="pd"> | |
| 63 | + update | |
| 64 | + <include refid="tableName"></include> | |
| 65 | + set | |
| 66 | + TITLE = #{TITLE}, | |
| 67 | + USER_ID = #{USER_ID}, | |
| 68 | + PAPER_TYPE = #{PAPER_TYPE}, | |
| 69 | + SUBJECT_ID = #{SUBJECT_ID}, | |
| 70 | + GRADE_ID = #{GRADE_ID}, | |
| 71 | + SCHOOL_ID = #{SCHOOL_ID}, | |
| 72 | + CREATE_DATE = #{CREATE_DATE}, | |
| 73 | + MODIFY_DATE = #{MODIFY_DATE}, | |
| 74 | + EXAM_TIME = #{EXAM_TIME}, | |
| 75 | + PAPER_STATE = #{PAPER_STATE}, | |
| 76 | + REMARK = #{REMARK}, | |
| 77 | + PAPER_ID = PAPER_ID | |
| 78 | + where | |
| 79 | + PAPER_ID = #{PAPER_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 | + PAPER_ID = #{PAPER_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 | + <select id="listAllByType" parameterType="page" resultType="pd"> | |
| 121 | + select | |
| 122 | + <include refid="Field"></include> | |
| 123 | + from | |
| 124 | + <include refid="tableName"></include> | |
| 125 | + where 1 = 1 | |
| 126 | + <if test="pd.PAPER_TYPE != null and pd.PAPER_TYPE != ''"> | |
| 127 | + and PAPER_TYPE = #{pd.PAPER_TYPE} | |
| 128 | + </if> | |
| 129 | + | |
| 130 | + <if test="pd.USER_ID != null and pd.USER_ID != ''"> | |
| 131 | + and USER_ID = #{pd.USER_ID} | |
| 132 | + </if> | |
| 133 | + | |
| 134 | + </select> | |
| 135 | + | |
| 136 | + <!-- 批量删除 --> | |
| 137 | + <delete id="deleteAll" parameterType="String"> | |
| 138 | + delete from | |
| 139 | + <include refid="tableName"></include> | |
| 140 | + where | |
| 141 | + PAPER_ID in | |
| 142 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 143 | + #{item} | |
| 144 | + </foreach> | |
| 145 | + </delete> | |
| 146 | + | |
| 147 | + <!-- fh313596790qq(青苔) --> | |
| 148 | +</mapper> | |
| 0 | 149 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/PaperQuestionMapper.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="PaperQuestionMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_PAPERQUESTION | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + PAPER_ID, | |
| 13 | + QUESTION_ID, | |
| 14 | + SCORE, | |
| 15 | + PART_SCORE, | |
| 16 | + RANK, | |
| 17 | + NO_NAME, | |
| 18 | + PAPERQUESTION_ID | |
| 19 | + </sql> | |
| 20 | + | |
| 21 | + <!-- 字段值 --> | |
| 22 | + <sql id="FieldValue"> | |
| 23 | + #{PAPER_ID}, | |
| 24 | + #{QUESTION_ID}, | |
| 25 | + #{SCORE}, | |
| 26 | + #{PART_SCORE}, | |
| 27 | + #{RANK}, | |
| 28 | + #{NO_NAME}, | |
| 29 | + #{PAPERQUESTION_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 | + PAPERQUESTION_ID = #{PAPERQUESTION_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 | + SCORE = #{SCORE}, | |
| 59 | + PART_SCORE = #{PART_SCORE}, | |
| 60 | + RANK = #{RANK}, | |
| 61 | + NO_NAME = #{NO_NAME}, | |
| 62 | + PAPERQUESTION_ID = PAPERQUESTION_ID | |
| 63 | + where | |
| 64 | + PAPERQUESTION_ID = #{PAPERQUESTION_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 | + PAPERQUESTION_ID = #{PAPERQUESTION_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 | + PAPERQUESTION_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 | 117 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/QuestionMapper.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="QuestionMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_QUESTION | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + P_ID, | |
| 13 | + SUBJECT_ID, | |
| 14 | + CHAPTER_ID, | |
| 15 | + PROBLEM_TYPE_ID, | |
| 16 | + TEACHER_ID, | |
| 17 | + SCHOOL_ID, | |
| 18 | + KNOWLEDGE_ID, | |
| 19 | + CONTENT, | |
| 20 | + OPTION_NUM, | |
| 21 | + OPTION_CONTENT, | |
| 22 | + ANSWER, | |
| 23 | + DIFFICULTY, | |
| 24 | + ANALYSIS, | |
| 25 | + QUESTION_FROM, | |
| 26 | + SUG_SCORE, | |
| 27 | + SUG_PART_SCORE, | |
| 28 | + USER_ID, | |
| 29 | + CREATE_DATE, | |
| 30 | + REMARK, | |
| 31 | + QUESTION_ID | |
| 32 | + </sql> | |
| 33 | + | |
| 34 | + <!-- 字段值 --> | |
| 35 | + <sql id="FieldValue"> | |
| 36 | + #{P_ID}, | |
| 37 | + #{SUBJECT_ID}, | |
| 38 | + #{CHAPTER_ID}, | |
| 39 | + #{PROBLEM_TYPE_ID}, | |
| 40 | + #{TEACHER_ID}, | |
| 41 | + #{SCHOOL_ID}, | |
| 42 | + #{KNOWLEDGE_ID}, | |
| 43 | + #{CONTENT}, | |
| 44 | + #{OPTION_NUM}, | |
| 45 | + #{OPTION_CONTENT}, | |
| 46 | + #{ANSWER}, | |
| 47 | + #{DIFFICULTY}, | |
| 48 | + #{ANALYSIS}, | |
| 49 | + #{QUESTION_FROM}, | |
| 50 | + #{SUG_SCORE}, | |
| 51 | + #{SUG_PART_SCORE}, | |
| 52 | + #{USER_ID}, | |
| 53 | + #{CREATE_DATE}, | |
| 54 | + #{REMARK}, | |
| 55 | + #{QUESTION_ID} | |
| 56 | + </sql> | |
| 57 | + | |
| 58 | + <!-- 新增--> | |
| 59 | + <insert id="save" parameterType="pd"> | |
| 60 | + insert into | |
| 61 | + <include refid="tableName"></include> | |
| 62 | + ( | |
| 63 | + <include refid="Field"></include> | |
| 64 | + ) values ( | |
| 65 | + <include refid="FieldValue"></include> | |
| 66 | + ) | |
| 67 | + </insert> | |
| 68 | + | |
| 69 | + <!-- 删除--> | |
| 70 | + <delete id="delete" parameterType="pd"> | |
| 71 | + delete from | |
| 72 | + <include refid="tableName"></include> | |
| 73 | + where | |
| 74 | + QUESTION_ID = #{QUESTION_ID} | |
| 75 | + </delete> | |
| 76 | + | |
| 77 | + <!-- 修改 --> | |
| 78 | + <update id="edit" parameterType="pd"> | |
| 79 | + update | |
| 80 | + <include refid="tableName"></include> | |
| 81 | + set | |
| 82 | + P_ID = #{P_ID}, | |
| 83 | + SUBJECT_ID = #{SUBJECT_ID}, | |
| 84 | + CHAPTER_ID = #{CHAPTER_ID}, | |
| 85 | + PROBLEM_TYPE_ID = #{PROBLEM_TYPE_ID}, | |
| 86 | + TEACHER_ID = #{TEACHER_ID}, | |
| 87 | + SCHOOL_ID = #{SCHOOL_ID}, | |
| 88 | + KNOWLEDGE_ID = #{KNOWLEDGE_ID}, | |
| 89 | + CONTENT = #{CONTENT}, | |
| 90 | + OPTION_NUM = #{OPTION_NUM}, | |
| 91 | + OPTION_CONTENT = #{OPTION_CONTENT}, | |
| 92 | + ANSWER = #{ANSWER}, | |
| 93 | + DIFFICULTY = #{DIFFICULTY}, | |
| 94 | + ANALYSIS = #{ANALYSIS}, | |
| 95 | + QUESTION_FROM = #{QUESTION_FROM}, | |
| 96 | + SUG_SCORE = #{SUG_SCORE}, | |
| 97 | + SUG_PART_SCORE = #{SUG_PART_SCORE}, | |
| 98 | + USER_ID = #{USER_ID}, | |
| 99 | + CREATE_DATE = #{CREATE_DATE}, | |
| 100 | + REMARK = #{REMARK}, | |
| 101 | + QUESTION_ID = QUESTION_ID | |
| 102 | + where | |
| 103 | + QUESTION_ID = #{QUESTION_ID} | |
| 104 | + </update> | |
| 105 | + | |
| 106 | + <!-- 通过ID获取数据 --> | |
| 107 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 108 | + select | |
| 109 | + <include refid="Field"></include> | |
| 110 | + from | |
| 111 | + <include refid="tableName"></include> | |
| 112 | + where | |
| 113 | + QUESTION_ID = #{QUESTION_ID} | |
| 114 | + </select> | |
| 115 | + | |
| 116 | + <!-- 列表 --> | |
| 117 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 118 | + select | |
| 119 | + <include refid="Field"></include> | |
| 120 | + from | |
| 121 | + <include refid="tableName"></include> | |
| 122 | + where 1=1 | |
| 123 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 124 | + and | |
| 125 | + ( | |
| 126 | + <!-- 根据需求自己加检索条件 | |
| 127 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 128 | + or | |
| 129 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 130 | + --> | |
| 131 | + ) | |
| 132 | + </if> | |
| 133 | + </select> | |
| 134 | + | |
| 135 | + <!-- 列表(全部) --> | |
| 136 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 137 | + select | |
| 138 | + <include refid="Field"></include> | |
| 139 | + from | |
| 140 | + <include refid="tableName"></include> | |
| 141 | + </select> | |
| 142 | + | |
| 143 | + <!-- 批量删除 --> | |
| 144 | + <delete id="deleteAll" parameterType="String"> | |
| 145 | + delete from | |
| 146 | + <include refid="tableName"></include> | |
| 147 | + where | |
| 148 | + QUESTION_ID in | |
| 149 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 150 | + #{item} | |
| 151 | + </foreach> | |
| 152 | + </delete> | |
| 153 | + | |
| 154 | + <!-- fh313596790qq(青苔) --> | |
| 155 | +</mapper> | |
| 0 | 156 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/QuestionTypeMapper.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="QuestionTypeMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_QUESTIONTYPE | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + NAME, | |
| 13 | + CREATE_DATE, | |
| 14 | + MODIFY_DATE, | |
| 15 | + REMARK, | |
| 16 | + QUESTIONTYPE_ID | |
| 17 | + </sql> | |
| 18 | + | |
| 19 | + <!-- 字段值 --> | |
| 20 | + <sql id="FieldValue"> | |
| 21 | + #{NAME}, | |
| 22 | + #{CREATE_DATE}, | |
| 23 | + #{MODIFY_DATE}, | |
| 24 | + #{REMARK}, | |
| 25 | + #{QUESTIONTYPE_ID} | |
| 26 | + </sql> | |
| 27 | + | |
| 28 | + <!-- 新增--> | |
| 29 | + <insert id="save" parameterType="pd"> | |
| 30 | + insert into | |
| 31 | + <include refid="tableName"></include> | |
| 32 | + ( | |
| 33 | + <include refid="Field"></include> | |
| 34 | + ) values ( | |
| 35 | + <include refid="FieldValue"></include> | |
| 36 | + ) | |
| 37 | + </insert> | |
| 38 | + | |
| 39 | + <!-- 删除--> | |
| 40 | + <delete id="delete" parameterType="pd"> | |
| 41 | + delete from | |
| 42 | + <include refid="tableName"></include> | |
| 43 | + where | |
| 44 | + QUESTIONTYPE_ID = #{QUESTIONTYPE_ID} | |
| 45 | + </delete> | |
| 46 | + | |
| 47 | + <!-- 修改 --> | |
| 48 | + <update id="edit" parameterType="pd"> | |
| 49 | + update | |
| 50 | + <include refid="tableName"></include> | |
| 51 | + set | |
| 52 | + NAME = #{NAME}, | |
| 53 | + CREATE_DATE = #{CREATE_DATE}, | |
| 54 | + MODIFY_DATE = #{MODIFY_DATE}, | |
| 55 | + REMARK = #{REMARK}, | |
| 56 | + QUESTIONTYPE_ID = QUESTIONTYPE_ID | |
| 57 | + where | |
| 58 | + QUESTIONTYPE_ID = #{QUESTIONTYPE_ID} | |
| 59 | + </update> | |
| 60 | + | |
| 61 | + <!-- 通过ID获取数据 --> | |
| 62 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 63 | + select | |
| 64 | + <include refid="Field"></include> | |
| 65 | + from | |
| 66 | + <include refid="tableName"></include> | |
| 67 | + where | |
| 68 | + QUESTIONTYPE_ID = #{QUESTIONTYPE_ID} | |
| 69 | + </select> | |
| 70 | + | |
| 71 | + <!-- 列表 --> | |
| 72 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 73 | + select | |
| 74 | + <include refid="Field"></include> | |
| 75 | + from | |
| 76 | + <include refid="tableName"></include> | |
| 77 | + where 1=1 | |
| 78 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 79 | + and | |
| 80 | + ( | |
| 81 | + <!-- 根据需求自己加检索条件 | |
| 82 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 83 | + or | |
| 84 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 85 | + --> | |
| 86 | + ) | |
| 87 | + </if> | |
| 88 | + </select> | |
| 89 | + | |
| 90 | + <!-- 列表(全部) --> | |
| 91 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 92 | + select | |
| 93 | + <include refid="Field"></include> | |
| 94 | + from | |
| 95 | + <include refid="tableName"></include> | |
| 96 | + </select> | |
| 97 | + | |
| 98 | + <!-- 批量删除 --> | |
| 99 | + <delete id="deleteAll" parameterType="String"> | |
| 100 | + delete from | |
| 101 | + <include refid="tableName"></include> | |
| 102 | + where | |
| 103 | + QUESTIONTYPE_ID in | |
| 104 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 105 | + #{item} | |
| 106 | + </foreach> | |
| 107 | + </delete> | |
| 108 | + | |
| 109 | + <!-- fh313596790qq(青苔) --> | |
| 110 | +</mapper> | |
| 0 | 111 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/SchoolGradeSubjectMapper.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="SchoolGradeSubjectMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_SCHOOLGRADESUBJECT | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + SCHOOL_ID, | |
| 13 | + GRADE_ID, | |
| 14 | + SUBJECT_ID, | |
| 15 | + SCHOOLGRADESUBJECT_ID | |
| 16 | + </sql> | |
| 17 | + | |
| 18 | + <!-- 字段值 --> | |
| 19 | + <sql id="FieldValue"> | |
| 20 | + #{SCHOOL_ID}, | |
| 21 | + #{GRADE_ID}, | |
| 22 | + #{SUBJECT_ID}, | |
| 23 | + #{SCHOOLGRADESUBJECT_ID} | |
| 24 | + </sql> | |
| 25 | + | |
| 26 | + <!-- 新增--> | |
| 27 | + <insert id="save" parameterType="pd"> | |
| 28 | + insert into | |
| 29 | + <include refid="tableName"></include> | |
| 30 | + ( | |
| 31 | + <include refid="Field"></include> | |
| 32 | + ) values ( | |
| 33 | + <include refid="FieldValue"></include> | |
| 34 | + ) | |
| 35 | + </insert> | |
| 36 | + | |
| 37 | + <!-- 删除--> | |
| 38 | + <delete id="delete" parameterType="pd"> | |
| 39 | + delete from | |
| 40 | + <include refid="tableName"></include> | |
| 41 | + where | |
| 42 | + SCHOOLGRADESUBJECT_ID = #{SCHOOLGRADESUBJECT_ID} | |
| 43 | + </delete> | |
| 44 | + | |
| 45 | + <!-- 修改 --> | |
| 46 | + <update id="edit" parameterType="pd"> | |
| 47 | + update | |
| 48 | + <include refid="tableName"></include> | |
| 49 | + set | |
| 50 | + SCHOOL_ID = #{SCHOOL_ID}, | |
| 51 | + GRADE_ID = #{GRADE_ID}, | |
| 52 | + SUBJECT_ID = #{SUBJECT_ID}, | |
| 53 | + SCHOOLGRADESUBJECT_ID = SCHOOLGRADESUBJECT_ID | |
| 54 | + where | |
| 55 | + SCHOOLGRADESUBJECT_ID = #{SCHOOLGRADESUBJECT_ID} | |
| 56 | + </update> | |
| 57 | + | |
| 58 | + <!-- 通过ID获取数据 --> | |
| 59 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 60 | + select | |
| 61 | + <include refid="Field"></include> | |
| 62 | + from | |
| 63 | + <include refid="tableName"></include> | |
| 64 | + where | |
| 65 | + SCHOOLGRADESUBJECT_ID = #{SCHOOLGRADESUBJECT_ID} | |
| 66 | + </select> | |
| 67 | + | |
| 68 | + <!-- 列表 --> | |
| 69 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 70 | + select | |
| 71 | + <include refid="Field"></include> | |
| 72 | + from | |
| 73 | + <include refid="tableName"></include> | |
| 74 | + where 1=1 | |
| 75 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 76 | + and | |
| 77 | + ( | |
| 78 | + <!-- 根据需求自己加检索条件 | |
| 79 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 80 | + or | |
| 81 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 82 | + --> | |
| 83 | + ) | |
| 84 | + </if> | |
| 85 | + </select> | |
| 86 | + | |
| 87 | + <!-- 列表(全部) --> | |
| 88 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 89 | + select | |
| 90 | + <include refid="Field"></include> | |
| 91 | + from | |
| 92 | + <include refid="tableName"></include> | |
| 93 | + </select> | |
| 94 | + | |
| 95 | + <!-- 批量删除 --> | |
| 96 | + <delete id="deleteAll" parameterType="String"> | |
| 97 | + delete from | |
| 98 | + <include refid="tableName"></include> | |
| 99 | + where | |
| 100 | + SCHOOLGRADESUBJECT_ID in | |
| 101 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 102 | + #{item} | |
| 103 | + </foreach> | |
| 104 | + </delete> | |
| 105 | + | |
| 106 | + <!-- fh313596790qq(青苔) --> | |
| 107 | +</mapper> | |
| 0 | 108 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/TeacherMapper.xml
| ... | ... | @@ -42,6 +42,7 @@ |
| 42 | 42 | insert into |
| 43 | 43 | <include refid="tableName"></include> |
| 44 | 44 | ( |
| 45 | + ID, | |
| 45 | 46 | SCHOOL_ID, |
| 46 | 47 | NAME, |
| 47 | 48 | PHONE, |
| ... | ... | @@ -53,6 +54,7 @@ |
| 53 | 54 | SUBJECT_IDS, |
| 54 | 55 | KEYPAD_ID |
| 55 | 56 | ) values ( |
| 57 | + #{ID}, | |
| 56 | 58 | #{SCHOOL_ID}, |
| 57 | 59 | #{NAME}, |
| 58 | 60 | #{PHONE}, |
| ... | ... | @@ -104,6 +106,22 @@ |
| 104 | 106 | ID = #{ID} |
| 105 | 107 | </select> |
| 106 | 108 | |
| 109 | + <!-- 通过ID获取数据 --> | |
| 110 | + <select id="getUserInfo" parameterType="pd" resultType="pd"> | |
| 111 | + select | |
| 112 | + <include refid="Field"></include> | |
| 113 | + from | |
| 114 | + <include refid="tableName"></include> | |
| 115 | + where 1 = 1 | |
| 116 | + <if test="ACCOUT !=null and PASSWORD!=null"> | |
| 117 | + and ACCOUT = #{ACCOUT} and PASSWORD=#{PASSWORD} | |
| 118 | + </if> | |
| 119 | + <if test="KEYPAD_ID !=null"> | |
| 120 | + and KEYPAD_ID = #{KEYPAD_ID} | |
| 121 | + </if> | |
| 122 | + limit 1 | |
| 123 | + </select> | |
| 124 | + | |
| 107 | 125 | <!-- 列表 --> |
| 108 | 126 | <select id="datalistPage" parameterType="page" resultType="pd"> |
| 109 | 127 | select | ... | ... |
resources/mybatis1/sunvote/TermMapper.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="TermMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_TERM | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + NAME, | |
| 13 | + START_DATE, | |
| 14 | + END_DATE, | |
| 15 | + REMARK, | |
| 16 | + TERM_ID | |
| 17 | + </sql> | |
| 18 | + | |
| 19 | + <!-- 字段值 --> | |
| 20 | + <sql id="FieldValue"> | |
| 21 | + #{NAME}, | |
| 22 | + #{START_DATE}, | |
| 23 | + #{END_DATE}, | |
| 24 | + #{REMARK}, | |
| 25 | + #{TERM_ID} | |
| 26 | + </sql> | |
| 27 | + | |
| 28 | + <!-- 新增--> | |
| 29 | + <insert id="save" parameterType="pd"> | |
| 30 | + insert into | |
| 31 | + <include refid="tableName"></include> | |
| 32 | + ( | |
| 33 | + <include refid="Field"></include> | |
| 34 | + ) values ( | |
| 35 | + <include refid="FieldValue"></include> | |
| 36 | + ) | |
| 37 | + </insert> | |
| 38 | + | |
| 39 | + <!-- 删除--> | |
| 40 | + <delete id="delete" parameterType="pd"> | |
| 41 | + delete from | |
| 42 | + <include refid="tableName"></include> | |
| 43 | + where | |
| 44 | + TERM_ID = #{TERM_ID} | |
| 45 | + </delete> | |
| 46 | + | |
| 47 | + <!-- 修改 --> | |
| 48 | + <update id="edit" parameterType="pd"> | |
| 49 | + update | |
| 50 | + <include refid="tableName"></include> | |
| 51 | + set | |
| 52 | + NAME = #{NAME}, | |
| 53 | + START_DATE = #{START_DATE}, | |
| 54 | + END_DATE = #{END_DATE}, | |
| 55 | + REMARK = #{REMARK}, | |
| 56 | + TERM_ID = TERM_ID | |
| 57 | + where | |
| 58 | + TERM_ID = #{TERM_ID} | |
| 59 | + </update> | |
| 60 | + | |
| 61 | + <!-- 通过ID获取数据 --> | |
| 62 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 63 | + select | |
| 64 | + <include refid="Field"></include> | |
| 65 | + from | |
| 66 | + <include refid="tableName"></include> | |
| 67 | + where | |
| 68 | + TERM_ID = #{TERM_ID} | |
| 69 | + </select> | |
| 70 | + | |
| 71 | + <!-- 列表 --> | |
| 72 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 73 | + select | |
| 74 | + <include refid="Field"></include> | |
| 75 | + from | |
| 76 | + <include refid="tableName"></include> | |
| 77 | + where 1=1 | |
| 78 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 79 | + and | |
| 80 | + ( | |
| 81 | + <!-- 根据需求自己加检索条件 | |
| 82 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 83 | + or | |
| 84 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 85 | + --> | |
| 86 | + ) | |
| 87 | + </if> | |
| 88 | + </select> | |
| 89 | + | |
| 90 | + <!-- 列表(全部) --> | |
| 91 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 92 | + select | |
| 93 | + <include refid="Field"></include> | |
| 94 | + from | |
| 95 | + <include refid="tableName"></include> | |
| 96 | + </select> | |
| 97 | + | |
| 98 | + <!-- 批量删除 --> | |
| 99 | + <delete id="deleteAll" parameterType="String"> | |
| 100 | + delete from | |
| 101 | + <include refid="tableName"></include> | |
| 102 | + where | |
| 103 | + TERM_ID in | |
| 104 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 105 | + #{item} | |
| 106 | + </foreach> | |
| 107 | + </delete> | |
| 108 | + | |
| 109 | + <!-- fh313596790qq(青苔) --> | |
| 110 | +</mapper> | |
| 0 | 111 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/TestPaperInfoMapper.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="TestPaperInfoMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_TESTPAPERINFO | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + PAPER_ID, | |
| 13 | + STUDENT_ID, | |
| 14 | + TEST_ID, | |
| 15 | + QUESTION_ID, | |
| 16 | + ANSWER, | |
| 17 | + `RIGHT`, | |
| 18 | + SCORE, | |
| 19 | + LIKES, | |
| 20 | + ANSWER_TYPE, | |
| 21 | + PRESS_TIME, | |
| 22 | + RECEIVER_DATE, | |
| 23 | + SUBJECTIVE, | |
| 24 | + NOTE, | |
| 25 | + MARK_NO, | |
| 26 | + TESTPAPERINFO_ID | |
| 27 | + </sql> | |
| 28 | + | |
| 29 | + <!-- 字段值 --> | |
| 30 | + <sql id="FieldValue"> | |
| 31 | + #{PAPER_ID}, | |
| 32 | + #{STUDENT_ID}, | |
| 33 | + #{TEST_ID}, | |
| 34 | + #{QUESTION_ID}, | |
| 35 | + #{ANSWER}, | |
| 36 | + #{RIGHT}, | |
| 37 | + #{SCORE}, | |
| 38 | + #{LIKES}, | |
| 39 | + #{ANSWER_TYPE}, | |
| 40 | + #{PRESS_TIME}, | |
| 41 | + #{RECEIVER_DATE}, | |
| 42 | + #{SUBJECTIVE}, | |
| 43 | + #{NOTE}, | |
| 44 | + #{MARK_NO}, | |
| 45 | + #{TESTPAPERINFO_ID} | |
| 46 | + </sql> | |
| 47 | + | |
| 48 | + <!-- 新增--> | |
| 49 | + <insert id="save" parameterType="pd"> | |
| 50 | + insert into | |
| 51 | + <include refid="tableName"></include> | |
| 52 | + ( | |
| 53 | + <include refid="Field"></include> | |
| 54 | + ) values ( | |
| 55 | + <include refid="FieldValue"></include> | |
| 56 | + ) | |
| 57 | + </insert> | |
| 58 | + | |
| 59 | + <!-- 删除--> | |
| 60 | + <delete id="delete" parameterType="pd"> | |
| 61 | + delete from | |
| 62 | + <include refid="tableName"></include> | |
| 63 | + where | |
| 64 | + TESTPAPERINFO_ID = #{TESTPAPERINFO_ID} | |
| 65 | + </delete> | |
| 66 | + | |
| 67 | + <!-- 修改 --> | |
| 68 | + <update id="edit" parameterType="pd"> | |
| 69 | + update | |
| 70 | + <include refid="tableName"></include> | |
| 71 | + set | |
| 72 | + PAPER_ID = #{PAPER_ID}, | |
| 73 | + STUDENT_ID = #{STUDENT_ID}, | |
| 74 | + TEST_ID = #{TEST_ID}, | |
| 75 | + QUESTION_ID = #{QUESTION_ID}, | |
| 76 | + ANSWER = #{ANSWER}, | |
| 77 | + `RIGHT` = #{RIGHT}, | |
| 78 | + SCORE = #{SCORE}, | |
| 79 | + LIKES = #{LIKES}, | |
| 80 | + ANSWER_TYPE = #{ANSWER_TYPE}, | |
| 81 | + PRESS_TIME = #{PRESS_TIME}, | |
| 82 | + RECEIVER_DATE = #{RECEIVER_DATE}, | |
| 83 | + SUBJECTIVE = #{SUBJECTIVE}, | |
| 84 | + NOTE = #{NOTE}, | |
| 85 | + MARK_NO = #{MARK_NO}, | |
| 86 | + TESTPAPERINFO_ID = TESTPAPERINFO_ID | |
| 87 | + where | |
| 88 | + TESTPAPERINFO_ID = #{TESTPAPERINFO_ID} | |
| 89 | + </update> | |
| 90 | + | |
| 91 | + <!-- 通过ID获取数据 --> | |
| 92 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 93 | + select | |
| 94 | + <include refid="Field"></include> | |
| 95 | + from | |
| 96 | + <include refid="tableName"></include> | |
| 97 | + where | |
| 98 | + TESTPAPERINFO_ID = #{TESTPAPERINFO_ID} | |
| 99 | + </select> | |
| 100 | + | |
| 101 | + <!-- 列表 --> | |
| 102 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 103 | + select | |
| 104 | + <include refid="Field"></include> | |
| 105 | + from | |
| 106 | + <include refid="tableName"></include> | |
| 107 | + where 1=1 | |
| 108 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 109 | + and | |
| 110 | + ( | |
| 111 | + <!-- 根据需求自己加检索条件 | |
| 112 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 113 | + or | |
| 114 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 115 | + --> | |
| 116 | + ) | |
| 117 | + </if> | |
| 118 | + </select> | |
| 119 | + | |
| 120 | + <!-- 列表(全部) --> | |
| 121 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 122 | + select | |
| 123 | + <include refid="Field"></include> | |
| 124 | + from | |
| 125 | + <include refid="tableName"></include> | |
| 126 | + </select> | |
| 127 | + | |
| 128 | + <!-- 批量删除 --> | |
| 129 | + <delete id="deleteAll" parameterType="String"> | |
| 130 | + delete from | |
| 131 | + <include refid="tableName"></include> | |
| 132 | + where | |
| 133 | + TESTPAPERINFO_ID in | |
| 134 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 135 | + #{item} | |
| 136 | + </foreach> | |
| 137 | + </delete> | |
| 138 | + | |
| 139 | + <!-- fh313596790qq(青苔) --> | |
| 140 | +</mapper> | |
| 0 | 141 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/TestPaperMapper.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="TestPaperMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_TESTPAPER | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + NAME, | |
| 13 | + PAPER_ID, | |
| 14 | + SCLASS_ID, | |
| 15 | + TEACHER_ID, | |
| 16 | + START_DATE, | |
| 17 | + END_DATE, | |
| 18 | + CREATE_DATE, | |
| 19 | + OTHER_SCORE, | |
| 20 | + HIGHT_SCORE, | |
| 21 | + LOW_SCORE, | |
| 22 | + AVG_SCORE, | |
| 23 | + REMARK, | |
| 24 | + TESTPAPER_ID | |
| 25 | + </sql> | |
| 26 | + | |
| 27 | + <!-- 字段值 --> | |
| 28 | + <sql id="FieldValue"> | |
| 29 | + #{NAME}, | |
| 30 | + #{PAPER_ID}, | |
| 31 | + #{SCLASS_ID}, | |
| 32 | + #{TEACHER_ID}, | |
| 33 | + #{START_DATE}, | |
| 34 | + #{END_DATE}, | |
| 35 | + #{CREATE_DATE}, | |
| 36 | + #{OTHER_SCORE}, | |
| 37 | + #{HIGHT_SCORE}, | |
| 38 | + #{LOW_SCORE}, | |
| 39 | + #{AVG_SCORE}, | |
| 40 | + #{REMARK}, | |
| 41 | + #{TESTPAPER_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 | + TESTPAPER_ID = #{TESTPAPER_ID} | |
| 61 | + </delete> | |
| 62 | + | |
| 63 | + <!-- 修改 --> | |
| 64 | + <update id="edit" parameterType="pd"> | |
| 65 | + update | |
| 66 | + <include refid="tableName"></include> | |
| 67 | + set | |
| 68 | + NAME = #{NAME}, | |
| 69 | + PAPER_ID = #{PAPER_ID}, | |
| 70 | + SCLASS_ID = #{SCLASS_ID}, | |
| 71 | + TEACHER_ID = #{TEACHER_ID}, | |
| 72 | + START_DATE = #{START_DATE}, | |
| 73 | + END_DATE = #{END_DATE}, | |
| 74 | + CREATE_DATE = #{CREATE_DATE}, | |
| 75 | + OTHER_SCORE = #{OTHER_SCORE}, | |
| 76 | + HIGHT_SCORE = #{HIGHT_SCORE}, | |
| 77 | + LOW_SCORE = #{LOW_SCORE}, | |
| 78 | + AVG_SCORE = #{AVG_SCORE}, | |
| 79 | + REMARK = #{REMARK}, | |
| 80 | + TESTPAPER_ID = TESTPAPER_ID | |
| 81 | + where | |
| 82 | + TESTPAPER_ID = #{TESTPAPER_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 | + TESTPAPER_ID = #{TESTPAPER_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 | + TESTPAPER_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 | 135 | \ No newline at end of file | ... | ... |
src/com/fh/controller/api/ApiServer.java
| ... | ... | @@ -20,8 +20,29 @@ import com.fh.controller.base.BaseController; |
| 20 | 20 | import com.fh.service.feedback.feedback.FeedbackManager; |
| 21 | 21 | import com.fh.service.feedback.problemphenomenon.ProblemPhenomenonManager; |
| 22 | 22 | import com.fh.service.sunvote.basestation.BasestationManager; |
| 23 | +import com.fh.service.sunvote.chapter.ChapterManager; | |
| 24 | +import com.fh.service.sunvote.classbasetation.ClassBasetationManager; | |
| 25 | +import com.fh.service.sunvote.classroster.ClassRosterManager; | |
| 26 | +import com.fh.service.sunvote.classtype.ClassTypeManager; | |
| 27 | +import com.fh.service.sunvote.coursemanagement.CourseManagementManager; | |
| 28 | +import com.fh.service.sunvote.grade.GradeManager; | |
| 23 | 29 | import com.fh.service.sunvote.keypad.KeypadManager; |
| 30 | +import com.fh.service.sunvote.keypadcheck.KeypadCheckManager; | |
| 31 | +import com.fh.service.sunvote.knowledge.KnowledgeManager; | |
| 32 | +import com.fh.service.sunvote.knowledgechapter.KnowledgeChapterManager; | |
| 33 | +import com.fh.service.sunvote.paper.PaperManager; | |
| 34 | +import com.fh.service.sunvote.paperclassteacher.PaperClassTeacherManager; | |
| 35 | +import com.fh.service.sunvote.paperquestion.PaperQuestionManager; | |
| 36 | +import com.fh.service.sunvote.papertype.PaperTypeManager; | |
| 37 | +import com.fh.service.sunvote.question.QuestionManager; | |
| 38 | +import com.fh.service.sunvote.questiontype.QuestionTypeManager; | |
| 24 | 39 | import com.fh.service.sunvote.school.SchoolManager; |
| 40 | +import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | |
| 41 | +import com.fh.service.sunvote.sclass.SClassManager; | |
| 42 | +import com.fh.service.sunvote.student.StudentManager; | |
| 43 | +import com.fh.service.sunvote.subject.SubjectManager; | |
| 44 | +import com.fh.service.sunvote.teacher.TeacherManager; | |
| 45 | +import com.fh.service.sunvote.testpaperinfo.TestPaperInfoManager; | |
| 25 | 46 | import com.fh.util.PageData; |
| 26 | 47 | import com.fh.util.Tools; |
| 27 | 48 | |
| ... | ... | @@ -34,9 +55,72 @@ public class ApiServer extends BaseController { |
| 34 | 55 | |
| 35 | 56 | @Resource(name = "basestationService") |
| 36 | 57 | private BasestationManager basestationService; |
| 58 | + | |
| 59 | + @Resource(name="chapterService") | |
| 60 | + private ChapterManager chapterService; | |
| 61 | + | |
| 62 | + @Resource(name="classbasetationService") | |
| 63 | + private ClassBasetationManager classbasetationService; | |
| 64 | + | |
| 65 | + @Resource(name="classrosterService") | |
| 66 | + private ClassRosterManager classrosterService; | |
| 67 | + | |
| 68 | + @Resource(name="classtypeService") | |
| 69 | + private ClassTypeManager classtypeService; | |
| 70 | + | |
| 71 | + @Resource(name="gradeService") | |
| 72 | + private GradeManager gradeService; | |
| 73 | + | |
| 74 | + @Resource(name="coursemanagementService") | |
| 75 | + private CourseManagementManager coursemanagementService; | |
| 37 | 76 | |
| 38 | 77 | @Resource(name = "keypadService") |
| 39 | 78 | private KeypadManager keypadService; |
| 79 | + | |
| 80 | + @Resource(name="keypadcheckService") | |
| 81 | + private KeypadCheckManager keypadcheckService; | |
| 82 | + | |
| 83 | + @Resource(name="knowledgeService") | |
| 84 | + private KnowledgeManager knowledgeService; | |
| 85 | + | |
| 86 | + @Resource(name="knowledgechapterService") | |
| 87 | + private KnowledgeChapterManager knowledgechapterService; | |
| 88 | + | |
| 89 | + @Resource(name="paperService") | |
| 90 | + private PaperManager paperService; | |
| 91 | + | |
| 92 | + @Resource(name="paperclassteacherService") | |
| 93 | + private PaperClassTeacherManager paperclassteacherService; | |
| 94 | + | |
| 95 | + @Resource(name="paperquestionService") | |
| 96 | + private PaperQuestionManager paperquestionService; | |
| 97 | + | |
| 98 | + @Resource(name="papertypeService") | |
| 99 | + private PaperTypeManager papertypeService; | |
| 100 | + | |
| 101 | + @Resource(name="questionService") | |
| 102 | + private QuestionManager questionService; | |
| 103 | + | |
| 104 | + @Resource(name="questiontypeService") | |
| 105 | + private QuestionTypeManager questiontypeService; | |
| 106 | + | |
| 107 | + @Resource(name="schoolgradesubjectService") | |
| 108 | + private SchoolGradeSubjectManager schoolgradesubjectService; | |
| 109 | + | |
| 110 | + @Resource(name="sclassService") | |
| 111 | + private SClassManager sclassService; | |
| 112 | + | |
| 113 | + @Resource(name="studentService") | |
| 114 | + private StudentManager studentService; | |
| 115 | + | |
| 116 | + @Resource(name="subjectService") | |
| 117 | + private SubjectManager subjectService; | |
| 118 | + | |
| 119 | + @Resource(name="teacherService") | |
| 120 | + private TeacherManager teacherService; | |
| 121 | + | |
| 122 | + @Resource(name="testpaperinfoService") | |
| 123 | + private TestPaperInfoManager testpaperinfoService; | |
| 40 | 124 | |
| 41 | 125 | @Resource(name = "feedbackService") |
| 42 | 126 | private FeedbackManager feedbackService; |
| ... | ... | @@ -359,4 +443,5 @@ public class ApiServer extends BaseController { |
| 359 | 443 | return false; |
| 360 | 444 | } |
| 361 | 445 | } |
| 446 | + | |
| 362 | 447 | } | ... | ... |
src/com/fh/controller/api/ResponseGson.java
| ... | ... | @@ -74,14 +74,19 @@ public class ResponseGson<T> { |
| 74 | 74 | message = "server error" ; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | + public void setOtherError(){ | |
| 78 | + code = "-6" ; | |
| 79 | + message = "未定义,需补充" ; | |
| 80 | + } | |
| 81 | + | |
| 77 | 82 | public void set1Error(){ |
| 78 | 83 | code = "1" ; |
| 79 | - message = "分别对错误进行描述,1 具体到某个参数值问题的描述" ; | |
| 84 | + message = "登录失败,用户名或者密码错误" ; | |
| 80 | 85 | } |
| 81 | 86 | |
| 82 | 87 | public void set2Error(){ |
| 83 | 88 | code = "2" ; |
| 84 | - message = "分别对错误进行描述,1 具体到某个参数值问题的描述" ; | |
| 89 | + message = "没有找到对应的班级信息" ; | |
| 85 | 90 | } |
| 86 | 91 | |
| 87 | 92 | public void set3Error(){ | ... | ... |
src/com/fh/controller/api/V1.java
0 → 100644
| 1 | +package com.fh.controller.api; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import javax.annotation.Resource; | |
| 7 | + | |
| 8 | +import org.springframework.stereotype.Controller; | |
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 10 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 11 | + | |
| 12 | +import com.fh.controller.base.BaseController; | |
| 13 | +import com.fh.entity.Page; | |
| 14 | +import com.fh.service.api.V1Manager; | |
| 15 | +import com.fh.service.feedback.feedback.FeedbackManager; | |
| 16 | +import com.fh.service.feedback.problemphenomenon.ProblemPhenomenonManager; | |
| 17 | +import com.fh.service.sunvote.basestation.BasestationManager; | |
| 18 | +import com.fh.service.sunvote.chapter.ChapterManager; | |
| 19 | +import com.fh.service.sunvote.classbasetation.ClassBasetationManager; | |
| 20 | +import com.fh.service.sunvote.classroster.ClassRosterManager; | |
| 21 | +import com.fh.service.sunvote.classtype.ClassTypeManager; | |
| 22 | +import com.fh.service.sunvote.coursemanagement.CourseManagementManager; | |
| 23 | +import com.fh.service.sunvote.grade.GradeManager; | |
| 24 | +import com.fh.service.sunvote.keypad.KeypadManager; | |
| 25 | +import com.fh.service.sunvote.keypadcheck.KeypadCheckManager; | |
| 26 | +import com.fh.service.sunvote.knowledge.KnowledgeManager; | |
| 27 | +import com.fh.service.sunvote.knowledgechapter.KnowledgeChapterManager; | |
| 28 | +import com.fh.service.sunvote.paper.PaperManager; | |
| 29 | +import com.fh.service.sunvote.paperclassteacher.PaperClassTeacherManager; | |
| 30 | +import com.fh.service.sunvote.paperquestion.PaperQuestionManager; | |
| 31 | +import com.fh.service.sunvote.papertype.PaperTypeManager; | |
| 32 | +import com.fh.service.sunvote.question.QuestionManager; | |
| 33 | +import com.fh.service.sunvote.questiontype.QuestionTypeManager; | |
| 34 | +import com.fh.service.sunvote.school.SchoolManager; | |
| 35 | +import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | |
| 36 | +import com.fh.service.sunvote.sclass.SClassManager; | |
| 37 | +import com.fh.service.sunvote.student.StudentManager; | |
| 38 | +import com.fh.service.sunvote.subject.SubjectManager; | |
| 39 | +import com.fh.service.sunvote.teacher.TeacherManager; | |
| 40 | +import com.fh.service.sunvote.testpaperinfo.TestPaperInfoManager; | |
| 41 | +import com.fh.util.PageData; | |
| 42 | +import com.fh.util.Tools; | |
| 43 | + | |
| 44 | +@Controller | |
| 45 | +@RequestMapping(value = "/api/v1") | |
| 46 | +public class V1 extends BaseController { | |
| 47 | + | |
| 48 | + @Resource(name = "schoolService") | |
| 49 | + private SchoolManager schoolService; | |
| 50 | + | |
| 51 | + @Resource(name = "basestationService") | |
| 52 | + private BasestationManager basestationService; | |
| 53 | + | |
| 54 | + @Resource(name="chapterService") | |
| 55 | + private ChapterManager chapterService; | |
| 56 | + | |
| 57 | + @Resource(name="classbasetationService") | |
| 58 | + private ClassBasetationManager classbasetationService; | |
| 59 | + | |
| 60 | + @Resource(name="classrosterService") | |
| 61 | + private ClassRosterManager classrosterService; | |
| 62 | + | |
| 63 | + @Resource(name="classtypeService") | |
| 64 | + private ClassTypeManager classtypeService; | |
| 65 | + | |
| 66 | + @Resource(name="gradeService") | |
| 67 | + private GradeManager gradeService; | |
| 68 | + | |
| 69 | + @Resource(name="coursemanagementService") | |
| 70 | + private CourseManagementManager coursemanagementService; | |
| 71 | + | |
| 72 | + @Resource(name = "keypadService") | |
| 73 | + private KeypadManager keypadService; | |
| 74 | + | |
| 75 | + @Resource(name="keypadcheckService") | |
| 76 | + private KeypadCheckManager keypadcheckService; | |
| 77 | + | |
| 78 | + @Resource(name="knowledgeService") | |
| 79 | + private KnowledgeManager knowledgeService; | |
| 80 | + | |
| 81 | + @Resource(name="knowledgechapterService") | |
| 82 | + private KnowledgeChapterManager knowledgechapterService; | |
| 83 | + | |
| 84 | + @Resource(name="paperService") | |
| 85 | + private PaperManager paperService; | |
| 86 | + | |
| 87 | + @Resource(name="paperclassteacherService") | |
| 88 | + private PaperClassTeacherManager paperclassteacherService; | |
| 89 | + | |
| 90 | + @Resource(name="paperquestionService") | |
| 91 | + private PaperQuestionManager paperquestionService; | |
| 92 | + | |
| 93 | + @Resource(name="papertypeService") | |
| 94 | + private PaperTypeManager papertypeService; | |
| 95 | + | |
| 96 | + @Resource(name="questionService") | |
| 97 | + private QuestionManager questionService; | |
| 98 | + | |
| 99 | + @Resource(name="questiontypeService") | |
| 100 | + private QuestionTypeManager questiontypeService; | |
| 101 | + | |
| 102 | + @Resource(name="schoolgradesubjectService") | |
| 103 | + private SchoolGradeSubjectManager schoolgradesubjectService; | |
| 104 | + | |
| 105 | + @Resource(name="sclassService") | |
| 106 | + private SClassManager sclassService; | |
| 107 | + | |
| 108 | + @Resource(name="studentService") | |
| 109 | + private StudentManager studentService; | |
| 110 | + | |
| 111 | + @Resource(name="subjectService") | |
| 112 | + private SubjectManager subjectService; | |
| 113 | + | |
| 114 | + @Resource(name="teacherService") | |
| 115 | + private TeacherManager teacherService; | |
| 116 | + | |
| 117 | + @Resource(name="testpaperinfoService") | |
| 118 | + private TestPaperInfoManager testpaperinfoService; | |
| 119 | + | |
| 120 | + @Resource(name = "feedbackService") | |
| 121 | + private FeedbackManager feedbackService; | |
| 122 | + | |
| 123 | + @Resource(name = "problemphenomenonService") | |
| 124 | + private ProblemPhenomenonManager problemphenomenonService; | |
| 125 | + | |
| 126 | + @Resource(name = "v1Service") | |
| 127 | + private V1Manager v1Service ; | |
| 128 | + | |
| 129 | + @RequestMapping(value = "/login", produces = "application/json;charset=UTF-8") | |
| 130 | + @ResponseBody | |
| 131 | + public Object login() throws Exception { | |
| 132 | + PageData pd = this.getPageData(); | |
| 133 | + ResponseGson<PageData> res = new ResponseGson(); | |
| 134 | + if(!pd.containsKey("ACCOUT")){ | |
| 135 | + pd.put("ACCOUT", pd.get("USERNAME")); | |
| 136 | + } | |
| 137 | + if(((pd.containsKey("USERNAME") || pd.containsKey("ACCOUT")) && pd.containsKey("PASSWORD")) || pd.containsKey("KEYPAD_ID")){ | |
| 138 | + PageData pageData = teacherService.getUserInfo(pd); | |
| 139 | + if(pageData != null && pageData.getString("ID") != null){ | |
| 140 | + pageData.put("PASSWORD", "");//返回参数中不返回密码 | |
| 141 | + PageData pt = new PageData(); | |
| 142 | + pt.put("TEACHER_ID", pageData.get("ID")); | |
| 143 | + // 在任课表中查找老师教哪些班级,然后查出班级信息 | |
| 144 | + List<PageData> classInfoList = v1Service.getTeacherClassInfo(pt); | |
| 145 | + | |
| 146 | + pageData.put("classInfoList", classInfoList); | |
| 147 | + // 在认可表中查找老师教哪些科目,然后查出科目信息 | |
| 148 | + List<PageData> subjectList = v1Service.getTeacherSubjectInfo(pt); | |
| 149 | + // 一个sql语句完成。 | |
| 150 | + pageData.put("subjectList", subjectList); | |
| 151 | + | |
| 152 | + pageData.remove("SUBJECT_IDS"); | |
| 153 | + | |
| 154 | + res.setData(pageData); | |
| 155 | + // 填充数据到返回数据中 | |
| 156 | + }else{ | |
| 157 | + res.set1Error(); | |
| 158 | + } | |
| 159 | + }else{ | |
| 160 | + res.set1Error(); | |
| 161 | + } | |
| 162 | + | |
| 163 | + return res.toJson(); | |
| 164 | + } | |
| 165 | + | |
| 166 | + @RequestMapping(value = "/class", produces = "application/json;charset=UTF-8") | |
| 167 | + @ResponseBody | |
| 168 | + public Object sclass() throws Exception { | |
| 169 | + PageData pd = this.getPageData(); | |
| 170 | + ResponseGson<PageData> res = new ResponseGson(); | |
| 171 | + if (pd.containsKey("ID")) { | |
| 172 | + PageData pageData = sclassService.findById(pd); | |
| 173 | + if (pageData != null && pageData.containsKey("ID")) { | |
| 174 | + PageData pt = new PageData(); | |
| 175 | + pt.put("SCLASS_ID", pageData.get("ID")); | |
| 176 | + List<PageData> studentList = v1Service | |
| 177 | + .getClassStudent(pt); | |
| 178 | + pageData.put("studentList", studentList); | |
| 179 | + res.setData(pageData); | |
| 180 | + } else { | |
| 181 | + res.set2Error(); | |
| 182 | + } | |
| 183 | + }else{ | |
| 184 | + res.set2Error(); | |
| 185 | + } | |
| 186 | + return res.toJson(); | |
| 187 | + } | |
| 188 | + | |
| 189 | + @RequestMapping(value = "/keypadscan", produces = "application/json;charset=UTF-8") | |
| 190 | + @ResponseBody | |
| 191 | + public Object keypadScan() throws Exception { | |
| 192 | + PageData pd = this.getPageData(); | |
| 193 | + ResponseGson<PageData> res = new ResponseGson(); | |
| 194 | + pd.put("KEYPADCHECK_ID", get32UUID()); //主键 | |
| 195 | + pd.put("CREATE_DATE", Tools.date2Str(new Date())); //创建时间 | |
| 196 | + try{ | |
| 197 | + keypadcheckService.save(pd); | |
| 198 | + res.setSuccess(); | |
| 199 | + }catch(Exception ex){ | |
| 200 | + res.setDataError(); | |
| 201 | + } | |
| 202 | + return res.toJson(); | |
| 203 | + } | |
| 204 | + | |
| 205 | + @RequestMapping(value = "/paper", produces = "application/json;charset=UTF-8") | |
| 206 | + @ResponseBody | |
| 207 | + public Object paper() throws Exception { | |
| 208 | + PageData pd = this.getPageData(); | |
| 209 | + ResponseGson<List<PageData>> res = new ResponseGson<List<PageData>>(); | |
| 210 | + if(pd.containsKey("PAPER_TYPE") && pd.containsKey("USER_ID")){ | |
| 211 | + Page page = new Page(); | |
| 212 | + page.getPd().put("PAPER_TYPE", pd.get("PAPER_TYPE")); | |
| 213 | + page.getPd().put("USER_ID", pd.get("USER_ID")); | |
| 214 | + if(pd.containsKey("CURRENTPAGE")){ | |
| 215 | + String curpage = pd.getString("CURRENTPAGE"); | |
| 216 | + try{ | |
| 217 | + page.setCurrentPage(Integer.parseInt(curpage)); | |
| 218 | + }catch(Exception ex){} | |
| 219 | + } | |
| 220 | + if(pd.containsKey("SHOWCOUNT")){ | |
| 221 | + String showCount = pd.getString("SHOWCOUNT"); | |
| 222 | + try{ | |
| 223 | + page.setShowCount(Integer.parseInt(showCount)); | |
| 224 | + }catch(Exception ex){} | |
| 225 | + }else{ | |
| 226 | + page.setShowCount(100); | |
| 227 | + } | |
| 228 | + List<PageData> pageList = paperService.listAllByType(page); | |
| 229 | + res.setData(pageList); | |
| 230 | + } | |
| 231 | + return res.toJson(); | |
| 232 | + } | |
| 233 | + | |
| 234 | + @RequestMapping(value = "/testpaper", produces = "application/json;charset=UTF-8") | |
| 235 | + @ResponseBody | |
| 236 | + public Object testpaper() throws Exception { | |
| 237 | + PageData pd = this.getPageData(); | |
| 238 | + ResponseGson<List<PageData>> res = new ResponseGson<List<PageData>>(); | |
| 239 | + if(pd.containsKey("PAPER_ID")){ | |
| 240 | + try{ | |
| 241 | + List<PageData> questList = v1Service.getTestPaperInfo(pd); | |
| 242 | + res.setData(questList); | |
| 243 | + }catch(Exception ex){ | |
| 244 | + res.setOtherError(); | |
| 245 | + } | |
| 246 | + }else{ | |
| 247 | + res.setOtherError(); | |
| 248 | + } | |
| 249 | + return res.toJson(); | |
| 250 | + } | |
| 251 | + | |
| 252 | + @RequestMapping(value = "/paperquestion", produces = "application/json;charset=UTF-8") | |
| 253 | + @ResponseBody | |
| 254 | + public Object paperQuestion() throws Exception { | |
| 255 | + PageData pd = this.getPageData(); | |
| 256 | + ResponseGson<PageData> res = new ResponseGson(); | |
| 257 | + | |
| 258 | + return res.toJson(); | |
| 259 | + } | |
| 260 | + | |
| 261 | +} | ... | ... |
src/com/fh/controller/api/sql.txt
0 → 100644
| 1 | +SELECT | |
| 2 | + * | |
| 3 | +FROM | |
| 4 | + sv_coursemanagement | |
| 5 | +LEFT JOIN sv_sclass ON sv_coursemanagement.CLASS_ID = sv_sclass.ID | |
| 6 | +WHERE | |
| 7 | + sv_coursemanagement.START_DATE < NOW() | |
| 8 | +AND sv_coursemanagement.END_DATE > NOW(); | |
| 9 | + | |
| 10 | + | |
| 11 | +SELECT | |
| 12 | + * | |
| 13 | +FROM | |
| 14 | + sv_coursemanagement | |
| 15 | +LEFT JOIN sv_subject ON sv_coursemanagement.SUBJECT_ID = sv_subject.ID | |
| 16 | +WHERE | |
| 17 | + sv_coursemanagement.START_DATE < NOW() | |
| 18 | +AND sv_coursemanagement.END_DATE > NOW() | |
| 19 | +and TEACHER_ID = '1' | |
| 20 | + | |
| 21 | + | |
| 22 | +根据班级名称查找该学期学生名单 | |
| 23 | +SELECT | |
| 24 | + STUDENT_ID, | |
| 25 | + sv_student.`NAME` | |
| 26 | +FROM | |
| 27 | + sv_classroster | |
| 28 | +LEFT JOIN sv_term ON sv_classroster.TEAMID = sv_term.TERM_ID | |
| 29 | +LEFT JOIN sv_student ON sv_classroster.STUDENT_ID = sv_student.ID | |
| 30 | +WHERE | |
| 31 | + sv_term.START_DATE < NOW() | |
| 32 | +AND sv_term.END_DATE > NOW() | |
| 33 | + where sclass_id = ? | |
| 34 | + | |
| 35 | + | |
| 36 | + SELECT | |
| 37 | + * | |
| 38 | +FROM | |
| 39 | + sv_paper | |
| 40 | +LEFT JOIN sv_paperquestion ON sv_paper.PAPER_ID = sv_paperquestion.PAPER_ID | |
| 41 | +LEFT JOIN sv_question ON sv_paperquestion.QUESTION_ID = sv_question.QUESTION_ID; | |
| 42 | + | ... | ... |
src/com/fh/controller/sunvote/Myelfun.java
| ... | ... | @@ -5,6 +5,7 @@ import org.springframework.stereotype.Service; |
| 5 | 5 | import com.fh.service.sunvote.basestation.impl.BasestationService; |
| 6 | 6 | import com.fh.service.sunvote.classtype.impl.ClassTypeService; |
| 7 | 7 | import com.fh.service.sunvote.grade.impl.GradeService; |
| 8 | +import com.fh.service.sunvote.questiontype.QuestionTypeManager; | |
| 8 | 9 | import com.fh.service.sunvote.school.impl.SchoolService; |
| 9 | 10 | import com.fh.service.sunvote.sclass.impl.SClassService; |
| 10 | 11 | import com.fh.service.sunvote.subject.impl.SubjectService; |
| ... | ... | @@ -178,4 +179,22 @@ public class Myelfun { |
| 178 | 179 | } |
| 179 | 180 | } |
| 180 | 181 | |
| 182 | + /** | |
| 183 | + * 根据ID查找题目类型 | |
| 184 | + * @param id | |
| 185 | + * @return | |
| 186 | + * @throws Exception | |
| 187 | + */ | |
| 188 | + public static String findQuestionTypeName(int id) throws Exception { | |
| 189 | + QuestionTypeManager questiontypeService = (QuestionTypeManager)SpringBeanFactoryUtils.getBean("questiontypeService"); | |
| 190 | + PageData pageData = new PageData(); | |
| 191 | + pageData.put("QUESTIONTYPE_ID", id); | |
| 192 | + pageData = questiontypeService.findById(pageData); | |
| 193 | + if(pageData != null){ | |
| 194 | + return pageData.getString("NAME"); | |
| 195 | + }else{ | |
| 196 | + return "" ; | |
| 197 | + } | |
| 198 | + } | |
| 199 | + | |
| 181 | 200 | } | ... | ... |
src/com/fh/controller/sunvote/classbasetation/ClassBasetationController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.classbasetation; | |
| 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.classbasetation.ClassBasetationManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:班级教室基站 | |
| 30 | + * 创建时间:2018-05-16 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/classbasetation") | |
| 34 | +public class ClassBasetationController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "classbasetation/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="classbasetationService") | |
| 38 | + private ClassBasetationManager classbasetationService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增ClassBasetation"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("CLASSBASETATION_ID", this.get32UUID()); //主键 | |
| 52 | + classbasetationService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除ClassBasetation"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + classbasetationService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改ClassBasetation"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + classbasetationService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表ClassBasetation"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = classbasetationService.list(page); //列出ClassBasetation列表 | |
| 107 | + mv.setViewName("sunvote/classbasetation/classbasetation_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/classbasetation/classbasetation_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = classbasetationService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/classbasetation/classbasetation_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除ClassBasetation"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + classbasetationService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出ClassBasetation到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("班级"); //1 | |
| 185 | + titles.add("基站"); //2 | |
| 186 | + titles.add("时间"); //3 | |
| 187 | + dataMap.put("titles", titles); | |
| 188 | + List<PageData> varOList = classbasetationService.listAll(pd); | |
| 189 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 190 | + for(int i=0;i<varOList.size();i++){ | |
| 191 | + PageData vpd = new PageData(); | |
| 192 | + vpd.put("var1", varOList.get(i).get("SCLASS_ID").toString()); //1 | |
| 193 | + vpd.put("var2", varOList.get(i).get("BASESTATION_ID").toString()); //2 | |
| 194 | + vpd.put("var3", varOList.get(i).getString("CREATE_TIME")); //3 | |
| 195 | + varList.add(vpd); | |
| 196 | + } | |
| 197 | + dataMap.put("varList", varList); | |
| 198 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 199 | + mv = new ModelAndView(erv,dataMap); | |
| 200 | + return mv; | |
| 201 | + } | |
| 202 | + | |
| 203 | + @InitBinder | |
| 204 | + public void initBinder(WebDataBinder binder){ | |
| 205 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 206 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 207 | + } | |
| 208 | +} | ... | ... |
src/com/fh/controller/sunvote/classroster/ClassRosterController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.classroster; | |
| 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.classroster.ClassRosterManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:班级名册 | |
| 30 | + * 创建时间:2018-05-16 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/classroster") | |
| 34 | +public class ClassRosterController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "classroster/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="classrosterService") | |
| 38 | + private ClassRosterManager classrosterService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增ClassRoster"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("CLASSROSTER_ID", this.get32UUID()); //主键 | |
| 52 | + classrosterService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除ClassRoster"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + classrosterService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改ClassRoster"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + classrosterService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表ClassRoster"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = classrosterService.list(page); //列出ClassRoster列表 | |
| 107 | + mv.setViewName("sunvote/classroster/classroster_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/classroster/classroster_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = classrosterService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/classroster/classroster_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除ClassRoster"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + classrosterService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出ClassRoster到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("班级"); //1 | |
| 185 | + titles.add("学生"); //2 | |
| 186 | + titles.add("学期名称"); //3 | |
| 187 | + dataMap.put("titles", titles); | |
| 188 | + List<PageData> varOList = classrosterService.listAll(pd); | |
| 189 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 190 | + for(int i=0;i<varOList.size();i++){ | |
| 191 | + PageData vpd = new PageData(); | |
| 192 | + vpd.put("var1", varOList.get(i).get("SCLASS_ID").toString()); //1 | |
| 193 | + vpd.put("var2", varOList.get(i).get("STUDENT_ID").toString()); //2 | |
| 194 | + vpd.put("var3", varOList.get(i).getString("TEAMID")); //3 | |
| 195 | + varList.add(vpd); | |
| 196 | + } | |
| 197 | + dataMap.put("varList", varList); | |
| 198 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 199 | + mv = new ModelAndView(erv,dataMap); | |
| 200 | + return mv; | |
| 201 | + } | |
| 202 | + | |
| 203 | + @InitBinder | |
| 204 | + public void initBinder(WebDataBinder binder){ | |
| 205 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 206 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 207 | + } | |
| 208 | +} | ... | ... |
src/com/fh/controller/sunvote/keypadcheck/KeypadCheckController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.keypadcheck; | |
| 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.keypadcheck.KeypadCheckManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:键盘检测表 | |
| 30 | + * 创建时间:2018-05-16 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/keypadcheck") | |
| 34 | +public class KeypadCheckController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "keypadcheck/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="keypadcheckService") | |
| 38 | + private KeypadCheckManager keypadcheckService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增KeypadCheck"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("KEYPADCHECK_ID", this.get32UUID()); //主键 | |
| 52 | + pd.put("CREATE_DATE", Tools.date2Str(new Date())); //创建时间 | |
| 53 | + keypadcheckService.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()+"删除KeypadCheck"); | |
| 66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 67 | + PageData pd = new PageData(); | |
| 68 | + pd = this.getPageData(); | |
| 69 | + keypadcheckService.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()+"修改KeypadCheck"); | |
| 81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 82 | + ModelAndView mv = this.getModelAndView(); | |
| 83 | + PageData pd = new PageData(); | |
| 84 | + pd = this.getPageData(); | |
| 85 | + keypadcheckService.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()+"列表KeypadCheck"); | |
| 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 = keypadcheckService.list(page); //列出KeypadCheck列表 | |
| 108 | + mv.setViewName("sunvote/keypadcheck/keypadcheck_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/keypadcheck/keypadcheck_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 = keypadcheckService.findById(pd); //根据ID读取 | |
| 140 | + mv.setViewName("sunvote/keypadcheck/keypadcheck_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()+"批量删除KeypadCheck"); | |
| 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 | + keypadcheckService.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()+"导出KeypadCheck到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("键盘ID"); //1 | |
| 186 | + titles.add("创建时间"); //2 | |
| 187 | + titles.add("电量信息"); //3 | |
| 188 | + titles.add("是否在线"); //4 | |
| 189 | + dataMap.put("titles", titles); | |
| 190 | + List<PageData> varOList = keypadcheckService.listAll(pd); | |
| 191 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 192 | + for(int i=0;i<varOList.size();i++){ | |
| 193 | + PageData vpd = new PageData(); | |
| 194 | + vpd.put("var1", varOList.get(i).getString("KEYPAD_ID")); //1 | |
| 195 | + vpd.put("var2", varOList.get(i).getString("CREATE_DATE")); //2 | |
| 196 | + vpd.put("var3", varOList.get(i).getString("BATTERY_INFO")); //3 | |
| 197 | + vpd.put("var4", varOList.get(i).get("ONLINE").toString()); //4 | |
| 198 | + varList.add(vpd); | |
| 199 | + } | |
| 200 | + dataMap.put("varList", varList); | |
| 201 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 202 | + mv = new ModelAndView(erv,dataMap); | |
| 203 | + return mv; | |
| 204 | + } | |
| 205 | + | |
| 206 | + @InitBinder | |
| 207 | + public void initBinder(WebDataBinder binder){ | |
| 208 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 209 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 210 | + } | |
| 211 | +} | ... | ... |
src/com/fh/controller/sunvote/knowledge/KnowledgeController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.knowledge; | |
| 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.knowledge.KnowledgeManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明: 知识点 | |
| 30 | + * 创建时间:2018-05-17 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/knowledge") | |
| 34 | +public class KnowledgeController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "knowledge/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="knowledgeService") | |
| 38 | + private KnowledgeManager knowledgeService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增Knowledge"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("KNOWLEDGE_ID", this.get32UUID()); //主键 | |
| 52 | + knowledgeService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除Knowledge"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + knowledgeService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改Knowledge"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + knowledgeService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表Knowledge"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = knowledgeService.list(page); //列出Knowledge列表 | |
| 107 | + mv.setViewName("sunvote/knowledge/knowledge_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/knowledge/knowledge_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = knowledgeService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/knowledge/knowledge_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除Knowledge"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + knowledgeService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出Knowledge到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("知识点名称"); //1 | |
| 185 | + titles.add("父知识点"); //2 | |
| 186 | + titles.add("排序"); //3 | |
| 187 | + titles.add("编码"); //4 | |
| 188 | + titles.add("知识点备注"); //5 | |
| 189 | + dataMap.put("titles", titles); | |
| 190 | + List<PageData> varOList = knowledgeService.listAll(pd); | |
| 191 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 192 | + for(int i=0;i<varOList.size();i++){ | |
| 193 | + PageData vpd = new PageData(); | |
| 194 | + vpd.put("var1", varOList.get(i).getString("NAME")); //1 | |
| 195 | + vpd.put("var2", varOList.get(i).getString("P_ID")); //2 | |
| 196 | + vpd.put("var3", varOList.get(i).get("RANK").toString()); //3 | |
| 197 | + vpd.put("var4", varOList.get(i).getString("CODE")); //4 | |
| 198 | + vpd.put("var5", varOList.get(i).getString("REMARK")); //5 | |
| 199 | + varList.add(vpd); | |
| 200 | + } | |
| 201 | + dataMap.put("varList", varList); | |
| 202 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 203 | + mv = new ModelAndView(erv,dataMap); | |
| 204 | + return mv; | |
| 205 | + } | |
| 206 | + | |
| 207 | + @InitBinder | |
| 208 | + public void initBinder(WebDataBinder binder){ | |
| 209 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 210 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 211 | + } | |
| 212 | +} | ... | ... |
src/com/fh/controller/sunvote/knowledgechapter/KnowledgeChapterController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.knowledgechapter; | |
| 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.knowledgechapter.KnowledgeChapterManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:知识点章节表 | |
| 30 | + * 创建时间:2018-05-17 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/knowledgechapter") | |
| 34 | +public class KnowledgeChapterController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "knowledgechapter/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="knowledgechapterService") | |
| 38 | + private KnowledgeChapterManager knowledgechapterService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增KnowledgeChapter"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("KNOWLEDGECHAPTER_ID", this.get32UUID()); //主键 | |
| 52 | + knowledgechapterService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除KnowledgeChapter"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + knowledgechapterService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改KnowledgeChapter"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + knowledgechapterService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表KnowledgeChapter"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = knowledgechapterService.list(page); //列出KnowledgeChapter列表 | |
| 107 | + mv.setViewName("sunvote/knowledgechapter/knowledgechapter_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/knowledgechapter/knowledgechapter_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = knowledgechapterService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/knowledgechapter/knowledgechapter_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除KnowledgeChapter"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + knowledgechapterService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出KnowledgeChapter到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("知识点"); //1 | |
| 185 | + titles.add("章节"); //2 | |
| 186 | + dataMap.put("titles", titles); | |
| 187 | + List<PageData> varOList = knowledgechapterService.listAll(pd); | |
| 188 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 189 | + for(int i=0;i<varOList.size();i++){ | |
| 190 | + PageData vpd = new PageData(); | |
| 191 | + vpd.put("var1", varOList.get(i).getString("KNOWLEDGE_ID")); //1 | |
| 192 | + vpd.put("var2", varOList.get(i).getString("CHAPTER_ID")); //2 | |
| 193 | + varList.add(vpd); | |
| 194 | + } | |
| 195 | + dataMap.put("varList", varList); | |
| 196 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 197 | + mv = new ModelAndView(erv,dataMap); | |
| 198 | + return mv; | |
| 199 | + } | |
| 200 | + | |
| 201 | + @InitBinder | |
| 202 | + public void initBinder(WebDataBinder binder){ | |
| 203 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 204 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 205 | + } | |
| 206 | +} | ... | ... |
src/com/fh/controller/sunvote/paper/PaperController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.paper; | |
| 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.paper.PaperManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:试卷 | |
| 30 | + * 创建时间:2018-05-17 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/paper") | |
| 34 | +public class PaperController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "paper/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="paperService") | |
| 38 | + private PaperManager paperService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增Paper"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("PAPER_ID", this.get32UUID()); //主键 | |
| 52 | + paperService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除Paper"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + paperService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改Paper"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + paperService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表Paper"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = paperService.list(page); //列出Paper列表 | |
| 107 | + mv.setViewName("sunvote/paper/paper_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/paper/paper_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = paperService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/paper/paper_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除Paper"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + paperService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出Paper到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("试卷标题"); //1 | |
| 185 | + titles.add("出卷老师"); //2 | |
| 186 | + titles.add("试卷类型"); //3 | |
| 187 | + titles.add("科目"); //4 | |
| 188 | + titles.add("年级"); //5 | |
| 189 | + titles.add("学校"); //6 | |
| 190 | + titles.add("创建时间"); //7 | |
| 191 | + titles.add("修改时间"); //8 | |
| 192 | + titles.add("建议考试时长"); //9 | |
| 193 | + titles.add("试卷状态"); //10 | |
| 194 | + titles.add("备注"); //11 | |
| 195 | + dataMap.put("titles", titles); | |
| 196 | + List<PageData> varOList = paperService.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("TITLE")); //1 | |
| 201 | + vpd.put("var2", varOList.get(i).getString("USER_ID")); //2 | |
| 202 | + vpd.put("var3", varOList.get(i).getString("PAPER_TYPE")); //3 | |
| 203 | + vpd.put("var4", varOList.get(i).getString("SUBJECT_ID")); //4 | |
| 204 | + vpd.put("var5", varOList.get(i).getString("GRADE_ID")); //5 | |
| 205 | + vpd.put("var6", varOList.get(i).getString("SCHOOL_ID")); //6 | |
| 206 | + vpd.put("var7", varOList.get(i).getString("CREATE_DATE")); //7 | |
| 207 | + vpd.put("var8", varOList.get(i).getString("MODIFY_DATE")); //8 | |
| 208 | + vpd.put("var9", varOList.get(i).getString("EXAM_TIME")); //9 | |
| 209 | + vpd.put("var10", varOList.get(i).getString("PAPER_STATE")); //10 | |
| 210 | + vpd.put("var11", varOList.get(i).getString("REMARK")); //11 | |
| 211 | + varList.add(vpd); | |
| 212 | + } | |
| 213 | + dataMap.put("varList", varList); | |
| 214 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 215 | + mv = new ModelAndView(erv,dataMap); | |
| 216 | + return mv; | |
| 217 | + } | |
| 218 | + | |
| 219 | + @InitBinder | |
| 220 | + public void initBinder(WebDataBinder binder){ | |
| 221 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 222 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 223 | + } | |
| 224 | +} | ... | ... |
src/com/fh/controller/sunvote/paperclassteacher/PaperClassTeacherController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.paperclassteacher; | |
| 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.paperclassteacher.PaperClassTeacherManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:试卷班级教师 | |
| 30 | + * 创建时间:2018-05-17 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/paperclassteacher") | |
| 34 | +public class PaperClassTeacherController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "paperclassteacher/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="paperclassteacherService") | |
| 38 | + private PaperClassTeacherManager paperclassteacherService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增PaperClassTeacher"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("PAPERCLASSTEACHER_ID", this.get32UUID()); //主键 | |
| 52 | + paperclassteacherService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除PaperClassTeacher"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + paperclassteacherService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改PaperClassTeacher"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + paperclassteacherService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表PaperClassTeacher"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = paperclassteacherService.list(page); //列出PaperClassTeacher列表 | |
| 107 | + mv.setViewName("sunvote/paperclassteacher/paperclassteacher_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/paperclassteacher/paperclassteacher_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = paperclassteacherService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/paperclassteacher/paperclassteacher_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除PaperClassTeacher"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + paperclassteacherService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出PaperClassTeacher到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("试卷"); //1 | |
| 185 | + titles.add("班级"); //2 | |
| 186 | + titles.add("教师"); //3 | |
| 187 | + dataMap.put("titles", titles); | |
| 188 | + List<PageData> varOList = paperclassteacherService.listAll(pd); | |
| 189 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 190 | + for(int i=0;i<varOList.size();i++){ | |
| 191 | + PageData vpd = new PageData(); | |
| 192 | + vpd.put("var1", varOList.get(i).getString("PAPER_ID")); //1 | |
| 193 | + vpd.put("var2", varOList.get(i).getString("CLASS_ID")); //2 | |
| 194 | + vpd.put("var3", varOList.get(i).getString("TEACHER_ID")); //3 | |
| 195 | + varList.add(vpd); | |
| 196 | + } | |
| 197 | + dataMap.put("varList", varList); | |
| 198 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 199 | + mv = new ModelAndView(erv,dataMap); | |
| 200 | + return mv; | |
| 201 | + } | |
| 202 | + | |
| 203 | + @InitBinder | |
| 204 | + public void initBinder(WebDataBinder binder){ | |
| 205 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 206 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 207 | + } | |
| 208 | +} | ... | ... |
src/com/fh/controller/sunvote/paperquestion/PaperQuestionController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.paperquestion; | |
| 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.paperquestion.PaperQuestionManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:试卷题目表 | |
| 30 | + * 创建时间:2018-05-17 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/paperquestion") | |
| 34 | +public class PaperQuestionController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "paperquestion/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="paperquestionService") | |
| 38 | + private PaperQuestionManager paperquestionService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增PaperQuestion"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("PAPERQUESTION_ID", this.get32UUID()); //主键 | |
| 52 | + paperquestionService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除PaperQuestion"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + paperquestionService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改PaperQuestion"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + paperquestionService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表PaperQuestion"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = paperquestionService.list(page); //列出PaperQuestion列表 | |
| 107 | + mv.setViewName("sunvote/paperquestion/paperquestion_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/paperquestion/paperquestion_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = paperquestionService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/paperquestion/paperquestion_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除PaperQuestion"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + paperquestionService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出PaperQuestion到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("试卷"); //1 | |
| 185 | + titles.add("题目"); //2 | |
| 186 | + titles.add("分值"); //3 | |
| 187 | + titles.add("部分分"); //4 | |
| 188 | + titles.add("排序编号"); //5 | |
| 189 | + titles.add("题号"); //6 | |
| 190 | + dataMap.put("titles", titles); | |
| 191 | + List<PageData> varOList = paperquestionService.listAll(pd); | |
| 192 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 193 | + for(int i=0;i<varOList.size();i++){ | |
| 194 | + PageData vpd = new PageData(); | |
| 195 | + vpd.put("var1", varOList.get(i).getString("PAPER_ID")); //1 | |
| 196 | + vpd.put("var2", varOList.get(i).getString("QUESTION_ID")); //2 | |
| 197 | + vpd.put("var3", varOList.get(i).get("SCORE").toString()); //3 | |
| 198 | + vpd.put("var4", varOList.get(i).getString("PART_SCORE")); //4 | |
| 199 | + vpd.put("var5", varOList.get(i).getString("RANK")); //5 | |
| 200 | + vpd.put("var6", varOList.get(i).getString("NO_NAME")); //6 | |
| 201 | + varList.add(vpd); | |
| 202 | + } | |
| 203 | + dataMap.put("varList", varList); | |
| 204 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 205 | + mv = new ModelAndView(erv,dataMap); | |
| 206 | + return mv; | |
| 207 | + } | |
| 208 | + | |
| 209 | + @InitBinder | |
| 210 | + public void initBinder(WebDataBinder binder){ | |
| 211 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 212 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 213 | + } | |
| 214 | +} | ... | ... |
src/com/fh/controller/sunvote/question/QuestionController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.question; | |
| 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 | + | |
| 12 | +import javax.annotation.Resource; | |
| 13 | + | |
| 14 | +import org.springframework.beans.propertyeditors.CustomDateEditor; | |
| 15 | +import org.springframework.stereotype.Controller; | |
| 16 | +import org.springframework.web.bind.WebDataBinder; | |
| 17 | +import org.springframework.web.bind.annotation.InitBinder; | |
| 18 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 19 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 20 | +import org.springframework.web.servlet.ModelAndView; | |
| 21 | + | |
| 22 | +import com.fh.controller.base.BaseController; | |
| 23 | +import com.fh.entity.Page; | |
| 24 | +import com.fh.util.AppUtil; | |
| 25 | +import com.fh.util.ObjectExcelView; | |
| 26 | +import com.fh.util.PageData; | |
| 27 | +import com.fh.util.Jurisdiction; | |
| 28 | +import com.fh.util.Tools; | |
| 29 | +import com.fh.service.feedback.feedback.FeedbackManager; | |
| 30 | +import com.fh.service.feedback.problemphenomenon.ProblemPhenomenonManager; | |
| 31 | +import com.fh.service.sunvote.basestation.BasestationManager; | |
| 32 | +import com.fh.service.sunvote.chapter.ChapterManager; | |
| 33 | +import com.fh.service.sunvote.classbasetation.ClassBasetationManager; | |
| 34 | +import com.fh.service.sunvote.classroster.ClassRosterManager; | |
| 35 | +import com.fh.service.sunvote.classtype.ClassTypeManager; | |
| 36 | +import com.fh.service.sunvote.coursemanagement.CourseManagementManager; | |
| 37 | +import com.fh.service.sunvote.grade.GradeManager; | |
| 38 | +import com.fh.service.sunvote.keypad.KeypadManager; | |
| 39 | +import com.fh.service.sunvote.keypadcheck.KeypadCheckManager; | |
| 40 | +import com.fh.service.sunvote.knowledge.KnowledgeManager; | |
| 41 | +import com.fh.service.sunvote.knowledgechapter.KnowledgeChapterManager; | |
| 42 | +import com.fh.service.sunvote.paper.PaperManager; | |
| 43 | +import com.fh.service.sunvote.paperclassteacher.PaperClassTeacherManager; | |
| 44 | +import com.fh.service.sunvote.paperquestion.PaperQuestionManager; | |
| 45 | +import com.fh.service.sunvote.papertype.PaperTypeManager; | |
| 46 | +import com.fh.service.sunvote.question.QuestionManager; | |
| 47 | +import com.fh.service.sunvote.questiontype.QuestionTypeManager; | |
| 48 | +import com.fh.service.sunvote.school.SchoolManager; | |
| 49 | +import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | |
| 50 | +import com.fh.service.sunvote.sclass.SClassManager; | |
| 51 | +import com.fh.service.sunvote.student.StudentManager; | |
| 52 | +import com.fh.service.sunvote.subject.SubjectManager; | |
| 53 | +import com.fh.service.sunvote.teacher.TeacherManager; | |
| 54 | +import com.fh.service.sunvote.testpaperinfo.TestPaperInfoManager; | |
| 55 | + | |
| 56 | +/** | |
| 57 | + * 说明:题目表 | |
| 58 | + * 创建时间:2018-05-16 | |
| 59 | + */ | |
| 60 | +@Controller | |
| 61 | +@RequestMapping(value="/question") | |
| 62 | +public class QuestionController extends BaseController { | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + String menuUrl = "question/list.do"; //菜单地址(权限用) | |
| 67 | + @Resource(name="questionService") | |
| 68 | + private QuestionManager questionService; | |
| 69 | + | |
| 70 | + @Resource(name = "schoolService") | |
| 71 | + private SchoolManager schoolService; | |
| 72 | + | |
| 73 | + @Resource(name = "basestationService") | |
| 74 | + private BasestationManager basestationService; | |
| 75 | + | |
| 76 | + @Resource(name="chapterService") | |
| 77 | + private ChapterManager chapterService; | |
| 78 | + | |
| 79 | + @Resource(name="classbasetationService") | |
| 80 | + private ClassBasetationManager classbasetationService; | |
| 81 | + | |
| 82 | + @Resource(name="classrosterService") | |
| 83 | + private ClassRosterManager classrosterService; | |
| 84 | + | |
| 85 | + @Resource(name="classtypeService") | |
| 86 | + private ClassTypeManager classtypeService; | |
| 87 | + | |
| 88 | + @Resource(name="gradeService") | |
| 89 | + private GradeManager gradeService; | |
| 90 | + | |
| 91 | + @Resource(name="coursemanagementService") | |
| 92 | + private CourseManagementManager coursemanagementService; | |
| 93 | + | |
| 94 | + @Resource(name = "keypadService") | |
| 95 | + private KeypadManager keypadService; | |
| 96 | + | |
| 97 | + @Resource(name="keypadcheckService") | |
| 98 | + private KeypadCheckManager keypadcheckService; | |
| 99 | + | |
| 100 | + @Resource(name="knowledgeService") | |
| 101 | + private KnowledgeManager knowledgeService; | |
| 102 | + | |
| 103 | + @Resource(name="knowledgechapterService") | |
| 104 | + private KnowledgeChapterManager knowledgechapterService; | |
| 105 | + | |
| 106 | + @Resource(name="paperService") | |
| 107 | + private PaperManager paperService; | |
| 108 | + | |
| 109 | + @Resource(name="paperclassteacherService") | |
| 110 | + private PaperClassTeacherManager paperclassteacherService; | |
| 111 | + | |
| 112 | + @Resource(name="paperquestionService") | |
| 113 | + private PaperQuestionManager paperquestionService; | |
| 114 | + | |
| 115 | + @Resource(name="papertypeService") | |
| 116 | + private PaperTypeManager papertypeService; | |
| 117 | + | |
| 118 | + @Resource(name="questiontypeService") | |
| 119 | + private QuestionTypeManager questiontypeService; | |
| 120 | + | |
| 121 | + @Resource(name="schoolgradesubjectService") | |
| 122 | + private SchoolGradeSubjectManager schoolgradesubjectService; | |
| 123 | + | |
| 124 | + @Resource(name="sclassService") | |
| 125 | + private SClassManager sclassService; | |
| 126 | + | |
| 127 | + @Resource(name="studentService") | |
| 128 | + private StudentManager studentService; | |
| 129 | + | |
| 130 | + @Resource(name="subjectService") | |
| 131 | + private SubjectManager subjectService; | |
| 132 | + | |
| 133 | + @Resource(name="teacherService") | |
| 134 | + private TeacherManager teacherService; | |
| 135 | + | |
| 136 | + @Resource(name="testpaperinfoService") | |
| 137 | + private TestPaperInfoManager testpaperinfoService; | |
| 138 | + | |
| 139 | + @Resource(name = "feedbackService") | |
| 140 | + private FeedbackManager feedbackService; | |
| 141 | + | |
| 142 | + @Resource(name = "problemphenomenonService") | |
| 143 | + private ProblemPhenomenonManager problemphenomenonService; | |
| 144 | + | |
| 145 | + /**保存 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/save") | |
| 150 | + public ModelAndView save() throws Exception{ | |
| 151 | + logBefore(logger, Jurisdiction.getUsername()+"新增Question"); | |
| 152 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 153 | + ModelAndView mv = this.getModelAndView(); | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + pd = this.getPageData(); | |
| 156 | + pd.put("QUESTION_ID", this.get32UUID()); //主键 | |
| 157 | + questionService.save(pd); | |
| 158 | + mv.addObject("msg","success"); | |
| 159 | + mv.setViewName("save_result"); | |
| 160 | + return mv; | |
| 161 | + } | |
| 162 | + | |
| 163 | + /**删除 | |
| 164 | + * @param out | |
| 165 | + * @throws Exception | |
| 166 | + */ | |
| 167 | + @RequestMapping(value="/delete") | |
| 168 | + public void delete(PrintWriter out) throws Exception{ | |
| 169 | + logBefore(logger, Jurisdiction.getUsername()+"删除Question"); | |
| 170 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 171 | + PageData pd = new PageData(); | |
| 172 | + pd = this.getPageData(); | |
| 173 | + questionService.delete(pd); | |
| 174 | + out.write("success"); | |
| 175 | + out.close(); | |
| 176 | + } | |
| 177 | + | |
| 178 | + /**修改 | |
| 179 | + * @param | |
| 180 | + * @throws Exception | |
| 181 | + */ | |
| 182 | + @RequestMapping(value="/edit") | |
| 183 | + public ModelAndView edit() throws Exception{ | |
| 184 | + logBefore(logger, Jurisdiction.getUsername()+"修改Question"); | |
| 185 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 186 | + ModelAndView mv = this.getModelAndView(); | |
| 187 | + PageData pd = new PageData(); | |
| 188 | + pd = this.getPageData(); | |
| 189 | + questionService.edit(pd); | |
| 190 | + mv.addObject("msg","success"); | |
| 191 | + mv.setViewName("save_result"); | |
| 192 | + return mv; | |
| 193 | + } | |
| 194 | + | |
| 195 | + /**列表 | |
| 196 | + * @param page | |
| 197 | + * @throws Exception | |
| 198 | + */ | |
| 199 | + @RequestMapping(value="/list") | |
| 200 | + public ModelAndView list(Page page) throws Exception{ | |
| 201 | + logBefore(logger, Jurisdiction.getUsername()+"列表Question"); | |
| 202 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 203 | + ModelAndView mv = this.getModelAndView(); | |
| 204 | + PageData pd = new PageData(); | |
| 205 | + pd = this.getPageData(); | |
| 206 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 207 | + if(null != keywords && !"".equals(keywords)){ | |
| 208 | + pd.put("keywords", keywords.trim()); | |
| 209 | + } | |
| 210 | + page.setPd(pd); | |
| 211 | + List<PageData> varList = questionService.list(page); //列出Question列表 | |
| 212 | + mv.setViewName("sunvote/question/question_list"); | |
| 213 | + mv.addObject("varList", varList); | |
| 214 | + mv.addObject("pd", pd); | |
| 215 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 216 | + return mv; | |
| 217 | + } | |
| 218 | + | |
| 219 | + /**去新增页面 | |
| 220 | + * @param | |
| 221 | + * @throws Exception | |
| 222 | + */ | |
| 223 | + @RequestMapping(value="/goAdd") | |
| 224 | + public ModelAndView goAdd()throws Exception{ | |
| 225 | + ModelAndView mv = this.getModelAndView(); | |
| 226 | + PageData pd = new PageData(); | |
| 227 | + pd = this.getPageData(); | |
| 228 | + mv.setViewName("sunvote/question/question_edit"); | |
| 229 | + mv.addObject("msg", "save"); | |
| 230 | + mv.addObject("pd", pd); | |
| 231 | + return mv; | |
| 232 | + } | |
| 233 | + | |
| 234 | + /**去修改页面 | |
| 235 | + * @param | |
| 236 | + * @throws Exception | |
| 237 | + */ | |
| 238 | + @RequestMapping(value="/goEdit") | |
| 239 | + public ModelAndView goEdit()throws Exception{ | |
| 240 | + ModelAndView mv = this.getModelAndView(); | |
| 241 | + PageData pd = new PageData(); | |
| 242 | + pd = this.getPageData(); | |
| 243 | + pd = questionService.findById(pd); //根据ID读取 | |
| 244 | + mv.setViewName("sunvote/question/question_edit"); | |
| 245 | + mv.addObject("msg", "edit"); | |
| 246 | + mv.addObject("pd", pd); | |
| 247 | + return mv; | |
| 248 | + } | |
| 249 | + | |
| 250 | + /**批量删除 | |
| 251 | + * @param | |
| 252 | + * @throws Exception | |
| 253 | + */ | |
| 254 | + @RequestMapping(value="/deleteAll") | |
| 255 | + @ResponseBody | |
| 256 | + public Object deleteAll() throws Exception{ | |
| 257 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除Question"); | |
| 258 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 259 | + PageData pd = new PageData(); | |
| 260 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 261 | + pd = this.getPageData(); | |
| 262 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 263 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 264 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 265 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 266 | + questionService.deleteAll(ArrayDATA_IDS); | |
| 267 | + pd.put("msg", "ok"); | |
| 268 | + }else{ | |
| 269 | + pd.put("msg", "no"); | |
| 270 | + } | |
| 271 | + pdList.add(pd); | |
| 272 | + map.put("list", pdList); | |
| 273 | + return AppUtil.returnObject(pd, map); | |
| 274 | + } | |
| 275 | + | |
| 276 | + /**导出到excel | |
| 277 | + * @param | |
| 278 | + * @throws Exception | |
| 279 | + */ | |
| 280 | + @RequestMapping(value="/excel") | |
| 281 | + public ModelAndView exportExcel() throws Exception{ | |
| 282 | + logBefore(logger, Jurisdiction.getUsername()+"导出Question到excel"); | |
| 283 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 284 | + ModelAndView mv = new ModelAndView(); | |
| 285 | + PageData pd = new PageData(); | |
| 286 | + pd = this.getPageData(); | |
| 287 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 288 | + List<String> titles = new ArrayList<String>(); | |
| 289 | + titles.add("父ID"); //1 | |
| 290 | + titles.add("所属科目"); //2 | |
| 291 | + titles.add("所属章节"); //3 | |
| 292 | + titles.add("题目类型"); //4 | |
| 293 | + titles.add("出题老师"); //5 | |
| 294 | + titles.add("所属学校"); //6 | |
| 295 | + titles.add("知识点"); //7 | |
| 296 | + titles.add("题目内容"); //8 | |
| 297 | + titles.add("选项个数"); //9 | |
| 298 | + titles.add("选项内容"); //10 | |
| 299 | + titles.add("标准答案"); //11 | |
| 300 | + titles.add("难度系数"); //12 | |
| 301 | + titles.add("题目解析"); //13 | |
| 302 | + titles.add("题目来源"); //14 | |
| 303 | + titles.add("建议试题总分"); //15 | |
| 304 | + titles.add("建议部分分"); //16 | |
| 305 | + titles.add("用户ID"); //17 | |
| 306 | + titles.add("创建时间"); //18 | |
| 307 | + titles.add("备注"); //19 | |
| 308 | + dataMap.put("titles", titles); | |
| 309 | + List<PageData> varOList = questionService.listAll(pd); | |
| 310 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 311 | + for(int i=0;i<varOList.size();i++){ | |
| 312 | + PageData vpd = new PageData(); | |
| 313 | + vpd.put("var1", varOList.get(i).getString("P_ID")); //1 | |
| 314 | + vpd.put("var2", varOList.get(i).getString("SUBJECT_ID")); //2 | |
| 315 | + vpd.put("var3", varOList.get(i).getString("CHAPTER_ID")); //3 | |
| 316 | + vpd.put("var4", varOList.get(i).getString("PROBLEM_TYPE_ID")); //4 | |
| 317 | + vpd.put("var5", varOList.get(i).getString("TEACHER_ID")); //5 | |
| 318 | + vpd.put("var6", varOList.get(i).getString("SCHOOL_ID")); //6 | |
| 319 | + vpd.put("var7", varOList.get(i).getString("KNOWLEDGE_ID")); //7 | |
| 320 | + vpd.put("var8", varOList.get(i).getString("CONTENT")); //8 | |
| 321 | + vpd.put("var9", varOList.get(i).get("OPTION_NUM").toString()); //9 | |
| 322 | + vpd.put("var10", varOList.get(i).getString("OPTION_CONTENT")); //10 | |
| 323 | + vpd.put("var11", varOList.get(i).getString("ANSWER")); //11 | |
| 324 | + vpd.put("var12", varOList.get(i).getString("DIFFICULTY")); //12 | |
| 325 | + vpd.put("var13", varOList.get(i).getString("ANALYSIS")); //13 | |
| 326 | + vpd.put("var14", varOList.get(i).getString("QUESTION_FROM")); //14 | |
| 327 | + vpd.put("var15", varOList.get(i).getString("SUG_SCORE")); //15 | |
| 328 | + vpd.put("var16", varOList.get(i).getString("SUG_PART_SCORE")); //16 | |
| 329 | + vpd.put("var17", varOList.get(i).getString("USER_ID")); //17 | |
| 330 | + vpd.put("var18", varOList.get(i).getString("CREATE_DATE")); //18 | |
| 331 | + vpd.put("var19", varOList.get(i).getString("REMARK")); //19 | |
| 332 | + varList.add(vpd); | |
| 333 | + } | |
| 334 | + dataMap.put("varList", varList); | |
| 335 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 336 | + mv = new ModelAndView(erv,dataMap); | |
| 337 | + return mv; | |
| 338 | + } | |
| 339 | + | |
| 340 | + @InitBinder | |
| 341 | + public void initBinder(WebDataBinder binder){ | |
| 342 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 343 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 344 | + } | |
| 345 | +} | ... | ... |
src/com/fh/controller/sunvote/questiontype/QuestionTypeController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.questiontype; | |
| 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.questiontype.QuestionTypeManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:题目类型表 | |
| 30 | + * 创建时间:2018-05-16 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/questiontype") | |
| 34 | +public class QuestionTypeController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "questiontype/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="questiontypeService") | |
| 38 | + private QuestionTypeManager questiontypeService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增QuestionType"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("QUESTIONTYPE_ID", this.get32UUID()); //主键 | |
| 52 | + questiontypeService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除QuestionType"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + questiontypeService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改QuestionType"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + questiontypeService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表QuestionType"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = questiontypeService.list(page); //列出QuestionType列表 | |
| 107 | + mv.setViewName("sunvote/questiontype/questiontype_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/questiontype/questiontype_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = questiontypeService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/questiontype/questiontype_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除QuestionType"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + questiontypeService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出QuestionType到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("名称"); //1 | |
| 185 | + titles.add("创建时间"); //2 | |
| 186 | + titles.add("修改时间"); //3 | |
| 187 | + titles.add("备注"); //4 | |
| 188 | + dataMap.put("titles", titles); | |
| 189 | + List<PageData> varOList = questiontypeService.listAll(pd); | |
| 190 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 191 | + for(int i=0;i<varOList.size();i++){ | |
| 192 | + PageData vpd = new PageData(); | |
| 193 | + vpd.put("var1", varOList.get(i).getString("NAME")); //1 | |
| 194 | + vpd.put("var2", varOList.get(i).getString("CREATE_DATE")); //2 | |
| 195 | + vpd.put("var3", varOList.get(i).getString("MODIFY_DATE")); //3 | |
| 196 | + vpd.put("var4", varOList.get(i).getString("REMARK")); //4 | |
| 197 | + varList.add(vpd); | |
| 198 | + } | |
| 199 | + dataMap.put("varList", varList); | |
| 200 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 201 | + mv = new ModelAndView(erv,dataMap); | |
| 202 | + return mv; | |
| 203 | + } | |
| 204 | + | |
| 205 | + @InitBinder | |
| 206 | + public void initBinder(WebDataBinder binder){ | |
| 207 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 208 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 209 | + } | |
| 210 | +} | ... | ... |
src/com/fh/controller/sunvote/schoolgradesubject/SchoolGradeSubjectController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.schoolgradesubject; | |
| 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.schoolgradesubject.SchoolGradeSubjectManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:学校年级科目表 | |
| 30 | + * 创建时间:2018-05-15 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/schoolgradesubject") | |
| 34 | +public class SchoolGradeSubjectController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "schoolgradesubject/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="schoolgradesubjectService") | |
| 38 | + private SchoolGradeSubjectManager schoolgradesubjectService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增SchoolGradeSubject"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("SCHOOLGRADESUBJECT_ID", this.get32UUID()); //主键 | |
| 52 | + schoolgradesubjectService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除SchoolGradeSubject"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + schoolgradesubjectService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改SchoolGradeSubject"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + schoolgradesubjectService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表SchoolGradeSubject"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = schoolgradesubjectService.list(page); //列出SchoolGradeSubject列表 | |
| 107 | + mv.setViewName("sunvote/schoolgradesubject/schoolgradesubject_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/schoolgradesubject/schoolgradesubject_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = schoolgradesubjectService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/schoolgradesubject/schoolgradesubject_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除SchoolGradeSubject"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + schoolgradesubjectService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出SchoolGradeSubject到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("学校"); //1 | |
| 185 | + titles.add("年级"); //2 | |
| 186 | + titles.add("科目"); //3 | |
| 187 | + dataMap.put("titles", titles); | |
| 188 | + List<PageData> varOList = schoolgradesubjectService.listAll(pd); | |
| 189 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 190 | + for(int i=0;i<varOList.size();i++){ | |
| 191 | + PageData vpd = new PageData(); | |
| 192 | + vpd.put("var1", varOList.get(i).get("SCHOOL_ID").toString()); //1 | |
| 193 | + vpd.put("var2", varOList.get(i).get("GRADE_ID").toString()); //2 | |
| 194 | + vpd.put("var3", varOList.get(i).get("SUBJECT_ID").toString()); //3 | |
| 195 | + varList.add(vpd); | |
| 196 | + } | |
| 197 | + dataMap.put("varList", varList); | |
| 198 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 199 | + mv = new ModelAndView(erv,dataMap); | |
| 200 | + return mv; | |
| 201 | + } | |
| 202 | + | |
| 203 | + @InitBinder | |
| 204 | + public void initBinder(WebDataBinder binder){ | |
| 205 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 206 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 207 | + } | |
| 208 | +} | ... | ... |
src/com/fh/controller/sunvote/teacher/TeacherController.java
| ... | ... | @@ -11,6 +11,7 @@ import java.util.Map; |
| 11 | 11 | |
| 12 | 12 | import javax.annotation.Resource; |
| 13 | 13 | |
| 14 | +import org.apache.shiro.crypto.hash.SimpleHash; | |
| 14 | 15 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
| 15 | 16 | import org.springframework.stereotype.Controller; |
| 16 | 17 | import org.springframework.web.bind.WebDataBinder; |
| ... | ... | @@ -21,13 +22,14 @@ import org.springframework.web.servlet.ModelAndView; |
| 21 | 22 | |
| 22 | 23 | import com.fh.controller.base.BaseController; |
| 23 | 24 | import com.fh.entity.Page; |
| 25 | +import com.fh.service.sunvote.school.SchoolManager; | |
| 26 | +import com.fh.service.sunvote.teacher.TeacherManager; | |
| 27 | +import com.fh.service.system.fhlog.FHlogManager; | |
| 28 | +import com.fh.service.system.user.UserManager; | |
| 24 | 29 | import com.fh.util.AppUtil; |
| 30 | +import com.fh.util.Jurisdiction; | |
| 25 | 31 | import com.fh.util.ObjectExcelView; |
| 26 | 32 | import com.fh.util.PageData; |
| 27 | -import com.fh.util.Jurisdiction; | |
| 28 | -import com.fh.util.Tools; | |
| 29 | -import com.fh.service.sunvote.school.SchoolManager; | |
| 30 | -import com.fh.service.sunvote.teacher.TeacherManager; | |
| 31 | 33 | |
| 32 | 34 | /** |
| 33 | 35 | * 说明:教师 |
| ... | ... | @@ -45,6 +47,13 @@ public class TeacherController extends BaseController { |
| 45 | 47 | @Resource(name="schoolService") |
| 46 | 48 | private SchoolManager schoolService; |
| 47 | 49 | |
| 50 | + | |
| 51 | + @Resource(name="userService") | |
| 52 | + private UserManager userService; | |
| 53 | + | |
| 54 | + @Resource(name="fhlogService") | |
| 55 | + private FHlogManager FHLOG; | |
| 56 | + | |
| 48 | 57 | /**保存 |
| 49 | 58 | * @param |
| 50 | 59 | * @throws Exception |
| ... | ... | @@ -55,8 +64,25 @@ public class TeacherController extends BaseController { |
| 55 | 64 | if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 |
| 56 | 65 | ModelAndView mv = this.getModelAndView(); |
| 57 | 66 | PageData pd = new PageData(); |
| 67 | + pd.put("ID", this.get32UUID()); | |
| 58 | 68 | pd = this.getPageData(); |
| 59 | 69 | teacherService.save(pd); |
| 70 | + | |
| 71 | + pd.put("USER_ID", pd.getString("ID")); //ID 主键 | |
| 72 | + pd.put("LAST_LOGIN", ""); //最后登录时间 | |
| 73 | + pd.put("IP", ""); //IP | |
| 74 | + pd.put("STATUS", "0"); //状态 | |
| 75 | + pd.put("SKIN", "default"); | |
| 76 | + pd.put("RIGHTS", ""); | |
| 77 | + pd.put("USERNAME", pd.getString("ACCOUT")); | |
| 78 | + pd.put("ROLE_ID", "57bb1e6f138247a0b05cc721a5da1b64"); | |
| 79 | + pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("ACCOUT"), pd.getString("PASSWORD")).toString()); //密码加密 | |
| 80 | + | |
| 81 | + if(null == userService.findByUsername(pd)){ //判断用户名是否存在 | |
| 82 | + userService.saveU(pd); //执行保存 | |
| 83 | + FHLOG.save(Jurisdiction.getUsername(), "新增系统用户:"+pd.getString("USERNAME")); | |
| 84 | + } | |
| 85 | + | |
| 60 | 86 | mv.addObject("msg","success"); |
| 61 | 87 | mv.setViewName("save_result"); |
| 62 | 88 | return mv; |
| ... | ... | @@ -72,7 +98,9 @@ public class TeacherController extends BaseController { |
| 72 | 98 | if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 |
| 73 | 99 | PageData pd = new PageData(); |
| 74 | 100 | pd = this.getPageData(); |
| 101 | + pd.put("USER_ID", pd.get("ID")); | |
| 75 | 102 | teacherService.delete(pd); |
| 103 | + userService.deleteU(pd); | |
| 76 | 104 | out.write("success"); |
| 77 | 105 | out.close(); |
| 78 | 106 | } | ... | ... |
src/com/fh/controller/sunvote/term/TermController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.term; | |
| 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.term.TermManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:学期名称 | |
| 30 | + * 创建时间:2018-05-16 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/term") | |
| 34 | +public class TermController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "term/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="termService") | |
| 38 | + private TermManager termService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增Term"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("TERM_ID", this.get32UUID()); //主键 | |
| 52 | + termService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除Term"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + termService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改Term"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + termService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表Term"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = termService.list(page); //列出Term列表 | |
| 107 | + mv.setViewName("sunvote/term/term_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/term/term_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = termService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/term/term_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除Term"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + termService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出Term到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("名称"); //1 | |
| 185 | + titles.add("起始时间"); //2 | |
| 186 | + titles.add("结束时间"); //3 | |
| 187 | + titles.add("备注"); //4 | |
| 188 | + dataMap.put("titles", titles); | |
| 189 | + List<PageData> varOList = termService.listAll(pd); | |
| 190 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 191 | + for(int i=0;i<varOList.size();i++){ | |
| 192 | + PageData vpd = new PageData(); | |
| 193 | + vpd.put("var1", varOList.get(i).getString("NAME")); //1 | |
| 194 | + vpd.put("var2", varOList.get(i).getString("START_DATE")); //2 | |
| 195 | + vpd.put("var3", varOList.get(i).getString("END_DATE")); //3 | |
| 196 | + vpd.put("var4", varOList.get(i).getString("REMARK")); //4 | |
| 197 | + varList.add(vpd); | |
| 198 | + } | |
| 199 | + dataMap.put("varList", varList); | |
| 200 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 201 | + mv = new ModelAndView(erv,dataMap); | |
| 202 | + return mv; | |
| 203 | + } | |
| 204 | + | |
| 205 | + @InitBinder | |
| 206 | + public void initBinder(WebDataBinder binder){ | |
| 207 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 208 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 209 | + } | |
| 210 | +} | ... | ... |
src/com/fh/controller/sunvote/testpaper/TestPaperController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.testpaper; | |
| 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.testpaper.TestPaperManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:测验 | |
| 30 | + * 创建时间:2018-05-17 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/testpaper") | |
| 34 | +public class TestPaperController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "testpaper/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="testpaperService") | |
| 38 | + private TestPaperManager testpaperService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增TestPaper"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("TESTPAPER_ID", this.get32UUID()); //主键 | |
| 52 | + testpaperService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除TestPaper"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + testpaperService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改TestPaper"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + testpaperService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表TestPaper"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = testpaperService.list(page); //列出TestPaper列表 | |
| 107 | + mv.setViewName("sunvote/testpaper/testpaper_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/testpaper/testpaper_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = testpaperService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/testpaper/testpaper_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除TestPaper"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + testpaperService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出TestPaper到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("测验名称"); //1 | |
| 185 | + titles.add("试卷"); //2 | |
| 186 | + titles.add("班级"); //3 | |
| 187 | + titles.add("老师"); //4 | |
| 188 | + titles.add("开始时间"); //5 | |
| 189 | + titles.add("结束时间"); //6 | |
| 190 | + titles.add("创建时间"); //7 | |
| 191 | + titles.add("主观题分值"); //8 | |
| 192 | + titles.add("测验最高分"); //9 | |
| 193 | + titles.add("最低分"); //10 | |
| 194 | + titles.add("平均分"); //11 | |
| 195 | + titles.add("备注"); //12 | |
| 196 | + dataMap.put("titles", titles); | |
| 197 | + List<PageData> varOList = testpaperService.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("NAME")); //1 | |
| 202 | + vpd.put("var2", varOList.get(i).getString("PAPER_ID")); //2 | |
| 203 | + vpd.put("var3", varOList.get(i).getString("SCLASS_ID")); //3 | |
| 204 | + vpd.put("var4", varOList.get(i).getString("TEACHER_ID")); //4 | |
| 205 | + vpd.put("var5", varOList.get(i).getString("START_DATE")); //5 | |
| 206 | + vpd.put("var6", varOList.get(i).getString("END_DATE")); //6 | |
| 207 | + vpd.put("var7", varOList.get(i).getString("CREATE_DATE")); //7 | |
| 208 | + vpd.put("var8", varOList.get(i).get("OTHER_SCORE").toString()); //8 | |
| 209 | + vpd.put("var9", varOList.get(i).get("HIGHT_SCORE").toString()); //9 | |
| 210 | + vpd.put("var10", varOList.get(i).get("LOW_SCORE").toString()); //10 | |
| 211 | + vpd.put("var11", varOList.get(i).get("AVG_SCORE").toString()); //11 | |
| 212 | + vpd.put("var12", varOList.get(i).getString("REMARK")); //12 | |
| 213 | + varList.add(vpd); | |
| 214 | + } | |
| 215 | + dataMap.put("varList", varList); | |
| 216 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 217 | + mv = new ModelAndView(erv,dataMap); | |
| 218 | + return mv; | |
| 219 | + } | |
| 220 | + | |
| 221 | + @InitBinder | |
| 222 | + public void initBinder(WebDataBinder binder){ | |
| 223 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 224 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 225 | + } | |
| 226 | +} | ... | ... |
src/com/fh/controller/sunvote/testpaperinfo/TestPaperInfoController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.testpaperinfo; | |
| 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.testpaperinfo.TestPaperInfoManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:测验明细表 | |
| 30 | + * 创建时间:2018-05-17 | |
| 31 | + */ | |
| 32 | +@Controller | |
| 33 | +@RequestMapping(value="/testpaperinfo") | |
| 34 | +public class TestPaperInfoController extends BaseController { | |
| 35 | + | |
| 36 | + String menuUrl = "testpaperinfo/list.do"; //菜单地址(权限用) | |
| 37 | + @Resource(name="testpaperinfoService") | |
| 38 | + private TestPaperInfoManager testpaperinfoService; | |
| 39 | + | |
| 40 | + /**保存 | |
| 41 | + * @param | |
| 42 | + * @throws Exception | |
| 43 | + */ | |
| 44 | + @RequestMapping(value="/save") | |
| 45 | + public ModelAndView save() throws Exception{ | |
| 46 | + logBefore(logger, Jurisdiction.getUsername()+"新增TestPaperInfo"); | |
| 47 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 48 | + ModelAndView mv = this.getModelAndView(); | |
| 49 | + PageData pd = new PageData(); | |
| 50 | + pd = this.getPageData(); | |
| 51 | + pd.put("TESTPAPERINFO_ID", this.get32UUID()); //主键 | |
| 52 | + testpaperinfoService.save(pd); | |
| 53 | + mv.addObject("msg","success"); | |
| 54 | + mv.setViewName("save_result"); | |
| 55 | + return mv; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /**删除 | |
| 59 | + * @param out | |
| 60 | + * @throws Exception | |
| 61 | + */ | |
| 62 | + @RequestMapping(value="/delete") | |
| 63 | + public void delete(PrintWriter out) throws Exception{ | |
| 64 | + logBefore(logger, Jurisdiction.getUsername()+"删除TestPaperInfo"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + testpaperinfoService.delete(pd); | |
| 69 | + out.write("success"); | |
| 70 | + out.close(); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**修改 | |
| 74 | + * @param | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + @RequestMapping(value="/edit") | |
| 78 | + public ModelAndView edit() throws Exception{ | |
| 79 | + logBefore(logger, Jurisdiction.getUsername()+"修改TestPaperInfo"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + testpaperinfoService.edit(pd); | |
| 85 | + mv.addObject("msg","success"); | |
| 86 | + mv.setViewName("save_result"); | |
| 87 | + return mv; | |
| 88 | + } | |
| 89 | + | |
| 90 | + /**列表 | |
| 91 | + * @param page | |
| 92 | + * @throws Exception | |
| 93 | + */ | |
| 94 | + @RequestMapping(value="/list") | |
| 95 | + public ModelAndView list(Page page) throws Exception{ | |
| 96 | + logBefore(logger, Jurisdiction.getUsername()+"列表TestPaperInfo"); | |
| 97 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
| 98 | + ModelAndView mv = this.getModelAndView(); | |
| 99 | + PageData pd = new PageData(); | |
| 100 | + pd = this.getPageData(); | |
| 101 | + String keywords = pd.getString("keywords"); //关键词检索条件 | |
| 102 | + if(null != keywords && !"".equals(keywords)){ | |
| 103 | + pd.put("keywords", keywords.trim()); | |
| 104 | + } | |
| 105 | + page.setPd(pd); | |
| 106 | + List<PageData> varList = testpaperinfoService.list(page); //列出TestPaperInfo列表 | |
| 107 | + mv.setViewName("sunvote/testpaperinfo/testpaperinfo_list"); | |
| 108 | + mv.addObject("varList", varList); | |
| 109 | + mv.addObject("pd", pd); | |
| 110 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
| 111 | + return mv; | |
| 112 | + } | |
| 113 | + | |
| 114 | + /**去新增页面 | |
| 115 | + * @param | |
| 116 | + * @throws Exception | |
| 117 | + */ | |
| 118 | + @RequestMapping(value="/goAdd") | |
| 119 | + public ModelAndView goAdd()throws Exception{ | |
| 120 | + ModelAndView mv = this.getModelAndView(); | |
| 121 | + PageData pd = new PageData(); | |
| 122 | + pd = this.getPageData(); | |
| 123 | + mv.setViewName("sunvote/testpaperinfo/testpaperinfo_edit"); | |
| 124 | + mv.addObject("msg", "save"); | |
| 125 | + mv.addObject("pd", pd); | |
| 126 | + return mv; | |
| 127 | + } | |
| 128 | + | |
| 129 | + /**去修改页面 | |
| 130 | + * @param | |
| 131 | + * @throws Exception | |
| 132 | + */ | |
| 133 | + @RequestMapping(value="/goEdit") | |
| 134 | + public ModelAndView goEdit()throws Exception{ | |
| 135 | + ModelAndView mv = this.getModelAndView(); | |
| 136 | + PageData pd = new PageData(); | |
| 137 | + pd = this.getPageData(); | |
| 138 | + pd = testpaperinfoService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/testpaperinfo/testpaperinfo_edit"); | |
| 140 | + mv.addObject("msg", "edit"); | |
| 141 | + mv.addObject("pd", pd); | |
| 142 | + return mv; | |
| 143 | + } | |
| 144 | + | |
| 145 | + /**批量删除 | |
| 146 | + * @param | |
| 147 | + * @throws Exception | |
| 148 | + */ | |
| 149 | + @RequestMapping(value="/deleteAll") | |
| 150 | + @ResponseBody | |
| 151 | + public Object deleteAll() throws Exception{ | |
| 152 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除TestPaperInfo"); | |
| 153 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | |
| 154 | + PageData pd = new PageData(); | |
| 155 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 156 | + pd = this.getPageData(); | |
| 157 | + List<PageData> pdList = new ArrayList<PageData>(); | |
| 158 | + String DATA_IDS = pd.getString("DATA_IDS"); | |
| 159 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | |
| 160 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | |
| 161 | + testpaperinfoService.deleteAll(ArrayDATA_IDS); | |
| 162 | + pd.put("msg", "ok"); | |
| 163 | + }else{ | |
| 164 | + pd.put("msg", "no"); | |
| 165 | + } | |
| 166 | + pdList.add(pd); | |
| 167 | + map.put("list", pdList); | |
| 168 | + return AppUtil.returnObject(pd, map); | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**导出到excel | |
| 172 | + * @param | |
| 173 | + * @throws Exception | |
| 174 | + */ | |
| 175 | + @RequestMapping(value="/excel") | |
| 176 | + public ModelAndView exportExcel() throws Exception{ | |
| 177 | + logBefore(logger, Jurisdiction.getUsername()+"导出TestPaperInfo到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("试卷"); //1 | |
| 185 | + titles.add("学生"); //2 | |
| 186 | + titles.add("测验"); //3 | |
| 187 | + titles.add("题目"); //4 | |
| 188 | + titles.add("学生答案"); //5 | |
| 189 | + titles.add("是否正确"); //6 | |
| 190 | + titles.add("得分"); //7 | |
| 191 | + titles.add("是否点赞"); //8 | |
| 192 | + titles.add("答题类型"); //9 | |
| 193 | + titles.add("按键时间"); //10 | |
| 194 | + titles.add("接收时间"); //11 | |
| 195 | + titles.add("是否主观题"); //12 | |
| 196 | + titles.add("笔记"); //13 | |
| 197 | + titles.add("标记等级"); //14 | |
| 198 | + dataMap.put("titles", titles); | |
| 199 | + List<PageData> varOList = testpaperinfoService.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_ID")); //1 | |
| 204 | + vpd.put("var2", varOList.get(i).getString("STUDENT_ID")); //2 | |
| 205 | + vpd.put("var3", varOList.get(i).getString("TEST_ID")); //3 | |
| 206 | + vpd.put("var4", varOList.get(i).getString("QUESTION_ID")); //4 | |
| 207 | + vpd.put("var5", varOList.get(i).getString("ANSWER")); //5 | |
| 208 | + vpd.put("var6", varOList.get(i).get("RIGHT").toString()); //6 | |
| 209 | + vpd.put("var7", varOList.get(i).get("SCORE").toString()); //7 | |
| 210 | + vpd.put("var8", varOList.get(i).get("LIKES").toString()); //8 | |
| 211 | + vpd.put("var9", varOList.get(i).getString("ANSWER_TYPE")); //9 | |
| 212 | + vpd.put("var10", varOList.get(i).getString("PRESS_TIME")); //10 | |
| 213 | + vpd.put("var11", varOList.get(i).getString("RECEIVER_DATE")); //11 | |
| 214 | + vpd.put("var12", varOList.get(i).get("SUBJECTIVE").toString()); //12 | |
| 215 | + vpd.put("var13", varOList.get(i).getString("NOTE")); //13 | |
| 216 | + vpd.put("var14", varOList.get(i).getString("MARK_NO")); //14 | |
| 217 | + varList.add(vpd); | |
| 218 | + } | |
| 219 | + dataMap.put("varList", varList); | |
| 220 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 221 | + mv = new ModelAndView(erv,dataMap); | |
| 222 | + return mv; | |
| 223 | + } | |
| 224 | + | |
| 225 | + @InitBinder | |
| 226 | + public void initBinder(WebDataBinder binder){ | |
| 227 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 228 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 229 | + } | |
| 230 | +} | ... | ... |
src/com/fh/controller/system/login/LoginController.java
| ... | ... | @@ -40,6 +40,7 @@ import com.fh.util.Jurisdiction; |
| 40 | 40 | import com.fh.util.PageData; |
| 41 | 41 | import com.fh.util.RightsHelper; |
| 42 | 42 | import com.fh.util.Tools; |
| 43 | + | |
| 43 | 44 | /** |
| 44 | 45 | * 总入口 |
| 45 | 46 | * @author fh QQ 3 1 3 5 9 6 7 9 0[青苔] |
| ... | ... | @@ -51,189 +52,198 @@ import com.fh.util.Tools; |
| 51 | 52 | @Controller |
| 52 | 53 | public class LoginController extends BaseController { |
| 53 | 54 | |
| 54 | - @Resource(name="userService") | |
| 55 | + @Resource(name = "userService") | |
| 55 | 56 | private UserManager userService; |
| 56 | - @Resource(name="menuService") | |
| 57 | + @Resource(name = "menuService") | |
| 57 | 58 | private MenuManager menuService; |
| 58 | - @Resource(name="roleService") | |
| 59 | + @Resource(name = "roleService") | |
| 59 | 60 | private RoleManager roleService; |
| 60 | - @Resource(name="buttonrightsService") | |
| 61 | + @Resource(name = "buttonrightsService") | |
| 61 | 62 | private ButtonrightsManager buttonrightsService; |
| 62 | - @Resource(name="fhbuttonService") | |
| 63 | + @Resource(name = "fhbuttonService") | |
| 63 | 64 | private FhbuttonManager fhbuttonService; |
| 64 | - @Resource(name="appuserService") | |
| 65 | + @Resource(name = "appuserService") | |
| 65 | 66 | private AppuserManager appuserService; |
| 66 | - @Resource(name="datajurService") | |
| 67 | + @Resource(name = "datajurService") | |
| 67 | 68 | private DatajurManager datajurService; |
| 68 | - @Resource(name="fhlogService") | |
| 69 | + @Resource(name = "fhlogService") | |
| 69 | 70 | private FHlogManager FHLOG; |
| 70 | - @Resource(name="loginimgService") | |
| 71 | + @Resource(name = "loginimgService") | |
| 71 | 72 | private LogInImgManager loginimgService; |
| 72 | - | |
| 73 | - /**访问登录页 | |
| 73 | + | |
| 74 | + /** | |
| 75 | + * 访问登录页 | |
| 76 | + * | |
| 74 | 77 | * @return |
| 75 | 78 | * @throws Exception |
| 76 | 79 | */ |
| 77 | - @RequestMapping(value="/login_toLogin") | |
| 78 | - public ModelAndView toLogin()throws Exception{ | |
| 80 | + @RequestMapping(value = "/login_toLogin") | |
| 81 | + public ModelAndView toLogin() throws Exception { | |
| 79 | 82 | ModelAndView mv = this.getModelAndView(); |
| 80 | 83 | PageData pd = new PageData(); |
| 81 | 84 | pd = this.getPageData(); |
| 82 | - pd = this.setLoginPd(pd); //设置登录页面的配置参数 | |
| 85 | + pd = this.setLoginPd(pd); // 设置登录页面的配置参数 | |
| 83 | 86 | mv.setViewName("system/index/login"); |
| 84 | - mv.addObject("pd",pd); | |
| 87 | + mv.addObject("pd", pd); | |
| 85 | 88 | return mv; |
| 86 | 89 | } |
| 87 | - | |
| 88 | - /**请求登录,验证用户 | |
| 90 | + | |
| 91 | + /** | |
| 92 | + * 请求登录,验证用户 | |
| 93 | + * | |
| 89 | 94 | * @return |
| 90 | 95 | * @throws Exception |
| 91 | 96 | */ |
| 92 | - @RequestMapping(value="/login_login" ,produces="application/json;charset=UTF-8") | |
| 97 | + @RequestMapping(value = "/login_login", produces = "application/json;charset=UTF-8") | |
| 93 | 98 | @ResponseBody |
| 94 | - public Object login()throws Exception{ | |
| 95 | - Map<String,String> map = new HashMap<String,String>(); | |
| 99 | + public Object login() throws Exception { | |
| 100 | + Map<String, String> map = new HashMap<String, String>(); | |
| 96 | 101 | PageData pd = new PageData(); |
| 97 | 102 | pd = this.getPageData(); |
| 98 | 103 | String errInfo = ""; |
| 99 | 104 | String KEYDATA[] = pd.getString("KEYDATA").split(";;;"); |
| 100 | - if(null != KEYDATA && KEYDATA.length >= 2){ | |
| 105 | + if (null != KEYDATA && KEYDATA.length >= 2) { | |
| 101 | 106 | Session session = Jurisdiction.getSession(); |
| 102 | - String sessionCode = (String)session.getAttribute(Const.SESSION_SECURITY_CODE); //获取session中的验证码 | |
| 103 | -// String code = KEYDATA[2]; | |
| 104 | -// if(null == code || "".equals(code)){//判断效验码 | |
| 105 | -// errInfo = "nullcode"; //效验码为空 | |
| 106 | -// }else{ | |
| 107 | - String USERNAME = KEYDATA[0]; //登录过来的用户名 | |
| 108 | - String PASSWORD = KEYDATA[1]; //登录过来的密码 | |
| 109 | - pd.put("USERNAME", USERNAME); | |
| 110 | -// if(Tools.notEmpty(sessionCode) && sessionCode.equalsIgnoreCase(code)){ //判断登录验证码 | |
| 111 | - String passwd = new SimpleHash("SHA-1", USERNAME, PASSWORD).toString(); //密码加密 | |
| 112 | - pd.put("PASSWORD", passwd); | |
| 113 | - pd = userService.getUserByNameAndPwd(pd); //根据用户名和密码去读取用户信息 | |
| 114 | - if(pd != null){ | |
| 115 | - this.removeSession(USERNAME);//请缓存 | |
| 116 | - pd.put("LAST_LOGIN",DateUtil.getTime().toString()); | |
| 117 | - userService.updateLastLogin(pd); | |
| 118 | - User user = new User(); | |
| 119 | - user.setUSER_ID(pd.getString("USER_ID")); | |
| 120 | - user.setUSERNAME(pd.getString("USERNAME")); | |
| 121 | - user.setPASSWORD(pd.getString("PASSWORD")); | |
| 122 | - user.setNAME(pd.getString("NAME")); | |
| 123 | - user.setRIGHTS(pd.getString("RIGHTS")); | |
| 124 | - user.setROLE_ID(pd.getString("ROLE_ID")); | |
| 125 | - user.setLAST_LOGIN(pd.getString("LAST_LOGIN")); | |
| 126 | - user.setIP(pd.getString("IP")); | |
| 127 | - user.setSTATUS(pd.getString("STATUS")); | |
| 128 | - session.setAttribute(Const.SESSION_USER, user); //把用户信息放session中 | |
| 129 | - session.removeAttribute(Const.SESSION_SECURITY_CODE); //清除登录验证码的session | |
| 130 | - //shiro加入身份验证 | |
| 131 | - Subject subject = SecurityUtils.getSubject(); | |
| 132 | - UsernamePasswordToken token = new UsernamePasswordToken(USERNAME, PASSWORD); | |
| 133 | - try { | |
| 134 | - subject.login(token); | |
| 135 | - } catch (AuthenticationException e) { | |
| 136 | - errInfo = "身份验证失败!"; | |
| 137 | - } | |
| 138 | - }else{ | |
| 139 | - errInfo = "usererror"; //用户名或密码有误 | |
| 140 | - logBefore(logger, USERNAME+"登录系统密码或用户名错误"); | |
| 141 | - FHLOG.save(USERNAME, "登录系统密码或用户名错误"); | |
| 142 | - } | |
| 143 | -// }else{ | |
| 144 | -// errInfo = "codeerror"; //验证码输入有误 | |
| 145 | -// } | |
| 146 | - if(Tools.isEmpty(errInfo)){ | |
| 147 | - errInfo = "success"; //验证成功 | |
| 148 | - logBefore(logger, USERNAME+"登录系统"); | |
| 149 | - FHLOG.save(USERNAME, "登录系统"); | |
| 107 | + String sessionCode = (String) session | |
| 108 | + .getAttribute(Const.SESSION_SECURITY_CODE); // 获取session中的验证码 | |
| 109 | + String USERNAME = KEYDATA[0]; // 登录过来的用户名 | |
| 110 | + String PASSWORD = KEYDATA[1]; // 登录过来的密码 | |
| 111 | + pd.put("USERNAME", USERNAME); | |
| 112 | + String passwd = new SimpleHash("SHA-1", USERNAME, PASSWORD) | |
| 113 | + .toString(); // 密码加密 | |
| 114 | + pd.put("PASSWORD", passwd); | |
| 115 | + pd = userService.getUserByNameAndPwd(pd); // 根据用户名和密码去读取用户信息 | |
| 116 | + if (pd != null) { | |
| 117 | + this.removeSession(USERNAME);// 请缓存 | |
| 118 | + pd.put("LAST_LOGIN", DateUtil.getTime().toString()); | |
| 119 | + userService.updateLastLogin(pd); | |
| 120 | + User user = new User(); | |
| 121 | + user.setUSER_ID(pd.getString("USER_ID")); | |
| 122 | + user.setUSERNAME(pd.getString("USERNAME")); | |
| 123 | + user.setPASSWORD(pd.getString("PASSWORD")); | |
| 124 | + user.setNAME(pd.getString("NAME")); | |
| 125 | + user.setRIGHTS(pd.getString("RIGHTS")); | |
| 126 | + user.setROLE_ID(pd.getString("ROLE_ID")); | |
| 127 | + user.setLAST_LOGIN(pd.getString("LAST_LOGIN")); | |
| 128 | + user.setIP(pd.getString("IP")); | |
| 129 | + user.setSTATUS(pd.getString("STATUS")); | |
| 130 | + session.setAttribute(Const.SESSION_USER, user); // 把用户信息放session中 | |
| 131 | + session.removeAttribute(Const.SESSION_SECURITY_CODE); // 清除登录验证码的session | |
| 132 | + // shiro加入身份验证 | |
| 133 | + Subject subject = SecurityUtils.getSubject(); | |
| 134 | + UsernamePasswordToken token = new UsernamePasswordToken( | |
| 135 | + USERNAME, PASSWORD); | |
| 136 | + try { | |
| 137 | + subject.login(token); | |
| 138 | + } catch (AuthenticationException e) { | |
| 139 | + errInfo = "身份验证失败!"; | |
| 150 | 140 | } |
| 141 | + } else { | |
| 142 | + errInfo = "usererror"; // 用户名或密码有误 | |
| 143 | + logBefore(logger, USERNAME + "登录系统密码或用户名错误"); | |
| 144 | + FHLOG.save(USERNAME, "登录系统密码或用户名错误"); | |
| 145 | + } | |
| 146 | + if (Tools.isEmpty(errInfo)) { | |
| 147 | + errInfo = "success"; // 验证成功 | |
| 148 | + logBefore(logger, USERNAME + "登录系统"); | |
| 149 | + FHLOG.save(USERNAME, "登录系统"); | |
| 151 | 150 | } |
| 152 | -// }else{ | |
| 153 | -// errInfo = "error"; //缺少参数 | |
| 154 | -// } | |
| 151 | + } | |
| 155 | 152 | map.put("result", errInfo); |
| 156 | 153 | return AppUtil.returnObject(new PageData(), map); |
| 157 | 154 | } |
| 158 | - | |
| 159 | - /**访问系统首页 | |
| 160 | - * @param changeMenu:切换菜单参数 | |
| 155 | + | |
| 156 | + /** | |
| 157 | + * 访问系统首页 | |
| 158 | + * | |
| 159 | + * @param changeMenu | |
| 160 | + * :切换菜单参数 | |
| 161 | 161 | * @return |
| 162 | 162 | */ |
| 163 | - @RequestMapping(value="/main/{changeMenu}") | |
| 164 | - public ModelAndView login_index(@PathVariable("changeMenu") String changeMenu){ | |
| 163 | + @RequestMapping(value = "/main/{changeMenu}") | |
| 164 | + public ModelAndView login_index( | |
| 165 | + @PathVariable("changeMenu") String changeMenu) { | |
| 165 | 166 | ModelAndView mv = this.getModelAndView(); |
| 166 | 167 | PageData pd = new PageData(); |
| 167 | 168 | pd = this.getPageData(); |
| 168 | - try{ | |
| 169 | + try { | |
| 169 | 170 | Session session = Jurisdiction.getSession(); |
| 170 | - User user = (User)session.getAttribute(Const.SESSION_USER); //读取session中的用户信息(单独用户信息) | |
| 171 | + User user = (User) session.getAttribute(Const.SESSION_USER); // 读取session中的用户信息(单独用户信息) | |
| 171 | 172 | if (user != null) { |
| 172 | - User userr = (User)session.getAttribute(Const.SESSION_USERROL); //读取session中的用户信息(含角色信息) | |
| 173 | - if(null == userr){ | |
| 174 | - user = userService.getUserAndRoleById(user.getUSER_ID()); //通过用户ID读取用户信息和角色信息 | |
| 175 | - session.setAttribute(Const.SESSION_USERROL, user); //存入session | |
| 176 | - }else{ | |
| 173 | + User userr = (User) session.getAttribute(Const.SESSION_USERROL); // 读取session中的用户信息(含角色信息) | |
| 174 | + if (null == userr) { | |
| 175 | + user = userService.getUserAndRoleById(user.getUSER_ID()); // 通过用户ID读取用户信息和角色信息 | |
| 176 | + session.setAttribute(Const.SESSION_USERROL, user); // 存入session | |
| 177 | + } else { | |
| 177 | 178 | user = userr; |
| 178 | 179 | } |
| 179 | 180 | String USERNAME = user.getUSERNAME(); |
| 180 | - Role role = user.getRole(); //获取用户角色 | |
| 181 | - String roleRights = role!=null ? role.getRIGHTS() : ""; //角色权限(菜单权限) | |
| 181 | + Role role = user.getRole(); // 获取用户角色 | |
| 182 | + String roleRights = role != null ? role.getRIGHTS() : ""; // 角色权限(菜单权限) | |
| 182 | 183 | String ROLE_IDS = user.getROLE_IDS(); |
| 183 | - session.setAttribute(USERNAME + Const.SESSION_ROLE_RIGHTS, roleRights); //将角色权限存入session | |
| 184 | - session.setAttribute(Const.SESSION_USERNAME, USERNAME); //放入用户名到session | |
| 185 | - this.setAttributeToAllDEPARTMENT_ID(session, USERNAME); //把用户的组织机构权限放到session里面 | |
| 184 | + session.setAttribute(USERNAME + Const.SESSION_ROLE_RIGHTS, | |
| 185 | + roleRights); // 将角色权限存入session | |
| 186 | + session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session | |
| 187 | + this.setAttributeToAllDEPARTMENT_ID(session, USERNAME); // 把用户的组织机构权限放到session里面 | |
| 186 | 188 | List<Menu> allmenuList = new ArrayList<Menu>(); |
| 187 | - allmenuList = this.getAttributeMenu(session, USERNAME, roleRights, getArrayRoleRights(ROLE_IDS)); //菜单缓存 | |
| 189 | + allmenuList = this.getAttributeMenu(session, USERNAME, | |
| 190 | + roleRights, getArrayRoleRights(ROLE_IDS)); // 菜单缓存 | |
| 188 | 191 | List<Menu> menuList = new ArrayList<Menu>(); |
| 189 | - menuList = this.changeMenuF(allmenuList, session, USERNAME, changeMenu); //切换菜单 | |
| 190 | - if(null == session.getAttribute(USERNAME + Const.SESSION_QX)){ | |
| 191 | - session.setAttribute(USERNAME + Const.SESSION_QX, this.getUQX(USERNAME)); //主职角色按钮权限放到session中 | |
| 192 | - session.setAttribute(USERNAME + Const.SESSION_QX2, this.getUQX2(USERNAME)); //副职角色按钮权限放到session中 | |
| 192 | + menuList = this.changeMenuF(allmenuList, session, USERNAME, | |
| 193 | + changeMenu); // 切换菜单 | |
| 194 | + if (null == session.getAttribute(USERNAME + Const.SESSION_QX)) { | |
| 195 | + session.setAttribute(USERNAME + Const.SESSION_QX, | |
| 196 | + this.getUQX(USERNAME)); // 主职角色按钮权限放到session中 | |
| 197 | + session.setAttribute(USERNAME + Const.SESSION_QX2, | |
| 198 | + this.getUQX2(USERNAME)); // 副职角色按钮权限放到session中 | |
| 193 | 199 | } |
| 194 | - this.getRemortIP(USERNAME); //更新登录IP | |
| 200 | + this.getRemortIP(USERNAME); // 更新登录IP | |
| 195 | 201 | mv.setViewName("system/index/main"); |
| 196 | 202 | mv.addObject("user", user); |
| 197 | 203 | mv.addObject("menuList", menuList); |
| 198 | - }else { | |
| 199 | - mv.setViewName("system/index/login");//session失效后跳转登录页面 | |
| 204 | + } else { | |
| 205 | + mv.setViewName("system/index/login");// session失效后跳转登录页面 | |
| 200 | 206 | } |
| 201 | - } catch(Exception e){ | |
| 207 | + } catch (Exception e) { | |
| 202 | 208 | mv.setViewName("system/index/login"); |
| 203 | 209 | logger.error(e.getMessage(), e); |
| 204 | 210 | } |
| 205 | - pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); //读取系统名称 | |
| 206 | - mv.addObject("pd",pd); | |
| 211 | + pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); // 读取系统名称 | |
| 212 | + mv.addObject("pd", pd); | |
| 207 | 213 | return mv; |
| 208 | 214 | } |
| 209 | - | |
| 210 | - /**获取副职角色权限List | |
| 215 | + | |
| 216 | + /** | |
| 217 | + * 获取副职角色权限List | |
| 218 | + * | |
| 211 | 219 | * @param ROLE_IDS |
| 212 | 220 | * @return |
| 213 | 221 | * @throws Exception |
| 214 | 222 | */ |
| 215 | - public List<String> getArrayRoleRights(String ROLE_IDS) throws Exception{ | |
| 216 | - if(Tools.notEmpty(ROLE_IDS)){ | |
| 223 | + public List<String> getArrayRoleRights(String ROLE_IDS) throws Exception { | |
| 224 | + if (Tools.notEmpty(ROLE_IDS)) { | |
| 217 | 225 | List<String> list = new ArrayList<String>(); |
| 218 | 226 | String arryROLE_ID[] = ROLE_IDS.split(",fh,"); |
| 219 | - for(int i=0;i<arryROLE_ID.length;i++){ | |
| 227 | + for (int i = 0; i < arryROLE_ID.length; i++) { | |
| 220 | 228 | PageData pd = new PageData(); |
| 221 | 229 | pd.put("ROLE_ID", arryROLE_ID[i]); |
| 222 | 230 | pd = roleService.findObjectById(pd); |
| 223 | - if(null != pd){ | |
| 231 | + if (null != pd) { | |
| 224 | 232 | String RIGHTS = pd.getString("RIGHTS"); |
| 225 | - if(Tools.notEmpty(RIGHTS)){ | |
| 233 | + if (Tools.notEmpty(RIGHTS)) { | |
| 226 | 234 | list.add(RIGHTS); |
| 227 | 235 | } |
| 228 | 236 | } |
| 229 | 237 | } |
| 230 | 238 | return list.size() == 0 ? null : list; |
| 231 | - }else{ | |
| 239 | + } else { | |
| 232 | 240 | return null; |
| 233 | 241 | } |
| 234 | 242 | } |
| 235 | - | |
| 236 | - /**菜单缓存 | |
| 243 | + | |
| 244 | + /** | |
| 245 | + * 菜单缓存 | |
| 246 | + * | |
| 237 | 247 | * @param session |
| 238 | 248 | * @param USERNAME |
| 239 | 249 | * @param roleRights |
| ... | ... | @@ -241,45 +251,59 @@ public class LoginController extends BaseController { |
| 241 | 251 | * @throws Exception |
| 242 | 252 | */ |
| 243 | 253 | @SuppressWarnings("unchecked") |
| 244 | - public List<Menu> getAttributeMenu(Session session, String USERNAME, String roleRights, List<String> arrayRoleRights) throws Exception{ | |
| 254 | + public List<Menu> getAttributeMenu(Session session, String USERNAME, | |
| 255 | + String roleRights, List<String> arrayRoleRights) throws Exception { | |
| 245 | 256 | List<Menu> allmenuList = new ArrayList<Menu>(); |
| 246 | - if(null == session.getAttribute(USERNAME + Const.SESSION_allmenuList)){ | |
| 247 | - allmenuList = menuService.listAllMenuQx("0"); //获取所有菜单 | |
| 248 | - if(Tools.notEmpty(roleRights)){ | |
| 249 | - allmenuList = this.readMenu(allmenuList, roleRights, arrayRoleRights); //根据角色权限获取本权限的菜单列表 | |
| 257 | + if (null == session.getAttribute(USERNAME + Const.SESSION_allmenuList)) { | |
| 258 | + allmenuList = menuService.listAllMenuQx("0"); // 获取所有菜单 | |
| 259 | + if (Tools.notEmpty(roleRights)) { | |
| 260 | + allmenuList = this.readMenu(allmenuList, roleRights, | |
| 261 | + arrayRoleRights); // 根据角色权限获取本权限的菜单列表 | |
| 250 | 262 | } |
| 251 | - session.setAttribute(USERNAME + Const.SESSION_allmenuList, allmenuList);//菜单权限放入session中 | |
| 252 | - }else{ | |
| 253 | - allmenuList = (List<Menu>)session.getAttribute(USERNAME + Const.SESSION_allmenuList); | |
| 263 | + session.setAttribute(USERNAME + Const.SESSION_allmenuList, | |
| 264 | + allmenuList);// 菜单权限放入session中 | |
| 265 | + } else { | |
| 266 | + allmenuList = (List<Menu>) session.getAttribute(USERNAME | |
| 267 | + + Const.SESSION_allmenuList); | |
| 254 | 268 | } |
| 255 | 269 | return allmenuList; |
| 256 | 270 | } |
| 257 | - | |
| 258 | - /**根据角色权限获取本权限的菜单列表(递归处理) | |
| 259 | - * @param menuList:传入的总菜单 | |
| 260 | - * @param roleRights:加密的权限字符串 | |
| 271 | + | |
| 272 | + /** | |
| 273 | + * 根据角色权限获取本权限的菜单列表(递归处理) | |
| 274 | + * | |
| 275 | + * @param menuList | |
| 276 | + * :传入的总菜单 | |
| 277 | + * @param roleRights | |
| 278 | + * :加密的权限字符串 | |
| 261 | 279 | * @return |
| 262 | 280 | */ |
| 263 | - public List<Menu> readMenu(List<Menu> menuList,String roleRights, List<String> arrayRoleRights){ | |
| 264 | - for(int i=0;i<menuList.size();i++){ | |
| 265 | - Boolean b1 = RightsHelper.testRights(roleRights, menuList.get(i).getMENU_ID()); | |
| 266 | - menuList.get(i).setHasMenu(b1); //赋予主职角色菜单权限 | |
| 267 | - if(!b1 && null != arrayRoleRights){ | |
| 268 | - for(int n=0;n<arrayRoleRights.size();n++){ | |
| 269 | - if(RightsHelper.testRights(arrayRoleRights.get(n), menuList.get(i).getMENU_ID())){ | |
| 281 | + public List<Menu> readMenu(List<Menu> menuList, String roleRights, | |
| 282 | + List<String> arrayRoleRights) { | |
| 283 | + for (int i = 0; i < menuList.size(); i++) { | |
| 284 | + Boolean b1 = RightsHelper.testRights(roleRights, menuList.get(i) | |
| 285 | + .getMENU_ID()); | |
| 286 | + menuList.get(i).setHasMenu(b1); // 赋予主职角色菜单权限 | |
| 287 | + if (!b1 && null != arrayRoleRights) { | |
| 288 | + for (int n = 0; n < arrayRoleRights.size(); n++) { | |
| 289 | + if (RightsHelper.testRights(arrayRoleRights.get(n), | |
| 290 | + menuList.get(i).getMENU_ID())) { | |
| 270 | 291 | menuList.get(i).setHasMenu(true); |
| 271 | 292 | break; |
| 272 | 293 | } |
| 273 | 294 | } |
| 274 | 295 | } |
| 275 | - if(menuList.get(i).isHasMenu()){ //判断是否有此菜单权限 | |
| 276 | - this.readMenu(menuList.get(i).getSubMenu(), roleRights, arrayRoleRights);//是:继续排查其子菜单 | |
| 296 | + if (menuList.get(i).isHasMenu()) { // 判断是否有此菜单权限 | |
| 297 | + this.readMenu(menuList.get(i).getSubMenu(), roleRights, | |
| 298 | + arrayRoleRights);// 是:继续排查其子菜单 | |
| 277 | 299 | } |
| 278 | 300 | } |
| 279 | 301 | return menuList; |
| 280 | 302 | } |
| 281 | - | |
| 282 | - /**切换菜单处理 | |
| 303 | + | |
| 304 | + /** | |
| 305 | + * 切换菜单处理 | |
| 306 | + * | |
| 283 | 307 | * @param allmenuList |
| 284 | 308 | * @param session |
| 285 | 309 | * @param USERNAME |
| ... | ... | @@ -287,126 +311,143 @@ public class LoginController extends BaseController { |
| 287 | 311 | * @return |
| 288 | 312 | */ |
| 289 | 313 | @SuppressWarnings("unchecked") |
| 290 | - public List<Menu> changeMenuF(List<Menu> allmenuList, Session session, String USERNAME, String changeMenu){ | |
| 314 | + public List<Menu> changeMenuF(List<Menu> allmenuList, Session session, | |
| 315 | + String USERNAME, String changeMenu) { | |
| 291 | 316 | List<Menu> menuList = new ArrayList<Menu>(); |
| 292 | 317 | /** 菜单缓存为空 或者 传入的菜单类型和当前不一样的时候,条件成立,重新拆分菜单,把选择的菜单类型放入缓存 */ |
| 293 | - if(null == session.getAttribute(USERNAME + Const.SESSION_menuList) || (!changeMenu.equals(session.getAttribute("changeMenu")))){ | |
| 318 | + if (null == session.getAttribute(USERNAME + Const.SESSION_menuList) | |
| 319 | + || (!changeMenu.equals(session.getAttribute("changeMenu")))) { | |
| 294 | 320 | List<Menu> menuList1 = new ArrayList<Menu>(); |
| 295 | 321 | List<Menu> menuList2 = new ArrayList<Menu>(); |
| 296 | 322 | List<Menu> menuList3 = new ArrayList<Menu>(); |
| 297 | 323 | List<Menu> menuList4 = new ArrayList<Menu>(); |
| 298 | - for(int i=0;i<allmenuList.size();i++){//拆分菜单 | |
| 324 | + for (int i = 0; i < allmenuList.size(); i++) {// 拆分菜单 | |
| 299 | 325 | Menu menu = allmenuList.get(i); |
| 300 | - if("1".equals(menu.getMENU_TYPE())){ | |
| 301 | - menuList1.add(menu); //系统菜单 | |
| 302 | - }else if("2".equals(menu.getMENU_TYPE())){ | |
| 303 | - menuList2.add(menu); //业务菜单 | |
| 304 | - }else if("3".equals(menu.getMENU_TYPE())){ | |
| 305 | - menuList3.add(menu); //菜单类型三 | |
| 306 | - }else if("4".equals(menu.getMENU_TYPE())){ | |
| 307 | - menuList4.add(menu); //菜单类型四 | |
| 326 | + if ("1".equals(menu.getMENU_TYPE())) { | |
| 327 | + menuList1.add(menu); // 系统菜单 | |
| 328 | + } else if ("2".equals(menu.getMENU_TYPE())) { | |
| 329 | + menuList2.add(menu); // 业务菜单 | |
| 330 | + } else if ("3".equals(menu.getMENU_TYPE())) { | |
| 331 | + menuList3.add(menu); // 菜单类型三 | |
| 332 | + } else if ("4".equals(menu.getMENU_TYPE())) { | |
| 333 | + menuList4.add(menu); // 菜单类型四 | |
| 308 | 334 | } |
| 309 | 335 | } |
| 310 | 336 | session.removeAttribute(USERNAME + Const.SESSION_menuList); |
| 311 | - if("index".equals(changeMenu)){ | |
| 312 | - session.setAttribute(USERNAME + Const.SESSION_menuList, menuList2); | |
| 337 | + if ("index".equals(changeMenu)) { | |
| 338 | + session.setAttribute(USERNAME + Const.SESSION_menuList, | |
| 339 | + menuList2); | |
| 313 | 340 | session.removeAttribute("changeMenu"); |
| 314 | 341 | session.setAttribute("changeMenu", "index"); |
| 315 | 342 | menuList = menuList2; |
| 316 | - }else if("2".equals(changeMenu)){ | |
| 317 | - session.setAttribute(USERNAME + Const.SESSION_menuList, menuList1); | |
| 343 | + } else if ("2".equals(changeMenu)) { | |
| 344 | + session.setAttribute(USERNAME + Const.SESSION_menuList, | |
| 345 | + menuList1); | |
| 318 | 346 | session.removeAttribute("changeMenu"); |
| 319 | 347 | session.setAttribute("changeMenu", "2"); |
| 320 | 348 | menuList = menuList1; |
| 321 | - }else if("3".equals(changeMenu)){ | |
| 322 | - session.setAttribute(USERNAME + Const.SESSION_menuList, menuList3); | |
| 349 | + } else if ("3".equals(changeMenu)) { | |
| 350 | + session.setAttribute(USERNAME + Const.SESSION_menuList, | |
| 351 | + menuList3); | |
| 323 | 352 | session.removeAttribute("changeMenu"); |
| 324 | 353 | session.setAttribute("changeMenu", "3"); |
| 325 | 354 | menuList = menuList3; |
| 326 | - }else if("4".equals(changeMenu)){ | |
| 327 | - session.setAttribute(USERNAME + Const.SESSION_menuList, menuList4); | |
| 355 | + } else if ("4".equals(changeMenu)) { | |
| 356 | + session.setAttribute(USERNAME + Const.SESSION_menuList, | |
| 357 | + menuList4); | |
| 328 | 358 | session.removeAttribute("changeMenu"); |
| 329 | 359 | session.setAttribute("changeMenu", "4"); |
| 330 | 360 | menuList = menuList4; |
| 331 | 361 | } |
| 332 | - }else{ | |
| 333 | - menuList = (List<Menu>)session.getAttribute(USERNAME + Const.SESSION_menuList); | |
| 362 | + } else { | |
| 363 | + menuList = (List<Menu>) session.getAttribute(USERNAME | |
| 364 | + + Const.SESSION_menuList); | |
| 334 | 365 | } |
| 335 | 366 | return menuList; |
| 336 | 367 | } |
| 337 | - | |
| 338 | - /**把用户的组织机构权限放到session里面 | |
| 368 | + | |
| 369 | + /** | |
| 370 | + * 把用户的组织机构权限放到session里面 | |
| 371 | + * | |
| 339 | 372 | * @param session |
| 340 | 373 | * @param USERNAME |
| 341 | 374 | * @return |
| 342 | - * @throws Exception | |
| 375 | + * @throws Exception | |
| 343 | 376 | */ |
| 344 | - public void setAttributeToAllDEPARTMENT_ID(Session session, String USERNAME) throws Exception{ | |
| 345 | - String DEPARTMENT_IDS = "0",DEPARTMENT_ID = "0"; | |
| 346 | - if(!"admin".equals(USERNAME)){ | |
| 377 | + public void setAttributeToAllDEPARTMENT_ID(Session session, String USERNAME) | |
| 378 | + throws Exception { | |
| 379 | + String DEPARTMENT_IDS = "0", DEPARTMENT_ID = "0"; | |
| 380 | + if (!"admin".equals(USERNAME)) { | |
| 347 | 381 | PageData pd = datajurService.getDEPARTMENT_IDS(USERNAME); |
| 348 | - DEPARTMENT_IDS = null == pd?"无权":pd.getString("DEPARTMENT_IDS"); | |
| 349 | - DEPARTMENT_ID = null == pd?"无权":pd.getString("DEPARTMENT_ID"); | |
| 382 | + DEPARTMENT_IDS = null == pd ? "无权" : pd.getString("DEPARTMENT_IDS"); | |
| 383 | + DEPARTMENT_ID = null == pd ? "无权" : pd.getString("DEPARTMENT_ID"); | |
| 350 | 384 | } |
| 351 | - session.setAttribute(Const.DEPARTMENT_IDS, DEPARTMENT_IDS); //把用户的组织机构权限集合放到session里面 | |
| 352 | - session.setAttribute(Const.DEPARTMENT_ID, DEPARTMENT_ID); //把用户的最高组织机构权限放到session里面 | |
| 385 | + session.setAttribute(Const.DEPARTMENT_IDS, DEPARTMENT_IDS); // 把用户的组织机构权限集合放到session里面 | |
| 386 | + session.setAttribute(Const.DEPARTMENT_ID, DEPARTMENT_ID); // 把用户的最高组织机构权限放到session里面 | |
| 353 | 387 | } |
| 354 | - | |
| 388 | + | |
| 355 | 389 | /** |
| 356 | 390 | * 进入tab标签 |
| 391 | + * | |
| 357 | 392 | * @return |
| 358 | 393 | */ |
| 359 | - @RequestMapping(value="/tab") | |
| 360 | - public String tab(){ | |
| 394 | + @RequestMapping(value = "/tab") | |
| 395 | + public String tab() { | |
| 361 | 396 | return "system/index/tab"; |
| 362 | 397 | } |
| 363 | - | |
| 398 | + | |
| 364 | 399 | /** |
| 365 | 400 | * 进入首页后的默认页面 |
| 401 | + * | |
| 366 | 402 | * @return |
| 367 | - * @throws Exception | |
| 403 | + * @throws Exception | |
| 368 | 404 | */ |
| 369 | - @RequestMapping(value="/login_default") | |
| 370 | - public ModelAndView defaultPage() throws Exception{ | |
| 405 | + @RequestMapping(value = "/login_default") | |
| 406 | + public ModelAndView defaultPage() throws Exception { | |
| 371 | 407 | ModelAndView mv = this.getModelAndView(); |
| 372 | 408 | PageData pd = new PageData(); |
| 373 | - pd.put("userCount", Integer.parseInt(userService.getUserCount("").get("userCount").toString())-1); //系统用户数 | |
| 374 | - pd.put("appUserCount", Integer.parseInt(appuserService.getAppUserCount("").get("appUserCount").toString())); //会员数 | |
| 375 | - mv.addObject("pd",pd); | |
| 409 | + pd.put("userCount", | |
| 410 | + Integer.parseInt(userService.getUserCount("").get("userCount") | |
| 411 | + .toString()) - 1); // 系统用户数 | |
| 412 | + pd.put("appUserCount", | |
| 413 | + Integer.parseInt(appuserService.getAppUserCount("") | |
| 414 | + .get("appUserCount").toString())); // 会员数 | |
| 415 | + mv.addObject("pd", pd); | |
| 376 | 416 | mv.setViewName("system/index/default"); |
| 377 | 417 | return mv; |
| 378 | 418 | } |
| 379 | - | |
| 419 | + | |
| 380 | 420 | /** |
| 381 | 421 | * 用户注销 |
| 422 | + * | |
| 382 | 423 | * @param session |
| 383 | 424 | * @return |
| 384 | - * @throws Exception | |
| 425 | + * @throws Exception | |
| 385 | 426 | */ |
| 386 | - @RequestMapping(value="/logout") | |
| 387 | - public ModelAndView logout() throws Exception{ | |
| 388 | - String USERNAME = Jurisdiction.getUsername(); //当前登录的用户名 | |
| 389 | - logBefore(logger, USERNAME+"退出系统"); | |
| 427 | + @RequestMapping(value = "/logout") | |
| 428 | + public ModelAndView logout() throws Exception { | |
| 429 | + String USERNAME = Jurisdiction.getUsername(); // 当前登录的用户名 | |
| 430 | + logBefore(logger, USERNAME + "退出系统"); | |
| 390 | 431 | FHLOG.save(USERNAME, "退出"); |
| 391 | 432 | ModelAndView mv = this.getModelAndView(); |
| 392 | 433 | PageData pd = new PageData(); |
| 393 | - this.removeSession(USERNAME);//请缓存 | |
| 394 | - //shiro销毁登录 | |
| 395 | - Subject subject = SecurityUtils.getSubject(); | |
| 434 | + this.removeSession(USERNAME);// 请缓存 | |
| 435 | + // shiro销毁登录 | |
| 436 | + Subject subject = SecurityUtils.getSubject(); | |
| 396 | 437 | subject.logout(); |
| 397 | 438 | pd = this.getPageData(); |
| 398 | 439 | pd.put("msg", pd.getString("msg")); |
| 399 | - pd = this.setLoginPd(pd); //设置登录页面的配置参数 | |
| 440 | + pd = this.setLoginPd(pd); // 设置登录页面的配置参数 | |
| 400 | 441 | mv.setViewName("system/index/login"); |
| 401 | - mv.addObject("pd",pd); | |
| 442 | + mv.addObject("pd", pd); | |
| 402 | 443 | return mv; |
| 403 | 444 | } |
| 404 | - | |
| 445 | + | |
| 405 | 446 | /** |
| 406 | 447 | * 清理session |
| 407 | 448 | */ |
| 408 | - public void removeSession(String USERNAME){ | |
| 409 | - Session session = Jurisdiction.getSession(); //以下清除session缓存 | |
| 449 | + public void removeSession(String USERNAME) { | |
| 450 | + Session session = Jurisdiction.getSession(); // 以下清除session缓存 | |
| 410 | 451 | session.removeAttribute(Const.SESSION_USER); |
| 411 | 452 | session.removeAttribute(USERNAME + Const.SESSION_ROLE_RIGHTS); |
| 412 | 453 | session.removeAttribute(USERNAME + Const.SESSION_allmenuList); |
| ... | ... | @@ -420,91 +461,99 @@ public class LoginController extends BaseController { |
| 420 | 461 | session.removeAttribute("DEPARTMENT_IDS"); |
| 421 | 462 | session.removeAttribute("DEPARTMENT_ID"); |
| 422 | 463 | } |
| 423 | - | |
| 424 | - /**设置登录页面的配置参数 | |
| 464 | + | |
| 465 | + /** | |
| 466 | + * 设置登录页面的配置参数 | |
| 467 | + * | |
| 425 | 468 | * @param pd |
| 426 | 469 | * @return |
| 427 | 470 | */ |
| 428 | - public PageData setLoginPd(PageData pd){ | |
| 429 | - pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); //读取系统名称 | |
| 430 | - String strLOGINEDIT = Tools.readTxtFile(Const.LOGINEDIT); //读取登录页面配置 | |
| 431 | - if(null != strLOGINEDIT && !"".equals(strLOGINEDIT)){ | |
| 471 | + public PageData setLoginPd(PageData pd) { | |
| 472 | + pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); // 读取系统名称 | |
| 473 | + String strLOGINEDIT = Tools.readTxtFile(Const.LOGINEDIT); // 读取登录页面配置 | |
| 474 | + if (null != strLOGINEDIT && !"".equals(strLOGINEDIT)) { | |
| 432 | 475 | String strLo[] = strLOGINEDIT.split(",fh,"); |
| 433 | - if(strLo.length == 2){ | |
| 476 | + if (strLo.length == 2) { | |
| 434 | 477 | pd.put("isZhuce", strLo[0]); |
| 435 | 478 | pd.put("isMusic", strLo[1]); |
| 436 | 479 | } |
| 437 | 480 | } |
| 438 | 481 | try { |
| 439 | - List<PageData> listImg = loginimgService.listAll(pd); //登录背景图片 | |
| 482 | + List<PageData> listImg = loginimgService.listAll(pd); // 登录背景图片 | |
| 440 | 483 | pd.put("listImg", listImg); |
| 441 | 484 | } catch (Exception e) { |
| 442 | 485 | e.printStackTrace(); |
| 443 | 486 | } |
| 444 | 487 | return pd; |
| 445 | 488 | } |
| 446 | - | |
| 447 | - /**获取用户权限 | |
| 489 | + | |
| 490 | + /** | |
| 491 | + * 获取用户权限 | |
| 492 | + * | |
| 448 | 493 | * @param session |
| 449 | 494 | * @return |
| 450 | 495 | */ |
| 451 | - public Map<String, String> getUQX(String USERNAME){ | |
| 496 | + public Map<String, String> getUQX(String USERNAME) { | |
| 452 | 497 | PageData pd = new PageData(); |
| 453 | 498 | Map<String, String> map = new HashMap<String, String>(); |
| 454 | 499 | try { |
| 455 | 500 | pd.put(Const.SESSION_USERNAME, USERNAME); |
| 456 | - | |
| 501 | + | |
| 457 | 502 | PageData userpd = new PageData(); |
| 458 | - userpd = userService.findByUsername(pd); //通过用户名获取用户信息 | |
| 503 | + userpd = userService.findByUsername(pd); // 通过用户名获取用户信息 | |
| 459 | 504 | String ROLE_ID = userpd.get("ROLE_ID").toString(); |
| 460 | 505 | String ROLE_IDS = userpd.getString("ROLE_IDS"); |
| 461 | - pd.put("ROLE_ID", ROLE_ID); //获取角色ID | |
| 462 | - pd = roleService.findObjectById(pd); //获取角色信息 | |
| 463 | - map.put("adds", pd.getString("ADD_QX")); //增 | |
| 464 | - map.put("dels", pd.getString("DEL_QX")); //删 | |
| 465 | - map.put("edits", pd.getString("EDIT_QX")); //改 | |
| 466 | - map.put("chas", pd.getString("CHA_QX")); //查 | |
| 506 | + pd.put("ROLE_ID", ROLE_ID); // 获取角色ID | |
| 507 | + pd = roleService.findObjectById(pd); // 获取角色信息 | |
| 508 | + map.put("adds", pd.getString("ADD_QX")); // 增 | |
| 509 | + map.put("dels", pd.getString("DEL_QX")); // 删 | |
| 510 | + map.put("edits", pd.getString("EDIT_QX")); // 改 | |
| 511 | + map.put("chas", pd.getString("CHA_QX")); // 查 | |
| 467 | 512 | List<PageData> buttonQXnamelist = new ArrayList<PageData>(); |
| 468 | - if("admin".equals(USERNAME)){ | |
| 469 | - buttonQXnamelist = fhbuttonService.listAll(pd); //admin用户拥有所有按钮权限 | |
| 470 | - }else{ | |
| 471 | - if(Tools.notEmpty(ROLE_IDS)){//(主副职角色综合按钮权限) | |
| 513 | + if ("admin".equals(USERNAME)) { | |
| 514 | + buttonQXnamelist = fhbuttonService.listAll(pd); // admin用户拥有所有按钮权限 | |
| 515 | + } else { | |
| 516 | + if (Tools.notEmpty(ROLE_IDS)) {// (主副职角色综合按钮权限) | |
| 472 | 517 | ROLE_IDS = ROLE_IDS + ROLE_ID; |
| 473 | 518 | String arryROLE_ID[] = ROLE_IDS.split(",fh,"); |
| 474 | - buttonQXnamelist = buttonrightsService.listAllBrAndQxnameByZF(arryROLE_ID); | |
| 475 | - }else{ //(主职角色按钮权限) | |
| 476 | - buttonQXnamelist = buttonrightsService.listAllBrAndQxname(pd); //此角色拥有的按钮权限标识列表 | |
| 519 | + buttonQXnamelist = buttonrightsService | |
| 520 | + .listAllBrAndQxnameByZF(arryROLE_ID); | |
| 521 | + } else { // (主职角色按钮权限) | |
| 522 | + buttonQXnamelist = buttonrightsService | |
| 523 | + .listAllBrAndQxname(pd); // 此角色拥有的按钮权限标识列表 | |
| 477 | 524 | } |
| 478 | 525 | } |
| 479 | - for(int i=0;i<buttonQXnamelist.size();i++){ | |
| 480 | - map.put(buttonQXnamelist.get(i).getString("QX_NAME"),"1"); //按钮权限 | |
| 526 | + for (int i = 0; i < buttonQXnamelist.size(); i++) { | |
| 527 | + map.put(buttonQXnamelist.get(i).getString("QX_NAME"), "1"); // 按钮权限 | |
| 481 | 528 | } |
| 482 | 529 | } catch (Exception e) { |
| 483 | 530 | logger.error(e.toString(), e); |
| 484 | - } | |
| 531 | + } | |
| 485 | 532 | return map; |
| 486 | 533 | } |
| 487 | - | |
| 488 | - /**获取用户权限(处理副职角色) | |
| 534 | + | |
| 535 | + /** | |
| 536 | + * 获取用户权限(处理副职角色) | |
| 537 | + * | |
| 489 | 538 | * @param session |
| 490 | 539 | * @return |
| 491 | 540 | */ |
| 492 | - public Map<String, List<String>> getUQX2(String USERNAME){ | |
| 541 | + public Map<String, List<String>> getUQX2(String USERNAME) { | |
| 493 | 542 | PageData pd = new PageData(); |
| 494 | 543 | Map<String, List<String>> maps = new HashMap<String, List<String>>(); |
| 495 | 544 | try { |
| 496 | 545 | pd.put(Const.SESSION_USERNAME, USERNAME); |
| 497 | 546 | PageData userpd = new PageData(); |
| 498 | - userpd = userService.findByUsername(pd); //通过用户名获取用户信息 | |
| 547 | + userpd = userService.findByUsername(pd); // 通过用户名获取用户信息 | |
| 499 | 548 | String ROLE_IDS = userpd.getString("ROLE_IDS"); |
| 500 | - if(Tools.notEmpty(ROLE_IDS)){ | |
| 549 | + if (Tools.notEmpty(ROLE_IDS)) { | |
| 501 | 550 | String arryROLE_ID[] = ROLE_IDS.split(",fh,"); |
| 502 | 551 | PageData rolePd = new PageData(); |
| 503 | 552 | List<String> addsList = new ArrayList<String>(); |
| 504 | 553 | List<String> delsList = new ArrayList<String>(); |
| 505 | 554 | List<String> editsList = new ArrayList<String>(); |
| 506 | 555 | List<String> chasList = new ArrayList<String>(); |
| 507 | - for(int i=0;i<arryROLE_ID.length;i++){ | |
| 556 | + for (int i = 0; i < arryROLE_ID.length; i++) { | |
| 508 | 557 | rolePd.put("ROLE_ID", arryROLE_ID[i]); |
| 509 | 558 | rolePd = roleService.findObjectById(rolePd); |
| 510 | 559 | addsList.add(rolePd.getString("ADD_QX")); |
| ... | ... | @@ -512,33 +561,35 @@ public class LoginController extends BaseController { |
| 512 | 561 | editsList.add(rolePd.getString("EDIT_QX")); |
| 513 | 562 | chasList.add(rolePd.getString("CHA_QX")); |
| 514 | 563 | } |
| 515 | - maps.put("addsList", addsList); //增 | |
| 516 | - maps.put("delsList", delsList); //删 | |
| 517 | - maps.put("editsList", editsList); //改 | |
| 518 | - maps.put("chasList", chasList); //查 | |
| 564 | + maps.put("addsList", addsList); // 增 | |
| 565 | + maps.put("delsList", delsList); // 删 | |
| 566 | + maps.put("editsList", editsList); // 改 | |
| 567 | + maps.put("chasList", chasList); // 查 | |
| 519 | 568 | } |
| 520 | 569 | } catch (Exception e) { |
| 521 | 570 | logger.error(e.toString(), e); |
| 522 | - } | |
| 571 | + } | |
| 523 | 572 | return maps; |
| 524 | 573 | } |
| 525 | - | |
| 526 | - /** 更新登录用户的IP | |
| 574 | + | |
| 575 | + /** | |
| 576 | + * 更新登录用户的IP | |
| 577 | + * | |
| 527 | 578 | * @param USERNAME |
| 528 | 579 | * @throws Exception |
| 529 | 580 | */ |
| 530 | - public void getRemortIP(String USERNAME) throws Exception { | |
| 581 | + public void getRemortIP(String USERNAME) throws Exception { | |
| 531 | 582 | PageData pd = new PageData(); |
| 532 | 583 | HttpServletRequest request = this.getRequest(); |
| 533 | 584 | String ip = ""; |
| 534 | - if (request.getHeader("x-forwarded-for") == null) { | |
| 535 | - ip = request.getRemoteAddr(); | |
| 536 | - }else{ | |
| 537 | - ip = request.getHeader("x-forwarded-for"); | |
| 538 | - } | |
| 585 | + if (request.getHeader("x-forwarded-for") == null) { | |
| 586 | + ip = request.getRemoteAddr(); | |
| 587 | + } else { | |
| 588 | + ip = request.getHeader("x-forwarded-for"); | |
| 589 | + } | |
| 539 | 590 | pd.put("USERNAME", USERNAME); |
| 540 | 591 | pd.put("IP", ip); |
| 541 | 592 | userService.saveIP(pd); |
| 542 | - } | |
| 543 | - | |
| 593 | + } | |
| 594 | + | |
| 544 | 595 | } | ... | ... |
src/com/fh/service/api/V1Manager.java
0 → 100644
| 1 | +package com.fh.service.api; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +public interface V1Manager { | |
| 8 | + | |
| 9 | + public List<PageData> getTeacherClassInfo(PageData pd) throws Exception; | |
| 10 | + | |
| 11 | + public List<PageData> getTeacherSubjectInfo(PageData pd) throws Exception; | |
| 12 | + | |
| 13 | + public List<PageData> getClassStudent(PageData pd) throws Exception; | |
| 14 | + | |
| 15 | + public List<PageData> getTestPaperInfo(PageData pd) throws Exception; | |
| 16 | + | |
| 17 | + | |
| 18 | +} | ... | ... |
src/com/fh/service/api/impl/V1Service.java
0 → 100644
| 1 | +package com.fh.service.api.impl; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import javax.annotation.Resource; | |
| 6 | + | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | + | |
| 9 | +import com.fh.dao.DaoSupport; | |
| 10 | +import com.fh.service.api.V1Manager; | |
| 11 | +import com.fh.util.PageData; | |
| 12 | + | |
| 13 | +@Service("v1Service") | |
| 14 | +public class V1Service implements V1Manager { | |
| 15 | + | |
| 16 | + @Resource(name = "daoSupport") | |
| 17 | + private DaoSupport dao; | |
| 18 | + | |
| 19 | + @Override | |
| 20 | + public List<PageData> getTeacherClassInfo(PageData pd) throws Exception { | |
| 21 | + return (List<PageData>)dao.findForList("V1Mapper.getTeacherClassInfo", pd); | |
| 22 | + } | |
| 23 | + | |
| 24 | + @Override | |
| 25 | + public List<PageData> getTeacherSubjectInfo(PageData pd) throws Exception { | |
| 26 | + return (List<PageData>)dao.findForList("V1Mapper.getTeacherSubjectInfo", pd); | |
| 27 | + } | |
| 28 | + | |
| 29 | + @Override | |
| 30 | + public List<PageData> getClassStudent(PageData pd) throws Exception { | |
| 31 | + return (List<PageData>)dao.findForList("V1Mapper.getClassStudent", pd); | |
| 32 | + } | |
| 33 | + | |
| 34 | + @Override | |
| 35 | + public List<PageData> getTestPaperInfo(PageData pd) throws Exception { | |
| 36 | + return (List<PageData>)dao.findForList("V1Mapper.getTestPaperInfo", pd); | |
| 37 | + } | |
| 38 | + | |
| 39 | +} | ... | ... |
src/com/fh/service/sunvote/classbasetation/ClassBasetationManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.classbasetation; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 班级教室基站接口 | |
| 9 | + * 创建时间:2018-05-16 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface ClassBasetationManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/classbasetation/impl/ClassBasetationService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.classbasetation.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.classbasetation.ClassBasetationManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 班级教室基站 | |
| 13 | + * 创建时间:2018-05-16 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("classbasetationService") | |
| 17 | +public class ClassBasetationService implements ClassBasetationManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("ClassBasetationMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("ClassBasetationMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("ClassBasetationMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("ClassBasetationMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("ClassBasetationMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("ClassBasetationMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("ClassBasetationMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/classroster/ClassRosterManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.classroster; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 班级名册接口 | |
| 9 | + * 创建时间:2018-05-16 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface ClassRosterManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/classroster/impl/ClassRosterService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.classroster.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.classroster.ClassRosterManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 班级名册 | |
| 13 | + * 创建时间:2018-05-16 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("classrosterService") | |
| 17 | +public class ClassRosterService implements ClassRosterManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("ClassRosterMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("ClassRosterMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("ClassRosterMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("ClassRosterMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("ClassRosterMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("ClassRosterMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("ClassRosterMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/keypadcheck/KeypadCheckManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.keypadcheck; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 键盘检测表接口 | |
| 9 | + * 创建时间:2018-05-16 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface KeypadCheckManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/keypadcheck/impl/KeypadCheckService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.keypadcheck.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.keypadcheck.KeypadCheckManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 键盘检测表 | |
| 13 | + * 创建时间:2018-05-16 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("keypadcheckService") | |
| 17 | +public class KeypadCheckService implements KeypadCheckManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("KeypadCheckMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("KeypadCheckMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("KeypadCheckMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("KeypadCheckMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("KeypadCheckMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("KeypadCheckMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("KeypadCheckMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/knowledge/KnowledgeManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.knowledge; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 知识点接口 | |
| 9 | + * 创建时间:2018-05-17 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface KnowledgeManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/knowledge/impl/KnowledgeService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.knowledge.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.knowledge.KnowledgeManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 知识点 | |
| 13 | + * 创建时间:2018-05-17 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("knowledgeService") | |
| 17 | +public class KnowledgeService implements KnowledgeManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("KnowledgeMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("KnowledgeMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("KnowledgeMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("KnowledgeMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("KnowledgeMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("KnowledgeMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("KnowledgeMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/knowledgechapter/KnowledgeChapterManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.knowledgechapter; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 知识点章节表接口 | |
| 9 | + * 创建时间:2018-05-17 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface KnowledgeChapterManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/knowledgechapter/impl/KnowledgeChapterService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.knowledgechapter.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.knowledgechapter.KnowledgeChapterManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 知识点章节表 | |
| 13 | + * 创建时间:2018-05-17 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("knowledgechapterService") | |
| 17 | +public class KnowledgeChapterService implements KnowledgeChapterManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("KnowledgeChapterMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("KnowledgeChapterMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("KnowledgeChapterMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("KnowledgeChapterMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("KnowledgeChapterMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("KnowledgeChapterMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("KnowledgeChapterMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/paper/PaperManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.paper; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import com.fh.entity.Page; | |
| 6 | +import com.fh.util.PageData; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 说明: 试卷接口 | |
| 10 | + * 创建时间:2018-05-17 | |
| 11 | + * @version | |
| 12 | + */ | |
| 13 | +public interface PaperManager{ | |
| 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 | + * | |
| 59 | + * @param pd | |
| 60 | + * @return | |
| 61 | + * @throws Exception | |
| 62 | + */ | |
| 63 | + public List<PageData> listAllByType(Page pd)throws Exception; | |
| 64 | + | |
| 65 | +} | |
| 66 | + | ... | ... |
src/com/fh/service/sunvote/paper/impl/PaperService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.paper.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.paper.PaperManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 试卷 | |
| 13 | + * 创建时间:2018-05-17 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("paperService") | |
| 17 | +public class PaperService implements PaperManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("PaperMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("PaperMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("PaperMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("PaperMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("PaperMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**列表(全部) | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + @SuppressWarnings("unchecked") | |
| 69 | + public List<PageData> listAllByType(Page pd)throws Exception{ | |
| 70 | + return (List<PageData>)dao.findForList("PaperMapper.listAllByType", pd); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**通过id获取数据 | |
| 74 | + * @param pd | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + public PageData findById(PageData pd)throws Exception{ | |
| 78 | + return (PageData)dao.findForObject("PaperMapper.findById", pd); | |
| 79 | + } | |
| 80 | + | |
| 81 | + /**批量删除 | |
| 82 | + * @param ArrayDATA_IDS | |
| 83 | + * @throws Exception | |
| 84 | + */ | |
| 85 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 86 | + dao.delete("PaperMapper.deleteAll", ArrayDATA_IDS); | |
| 87 | + } | |
| 88 | + | |
| 89 | +} | |
| 90 | + | ... | ... |
src/com/fh/service/sunvote/paperclassteacher/PaperClassTeacherManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.paperclassteacher; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 试卷班级教师接口 | |
| 9 | + * 创建时间:2018-05-17 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface PaperClassTeacherManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/paperclassteacher/impl/PaperClassTeacherService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.paperclassteacher.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.paperclassteacher.PaperClassTeacherManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 试卷班级教师 | |
| 13 | + * 创建时间:2018-05-17 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("paperclassteacherService") | |
| 17 | +public class PaperClassTeacherService implements PaperClassTeacherManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("PaperClassTeacherMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("PaperClassTeacherMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("PaperClassTeacherMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("PaperClassTeacherMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("PaperClassTeacherMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("PaperClassTeacherMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("PaperClassTeacherMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/paperquestion/PaperQuestionManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.paperquestion; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 试卷题目表接口 | |
| 9 | + * 创建时间:2018-05-17 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface PaperQuestionManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/paperquestion/impl/PaperQuestionService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.paperquestion.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.paperquestion.PaperQuestionManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 试卷题目表 | |
| 13 | + * 创建时间:2018-05-17 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("paperquestionService") | |
| 17 | +public class PaperQuestionService implements PaperQuestionManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("PaperQuestionMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("PaperQuestionMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("PaperQuestionMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("PaperQuestionMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("PaperQuestionMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("PaperQuestionMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("PaperQuestionMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/papertype/impl/PaperTypeService.java
src/com/fh/service/sunvote/question/QuestionManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.question; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 题目表接口 | |
| 9 | + * 创建时间:2018-05-16 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface QuestionManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/question/impl/QuestionService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.question.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.question.QuestionManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 题目表 | |
| 13 | + * 创建时间:2018-05-16 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("questionService") | |
| 17 | +public class QuestionService implements QuestionManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("QuestionMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("QuestionMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("QuestionMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("QuestionMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("QuestionMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("QuestionMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("QuestionMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/questiontype/QuestionTypeManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.questiontype; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 题目类型表接口 | |
| 9 | + * 创建时间:2018-05-16 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface QuestionTypeManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/questiontype/impl/QuestionTypeService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.questiontype.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.questiontype.QuestionTypeManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 题目类型表 | |
| 13 | + * 创建时间:2018-05-16 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("questiontypeService") | |
| 17 | +public class QuestionTypeService implements QuestionTypeManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("QuestionTypeMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("QuestionTypeMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("QuestionTypeMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("QuestionTypeMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("QuestionTypeMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("QuestionTypeMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("QuestionTypeMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/school/SchoolManager.java
src/com/fh/service/sunvote/school/impl/SchoolService.java
src/com/fh/service/sunvote/schoolgradesubject/SchoolGradeSubjectManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.schoolgradesubject; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 学校年级科目表接口 | |
| 9 | + * 创建时间:2018-05-15 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface SchoolGradeSubjectManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/schoolgradesubject/impl/SchoolGradeSubjectService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.schoolgradesubject.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.schoolgradesubject.SchoolGradeSubjectManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 学校年级科目表 | |
| 13 | + * 创建时间:2018-05-15 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("schoolgradesubjectService") | |
| 17 | +public class SchoolGradeSubjectService implements SchoolGradeSubjectManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("SchoolGradeSubjectMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("SchoolGradeSubjectMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("SchoolGradeSubjectMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("SchoolGradeSubjectMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("SchoolGradeSubjectMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("SchoolGradeSubjectMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("SchoolGradeSubjectMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/teacher/TeacherManager.java
| ... | ... | @@ -48,6 +48,12 @@ public interface TeacherManager{ |
| 48 | 48 | */ |
| 49 | 49 | public PageData findById(PageData pd)throws Exception; |
| 50 | 50 | |
| 51 | + /**通过username&password获取数据 | |
| 52 | + * @param pd | |
| 53 | + * @throws Exception | |
| 54 | + */ | |
| 55 | + public PageData getUserInfo(PageData pd)throws Exception; | |
| 56 | + | |
| 51 | 57 | /**批量删除 |
| 52 | 58 | * @param ArrayDATA_IDS |
| 53 | 59 | * @throws Exception | ... | ... |
src/com/fh/service/sunvote/teacher/impl/TeacherService.java
| 1 | 1 | package com.fh.service.sunvote.teacher.impl; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | + | |
| 4 | 5 | import javax.annotation.Resource; |
| 6 | + | |
| 5 | 7 | import org.springframework.stereotype.Service; |
| 8 | + | |
| 6 | 9 | import com.fh.dao.DaoSupport; |
| 7 | 10 | import com.fh.entity.Page; |
| 8 | 11 | import com.fh.util.PageData; |
| ... | ... | @@ -70,6 +73,14 @@ public class TeacherService implements TeacherManager{ |
| 70 | 73 | return (PageData)dao.findForObject("TeacherMapper.findById", pd); |
| 71 | 74 | } |
| 72 | 75 | |
| 76 | + /**通过id获取数据 | |
| 77 | + * @param pd | |
| 78 | + * @throws Exception | |
| 79 | + */ | |
| 80 | + public PageData getUserInfo(PageData pd)throws Exception{ | |
| 81 | + return (PageData)dao.findForObject("TeacherMapper.getUserInfo", pd); | |
| 82 | + } | |
| 83 | + | |
| 73 | 84 | /**批量删除 |
| 74 | 85 | * @param ArrayDATA_IDS |
| 75 | 86 | * @throws Exception | ... | ... |
src/com/fh/service/sunvote/term/TermManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.term; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 学期名称接口 | |
| 9 | + * 创建时间:2018-05-16 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface TermManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |
src/com/fh/service/sunvote/term/impl/TermService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.term.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.term.TermManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 学期名称 | |
| 13 | + * 创建时间:2018-05-16 | |
| 14 | + * @version | |
| 15 | + */ | |
| 16 | +@Service("termService") | |
| 17 | +public class TermService implements TermManager{ | |
| 18 | + | |
| 19 | + @Resource(name = "daoSupport") | |
| 20 | + private DaoSupport dao; | |
| 21 | + | |
| 22 | + /**新增 | |
| 23 | + * @param pd | |
| 24 | + * @throws Exception | |
| 25 | + */ | |
| 26 | + public void save(PageData pd)throws Exception{ | |
| 27 | + dao.save("TermMapper.save", pd); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /**删除 | |
| 31 | + * @param pd | |
| 32 | + * @throws Exception | |
| 33 | + */ | |
| 34 | + public void delete(PageData pd)throws Exception{ | |
| 35 | + dao.delete("TermMapper.delete", pd); | |
| 36 | + } | |
| 37 | + | |
| 38 | + /**修改 | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public void edit(PageData pd)throws Exception{ | |
| 43 | + dao.update("TermMapper.edit", pd); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /**列表 | |
| 47 | + * @param page | |
| 48 | + * @throws Exception | |
| 49 | + */ | |
| 50 | + @SuppressWarnings("unchecked") | |
| 51 | + public List<PageData> list(Page page)throws Exception{ | |
| 52 | + return (List<PageData>)dao.findForList("TermMapper.datalistPage", page); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /**列表(全部) | |
| 56 | + * @param pd | |
| 57 | + * @throws Exception | |
| 58 | + */ | |
| 59 | + @SuppressWarnings("unchecked") | |
| 60 | + public List<PageData> listAll(PageData pd)throws Exception{ | |
| 61 | + return (List<PageData>)dao.findForList("TermMapper.listAll", pd); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /**通过id获取数据 | |
| 65 | + * @param pd | |
| 66 | + * @throws Exception | |
| 67 | + */ | |
| 68 | + public PageData findById(PageData pd)throws Exception{ | |
| 69 | + return (PageData)dao.findForObject("TermMapper.findById", pd); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /**批量删除 | |
| 73 | + * @param ArrayDATA_IDS | |
| 74 | + * @throws Exception | |
| 75 | + */ | |
| 76 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 77 | + dao.delete("TermMapper.deleteAll", ArrayDATA_IDS); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} | |
| 81 | + | ... | ... |
src/com/fh/service/sunvote/testpaper/TestPaperManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.testpaper; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | +import com.fh.entity.Page; | |
| 5 | +import com.fh.util.PageData; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * 说明: 测验接口 | |
| 9 | + * 创建时间:2018-05-17 | |
| 10 | + * @version | |
| 11 | + */ | |
| 12 | +public interface TestPaperManager{ | |
| 13 | + | |
| 14 | + /**新增 | |
| 15 | + * @param pd | |
| 16 | + * @throws Exception | |
| 17 | + */ | |
| 18 | + public void save(PageData pd)throws Exception; | |
| 19 | + | |
| 20 | + /**删除 | |
| 21 | + * @param pd | |
| 22 | + * @throws Exception | |
| 23 | + */ | |
| 24 | + public void delete(PageData pd)throws Exception; | |
| 25 | + | |
| 26 | + /**修改 | |
| 27 | + * @param pd | |
| 28 | + * @throws Exception | |
| 29 | + */ | |
| 30 | + public void edit(PageData pd)throws Exception; | |
| 31 | + | |
| 32 | + /**列表 | |
| 33 | + * @param page | |
| 34 | + * @throws Exception | |
| 35 | + */ | |
| 36 | + public List<PageData> list(Page page)throws Exception; | |
| 37 | + | |
| 38 | + /**列表(全部) | |
| 39 | + * @param pd | |
| 40 | + * @throws Exception | |
| 41 | + */ | |
| 42 | + public List<PageData> listAll(PageData pd)throws Exception; | |
| 43 | + | |
| 44 | + /**通过id获取数据 | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public PageData findById(PageData pd)throws Exception; | |
| 49 | + | |
| 50 | + /**批量删除 | |
| 51 | + * @param ArrayDATA_IDS | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 55 | + | |
| 56 | +} | |
| 57 | + | ... | ... |