Commit 9338b5630d3c086ef998ed3f5a9f1d18ee4ba05d
1 parent
9f161055
添加报表
Showing
28 changed files
with
1908 additions
and
17 deletions
WebRoot/WEB-INF/jsp/sunvote/networkstatistics/networkstatistics_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="networkstatistics/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="NETWORKSTATISTICS_ID" id="NETWORKSTATISTICS_ID" value="${pd.NETWORKSTATISTICS_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="CLIENT_ID" id="CLIENT_ID" value="${pd.CLIENT_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;">客户端IP:</td> | |
| 40 | + <td><input type="text" name="CLIENT_IP" id="CLIENT_IP" value="${pd.CLIENT_IP}" maxlength="255" placeholder="这里输入客户端IP" title="客户端IP" 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="SUCCESS_COUNT" id="SUCCESS_COUNT" value="${pd.SUCCESS_COUNT}" 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="FAIL_COUNT" id="FAIL_COUNT" value="${pd.FAIL_COUNT}" 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="SESSION_ID" id="SESSION_ID" value="${pd.SESSION_ID}" maxlength="255" placeholder="这里输入会话" title="会话" style="width:98%;"/></td> | |
| 53 | + </tr> | |
| 54 | + <tr> | |
| 55 | + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | |
| 56 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
| 57 | + </tr> | |
| 58 | + <tr> | |
| 59 | + <td style="text-align: center;" colspan="10"> | |
| 60 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 61 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 62 | + </td> | |
| 63 | + </tr> | |
| 64 | + </table> | |
| 65 | + </div> | |
| 66 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 67 | + </form> | |
| 68 | + </div> | |
| 69 | + <!-- /.col --> | |
| 70 | + </div> | |
| 71 | + <!-- /.row --> | |
| 72 | + </div> | |
| 73 | + <!-- /.page-content --> | |
| 74 | + </div> | |
| 75 | + </div> | |
| 76 | + <!-- /.main-content --> | |
| 77 | +</div> | |
| 78 | +<!-- /.main-container --> | |
| 79 | + | |
| 80 | + | |
| 81 | + <!-- 页面底部js¨ --> | |
| 82 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 83 | + <!-- 下拉框 --> | |
| 84 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 85 | + <!-- 日期框 --> | |
| 86 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 87 | + <!--提示框--> | |
| 88 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 89 | + <script type="text/javascript"> | |
| 90 | + $(top.hangge()); | |
| 91 | + //保存 | |
| 92 | + function save(){ | |
| 93 | + if($("#CLIENT_ID").val()==""){ | |
| 94 | + $("#CLIENT_ID").tips({ | |
| 95 | + side:3, | |
| 96 | + msg:'请输入客户端ID', | |
| 97 | + bg:'#AE81FF', | |
| 98 | + time:2 | |
| 99 | + }); | |
| 100 | + $("#CLIENT_ID").focus(); | |
| 101 | + return false; | |
| 102 | + } | |
| 103 | + if($("#CLIENT_IP").val()==""){ | |
| 104 | + $("#CLIENT_IP").tips({ | |
| 105 | + side:3, | |
| 106 | + msg:'请输入客户端IP', | |
| 107 | + bg:'#AE81FF', | |
| 108 | + time:2 | |
| 109 | + }); | |
| 110 | + $("#CLIENT_IP").focus(); | |
| 111 | + return false; | |
| 112 | + } | |
| 113 | + if($("#SUCCESS_COUNT").val()==""){ | |
| 114 | + $("#SUCCESS_COUNT").tips({ | |
| 115 | + side:3, | |
| 116 | + msg:'请输入成功次数', | |
| 117 | + bg:'#AE81FF', | |
| 118 | + time:2 | |
| 119 | + }); | |
| 120 | + $("#SUCCESS_COUNT").focus(); | |
| 121 | + return false; | |
| 122 | + } | |
| 123 | + if($("#FAIL_COUNT").val()==""){ | |
| 124 | + $("#FAIL_COUNT").tips({ | |
| 125 | + side:3, | |
| 126 | + msg:'请输入失败次数', | |
| 127 | + bg:'#AE81FF', | |
| 128 | + time:2 | |
| 129 | + }); | |
| 130 | + $("#FAIL_COUNT").focus(); | |
| 131 | + return false; | |
| 132 | + } | |
| 133 | + if($("#SESSION_ID").val()==""){ | |
| 134 | + $("#SESSION_ID").tips({ | |
| 135 | + side:3, | |
| 136 | + msg:'请输入会话', | |
| 137 | + bg:'#AE81FF', | |
| 138 | + time:2 | |
| 139 | + }); | |
| 140 | + $("#SESSION_ID").focus(); | |
| 141 | + return false; | |
| 142 | + } | |
| 143 | + if($("#REMARK").val()==""){ | |
| 144 | + $("#REMARK").tips({ | |
| 145 | + side:3, | |
| 146 | + msg:'请输入备注', | |
| 147 | + bg:'#AE81FF', | |
| 148 | + time:2 | |
| 149 | + }); | |
| 150 | + $("#REMARK").focus(); | |
| 151 | + return false; | |
| 152 | + } | |
| 153 | + $("#Form").submit(); | |
| 154 | + $("#zhongxin").hide(); | |
| 155 | + $("#zhongxin2").show(); | |
| 156 | + } | |
| 157 | + | |
| 158 | + $(function() { | |
| 159 | + //日期框 | |
| 160 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 161 | + }); | |
| 162 | + </script> | |
| 163 | +</body> | |
| 164 | +</html> | |
| 0 | 165 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/networkstatistics/networkstatistics_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="networkstatistics/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">客户端IP</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.NETWORKSTATISTICS_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.CLIENT_ID}</td> | |
| 91 | + <td class='center'>${var.CLIENT_IP}</td> | |
| 92 | + <td class='center'>${var.SUCCESS_COUNT}</td> | |
| 93 | + <td class='center'>${var.FAIL_COUNT}</td> | |
| 94 | + <td class='center'>${var.SESSION_ID}</td> | |
| 95 | + <td class='center'>${var.REMARK}</td> | |
| 96 | + <td class="center"> | |
| 97 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 98 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 99 | + </c:if> | |
| 100 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 101 | + <c:if test="${QX.edit == 1 }"> | |
| 102 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.NETWORKSTATISTICS_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.NETWORKSTATISTICS_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.NETWORKSTATISTICS_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.NETWORKSTATISTICS_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%>networkstatistics/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%>networkstatistics/delete.do?NETWORKSTATISTICS_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%>networkstatistics/goEdit.do?NETWORKSTATISTICS_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%>networkstatistics/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%>networkstatistics/excel.do'; | |
| 369 | + } | |
| 370 | + </script> | |
| 371 | + | |
| 372 | + | |
| 373 | +</body> | |
| 374 | +</html> | |
| 0 | 375 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/student/student_list2.jsp
| ... | ... | @@ -35,6 +35,7 @@ |
| 35 | 35 | <input type="hidden" name="TERM_ID" id="TERM_ID" value="${pd.TERM_ID}"/> |
| 36 | 36 | <table style="margin-top:5px;"> |
| 37 | 37 | <tr> |
| 38 | + <th class="center" style="float:right"><a href="javascript:;">查看成绩报表</a></th> | |
| 38 | 39 | </tr> |
| 39 | 40 | </table> |
| 40 | 41 | <!-- 检索 --> |
| ... | ... | @@ -66,7 +67,7 @@ |
| 66 | 67 | </td> |
| 67 | 68 | <td class='center' style="width: 30px;">${vs.index+1}</td> |
| 68 | 69 | <td class='center'>${var.NAME}</td> |
| 69 | - <td class='center'>${var.SEX == 1 ? "男":"女"}</td> | |
| 70 | + <td class='center'>${var.SEX == 1 ? "男":var.SEX == 0 ?"女":"未知"}</td> | |
| 70 | 71 | <td class='center'>${var.GROUPID}</td> |
| 71 | 72 | <td class='center'>${var.SIGN_NO}</td> |
| 72 | 73 | <td class='center'>${var.KEYPAD_ID}</td> |
| ... | ... | @@ -104,6 +105,7 @@ |
| 104 | 105 | <a class="btn btn-mini btn-success" onclick="add();">新增</a> |
| 105 | 106 | <a class="btn btn-mini btn-success" onclick="upload();">批量上传</a> |
| 106 | 107 | <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> |
| 108 | + <a class="btn btn-mini btn-success" onclick="report();">查看班级报表</a> | |
| 107 | 109 | </td> |
| 108 | 110 | <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> |
| 109 | 111 | </tr> |
| ... | ... | @@ -125,7 +127,7 @@ |
| 125 | 127 | <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> |
| 126 | 128 | <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> |
| 127 | 129 | </a> |
| 128 | - | |
| 130 | + | |
| 129 | 131 | </div> |
| 130 | 132 | <!-- /.main-container --> |
| 131 | 133 | |
| ... | ... | @@ -323,6 +325,10 @@ |
| 323 | 325 | }); |
| 324 | 326 | }; |
| 325 | 327 | |
| 328 | + function report(){ | |
| 329 | + window.open('<%=basePath%>report/report.do?classid=${pd.CLASS_ID}'); | |
| 330 | + } | |
| 331 | + | |
| 326 | 332 | //导出excel |
| 327 | 333 | function toExcel(){ |
| 328 | 334 | window.location.href='<%=basePath%>student/excel.do'; | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp
0 → 100644
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | |
| 2 | + pageEncoding="UTF-8"%> | |
| 3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
| 4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
| 5 | +<% | |
| 6 | + String path = request.getContextPath(); | |
| 7 | + String basePath = request.getScheme() + "://" | |
| 8 | + + request.getServerName() + ":" + request.getServerPort() | |
| 9 | + + path + "/"; | |
| 10 | +%> | |
| 11 | + | |
| 12 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 13 | +<html> | |
| 14 | +<head> | |
| 15 | +<base href="<%=basePath%>"> | |
| 16 | + | |
| 17 | +<title>${info.CLASS_NAME}成绩报表</title> | |
| 18 | +<base href="<%=basePath%>"> | |
| 19 | +<!-- 下拉框 --> | |
| 20 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
| 21 | +<!-- jsp文件头和头部 --> | |
| 22 | +<%@ include file="../../system/index/top.jsp"%> | |
| 23 | +<!-- 日期框 --> | |
| 24 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
| 25 | +</head> | |
| 26 | + | |
| 27 | +<body style="background:#fff"> | |
| 28 | + <div style="min-width:1360px;margin:0 100"> | |
| 29 | + </br></br> | |
| 30 | + <form action="report/report.do" method="post" name="Form" id="Form"> | |
| 31 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> | |
| 32 | + <table style="margin-top:5px;"> | |
| 33 | + <tr> | |
| 34 | + <td>课程统计: ${info.testsize}</td> | |
| 35 | + </tr> | |
| 36 | + <tr> | |
| 37 | + <td>班级名册: ${info.CLASS_NAME}</td> | |
| 38 | + </tr> | |
| 39 | + <tr> | |
| 40 | + <td><span>学生人数: ${info.STUDENT_NUM}</span></td> | |
| 41 | + <td></td> | |
| 42 | + <td style="padding-left:2px;"><input | |
| 43 | + class="span10 date-picker" name="lastStart" id="lastStart" | |
| 44 | + value="" type="text" data-date-format="yyyy-mm-dd" | |
| 45 | + readonly="readonly" style="width:88px;" placeholder="开始日期" | |
| 46 | + title="开始日期" /></td> | |
| 47 | + <td style="padding-left:2px;"><input | |
| 48 | + class="span10 date-picker" name="lastEnd" id="lastEnd" value="" | |
| 49 | + type="text" data-date-format="yyyy-mm-dd" readonly="readonly" | |
| 50 | + style="width:88px;" placeholder="结束日期" title="结束日期" /></td> | |
| 51 | + <td style="vertical-align:top;padding-left:2px"><a | |
| 52 | + class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i | |
| 53 | + id="nav-search-icon" | |
| 54 | + class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 55 | + </tr> | |
| 56 | + </table> | |
| 57 | + <table id="simple-table" | |
| 58 | + class="table table-striped table-bordered table-hover" | |
| 59 | + style="margin-top:5px;"> | |
| 60 | + <thead> | |
| 61 | + <tr> | |
| 62 | + <th class="center">姓名</th> | |
| 63 | + <th class="center">课程平均得分率</th> | |
| 64 | + <th class="center">课程总分</th> | |
| 65 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | |
| 66 | + <th class="center"><a | |
| 67 | + href="report/test_report?TestID=${var.TESTPAPER_ID}&class_id=${info.CLASS_ID}">${var.NAME}(${var.CREATE_DATE})</a></th> | |
| 68 | + </c:forEach> | |
| 69 | + </tr> | |
| 70 | + </thead> | |
| 71 | + <tbody> | |
| 72 | + <tr> | |
| 73 | + <td class="center">班级课程总分</td> | |
| 74 | + <td class="center"></td> | |
| 75 | + <td class="center"></td> | |
| 76 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | |
| 77 | + <td class="center">${var.TOTAL_SCORE}</td> | |
| 78 | + </c:forEach> | |
| 79 | + </tr> | |
| 80 | + <tr> | |
| 81 | + <td class="center">班级课程平均分</td> | |
| 82 | + <td class="center"></td> | |
| 83 | + <td class="center"></td> | |
| 84 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | |
| 85 | + <td class="center">${var.AVG_SCORE}</td> | |
| 86 | + </c:forEach> | |
| 87 | + </tr> | |
| 88 | + <tr> | |
| 89 | + <td class="center">班级课程平均得分率</td> | |
| 90 | + <td class="center"></td> | |
| 91 | + <td class="center"></td> | |
| 92 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | |
| 93 | + <td class="center"><fmt:formatNumber type="number" | |
| 94 | + value="${var.TOTAL_SCORE == 0 ? 0: (var.AVG_SCORE / var.TOTAL_SCORE * 100)}" | |
| 95 | + maxFractionDigits="1" />%</td> | |
| 96 | + </c:forEach> | |
| 97 | + </tr> | |
| 98 | + | |
| 99 | + <c:choose> | |
| 100 | + <c:when test="${not empty studentList}"> | |
| 101 | + <c:forEach items="${studentList}" var="var" varStatus="vs"> | |
| 102 | + <tr> | |
| 103 | + <td class="center"><a | |
| 104 | + href="report/student_report?studentid=${var.ID}&class_id=${info.CLASS_ID}">${var.NAME}</a> | |
| 105 | + </td> | |
| 106 | + <td class="center"><fmt:formatNumber type="number" | |
| 107 | + value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | |
| 108 | + maxFractionDigits="1" />%</td> | |
| 109 | + <td class="center">${var.GETSCORE }</td> | |
| 110 | + <c:forEach items="${testpaperList}" var="var1" varStatus="vs1"> | |
| 111 | + <td class="center"><c:set var="TEST_ID" | |
| 112 | + value="${var1.TESTPAPER_ID}" /> ${var[TEST_ID] }</td> | |
| 113 | + </c:forEach> | |
| 114 | + </tr> | |
| 115 | + </c:forEach> | |
| 116 | + </c:when> | |
| 117 | + </c:choose> | |
| 118 | + </tbody> | |
| 119 | + </table> | |
| 120 | + </form> | |
| 121 | + </div> | |
| 122 | + | |
| 123 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 124 | + <script src="static/ace/js/bootbox.js"></script> | |
| 125 | + <!-- ace scripts --> | |
| 126 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 127 | + <!-- 下拉框 --> | |
| 128 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 129 | + <!-- 日期框 --> | |
| 130 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 131 | + <!--提示框--> | |
| 132 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 133 | + | |
| 134 | + <script type="text/javascript"> | |
| 135 | + $(function() { | |
| 136 | + | |
| 137 | + //日期框 | |
| 138 | + $('.date-picker').datepicker({ | |
| 139 | + autoclose : true, | |
| 140 | + todayHighlight : true | |
| 141 | + }); | |
| 142 | + | |
| 143 | + //下拉框 | |
| 144 | + if (!ace.vars['touch']) { | |
| 145 | + $('.chosen-select').chosen({ | |
| 146 | + allow_single_deselect : true | |
| 147 | + }); | |
| 148 | + $(window).off('resize.chosen').on('resize.chosen', function() { | |
| 149 | + $('.chosen-select').each(function() { | |
| 150 | + var $this = $(this); | |
| 151 | + $this.next().css({ | |
| 152 | + 'width' : $this.parent().width() | |
| 153 | + }); | |
| 154 | + }); | |
| 155 | + }).trigger('resize.chosen'); | |
| 156 | + $(document).on('settings.ace.chosen', | |
| 157 | + function(e, event_name, event_val) { | |
| 158 | + if (event_name != 'sidebar_collapsed') | |
| 159 | + return; | |
| 160 | + $('.chosen-select').each(function() { | |
| 161 | + var $this = $(this); | |
| 162 | + $this.next().css({ | |
| 163 | + 'width' : $this.parent().width() | |
| 164 | + }); | |
| 165 | + }); | |
| 166 | + }); | |
| 167 | + $('#chosen-multiple-style .btn').on( | |
| 168 | + 'click', | |
| 169 | + function(e) { | |
| 170 | + var target = $(this).find('input[type=radio]'); | |
| 171 | + var which = parseInt(target.val()); | |
| 172 | + if (which == 2) | |
| 173 | + $('#form-field-select-4').addClass( | |
| 174 | + 'tag-input-style'); | |
| 175 | + else | |
| 176 | + $('#form-field-select-4').removeClass( | |
| 177 | + 'tag-input-style'); | |
| 178 | + }); | |
| 179 | + } | |
| 180 | + | |
| 181 | + //复选框全选控制 | |
| 182 | + var active_class = 'active'; | |
| 183 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on( | |
| 184 | + 'click', | |
| 185 | + function() { | |
| 186 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 187 | + $(this).closest('table').find('tbody > tr').each( | |
| 188 | + function() { | |
| 189 | + var row = this; | |
| 190 | + if (th_checked) | |
| 191 | + $(row).addClass(active_class).find( | |
| 192 | + 'input[type=checkbox]').eq(0) | |
| 193 | + .prop('checked', true); | |
| 194 | + else | |
| 195 | + $(row).removeClass(active_class).find( | |
| 196 | + 'input[type=checkbox]').eq(0) | |
| 197 | + .prop('checked', false); | |
| 198 | + }); | |
| 199 | + }); | |
| 200 | + }); | |
| 201 | + | |
| 202 | + | |
| 203 | + function precent(avg,total){ | |
| 204 | + if(total == 0){ | |
| 205 | + return "0%" | |
| 206 | + } | |
| 207 | + return Math.round(avg / total * 100)/100 + '%' ; | |
| 208 | + } | |
| 209 | + | |
| 210 | + function tosearch(){ | |
| 211 | + var url = "<%=basePath%>report/report.do?classid=${info.CLASS_ID}" ; | |
| 212 | + var startDate = $("#lastStart").val(); | |
| 213 | + var endDate = $("#lastEnd").val(); | |
| 214 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | |
| 215 | + window.location.href = url; | |
| 216 | + /* $("#Form").sumbit(); */ | |
| 217 | + } | |
| 218 | + </script> | |
| 219 | + | |
| 220 | +</body> | |
| 221 | +</html> | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_test.jsp
0 → 100644
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | |
| 2 | + pageEncoding="UTF-8"%> | |
| 3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
| 4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
| 5 | +<% | |
| 6 | + String path = request.getContextPath(); | |
| 7 | + String basePath = request.getScheme() + "://" | |
| 8 | + + request.getServerName() + ":" + request.getServerPort() | |
| 9 | + + path + "/"; | |
| 10 | +%> | |
| 11 | + | |
| 12 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 13 | +<html> | |
| 14 | +<head> | |
| 15 | +<base href="<%=basePath%>"> | |
| 16 | + | |
| 17 | +<title>成绩报表</title> | |
| 18 | +<base href="<%=basePath%>"> | |
| 19 | +<!-- 下拉框 --> | |
| 20 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
| 21 | +<!-- jsp文件头和头部 --> | |
| 22 | +<%@ include file="../../system/index/top.jsp"%> | |
| 23 | +<!-- 日期框 --> | |
| 24 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
| 25 | +</head> | |
| 26 | + | |
| 27 | +<body style="background:#fff"> | |
| 28 | + <div style="min-width:1360px;"> | |
| 29 | + <form action="report/report_test.do" method="post" name="Form" id="Form"> | |
| 30 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> | |
| 31 | + <table style="margin-top:5px;"> | |
| 32 | + <tr> | |
| 33 | + <td>课程统计: ${info.testsize}</td> | |
| 34 | + </tr> | |
| 35 | + <tr> | |
| 36 | + <td>班级名册: ${info.CLASS_NAME}</td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td><span>学生人数: ${info.STUDENT_NUM}</span></td> | |
| 40 | + <td></td> | |
| 41 | + <td style="padding-left:2px;"><input | |
| 42 | + class="span10 date-picker" name="lastStart" id="lastStart" | |
| 43 | + value="" type="text" data-date-format="yyyy-mm-dd" | |
| 44 | + readonly="readonly" style="width:88px;" placeholder="开始日期" | |
| 45 | + title="开始日期" /></td> | |
| 46 | + <td style="padding-left:2px;"><input | |
| 47 | + class="span10 date-picker" name="lastEnd" name="lastEnd" value="" | |
| 48 | + type="text" data-date-format="yyyy-mm-dd" readonly="readonly" | |
| 49 | + style="width:88px;" placeholder="结束日期" title="结束日期" /></td> | |
| 50 | + <td style="vertical-align:top;padding-left:2px"><a | |
| 51 | + class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i | |
| 52 | + id="nav-search-icon" | |
| 53 | + class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 54 | + </tr> | |
| 55 | + </table> | |
| 56 | + <table id="simple-table" | |
| 57 | + class="table table-striped table-bordered table-hover" | |
| 58 | + style="margin-top:5px;"> | |
| 59 | + <thead> | |
| 60 | + <tr> | |
| 61 | + <th class="center">姓名</th> | |
| 62 | + <th class="center">课程平均得分率</th> | |
| 63 | + <th class="center">课程总分</th> | |
| 64 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | |
| 65 | + <th class="center"><a | |
| 66 | + href="report/test_report?TestID=${var.TESTPAPER_ID}&class_id=${info.CLASS_ID}">${var.NAME}</a></th> | |
| 67 | + </c:forEach> | |
| 68 | + </tr> | |
| 69 | + </thead> | |
| 70 | + <tbody> | |
| 71 | + <tr> | |
| 72 | + <td class="center">班级课程总分</td> | |
| 73 | + <td class="center"></td> | |
| 74 | + <td class="center"></td> | |
| 75 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | |
| 76 | + <td class="center">${var.TOTAL_SCORE}</td> | |
| 77 | + </c:forEach> | |
| 78 | + </tr> | |
| 79 | + <tr> | |
| 80 | + <td class="center">班级课程平均分</td> | |
| 81 | + <td class="center"></td> | |
| 82 | + <td class="center"></td> | |
| 83 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | |
| 84 | + <td class="center">${var.AVG_SCORE}</td> | |
| 85 | + </c:forEach> | |
| 86 | + </tr> | |
| 87 | + <tr> | |
| 88 | + <td class="center">班级课程平均得分率</td> | |
| 89 | + <td class="center"></td> | |
| 90 | + <td class="center"></td> | |
| 91 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | |
| 92 | + <td class="center"><fmt:formatNumber type="number" | |
| 93 | + value="${var.TOTAL_SCORE == 0 ? 0: (var.AVG_SCORE / var.TOTAL_SCORE * 100)}" | |
| 94 | + maxFractionDigits="1" />%</td> | |
| 95 | + </c:forEach> | |
| 96 | + </tr> | |
| 97 | + | |
| 98 | + <c:choose> | |
| 99 | + <c:when test="${not empty studentList}"> | |
| 100 | + <c:forEach items="${studentList}" var="var" varStatus="vs"> | |
| 101 | + <tr> | |
| 102 | + <td class="center"><a | |
| 103 | + href="<%=basePath%>report/student_report?studentid=${var.ID}">${var.NAME}</a> | |
| 104 | + </td> | |
| 105 | + <td class="center"><fmt:formatNumber type="number" | |
| 106 | + value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | |
| 107 | + maxFractionDigits="1" />%</td> | |
| 108 | + <td class="center">${var.GETSCORE }</td> | |
| 109 | + <c:forEach items="${testpaperList}" var="var1" varStatus="vs1"> | |
| 110 | + <td class="center"><c:set var="TEST_ID" | |
| 111 | + value="${var1.TESTPAPER_ID}" /> ${var[TEST_ID] }</td> | |
| 112 | + </c:forEach> | |
| 113 | + </tr> | |
| 114 | + </c:forEach> | |
| 115 | + </c:when> | |
| 116 | + </c:choose> | |
| 117 | + </tbody> | |
| 118 | + </table> | |
| 119 | + </form> | |
| 120 | + </div> | |
| 121 | + | |
| 122 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 123 | + <script src="static/ace/js/bootbox.js"></script> | |
| 124 | + <!-- ace scripts --> | |
| 125 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 126 | + <!-- 下拉框 --> | |
| 127 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 128 | + <!-- 日期框 --> | |
| 129 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 130 | + <!--提示框--> | |
| 131 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 132 | + | |
| 133 | + <script type="text/javascript"> | |
| 134 | + $(function() { | |
| 135 | + | |
| 136 | + //日期框 | |
| 137 | + $('.date-picker').datepicker({ | |
| 138 | + autoclose : true, | |
| 139 | + todayHighlight : true | |
| 140 | + }); | |
| 141 | + | |
| 142 | + //下拉框 | |
| 143 | + if (!ace.vars['touch']) { | |
| 144 | + $('.chosen-select').chosen({ | |
| 145 | + allow_single_deselect : true | |
| 146 | + }); | |
| 147 | + $(window).off('resize.chosen').on('resize.chosen', function() { | |
| 148 | + $('.chosen-select').each(function() { | |
| 149 | + var $this = $(this); | |
| 150 | + $this.next().css({ | |
| 151 | + 'width' : $this.parent().width() | |
| 152 | + }); | |
| 153 | + }); | |
| 154 | + }).trigger('resize.chosen'); | |
| 155 | + $(document).on('settings.ace.chosen', | |
| 156 | + function(e, event_name, event_val) { | |
| 157 | + if (event_name != 'sidebar_collapsed') | |
| 158 | + return; | |
| 159 | + $('.chosen-select').each(function() { | |
| 160 | + var $this = $(this); | |
| 161 | + $this.next().css({ | |
| 162 | + 'width' : $this.parent().width() | |
| 163 | + }); | |
| 164 | + }); | |
| 165 | + }); | |
| 166 | + $('#chosen-multiple-style .btn').on( | |
| 167 | + 'click', | |
| 168 | + function(e) { | |
| 169 | + var target = $(this).find('input[type=radio]'); | |
| 170 | + var which = parseInt(target.val()); | |
| 171 | + if (which == 2) | |
| 172 | + $('#form-field-select-4').addClass( | |
| 173 | + 'tag-input-style'); | |
| 174 | + else | |
| 175 | + $('#form-field-select-4').removeClass( | |
| 176 | + 'tag-input-style'); | |
| 177 | + }); | |
| 178 | + } | |
| 179 | + | |
| 180 | + //复选框全选控制 | |
| 181 | + var active_class = 'active'; | |
| 182 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on( | |
| 183 | + 'click', | |
| 184 | + function() { | |
| 185 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 186 | + $(this).closest('table').find('tbody > tr').each( | |
| 187 | + function() { | |
| 188 | + var row = this; | |
| 189 | + if (th_checked) | |
| 190 | + $(row).addClass(active_class).find( | |
| 191 | + 'input[type=checkbox]').eq(0) | |
| 192 | + .prop('checked', true); | |
| 193 | + else | |
| 194 | + $(row).removeClass(active_class).find( | |
| 195 | + 'input[type=checkbox]').eq(0) | |
| 196 | + .prop('checked', false); | |
| 197 | + }); | |
| 198 | + }); | |
| 199 | + }); | |
| 200 | + | |
| 201 | + | |
| 202 | + function precent(avg,total){ | |
| 203 | + if(total == 0){ | |
| 204 | + return "0%" | |
| 205 | + } | |
| 206 | + return Math.round(avg / total * 100)/100 + '%' ; | |
| 207 | + } | |
| 208 | + </script> | |
| 209 | + | |
| 210 | +</body> | |
| 211 | +</html> | ... | ... |
WebRoot/WEB-INF/jsp/system/index/login.jsp
| ... | ... | @@ -44,7 +44,7 @@ |
| 44 | 44 | function showfh(){ |
| 45 | 45 | fhi = 1; |
| 46 | 46 | //关闭提示晃动屏幕,注释掉这句话即可 |
| 47 | - timer = setInterval(xzfh2, 10); | |
| 47 | + //timer = setInterval(xzfh2, 10); | |
| 48 | 48 | }; |
| 49 | 49 | var current = 0; |
| 50 | 50 | function xzfh(){ |
| ... | ... | @@ -70,13 +70,7 @@ |
| 70 | 70 | </script> |
| 71 | 71 | </head> |
| 72 | 72 | <body> |
| 73 | - | |
| 74 | - <c:if test="${pd.isMusic == 'yes' }"> | |
| 75 | - <div style="display: none"> | |
| 76 | - <audio src="static/login/music/fh1.mp3" autoplay=""></audio> | |
| 77 | - </div> | |
| 78 | - </c:if> | |
| 79 | - <canvas class="cavs"></canvas> | |
| 73 | + | |
| 80 | 74 | <div style="width:100%;text-align: center;margin: 0 auto;position: absolute;"> |
| 81 | 75 | <!-- 登录 --> |
| 82 | 76 | <div id="windows1"> |
| ... | ... | @@ -136,7 +130,7 @@ |
| 136 | 130 | </form> |
| 137 | 131 | <div class="controls"> |
| 138 | 132 | <div class="main_input_box"> |
| 139 | - <font color="white"><span id="nameerr">Copyright 中天电子(需备案)</span></font> | |
| 133 | + <font><span id="nameerr">Copyright 中天电子(需备案)</span></font> | |
| 140 | 134 | </div> |
| 141 | 135 | </div> |
| 142 | 136 | </div> |
| ... | ... | @@ -215,14 +209,14 @@ |
| 215 | 209 | </form> |
| 216 | 210 | <div class="controls"> |
| 217 | 211 | <div class="main_input_box"> |
| 218 | - <font color="white"><span id="nameerr">Copyright © FHqq313596790 2100</span></font> | |
| 212 | + <font ><span id="nameerr">Copyright © FHqq313596790 2100</span></font> | |
| 219 | 213 | </div> |
| 220 | 214 | </div> |
| 221 | 215 | </div> |
| 222 | 216 | </div> |
| 223 | 217 | |
| 224 | 218 | </div> |
| 225 | - <div id="templatemo_banner_slide" class="container_wapper"> | |
| 219 | + <%-- <div id="templatemo_banner_slide" class="container_wapper"> | |
| 226 | 220 | <div class="camera_wrap camera_emboss" id="camera_slide"> |
| 227 | 221 | <!-- 背景图片 --> |
| 228 | 222 | <c:choose> |
| ... | ... | @@ -233,15 +227,15 @@ |
| 233 | 227 | </c:when> |
| 234 | 228 | <c:otherwise> |
| 235 | 229 | <div data-src="static/login/images/banner_slide_02.jpg"></div> |
| 236 | - <!--<div data-src="static/login/images/banner_slide_01.jpg"></div> | |
| 230 | + <div data-src="static/login/images/banner_slide_01.jpg"></div> | |
| 237 | 231 | <div data-src="static/login/images/banner_slide_03.jpg"></div> |
| 238 | 232 | <div data-src="static/login/images/banner_slide_04.jpg"></div> |
| 239 | - <div data-src="static/login/images/banner_slide_05.jpg"></div> --> | |
| 233 | + <div data-src="static/login/images/banner_slide_05.jpg"></div> | |
| 240 | 234 | </c:otherwise> |
| 241 | 235 | </c:choose> |
| 242 | 236 | </div> |
| 243 | 237 | <!-- #camera_wrap_3 --> |
| 244 | - </div> | |
| 238 | + </div> --%> | |
| 245 | 239 | |
| 246 | 240 | <script type="text/javascript"> |
| 247 | 241 | //服务器校验 | ... | ... |
WebRoot/afterService/dt_info.html
WebRoot/afterService/gsdt_info.html
WebRoot/afterService/gsinfo.html
WebRoot/afterService/gsparts2_info.html
WebRoot/afterService/gsparts_info.html
WebRoot/afterService/info.html
WebRoot/afterService/parts2_info.html
WebRoot/afterService/parts_info.html
resources/mybatis1/sunvote/NetworkStatisticsMapper.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="NetworkStatisticsMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_NETWORKSTATISTICS | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + CLIENT_ID, | |
| 13 | + CLIENT_IP, | |
| 14 | + SUCCESS_COUNT, | |
| 15 | + FAIL_COUNT, | |
| 16 | + SESSION_ID, | |
| 17 | + REMARK, | |
| 18 | + NETWORKSTATISTICS_ID | |
| 19 | + </sql> | |
| 20 | + | |
| 21 | + <!-- 字段值 --> | |
| 22 | + <sql id="FieldValue"> | |
| 23 | + #{CLIENT_ID}, | |
| 24 | + #{CLIENT_IP}, | |
| 25 | + #{SUCCESS_COUNT}, | |
| 26 | + #{FAIL_COUNT}, | |
| 27 | + #{SESSION_ID}, | |
| 28 | + #{REMARK}, | |
| 29 | + #{NETWORKSTATISTICS_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 | + NETWORKSTATISTICS_ID = #{NETWORKSTATISTICS_ID} | |
| 49 | + </delete> | |
| 50 | + | |
| 51 | + <!-- 修改 --> | |
| 52 | + <update id="edit" parameterType="pd"> | |
| 53 | + update | |
| 54 | + <include refid="tableName"></include> | |
| 55 | + set | |
| 56 | + CLIENT_ID = #{CLIENT_ID}, | |
| 57 | + CLIENT_IP = #{CLIENT_IP}, | |
| 58 | + SUCCESS_COUNT = #{SUCCESS_COUNT}, | |
| 59 | + FAIL_COUNT = #{FAIL_COUNT}, | |
| 60 | + SESSION_ID = #{SESSION_ID}, | |
| 61 | + REMARK = #{REMARK}, | |
| 62 | + NETWORKSTATISTICS_ID = NETWORKSTATISTICS_ID | |
| 63 | + where | |
| 64 | + NETWORKSTATISTICS_ID = #{NETWORKSTATISTICS_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 | + NETWORKSTATISTICS_ID = #{NETWORKSTATISTICS_ID} | |
| 75 | + </select> | |
| 76 | + | |
| 77 | + <select id="findByClientID" parameterType="pd" resultType="pd"> | |
| 78 | + select | |
| 79 | + <include refid="Field"></include> | |
| 80 | + from | |
| 81 | + <include refid="tableName"></include> | |
| 82 | + where 1 =1 | |
| 83 | + <if test="CLIENT_ID != null and CLIENT_ID != ''"><!-- 关键词检索 --> | |
| 84 | + and CLIENT_ID = #{CLIENT_ID} | |
| 85 | + </if> | |
| 86 | + <if test="CLIENT_ID != null and CLIENT_ID != ''"><!-- 关键词检索 --> | |
| 87 | + and SESSION_ID = #{SESSION_ID} | |
| 88 | + </if> | |
| 89 | + | |
| 90 | + limit 1 | |
| 91 | + </select> | |
| 92 | + | |
| 93 | + <!-- 列表 --> | |
| 94 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 95 | + select | |
| 96 | + <include refid="Field"></include> | |
| 97 | + from | |
| 98 | + <include refid="tableName"></include> | |
| 99 | + where 1=1 | |
| 100 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 101 | + and | |
| 102 | + ( | |
| 103 | + <!-- 根据需求自己加检索条件 | |
| 104 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 105 | + or | |
| 106 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 107 | + --> | |
| 108 | + ) | |
| 109 | + </if> | |
| 110 | + </select> | |
| 111 | + | |
| 112 | + <!-- 列表(全部) --> | |
| 113 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 114 | + select | |
| 115 | + <include refid="Field"></include> | |
| 116 | + from | |
| 117 | + <include refid="tableName"></include> | |
| 118 | + </select> | |
| 119 | + | |
| 120 | + <!-- 批量删除 --> | |
| 121 | + <delete id="deleteAll" parameterType="String"> | |
| 122 | + delete from | |
| 123 | + <include refid="tableName"></include> | |
| 124 | + where | |
| 125 | + NETWORKSTATISTICS_ID in | |
| 126 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 127 | + #{item} | |
| 128 | + </foreach> | |
| 129 | + </delete> | |
| 130 | + | |
| 131 | + <!-- fh313596790qq(青苔) --> | |
| 132 | +</mapper> | |
| 0 | 133 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/StudentMapper.xml
| ... | ... | @@ -149,6 +149,60 @@ |
| 149 | 149 | order by sv_student.SNO |
| 150 | 150 | </select> |
| 151 | 151 | |
| 152 | + <!-- 列表(全部) --> | |
| 153 | + <select id="listAllClass" parameterType="pd" resultType="pd"> | |
| 154 | + select | |
| 155 | + sv_student.`NAME`, | |
| 156 | + sv_student.SNO, | |
| 157 | + sv_student.NUMBER, | |
| 158 | + sv_student.SEX, | |
| 159 | + sv_student.GROUPID, | |
| 160 | + sv_student.SIGN_NO, | |
| 161 | + sv_student.PARENT_NAME, | |
| 162 | + sv_student.PARENT_PHONE, | |
| 163 | + sv_student.KEYPAD_ID, | |
| 164 | + sv_student.REMARK, | |
| 165 | + sv_student.ID | |
| 166 | + from sv_student | |
| 167 | + LEFT JOIN sv_classroster cr ON sv_student.ID = cr.STUDENT_ID | |
| 168 | + LEFT JOIN sv_term ON cr.TEAMID = sv_term.TERM_ID | |
| 169 | + WHERE | |
| 170 | + 1 = 1 | |
| 171 | + AND sv_term.START_DATE < NOW() | |
| 172 | + AND sv_term.END_DATE > NOW() | |
| 173 | + <if test="CLASS_ID!= null and CLASS_ID != ''"><!-- 关键词检索 --> | |
| 174 | + AND cr.SCLASS_ID = #{CLASS_ID} | |
| 175 | + </if> | |
| 176 | + order by sv_student.SNO | |
| 177 | + </select> | |
| 178 | + <!-- 列表(全部) --> | |
| 179 | + <select id="listAllClassByTerm" parameterType="pd" resultType="pd"> | |
| 180 | + select | |
| 181 | + sv_student.`NAME`, | |
| 182 | + sv_student.SNO, | |
| 183 | + sv_student.NUMBER, | |
| 184 | + sv_student.SEX, | |
| 185 | + sv_student.GROUPID, | |
| 186 | + sv_student.SIGN_NO, | |
| 187 | + sv_student.PARENT_NAME, | |
| 188 | + sv_student.PARENT_PHONE, | |
| 189 | + sv_student.KEYPAD_ID, | |
| 190 | + sv_student.REMARK, | |
| 191 | + sv_student.ID | |
| 192 | + from sv_student | |
| 193 | + LEFT JOIN sv_classroster cr ON sv_student.ID = cr.STUDENT_ID | |
| 194 | + LEFT JOIN sv_term ON cr.TEAMID = sv_term.TERM_ID | |
| 195 | + WHERE | |
| 196 | + 1 = 1 | |
| 197 | + <if test="pd.TERM_ID != null and pd.TERM_ID != ''"><!-- 关键词检索 --> | |
| 198 | + AND sv_term.TERM_ID = #{pd.TERM_ID} | |
| 199 | + </if> | |
| 200 | + <if test="pd.CLASS_ID!= null and pd.CLASS_ID != ''"><!-- 关键词检索 --> | |
| 201 | + AND cr.SCLASS_ID = #{pd.CLASS_ID} | |
| 202 | + </if> | |
| 203 | + order by sv_student.SNO | |
| 204 | + </select> | |
| 205 | + | |
| 152 | 206 | <!-- 批量删除 --> |
| 153 | 207 | <delete id="deleteAll" parameterType="String"> |
| 154 | 208 | delete from | ... | ... |
resources/mybatis1/sunvote/StudentTestMapper.xml
| ... | ... | @@ -126,6 +126,35 @@ |
| 126 | 126 | <if test="STUDENT_ID != null and STUDENT_ID != ''"><!-- 关键词检索 --> |
| 127 | 127 | and (STUDENT_ID = #{STUDENT_ID}) |
| 128 | 128 | </if> |
| 129 | + | |
| 130 | + </select> | |
| 131 | + | |
| 132 | + | |
| 133 | + <select id="reportListData" parameterType="pd" resultType="pd"> | |
| 134 | + | |
| 135 | + SELECT | |
| 136 | + `NAME` AS NAME, | |
| 137 | + sv_studenttest.SCORE AS SCORE, | |
| 138 | + sv_testpaper.TOTAL_SCORE AS TOTAL_SCORE, | |
| 139 | + CREATE_DATE, | |
| 140 | + sv_studenttest.STUDENT_ID AS STUDENT_ID | |
| 141 | + FROM | |
| 142 | + sv_testpaper | |
| 143 | + LEFT JOIN sv_studenttest ON sv_testpaper.TESTPAPER_ID = sv_studenttest.TEST_ID | |
| 144 | + WHERE 1 = 1 | |
| 145 | + <if test="STUDENT_ID != null and STUDENT_ID != ''"> | |
| 146 | + and sv_studenttest.STUDENT_ID = #{STUDENT_ID} | |
| 147 | + </if> | |
| 148 | + <if test="START_DATE != null and START_DATE != ''"><!-- 关键词检索 --> | |
| 149 | + and (CREATE_DATE > #{START_DATE}) | |
| 150 | + </if> | |
| 151 | + <if test="END_DATE != null and END_DATE != ''"><!-- 关键词检索 --> | |
| 152 | + and (CREATE_DATE < #{END_DATE}) | |
| 153 | + </if> | |
| 154 | + | |
| 155 | + order by CREATE_DATE | |
| 156 | + | |
| 157 | + | |
| 129 | 158 | </select> |
| 130 | 159 | |
| 131 | 160 | <!-- 批量删除 --> | ... | ... |
resources/mybatis1/sunvote/TestPaperMapper.xml
| ... | ... | @@ -20,6 +20,7 @@ |
| 20 | 20 | HIGHT_SCORE, |
| 21 | 21 | LOW_SCORE, |
| 22 | 22 | AVG_SCORE, |
| 23 | + TOTAL_SCORE, | |
| 23 | 24 | REMARK, |
| 24 | 25 | TESTPAPER_ID |
| 25 | 26 | </sql> |
| ... | ... | @@ -37,6 +38,7 @@ |
| 37 | 38 | #{HIGHT_SCORE}, |
| 38 | 39 | #{LOW_SCORE}, |
| 39 | 40 | #{AVG_SCORE}, |
| 41 | + #{TOTAL_SCORE}, | |
| 40 | 42 | #{REMARK}, |
| 41 | 43 | #{TESTPAPER_ID} |
| 42 | 44 | </sql> |
| ... | ... | @@ -76,6 +78,7 @@ |
| 76 | 78 | HIGHT_SCORE = #{HIGHT_SCORE}, |
| 77 | 79 | LOW_SCORE = #{LOW_SCORE}, |
| 78 | 80 | AVG_SCORE = #{AVG_SCORE}, |
| 81 | + TOTAL_SCORE = #{TOTAL_SCORE}, | |
| 79 | 82 | REMARK = #{REMARK}, |
| 80 | 83 | TESTPAPER_ID = TESTPAPER_ID |
| 81 | 84 | where |
| ... | ... | @@ -109,6 +112,8 @@ |
| 109 | 112 | --> |
| 110 | 113 | ) |
| 111 | 114 | </if> |
| 115 | + | |
| 116 | + order by CREATE_DATE | |
| 112 | 117 | </select> |
| 113 | 118 | |
| 114 | 119 | <!-- 列表(全部) --> |
| ... | ... | @@ -135,7 +140,14 @@ |
| 135 | 140 | <if test="NAME != null and NAME != ''"><!-- 关键词检索 --> |
| 136 | 141 | and (NAME = #{NAME}) |
| 137 | 142 | </if> |
| 143 | + <if test="START_DATE != null and START_DATE != ''"><!-- 关键词检索 --> | |
| 144 | + and (CREATE_DATE > #{START_DATE}) | |
| 145 | + </if> | |
| 146 | + <if test="END_DATE != null and END_DATE != ''"><!-- 关键词检索 --> | |
| 147 | + and (CREATE_DATE < #{END_DATE}) | |
| 148 | + </if> | |
| 138 | 149 | |
| 150 | + order by CREATE_DATE | |
| 139 | 151 | </select> |
| 140 | 152 | |
| 141 | 153 | <!-- 批量删除 --> | ... | ... |
src/com/fh/controller/api/V1.java
| ... | ... | @@ -31,11 +31,13 @@ import com.fh.service.sunvote.classbasetation.ClassBasetationManager; |
| 31 | 31 | import com.fh.service.sunvote.classroster.ClassRosterManager; |
| 32 | 32 | import com.fh.service.sunvote.classtype.ClassTypeManager; |
| 33 | 33 | import com.fh.service.sunvote.coursemanagement.CourseManagementManager; |
| 34 | +import com.fh.service.sunvote.event.EventManager; | |
| 34 | 35 | import com.fh.service.sunvote.grade.GradeManager; |
| 35 | 36 | import com.fh.service.sunvote.keypad.KeypadManager; |
| 36 | 37 | import com.fh.service.sunvote.keypadcheck.KeypadCheckManager; |
| 37 | 38 | import com.fh.service.sunvote.knowledge.KnowledgeManager; |
| 38 | 39 | import com.fh.service.sunvote.knowledgechapter.KnowledgeChapterManager; |
| 40 | +import com.fh.service.sunvote.networkstatistics.NetworkStatisticsManager; | |
| 39 | 41 | import com.fh.service.sunvote.paper.PaperManager; |
| 40 | 42 | import com.fh.service.sunvote.paperclassteacher.PaperClassTeacherManager; |
| 41 | 43 | import com.fh.service.sunvote.paperquestion.PaperQuestionManager; |
| ... | ... | @@ -150,6 +152,12 @@ public class V1 extends BaseController { |
| 150 | 152 | |
| 151 | 153 | @Resource(name="attachkeyboardService") |
| 152 | 154 | private AttachKeyboardManager attachkeyboardService; |
| 155 | + | |
| 156 | + @Resource(name="networkstatisticsService") | |
| 157 | + private NetworkStatisticsManager networkstatisticsService; | |
| 158 | + | |
| 159 | + @Resource(name="eventService") | |
| 160 | + private EventManager eventService; | |
| 153 | 161 | |
| 154 | 162 | @RequestMapping(value = "/login", produces = "application/json;charset=UTF-8") |
| 155 | 163 | @ResponseBody |
| ... | ... | @@ -178,6 +186,20 @@ public class V1 extends BaseController { |
| 178 | 186 | pageData.put("subjectList", subjectList); |
| 179 | 187 | |
| 180 | 188 | pageData.remove("SUBJECT_IDS"); |
| 189 | + | |
| 190 | + PageData eventPd = new PageData(); | |
| 191 | + eventPd.put("EVENT_ID", get32UUID()); | |
| 192 | + eventPd.put("EVENT_NAME", "login"); | |
| 193 | + eventPd.put("EVENT_USER", pageData.getString("ID")); | |
| 194 | + eventPd.put("EVENT_TYPE", "0"); | |
| 195 | + eventPd.put("EVENT_START_TIME",Tools.date2Str(new Date())); | |
| 196 | + if(pd.getString("CLIENT_ID") != null){ | |
| 197 | + eventPd.put("CLIENT_ID", pd.getString("CLIENT_ID")); | |
| 198 | + }else{ | |
| 199 | + eventPd.put("CLIENT_ID", "CLIENT"); | |
| 200 | + } | |
| 201 | + eventPd.put("EVENT_IP",getRemoteIp()); | |
| 202 | + eventService.save(eventPd); | |
| 181 | 203 | |
| 182 | 204 | res.setData(pageData); |
| 183 | 205 | // 填充数据到返回数据中 |
| ... | ... | @@ -968,6 +990,66 @@ public class V1 extends BaseController { |
| 968 | 990 | this.getUserID(); |
| 969 | 991 | } |
| 970 | 992 | |
| 993 | + | |
| 994 | + @RequestMapping(value = "/network", produces = "application/json;charset=UTF-8") | |
| 995 | + @ResponseBody | |
| 996 | + public Object network() throws Exception{ | |
| 997 | + PageData pd = this.getPageData(); | |
| 998 | + ResponseGson<PageData> res = new ResponseGson(); | |
| 999 | + PageData spd = networkstatisticsService.findByClientID(pd); | |
| 1000 | + String seqStr = pd.getString("SEQ"); | |
| 1001 | + if (seqStr != null && pd.getString("CLIENT_ID") != null | |
| 1002 | + && pd.getString("SESSION_ID") != null) { | |
| 1003 | + int seq = Integer.parseInt(seqStr); | |
| 1004 | + if (spd != null) { | |
| 1005 | + int successCount = Integer.parseInt(spd | |
| 1006 | + .getString("SUCCESS_COUNT")); | |
| 1007 | + spd.put("SUCCESS_COUNT", ++successCount + ""); | |
| 1008 | + int fail = seq - successCount; | |
| 1009 | + if(fail < 0 ){ | |
| 1010 | + fail = 0; | |
| 1011 | + } | |
| 1012 | + spd.put("FAIL_COUNT", fail + ""); | |
| 1013 | + networkstatisticsService.edit(spd); | |
| 1014 | + spd.remove("NETWORKSTATISTICS_ID"); | |
| 1015 | + spd.remove("CLIENT_ID"); | |
| 1016 | + spd.remove("SESSION_ID"); | |
| 1017 | + res.setData(spd); | |
| 1018 | + } else { | |
| 1019 | + pd.put("NETWORKSTATISTICS_ID", get32UUID()); | |
| 1020 | + pd.put("SUCCESS_COUNT", "1"); | |
| 1021 | + pd.put("CLIENT_IP", getRemoteIp()); | |
| 1022 | + int fail = seq - 1; | |
| 1023 | + if(fail < 0 ){ | |
| 1024 | + fail = 0; | |
| 1025 | + } | |
| 1026 | + pd.put("FAIL_COUNT", fail + ""); | |
| 1027 | + networkstatisticsService.save(pd); | |
| 1028 | + pd.remove("JSON"); | |
| 1029 | + pd.remove("CLIENT_ID"); | |
| 1030 | + pd.remove("SESSION_ID"); | |
| 1031 | + pd.remove("SEQ"); | |
| 1032 | + pd.remove("NETWORKSTATISTICS_ID"); | |
| 1033 | + res.setData(pd); | |
| 1034 | + } | |
| 1035 | + }else{ | |
| 1036 | + res.setDataError(); | |
| 1037 | + } | |
| 1038 | + return res.toJson(); | |
| 1039 | + } | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + public String getRemoteIp(){ | |
| 1043 | + HttpServletRequest request = getRequest(); | |
| 1044 | + String ip = ""; | |
| 1045 | + if (request.getHeader("x-forwarded-for") == null) { | |
| 1046 | + ip = request.getRemoteAddr(); | |
| 1047 | + } else { | |
| 1048 | + ip = request.getHeader("x-forwarded-for"); | |
| 1049 | + } | |
| 1050 | + return ip; | |
| 1051 | + } | |
| 1052 | + | |
| 971 | 1053 | @RequestMapping(value = "/newversion", produces = "application/json;charset=UTF-8") |
| 972 | 1054 | @ResponseBody |
| 973 | 1055 | public Object getNewVersion(HttpServletRequest request) throws Exception{ | ... | ... |
src/com/fh/controller/sunvote/networkstatistics/NetworkStatisticsController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.networkstatistics; | |
| 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.networkstatistics.NetworkStatisticsManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:网络统计 | |
| 30 | + * 创建人:FH Q313596790 | |
| 31 | + * 创建时间:2018-06-26 | |
| 32 | + */ | |
| 33 | +@Controller | |
| 34 | +@RequestMapping(value="/networkstatistics") | |
| 35 | +public class NetworkStatisticsController extends BaseController { | |
| 36 | + | |
| 37 | + String menuUrl = "networkstatistics/list.do"; //菜单地址(权限用) | |
| 38 | + @Resource(name="networkstatisticsService") | |
| 39 | + private NetworkStatisticsManager networkstatisticsService; | |
| 40 | + | |
| 41 | + /**保存 | |
| 42 | + * @param | |
| 43 | + * @throws Exception | |
| 44 | + */ | |
| 45 | + @RequestMapping(value="/save") | |
| 46 | + public ModelAndView save() throws Exception{ | |
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增NetworkStatistics"); | |
| 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("NETWORKSTATISTICS_ID", this.get32UUID()); //主键 | |
| 53 | + networkstatisticsService.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()+"删除NetworkStatistics"); | |
| 66 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 67 | + PageData pd = new PageData(); | |
| 68 | + pd = this.getPageData(); | |
| 69 | + networkstatisticsService.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()+"修改NetworkStatistics"); | |
| 81 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 82 | + ModelAndView mv = this.getModelAndView(); | |
| 83 | + PageData pd = new PageData(); | |
| 84 | + pd = this.getPageData(); | |
| 85 | + networkstatisticsService.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()+"列表NetworkStatistics"); | |
| 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 = networkstatisticsService.list(page); //列出NetworkStatistics列表 | |
| 108 | + mv.setViewName("sunvote/networkstatistics/networkstatistics_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/networkstatistics/networkstatistics_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 = networkstatisticsService.findById(pd); //根据ID读取 | |
| 140 | + mv.setViewName("sunvote/networkstatistics/networkstatistics_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()+"批量删除NetworkStatistics"); | |
| 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 | + networkstatisticsService.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()+"导出NetworkStatistics到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("客户端IP"); //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 = networkstatisticsService.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("CLIENT_ID")); //1 | |
| 197 | + vpd.put("var2", varOList.get(i).getString("CLIENT_IP")); //2 | |
| 198 | + vpd.put("var3", varOList.get(i).getString("SUCCESS_COUNT")); //3 | |
| 199 | + vpd.put("var4", varOList.get(i).getString("FAIL_COUNT")); //4 | |
| 200 | + vpd.put("var5", varOList.get(i).getString("SESSION_ID")); //5 | |
| 201 | + vpd.put("var6", varOList.get(i).getString("REMARK")); //6 | |
| 202 | + varList.add(vpd); | |
| 203 | + } | |
| 204 | + dataMap.put("varList", varList); | |
| 205 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 206 | + mv = new ModelAndView(erv,dataMap); | |
| 207 | + return mv; | |
| 208 | + } | |
| 209 | + | |
| 210 | + @InitBinder | |
| 211 | + public void initBinder(WebDataBinder binder){ | |
| 212 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 213 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 214 | + } | |
| 215 | +} | ... | ... |
src/com/fh/controller/sunvote/report/ReportController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.report; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +import javax.annotation.Resource; | |
| 6 | + | |
| 7 | +import org.springframework.stereotype.Controller; | |
| 8 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 9 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 10 | +import org.springframework.web.servlet.ModelAndView; | |
| 11 | + | |
| 12 | +import com.fh.controller.api.ResponseGson; | |
| 13 | +import com.fh.controller.base.BaseController; | |
| 14 | +import com.fh.service.sunvote.sclass.SClassManager; | |
| 15 | +import com.fh.service.sunvote.student.StudentManager; | |
| 16 | +import com.fh.service.sunvote.studenttest.StudentTestManager; | |
| 17 | +import com.fh.service.sunvote.testpaper.TestPaperManager; | |
| 18 | +import com.fh.util.Jurisdiction; | |
| 19 | +import com.fh.util.PageData; | |
| 20 | + | |
| 21 | +@Controller | |
| 22 | +@RequestMapping(value="/report") | |
| 23 | +public class ReportController extends BaseController { | |
| 24 | + | |
| 25 | + @Resource(name="sclassService") | |
| 26 | + private SClassManager sclassService; | |
| 27 | + | |
| 28 | + @Resource(name="studentService") | |
| 29 | + private StudentManager studentService; | |
| 30 | + | |
| 31 | + @Resource(name="testpaperService") | |
| 32 | + private TestPaperManager testpaperService; | |
| 33 | + | |
| 34 | + @Resource(name="studenttestService") | |
| 35 | + private StudentTestManager studenttestService; | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + @RequestMapping(value="/report") | |
| 40 | + public ModelAndView report() throws Exception{ | |
| 41 | + logBefore(logger, Jurisdiction.getUsername()+"班级报表"); | |
| 42 | + ModelAndView mv = this.getModelAndView(); | |
| 43 | + PageData pd = getPageData(); | |
| 44 | + pd.put("SCLASS_ID", pd.get("CLASSID")); | |
| 45 | + pd.put("ID", pd.get("CLASSID")); | |
| 46 | + // 1 查询班级信息 | |
| 47 | + PageData classPageData = sclassService.findById(pd); | |
| 48 | + PageData info = new PageData(); | |
| 49 | + info.put("CLASS_NAME", classPageData.getString("CLASS_NAME")); | |
| 50 | + info.put("CLASS_CODE", classPageData.getString("CLASS_CODE")); | |
| 51 | + info.put("CLASS_ID", classPageData.getString("ID")); | |
| 52 | + pd.put("CLASS_ID", pd.get("CLASSID")); | |
| 53 | + List<PageData> studentList = studentService.listAllClass(pd); | |
| 54 | + // 2查询班级考试 | |
| 55 | + List<PageData> testpaperList = testpaperService.listAll(pd); | |
| 56 | + mv.addObject("testpaperList", testpaperList); | |
| 57 | + info.put("testsize", testpaperList != null ? testpaperList.size() : 0); | |
| 58 | + // 查询学生名单及人数 | |
| 59 | + if(studentList != null && studentList.size() > 0){ | |
| 60 | + for(PageData studentPageData : studentList){ | |
| 61 | + studentPageData.put("STUDENT_ID", studentPageData.getString("ID")); | |
| 62 | + List<PageData> studentTestList = studenttestService.listAll(studentPageData); | |
| 63 | + for(PageData studentTestPageData :studentTestList){ | |
| 64 | + studentPageData.put(studentTestPageData.getString("TEST_ID"), studentTestPageData.getString("SCORE")); | |
| 65 | + } | |
| 66 | + int totalScore = 0 ; | |
| 67 | + int getScore = 0 ; | |
| 68 | + for(PageData testPaperPageData:testpaperList){ | |
| 69 | + String totalScoreStr = testPaperPageData.getString("TOTAL_SCORE"); | |
| 70 | + if(totalScoreStr != null){ | |
| 71 | + try{ | |
| 72 | + totalScore += Integer.parseInt(totalScoreStr); | |
| 73 | + }catch(Exception ex){ | |
| 74 | + logger.info(ex); | |
| 75 | + } | |
| 76 | + } | |
| 77 | + String getScoreStr = studentPageData.getString(testPaperPageData.getString("TESTPAPER_ID")); | |
| 78 | + if(getScoreStr != null){ | |
| 79 | + try{ | |
| 80 | + getScore += Integer.parseInt(getScoreStr); | |
| 81 | + }catch(Exception ex){ | |
| 82 | + logger.info(ex); | |
| 83 | + } | |
| 84 | + } | |
| 85 | + } | |
| 86 | + studentPageData.put("TOTALSCORE", totalScore); | |
| 87 | + studentPageData.put("GETSCORE", getScore); | |
| 88 | + | |
| 89 | + } | |
| 90 | + } | |
| 91 | + // 课程平均得分率 | |
| 92 | + // 课程总分 | |
| 93 | + mv.addObject("studentList", studentList); | |
| 94 | + info.put("STUDENT_NUM", studentList != null ? studentList.size() : 0); | |
| 95 | + mv.addObject("info", info); | |
| 96 | + mv.setViewName("sunvote/teacher/teacher_report_1"); | |
| 97 | + return mv; | |
| 98 | + } | |
| 99 | + | |
| 100 | + @RequestMapping(value="/teacher_report") | |
| 101 | + public ModelAndView teacher_report() throws Exception{ | |
| 102 | + logBefore(logger, Jurisdiction.getUsername()+"教师报表"); | |
| 103 | + ModelAndView mv = this.getModelAndView(); | |
| 104 | + return mv; | |
| 105 | + } | |
| 106 | + | |
| 107 | + @RequestMapping(value="/student_report") | |
| 108 | + public ModelAndView student_report() throws Exception{ | |
| 109 | + logBefore(logger, Jurisdiction.getUsername()+"学生成绩报表"); | |
| 110 | + ModelAndView mv = this.getModelAndView(); | |
| 111 | + | |
| 112 | + PageData pd = getPageData(); | |
| 113 | + pd.put("CLASS_ID", pd.get("CLASSID")); | |
| 114 | + List<PageData> studentList = studentService.listAllClass(pd); | |
| 115 | + | |
| 116 | + mv.addObject("studentList", studentList); | |
| 117 | + mv.setViewName(""); | |
| 118 | + return mv; | |
| 119 | + } | |
| 120 | + | |
| 121 | + @RequestMapping(value = "/student_report_data", produces = "application/json;charset=UTF-8") | |
| 122 | + @ResponseBody | |
| 123 | + public Object student_report_data() throws Exception{ | |
| 124 | + logBefore(logger, Jurisdiction.getUsername()+"学生报表数据"); | |
| 125 | + PageData pd = getPageData(); | |
| 126 | + ResponseGson<List<PageData>> ret = new ResponseGson(); | |
| 127 | + pd.put("CLASS_ID", pd.get("CLASSID")); | |
| 128 | + List<PageData> studentList = studentService.listAllClass(pd); | |
| 129 | + List<PageData> testpaperList = testpaperService.listAll(pd); | |
| 130 | + | |
| 131 | + int totalScore = 0 ; | |
| 132 | + for(PageData testPaperPageData:testpaperList){ | |
| 133 | + String totalScoreStr = testPaperPageData.getString("TOTAL_SCORE"); | |
| 134 | + if(totalScoreStr != null){ | |
| 135 | + try{ | |
| 136 | + totalScore += Integer.parseInt(totalScoreStr); | |
| 137 | + }catch(Exception ex){ | |
| 138 | + logger.info(ex); | |
| 139 | + } | |
| 140 | + } | |
| 141 | + | |
| 142 | + } | |
| 143 | + int allGetScore = 0; | |
| 144 | + // 查询学生名单及人数 | |
| 145 | + if(studentList != null && studentList.size() > 0){ | |
| 146 | + for(PageData studentPageData : studentList){ | |
| 147 | + PageData search = new PageData(); | |
| 148 | + search.put("STUDENT_ID", studentPageData.getString("ID")); | |
| 149 | + if(pd.containsKey("START_DATE")){ | |
| 150 | + search.put("START_DATE", pd.getString("START_DATE")); | |
| 151 | + } | |
| 152 | + if(pd.containsKey("END_DATE")){ | |
| 153 | + search.put("END_DATE", pd.getString("END_DATE")); | |
| 154 | + } | |
| 155 | + List<PageData> studentTestList = studenttestService.reportListData(search); | |
| 156 | + studentPageData.put("testList", studentTestList); | |
| 157 | + | |
| 158 | + int getScore = 0 ; | |
| 159 | + for(PageData studentTestPageData:studentTestList){ | |
| 160 | + String getScoreStr = studentTestPageData.getString("SCORE"); | |
| 161 | + if(getScoreStr != null){ | |
| 162 | + try{ | |
| 163 | + getScore += Integer.parseInt(getScoreStr); | |
| 164 | + }catch(Exception ex){ | |
| 165 | + logger.info(ex); | |
| 166 | + } | |
| 167 | + } | |
| 168 | + } | |
| 169 | + studentPageData.put("TOTALSCORE", totalScore); | |
| 170 | + studentPageData.put("GETSCORE", getScore); | |
| 171 | + studentPageData.remove("GROUPID"); | |
| 172 | + studentPageData.remove("REMARK"); | |
| 173 | + studentPageData.remove("PARENT_PHONE"); | |
| 174 | + studentPageData.remove("PARENT_NAME"); | |
| 175 | + studentPageData.remove("NUMBER"); | |
| 176 | + studentPageData.remove("SIGN_NO"); | |
| 177 | + studentPageData.remove("KEYPAD_ID"); | |
| 178 | + studentPageData.remove("SNO"); | |
| 179 | + | |
| 180 | + allGetScore += getScore; | |
| 181 | + | |
| 182 | + } | |
| 183 | + } | |
| 184 | + ret.setData(studentList); | |
| 185 | + | |
| 186 | + return ret.toJson(); | |
| 187 | + } | |
| 188 | + | |
| 189 | + @RequestMapping(value="/test_report") | |
| 190 | + public ModelAndView paper_report() throws Exception{ | |
| 191 | + logBefore(logger, Jurisdiction.getUsername()+"测试试卷报表"); | |
| 192 | + ModelAndView mv = this.getModelAndView(); | |
| 193 | + return mv; | |
| 194 | + } | |
| 195 | + | |
| 196 | +} | ... | ... |
src/com/fh/service/sunvote/networkstatistics/NetworkStatisticsManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.networkstatistics; | |
| 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 | + * 创建时间:2018-06-26 | |
| 11 | + * @version | |
| 12 | + */ | |
| 13 | +public interface NetworkStatisticsManager{ | |
| 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 | + /**通过id获取数据 | |
| 51 | + * @param pd | |
| 52 | + * @throws Exception | |
| 53 | + */ | |
| 54 | + public PageData findByClientID(PageData pd)throws Exception; | |
| 55 | + | |
| 56 | + /**批量删除 | |
| 57 | + * @param ArrayDATA_IDS | |
| 58 | + * @throws Exception | |
| 59 | + */ | |
| 60 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; | |
| 61 | + | |
| 62 | +} | |
| 63 | + | ... | ... |
src/com/fh/service/sunvote/networkstatistics/impl/NetworkStatisticsService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.networkstatistics.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.networkstatistics.NetworkStatisticsManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 网络统计 | |
| 13 | + * 创建人:FH Q313596790 | |
| 14 | + * 创建时间:2018-06-26 | |
| 15 | + * @version | |
| 16 | + */ | |
| 17 | +@Service("networkstatisticsService") | |
| 18 | +public class NetworkStatisticsService implements NetworkStatisticsManager{ | |
| 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("NetworkStatisticsMapper.save", pd); | |
| 29 | + } | |
| 30 | + | |
| 31 | + /**删除 | |
| 32 | + * @param pd | |
| 33 | + * @throws Exception | |
| 34 | + */ | |
| 35 | + public void delete(PageData pd)throws Exception{ | |
| 36 | + dao.delete("NetworkStatisticsMapper.delete", pd); | |
| 37 | + } | |
| 38 | + | |
| 39 | + /**修改 | |
| 40 | + * @param pd | |
| 41 | + * @throws Exception | |
| 42 | + */ | |
| 43 | + public void edit(PageData pd)throws Exception{ | |
| 44 | + dao.update("NetworkStatisticsMapper.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("NetworkStatisticsMapper.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("NetworkStatisticsMapper.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("NetworkStatisticsMapper.findById", pd); | |
| 71 | + } | |
| 72 | + | |
| 73 | + /**通过id获取数据 | |
| 74 | + * @param pd | |
| 75 | + * @throws Exception | |
| 76 | + */ | |
| 77 | + public PageData findByClientID(PageData pd)throws Exception{ | |
| 78 | + return (PageData)dao.findForObject("NetworkStatisticsMapper.findByClientID", pd); | |
| 79 | + } | |
| 80 | + | |
| 81 | + /**批量删除 | |
| 82 | + * @param ArrayDATA_IDS | |
| 83 | + * @throws Exception | |
| 84 | + */ | |
| 85 | + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | |
| 86 | + dao.delete("NetworkStatisticsMapper.deleteAll", ArrayDATA_IDS); | |
| 87 | + } | |
| 88 | + | |
| 89 | +} | |
| 90 | + | ... | ... |
src/com/fh/service/sunvote/student/StudentManager.java
| ... | ... | @@ -61,5 +61,21 @@ public interface StudentManager{ |
| 61 | 61 | */ |
| 62 | 62 | public void deleteAll(String[] ArrayDATA_IDS)throws Exception; |
| 63 | 63 | |
| 64 | + /** | |
| 65 | + * 列出当前班级学生名单 | |
| 66 | + * @param pd | |
| 67 | + * @return | |
| 68 | + * @throws Exception | |
| 69 | + */ | |
| 70 | + public List<PageData> listAllClass(PageData pd)throws Exception; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 查询班级学期的学生名单 | |
| 74 | + * @param pd | |
| 75 | + * @return | |
| 76 | + * @throws Exception | |
| 77 | + */ | |
| 78 | + public List<PageData> listAllClassByTerm(PageData pd)throws Exception; | |
| 79 | + | |
| 64 | 80 | } |
| 65 | 81 | ... | ... |
src/com/fh/service/sunvote/student/impl/StudentService.java
| ... | ... | @@ -71,6 +71,17 @@ public class StudentService implements StudentManager{ |
| 71 | 71 | return (List<PageData>)dao.findForList("StudentMapper.listAll", pd); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | + | |
| 75 | + @SuppressWarnings("unchecked") | |
| 76 | + public List<PageData> listAllClass(PageData pd)throws Exception{ | |
| 77 | + return (List<PageData>)dao.findForList("StudentMapper.listAllClass", pd); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @SuppressWarnings("unchecked") | |
| 81 | + public List<PageData> listAllClassByTerm(PageData pd)throws Exception{ | |
| 82 | + return (List<PageData>)dao.findForList("StudentMapper.listAllClassByTerm", pd); | |
| 83 | + } | |
| 84 | + | |
| 74 | 85 | /**通过id获取数据 |
| 75 | 86 | * @param pd |
| 76 | 87 | * @throws Exception | ... | ... |
src/com/fh/service/sunvote/studenttest/StudentTestManager.java
| ... | ... | @@ -41,6 +41,11 @@ public interface StudentTestManager{ |
| 41 | 41 | * @throws Exception |
| 42 | 42 | */ |
| 43 | 43 | public List<PageData> listAll(PageData pd)throws Exception; |
| 44 | + /**列表(全部) | |
| 45 | + * @param pd | |
| 46 | + * @throws Exception | |
| 47 | + */ | |
| 48 | + public List<PageData> reportListData(PageData pd)throws Exception; | |
| 44 | 49 | |
| 45 | 50 | /**通过id获取数据 |
| 46 | 51 | * @param pd | ... | ... |
src/com/fh/service/sunvote/studenttest/impl/StudentTestService.java
| 1 | 1 | package com.fh.service.sunvote.studenttest.impl; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | + | |
| 4 | 5 | import javax.annotation.Resource; |
| 6 | + | |
| 5 | 7 | import org.springframework.stereotype.Service; |
| 8 | + | |
| 6 | 9 | import com.fh.dao.DaoSupport; |
| 7 | 10 | import com.fh.entity.Page; |
| 8 | 11 | import com.fh.util.PageData; |
| ... | ... | @@ -77,6 +80,11 @@ public class StudentTestService implements StudentTestManager{ |
| 77 | 80 | public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ |
| 78 | 81 | dao.delete("StudentTestMapper.deleteAll", ArrayDATA_IDS); |
| 79 | 82 | } |
| 83 | + | |
| 84 | + @Override | |
| 85 | + public List<PageData> reportListData(PageData pd) throws Exception { | |
| 86 | + return (List<PageData>)dao.findForList("StudentTestMapper.reportListData", pd); | |
| 87 | + } | |
| 80 | 88 | |
| 81 | 89 | } |
| 82 | 90 | ... | ... |