Commit be2f84a157fcec3aea2742953797609f29e0bc99
1 parent
0e4da37e
添加课后作业基础模块数据
Showing
32 changed files
with
5385 additions
and
1 deletions
WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_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="headmaster/${msg }.do" name="Form" id="Form" method="post"> | ||
| 31 | + <input type="hidden" name="HEADMASTER_ID" id="HEADMASTER_ID" value="${pd.HEADMASTER_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="USERNAME" id="USERNAME" value="${pd.USERNAME}" 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="PASSWORD" id="PASSWORD" value="${pd.PASSWORD}" 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="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_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="PERMISSION" id="PERMISSION" value="${pd.PERMISSION}" 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="PHONE" id="PHONE" value="${pd.PHONE}" 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($("#NAME").val()==""){ | ||
| 94 | + $("#NAME").tips({ | ||
| 95 | + side:3, | ||
| 96 | + msg:'请输入姓名', | ||
| 97 | + bg:'#AE81FF', | ||
| 98 | + time:2 | ||
| 99 | + }); | ||
| 100 | + $("#NAME").focus(); | ||
| 101 | + return false; | ||
| 102 | + } | ||
| 103 | + if($("#USERNAME").val()==""){ | ||
| 104 | + $("#USERNAME").tips({ | ||
| 105 | + side:3, | ||
| 106 | + msg:'请输入用户名', | ||
| 107 | + bg:'#AE81FF', | ||
| 108 | + time:2 | ||
| 109 | + }); | ||
| 110 | + $("#USERNAME").focus(); | ||
| 111 | + return false; | ||
| 112 | + } | ||
| 113 | + if($("#PASSWORD").val()==""){ | ||
| 114 | + $("#PASSWORD").tips({ | ||
| 115 | + side:3, | ||
| 116 | + msg:'请输入密码', | ||
| 117 | + bg:'#AE81FF', | ||
| 118 | + time:2 | ||
| 119 | + }); | ||
| 120 | + $("#PASSWORD").focus(); | ||
| 121 | + return false; | ||
| 122 | + } | ||
| 123 | + if($("#SCHOOL_ID").val()==""){ | ||
| 124 | + $("#SCHOOL_ID").tips({ | ||
| 125 | + side:3, | ||
| 126 | + msg:'请输入所在学校', | ||
| 127 | + bg:'#AE81FF', | ||
| 128 | + time:2 | ||
| 129 | + }); | ||
| 130 | + $("#SCHOOL_ID").focus(); | ||
| 131 | + return false; | ||
| 132 | + } | ||
| 133 | + if($("#PERMISSION").val()==""){ | ||
| 134 | + $("#PERMISSION").tips({ | ||
| 135 | + side:3, | ||
| 136 | + msg:'请输入权限', | ||
| 137 | + bg:'#AE81FF', | ||
| 138 | + time:2 | ||
| 139 | + }); | ||
| 140 | + $("#PERMISSION").focus(); | ||
| 141 | + return false; | ||
| 142 | + } | ||
| 143 | + if($("#PHONE").val()==""){ | ||
| 144 | + $("#PHONE").tips({ | ||
| 145 | + side:3, | ||
| 146 | + msg:'请输入联系电话', | ||
| 147 | + bg:'#AE81FF', | ||
| 148 | + time:2 | ||
| 149 | + }); | ||
| 150 | + $("#PHONE").focus(); | ||
| 151 | + return false; | ||
| 152 | + } | ||
| 153 | + $("#Form").submit(); | ||
| 154 | + $("#zhongxin").hide(); | ||
| 155 | + $("#zhongxin2").show(); | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + $(function() { | ||
| 159 | + //日期框 | ||
| 160 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | ||
| 161 | + }); | ||
| 162 | + </script> | ||
| 163 | +</body> | ||
| 164 | +</html> | ||
| 0 | \ No newline at end of file | 165 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_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="headmaster/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.HEADMASTER_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.NAME}</td> | ||
| 91 | + <td class='center'>${var.USERNAME}</td> | ||
| 92 | + <td class='center'>${var.PASSWORD}</td> | ||
| 93 | + <td class='center'>${var.SCHOOL_ID}</td> | ||
| 94 | + <td class='center'>${var.PERMISSION}</td> | ||
| 95 | + <td class='center'>${var.PHONE}</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.HEADMASTER_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.HEADMASTER_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.HEADMASTER_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.HEADMASTER_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%>headmaster/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%>headmaster/delete.do?HEADMASTER_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%>headmaster/goEdit.do?HEADMASTER_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%>headmaster/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%>headmaster/excel.do'; | ||
| 369 | + } | ||
| 370 | + </script> | ||
| 371 | + | ||
| 372 | + | ||
| 373 | +</body> | ||
| 374 | +</html> | ||
| 0 | \ No newline at end of file | 375 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_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="homework/${msg }.do" name="Form" id="Form" method="post"> | ||
| 31 | + <input type="hidden" name="HOMEWORK_ID" id="HOMEWORK_ID" value="${pd.HOMEWORK_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="CODE" id="CODE" value="${pd.CODE}" 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="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入作业名称" title="作业名称" style="width:98%;"/></td> | ||
| 41 | + </tr> | ||
| 42 | + <tr> | ||
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">科目ID:</td> | ||
| 44 | + <td><input type="text" name="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="100" placeholder="这里输入科目ID" title="科目ID" style="width:98%;"/></td> | ||
| 45 | + </tr> | ||
| 46 | + <tr> | ||
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级ID:</td> | ||
| 48 | + <td><input type="text" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="100" placeholder="这里输入班级ID" title="班级ID" style="width:98%;"/></td> | ||
| 49 | + </tr> | ||
| 50 | + <tr> | ||
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">年级ID:</td> | ||
| 52 | + <td><input type="text" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" maxlength="100" placeholder="这里输入年级ID" title="年级ID" style="width:98%;"/></td> | ||
| 53 | + </tr> | ||
| 54 | + <tr> | ||
| 55 | + <td style="width:75px;text-align: right;padding-top: 13px;">学校ID:</td> | ||
| 56 | + <td><input type="text" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="100" placeholder="这里输入学校ID" title="学校ID" 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="COMPLETE_DATE" id="COMPLETE_DATE" value="${pd.COMPLETE_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 class="span10 date-picker" name="CREATE_DATE" id="CREATE_DATE" value="${pd.CREATE_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" placeholder="创建时间" title="创建时间" style="width:98%;"/></td> | ||
| 65 | + </tr> | ||
| 66 | + <tr> | ||
| 67 | + <td style="width:75px;text-align: right;padding-top: 13px;">修改时间:</td> | ||
| 68 | + <td><input class="span10 date-picker" name="MODIFY_DATE" id="MODIFY_DATE" value="${pd.MODIFY_DATE}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" 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="COMPLETE_COUNT" id="COMPLETE_COUNT" value="${pd.COMPLETE_COUNT}" 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="ALL_SCORE" id="ALL_SCORE" value="${pd.ALL_SCORE}" maxlength="32" 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($("#CODE").val()==""){ | ||
| 114 | + $("#CODE").tips({ | ||
| 115 | + side:3, | ||
| 116 | + msg:'请输入作业代码', | ||
| 117 | + bg:'#AE81FF', | ||
| 118 | + time:2 | ||
| 119 | + }); | ||
| 120 | + $("#CODE").focus(); | ||
| 121 | + return false; | ||
| 122 | + } | ||
| 123 | + if($("#NAME").val()==""){ | ||
| 124 | + $("#NAME").tips({ | ||
| 125 | + side:3, | ||
| 126 | + msg:'请输入作业名称', | ||
| 127 | + bg:'#AE81FF', | ||
| 128 | + time:2 | ||
| 129 | + }); | ||
| 130 | + $("#NAME").focus(); | ||
| 131 | + return false; | ||
| 132 | + } | ||
| 133 | + if($("#SUBJECT_ID").val()==""){ | ||
| 134 | + $("#SUBJECT_ID").tips({ | ||
| 135 | + side:3, | ||
| 136 | + msg:'请输入科目ID', | ||
| 137 | + bg:'#AE81FF', | ||
| 138 | + time:2 | ||
| 139 | + }); | ||
| 140 | + $("#SUBJECT_ID").focus(); | ||
| 141 | + return false; | ||
| 142 | + } | ||
| 143 | + if($("#CLASS_ID").val()==""){ | ||
| 144 | + $("#CLASS_ID").tips({ | ||
| 145 | + side:3, | ||
| 146 | + msg:'请输入班级ID', | ||
| 147 | + bg:'#AE81FF', | ||
| 148 | + time:2 | ||
| 149 | + }); | ||
| 150 | + $("#CLASS_ID").focus(); | ||
| 151 | + return false; | ||
| 152 | + } | ||
| 153 | + if($("#GRADE_ID").val()==""){ | ||
| 154 | + $("#GRADE_ID").tips({ | ||
| 155 | + side:3, | ||
| 156 | + msg:'请输入年级ID', | ||
| 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:'请输入学校ID', | ||
| 167 | + bg:'#AE81FF', | ||
| 168 | + time:2 | ||
| 169 | + }); | ||
| 170 | + $("#SCHOOL_ID").focus(); | ||
| 171 | + return false; | ||
| 172 | + } | ||
| 173 | + if($("#COMPLETE_DATE").val()==""){ | ||
| 174 | + $("#COMPLETE_DATE").tips({ | ||
| 175 | + side:3, | ||
| 176 | + msg:'请输入需要完成时间', | ||
| 177 | + bg:'#AE81FF', | ||
| 178 | + time:2 | ||
| 179 | + }); | ||
| 180 | + $("#COMPLETE_DATE").focus(); | ||
| 181 | + return false; | ||
| 182 | + } | ||
| 183 | + if($("#CREATE_DATE").val()==""){ | ||
| 184 | + $("#CREATE_DATE").tips({ | ||
| 185 | + side:3, | ||
| 186 | + msg:'请输入创建时间', | ||
| 187 | + bg:'#AE81FF', | ||
| 188 | + time:2 | ||
| 189 | + }); | ||
| 190 | + $("#CREATE_DATE").focus(); | ||
| 191 | + return false; | ||
| 192 | + } | ||
| 193 | + if($("#MODIFY_DATE").val()==""){ | ||
| 194 | + $("#MODIFY_DATE").tips({ | ||
| 195 | + side:3, | ||
| 196 | + msg:'请输入修改时间', | ||
| 197 | + bg:'#AE81FF', | ||
| 198 | + time:2 | ||
| 199 | + }); | ||
| 200 | + $("#MODIFY_DATE").focus(); | ||
| 201 | + return false; | ||
| 202 | + } | ||
| 203 | + if($("#COMPLETE_COUNT").val()==""){ | ||
| 204 | + $("#COMPLETE_COUNT").tips({ | ||
| 205 | + side:3, | ||
| 206 | + msg:'请输入完成次数', | ||
| 207 | + bg:'#AE81FF', | ||
| 208 | + time:2 | ||
| 209 | + }); | ||
| 210 | + $("#COMPLETE_COUNT").focus(); | ||
| 211 | + return false; | ||
| 212 | + } | ||
| 213 | + if($("#ALL_SCORE").val()==""){ | ||
| 214 | + $("#ALL_SCORE").tips({ | ||
| 215 | + side:3, | ||
| 216 | + msg:'请输入总分', | ||
| 217 | + bg:'#AE81FF', | ||
| 218 | + time:2 | ||
| 219 | + }); | ||
| 220 | + $("#ALL_SCORE").focus(); | ||
| 221 | + return false; | ||
| 222 | + } | ||
| 223 | + $("#Form").submit(); | ||
| 224 | + $("#zhongxin").hide(); | ||
| 225 | + $("#zhongxin2").show(); | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + $(function() { | ||
| 229 | + //日期框 | ||
| 230 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | ||
| 231 | + }); | ||
| 232 | + </script> | ||
| 233 | +</body> | ||
| 234 | +</html> | ||
| 0 | \ No newline at end of file | 235 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_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="homework/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">科目ID</th> | ||
| 72 | + <th class="center">班级ID</th> | ||
| 73 | + <th class="center">年级ID</th> | ||
| 74 | + <th class="center">学校ID</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.HOMEWORK_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.CODE}</td> | ||
| 96 | + <td class='center'>${var.NAME}</td> | ||
| 97 | + <td class='center'>${var.SUBJECT_ID}</td> | ||
| 98 | + <td class='center'>${var.CLASS_ID}</td> | ||
| 99 | + <td class='center'>${var.GRADE_ID}</td> | ||
| 100 | + <td class='center'>${var.SCHOOL_ID}</td> | ||
| 101 | + <td class='center'>${var.COMPLETE_DATE}</td> | ||
| 102 | + <td class='center'>${var.CREATE_DATE}</td> | ||
| 103 | + <td class='center'>${var.MODIFY_DATE}</td> | ||
| 104 | + <td class='center'>${var.COMPLETE_COUNT}</td> | ||
| 105 | + <td class='center'>${var.ALL_SCORE}</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.HOMEWORK_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.HOMEWORK_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.HOMEWORK_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.HOMEWORK_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%>homework/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%>homework/delete.do?HOMEWORK_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%>homework/goEdit.do?HOMEWORK_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%>homework/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%>homework/excel.do'; | ||
| 379 | + } | ||
| 380 | + </script> | ||
| 381 | + | ||
| 382 | + | ||
| 383 | +</body> | ||
| 384 | +</html> | ||
| 0 | \ No newline at end of file | 385 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/homeworkproblem/homeworkproblem_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="homeworkproblem/${msg }.do" name="Form" id="Form" method="post"> | ||
| 31 | + <input type="hidden" name="HOMEWORKPROBLEM_ID" id="HOMEWORKPROBLEM_ID" value="${pd.HOMEWORKPROBLEM_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="CODE" id="CODE" value="${pd.CODE}" 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="number" name="RANK" id="RANK" value="${pd.RANK}" maxlength="32" placeholder="这里输入排序号" title="排序号" style="width:98%;"/></td> | ||
| 41 | + </tr> | ||
| 42 | + <tr> | ||
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">父题ID:</td> | ||
| 44 | + <td><input type="text" name="P_HOMEWORK_PROBLEM_ID" id="P_HOMEWORK_PROBLEM_ID" value="${pd.P_HOMEWORK_PROBLEM_ID}" maxlength="255" placeholder="这里输入父题ID" title="父题ID" 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="NAME" id="NAME" value="${pd.NAME}" 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="number" name="TYPE" id="TYPE" value="${pd.TYPE}" maxlength="32" placeholder="这里输入题目类型" title="题目类型" style="width:98%;"/></td> | ||
| 53 | + </tr> | ||
| 54 | + <tr> | ||
| 55 | + <td style="width:75px;text-align: right;padding-top: 13px;">答案个数:</td> | ||
| 56 | + <td><input type="number" name="OPTION_NUM" id="OPTION_NUM" value="${pd.OPTION_NUM}" 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="text" name="RIGHT_ANSWER" id="RIGHT_ANSWER" value="${pd.RIGHT_ANSWER}" maxlength="255" placeholder="这里输入标准答案" title="标准答案" style="width:98%;"/></td> | ||
| 61 | + </tr> | ||
| 62 | + <tr> | ||
| 63 | + <td style="width:75px;text-align: right;padding-top: 13px;">分数:</td> | ||
| 64 | + <td><input type="number" name="SCORE" id="SCORE" value="${pd.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="PART_SCORE" id="PART_SCORE" value="${pd.PART_SCORE}" maxlength="32" placeholder="这里输入部分分" title="部分分" style="width:98%;"/></td> | ||
| 69 | + </tr> | ||
| 70 | + <tr> | ||
| 71 | + <td style="text-align: center;" colspan="10"> | ||
| 72 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | ||
| 73 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | ||
| 74 | + </td> | ||
| 75 | + </tr> | ||
| 76 | + </table> | ||
| 77 | + </div> | ||
| 78 | + <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> | ||
| 79 | + </form> | ||
| 80 | + </div> | ||
| 81 | + <!-- /.col --> | ||
| 82 | + </div> | ||
| 83 | + <!-- /.row --> | ||
| 84 | + </div> | ||
| 85 | + <!-- /.page-content --> | ||
| 86 | + </div> | ||
| 87 | + </div> | ||
| 88 | + <!-- /.main-content --> | ||
| 89 | +</div> | ||
| 90 | +<!-- /.main-container --> | ||
| 91 | + | ||
| 92 | + | ||
| 93 | + <!-- 页面底部js¨ --> | ||
| 94 | + <%@ include file="../../system/index/foot.jsp"%> | ||
| 95 | + <!-- 下拉框 --> | ||
| 96 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
| 97 | + <!-- 日期框 --> | ||
| 98 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
| 99 | + <!--提示框--> | ||
| 100 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
| 101 | + <script type="text/javascript"> | ||
| 102 | + $(top.hangge()); | ||
| 103 | + //保存 | ||
| 104 | + function save(){ | ||
| 105 | + if($("#CODE").val()==""){ | ||
| 106 | + $("#CODE").tips({ | ||
| 107 | + side:3, | ||
| 108 | + msg:'请输入作业编号', | ||
| 109 | + bg:'#AE81FF', | ||
| 110 | + time:2 | ||
| 111 | + }); | ||
| 112 | + $("#CODE").focus(); | ||
| 113 | + return false; | ||
| 114 | + } | ||
| 115 | + if($("#RANK").val()==""){ | ||
| 116 | + $("#RANK").tips({ | ||
| 117 | + side:3, | ||
| 118 | + msg:'请输入排序号', | ||
| 119 | + bg:'#AE81FF', | ||
| 120 | + time:2 | ||
| 121 | + }); | ||
| 122 | + $("#RANK").focus(); | ||
| 123 | + return false; | ||
| 124 | + } | ||
| 125 | + if($("#P_HOMEWORK_PROBLEM_ID").val()==""){ | ||
| 126 | + $("#P_HOMEWORK_PROBLEM_ID").tips({ | ||
| 127 | + side:3, | ||
| 128 | + msg:'请输入父题ID', | ||
| 129 | + bg:'#AE81FF', | ||
| 130 | + time:2 | ||
| 131 | + }); | ||
| 132 | + $("#P_HOMEWORK_PROBLEM_ID").focus(); | ||
| 133 | + return false; | ||
| 134 | + } | ||
| 135 | + if($("#NAME").val()==""){ | ||
| 136 | + $("#NAME").tips({ | ||
| 137 | + side:3, | ||
| 138 | + msg:'请输入题目名称', | ||
| 139 | + bg:'#AE81FF', | ||
| 140 | + time:2 | ||
| 141 | + }); | ||
| 142 | + $("#NAME").focus(); | ||
| 143 | + return false; | ||
| 144 | + } | ||
| 145 | + if($("#TYPE").val()==""){ | ||
| 146 | + $("#TYPE").tips({ | ||
| 147 | + side:3, | ||
| 148 | + msg:'请输入题目类型', | ||
| 149 | + bg:'#AE81FF', | ||
| 150 | + time:2 | ||
| 151 | + }); | ||
| 152 | + $("#TYPE").focus(); | ||
| 153 | + return false; | ||
| 154 | + } | ||
| 155 | + if($("#OPTION_NUM").val()==""){ | ||
| 156 | + $("#OPTION_NUM").tips({ | ||
| 157 | + side:3, | ||
| 158 | + msg:'请输入答案个数', | ||
| 159 | + bg:'#AE81FF', | ||
| 160 | + time:2 | ||
| 161 | + }); | ||
| 162 | + $("#OPTION_NUM").focus(); | ||
| 163 | + return false; | ||
| 164 | + } | ||
| 165 | + if($("#RIGHT_ANSWER").val()==""){ | ||
| 166 | + $("#RIGHT_ANSWER").tips({ | ||
| 167 | + side:3, | ||
| 168 | + msg:'请输入标准答案', | ||
| 169 | + bg:'#AE81FF', | ||
| 170 | + time:2 | ||
| 171 | + }); | ||
| 172 | + $("#RIGHT_ANSWER").focus(); | ||
| 173 | + return false; | ||
| 174 | + } | ||
| 175 | + if($("#SCORE").val()==""){ | ||
| 176 | + $("#SCORE").tips({ | ||
| 177 | + side:3, | ||
| 178 | + msg:'请输入分数', | ||
| 179 | + bg:'#AE81FF', | ||
| 180 | + time:2 | ||
| 181 | + }); | ||
| 182 | + $("#SCORE").focus(); | ||
| 183 | + return false; | ||
| 184 | + } | ||
| 185 | + if($("#PART_SCORE").val()==""){ | ||
| 186 | + $("#PART_SCORE").tips({ | ||
| 187 | + side:3, | ||
| 188 | + msg:'请输入部分分', | ||
| 189 | + bg:'#AE81FF', | ||
| 190 | + time:2 | ||
| 191 | + }); | ||
| 192 | + $("#PART_SCORE").focus(); | ||
| 193 | + return false; | ||
| 194 | + } | ||
| 195 | + $("#Form").submit(); | ||
| 196 | + $("#zhongxin").hide(); | ||
| 197 | + $("#zhongxin2").show(); | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + $(function() { | ||
| 201 | + //日期框 | ||
| 202 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | ||
| 203 | + }); | ||
| 204 | + </script> | ||
| 205 | +</body> | ||
| 206 | +</html> | ||
| 0 | \ No newline at end of file | 207 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/homeworkproblem/homeworkproblem_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="homeworkproblem/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">父题ID</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 | + </tr> | ||
| 80 | + </thead> | ||
| 81 | + | ||
| 82 | + <tbody> | ||
| 83 | + <!-- 开始循环 --> | ||
| 84 | + <c:choose> | ||
| 85 | + <c:when test="${not empty varList}"> | ||
| 86 | + <c:if test="${QX.cha == 1 }"> | ||
| 87 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
| 88 | + <tr> | ||
| 89 | + <td class='center'> | ||
| 90 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.HOMEWORKPROBLEM_ID}" class="ace" /><span class="lbl"></span></label> | ||
| 91 | + </td> | ||
| 92 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | ||
| 93 | + <td class='center'>${var.CODE}</td> | ||
| 94 | + <td class='center'>${var.RANK}</td> | ||
| 95 | + <td class='center'>${var.P_HOMEWORK_PROBLEM_ID}</td> | ||
| 96 | + <td class='center'>${var.NAME}</td> | ||
| 97 | + <td class='center'>${var.TYPE}</td> | ||
| 98 | + <td class='center'>${var.OPTION_NUM}</td> | ||
| 99 | + <td class='center'>${var.RIGHT_ANSWER}</td> | ||
| 100 | + <td class='center'>${var.SCORE}</td> | ||
| 101 | + <td class='center'>${var.PART_SCORE}</td> | ||
| 102 | + <td class="center"> | ||
| 103 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | ||
| 104 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | ||
| 105 | + </c:if> | ||
| 106 | + <div class="hidden-sm hidden-xs btn-group"> | ||
| 107 | + <c:if test="${QX.edit == 1 }"> | ||
| 108 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.HOMEWORKPROBLEM_ID}');"> | ||
| 109 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | ||
| 110 | + </a> | ||
| 111 | + </c:if> | ||
| 112 | + <c:if test="${QX.del == 1 }"> | ||
| 113 | + <a class="btn btn-xs btn-danger" onclick="del('${var.HOMEWORKPROBLEM_ID}');"> | ||
| 114 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | ||
| 115 | + </a> | ||
| 116 | + </c:if> | ||
| 117 | + </div> | ||
| 118 | + <div class="hidden-md hidden-lg"> | ||
| 119 | + <div class="inline pos-rel"> | ||
| 120 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | ||
| 121 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | ||
| 122 | + </button> | ||
| 123 | + | ||
| 124 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | ||
| 125 | + <c:if test="${QX.edit == 1 }"> | ||
| 126 | + <li> | ||
| 127 | + <a style="cursor:pointer;" onclick="edit('${var.HOMEWORKPROBLEM_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | ||
| 128 | + <span class="green"> | ||
| 129 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | ||
| 130 | + </span> | ||
| 131 | + </a> | ||
| 132 | + </li> | ||
| 133 | + </c:if> | ||
| 134 | + <c:if test="${QX.del == 1 }"> | ||
| 135 | + <li> | ||
| 136 | + <a style="cursor:pointer;" onclick="del('${var.HOMEWORKPROBLEM_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | ||
| 137 | + <span class="red"> | ||
| 138 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | ||
| 139 | + </span> | ||
| 140 | + </a> | ||
| 141 | + </li> | ||
| 142 | + </c:if> | ||
| 143 | + </ul> | ||
| 144 | + </div> | ||
| 145 | + </div> | ||
| 146 | + </td> | ||
| 147 | + </tr> | ||
| 148 | + | ||
| 149 | + </c:forEach> | ||
| 150 | + </c:if> | ||
| 151 | + <c:if test="${QX.cha == 0 }"> | ||
| 152 | + <tr> | ||
| 153 | + <td colspan="100" class="center">您无权查看</td> | ||
| 154 | + </tr> | ||
| 155 | + </c:if> | ||
| 156 | + </c:when> | ||
| 157 | + <c:otherwise> | ||
| 158 | + <tr class="main_info"> | ||
| 159 | + <td colspan="100" class="center" >没有相关数据</td> | ||
| 160 | + </tr> | ||
| 161 | + </c:otherwise> | ||
| 162 | + </c:choose> | ||
| 163 | + </tbody> | ||
| 164 | + </table> | ||
| 165 | + <div class="page-header position-relative"> | ||
| 166 | + <table style="width:100%;"> | ||
| 167 | + <tr> | ||
| 168 | + <td style="vertical-align:top;"> | ||
| 169 | + <c:if test="${QX.add == 1 }"> | ||
| 170 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | ||
| 171 | + </c:if> | ||
| 172 | + <c:if test="${QX.del == 1 }"> | ||
| 173 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | ||
| 174 | + </c:if> | ||
| 175 | + </td> | ||
| 176 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | ||
| 177 | + </tr> | ||
| 178 | + </table> | ||
| 179 | + </div> | ||
| 180 | + </form> | ||
| 181 | + | ||
| 182 | + </div> | ||
| 183 | + <!-- /.col --> | ||
| 184 | + </div> | ||
| 185 | + <!-- /.row --> | ||
| 186 | + </div> | ||
| 187 | + <!-- /.page-content --> | ||
| 188 | + </div> | ||
| 189 | + </div> | ||
| 190 | + <!-- /.main-content --> | ||
| 191 | + | ||
| 192 | + <!-- 返回顶部 --> | ||
| 193 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | ||
| 194 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | ||
| 195 | + </a> | ||
| 196 | + | ||
| 197 | + </div> | ||
| 198 | + <!-- /.main-container --> | ||
| 199 | + | ||
| 200 | + <!-- basic scripts --> | ||
| 201 | + <!-- 页面底部js¨ --> | ||
| 202 | + <%@ include file="../../system/index/foot.jsp"%> | ||
| 203 | + <!-- 删除时确认窗口 --> | ||
| 204 | + <script src="static/ace/js/bootbox.js"></script> | ||
| 205 | + <!-- ace scripts --> | ||
| 206 | + <script src="static/ace/js/ace/ace.js"></script> | ||
| 207 | + <!-- 下拉框 --> | ||
| 208 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
| 209 | + <!-- 日期框 --> | ||
| 210 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
| 211 | + <!--提示框--> | ||
| 212 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
| 213 | + <script type="text/javascript"> | ||
| 214 | + $(top.hangge());//关闭加载状态 | ||
| 215 | + //检索 | ||
| 216 | + function tosearch(){ | ||
| 217 | + top.jzts(); | ||
| 218 | + $("#Form").submit(); | ||
| 219 | + } | ||
| 220 | + $(function() { | ||
| 221 | + | ||
| 222 | + //日期框 | ||
| 223 | + $('.date-picker').datepicker({ | ||
| 224 | + autoclose: true, | ||
| 225 | + todayHighlight: true | ||
| 226 | + }); | ||
| 227 | + | ||
| 228 | + //下拉框 | ||
| 229 | + if(!ace.vars['touch']) { | ||
| 230 | + $('.chosen-select').chosen({allow_single_deselect:true}); | ||
| 231 | + $(window) | ||
| 232 | + .off('resize.chosen') | ||
| 233 | + .on('resize.chosen', function() { | ||
| 234 | + $('.chosen-select').each(function() { | ||
| 235 | + var $this = $(this); | ||
| 236 | + $this.next().css({'width': $this.parent().width()}); | ||
| 237 | + }); | ||
| 238 | + }).trigger('resize.chosen'); | ||
| 239 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | ||
| 240 | + if(event_name != 'sidebar_collapsed') return; | ||
| 241 | + $('.chosen-select').each(function() { | ||
| 242 | + var $this = $(this); | ||
| 243 | + $this.next().css({'width': $this.parent().width()}); | ||
| 244 | + }); | ||
| 245 | + }); | ||
| 246 | + $('#chosen-multiple-style .btn').on('click', function(e){ | ||
| 247 | + var target = $(this).find('input[type=radio]'); | ||
| 248 | + var which = parseInt(target.val()); | ||
| 249 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | ||
| 250 | + else $('#form-field-select-4').removeClass('tag-input-style'); | ||
| 251 | + }); | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + | ||
| 255 | + //复选框全选控制 | ||
| 256 | + var active_class = 'active'; | ||
| 257 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | ||
| 258 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
| 259 | + $(this).closest('table').find('tbody > tr').each(function(){ | ||
| 260 | + var row = this; | ||
| 261 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
| 262 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
| 263 | + }); | ||
| 264 | + }); | ||
| 265 | + }); | ||
| 266 | + | ||
| 267 | + //新增 | ||
| 268 | + function add(){ | ||
| 269 | + top.jzts(); | ||
| 270 | + var diag = new top.Dialog(); | ||
| 271 | + diag.Drag=true; | ||
| 272 | + diag.Title ="新增"; | ||
| 273 | + diag.URL = '<%=basePath%>homeworkproblem/goAdd.do'; | ||
| 274 | + diag.Width = 450; | ||
| 275 | + diag.Height = 355; | ||
| 276 | + diag.Modal = true; //有无遮罩窗口 | ||
| 277 | + diag. ShowMaxButton = true; //最大化按钮 | ||
| 278 | + diag.ShowMinButton = true; //最小化按钮 | ||
| 279 | + diag.CancelEvent = function(){ //关闭事件 | ||
| 280 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
| 281 | + if('${page.currentPage}' == '0'){ | ||
| 282 | + tosearch(); | ||
| 283 | + }else{ | ||
| 284 | + tosearch(); | ||
| 285 | + } | ||
| 286 | + } | ||
| 287 | + diag.close(); | ||
| 288 | + }; | ||
| 289 | + diag.show(); | ||
| 290 | + } | ||
| 291 | + | ||
| 292 | + //删除 | ||
| 293 | + function del(Id){ | ||
| 294 | + bootbox.confirm("确定要删除吗?", function(result) { | ||
| 295 | + if(result) { | ||
| 296 | + top.jzts(); | ||
| 297 | + var url = "<%=basePath%>homeworkproblem/delete.do?HOMEWORKPROBLEM_ID="+Id+"&tm="+new Date().getTime(); | ||
| 298 | + $.get(url,function(data){ | ||
| 299 | + tosearch(); | ||
| 300 | + }); | ||
| 301 | + } | ||
| 302 | + }); | ||
| 303 | + } | ||
| 304 | + | ||
| 305 | + //修改 | ||
| 306 | + function edit(Id){ | ||
| 307 | + top.jzts(); | ||
| 308 | + var diag = new top.Dialog(); | ||
| 309 | + diag.Drag=true; | ||
| 310 | + diag.Title ="编辑"; | ||
| 311 | + diag.URL = '<%=basePath%>homeworkproblem/goEdit.do?HOMEWORKPROBLEM_ID='+Id; | ||
| 312 | + diag.Width = 450; | ||
| 313 | + diag.Height = 355; | ||
| 314 | + diag.Modal = true; //有无遮罩窗口 | ||
| 315 | + diag. ShowMaxButton = true; //最大化按钮 | ||
| 316 | + diag.ShowMinButton = true; //最小化按钮 | ||
| 317 | + diag.CancelEvent = function(){ //关闭事件 | ||
| 318 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
| 319 | + tosearch(); | ||
| 320 | + } | ||
| 321 | + diag.close(); | ||
| 322 | + }; | ||
| 323 | + diag.show(); | ||
| 324 | + } | ||
| 325 | + | ||
| 326 | + //批量操作 | ||
| 327 | + function makeAll(msg){ | ||
| 328 | + bootbox.confirm(msg, function(result) { | ||
| 329 | + if(result) { | ||
| 330 | + var str = ''; | ||
| 331 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
| 332 | + if(document.getElementsByName('ids')[i].checked){ | ||
| 333 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
| 334 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
| 335 | + } | ||
| 336 | + } | ||
| 337 | + if(str==''){ | ||
| 338 | + bootbox.dialog({ | ||
| 339 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | ||
| 340 | + buttons: | ||
| 341 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | ||
| 342 | + }); | ||
| 343 | + $("#zcheckbox").tips({ | ||
| 344 | + side:1, | ||
| 345 | + msg:'点这里全选', | ||
| 346 | + bg:'#AE81FF', | ||
| 347 | + time:8 | ||
| 348 | + }); | ||
| 349 | + return; | ||
| 350 | + }else{ | ||
| 351 | + if(msg == '确定要删除选中的数据吗?'){ | ||
| 352 | + top.jzts(); | ||
| 353 | + $.ajax({ | ||
| 354 | + type: "POST", | ||
| 355 | + url: '<%=basePath%>homeworkproblem/deleteAll.do?tm='+new Date().getTime(), | ||
| 356 | + data: {DATA_IDS:str}, | ||
| 357 | + dataType:'json', | ||
| 358 | + //beforeSend: validateData, | ||
| 359 | + cache: false, | ||
| 360 | + success: function(data){ | ||
| 361 | + $.each(data.list, function(i, list){ | ||
| 362 | + tosearch(); | ||
| 363 | + }); | ||
| 364 | + } | ||
| 365 | + }); | ||
| 366 | + } | ||
| 367 | + } | ||
| 368 | + } | ||
| 369 | + }); | ||
| 370 | + }; | ||
| 371 | + | ||
| 372 | + //导出excel | ||
| 373 | + function toExcel(){ | ||
| 374 | + window.location.href='<%=basePath%>homeworkproblem/excel.do'; | ||
| 375 | + } | ||
| 376 | + </script> | ||
| 377 | + | ||
| 378 | + | ||
| 379 | +</body> | ||
| 380 | +</html> | ||
| 0 | \ No newline at end of file | 381 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/studenthomework/studenthomework_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="studenthomework/${msg }.do" name="Form" id="Form" method="post"> | ||
| 31 | + <input type="hidden" name="STUDENTHOMEWORK_ID" id="STUDENTHOMEWORK_ID" value="${pd.STUDENTHOMEWORK_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="CODE" id="CODE" value="${pd.CODE}" maxlength="255" placeholder="这里输入学生代码" title="学生代码" style="width:98%;"/></td> | ||
| 37 | + </tr> | ||
| 38 | + <tr> | ||
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">学生ID:</td> | ||
| 40 | + <td><input type="text" name="STUDENT_ID" id="STUDENT_ID" value="${pd.STUDENT_ID}" maxlength="255" placeholder="这里输入学生ID" title="学生ID" style="width:98%;"/></td> | ||
| 41 | + </tr> | ||
| 42 | + <tr> | ||
| 43 | + <td style="width:75px;text-align: right;padding-top: 13px;">学生姓名:</td> | ||
| 44 | + <td><input type="text" name="STUDENT_NAME" id="STUDENT_NAME" value="${pd.STUDENT_NAME}" maxlength="255" placeholder="这里输入学生姓名" title="学生姓名" style="width:98%;"/></td> | ||
| 45 | + </tr> | ||
| 46 | + <tr> | ||
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">作业ID:</td> | ||
| 48 | + <td><input type="text" name="HOMEWORK_ID" id="HOMEWORK_ID" value="${pd.HOMEWORK_ID}" maxlength="255" placeholder="这里输入作业ID" title="作业ID" style="width:98%;"/></td> | ||
| 49 | + </tr> | ||
| 50 | + <tr> | ||
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">作业名称:</td> | ||
| 52 | + <td><input type="text" name="HOMEWORK_NAME" id="HOMEWORK_NAME" value="${pd.HOMEWORK_NAME}" maxlength="255" placeholder="这里输入作业名称" title="作业名称" style="width:98%;"/></td> | ||
| 53 | + </tr> | ||
| 54 | + <tr> | ||
| 55 | + <td style="width:75px;text-align: right;padding-top: 13px;">科目ID:</td> | ||
| 56 | + <td><input type="text" name="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="255" placeholder="这里输入科目ID" title="科目ID" style="width:98%;"/></td> | ||
| 57 | + </tr> | ||
| 58 | + <tr> | ||
| 59 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级ID:</td> | ||
| 60 | + <td><input type="text" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="255" placeholder="这里输入班级ID" title="班级ID" style="width:98%;"/></td> | ||
| 61 | + </tr> | ||
| 62 | + <tr> | ||
| 63 | + <td style="width:75px;text-align: right;padding-top: 13px;">教师ID:</td> | ||
| 64 | + <td><input type="text" name="TEACHER_ID" id="TEACHER_ID" value="${pd.TEACHER_ID}" maxlength="255" placeholder="这里输入教师ID" title="教师ID" 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="TEACHER_NAME" id="TEACHER_NAME" value="${pd.TEACHER_NAME}" 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="number" name="SCORE" id="SCORE" value="${pd.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="text" name="CREATE_DATE" id="CREATE_DATE" value="${pd.CREATE_DATE}" 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($("#CODE").val()==""){ | ||
| 114 | + $("#CODE").tips({ | ||
| 115 | + side:3, | ||
| 116 | + msg:'请输入学生代码', | ||
| 117 | + bg:'#AE81FF', | ||
| 118 | + time:2 | ||
| 119 | + }); | ||
| 120 | + $("#CODE").focus(); | ||
| 121 | + return false; | ||
| 122 | + } | ||
| 123 | + if($("#STUDENT_ID").val()==""){ | ||
| 124 | + $("#STUDENT_ID").tips({ | ||
| 125 | + side:3, | ||
| 126 | + msg:'请输入学生ID', | ||
| 127 | + bg:'#AE81FF', | ||
| 128 | + time:2 | ||
| 129 | + }); | ||
| 130 | + $("#STUDENT_ID").focus(); | ||
| 131 | + return false; | ||
| 132 | + } | ||
| 133 | + if($("#STUDENT_NAME").val()==""){ | ||
| 134 | + $("#STUDENT_NAME").tips({ | ||
| 135 | + side:3, | ||
| 136 | + msg:'请输入学生姓名', | ||
| 137 | + bg:'#AE81FF', | ||
| 138 | + time:2 | ||
| 139 | + }); | ||
| 140 | + $("#STUDENT_NAME").focus(); | ||
| 141 | + return false; | ||
| 142 | + } | ||
| 143 | + if($("#HOMEWORK_ID").val()==""){ | ||
| 144 | + $("#HOMEWORK_ID").tips({ | ||
| 145 | + side:3, | ||
| 146 | + msg:'请输入作业ID', | ||
| 147 | + bg:'#AE81FF', | ||
| 148 | + time:2 | ||
| 149 | + }); | ||
| 150 | + $("#HOMEWORK_ID").focus(); | ||
| 151 | + return false; | ||
| 152 | + } | ||
| 153 | + if($("#HOMEWORK_NAME").val()==""){ | ||
| 154 | + $("#HOMEWORK_NAME").tips({ | ||
| 155 | + side:3, | ||
| 156 | + msg:'请输入作业名称', | ||
| 157 | + bg:'#AE81FF', | ||
| 158 | + time:2 | ||
| 159 | + }); | ||
| 160 | + $("#HOMEWORK_NAME").focus(); | ||
| 161 | + return false; | ||
| 162 | + } | ||
| 163 | + if($("#SUBJECT_ID").val()==""){ | ||
| 164 | + $("#SUBJECT_ID").tips({ | ||
| 165 | + side:3, | ||
| 166 | + msg:'请输入科目ID', | ||
| 167 | + bg:'#AE81FF', | ||
| 168 | + time:2 | ||
| 169 | + }); | ||
| 170 | + $("#SUBJECT_ID").focus(); | ||
| 171 | + return false; | ||
| 172 | + } | ||
| 173 | + if($("#CLASS_ID").val()==""){ | ||
| 174 | + $("#CLASS_ID").tips({ | ||
| 175 | + side:3, | ||
| 176 | + msg:'请输入班级ID', | ||
| 177 | + bg:'#AE81FF', | ||
| 178 | + time:2 | ||
| 179 | + }); | ||
| 180 | + $("#CLASS_ID").focus(); | ||
| 181 | + return false; | ||
| 182 | + } | ||
| 183 | + if($("#TEACHER_ID").val()==""){ | ||
| 184 | + $("#TEACHER_ID").tips({ | ||
| 185 | + side:3, | ||
| 186 | + msg:'请输入教师ID', | ||
| 187 | + bg:'#AE81FF', | ||
| 188 | + time:2 | ||
| 189 | + }); | ||
| 190 | + $("#TEACHER_ID").focus(); | ||
| 191 | + return false; | ||
| 192 | + } | ||
| 193 | + if($("#TEACHER_NAME").val()==""){ | ||
| 194 | + $("#TEACHER_NAME").tips({ | ||
| 195 | + side:3, | ||
| 196 | + msg:'请输入教师姓名', | ||
| 197 | + bg:'#AE81FF', | ||
| 198 | + time:2 | ||
| 199 | + }); | ||
| 200 | + $("#TEACHER_NAME").focus(); | ||
| 201 | + return false; | ||
| 202 | + } | ||
| 203 | + if($("#SCORE").val()==""){ | ||
| 204 | + $("#SCORE").tips({ | ||
| 205 | + side:3, | ||
| 206 | + msg:'请输入得分', | ||
| 207 | + bg:'#AE81FF', | ||
| 208 | + time:2 | ||
| 209 | + }); | ||
| 210 | + $("#SCORE").focus(); | ||
| 211 | + return false; | ||
| 212 | + } | ||
| 213 | + if($("#CREATE_DATE").val()==""){ | ||
| 214 | + $("#CREATE_DATE").tips({ | ||
| 215 | + side:3, | ||
| 216 | + msg:'请输入创建时间', | ||
| 217 | + bg:'#AE81FF', | ||
| 218 | + time:2 | ||
| 219 | + }); | ||
| 220 | + $("#CREATE_DATE").focus(); | ||
| 221 | + return false; | ||
| 222 | + } | ||
| 223 | + $("#Form").submit(); | ||
| 224 | + $("#zhongxin").hide(); | ||
| 225 | + $("#zhongxin2").show(); | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + $(function() { | ||
| 229 | + //日期框 | ||
| 230 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | ||
| 231 | + }); | ||
| 232 | + </script> | ||
| 233 | +</body> | ||
| 234 | +</html> | ||
| 0 | \ No newline at end of file | 235 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/studenthomework/studenthomework_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="studenthomework/list.do" method="post" name="Form" id="Form"> | ||
| 34 | + <table style="margin-top:5px;"> | ||
| 35 | + <tr> | ||
| 36 | + <td> | ||
| 37 | + <div class="nav-search"> | ||
| 38 | + <span class="input-icon"> | ||
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | ||
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | ||
| 41 | + </span> | ||
| 42 | + </div> | ||
| 43 | + </td> | ||
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | ||
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | ||
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | ||
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | ||
| 48 | + <option value=""></option> | ||
| 49 | + <option value="">全部</option> | ||
| 50 | + <option value="">1</option> | ||
| 51 | + <option value="">2</option> | ||
| 52 | + </select> | ||
| 53 | + </td> | ||
| 54 | + <c:if test="${QX.cha == 1 }"> | ||
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | ||
| 56 | + </c:if> | ||
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | ||
| 58 | + </tr> | ||
| 59 | + </table> | ||
| 60 | + <!-- 检索 --> | ||
| 61 | + | ||
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | ||
| 63 | + <thead> | ||
| 64 | + <tr> | ||
| 65 | + <th class="center" style="width:35px;"> | ||
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | ||
| 67 | + </th> | ||
| 68 | + <th class="center" style="width:50px;">序号</th> | ||
| 69 | + <th class="center">学生代码</th> | ||
| 70 | + <th class="center">学生ID</th> | ||
| 71 | + <th class="center">学生姓名</th> | ||
| 72 | + <th class="center">作业ID</th> | ||
| 73 | + <th class="center">作业名称</th> | ||
| 74 | + <th class="center">科目ID</th> | ||
| 75 | + <th class="center">班级ID</th> | ||
| 76 | + <th class="center">教师ID</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.STUDENTHOMEWORK_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.CODE}</td> | ||
| 96 | + <td class='center'>${var.STUDENT_ID}</td> | ||
| 97 | + <td class='center'>${var.STUDENT_NAME}</td> | ||
| 98 | + <td class='center'>${var.HOMEWORK_ID}</td> | ||
| 99 | + <td class='center'>${var.HOMEWORK_NAME}</td> | ||
| 100 | + <td class='center'>${var.SUBJECT_ID}</td> | ||
| 101 | + <td class='center'>${var.CLASS_ID}</td> | ||
| 102 | + <td class='center'>${var.TEACHER_ID}</td> | ||
| 103 | + <td class='center'>${var.TEACHER_NAME}</td> | ||
| 104 | + <td class='center'>${var.SCORE}</td> | ||
| 105 | + <td class='center'>${var.CREATE_DATE}</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.STUDENTHOMEWORK_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.STUDENTHOMEWORK_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.STUDENTHOMEWORK_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.STUDENTHOMEWORK_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%>studenthomework/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%>studenthomework/delete.do?STUDENTHOMEWORK_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%>studenthomework/goEdit.do?STUDENTHOMEWORK_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%>studenthomework/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%>studenthomework/excel.do'; | ||
| 379 | + } | ||
| 380 | + </script> | ||
| 381 | + | ||
| 382 | + | ||
| 383 | +</body> | ||
| 384 | +</html> | ||
| 0 | \ No newline at end of file | 385 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/studenthomeworkinfo/studenthomeworkinfo_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="studenthomeworkinfo/${msg }.do" name="Form" id="Form" method="post"> | ||
| 31 | + <input type="hidden" name="STUDENTHOMEWORKINFO_ID" id="STUDENTHOMEWORKINFO_ID" value="${pd.STUDENTHOMEWORKINFO_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="HOMEWORK_PROBLEM_ID" id="HOMEWORK_PROBLEM_ID" value="${pd.HOMEWORK_PROBLEM_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="RANK" id="RANK" value="${pd.RANK}" 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="CODE" id="CODE" value="${pd.CODE}" maxlength="255" placeholder="这里输入作业编号" title="作业编号" style="width:98%;"/></td> | ||
| 45 | + </tr> | ||
| 46 | + <tr> | ||
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">学生ID:</td> | ||
| 48 | + <td><input type="text" name="STUDENT_ID" id="STUDENT_ID" value="${pd.STUDENT_ID}" maxlength="255" placeholder="这里输入学生ID" title="学生ID" style="width:98%;"/></td> | ||
| 49 | + </tr> | ||
| 50 | + <tr> | ||
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级ID:</td> | ||
| 52 | + <td><input type="text" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}" maxlength="255" placeholder="这里输入班级ID" title="班级ID" 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="ANSWER" id="ANSWER" value="${pd.ANSWER}" 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="number" name="RIGHT" id="RIGHT" value="${pd.RIGHT}" maxlength="32" placeholder="这里输入是否正确" title="是否正确" style="width:98%;"/></td> | ||
| 61 | + </tr> | ||
| 62 | + <tr> | ||
| 63 | + <td style="width:75px;text-align: right;padding-top: 13px;">作业ID:</td> | ||
| 64 | + <td><input type="text" name="HOMEWORK_ID" id="HOMEWORK_ID" value="${pd.HOMEWORK_ID}" maxlength="255" placeholder="这里输入作业ID" title="作业ID" style="width:98%;"/></td> | ||
| 65 | + </tr> | ||
| 66 | + <tr> | ||
| 67 | + <td style="text-align: center;" colspan="10"> | ||
| 68 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | ||
| 69 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | ||
| 70 | + </td> | ||
| 71 | + </tr> | ||
| 72 | + </table> | ||
| 73 | + </div> | ||
| 74 | + <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> | ||
| 75 | + </form> | ||
| 76 | + </div> | ||
| 77 | + <!-- /.col --> | ||
| 78 | + </div> | ||
| 79 | + <!-- /.row --> | ||
| 80 | + </div> | ||
| 81 | + <!-- /.page-content --> | ||
| 82 | + </div> | ||
| 83 | + </div> | ||
| 84 | + <!-- /.main-content --> | ||
| 85 | +</div> | ||
| 86 | +<!-- /.main-container --> | ||
| 87 | + | ||
| 88 | + | ||
| 89 | + <!-- 页面底部js¨ --> | ||
| 90 | + <%@ include file="../../system/index/foot.jsp"%> | ||
| 91 | + <!-- 下拉框 --> | ||
| 92 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
| 93 | + <!-- 日期框 --> | ||
| 94 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
| 95 | + <!--提示框--> | ||
| 96 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
| 97 | + <script type="text/javascript"> | ||
| 98 | + $(top.hangge()); | ||
| 99 | + //保存 | ||
| 100 | + function save(){ | ||
| 101 | + if($("#HOMEWORK_PROBLEM_ID").val()==""){ | ||
| 102 | + $("#HOMEWORK_PROBLEM_ID").tips({ | ||
| 103 | + side:3, | ||
| 104 | + msg:'请输入试题ID', | ||
| 105 | + bg:'#AE81FF', | ||
| 106 | + time:2 | ||
| 107 | + }); | ||
| 108 | + $("#HOMEWORK_PROBLEM_ID").focus(); | ||
| 109 | + return false; | ||
| 110 | + } | ||
| 111 | + if($("#RANK").val()==""){ | ||
| 112 | + $("#RANK").tips({ | ||
| 113 | + side:3, | ||
| 114 | + msg:'请输入排序号', | ||
| 115 | + bg:'#AE81FF', | ||
| 116 | + time:2 | ||
| 117 | + }); | ||
| 118 | + $("#RANK").focus(); | ||
| 119 | + return false; | ||
| 120 | + } | ||
| 121 | + if($("#CODE").val()==""){ | ||
| 122 | + $("#CODE").tips({ | ||
| 123 | + side:3, | ||
| 124 | + msg:'请输入作业编号', | ||
| 125 | + bg:'#AE81FF', | ||
| 126 | + time:2 | ||
| 127 | + }); | ||
| 128 | + $("#CODE").focus(); | ||
| 129 | + return false; | ||
| 130 | + } | ||
| 131 | + if($("#STUDENT_ID").val()==""){ | ||
| 132 | + $("#STUDENT_ID").tips({ | ||
| 133 | + side:3, | ||
| 134 | + msg:'请输入学生ID', | ||
| 135 | + bg:'#AE81FF', | ||
| 136 | + time:2 | ||
| 137 | + }); | ||
| 138 | + $("#STUDENT_ID").focus(); | ||
| 139 | + return false; | ||
| 140 | + } | ||
| 141 | + if($("#CLASS_ID").val()==""){ | ||
| 142 | + $("#CLASS_ID").tips({ | ||
| 143 | + side:3, | ||
| 144 | + msg:'请输入班级ID', | ||
| 145 | + bg:'#AE81FF', | ||
| 146 | + time:2 | ||
| 147 | + }); | ||
| 148 | + $("#CLASS_ID").focus(); | ||
| 149 | + return false; | ||
| 150 | + } | ||
| 151 | + if($("#ANSWER").val()==""){ | ||
| 152 | + $("#ANSWER").tips({ | ||
| 153 | + side:3, | ||
| 154 | + msg:'请输入答案', | ||
| 155 | + bg:'#AE81FF', | ||
| 156 | + time:2 | ||
| 157 | + }); | ||
| 158 | + $("#ANSWER").focus(); | ||
| 159 | + return false; | ||
| 160 | + } | ||
| 161 | + if($("#RIGHT").val()==""){ | ||
| 162 | + $("#RIGHT").tips({ | ||
| 163 | + side:3, | ||
| 164 | + msg:'请输入是否正确', | ||
| 165 | + bg:'#AE81FF', | ||
| 166 | + time:2 | ||
| 167 | + }); | ||
| 168 | + $("#RIGHT").focus(); | ||
| 169 | + return false; | ||
| 170 | + } | ||
| 171 | + if($("#HOMEWORK_ID").val()==""){ | ||
| 172 | + $("#HOMEWORK_ID").tips({ | ||
| 173 | + side:3, | ||
| 174 | + msg:'请输入作业ID', | ||
| 175 | + bg:'#AE81FF', | ||
| 176 | + time:2 | ||
| 177 | + }); | ||
| 178 | + $("#HOMEWORK_ID").focus(); | ||
| 179 | + return false; | ||
| 180 | + } | ||
| 181 | + $("#Form").submit(); | ||
| 182 | + $("#zhongxin").hide(); | ||
| 183 | + $("#zhongxin2").show(); | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + $(function() { | ||
| 187 | + //日期框 | ||
| 188 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | ||
| 189 | + }); | ||
| 190 | + </script> | ||
| 191 | +</body> | ||
| 192 | +</html> | ||
| 0 | \ No newline at end of file | 193 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/studenthomeworkinfo/studenthomeworkinfo_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="studenthomeworkinfo/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">学生ID</th> | ||
| 73 | + <th class="center">班级ID</th> | ||
| 74 | + <th class="center">答案</th> | ||
| 75 | + <th class="center">是否正确</th> | ||
| 76 | + <th class="center">作业ID</th> | ||
| 77 | + <th class="center">操作</th> | ||
| 78 | + </tr> | ||
| 79 | + </thead> | ||
| 80 | + | ||
| 81 | + <tbody> | ||
| 82 | + <!-- 开始循环 --> | ||
| 83 | + <c:choose> | ||
| 84 | + <c:when test="${not empty varList}"> | ||
| 85 | + <c:if test="${QX.cha == 1 }"> | ||
| 86 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
| 87 | + <tr> | ||
| 88 | + <td class='center'> | ||
| 89 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.STUDENTHOMEWORKINFO_ID}" class="ace" /><span class="lbl"></span></label> | ||
| 90 | + </td> | ||
| 91 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | ||
| 92 | + <td class='center'>${var.HOMEWORK_PROBLEM_ID}</td> | ||
| 93 | + <td class='center'>${var.RANK}</td> | ||
| 94 | + <td class='center'>${var.CODE}</td> | ||
| 95 | + <td class='center'>${var.STUDENT_ID}</td> | ||
| 96 | + <td class='center'>${var.CLASS_ID}</td> | ||
| 97 | + <td class='center'>${var.ANSWER}</td> | ||
| 98 | + <td class='center'>${var.RIGHT}</td> | ||
| 99 | + <td class='center'>${var.HOMEWORK_ID}</td> | ||
| 100 | + <td class="center"> | ||
| 101 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | ||
| 102 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | ||
| 103 | + </c:if> | ||
| 104 | + <div class="hidden-sm hidden-xs btn-group"> | ||
| 105 | + <c:if test="${QX.edit == 1 }"> | ||
| 106 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.STUDENTHOMEWORKINFO_ID}');"> | ||
| 107 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | ||
| 108 | + </a> | ||
| 109 | + </c:if> | ||
| 110 | + <c:if test="${QX.del == 1 }"> | ||
| 111 | + <a class="btn btn-xs btn-danger" onclick="del('${var.STUDENTHOMEWORKINFO_ID}');"> | ||
| 112 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | ||
| 113 | + </a> | ||
| 114 | + </c:if> | ||
| 115 | + </div> | ||
| 116 | + <div class="hidden-md hidden-lg"> | ||
| 117 | + <div class="inline pos-rel"> | ||
| 118 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | ||
| 119 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | ||
| 120 | + </button> | ||
| 121 | + | ||
| 122 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | ||
| 123 | + <c:if test="${QX.edit == 1 }"> | ||
| 124 | + <li> | ||
| 125 | + <a style="cursor:pointer;" onclick="edit('${var.STUDENTHOMEWORKINFO_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | ||
| 126 | + <span class="green"> | ||
| 127 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | ||
| 128 | + </span> | ||
| 129 | + </a> | ||
| 130 | + </li> | ||
| 131 | + </c:if> | ||
| 132 | + <c:if test="${QX.del == 1 }"> | ||
| 133 | + <li> | ||
| 134 | + <a style="cursor:pointer;" onclick="del('${var.STUDENTHOMEWORKINFO_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | ||
| 135 | + <span class="red"> | ||
| 136 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | ||
| 137 | + </span> | ||
| 138 | + </a> | ||
| 139 | + </li> | ||
| 140 | + </c:if> | ||
| 141 | + </ul> | ||
| 142 | + </div> | ||
| 143 | + </div> | ||
| 144 | + </td> | ||
| 145 | + </tr> | ||
| 146 | + | ||
| 147 | + </c:forEach> | ||
| 148 | + </c:if> | ||
| 149 | + <c:if test="${QX.cha == 0 }"> | ||
| 150 | + <tr> | ||
| 151 | + <td colspan="100" class="center">您无权查看</td> | ||
| 152 | + </tr> | ||
| 153 | + </c:if> | ||
| 154 | + </c:when> | ||
| 155 | + <c:otherwise> | ||
| 156 | + <tr class="main_info"> | ||
| 157 | + <td colspan="100" class="center" >没有相关数据</td> | ||
| 158 | + </tr> | ||
| 159 | + </c:otherwise> | ||
| 160 | + </c:choose> | ||
| 161 | + </tbody> | ||
| 162 | + </table> | ||
| 163 | + <div class="page-header position-relative"> | ||
| 164 | + <table style="width:100%;"> | ||
| 165 | + <tr> | ||
| 166 | + <td style="vertical-align:top;"> | ||
| 167 | + <c:if test="${QX.add == 1 }"> | ||
| 168 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | ||
| 169 | + </c:if> | ||
| 170 | + <c:if test="${QX.del == 1 }"> | ||
| 171 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | ||
| 172 | + </c:if> | ||
| 173 | + </td> | ||
| 174 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | ||
| 175 | + </tr> | ||
| 176 | + </table> | ||
| 177 | + </div> | ||
| 178 | + </form> | ||
| 179 | + | ||
| 180 | + </div> | ||
| 181 | + <!-- /.col --> | ||
| 182 | + </div> | ||
| 183 | + <!-- /.row --> | ||
| 184 | + </div> | ||
| 185 | + <!-- /.page-content --> | ||
| 186 | + </div> | ||
| 187 | + </div> | ||
| 188 | + <!-- /.main-content --> | ||
| 189 | + | ||
| 190 | + <!-- 返回顶部 --> | ||
| 191 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | ||
| 192 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | ||
| 193 | + </a> | ||
| 194 | + | ||
| 195 | + </div> | ||
| 196 | + <!-- /.main-container --> | ||
| 197 | + | ||
| 198 | + <!-- basic scripts --> | ||
| 199 | + <!-- 页面底部js¨ --> | ||
| 200 | + <%@ include file="../../system/index/foot.jsp"%> | ||
| 201 | + <!-- 删除时确认窗口 --> | ||
| 202 | + <script src="static/ace/js/bootbox.js"></script> | ||
| 203 | + <!-- ace scripts --> | ||
| 204 | + <script src="static/ace/js/ace/ace.js"></script> | ||
| 205 | + <!-- 下拉框 --> | ||
| 206 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
| 207 | + <!-- 日期框 --> | ||
| 208 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
| 209 | + <!--提示框--> | ||
| 210 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
| 211 | + <script type="text/javascript"> | ||
| 212 | + $(top.hangge());//关闭加载状态 | ||
| 213 | + //检索 | ||
| 214 | + function tosearch(){ | ||
| 215 | + top.jzts(); | ||
| 216 | + $("#Form").submit(); | ||
| 217 | + } | ||
| 218 | + $(function() { | ||
| 219 | + | ||
| 220 | + //日期框 | ||
| 221 | + $('.date-picker').datepicker({ | ||
| 222 | + autoclose: true, | ||
| 223 | + todayHighlight: true | ||
| 224 | + }); | ||
| 225 | + | ||
| 226 | + //下拉框 | ||
| 227 | + if(!ace.vars['touch']) { | ||
| 228 | + $('.chosen-select').chosen({allow_single_deselect:true}); | ||
| 229 | + $(window) | ||
| 230 | + .off('resize.chosen') | ||
| 231 | + .on('resize.chosen', function() { | ||
| 232 | + $('.chosen-select').each(function() { | ||
| 233 | + var $this = $(this); | ||
| 234 | + $this.next().css({'width': $this.parent().width()}); | ||
| 235 | + }); | ||
| 236 | + }).trigger('resize.chosen'); | ||
| 237 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | ||
| 238 | + if(event_name != 'sidebar_collapsed') return; | ||
| 239 | + $('.chosen-select').each(function() { | ||
| 240 | + var $this = $(this); | ||
| 241 | + $this.next().css({'width': $this.parent().width()}); | ||
| 242 | + }); | ||
| 243 | + }); | ||
| 244 | + $('#chosen-multiple-style .btn').on('click', function(e){ | ||
| 245 | + var target = $(this).find('input[type=radio]'); | ||
| 246 | + var which = parseInt(target.val()); | ||
| 247 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | ||
| 248 | + else $('#form-field-select-4').removeClass('tag-input-style'); | ||
| 249 | + }); | ||
| 250 | + } | ||
| 251 | + | ||
| 252 | + | ||
| 253 | + //复选框全选控制 | ||
| 254 | + var active_class = 'active'; | ||
| 255 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | ||
| 256 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
| 257 | + $(this).closest('table').find('tbody > tr').each(function(){ | ||
| 258 | + var row = this; | ||
| 259 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
| 260 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
| 261 | + }); | ||
| 262 | + }); | ||
| 263 | + }); | ||
| 264 | + | ||
| 265 | + //新增 | ||
| 266 | + function add(){ | ||
| 267 | + top.jzts(); | ||
| 268 | + var diag = new top.Dialog(); | ||
| 269 | + diag.Drag=true; | ||
| 270 | + diag.Title ="新增"; | ||
| 271 | + diag.URL = '<%=basePath%>studenthomeworkinfo/goAdd.do'; | ||
| 272 | + diag.Width = 450; | ||
| 273 | + diag.Height = 355; | ||
| 274 | + diag.Modal = true; //有无遮罩窗口 | ||
| 275 | + diag. ShowMaxButton = true; //最大化按钮 | ||
| 276 | + diag.ShowMinButton = true; //最小化按钮 | ||
| 277 | + diag.CancelEvent = function(){ //关闭事件 | ||
| 278 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
| 279 | + if('${page.currentPage}' == '0'){ | ||
| 280 | + tosearch(); | ||
| 281 | + }else{ | ||
| 282 | + tosearch(); | ||
| 283 | + } | ||
| 284 | + } | ||
| 285 | + diag.close(); | ||
| 286 | + }; | ||
| 287 | + diag.show(); | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + //删除 | ||
| 291 | + function del(Id){ | ||
| 292 | + bootbox.confirm("确定要删除吗?", function(result) { | ||
| 293 | + if(result) { | ||
| 294 | + top.jzts(); | ||
| 295 | + var url = "<%=basePath%>studenthomeworkinfo/delete.do?STUDENTHOMEWORKINFO_ID="+Id+"&tm="+new Date().getTime(); | ||
| 296 | + $.get(url,function(data){ | ||
| 297 | + tosearch(); | ||
| 298 | + }); | ||
| 299 | + } | ||
| 300 | + }); | ||
| 301 | + } | ||
| 302 | + | ||
| 303 | + //修改 | ||
| 304 | + function edit(Id){ | ||
| 305 | + top.jzts(); | ||
| 306 | + var diag = new top.Dialog(); | ||
| 307 | + diag.Drag=true; | ||
| 308 | + diag.Title ="编辑"; | ||
| 309 | + diag.URL = '<%=basePath%>studenthomeworkinfo/goEdit.do?STUDENTHOMEWORKINFO_ID='+Id; | ||
| 310 | + diag.Width = 450; | ||
| 311 | + diag.Height = 355; | ||
| 312 | + diag.Modal = true; //有无遮罩窗口 | ||
| 313 | + diag. ShowMaxButton = true; //最大化按钮 | ||
| 314 | + diag.ShowMinButton = true; //最小化按钮 | ||
| 315 | + diag.CancelEvent = function(){ //关闭事件 | ||
| 316 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
| 317 | + tosearch(); | ||
| 318 | + } | ||
| 319 | + diag.close(); | ||
| 320 | + }; | ||
| 321 | + diag.show(); | ||
| 322 | + } | ||
| 323 | + | ||
| 324 | + //批量操作 | ||
| 325 | + function makeAll(msg){ | ||
| 326 | + bootbox.confirm(msg, function(result) { | ||
| 327 | + if(result) { | ||
| 328 | + var str = ''; | ||
| 329 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
| 330 | + if(document.getElementsByName('ids')[i].checked){ | ||
| 331 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
| 332 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
| 333 | + } | ||
| 334 | + } | ||
| 335 | + if(str==''){ | ||
| 336 | + bootbox.dialog({ | ||
| 337 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | ||
| 338 | + buttons: | ||
| 339 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | ||
| 340 | + }); | ||
| 341 | + $("#zcheckbox").tips({ | ||
| 342 | + side:1, | ||
| 343 | + msg:'点这里全选', | ||
| 344 | + bg:'#AE81FF', | ||
| 345 | + time:8 | ||
| 346 | + }); | ||
| 347 | + return; | ||
| 348 | + }else{ | ||
| 349 | + if(msg == '确定要删除选中的数据吗?'){ | ||
| 350 | + top.jzts(); | ||
| 351 | + $.ajax({ | ||
| 352 | + type: "POST", | ||
| 353 | + url: '<%=basePath%>studenthomeworkinfo/deleteAll.do?tm='+new Date().getTime(), | ||
| 354 | + data: {DATA_IDS:str}, | ||
| 355 | + dataType:'json', | ||
| 356 | + //beforeSend: validateData, | ||
| 357 | + cache: false, | ||
| 358 | + success: function(data){ | ||
| 359 | + $.each(data.list, function(i, list){ | ||
| 360 | + tosearch(); | ||
| 361 | + }); | ||
| 362 | + } | ||
| 363 | + }); | ||
| 364 | + } | ||
| 365 | + } | ||
| 366 | + } | ||
| 367 | + }); | ||
| 368 | + }; | ||
| 369 | + | ||
| 370 | + //导出excel | ||
| 371 | + function toExcel(){ | ||
| 372 | + window.location.href='<%=basePath%>studenthomeworkinfo/excel.do'; | ||
| 373 | + } | ||
| 374 | + </script> | ||
| 375 | + | ||
| 376 | + | ||
| 377 | +</body> | ||
| 378 | +</html> | ||
| 0 | \ No newline at end of file | 379 | \ No newline at end of file |
resources/dbconfig.properties
| 1 | #数据源 1 | 1 | #数据源 1 |
| 2 | -url:jdbc:mysql://47.107.98.47:3306/education?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | 2 | +url:jdbc:mysql://47.107.98.47:3306/education2?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 3 | #url:jdbc:mysql://120.78.57.84:3306/education3?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | 3 | #url:jdbc:mysql://120.78.57.84:3306/education3?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 4 | #url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | 4 | #url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 5 | driverClassName:com.mysql.jdbc.Driver | 5 | driverClassName:com.mysql.jdbc.Driver |
resources/mybatis1/sunvote/HeadmasterMapper.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="HeadmasterMapper"> | ||
| 4 | + | ||
| 5 | + <!--表名 --> | ||
| 6 | + <sql id="tableName"> | ||
| 7 | + SV_HEADMASTER | ||
| 8 | + </sql> | ||
| 9 | + | ||
| 10 | + <!-- 字段 --> | ||
| 11 | + <sql id="Field"> | ||
| 12 | + NAME, | ||
| 13 | + USERNAME, | ||
| 14 | + PASSWORD, | ||
| 15 | + SCHOOL_ID, | ||
| 16 | + PERMISSION, | ||
| 17 | + PHONE, | ||
| 18 | + HEADMASTER_ID | ||
| 19 | + </sql> | ||
| 20 | + | ||
| 21 | + <!-- 字段值 --> | ||
| 22 | + <sql id="FieldValue"> | ||
| 23 | + #{NAME}, | ||
| 24 | + #{USERNAME}, | ||
| 25 | + #{PASSWORD}, | ||
| 26 | + #{SCHOOL_ID}, | ||
| 27 | + #{PERMISSION}, | ||
| 28 | + #{PHONE}, | ||
| 29 | + #{HEADMASTER_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 | + HEADMASTER_ID = #{HEADMASTER_ID} | ||
| 49 | + </delete> | ||
| 50 | + | ||
| 51 | + <!-- 修改 --> | ||
| 52 | + <update id="edit" parameterType="pd"> | ||
| 53 | + update | ||
| 54 | + <include refid="tableName"></include> | ||
| 55 | + set | ||
| 56 | + NAME = #{NAME}, | ||
| 57 | + USERNAME = #{USERNAME}, | ||
| 58 | + PASSWORD = #{PASSWORD}, | ||
| 59 | + SCHOOL_ID = #{SCHOOL_ID}, | ||
| 60 | + PERMISSION = #{PERMISSION}, | ||
| 61 | + PHONE = #{PHONE}, | ||
| 62 | + HEADMASTER_ID = HEADMASTER_ID | ||
| 63 | + where | ||
| 64 | + HEADMASTER_ID = #{HEADMASTER_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 | + HEADMASTER_ID = #{HEADMASTER_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 | + HEADMASTER_ID in | ||
| 110 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
| 111 | + #{item} | ||
| 112 | + </foreach> | ||
| 113 | + </delete> | ||
| 114 | + | ||
| 115 | + <!-- fh313596790qq(青苔) --> | ||
| 116 | +</mapper> | ||
| 0 | \ No newline at end of file | 117 | \ No newline at end of file |
resources/mybatis1/sunvote/HomeworkMapper.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="HomeworkMapper"> | ||
| 4 | + | ||
| 5 | + <!--表名 --> | ||
| 6 | + <sql id="tableName"> | ||
| 7 | + SV_HOMEWORK | ||
| 8 | + </sql> | ||
| 9 | + | ||
| 10 | + <!-- 字段 --> | ||
| 11 | + <sql id="Field"> | ||
| 12 | + CODE, | ||
| 13 | + NAME, | ||
| 14 | + SUBJECT_ID, | ||
| 15 | + CLASS_ID, | ||
| 16 | + GRADE_ID, | ||
| 17 | + SCHOOL_ID, | ||
| 18 | + COMPLETE_DATE, | ||
| 19 | + CREATE_DATE, | ||
| 20 | + MODIFY_DATE, | ||
| 21 | + COMPLETE_COUNT, | ||
| 22 | + ALL_SCORE, | ||
| 23 | + HOMEWORK_ID | ||
| 24 | + </sql> | ||
| 25 | + | ||
| 26 | + <!-- 字段值 --> | ||
| 27 | + <sql id="FieldValue"> | ||
| 28 | + #{CODE}, | ||
| 29 | + #{NAME}, | ||
| 30 | + #{SUBJECT_ID}, | ||
| 31 | + #{CLASS_ID}, | ||
| 32 | + #{GRADE_ID}, | ||
| 33 | + #{SCHOOL_ID}, | ||
| 34 | + #{COMPLETE_DATE}, | ||
| 35 | + #{CREATE_DATE}, | ||
| 36 | + #{MODIFY_DATE}, | ||
| 37 | + #{COMPLETE_COUNT}, | ||
| 38 | + #{ALL_SCORE}, | ||
| 39 | + #{HOMEWORK_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 | + HOMEWORK_ID = #{HOMEWORK_ID} | ||
| 59 | + </delete> | ||
| 60 | + | ||
| 61 | + <!-- 修改 --> | ||
| 62 | + <update id="edit" parameterType="pd"> | ||
| 63 | + update | ||
| 64 | + <include refid="tableName"></include> | ||
| 65 | + set | ||
| 66 | + CODE = #{CODE}, | ||
| 67 | + NAME = #{NAME}, | ||
| 68 | + SUBJECT_ID = #{SUBJECT_ID}, | ||
| 69 | + CLASS_ID = #{CLASS_ID}, | ||
| 70 | + GRADE_ID = #{GRADE_ID}, | ||
| 71 | + SCHOOL_ID = #{SCHOOL_ID}, | ||
| 72 | + COMPLETE_DATE = #{COMPLETE_DATE}, | ||
| 73 | + CREATE_DATE = #{CREATE_DATE}, | ||
| 74 | + MODIFY_DATE = #{MODIFY_DATE}, | ||
| 75 | + COMPLETE_COUNT = #{COMPLETE_COUNT}, | ||
| 76 | + ALL_SCORE = #{ALL_SCORE}, | ||
| 77 | + HOMEWORK_ID = HOMEWORK_ID | ||
| 78 | + where | ||
| 79 | + HOMEWORK_ID = #{HOMEWORK_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 | + HOMEWORK_ID = #{HOMEWORK_ID} | ||
| 90 | + </select> | ||
| 91 | + | ||
| 92 | + <!-- 列表 --> | ||
| 93 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
| 94 | + select | ||
| 95 | + <include refid="Field"></include> | ||
| 96 | + from | ||
| 97 | + <include refid="tableName"></include> | ||
| 98 | + where 1=1 | ||
| 99 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
| 100 | + and | ||
| 101 | + ( | ||
| 102 | + <!-- 根据需求自己加检索条件 | ||
| 103 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
| 104 | + or | ||
| 105 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
| 106 | + --> | ||
| 107 | + ) | ||
| 108 | + </if> | ||
| 109 | + </select> | ||
| 110 | + | ||
| 111 | + <!-- 列表(全部) --> | ||
| 112 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
| 113 | + select | ||
| 114 | + <include refid="Field"></include> | ||
| 115 | + from | ||
| 116 | + <include refid="tableName"></include> | ||
| 117 | + </select> | ||
| 118 | + | ||
| 119 | + <!-- 批量删除 --> | ||
| 120 | + <delete id="deleteAll" parameterType="String"> | ||
| 121 | + delete from | ||
| 122 | + <include refid="tableName"></include> | ||
| 123 | + where | ||
| 124 | + HOMEWORK_ID in | ||
| 125 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
| 126 | + #{item} | ||
| 127 | + </foreach> | ||
| 128 | + </delete> | ||
| 129 | + | ||
| 130 | + <!-- fh313596790qq(青苔) --> | ||
| 131 | +</mapper> | ||
| 0 | \ No newline at end of file | 132 | \ No newline at end of file |
resources/mybatis1/sunvote/HomeworkProblemMapper.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="HomeworkProblemMapper"> | ||
| 4 | + | ||
| 5 | + <!--表名 --> | ||
| 6 | + <sql id="tableName"> | ||
| 7 | + SV_HOMEWORKPROBLEM | ||
| 8 | + </sql> | ||
| 9 | + | ||
| 10 | + <!-- 字段 --> | ||
| 11 | + <sql id="Field"> | ||
| 12 | + CODE, | ||
| 13 | + RANK, | ||
| 14 | + P_HOMEWORK_PROBLEM_ID, | ||
| 15 | + NAME, | ||
| 16 | + TYPE, | ||
| 17 | + OPTION_NUM, | ||
| 18 | + RIGHT_ANSWER, | ||
| 19 | + SCORE, | ||
| 20 | + PART_SCORE, | ||
| 21 | + HOMEWORKPROBLEM_ID | ||
| 22 | + </sql> | ||
| 23 | + | ||
| 24 | + <!-- 字段值 --> | ||
| 25 | + <sql id="FieldValue"> | ||
| 26 | + #{CODE}, | ||
| 27 | + #{RANK}, | ||
| 28 | + #{P_HOMEWORK_PROBLEM_ID}, | ||
| 29 | + #{NAME}, | ||
| 30 | + #{TYPE}, | ||
| 31 | + #{OPTION_NUM}, | ||
| 32 | + #{RIGHT_ANSWER}, | ||
| 33 | + #{SCORE}, | ||
| 34 | + #{PART_SCORE}, | ||
| 35 | + #{HOMEWORKPROBLEM_ID} | ||
| 36 | + </sql> | ||
| 37 | + | ||
| 38 | + <!-- 新增--> | ||
| 39 | + <insert id="save" parameterType="pd"> | ||
| 40 | + insert into | ||
| 41 | + <include refid="tableName"></include> | ||
| 42 | + ( | ||
| 43 | + <include refid="Field"></include> | ||
| 44 | + ) values ( | ||
| 45 | + <include refid="FieldValue"></include> | ||
| 46 | + ) | ||
| 47 | + </insert> | ||
| 48 | + | ||
| 49 | + <!-- 删除--> | ||
| 50 | + <delete id="delete" parameterType="pd"> | ||
| 51 | + delete from | ||
| 52 | + <include refid="tableName"></include> | ||
| 53 | + where | ||
| 54 | + HOMEWORKPROBLEM_ID = #{HOMEWORKPROBLEM_ID} | ||
| 55 | + </delete> | ||
| 56 | + | ||
| 57 | + <!-- 修改 --> | ||
| 58 | + <update id="edit" parameterType="pd"> | ||
| 59 | + update | ||
| 60 | + <include refid="tableName"></include> | ||
| 61 | + set | ||
| 62 | + CODE = #{CODE}, | ||
| 63 | + RANK = #{RANK}, | ||
| 64 | + P_HOMEWORK_PROBLEM_ID = #{P_HOMEWORK_PROBLEM_ID}, | ||
| 65 | + NAME = #{NAME}, | ||
| 66 | + TYPE = #{TYPE}, | ||
| 67 | + OPTION_NUM = #{OPTION_NUM}, | ||
| 68 | + RIGHT_ANSWER = #{RIGHT_ANSWER}, | ||
| 69 | + SCORE = #{SCORE}, | ||
| 70 | + PART_SCORE = #{PART_SCORE}, | ||
| 71 | + HOMEWORKPROBLEM_ID = HOMEWORKPROBLEM_ID | ||
| 72 | + where | ||
| 73 | + HOMEWORKPROBLEM_ID = #{HOMEWORKPROBLEM_ID} | ||
| 74 | + </update> | ||
| 75 | + | ||
| 76 | + <!-- 通过ID获取数据 --> | ||
| 77 | + <select id="findById" parameterType="pd" resultType="pd"> | ||
| 78 | + select | ||
| 79 | + <include refid="Field"></include> | ||
| 80 | + from | ||
| 81 | + <include refid="tableName"></include> | ||
| 82 | + where | ||
| 83 | + HOMEWORKPROBLEM_ID = #{HOMEWORKPROBLEM_ID} | ||
| 84 | + </select> | ||
| 85 | + | ||
| 86 | + <!-- 列表 --> | ||
| 87 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
| 88 | + select | ||
| 89 | + <include refid="Field"></include> | ||
| 90 | + from | ||
| 91 | + <include refid="tableName"></include> | ||
| 92 | + where 1=1 | ||
| 93 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
| 94 | + and | ||
| 95 | + ( | ||
| 96 | + <!-- 根据需求自己加检索条件 | ||
| 97 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
| 98 | + or | ||
| 99 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
| 100 | + --> | ||
| 101 | + ) | ||
| 102 | + </if> | ||
| 103 | + </select> | ||
| 104 | + | ||
| 105 | + <!-- 列表(全部) --> | ||
| 106 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
| 107 | + select | ||
| 108 | + <include refid="Field"></include> | ||
| 109 | + from | ||
| 110 | + <include refid="tableName"></include> | ||
| 111 | + </select> | ||
| 112 | + | ||
| 113 | + <!-- 批量删除 --> | ||
| 114 | + <delete id="deleteAll" parameterType="String"> | ||
| 115 | + delete from | ||
| 116 | + <include refid="tableName"></include> | ||
| 117 | + where | ||
| 118 | + HOMEWORKPROBLEM_ID in | ||
| 119 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
| 120 | + #{item} | ||
| 121 | + </foreach> | ||
| 122 | + </delete> | ||
| 123 | + | ||
| 124 | + <!-- fh313596790qq(青苔) --> | ||
| 125 | +</mapper> | ||
| 0 | \ No newline at end of file | 126 | \ No newline at end of file |
resources/mybatis1/sunvote/StudentHomeworkInfoMapper.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="StudentHomeworkInfoMapper"> | ||
| 4 | + | ||
| 5 | + <!--表名 --> | ||
| 6 | + <sql id="tableName"> | ||
| 7 | + SV_STUDENTHOMEWORKINFO | ||
| 8 | + </sql> | ||
| 9 | + | ||
| 10 | + <!-- 字段 --> | ||
| 11 | + <sql id="Field"> | ||
| 12 | + HOMEWORK_PROBLEM_ID, | ||
| 13 | + RANK, | ||
| 14 | + CODE, | ||
| 15 | + STUDENT_ID, | ||
| 16 | + CLASS_ID, | ||
| 17 | + ANSWER, | ||
| 18 | + RIGHT, | ||
| 19 | + HOMEWORK_ID, | ||
| 20 | + STUDENTHOMEWORKINFO_ID | ||
| 21 | + </sql> | ||
| 22 | + | ||
| 23 | + <!-- 字段值 --> | ||
| 24 | + <sql id="FieldValue"> | ||
| 25 | + #{HOMEWORK_PROBLEM_ID}, | ||
| 26 | + #{RANK}, | ||
| 27 | + #{CODE}, | ||
| 28 | + #{STUDENT_ID}, | ||
| 29 | + #{CLASS_ID}, | ||
| 30 | + #{ANSWER}, | ||
| 31 | + #{RIGHT}, | ||
| 32 | + #{HOMEWORK_ID}, | ||
| 33 | + #{STUDENTHOMEWORKINFO_ID} | ||
| 34 | + </sql> | ||
| 35 | + | ||
| 36 | + <!-- 新增--> | ||
| 37 | + <insert id="save" parameterType="pd"> | ||
| 38 | + insert into | ||
| 39 | + <include refid="tableName"></include> | ||
| 40 | + ( | ||
| 41 | + <include refid="Field"></include> | ||
| 42 | + ) values ( | ||
| 43 | + <include refid="FieldValue"></include> | ||
| 44 | + ) | ||
| 45 | + </insert> | ||
| 46 | + | ||
| 47 | + <!-- 删除--> | ||
| 48 | + <delete id="delete" parameterType="pd"> | ||
| 49 | + delete from | ||
| 50 | + <include refid="tableName"></include> | ||
| 51 | + where | ||
| 52 | + STUDENTHOMEWORKINFO_ID = #{STUDENTHOMEWORKINFO_ID} | ||
| 53 | + </delete> | ||
| 54 | + | ||
| 55 | + <!-- 修改 --> | ||
| 56 | + <update id="edit" parameterType="pd"> | ||
| 57 | + update | ||
| 58 | + <include refid="tableName"></include> | ||
| 59 | + set | ||
| 60 | + HOMEWORK_PROBLEM_ID = #{HOMEWORK_PROBLEM_ID}, | ||
| 61 | + RANK = #{RANK}, | ||
| 62 | + CODE = #{CODE}, | ||
| 63 | + STUDENT_ID = #{STUDENT_ID}, | ||
| 64 | + CLASS_ID = #{CLASS_ID}, | ||
| 65 | + ANSWER = #{ANSWER}, | ||
| 66 | + RIGHT = #{RIGHT}, | ||
| 67 | + HOMEWORK_ID = #{HOMEWORK_ID}, | ||
| 68 | + STUDENTHOMEWORKINFO_ID = STUDENTHOMEWORKINFO_ID | ||
| 69 | + where | ||
| 70 | + STUDENTHOMEWORKINFO_ID = #{STUDENTHOMEWORKINFO_ID} | ||
| 71 | + </update> | ||
| 72 | + | ||
| 73 | + <!-- 通过ID获取数据 --> | ||
| 74 | + <select id="findById" parameterType="pd" resultType="pd"> | ||
| 75 | + select | ||
| 76 | + <include refid="Field"></include> | ||
| 77 | + from | ||
| 78 | + <include refid="tableName"></include> | ||
| 79 | + where | ||
| 80 | + STUDENTHOMEWORKINFO_ID = #{STUDENTHOMEWORKINFO_ID} | ||
| 81 | + </select> | ||
| 82 | + | ||
| 83 | + <!-- 列表 --> | ||
| 84 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
| 85 | + select | ||
| 86 | + <include refid="Field"></include> | ||
| 87 | + from | ||
| 88 | + <include refid="tableName"></include> | ||
| 89 | + where 1=1 | ||
| 90 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
| 91 | + and | ||
| 92 | + ( | ||
| 93 | + <!-- 根据需求自己加检索条件 | ||
| 94 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
| 95 | + or | ||
| 96 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
| 97 | + --> | ||
| 98 | + ) | ||
| 99 | + </if> | ||
| 100 | + </select> | ||
| 101 | + | ||
| 102 | + <!-- 列表(全部) --> | ||
| 103 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
| 104 | + select | ||
| 105 | + <include refid="Field"></include> | ||
| 106 | + from | ||
| 107 | + <include refid="tableName"></include> | ||
| 108 | + </select> | ||
| 109 | + | ||
| 110 | + <!-- 批量删除 --> | ||
| 111 | + <delete id="deleteAll" parameterType="String"> | ||
| 112 | + delete from | ||
| 113 | + <include refid="tableName"></include> | ||
| 114 | + where | ||
| 115 | + STUDENTHOMEWORKINFO_ID in | ||
| 116 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
| 117 | + #{item} | ||
| 118 | + </foreach> | ||
| 119 | + </delete> | ||
| 120 | + | ||
| 121 | + <!-- fh313596790qq(青苔) --> | ||
| 122 | +</mapper> | ||
| 0 | \ No newline at end of file | 123 | \ No newline at end of file |
resources/mybatis1/sunvote/StudentHomeworkMapper.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="StudentHomeworkMapper"> | ||
| 4 | + | ||
| 5 | + <!--表名 --> | ||
| 6 | + <sql id="tableName"> | ||
| 7 | + SV_STUDENTHOMEWORK | ||
| 8 | + </sql> | ||
| 9 | + | ||
| 10 | + <!-- 字段 --> | ||
| 11 | + <sql id="Field"> | ||
| 12 | + CODE, | ||
| 13 | + STUDENT_ID, | ||
| 14 | + STUDENT_NAME, | ||
| 15 | + HOMEWORK_ID, | ||
| 16 | + HOMEWORK_NAME, | ||
| 17 | + SUBJECT_ID, | ||
| 18 | + CLASS_ID, | ||
| 19 | + TEACHER_ID, | ||
| 20 | + TEACHER_NAME, | ||
| 21 | + SCORE, | ||
| 22 | + CREATE_DATE, | ||
| 23 | + STUDENTHOMEWORK_ID | ||
| 24 | + </sql> | ||
| 25 | + | ||
| 26 | + <!-- 字段值 --> | ||
| 27 | + <sql id="FieldValue"> | ||
| 28 | + #{CODE}, | ||
| 29 | + #{STUDENT_ID}, | ||
| 30 | + #{STUDENT_NAME}, | ||
| 31 | + #{HOMEWORK_ID}, | ||
| 32 | + #{HOMEWORK_NAME}, | ||
| 33 | + #{SUBJECT_ID}, | ||
| 34 | + #{CLASS_ID}, | ||
| 35 | + #{TEACHER_ID}, | ||
| 36 | + #{TEACHER_NAME}, | ||
| 37 | + #{SCORE}, | ||
| 38 | + #{CREATE_DATE}, | ||
| 39 | + #{STUDENTHOMEWORK_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 | + STUDENTHOMEWORK_ID = #{STUDENTHOMEWORK_ID} | ||
| 59 | + </delete> | ||
| 60 | + | ||
| 61 | + <!-- 修改 --> | ||
| 62 | + <update id="edit" parameterType="pd"> | ||
| 63 | + update | ||
| 64 | + <include refid="tableName"></include> | ||
| 65 | + set | ||
| 66 | + CODE = #{CODE}, | ||
| 67 | + STUDENT_ID = #{STUDENT_ID}, | ||
| 68 | + STUDENT_NAME = #{STUDENT_NAME}, | ||
| 69 | + HOMEWORK_ID = #{HOMEWORK_ID}, | ||
| 70 | + HOMEWORK_NAME = #{HOMEWORK_NAME}, | ||
| 71 | + SUBJECT_ID = #{SUBJECT_ID}, | ||
| 72 | + CLASS_ID = #{CLASS_ID}, | ||
| 73 | + TEACHER_ID = #{TEACHER_ID}, | ||
| 74 | + TEACHER_NAME = #{TEACHER_NAME}, | ||
| 75 | + SCORE = #{SCORE}, | ||
| 76 | + CREATE_DATE = #{CREATE_DATE}, | ||
| 77 | + STUDENTHOMEWORK_ID = STUDENTHOMEWORK_ID | ||
| 78 | + where | ||
| 79 | + STUDENTHOMEWORK_ID = #{STUDENTHOMEWORK_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 | + STUDENTHOMEWORK_ID = #{STUDENTHOMEWORK_ID} | ||
| 90 | + </select> | ||
| 91 | + | ||
| 92 | + <!-- 列表 --> | ||
| 93 | + <select id="datalistPage" parameterType="page" resultType="pd"> | ||
| 94 | + select | ||
| 95 | + <include refid="Field"></include> | ||
| 96 | + from | ||
| 97 | + <include refid="tableName"></include> | ||
| 98 | + where 1=1 | ||
| 99 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
| 100 | + and | ||
| 101 | + ( | ||
| 102 | + <!-- 根据需求自己加检索条件 | ||
| 103 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
| 104 | + or | ||
| 105 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
| 106 | + --> | ||
| 107 | + ) | ||
| 108 | + </if> | ||
| 109 | + </select> | ||
| 110 | + | ||
| 111 | + <!-- 列表(全部) --> | ||
| 112 | + <select id="listAll" parameterType="pd" resultType="pd"> | ||
| 113 | + select | ||
| 114 | + <include refid="Field"></include> | ||
| 115 | + from | ||
| 116 | + <include refid="tableName"></include> | ||
| 117 | + </select> | ||
| 118 | + | ||
| 119 | + <!-- 批量删除 --> | ||
| 120 | + <delete id="deleteAll" parameterType="String"> | ||
| 121 | + delete from | ||
| 122 | + <include refid="tableName"></include> | ||
| 123 | + where | ||
| 124 | + STUDENTHOMEWORK_ID in | ||
| 125 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||
| 126 | + #{item} | ||
| 127 | + </foreach> | ||
| 128 | + </delete> | ||
| 129 | + | ||
| 130 | + <!-- fh313596790qq(青苔) --> | ||
| 131 | +</mapper> | ||
| 0 | \ No newline at end of file | 132 | \ No newline at end of file |
src/com/fh/controller/sunvote/headmaster/HeadmasterController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.headmaster; | ||
| 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.headmaster.HeadmasterManager; | ||
| 27 | + | ||
| 28 | +/** | ||
| 29 | + * 说明:班主任 | ||
| 30 | + * 创建人:FH Q313596790 | ||
| 31 | + * 创建时间:2019-03-08 | ||
| 32 | + */ | ||
| 33 | +@Controller | ||
| 34 | +@RequestMapping(value="/headmaster") | ||
| 35 | +public class HeadmasterController extends BaseController { | ||
| 36 | + | ||
| 37 | + String menuUrl = "headmaster/list.do"; //菜单地址(权限用) | ||
| 38 | + @Resource(name="headmasterService") | ||
| 39 | + private HeadmasterManager headmasterService; | ||
| 40 | + | ||
| 41 | + /**保存 | ||
| 42 | + * @param | ||
| 43 | + * @throws Exception | ||
| 44 | + */ | ||
| 45 | + @RequestMapping(value="/save") | ||
| 46 | + public ModelAndView save() throws Exception{ | ||
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增Headmaster"); | ||
| 48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
| 49 | + ModelAndView mv = this.getModelAndView(); | ||
| 50 | + PageData pd = new PageData(); | ||
| 51 | + pd = this.getPageData(); | ||
| 52 | + pd.put("HEADMASTER_ID", this.get32UUID()); //主键 | ||
| 53 | + headmasterService.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()+"删除Headmaster"); | ||
| 66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
| 67 | + PageData pd = new PageData(); | ||
| 68 | + pd = this.getPageData(); | ||
| 69 | + headmasterService.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()+"修改Headmaster"); | ||
| 81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
| 82 | + ModelAndView mv = this.getModelAndView(); | ||
| 83 | + PageData pd = new PageData(); | ||
| 84 | + pd = this.getPageData(); | ||
| 85 | + headmasterService.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()+"列表Headmaster"); | ||
| 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 = headmasterService.list(page); //列出Headmaster列表 | ||
| 108 | + mv.setViewName("sunvote/headmaster/headmaster_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/headmaster/headmaster_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 = headmasterService.findById(pd); //根据ID读取 | ||
| 140 | + mv.setViewName("sunvote/headmaster/headmaster_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()+"批量删除Headmaster"); | ||
| 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 | + headmasterService.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()+"导出Headmaster到excel"); | ||
| 179 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
| 180 | + ModelAndView mv = new ModelAndView(); | ||
| 181 | + PageData pd = new PageData(); | ||
| 182 | + pd = this.getPageData(); | ||
| 183 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
| 184 | + List<String> titles = new ArrayList<String>(); | ||
| 185 | + titles.add("姓名"); //1 | ||
| 186 | + titles.add("用户名"); //2 | ||
| 187 | + titles.add("密码"); //3 | ||
| 188 | + titles.add("所在学校"); //4 | ||
| 189 | + titles.add("权限"); //5 | ||
| 190 | + titles.add("联系电话"); //6 | ||
| 191 | + dataMap.put("titles", titles); | ||
| 192 | + List<PageData> varOList = headmasterService.listAll(pd); | ||
| 193 | + List<PageData> varList = new ArrayList<PageData>(); | ||
| 194 | + for(int i=0;i<varOList.size();i++){ | ||
| 195 | + PageData vpd = new PageData(); | ||
| 196 | + vpd.put("var1", varOList.get(i).getString("NAME")); //1 | ||
| 197 | + vpd.put("var2", varOList.get(i).getString("USERNAME")); //2 | ||
| 198 | + vpd.put("var3", varOList.get(i).getString("PASSWORD")); //3 | ||
| 199 | + vpd.put("var4", varOList.get(i).getString("SCHOOL_ID")); //4 | ||
| 200 | + vpd.put("var5", varOList.get(i).getString("PERMISSION")); //5 | ||
| 201 | + vpd.put("var6", varOList.get(i).getString("PHONE")); //6 | ||
| 202 | + varList.add(vpd); | ||
| 203 | + } | ||
| 204 | + dataMap.put("varList", varList); | ||
| 205 | + ObjectExcelView erv = new ObjectExcelView(); | ||
| 206 | + mv = new ModelAndView(erv,dataMap); | ||
| 207 | + return mv; | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + @InitBinder | ||
| 211 | + public void initBinder(WebDataBinder binder){ | ||
| 212 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 213 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
| 214 | + } | ||
| 215 | +} |
src/com/fh/controller/sunvote/homework/HomeworkController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.homework; | ||
| 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.homework.HomeworkManager; | ||
| 27 | + | ||
| 28 | +/** | ||
| 29 | + * 说明:作业 | ||
| 30 | + * 创建人:FH Q313596790 | ||
| 31 | + * 创建时间:2019-03-07 | ||
| 32 | + */ | ||
| 33 | +@Controller | ||
| 34 | +@RequestMapping(value="/homework") | ||
| 35 | +public class HomeworkController extends BaseController { | ||
| 36 | + | ||
| 37 | + String menuUrl = "homework/list.do"; //菜单地址(权限用) | ||
| 38 | + @Resource(name="homeworkService") | ||
| 39 | + private HomeworkManager homeworkService; | ||
| 40 | + | ||
| 41 | + /**保存 | ||
| 42 | + * @param | ||
| 43 | + * @throws Exception | ||
| 44 | + */ | ||
| 45 | + @RequestMapping(value="/save") | ||
| 46 | + public ModelAndView save() throws Exception{ | ||
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增Homework"); | ||
| 48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
| 49 | + ModelAndView mv = this.getModelAndView(); | ||
| 50 | + PageData pd = new PageData(); | ||
| 51 | + pd = this.getPageData(); | ||
| 52 | + pd.put("HOMEWORK_ID", this.get32UUID()); //主键 | ||
| 53 | + homeworkService.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()+"删除Homework"); | ||
| 66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
| 67 | + PageData pd = new PageData(); | ||
| 68 | + pd = this.getPageData(); | ||
| 69 | + homeworkService.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()+"修改Homework"); | ||
| 81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
| 82 | + ModelAndView mv = this.getModelAndView(); | ||
| 83 | + PageData pd = new PageData(); | ||
| 84 | + pd = this.getPageData(); | ||
| 85 | + homeworkService.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()+"列表Homework"); | ||
| 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 = homeworkService.list(page); //列出Homework列表 | ||
| 108 | + mv.setViewName("sunvote/homework/homework_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/homework/homework_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 = homeworkService.findById(pd); //根据ID读取 | ||
| 140 | + mv.setViewName("sunvote/homework/homework_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()+"批量删除Homework"); | ||
| 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 | + homeworkService.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()+"导出Homework到excel"); | ||
| 179 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
| 180 | + ModelAndView mv = new ModelAndView(); | ||
| 181 | + PageData pd = new PageData(); | ||
| 182 | + pd = this.getPageData(); | ||
| 183 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
| 184 | + List<String> titles = new ArrayList<String>(); | ||
| 185 | + titles.add("作业代码"); //1 | ||
| 186 | + titles.add("作业名称"); //2 | ||
| 187 | + titles.add("科目ID"); //3 | ||
| 188 | + titles.add("班级ID"); //4 | ||
| 189 | + titles.add("年级ID"); //5 | ||
| 190 | + titles.add("学校ID"); //6 | ||
| 191 | + titles.add("需要完成时间"); //7 | ||
| 192 | + titles.add("创建时间"); //8 | ||
| 193 | + titles.add("修改时间"); //9 | ||
| 194 | + titles.add("完成次数"); //10 | ||
| 195 | + titles.add("总分"); //11 | ||
| 196 | + dataMap.put("titles", titles); | ||
| 197 | + List<PageData> varOList = homeworkService.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("CODE")); //1 | ||
| 202 | + vpd.put("var2", varOList.get(i).getString("NAME")); //2 | ||
| 203 | + vpd.put("var3", varOList.get(i).getString("SUBJECT_ID")); //3 | ||
| 204 | + vpd.put("var4", varOList.get(i).getString("CLASS_ID")); //4 | ||
| 205 | + vpd.put("var5", varOList.get(i).getString("GRADE_ID")); //5 | ||
| 206 | + vpd.put("var6", varOList.get(i).getString("SCHOOL_ID")); //6 | ||
| 207 | + vpd.put("var7", varOList.get(i).getString("COMPLETE_DATE")); //7 | ||
| 208 | + vpd.put("var8", varOList.get(i).getString("CREATE_DATE")); //8 | ||
| 209 | + vpd.put("var9", varOList.get(i).getString("MODIFY_DATE")); //9 | ||
| 210 | + vpd.put("var10", varOList.get(i).get("COMPLETE_COUNT").toString()); //10 | ||
| 211 | + vpd.put("var11", varOList.get(i).get("ALL_SCORE").toString()); //11 | ||
| 212 | + varList.add(vpd); | ||
| 213 | + } | ||
| 214 | + dataMap.put("varList", varList); | ||
| 215 | + ObjectExcelView erv = new ObjectExcelView(); | ||
| 216 | + mv = new ModelAndView(erv,dataMap); | ||
| 217 | + return mv; | ||
| 218 | + } | ||
| 219 | + | ||
| 220 | + @InitBinder | ||
| 221 | + public void initBinder(WebDataBinder binder){ | ||
| 222 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 223 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
| 224 | + } | ||
| 225 | +} |
src/com/fh/controller/sunvote/homeworkproblem/HomeworkProblemController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.homeworkproblem; | ||
| 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.service.sunvote.homeworkproblem.HomeworkProblemManager; | ||
| 25 | +import com.fh.util.AppUtil; | ||
| 26 | +import com.fh.util.Jurisdiction; | ||
| 27 | +import com.fh.util.ObjectExcelView; | ||
| 28 | +import com.fh.util.PageData; | ||
| 29 | + | ||
| 30 | +/** | ||
| 31 | + * 说明:作业题目表 | ||
| 32 | + * 创建人:FH Q313596790 | ||
| 33 | + * 创建时间:2019-03-07 | ||
| 34 | + */ | ||
| 35 | +@Controller | ||
| 36 | +@RequestMapping(value="/homeworkproblem") | ||
| 37 | +public class HomeworkProblemController extends BaseController { | ||
| 38 | + | ||
| 39 | + String menuUrl = "homeworkproblem/list.do"; //菜单地址(权限用) | ||
| 40 | + @Resource(name="homeworkproblemService") | ||
| 41 | + private HomeworkProblemManager homeworkproblemService; | ||
| 42 | + | ||
| 43 | + /**保存 | ||
| 44 | + * @param | ||
| 45 | + * @throws Exception | ||
| 46 | + */ | ||
| 47 | + @RequestMapping(value="/save") | ||
| 48 | + public ModelAndView save() throws Exception{ | ||
| 49 | + logBefore(logger, Jurisdiction.getUsername()+"新增HomeworkProblem"); | ||
| 50 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
| 51 | + ModelAndView mv = this.getModelAndView(); | ||
| 52 | + PageData pd = new PageData(); | ||
| 53 | + pd = this.getPageData(); | ||
| 54 | + pd.put("HOMEWORKPROBLEM_ID", this.get32UUID()); //主键 | ||
| 55 | + homeworkproblemService.save(pd); | ||
| 56 | + mv.addObject("msg","success"); | ||
| 57 | + mv.setViewName("save_result"); | ||
| 58 | + return mv; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + /**删除 | ||
| 62 | + * @param out | ||
| 63 | + * @throws Exception | ||
| 64 | + */ | ||
| 65 | + @RequestMapping(value="/delete") | ||
| 66 | + public void delete(PrintWriter out) throws Exception{ | ||
| 67 | + logBefore(logger, Jurisdiction.getUsername()+"删除HomeworkProblem"); | ||
| 68 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
| 69 | + PageData pd = new PageData(); | ||
| 70 | + pd = this.getPageData(); | ||
| 71 | + homeworkproblemService.delete(pd); | ||
| 72 | + out.write("success"); | ||
| 73 | + out.close(); | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + /**修改 | ||
| 77 | + * @param | ||
| 78 | + * @throws Exception | ||
| 79 | + */ | ||
| 80 | + @RequestMapping(value="/edit") | ||
| 81 | + public ModelAndView edit() throws Exception{ | ||
| 82 | + logBefore(logger, Jurisdiction.getUsername()+"修改HomeworkProblem"); | ||
| 83 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
| 84 | + ModelAndView mv = this.getModelAndView(); | ||
| 85 | + PageData pd = new PageData(); | ||
| 86 | + pd = this.getPageData(); | ||
| 87 | + homeworkproblemService.edit(pd); | ||
| 88 | + mv.addObject("msg","success"); | ||
| 89 | + mv.setViewName("save_result"); | ||
| 90 | + return mv; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + /**列表 | ||
| 94 | + * @param page | ||
| 95 | + * @throws Exception | ||
| 96 | + */ | ||
| 97 | + @RequestMapping(value="/list") | ||
| 98 | + public ModelAndView list(Page page) throws Exception{ | ||
| 99 | + logBefore(logger, Jurisdiction.getUsername()+"列表HomeworkProblem"); | ||
| 100 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
| 101 | + ModelAndView mv = this.getModelAndView(); | ||
| 102 | + PageData pd = new PageData(); | ||
| 103 | + pd = this.getPageData(); | ||
| 104 | + String keywords = pd.getString("keywords"); //关键词检索条件 | ||
| 105 | + if(null != keywords && !"".equals(keywords)){ | ||
| 106 | + pd.put("keywords", keywords.trim()); | ||
| 107 | + } | ||
| 108 | + page.setPd(pd); | ||
| 109 | + List<PageData> varList = homeworkproblemService.list(page); //列出HomeworkProblem列表 | ||
| 110 | + mv.setViewName("sunvote/homeworkproblem/homeworkproblem_list"); | ||
| 111 | + mv.addObject("varList", varList); | ||
| 112 | + mv.addObject("pd", pd); | ||
| 113 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | ||
| 114 | + return mv; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + /**去新增页面 | ||
| 118 | + * @param | ||
| 119 | + * @throws Exception | ||
| 120 | + */ | ||
| 121 | + @RequestMapping(value="/goAdd") | ||
| 122 | + public ModelAndView goAdd()throws Exception{ | ||
| 123 | + ModelAndView mv = this.getModelAndView(); | ||
| 124 | + PageData pd = new PageData(); | ||
| 125 | + pd = this.getPageData(); | ||
| 126 | + mv.setViewName("sunvote/homeworkproblem/homeworkproblem_edit"); | ||
| 127 | + mv.addObject("msg", "save"); | ||
| 128 | + mv.addObject("pd", pd); | ||
| 129 | + return mv; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + /**去修改页面 | ||
| 133 | + * @param | ||
| 134 | + * @throws Exception | ||
| 135 | + */ | ||
| 136 | + @RequestMapping(value="/goEdit") | ||
| 137 | + public ModelAndView goEdit()throws Exception{ | ||
| 138 | + ModelAndView mv = this.getModelAndView(); | ||
| 139 | + PageData pd = new PageData(); | ||
| 140 | + pd = this.getPageData(); | ||
| 141 | + pd = homeworkproblemService.findById(pd); //根据ID读取 | ||
| 142 | + mv.setViewName("sunvote/homeworkproblem/homeworkproblem_edit"); | ||
| 143 | + mv.addObject("msg", "edit"); | ||
| 144 | + mv.addObject("pd", pd); | ||
| 145 | + return mv; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + /**批量删除 | ||
| 149 | + * @param | ||
| 150 | + * @throws Exception | ||
| 151 | + */ | ||
| 152 | + @RequestMapping(value="/deleteAll") | ||
| 153 | + @ResponseBody | ||
| 154 | + public Object deleteAll() throws Exception{ | ||
| 155 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除HomeworkProblem"); | ||
| 156 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
| 157 | + PageData pd = new PageData(); | ||
| 158 | + Map<String,Object> map = new HashMap<String,Object>(); | ||
| 159 | + pd = this.getPageData(); | ||
| 160 | + List<PageData> pdList = new ArrayList<PageData>(); | ||
| 161 | + String DATA_IDS = pd.getString("DATA_IDS"); | ||
| 162 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | ||
| 163 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | ||
| 164 | + homeworkproblemService.deleteAll(ArrayDATA_IDS); | ||
| 165 | + pd.put("msg", "ok"); | ||
| 166 | + }else{ | ||
| 167 | + pd.put("msg", "no"); | ||
| 168 | + } | ||
| 169 | + pdList.add(pd); | ||
| 170 | + map.put("list", pdList); | ||
| 171 | + return AppUtil.returnObject(pd, map); | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + /**导出到excel | ||
| 175 | + * @param | ||
| 176 | + * @throws Exception | ||
| 177 | + */ | ||
| 178 | + @RequestMapping(value="/excel") | ||
| 179 | + public ModelAndView exportExcel() throws Exception{ | ||
| 180 | + logBefore(logger, Jurisdiction.getUsername()+"导出HomeworkProblem到excel"); | ||
| 181 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
| 182 | + ModelAndView mv = new ModelAndView(); | ||
| 183 | + PageData pd = new PageData(); | ||
| 184 | + pd = this.getPageData(); | ||
| 185 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
| 186 | + List<String> titles = new ArrayList<String>(); | ||
| 187 | + titles.add("作业编号"); //1 | ||
| 188 | + titles.add("排序号"); //2 | ||
| 189 | + titles.add("父题ID"); //3 | ||
| 190 | + titles.add("题目名称"); //4 | ||
| 191 | + titles.add("题目类型"); //5 | ||
| 192 | + titles.add("答案个数"); //6 | ||
| 193 | + titles.add("标准答案"); //7 | ||
| 194 | + titles.add("分数"); //8 | ||
| 195 | + titles.add("部分分"); //9 | ||
| 196 | + dataMap.put("titles", titles); | ||
| 197 | + List<PageData> varOList = homeworkproblemService.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("CODE")); //1 | ||
| 202 | + vpd.put("var2", varOList.get(i).get("RANK").toString()); //2 | ||
| 203 | + vpd.put("var3", varOList.get(i).getString("P_HOMEWORK_PROBLEM_ID")); //3 | ||
| 204 | + vpd.put("var4", varOList.get(i).getString("NAME")); //4 | ||
| 205 | + vpd.put("var5", varOList.get(i).get("TYPE").toString()); //5 | ||
| 206 | + vpd.put("var6", varOList.get(i).get("OPTION_NUM").toString()); //6 | ||
| 207 | + vpd.put("var7", varOList.get(i).getString("RIGHT_ANSWER")); //7 | ||
| 208 | + vpd.put("var8", varOList.get(i).get("SCORE").toString()); //8 | ||
| 209 | + vpd.put("var9", varOList.get(i).get("PART_SCORE").toString()); //9 | ||
| 210 | + varList.add(vpd); | ||
| 211 | + } | ||
| 212 | + dataMap.put("varList", varList); | ||
| 213 | + ObjectExcelView erv = new ObjectExcelView(); | ||
| 214 | + mv = new ModelAndView(erv,dataMap); | ||
| 215 | + return mv; | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + @InitBinder | ||
| 219 | + public void initBinder(WebDataBinder binder){ | ||
| 220 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 221 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
| 222 | + } | ||
| 223 | +} |
src/com/fh/controller/sunvote/studenthomework/StudentHomeworkController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.studenthomework; | ||
| 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.studenthomework.StudentHomeworkManager; | ||
| 27 | + | ||
| 28 | +/** | ||
| 29 | + * 说明:学生作业 | ||
| 30 | + * 创建人:FH Q313596790 | ||
| 31 | + * 创建时间:2019-03-08 | ||
| 32 | + */ | ||
| 33 | +@Controller | ||
| 34 | +@RequestMapping(value="/studenthomework") | ||
| 35 | +public class StudentHomeworkController extends BaseController { | ||
| 36 | + | ||
| 37 | + String menuUrl = "studenthomework/list.do"; //菜单地址(权限用) | ||
| 38 | + @Resource(name="studenthomeworkService") | ||
| 39 | + private StudentHomeworkManager studenthomeworkService; | ||
| 40 | + | ||
| 41 | + /**保存 | ||
| 42 | + * @param | ||
| 43 | + * @throws Exception | ||
| 44 | + */ | ||
| 45 | + @RequestMapping(value="/save") | ||
| 46 | + public ModelAndView save() throws Exception{ | ||
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增StudentHomework"); | ||
| 48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
| 49 | + ModelAndView mv = this.getModelAndView(); | ||
| 50 | + PageData pd = new PageData(); | ||
| 51 | + pd = this.getPageData(); | ||
| 52 | + pd.put("STUDENTHOMEWORK_ID", this.get32UUID()); //主键 | ||
| 53 | + studenthomeworkService.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()+"删除StudentHomework"); | ||
| 66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
| 67 | + PageData pd = new PageData(); | ||
| 68 | + pd = this.getPageData(); | ||
| 69 | + studenthomeworkService.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()+"修改StudentHomework"); | ||
| 81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
| 82 | + ModelAndView mv = this.getModelAndView(); | ||
| 83 | + PageData pd = new PageData(); | ||
| 84 | + pd = this.getPageData(); | ||
| 85 | + studenthomeworkService.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()+"列表StudentHomework"); | ||
| 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 = studenthomeworkService.list(page); //列出StudentHomework列表 | ||
| 108 | + mv.setViewName("sunvote/studenthomework/studenthomework_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/studenthomework/studenthomework_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 = studenthomeworkService.findById(pd); //根据ID读取 | ||
| 140 | + mv.setViewName("sunvote/studenthomework/studenthomework_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()+"批量删除StudentHomework"); | ||
| 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 | + studenthomeworkService.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()+"导出StudentHomework到excel"); | ||
| 179 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
| 180 | + ModelAndView mv = new ModelAndView(); | ||
| 181 | + PageData pd = new PageData(); | ||
| 182 | + pd = this.getPageData(); | ||
| 183 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | ||
| 184 | + List<String> titles = new ArrayList<String>(); | ||
| 185 | + titles.add("学生代码"); //1 | ||
| 186 | + titles.add("学生ID"); //2 | ||
| 187 | + titles.add("学生姓名"); //3 | ||
| 188 | + titles.add("作业ID"); //4 | ||
| 189 | + titles.add("作业名称"); //5 | ||
| 190 | + titles.add("科目ID"); //6 | ||
| 191 | + titles.add("班级ID"); //7 | ||
| 192 | + titles.add("教师ID"); //8 | ||
| 193 | + titles.add("教师姓名"); //9 | ||
| 194 | + titles.add("得分"); //10 | ||
| 195 | + titles.add("创建时间"); //11 | ||
| 196 | + dataMap.put("titles", titles); | ||
| 197 | + List<PageData> varOList = studenthomeworkService.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("CODE")); //1 | ||
| 202 | + vpd.put("var2", varOList.get(i).getString("STUDENT_ID")); //2 | ||
| 203 | + vpd.put("var3", varOList.get(i).getString("STUDENT_NAME")); //3 | ||
| 204 | + vpd.put("var4", varOList.get(i).getString("HOMEWORK_ID")); //4 | ||
| 205 | + vpd.put("var5", varOList.get(i).getString("HOMEWORK_NAME")); //5 | ||
| 206 | + vpd.put("var6", varOList.get(i).getString("SUBJECT_ID")); //6 | ||
| 207 | + vpd.put("var7", varOList.get(i).getString("CLASS_ID")); //7 | ||
| 208 | + vpd.put("var8", varOList.get(i).getString("TEACHER_ID")); //8 | ||
| 209 | + vpd.put("var9", varOList.get(i).getString("TEACHER_NAME")); //9 | ||
| 210 | + vpd.put("var10", varOList.get(i).get("SCORE").toString()); //10 | ||
| 211 | + vpd.put("var11", varOList.get(i).getString("CREATE_DATE")); //11 | ||
| 212 | + varList.add(vpd); | ||
| 213 | + } | ||
| 214 | + dataMap.put("varList", varList); | ||
| 215 | + ObjectExcelView erv = new ObjectExcelView(); | ||
| 216 | + mv = new ModelAndView(erv,dataMap); | ||
| 217 | + return mv; | ||
| 218 | + } | ||
| 219 | + | ||
| 220 | + @InitBinder | ||
| 221 | + public void initBinder(WebDataBinder binder){ | ||
| 222 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 223 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
| 224 | + } | ||
| 225 | +} |
src/com/fh/controller/sunvote/studenthomeworkinfo/StudentHomeworkInfoController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.studenthomeworkinfo; | ||
| 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.studenthomeworkinfo.StudentHomeworkInfoManager; | ||
| 27 | + | ||
| 28 | +/** | ||
| 29 | + * 说明:学生作业详细 | ||
| 30 | + * 创建人:FH Q313596790 | ||
| 31 | + * 创建时间:2019-03-08 | ||
| 32 | + */ | ||
| 33 | +@Controller | ||
| 34 | +@RequestMapping(value="/studenthomeworkinfo") | ||
| 35 | +public class StudentHomeworkInfoController extends BaseController { | ||
| 36 | + | ||
| 37 | + String menuUrl = "studenthomeworkinfo/list.do"; //菜单地址(权限用) | ||
| 38 | + @Resource(name="studenthomeworkinfoService") | ||
| 39 | + private StudentHomeworkInfoManager studenthomeworkinfoService; | ||
| 40 | + | ||
| 41 | + /**保存 | ||
| 42 | + * @param | ||
| 43 | + * @throws Exception | ||
| 44 | + */ | ||
| 45 | + @RequestMapping(value="/save") | ||
| 46 | + public ModelAndView save() throws Exception{ | ||
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增StudentHomeworkInfo"); | ||
| 48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
| 49 | + ModelAndView mv = this.getModelAndView(); | ||
| 50 | + PageData pd = new PageData(); | ||
| 51 | + pd = this.getPageData(); | ||
| 52 | + pd.put("STUDENTHOMEWORKINFO_ID", this.get32UUID()); //主键 | ||
| 53 | + studenthomeworkinfoService.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()+"删除StudentHomeworkInfo"); | ||
| 66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
| 67 | + PageData pd = new PageData(); | ||
| 68 | + pd = this.getPageData(); | ||
| 69 | + studenthomeworkinfoService.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()+"修改StudentHomeworkInfo"); | ||
| 81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
| 82 | + ModelAndView mv = this.getModelAndView(); | ||
| 83 | + PageData pd = new PageData(); | ||
| 84 | + pd = this.getPageData(); | ||
| 85 | + studenthomeworkinfoService.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()+"列表StudentHomeworkInfo"); | ||
| 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 = studenthomeworkinfoService.list(page); //列出StudentHomeworkInfo列表 | ||
| 108 | + mv.setViewName("sunvote/studenthomeworkinfo/studenthomeworkinfo_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/studenthomeworkinfo/studenthomeworkinfo_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 = studenthomeworkinfoService.findById(pd); //根据ID读取 | ||
| 140 | + mv.setViewName("sunvote/studenthomeworkinfo/studenthomeworkinfo_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()+"批量删除StudentHomeworkInfo"); | ||
| 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 | + studenthomeworkinfoService.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()+"导出StudentHomeworkInfo到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("学生ID"); //4 | ||
| 189 | + titles.add("班级ID"); //5 | ||
| 190 | + titles.add("答案"); //6 | ||
| 191 | + titles.add("是否正确"); //7 | ||
| 192 | + titles.add("作业ID"); //8 | ||
| 193 | + dataMap.put("titles", titles); | ||
| 194 | + List<PageData> varOList = studenthomeworkinfoService.listAll(pd); | ||
| 195 | + List<PageData> varList = new ArrayList<PageData>(); | ||
| 196 | + for(int i=0;i<varOList.size();i++){ | ||
| 197 | + PageData vpd = new PageData(); | ||
| 198 | + vpd.put("var1", varOList.get(i).getString("HOMEWORK_PROBLEM_ID")); //1 | ||
| 199 | + vpd.put("var2", varOList.get(i).getString("RANK")); //2 | ||
| 200 | + vpd.put("var3", varOList.get(i).getString("CODE")); //3 | ||
| 201 | + vpd.put("var4", varOList.get(i).getString("STUDENT_ID")); //4 | ||
| 202 | + vpd.put("var5", varOList.get(i).getString("CLASS_ID")); //5 | ||
| 203 | + vpd.put("var6", varOList.get(i).getString("ANSWER")); //6 | ||
| 204 | + vpd.put("var7", varOList.get(i).get("RIGHT").toString()); //7 | ||
| 205 | + vpd.put("var8", varOList.get(i).getString("HOMEWORK_ID")); //8 | ||
| 206 | + varList.add(vpd); | ||
| 207 | + } | ||
| 208 | + dataMap.put("varList", varList); | ||
| 209 | + ObjectExcelView erv = new ObjectExcelView(); | ||
| 210 | + mv = new ModelAndView(erv,dataMap); | ||
| 211 | + return mv; | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + @InitBinder | ||
| 215 | + public void initBinder(WebDataBinder binder){ | ||
| 216 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 217 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | ||
| 218 | + } | ||
| 219 | +} |
src/com/fh/service/sunvote/headmaster/HeadmasterManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.headmaster; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.fh.entity.Page; | ||
| 5 | +import com.fh.util.PageData; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 说明: 班主任接口 | ||
| 9 | + * 创建人:FH Q313596790 | ||
| 10 | + * 创建时间:2019-03-08 | ||
| 11 | + * @version | ||
| 12 | + */ | ||
| 13 | +public interface HeadmasterManager{ | ||
| 14 | + | ||
| 15 | + /**新增 | ||
| 16 | + * @param pd | ||
| 17 | + * @throws Exception | ||
| 18 | + */ | ||
| 19 | + public void save(PageData pd)throws Exception; | ||
| 20 | + | ||
| 21 | + /**删除 | ||
| 22 | + * @param pd | ||
| 23 | + * @throws Exception | ||
| 24 | + */ | ||
| 25 | + public void delete(PageData pd)throws Exception; | ||
| 26 | + | ||
| 27 | + /**修改 | ||
| 28 | + * @param pd | ||
| 29 | + * @throws Exception | ||
| 30 | + */ | ||
| 31 | + public void edit(PageData pd)throws Exception; | ||
| 32 | + | ||
| 33 | + /**列表 | ||
| 34 | + * @param page | ||
| 35 | + * @throws Exception | ||
| 36 | + */ | ||
| 37 | + public List<PageData> list(Page page)throws Exception; | ||
| 38 | + | ||
| 39 | + /**列表(全部) | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public List<PageData> listAll(PageData pd)throws Exception; | ||
| 44 | + | ||
| 45 | + /**通过id获取数据 | ||
| 46 | + * @param pd | ||
| 47 | + * @throws Exception | ||
| 48 | + */ | ||
| 49 | + public PageData findById(PageData pd)throws Exception; | ||
| 50 | + | ||
| 51 | + /**批量删除 | ||
| 52 | + * @param ArrayDATA_IDS | ||
| 53 | + * @throws Exception | ||
| 54 | + */ | ||
| 55 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | ||
| 56 | + | ||
| 57 | +} | ||
| 58 | + |
src/com/fh/service/sunvote/headmaster/impl/HeadmasterService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.headmaster.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.headmaster.HeadmasterManager; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 说明: 班主任 | ||
| 13 | + * 创建人:FH Q313596790 | ||
| 14 | + * 创建时间:2019-03-08 | ||
| 15 | + * @version | ||
| 16 | + */ | ||
| 17 | +@Service("headmasterService") | ||
| 18 | +public class HeadmasterService implements HeadmasterManager{ | ||
| 19 | + | ||
| 20 | + @Resource(name = "daoSupport") | ||
| 21 | + private DaoSupport dao; | ||
| 22 | + | ||
| 23 | + /**新增 | ||
| 24 | + * @param pd | ||
| 25 | + * @throws Exception | ||
| 26 | + */ | ||
| 27 | + public void save(PageData pd)throws Exception{ | ||
| 28 | + dao.save("HeadmasterMapper.save", pd); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /**删除 | ||
| 32 | + * @param pd | ||
| 33 | + * @throws Exception | ||
| 34 | + */ | ||
| 35 | + public void delete(PageData pd)throws Exception{ | ||
| 36 | + dao.delete("HeadmasterMapper.delete", pd); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /**修改 | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public void edit(PageData pd)throws Exception{ | ||
| 44 | + dao.update("HeadmasterMapper.edit", pd); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + /**列表 | ||
| 48 | + * @param page | ||
| 49 | + * @throws Exception | ||
| 50 | + */ | ||
| 51 | + @SuppressWarnings("unchecked") | ||
| 52 | + public List<PageData> list(Page page)throws Exception{ | ||
| 53 | + return (List<PageData>)dao.findForList("HeadmasterMapper.datalistPage", page); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /**列表(全部) | ||
| 57 | + * @param pd | ||
| 58 | + * @throws Exception | ||
| 59 | + */ | ||
| 60 | + @SuppressWarnings("unchecked") | ||
| 61 | + public List<PageData> listAll(PageData pd)throws Exception{ | ||
| 62 | + return (List<PageData>)dao.findForList("HeadmasterMapper.listAll", pd); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + /**通过id获取数据 | ||
| 66 | + * @param pd | ||
| 67 | + * @throws Exception | ||
| 68 | + */ | ||
| 69 | + public PageData findById(PageData pd)throws Exception{ | ||
| 70 | + return (PageData)dao.findForObject("HeadmasterMapper.findById", pd); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /**批量删除 | ||
| 74 | + * @param ArrayDATA_IDS | ||
| 75 | + * @throws Exception | ||
| 76 | + */ | ||
| 77 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | ||
| 78 | + dao.delete("HeadmasterMapper.deleteAll", ArrayDATA_IDS); | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | +} | ||
| 82 | + |
src/com/fh/service/sunvote/homework/HomeworkManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.homework; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.fh.entity.Page; | ||
| 5 | +import com.fh.util.PageData; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 说明: 作业接口 | ||
| 9 | + * 创建人:FH Q313596790 | ||
| 10 | + * 创建时间:2019-03-07 | ||
| 11 | + * @version | ||
| 12 | + */ | ||
| 13 | +public interface HomeworkManager{ | ||
| 14 | + | ||
| 15 | + /**新增 | ||
| 16 | + * @param pd | ||
| 17 | + * @throws Exception | ||
| 18 | + */ | ||
| 19 | + public void save(PageData pd)throws Exception; | ||
| 20 | + | ||
| 21 | + /**删除 | ||
| 22 | + * @param pd | ||
| 23 | + * @throws Exception | ||
| 24 | + */ | ||
| 25 | + public void delete(PageData pd)throws Exception; | ||
| 26 | + | ||
| 27 | + /**修改 | ||
| 28 | + * @param pd | ||
| 29 | + * @throws Exception | ||
| 30 | + */ | ||
| 31 | + public void edit(PageData pd)throws Exception; | ||
| 32 | + | ||
| 33 | + /**列表 | ||
| 34 | + * @param page | ||
| 35 | + * @throws Exception | ||
| 36 | + */ | ||
| 37 | + public List<PageData> list(Page page)throws Exception; | ||
| 38 | + | ||
| 39 | + /**列表(全部) | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public List<PageData> listAll(PageData pd)throws Exception; | ||
| 44 | + | ||
| 45 | + /**通过id获取数据 | ||
| 46 | + * @param pd | ||
| 47 | + * @throws Exception | ||
| 48 | + */ | ||
| 49 | + public PageData findById(PageData pd)throws Exception; | ||
| 50 | + | ||
| 51 | + /**批量删除 | ||
| 52 | + * @param ArrayDATA_IDS | ||
| 53 | + * @throws Exception | ||
| 54 | + */ | ||
| 55 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | ||
| 56 | + | ||
| 57 | +} | ||
| 58 | + |
src/com/fh/service/sunvote/homework/impl/HomeworkService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.homework.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.homework.HomeworkManager; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 说明: 作业 | ||
| 13 | + * 创建人:FH Q313596790 | ||
| 14 | + * 创建时间:2019-03-07 | ||
| 15 | + * @version | ||
| 16 | + */ | ||
| 17 | +@Service("homeworkService") | ||
| 18 | +public class HomeworkService implements HomeworkManager{ | ||
| 19 | + | ||
| 20 | + @Resource(name = "daoSupport") | ||
| 21 | + private DaoSupport dao; | ||
| 22 | + | ||
| 23 | + /**新增 | ||
| 24 | + * @param pd | ||
| 25 | + * @throws Exception | ||
| 26 | + */ | ||
| 27 | + public void save(PageData pd)throws Exception{ | ||
| 28 | + dao.save("HomeworkMapper.save", pd); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /**删除 | ||
| 32 | + * @param pd | ||
| 33 | + * @throws Exception | ||
| 34 | + */ | ||
| 35 | + public void delete(PageData pd)throws Exception{ | ||
| 36 | + dao.delete("HomeworkMapper.delete", pd); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /**修改 | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public void edit(PageData pd)throws Exception{ | ||
| 44 | + dao.update("HomeworkMapper.edit", pd); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + /**列表 | ||
| 48 | + * @param page | ||
| 49 | + * @throws Exception | ||
| 50 | + */ | ||
| 51 | + @SuppressWarnings("unchecked") | ||
| 52 | + public List<PageData> list(Page page)throws Exception{ | ||
| 53 | + return (List<PageData>)dao.findForList("HomeworkMapper.datalistPage", page); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /**列表(全部) | ||
| 57 | + * @param pd | ||
| 58 | + * @throws Exception | ||
| 59 | + */ | ||
| 60 | + @SuppressWarnings("unchecked") | ||
| 61 | + public List<PageData> listAll(PageData pd)throws Exception{ | ||
| 62 | + return (List<PageData>)dao.findForList("HomeworkMapper.listAll", pd); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + /**通过id获取数据 | ||
| 66 | + * @param pd | ||
| 67 | + * @throws Exception | ||
| 68 | + */ | ||
| 69 | + public PageData findById(PageData pd)throws Exception{ | ||
| 70 | + return (PageData)dao.findForObject("HomeworkMapper.findById", pd); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /**批量删除 | ||
| 74 | + * @param ArrayDATA_IDS | ||
| 75 | + * @throws Exception | ||
| 76 | + */ | ||
| 77 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | ||
| 78 | + dao.delete("HomeworkMapper.deleteAll", ArrayDATA_IDS); | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | +} | ||
| 82 | + |
src/com/fh/service/sunvote/homeworkproblem/HomeworkProblemManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.homeworkproblem; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.fh.entity.Page; | ||
| 5 | +import com.fh.util.PageData; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 说明: 作业题目表接口 | ||
| 9 | + * 创建人:FH Q313596790 | ||
| 10 | + * 创建时间:2019-03-07 | ||
| 11 | + * @version | ||
| 12 | + */ | ||
| 13 | +public interface HomeworkProblemManager{ | ||
| 14 | + | ||
| 15 | + /**新增 | ||
| 16 | + * @param pd | ||
| 17 | + * @throws Exception | ||
| 18 | + */ | ||
| 19 | + public void save(PageData pd)throws Exception; | ||
| 20 | + | ||
| 21 | + /**删除 | ||
| 22 | + * @param pd | ||
| 23 | + * @throws Exception | ||
| 24 | + */ | ||
| 25 | + public void delete(PageData pd)throws Exception; | ||
| 26 | + | ||
| 27 | + /**修改 | ||
| 28 | + * @param pd | ||
| 29 | + * @throws Exception | ||
| 30 | + */ | ||
| 31 | + public void edit(PageData pd)throws Exception; | ||
| 32 | + | ||
| 33 | + /**列表 | ||
| 34 | + * @param page | ||
| 35 | + * @throws Exception | ||
| 36 | + */ | ||
| 37 | + public List<PageData> list(Page page)throws Exception; | ||
| 38 | + | ||
| 39 | + /**列表(全部) | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public List<PageData> listAll(PageData pd)throws Exception; | ||
| 44 | + | ||
| 45 | + /**通过id获取数据 | ||
| 46 | + * @param pd | ||
| 47 | + * @throws Exception | ||
| 48 | + */ | ||
| 49 | + public PageData findById(PageData pd)throws Exception; | ||
| 50 | + | ||
| 51 | + /**批量删除 | ||
| 52 | + * @param ArrayDATA_IDS | ||
| 53 | + * @throws Exception | ||
| 54 | + */ | ||
| 55 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | ||
| 56 | + | ||
| 57 | +} | ||
| 58 | + |
src/com/fh/service/sunvote/homeworkproblem/impl/HomeworkProblemService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.homeworkproblem.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.homeworkproblem.HomeworkProblemManager; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 说明: 作业题目表 | ||
| 13 | + * 创建人:FH Q313596790 | ||
| 14 | + * 创建时间:2019-03-07 | ||
| 15 | + * @version | ||
| 16 | + */ | ||
| 17 | +@Service("homeworkproblemService") | ||
| 18 | +public class HomeworkProblemService implements HomeworkProblemManager{ | ||
| 19 | + | ||
| 20 | + @Resource(name = "daoSupport") | ||
| 21 | + private DaoSupport dao; | ||
| 22 | + | ||
| 23 | + /**新增 | ||
| 24 | + * @param pd | ||
| 25 | + * @throws Exception | ||
| 26 | + */ | ||
| 27 | + public void save(PageData pd)throws Exception{ | ||
| 28 | + dao.save("HomeworkProblemMapper.save", pd); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /**删除 | ||
| 32 | + * @param pd | ||
| 33 | + * @throws Exception | ||
| 34 | + */ | ||
| 35 | + public void delete(PageData pd)throws Exception{ | ||
| 36 | + dao.delete("HomeworkProblemMapper.delete", pd); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /**修改 | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public void edit(PageData pd)throws Exception{ | ||
| 44 | + dao.update("HomeworkProblemMapper.edit", pd); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + /**列表 | ||
| 48 | + * @param page | ||
| 49 | + * @throws Exception | ||
| 50 | + */ | ||
| 51 | + @SuppressWarnings("unchecked") | ||
| 52 | + public List<PageData> list(Page page)throws Exception{ | ||
| 53 | + return (List<PageData>)dao.findForList("HomeworkProblemMapper.datalistPage", page); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /**列表(全部) | ||
| 57 | + * @param pd | ||
| 58 | + * @throws Exception | ||
| 59 | + */ | ||
| 60 | + @SuppressWarnings("unchecked") | ||
| 61 | + public List<PageData> listAll(PageData pd)throws Exception{ | ||
| 62 | + return (List<PageData>)dao.findForList("HomeworkProblemMapper.listAll", pd); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + /**通过id获取数据 | ||
| 66 | + * @param pd | ||
| 67 | + * @throws Exception | ||
| 68 | + */ | ||
| 69 | + public PageData findById(PageData pd)throws Exception{ | ||
| 70 | + return (PageData)dao.findForObject("HomeworkProblemMapper.findById", pd); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /**批量删除 | ||
| 74 | + * @param ArrayDATA_IDS | ||
| 75 | + * @throws Exception | ||
| 76 | + */ | ||
| 77 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | ||
| 78 | + dao.delete("HomeworkProblemMapper.deleteAll", ArrayDATA_IDS); | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | +} | ||
| 82 | + |
src/com/fh/service/sunvote/studenthomework/StudentHomeworkManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.studenthomework; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.fh.entity.Page; | ||
| 5 | +import com.fh.util.PageData; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 说明: 学生作业接口 | ||
| 9 | + * 创建人:FH Q313596790 | ||
| 10 | + * 创建时间:2019-03-08 | ||
| 11 | + * @version | ||
| 12 | + */ | ||
| 13 | +public interface StudentHomeworkManager{ | ||
| 14 | + | ||
| 15 | + /**新增 | ||
| 16 | + * @param pd | ||
| 17 | + * @throws Exception | ||
| 18 | + */ | ||
| 19 | + public void save(PageData pd)throws Exception; | ||
| 20 | + | ||
| 21 | + /**删除 | ||
| 22 | + * @param pd | ||
| 23 | + * @throws Exception | ||
| 24 | + */ | ||
| 25 | + public void delete(PageData pd)throws Exception; | ||
| 26 | + | ||
| 27 | + /**修改 | ||
| 28 | + * @param pd | ||
| 29 | + * @throws Exception | ||
| 30 | + */ | ||
| 31 | + public void edit(PageData pd)throws Exception; | ||
| 32 | + | ||
| 33 | + /**列表 | ||
| 34 | + * @param page | ||
| 35 | + * @throws Exception | ||
| 36 | + */ | ||
| 37 | + public List<PageData> list(Page page)throws Exception; | ||
| 38 | + | ||
| 39 | + /**列表(全部) | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public List<PageData> listAll(PageData pd)throws Exception; | ||
| 44 | + | ||
| 45 | + /**通过id获取数据 | ||
| 46 | + * @param pd | ||
| 47 | + * @throws Exception | ||
| 48 | + */ | ||
| 49 | + public PageData findById(PageData pd)throws Exception; | ||
| 50 | + | ||
| 51 | + /**批量删除 | ||
| 52 | + * @param ArrayDATA_IDS | ||
| 53 | + * @throws Exception | ||
| 54 | + */ | ||
| 55 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | ||
| 56 | + | ||
| 57 | +} | ||
| 58 | + |
src/com/fh/service/sunvote/studenthomework/impl/StudentHomeworkService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.studenthomework.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.studenthomework.StudentHomeworkManager; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 说明: 学生作业 | ||
| 13 | + * 创建人:FH Q313596790 | ||
| 14 | + * 创建时间:2019-03-08 | ||
| 15 | + * @version | ||
| 16 | + */ | ||
| 17 | +@Service("studenthomeworkService") | ||
| 18 | +public class StudentHomeworkService implements StudentHomeworkManager{ | ||
| 19 | + | ||
| 20 | + @Resource(name = "daoSupport") | ||
| 21 | + private DaoSupport dao; | ||
| 22 | + | ||
| 23 | + /**新增 | ||
| 24 | + * @param pd | ||
| 25 | + * @throws Exception | ||
| 26 | + */ | ||
| 27 | + public void save(PageData pd)throws Exception{ | ||
| 28 | + dao.save("StudentHomeworkMapper.save", pd); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /**删除 | ||
| 32 | + * @param pd | ||
| 33 | + * @throws Exception | ||
| 34 | + */ | ||
| 35 | + public void delete(PageData pd)throws Exception{ | ||
| 36 | + dao.delete("StudentHomeworkMapper.delete", pd); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /**修改 | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public void edit(PageData pd)throws Exception{ | ||
| 44 | + dao.update("StudentHomeworkMapper.edit", pd); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + /**列表 | ||
| 48 | + * @param page | ||
| 49 | + * @throws Exception | ||
| 50 | + */ | ||
| 51 | + @SuppressWarnings("unchecked") | ||
| 52 | + public List<PageData> list(Page page)throws Exception{ | ||
| 53 | + return (List<PageData>)dao.findForList("StudentHomeworkMapper.datalistPage", page); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /**列表(全部) | ||
| 57 | + * @param pd | ||
| 58 | + * @throws Exception | ||
| 59 | + */ | ||
| 60 | + @SuppressWarnings("unchecked") | ||
| 61 | + public List<PageData> listAll(PageData pd)throws Exception{ | ||
| 62 | + return (List<PageData>)dao.findForList("StudentHomeworkMapper.listAll", pd); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + /**通过id获取数据 | ||
| 66 | + * @param pd | ||
| 67 | + * @throws Exception | ||
| 68 | + */ | ||
| 69 | + public PageData findById(PageData pd)throws Exception{ | ||
| 70 | + return (PageData)dao.findForObject("StudentHomeworkMapper.findById", pd); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /**批量删除 | ||
| 74 | + * @param ArrayDATA_IDS | ||
| 75 | + * @throws Exception | ||
| 76 | + */ | ||
| 77 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | ||
| 78 | + dao.delete("StudentHomeworkMapper.deleteAll", ArrayDATA_IDS); | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | +} | ||
| 82 | + |
src/com/fh/service/sunvote/studenthomeworkinfo/StudentHomeworkInfoManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.studenthomeworkinfo; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import com.fh.entity.Page; | ||
| 5 | +import com.fh.util.PageData; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 说明: 学生作业详细接口 | ||
| 9 | + * 创建人:FH Q313596790 | ||
| 10 | + * 创建时间:2019-03-08 | ||
| 11 | + * @version | ||
| 12 | + */ | ||
| 13 | +public interface StudentHomeworkInfoManager{ | ||
| 14 | + | ||
| 15 | + /**新增 | ||
| 16 | + * @param pd | ||
| 17 | + * @throws Exception | ||
| 18 | + */ | ||
| 19 | + public void save(PageData pd)throws Exception; | ||
| 20 | + | ||
| 21 | + /**删除 | ||
| 22 | + * @param pd | ||
| 23 | + * @throws Exception | ||
| 24 | + */ | ||
| 25 | + public void delete(PageData pd)throws Exception; | ||
| 26 | + | ||
| 27 | + /**修改 | ||
| 28 | + * @param pd | ||
| 29 | + * @throws Exception | ||
| 30 | + */ | ||
| 31 | + public void edit(PageData pd)throws Exception; | ||
| 32 | + | ||
| 33 | + /**列表 | ||
| 34 | + * @param page | ||
| 35 | + * @throws Exception | ||
| 36 | + */ | ||
| 37 | + public List<PageData> list(Page page)throws Exception; | ||
| 38 | + | ||
| 39 | + /**列表(全部) | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public List<PageData> listAll(PageData pd)throws Exception; | ||
| 44 | + | ||
| 45 | + /**通过id获取数据 | ||
| 46 | + * @param pd | ||
| 47 | + * @throws Exception | ||
| 48 | + */ | ||
| 49 | + public PageData findById(PageData pd)throws Exception; | ||
| 50 | + | ||
| 51 | + /**批量删除 | ||
| 52 | + * @param ArrayDATA_IDS | ||
| 53 | + * @throws Exception | ||
| 54 | + */ | ||
| 55 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | ||
| 56 | + | ||
| 57 | +} | ||
| 58 | + |
src/com/fh/service/sunvote/studenthomeworkinfo/impl/StudentHomeworkInfoService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.studenthomeworkinfo.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.studenthomeworkinfo.StudentHomeworkInfoManager; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 说明: 学生作业详细 | ||
| 13 | + * 创建人:FH Q313596790 | ||
| 14 | + * 创建时间:2019-03-08 | ||
| 15 | + * @version | ||
| 16 | + */ | ||
| 17 | +@Service("studenthomeworkinfoService") | ||
| 18 | +public class StudentHomeworkInfoService implements StudentHomeworkInfoManager{ | ||
| 19 | + | ||
| 20 | + @Resource(name = "daoSupport") | ||
| 21 | + private DaoSupport dao; | ||
| 22 | + | ||
| 23 | + /**新增 | ||
| 24 | + * @param pd | ||
| 25 | + * @throws Exception | ||
| 26 | + */ | ||
| 27 | + public void save(PageData pd)throws Exception{ | ||
| 28 | + dao.save("StudentHomeworkInfoMapper.save", pd); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /**删除 | ||
| 32 | + * @param pd | ||
| 33 | + * @throws Exception | ||
| 34 | + */ | ||
| 35 | + public void delete(PageData pd)throws Exception{ | ||
| 36 | + dao.delete("StudentHomeworkInfoMapper.delete", pd); | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /**修改 | ||
| 40 | + * @param pd | ||
| 41 | + * @throws Exception | ||
| 42 | + */ | ||
| 43 | + public void edit(PageData pd)throws Exception{ | ||
| 44 | + dao.update("StudentHomeworkInfoMapper.edit", pd); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + /**列表 | ||
| 48 | + * @param page | ||
| 49 | + * @throws Exception | ||
| 50 | + */ | ||
| 51 | + @SuppressWarnings("unchecked") | ||
| 52 | + public List<PageData> list(Page page)throws Exception{ | ||
| 53 | + return (List<PageData>)dao.findForList("StudentHomeworkInfoMapper.datalistPage", page); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /**列表(全部) | ||
| 57 | + * @param pd | ||
| 58 | + * @throws Exception | ||
| 59 | + */ | ||
| 60 | + @SuppressWarnings("unchecked") | ||
| 61 | + public List<PageData> listAll(PageData pd)throws Exception{ | ||
| 62 | + return (List<PageData>)dao.findForList("StudentHomeworkInfoMapper.listAll", pd); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + /**通过id获取数据 | ||
| 66 | + * @param pd | ||
| 67 | + * @throws Exception | ||
| 68 | + */ | ||
| 69 | + public PageData findById(PageData pd)throws Exception{ | ||
| 70 | + return (PageData)dao.findForObject("StudentHomeworkInfoMapper.findById", pd); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /**批量删除 | ||
| 74 | + * @param ArrayDATA_IDS | ||
| 75 | + * @throws Exception | ||
| 76 | + */ | ||
| 77 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | ||
| 78 | + dao.delete("StudentHomeworkInfoMapper.deleteAll", ArrayDATA_IDS); | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | +} | ||
| 82 | + |
常用操作数据库功能语句.txt
0 → 100644
| 1 | +删除老师和班级名下的测试数据: | ||
| 2 | + | ||
| 3 | +-- DELETE | ||
| 4 | +-- FROM | ||
| 5 | +-- sv_studenttest | ||
| 6 | +-- WHERE | ||
| 7 | +-- TEST_ID IN ( | ||
| 8 | +-- SELECT | ||
| 9 | +-- TESTPAPER_ID | ||
| 10 | +-- FROM | ||
| 11 | +-- sv_testpaper | ||
| 12 | +-- WHERE | ||
| 13 | +-- TEACHER_ID = 'e38a18e965bc4d7ca937404a192bcb70' | ||
| 14 | +-- AND SCLASS_ID = '59d0e1f86bc34ff7920b8d58097e6864' | ||
| 15 | +-- ) | ||
| 16 | +-- | ||
| 17 | +delete FROM | ||
| 18 | + sv_testpaper | ||
| 19 | + WHERE | ||
| 20 | + TEACHER_ID = 'e38a18e965bc4d7ca937404a192bcb70' | ||
| 21 | + AND SCLASS_ID = '59d0e1f86bc34ff7920b8d58097e6864' | ||
| 22 | + | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |