Commit 92455d76d35d4f42abcee08c2a389d310be89ad8

Authored by 孙向锦
1 parent 42ea7f23

添加更新到服务器

Showing 44 changed files with 3166 additions and 27 deletions
WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_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="basestation/${msg }.do" name="Form" id="Form" method="post">
  31 + <input type="hidden" name="BASESTATION_ID" id="BASESTATION_ID" value="${pd.BASESTATION_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="NO" id="NO" value="${pd.NO}" 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="MATCH_CODE" id="MATCH_CODE" value="${pd.MATCH_CODE}" 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="KEYPAD_MODE" id="KEYPAD_MODE" value="${pd.KEYPAD_MODE}" 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="WORK_MODE" id="WORK_MODE" value="${pd.WORK_MODE}" 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="PRODUCTION_TIME" id="PRODUCTION_TIME" value="${pd.PRODUCTION_TIME}" 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="IS_OK" id="IS_OK" value="${pd.IS_OK}" maxlength="32" placeholder="这里输入是否正常" title="是否正常" style="width:98%;"/></td>
  61 + </tr>
  62 + <tr>
  63 + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td>
  64 + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" 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($("#NAME").val()==""){
  102 + $("#NAME").tips({
  103 + side:3,
  104 + msg:'请输入基站名称',
  105 + bg:'#AE81FF',
  106 + time:2
  107 + });
  108 + $("#NAME").focus();
  109 + return false;
  110 + }
  111 + if($("#NO").val()==""){
  112 + $("#NO").tips({
  113 + side:3,
  114 + msg:'请输入基站编号',
  115 + bg:'#AE81FF',
  116 + time:2
  117 + });
  118 + $("#NO").focus();
  119 + return false;
  120 + }
  121 + if($("#MATCH_CODE").val()==""){
  122 + $("#MATCH_CODE").tips({
  123 + side:3,
  124 + msg:'请输入配对码',
  125 + bg:'#AE81FF',
  126 + time:2
  127 + });
  128 + $("#MATCH_CODE").focus();
  129 + return false;
  130 + }
  131 + if($("#KEYPAD_MODE").val()==""){
  132 + $("#KEYPAD_MODE").tips({
  133 + side:3,
  134 + msg:'请输入键盘模式',
  135 + bg:'#AE81FF',
  136 + time:2
  137 + });
  138 + $("#KEYPAD_MODE").focus();
  139 + return false;
  140 + }
  141 + if($("#WORK_MODE").val()==""){
  142 + $("#WORK_MODE").tips({
  143 + side:3,
  144 + msg:'请输入工作模式',
  145 + bg:'#AE81FF',
  146 + time:2
  147 + });
  148 + $("#WORK_MODE").focus();
  149 + return false;
  150 + }
  151 + if($("#PRODUCTION_TIME").val()==""){
  152 + $("#PRODUCTION_TIME").tips({
  153 + side:3,
  154 + msg:'请输入生产时间',
  155 + bg:'#AE81FF',
  156 + time:2
  157 + });
  158 + $("#PRODUCTION_TIME").focus();
  159 + return false;
  160 + }
  161 + if($("#IS_OK").val()==""){
  162 + $("#IS_OK").tips({
  163 + side:3,
  164 + msg:'请输入是否正常',
  165 + bg:'#AE81FF',
  166 + time:2
  167 + });
  168 + $("#IS_OK").focus();
  169 + return false;
  170 + }
  171 + if($("#REMARK").val()==""){
  172 + $("#REMARK").tips({
  173 + side:3,
  174 + msg:'请输入备注',
  175 + bg:'#AE81FF',
  176 + time:2
  177 + });
  178 + $("#REMARK").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/basestation/basestation_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="basestation/list.do" method="post" name="Form" id="Form">
  34 + <table style="margin-top:5px;">
  35 + <tr>
  36 + <td>
  37 + <div class="nav-search">
  38 + <span class="input-icon">
  39 + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/>
  40 + <i class="ace-icon fa fa-search nav-search-icon"></i>
  41 + </span>
  42 + </div>
  43 + </td>
  44 + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td>
  45 + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td>
  46 + <td style="vertical-align:top;padding-left:2px;">
  47 + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;">
  48 + <option value=""></option>
  49 + <option value="">全部</option>
  50 + <option value="">1</option>
  51 + <option value="">2</option>
  52 + </select>
  53 + </td>
  54 + <c:if test="${QX.cha == 1 }">
  55 + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
  56 + </c:if>
  57 + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if>
  58 + </tr>
  59 + </table>
  60 + <!-- 检索 -->
  61 +
  62 + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;">
  63 + <thead>
  64 + <tr>
  65 + <th class="center" style="width:35px;">
  66 + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label>
  67 + </th>
  68 + <th class="center" style="width:50px;">序号</th>
  69 + <th class="center">基站名称</th>
  70 + <th class="center">基站编号</th>
  71 + <th class="center">配对码</th>
  72 + <th class="center">键盘模式</th>
  73 + <th class="center">工作模式</th>
  74 + <th class="center">生产时间</th>
  75 + <th class="center">是否正常</th>
  76 + <th class="center">备注</th>
  77 + <th class="center">操作</th>
  78 + </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.BASESTATION_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.NAME}</td>
  93 + <td class='center'>${var.NO}</td>
  94 + <td class='center'>${var.MATCH_CODE}</td>
  95 + <td class='center'>${var.KEYPAD_MODE}</td>
  96 + <td class='center'>${var.WORK_MODE}</td>
  97 + <td class='center'>${var.PRODUCTION_TIME}</td>
  98 + <td class='center'>${var.IS_OK}</td>
  99 + <td class='center'>${var.REMARK}</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.BASESTATION_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.BASESTATION_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.BASESTATION_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.BASESTATION_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%>basestation/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%>basestation/delete.do?BASESTATION_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%>basestation/goEdit.do?BASESTATION_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%>basestation/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%>basestation/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
WebRoot/WEB-INF/jsp/sunvote/school/school_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="school/${msg }.do" name="Form" id="Form" method="post">
  31 + <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_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="ADDRESS" id="ADDRESS" value="${pd.ADDRESS}" 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="PRESIDENT" id="PRESIDENT" value="${pd.PRESIDENT}" 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="PHONE" id="PHONE" value="${pd.PHONE}" maxlength="20" placeholder="这里输入联系电话" title="联系电话" style="width:98%;"/></td>
  49 + </tr>
  50 + <tr>
  51 + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td>
  52 + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td>
  53 + </tr>
  54 + <tr>
  55 + <td style="text-align: center;" colspan="10">
  56 + <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
  57 + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
  58 + </td>
  59 + </tr>
  60 + </table>
  61 + </div>
  62 + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
  63 + </form>
  64 + </div>
  65 + <!-- /.col -->
  66 + </div>
  67 + <!-- /.row -->
  68 + </div>
  69 + <!-- /.page-content -->
  70 + </div>
  71 + </div>
  72 + <!-- /.main-content -->
  73 +</div>
  74 +<!-- /.main-container -->
  75 +
  76 +
  77 + <!-- 页面底部js¨ -->
  78 + <%@ include file="../../system/index/foot.jsp"%>
  79 + <!-- 下拉框 -->
  80 + <script src="static/ace/js/chosen.jquery.js"></script>
  81 + <!-- 日期框 -->
  82 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  83 + <!--提示框-->
  84 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  85 + <script type="text/javascript">
  86 + $(top.hangge());
  87 + //保存
  88 + function save(){
  89 + if($("#NAME").val()==""){
  90 + $("#NAME").tips({
  91 + side:3,
  92 + msg:'请输入学校名称',
  93 + bg:'#AE81FF',
  94 + time:2
  95 + });
  96 + $("#NAME").focus();
  97 + return false;
  98 + }
  99 + if($("#ADDRESS").val()==""){
  100 + $("#ADDRESS").tips({
  101 + side:3,
  102 + msg:'请输入学校地址',
  103 + bg:'#AE81FF',
  104 + time:2
  105 + });
  106 + $("#ADDRESS").focus();
  107 + return false;
  108 + }
  109 + if($("#PRESIDENT").val()==""){
  110 + $("#PRESIDENT").tips({
  111 + side:3,
  112 + msg:'请输入校长',
  113 + bg:'#AE81FF',
  114 + time:2
  115 + });
  116 + $("#PRESIDENT").focus();
  117 + return false;
  118 + }
  119 + if($("#PHONE").val()==""){
  120 + $("#PHONE").tips({
  121 + side:3,
  122 + msg:'请输入联系电话',
  123 + bg:'#AE81FF',
  124 + time:2
  125 + });
  126 + $("#PHONE").focus();
  127 + return false;
  128 + }
  129 + if($("#REMARK").val()==""){
  130 + $("#REMARK").tips({
  131 + side:3,
  132 + msg:'请输入备注',
  133 + bg:'#AE81FF',
  134 + time:2
  135 + });
  136 + $("#REMARK").focus();
  137 + return false;
  138 + }
  139 + $("#Form").submit();
  140 + $("#zhongxin").hide();
  141 + $("#zhongxin2").show();
  142 + }
  143 +
  144 + $(function() {
  145 + //日期框
  146 + $('.date-picker').datepicker({autoclose: true,todayHighlight: true});
  147 + });
  148 + </script>
  149 +</body>
  150 +</html>
0 \ No newline at end of file 151 \ No newline at end of file
WebRoot/WEB-INF/jsp/sunvote/school/school_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="school/list.do" method="post" name="Form" id="Form">
  34 + <table style="margin-top:5px;">
  35 + <tr>
  36 + <td>
  37 + <div class="nav-search">
  38 + <span class="input-icon">
  39 + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/>
  40 + <i class="ace-icon fa fa-search nav-search-icon"></i>
  41 + </span>
  42 + </div>
  43 + </td>
  44 + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td>
  45 + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td>
  46 + <td style="vertical-align:top;padding-left:2px;">
  47 + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;">
  48 + <option value=""></option>
  49 + <option value="">全部</option>
  50 + <option value="">1</option>
  51 + <option value="">2</option>
  52 + </select>
  53 + </td>
  54 + <c:if test="${QX.cha == 1 }">
  55 + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
  56 + </c:if>
  57 + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if>
  58 + </tr>
  59 + </table>
  60 + <!-- 检索 -->
  61 +
  62 + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;">
  63 + <thead>
  64 + <tr>
  65 + <th class="center" style="width:35px;">
  66 + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label>
  67 + </th>
  68 + <th class="center" style="width:50px;">序号</th>
  69 + <th class="center">学校名称</th>
  70 + <th class="center">学校地址</th>
  71 + <th class="center">校长</th>
  72 + <th class="center">联系电话</th>
  73 + <th class="center">备注</th>
  74 + <th class="center">操作</th>
  75 + </tr>
  76 + </thead>
  77 +
  78 + <tbody>
  79 + <!-- 开始循环 -->
  80 + <c:choose>
  81 + <c:when test="${not empty varList}">
  82 + <c:if test="${QX.cha == 1 }">
  83 + <c:forEach items="${varList}" var="var" varStatus="vs">
  84 + <tr>
  85 + <td class='center'>
  86 + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.SCHOOL_ID}" class="ace" /><span class="lbl"></span></label>
  87 + </td>
  88 + <td class='center' style="width: 30px;">${vs.index+1}</td>
  89 + <td class='center'>${var.NAME}</td>
  90 + <td class='center'>${var.ADDRESS}</td>
  91 + <td class='center'>${var.PRESIDENT}</td>
  92 + <td class='center'>${var.PHONE}</td>
  93 + <td class='center'>${var.REMARK}</td>
  94 + <td class="center">
  95 + <c:if test="${QX.edit != 1 && QX.del != 1 }">
  96 + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
  97 + </c:if>
  98 + <div class="hidden-sm hidden-xs btn-group">
  99 + <c:if test="${QX.edit == 1 }">
  100 + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.SCHOOL_ID}');">
  101 + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i>
  102 + </a>
  103 + </c:if>
  104 + <c:if test="${QX.del == 1 }">
  105 + <a class="btn btn-xs btn-danger" onclick="del('${var.SCHOOL_ID}');">
  106 + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i>
  107 + </a>
  108 + </c:if>
  109 + </div>
  110 + <div class="hidden-md hidden-lg">
  111 + <div class="inline pos-rel">
  112 + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
  113 + <i class="ace-icon fa fa-cog icon-only bigger-110"></i>
  114 + </button>
  115 +
  116 + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
  117 + <c:if test="${QX.edit == 1 }">
  118 + <li>
  119 + <a style="cursor:pointer;" onclick="edit('${var.SCHOOL_ID}');" class="tooltip-success" data-rel="tooltip" title="修改">
  120 + <span class="green">
  121 + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
  122 + </span>
  123 + </a>
  124 + </li>
  125 + </c:if>
  126 + <c:if test="${QX.del == 1 }">
  127 + <li>
  128 + <a style="cursor:pointer;" onclick="del('${var.SCHOOL_ID}');" class="tooltip-error" data-rel="tooltip" title="删除">
  129 + <span class="red">
  130 + <i class="ace-icon fa fa-trash-o bigger-120"></i>
  131 + </span>
  132 + </a>
  133 + </li>
  134 + </c:if>
  135 + </ul>
  136 + </div>
  137 + </div>
  138 + </td>
  139 + </tr>
  140 +
  141 + </c:forEach>
  142 + </c:if>
  143 + <c:if test="${QX.cha == 0 }">
  144 + <tr>
  145 + <td colspan="100" class="center">您无权查看</td>
  146 + </tr>
  147 + </c:if>
  148 + </c:when>
  149 + <c:otherwise>
  150 + <tr class="main_info">
  151 + <td colspan="100" class="center" >没有相关数据</td>
  152 + </tr>
  153 + </c:otherwise>
  154 + </c:choose>
  155 + </tbody>
  156 + </table>
  157 + <div class="page-header position-relative">
  158 + <table style="width:100%;">
  159 + <tr>
  160 + <td style="vertical-align:top;">
  161 + <c:if test="${QX.add == 1 }">
  162 + <a class="btn btn-mini btn-success" onclick="add();">新增</a>
  163 + </c:if>
  164 + <c:if test="${QX.del == 1 }">
  165 + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a>
  166 + </c:if>
  167 + </td>
  168 + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td>
  169 + </tr>
  170 + </table>
  171 + </div>
  172 + </form>
  173 +
  174 + </div>
  175 + <!-- /.col -->
  176 + </div>
  177 + <!-- /.row -->
  178 + </div>
  179 + <!-- /.page-content -->
  180 + </div>
  181 + </div>
  182 + <!-- /.main-content -->
  183 +
  184 + <!-- 返回顶部 -->
  185 + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
  186 + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
  187 + </a>
  188 +
  189 + </div>
  190 + <!-- /.main-container -->
  191 +
  192 + <!-- basic scripts -->
  193 + <!-- 页面底部js¨ -->
  194 + <%@ include file="../../system/index/foot.jsp"%>
  195 + <!-- 删除时确认窗口 -->
  196 + <script src="static/ace/js/bootbox.js"></script>
  197 + <!-- ace scripts -->
  198 + <script src="static/ace/js/ace/ace.js"></script>
  199 + <!-- 下拉框 -->
  200 + <script src="static/ace/js/chosen.jquery.js"></script>
  201 + <!-- 日期框 -->
  202 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  203 + <!--提示框-->
  204 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  205 + <script type="text/javascript">
  206 + $(top.hangge());//关闭加载状态
  207 + //检索
  208 + function tosearch(){
  209 + top.jzts();
  210 + $("#Form").submit();
  211 + }
  212 + $(function() {
  213 +
  214 + //日期框
  215 + $('.date-picker').datepicker({
  216 + autoclose: true,
  217 + todayHighlight: true
  218 + });
  219 +
  220 + //下拉框
  221 + if(!ace.vars['touch']) {
  222 + $('.chosen-select').chosen({allow_single_deselect:true});
  223 + $(window)
  224 + .off('resize.chosen')
  225 + .on('resize.chosen', function() {
  226 + $('.chosen-select').each(function() {
  227 + var $this = $(this);
  228 + $this.next().css({'width': $this.parent().width()});
  229 + });
  230 + }).trigger('resize.chosen');
  231 + $(document).on('settings.ace.chosen', function(e, event_name, event_val) {
  232 + if(event_name != 'sidebar_collapsed') return;
  233 + $('.chosen-select').each(function() {
  234 + var $this = $(this);
  235 + $this.next().css({'width': $this.parent().width()});
  236 + });
  237 + });
  238 + $('#chosen-multiple-style .btn').on('click', function(e){
  239 + var target = $(this).find('input[type=radio]');
  240 + var which = parseInt(target.val());
  241 + if(which == 2) $('#form-field-select-4').addClass('tag-input-style');
  242 + else $('#form-field-select-4').removeClass('tag-input-style');
  243 + });
  244 + }
  245 +
  246 +
  247 + //复选框全选控制
  248 + var active_class = 'active';
  249 + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){
  250 + var th_checked = this.checked;//checkbox inside "TH" table header
  251 + $(this).closest('table').find('tbody > tr').each(function(){
  252 + var row = this;
  253 + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true);
  254 + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false);
  255 + });
  256 + });
  257 + });
  258 +
  259 + //新增
  260 + function add(){
  261 + top.jzts();
  262 + var diag = new top.Dialog();
  263 + diag.Drag=true;
  264 + diag.Title ="新增";
  265 + diag.URL = '<%=basePath%>school/goAdd.do';
  266 + diag.Width = 450;
  267 + diag.Height = 355;
  268 + diag.Modal = true; //有无遮罩窗口
  269 + diag. ShowMaxButton = true; //最大化按钮
  270 + diag.ShowMinButton = true; //最小化按钮
  271 + diag.CancelEvent = function(){ //关闭事件
  272 + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){
  273 + if('${page.currentPage}' == '0'){
  274 + tosearch();
  275 + }else{
  276 + tosearch();
  277 + }
  278 + }
  279 + diag.close();
  280 + };
  281 + diag.show();
  282 + }
  283 +
  284 + //删除
  285 + function del(Id){
  286 + bootbox.confirm("确定要删除吗?", function(result) {
  287 + if(result) {
  288 + top.jzts();
  289 + var url = "<%=basePath%>school/delete.do?SCHOOL_ID="+Id+"&tm="+new Date().getTime();
  290 + $.get(url,function(data){
  291 + tosearch();
  292 + });
  293 + }
  294 + });
  295 + }
  296 +
  297 + //修改
  298 + function edit(Id){
  299 + top.jzts();
  300 + var diag = new top.Dialog();
  301 + diag.Drag=true;
  302 + diag.Title ="编辑";
  303 + diag.URL = '<%=basePath%>school/goEdit.do?SCHOOL_ID='+Id;
  304 + diag.Width = 450;
  305 + diag.Height = 355;
  306 + diag.Modal = true; //有无遮罩窗口
  307 + diag. ShowMaxButton = true; //最大化按钮
  308 + diag.ShowMinButton = true; //最小化按钮
  309 + diag.CancelEvent = function(){ //关闭事件
  310 + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){
  311 + tosearch();
  312 + }
  313 + diag.close();
  314 + };
  315 + diag.show();
  316 + }
  317 +
  318 + //批量操作
  319 + function makeAll(msg){
  320 + bootbox.confirm(msg, function(result) {
  321 + if(result) {
  322 + var str = '';
  323 + for(var i=0;i < document.getElementsByName('ids').length;i++){
  324 + if(document.getElementsByName('ids')[i].checked){
  325 + if(str=='') str += document.getElementsByName('ids')[i].value;
  326 + else str += ',' + document.getElementsByName('ids')[i].value;
  327 + }
  328 + }
  329 + if(str==''){
  330 + bootbox.dialog({
  331 + message: "<span class='bigger-110'>您没有选择任何内容!</span>",
  332 + buttons:
  333 + { "button":{ "label":"确定", "className":"btn-sm btn-success"}}
  334 + });
  335 + $("#zcheckbox").tips({
  336 + side:1,
  337 + msg:'点这里全选',
  338 + bg:'#AE81FF',
  339 + time:8
  340 + });
  341 + return;
  342 + }else{
  343 + if(msg == '确定要删除选中的数据吗?'){
  344 + top.jzts();
  345 + $.ajax({
  346 + type: "POST",
  347 + url: '<%=basePath%>school/deleteAll.do?tm='+new Date().getTime(),
  348 + data: {DATA_IDS:str},
  349 + dataType:'json',
  350 + //beforeSend: validateData,
  351 + cache: false,
  352 + success: function(data){
  353 + $.each(data.list, function(i, list){
  354 + tosearch();
  355 + });
  356 + }
  357 + });
  358 + }
  359 + }
  360 + }
  361 + });
  362 + };
  363 +
  364 + //导出excel
  365 + function toExcel(){
  366 + window.location.href='<%=basePath%>school/excel.do';
  367 + }
  368 + </script>
  369 +
  370 +
  371 +</body>
  372 +</html>
0 \ No newline at end of file 373 \ No newline at end of file
WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_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="teachingmaterial/${msg }.do" name="Form" id="Form" method="post">
  31 + <input type="hidden" name="TEACHINGMATERIAL_ID" id="TEACHINGMATERIAL_ID" value="${pd.TEACHINGMATERIAL_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="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}" maxlength="255" placeholder="这里输入所属科目" title="所属科目" style="width:98%;"/></td>
  41 + </tr>
  42 + <tr>
  43 + <td style="width:75px;text-align: right;padding-top: 13px;">所属年级:</td>
  44 + <td><input type="text" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" maxlength="255" placeholder="这里输入所属年级" title="所属年级" style="width:98%;"/></td>
  45 + </tr>
  46 + <tr>
  47 + <td style="width:75px;text-align: right;padding-top: 13px;">教材版本号:</td>
  48 + <td><input type="text" name="VERSION_CODE" id="VERSION_CODE" value="${pd.VERSION_CODE}" maxlength="255" placeholder="这里输入教材版本号" title="教材版本号" style="width:98%;"/></td>
  49 + </tr>
  50 + <tr>
  51 + <td style="width:75px;text-align: right;padding-top: 13px;">教材版本名称:</td>
  52 + <td><input type="text" name="VERSION_NAME" id="VERSION_NAME" value="${pd.VERSION_NAME}" maxlength="255" placeholder="这里输入教材版本名称" title="教材版本名称" style="width:98%;"/></td>
  53 + </tr>
  54 + <tr>
  55 + <td style="text-align: center;" colspan="10">
  56 + <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
  57 + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
  58 + </td>
  59 + </tr>
  60 + </table>
  61 + </div>
  62 + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
  63 + </form>
  64 + </div>
  65 + <!-- /.col -->
  66 + </div>
  67 + <!-- /.row -->
  68 + </div>
  69 + <!-- /.page-content -->
  70 + </div>
  71 + </div>
  72 + <!-- /.main-content -->
  73 +</div>
  74 +<!-- /.main-container -->
  75 +
  76 +
  77 + <!-- 页面底部js¨ -->
  78 + <%@ include file="../../system/index/foot.jsp"%>
  79 + <!-- 下拉框 -->
  80 + <script src="static/ace/js/chosen.jquery.js"></script>
  81 + <!-- 日期框 -->
  82 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  83 + <!--提示框-->
  84 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  85 + <script type="text/javascript">
  86 + $(top.hangge());
  87 + //保存
  88 + function save(){
  89 + if($("#NAME").val()==""){
  90 + $("#NAME").tips({
  91 + side:3,
  92 + msg:'请输入教材名称',
  93 + bg:'#AE81FF',
  94 + time:2
  95 + });
  96 + $("#NAME").focus();
  97 + return false;
  98 + }
  99 + if($("#SUBJECT_ID").val()==""){
  100 + $("#SUBJECT_ID").tips({
  101 + side:3,
  102 + msg:'请输入所属科目',
  103 + bg:'#AE81FF',
  104 + time:2
  105 + });
  106 + $("#SUBJECT_ID").focus();
  107 + return false;
  108 + }
  109 + if($("#GRADE_ID").val()==""){
  110 + $("#GRADE_ID").tips({
  111 + side:3,
  112 + msg:'请输入所属年级',
  113 + bg:'#AE81FF',
  114 + time:2
  115 + });
  116 + $("#GRADE_ID").focus();
  117 + return false;
  118 + }
  119 + if($("#VERSION_CODE").val()==""){
  120 + $("#VERSION_CODE").tips({
  121 + side:3,
  122 + msg:'请输入教材版本号',
  123 + bg:'#AE81FF',
  124 + time:2
  125 + });
  126 + $("#VERSION_CODE").focus();
  127 + return false;
  128 + }
  129 + if($("#VERSION_NAME").val()==""){
  130 + $("#VERSION_NAME").tips({
  131 + side:3,
  132 + msg:'请输入教材版本名称',
  133 + bg:'#AE81FF',
  134 + time:2
  135 + });
  136 + $("#VERSION_NAME").focus();
  137 + return false;
  138 + }
  139 + $("#Form").submit();
  140 + $("#zhongxin").hide();
  141 + $("#zhongxin2").show();
  142 + }
  143 +
  144 + $(function() {
  145 + //日期框
  146 + $('.date-picker').datepicker({autoclose: true,todayHighlight: true});
  147 + });
  148 + </script>
  149 +</body>
  150 +</html>
0 \ No newline at end of file 151 \ No newline at end of file
WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_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="teachingmaterial/list.do" method="post" name="Form" id="Form">
  34 + <table style="margin-top:5px;">
  35 + <tr>
  36 + <td>
  37 + <div class="nav-search">
  38 + <span class="input-icon">
  39 + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/>
  40 + <i class="ace-icon fa fa-search nav-search-icon"></i>
  41 + </span>
  42 + </div>
  43 + </td>
  44 + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td>
  45 + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td>
  46 + <td style="vertical-align:top;padding-left:2px;">
  47 + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;">
  48 + <option value=""></option>
  49 + <option value="">全部</option>
  50 + <option value="">1</option>
  51 + <option value="">2</option>
  52 + </select>
  53 + </td>
  54 + <c:if test="${QX.cha == 1 }">
  55 + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
  56 + </c:if>
  57 + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if>
  58 + </tr>
  59 + </table>
  60 + <!-- 检索 -->
  61 +
  62 + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;">
  63 + <thead>
  64 + <tr>
  65 + <th class="center" style="width:35px;">
  66 + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label>
  67 + </th>
  68 + <th class="center" style="width:50px;">序号</th>
  69 + <th class="center">教材名称</th>
  70 + <th class="center">所属科目</th>
  71 + <th class="center">所属年级</th>
  72 + <th class="center">教材版本号</th>
  73 + <th class="center">教材版本名称</th>
  74 + <th class="center">操作</th>
  75 + </tr>
  76 + </thead>
  77 +
  78 + <tbody>
  79 + <!-- 开始循环 -->
  80 + <c:choose>
  81 + <c:when test="${not empty varList}">
  82 + <c:if test="${QX.cha == 1 }">
  83 + <c:forEach items="${varList}" var="var" varStatus="vs">
  84 + <tr>
  85 + <td class='center'>
  86 + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.TEACHINGMATERIAL_ID}" class="ace" /><span class="lbl"></span></label>
  87 + </td>
  88 + <td class='center' style="width: 30px;">${vs.index+1}</td>
  89 + <td class='center'>${var.NAME}</td>
  90 + <td class='center'>${var.SUBJECT_ID}</td>
  91 + <td class='center'>${var.GRADE_ID}</td>
  92 + <td class='center'>${var.VERSION_CODE}</td>
  93 + <td class='center'>${var.VERSION_NAME}</td>
  94 + <td class="center">
  95 + <c:if test="${QX.edit != 1 && QX.del != 1 }">
  96 + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
  97 + </c:if>
  98 + <div class="hidden-sm hidden-xs btn-group">
  99 + <c:if test="${QX.edit == 1 }">
  100 + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.TEACHINGMATERIAL_ID}');">
  101 + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i>
  102 + </a>
  103 + </c:if>
  104 + <c:if test="${QX.del == 1 }">
  105 + <a class="btn btn-xs btn-danger" onclick="del('${var.TEACHINGMATERIAL_ID}');">
  106 + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i>
  107 + </a>
  108 + </c:if>
  109 + </div>
  110 + <div class="hidden-md hidden-lg">
  111 + <div class="inline pos-rel">
  112 + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
  113 + <i class="ace-icon fa fa-cog icon-only bigger-110"></i>
  114 + </button>
  115 +
  116 + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
  117 + <c:if test="${QX.edit == 1 }">
  118 + <li>
  119 + <a style="cursor:pointer;" onclick="edit('${var.TEACHINGMATERIAL_ID}');" class="tooltip-success" data-rel="tooltip" title="修改">
  120 + <span class="green">
  121 + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
  122 + </span>
  123 + </a>
  124 + </li>
  125 + </c:if>
  126 + <c:if test="${QX.del == 1 }">
  127 + <li>
  128 + <a style="cursor:pointer;" onclick="del('${var.TEACHINGMATERIAL_ID}');" class="tooltip-error" data-rel="tooltip" title="删除">
  129 + <span class="red">
  130 + <i class="ace-icon fa fa-trash-o bigger-120"></i>
  131 + </span>
  132 + </a>
  133 + </li>
  134 + </c:if>
  135 + </ul>
  136 + </div>
  137 + </div>
  138 + </td>
  139 + </tr>
  140 +
  141 + </c:forEach>
  142 + </c:if>
  143 + <c:if test="${QX.cha == 0 }">
  144 + <tr>
  145 + <td colspan="100" class="center">您无权查看</td>
  146 + </tr>
  147 + </c:if>
  148 + </c:when>
  149 + <c:otherwise>
  150 + <tr class="main_info">
  151 + <td colspan="100" class="center" >没有相关数据</td>
  152 + </tr>
  153 + </c:otherwise>
  154 + </c:choose>
  155 + </tbody>
  156 + </table>
  157 + <div class="page-header position-relative">
  158 + <table style="width:100%;">
  159 + <tr>
  160 + <td style="vertical-align:top;">
  161 + <c:if test="${QX.add == 1 }">
  162 + <a class="btn btn-mini btn-success" onclick="add();">新增</a>
  163 + </c:if>
  164 + <c:if test="${QX.del == 1 }">
  165 + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a>
  166 + </c:if>
  167 + </td>
  168 + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td>
  169 + </tr>
  170 + </table>
  171 + </div>
  172 + </form>
  173 +
  174 + </div>
  175 + <!-- /.col -->
  176 + </div>
  177 + <!-- /.row -->
  178 + </div>
  179 + <!-- /.page-content -->
  180 + </div>
  181 + </div>
  182 + <!-- /.main-content -->
  183 +
  184 + <!-- 返回顶部 -->
  185 + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
  186 + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
  187 + </a>
  188 +
  189 + </div>
  190 + <!-- /.main-container -->
  191 +
  192 + <!-- basic scripts -->
  193 + <!-- 页面底部js¨ -->
  194 + <%@ include file="../../system/index/foot.jsp"%>
  195 + <!-- 删除时确认窗口 -->
  196 + <script src="static/ace/js/bootbox.js"></script>
  197 + <!-- ace scripts -->
  198 + <script src="static/ace/js/ace/ace.js"></script>
  199 + <!-- 下拉框 -->
  200 + <script src="static/ace/js/chosen.jquery.js"></script>
  201 + <!-- 日期框 -->
  202 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  203 + <!--提示框-->
  204 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  205 + <script type="text/javascript">
  206 + $(top.hangge());//关闭加载状态
  207 + //检索
  208 + function tosearch(){
  209 + top.jzts();
  210 + $("#Form").submit();
  211 + }
  212 + $(function() {
  213 +
  214 + //日期框
  215 + $('.date-picker').datepicker({
  216 + autoclose: true,
  217 + todayHighlight: true
  218 + });
  219 +
  220 + //下拉框
  221 + if(!ace.vars['touch']) {
  222 + $('.chosen-select').chosen({allow_single_deselect:true});
  223 + $(window)
  224 + .off('resize.chosen')
  225 + .on('resize.chosen', function() {
  226 + $('.chosen-select').each(function() {
  227 + var $this = $(this);
  228 + $this.next().css({'width': $this.parent().width()});
  229 + });
  230 + }).trigger('resize.chosen');
  231 + $(document).on('settings.ace.chosen', function(e, event_name, event_val) {
  232 + if(event_name != 'sidebar_collapsed') return;
  233 + $('.chosen-select').each(function() {
  234 + var $this = $(this);
  235 + $this.next().css({'width': $this.parent().width()});
  236 + });
  237 + });
  238 + $('#chosen-multiple-style .btn').on('click', function(e){
  239 + var target = $(this).find('input[type=radio]');
  240 + var which = parseInt(target.val());
  241 + if(which == 2) $('#form-field-select-4').addClass('tag-input-style');
  242 + else $('#form-field-select-4').removeClass('tag-input-style');
  243 + });
  244 + }
  245 +
  246 +
  247 + //复选框全选控制
  248 + var active_class = 'active';
  249 + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){
  250 + var th_checked = this.checked;//checkbox inside "TH" table header
  251 + $(this).closest('table').find('tbody > tr').each(function(){
  252 + var row = this;
  253 + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true);
  254 + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false);
  255 + });
  256 + });
  257 + });
  258 +
  259 + //新增
  260 + function add(){
  261 + top.jzts();
  262 + var diag = new top.Dialog();
  263 + diag.Drag=true;
  264 + diag.Title ="新增";
  265 + diag.URL = '<%=basePath%>teachingmaterial/goAdd.do';
  266 + diag.Width = 450;
  267 + diag.Height = 355;
  268 + diag.Modal = true; //有无遮罩窗口
  269 + diag. ShowMaxButton = true; //最大化按钮
  270 + diag.ShowMinButton = true; //最小化按钮
  271 + diag.CancelEvent = function(){ //关闭事件
  272 + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){
  273 + if('${page.currentPage}' == '0'){
  274 + tosearch();
  275 + }else{
  276 + tosearch();
  277 + }
  278 + }
  279 + diag.close();
  280 + };
  281 + diag.show();
  282 + }
  283 +
  284 + //删除
  285 + function del(Id){
  286 + bootbox.confirm("确定要删除吗?", function(result) {
  287 + if(result) {
  288 + top.jzts();
  289 + var url = "<%=basePath%>teachingmaterial/delete.do?TEACHINGMATERIAL_ID="+Id+"&tm="+new Date().getTime();
  290 + $.get(url,function(data){
  291 + tosearch();
  292 + });
  293 + }
  294 + });
  295 + }
  296 +
  297 + //修改
  298 + function edit(Id){
  299 + top.jzts();
  300 + var diag = new top.Dialog();
  301 + diag.Drag=true;
  302 + diag.Title ="编辑";
  303 + diag.URL = '<%=basePath%>teachingmaterial/goEdit.do?TEACHINGMATERIAL_ID='+Id;
  304 + diag.Width = 450;
  305 + diag.Height = 355;
  306 + diag.Modal = true; //有无遮罩窗口
  307 + diag. ShowMaxButton = true; //最大化按钮
  308 + diag.ShowMinButton = true; //最小化按钮
  309 + diag.CancelEvent = function(){ //关闭事件
  310 + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){
  311 + tosearch();
  312 + }
  313 + diag.close();
  314 + };
  315 + diag.show();
  316 + }
  317 +
  318 + //批量操作
  319 + function makeAll(msg){
  320 + bootbox.confirm(msg, function(result) {
  321 + if(result) {
  322 + var str = '';
  323 + for(var i=0;i < document.getElementsByName('ids').length;i++){
  324 + if(document.getElementsByName('ids')[i].checked){
  325 + if(str=='') str += document.getElementsByName('ids')[i].value;
  326 + else str += ',' + document.getElementsByName('ids')[i].value;
  327 + }
  328 + }
  329 + if(str==''){
  330 + bootbox.dialog({
  331 + message: "<span class='bigger-110'>您没有选择任何内容!</span>",
  332 + buttons:
  333 + { "button":{ "label":"确定", "className":"btn-sm btn-success"}}
  334 + });
  335 + $("#zcheckbox").tips({
  336 + side:1,
  337 + msg:'点这里全选',
  338 + bg:'#AE81FF',
  339 + time:8
  340 + });
  341 + return;
  342 + }else{
  343 + if(msg == '确定要删除选中的数据吗?'){
  344 + top.jzts();
  345 + $.ajax({
  346 + type: "POST",
  347 + url: '<%=basePath%>teachingmaterial/deleteAll.do?tm='+new Date().getTime(),
  348 + data: {DATA_IDS:str},
  349 + dataType:'json',
  350 + //beforeSend: validateData,
  351 + cache: false,
  352 + success: function(data){
  353 + $.each(data.list, function(i, list){
  354 + tosearch();
  355 + });
  356 + }
  357 + });
  358 + }
  359 + }
  360 + }
  361 + });
  362 + };
  363 +
  364 + //导出excel
  365 + function toExcel(){
  366 + window.location.href='<%=basePath%>teachingmaterial/excel.do';
  367 + }
  368 + </script>
  369 +
  370 +
  371 +</body>
  372 +</html>
0 \ No newline at end of file 373 \ No newline at end of file
WebRoot/WEB-INF/jsp/system/index/login.jsp
@@ -232,11 +232,11 @@ @@ -232,11 +232,11 @@
232 </c:forEach> 232 </c:forEach>
233 </c:when> 233 </c:when>
234 <c:otherwise> 234 <c:otherwise>
235 - <div data-src="static/login/images/banner_slide_01.jpg"></div>  
236 - <div data-src="static/login/images/banner_slide_02.jpg"></div> 235 + <div data-src="static/login/images/banner_slide_02.jpg"></div>
  236 + <!--<div data-src="static/login/images/banner_slide_01.jpg"></div>
237 <div data-src="static/login/images/banner_slide_03.jpg"></div> 237 <div data-src="static/login/images/banner_slide_03.jpg"></div>
238 <div data-src="static/login/images/banner_slide_04.jpg"></div> 238 <div data-src="static/login/images/banner_slide_04.jpg"></div>
239 - <div data-src="static/login/images/banner_slide_05.jpg"></div> 239 + <div data-src="static/login/images/banner_slide_05.jpg"></div> -->
240 </c:otherwise> 240 </c:otherwise>
241 </c:choose> 241 </c:choose>
242 </div> 242 </div>
@@ -249,7 +249,7 @@ @@ -249,7 +249,7 @@
249 if(check()){ 249 if(check()){
250 var loginname = $("#loginname").val(); 250 var loginname = $("#loginname").val();
251 var password = $("#password").val(); 251 var password = $("#password").val();
252 - var code = "qq313596790fh"+loginname+",fh,"+password+"QQ978336446fh"+",fh,"+$("#code").val(); 252 + var code = "elvis"+loginname+",fh,"+password+"elvis"+",fh,"+$("#code").val();
253 $.ajax({ 253 $.ajax({
254 type: "POST", 254 type: "POST",
255 url: 'login_login', 255 url: 'login_login',
resources/dbconfig.properties
1 #数据源 1 1 #数据源 1
2 -url:jdbc:mysql://localhost:3306/fhadmin?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 2 +url:jdbc:mysql://localhost:3306/sunvote?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
3 driverClassName:com.mysql.jdbc.Driver 3 driverClassName:com.mysql.jdbc.Driver
4 username:root 4 username:root
5 password:elvis 5 password:elvis
@@ -21,7 +21,7 @@ removeAbandonedTimeout:1800 @@ -21,7 +21,7 @@ removeAbandonedTimeout:1800
21 logAbandoned:true 21 logAbandoned:true
22 22
23 #数据源 2(没启用,不用管,文档大全里面有配置文档) 23 #数据源 2(没启用,不用管,文档大全里面有配置文档)
24 -url2:jdbc:mysql://localhost:3306/fhadmin2?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 24 +url2:jdbc:mysql://localhost:3306/sunvote2?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
25 driverClassName2:com.mysql.jdbc.Driver 25 driverClassName2:com.mysql.jdbc.Driver
26 username2:root 26 username2:root
27 password2:elvis 27 password2:elvis
resources/ftl/createCode/controllerTemplate.ftl
@@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; @@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager;
27 27
28 /** 28 /**
29 * 说明:${TITLE} 29 * 说明:${TITLE}
30 - * 创建人:FH Q313596790 30 + * 创建人:Elvis
31 * 创建时间:${nowDate?string("yyyy-MM-dd")} 31 * 创建时间:${nowDate?string("yyyy-MM-dd")}
32 */ 32 */
33 @Controller 33 @Controller
resources/ftl/createCode/managerTemplate.ftl
@@ -6,7 +6,7 @@ import com.fh.util.PageData; @@ -6,7 +6,7 @@ import com.fh.util.PageData;
6 6
7 /** 7 /**
8 * 说明: ${TITLE}接口 8 * 说明: ${TITLE}接口
9 - * 创建人:FH Q313596790 9 + * 创建人:Elvis
10 * 创建时间:${nowDate?string("yyyy-MM-dd")} 10 * 创建时间:${nowDate?string("yyyy-MM-dd")}
11 * @version 11 * @version
12 */ 12 */
resources/ftl/createFaCode/controllerTemplate.ftl
@@ -28,7 +28,7 @@ import com.fh.service.${packageName}.${objectNameLower}mx.${objectName}MxManager @@ -28,7 +28,7 @@ import com.fh.service.${packageName}.${objectNameLower}mx.${objectName}MxManager
28 28
29 /** 29 /**
30 * 说明:${TITLE} 30 * 说明:${TITLE}
31 - * 创建人:FH Q313596790 31 + * 创建人:Elvis
32 * 创建时间:${nowDate?string("yyyy-MM-dd")} 32 * 创建时间:${nowDate?string("yyyy-MM-dd")}
33 */ 33 */
34 @Controller 34 @Controller
resources/ftl/createFaCode/managerTemplate.ftl
@@ -6,7 +6,7 @@ import com.fh.util.PageData; @@ -6,7 +6,7 @@ import com.fh.util.PageData;
6 6
7 /** 7 /**
8 * 说明: ${TITLE}接口 8 * 说明: ${TITLE}接口
9 - * 创建人:FH Q313596790 9 + * 创建人:Elvis
10 * 创建时间:${nowDate?string("yyyy-MM-dd")} 10 * 创建时间:${nowDate?string("yyyy-MM-dd")}
11 * @version 11 * @version
12 */ 12 */
resources/ftl/createSoCode/controllerTemplate.ftl
@@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; @@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager;
27 27
28 /** 28 /**
29 * 说明:${TITLE} 29 * 说明:${TITLE}
30 - * 创建人:FH Q313596790 30 + * 创建人:Elvis
31 * 创建时间:${nowDate?string("yyyy-MM-dd")} 31 * 创建时间:${nowDate?string("yyyy-MM-dd")}
32 */ 32 */
33 @Controller 33 @Controller
resources/ftl/createSoCode/managerTemplate.ftl
@@ -6,7 +6,7 @@ import com.fh.util.PageData; @@ -6,7 +6,7 @@ import com.fh.util.PageData;
6 6
7 /** 7 /**
8 * 说明: ${TITLE}接口 8 * 说明: ${TITLE}接口
9 - * 创建人:FH Q313596790 9 + * 创建人:Elvis
10 * 创建时间:${nowDate?string("yyyy-MM-dd")} 10 * 创建时间:${nowDate?string("yyyy-MM-dd")}
11 * @version 11 * @version
12 */ 12 */
resources/ftl/createTreeCode/controllerTemplate.ftl
@@ -29,7 +29,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; @@ -29,7 +29,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager;
29 29
30 /** 30 /**
31 * 说明:${TITLE} 31 * 说明:${TITLE}
32 - * 创建人:FH Q313596790 32 + * 创建人:Elvis
33 * 创建时间:${nowDate?string("yyyy-MM-dd")} 33 * 创建时间:${nowDate?string("yyyy-MM-dd")}
34 */ 34 */
35 @Controller 35 @Controller
resources/ftl/createTreeCode/managerTemplate.ftl
@@ -7,7 +7,7 @@ import com.fh.util.PageData; @@ -7,7 +7,7 @@ import com.fh.util.PageData;
7 7
8 /** 8 /**
9 * 说明: ${TITLE}接口 9 * 说明: ${TITLE}接口
10 - * 创建人:FH Q313596790 10 + * 创建人:Elvis
11 * 创建时间:${nowDate?string("yyyy-MM-dd")} 11 * 创建时间:${nowDate?string("yyyy-MM-dd")}
12 * @version 12 * @version
13 */ 13 */
resources/ftl_backups/createCode/controllerTemplate.ftl
@@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; @@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager;
27 27
28 /** 28 /**
29 * 说明:${TITLE} 29 * 说明:${TITLE}
30 - * 创建人:FH Q313596790 30 + * 创建人:Elvis
31 * 创建时间:${nowDate?string("yyyy-MM-dd")} 31 * 创建时间:${nowDate?string("yyyy-MM-dd")}
32 */ 32 */
33 @Controller 33 @Controller
resources/ftl_backups/createCode/managerTemplate.ftl
@@ -6,7 +6,7 @@ import com.fh.util.PageData; @@ -6,7 +6,7 @@ import com.fh.util.PageData;
6 6
7 /** 7 /**
8 * 说明: ${TITLE}接口 8 * 说明: ${TITLE}接口
9 - * 创建人:FH Q313596790 9 + * 创建人:Elvis
10 * 创建时间:${nowDate?string("yyyy-MM-dd")} 10 * 创建时间:${nowDate?string("yyyy-MM-dd")}
11 * @version 11 * @version
12 */ 12 */
resources/ftl_backups/createCode/serviceTemplate.ftl
@@ -10,7 +10,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; @@ -10,7 +10,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager;
10 10
11 /** 11 /**
12 * 说明: ${TITLE} 12 * 说明: ${TITLE}
13 - * 创建人:FH Q313596790 13 + * 创建人:Elvis
14 * 创建时间:${nowDate?string("yyyy-MM-dd")} 14 * 创建时间:${nowDate?string("yyyy-MM-dd")}
15 * @version 15 * @version
16 */ 16 */
resources/ftl_backups/createFaCode/controllerTemplate.ftl
@@ -28,7 +28,7 @@ import com.fh.service.${packageName}.${objectNameLower}mx.${objectName}MxManager @@ -28,7 +28,7 @@ import com.fh.service.${packageName}.${objectNameLower}mx.${objectName}MxManager
28 28
29 /** 29 /**
30 * 说明:${TITLE} 30 * 说明:${TITLE}
31 - * 创建人:FH Q313596790 31 + * 创建人:Elvis
32 * 创建时间:${nowDate?string("yyyy-MM-dd")} 32 * 创建时间:${nowDate?string("yyyy-MM-dd")}
33 */ 33 */
34 @Controller 34 @Controller
resources/ftl_backups/createFaCode/managerTemplate.ftl
@@ -6,7 +6,7 @@ import com.fh.util.PageData; @@ -6,7 +6,7 @@ import com.fh.util.PageData;
6 6
7 /** 7 /**
8 * 说明: ${TITLE}接口 8 * 说明: ${TITLE}接口
9 - * 创建人:FH Q313596790 9 + * 创建人:Elvis
10 * 创建时间:${nowDate?string("yyyy-MM-dd")} 10 * 创建时间:${nowDate?string("yyyy-MM-dd")}
11 * @version 11 * @version
12 */ 12 */
resources/ftl_backups/createSoCode/controllerTemplate.ftl
@@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; @@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager;
27 27
28 /** 28 /**
29 * 说明:${TITLE} 29 * 说明:${TITLE}
30 - * 创建人:FH Q313596790 30 + * 创建人:Elvis
31 * 创建时间:${nowDate?string("yyyy-MM-dd")} 31 * 创建时间:${nowDate?string("yyyy-MM-dd")}
32 */ 32 */
33 @Controller 33 @Controller
resources/ftl_backups/createSoCode/managerTemplate.ftl
@@ -6,7 +6,7 @@ import com.fh.util.PageData; @@ -6,7 +6,7 @@ import com.fh.util.PageData;
6 6
7 /** 7 /**
8 * 说明: ${TITLE}接口 8 * 说明: ${TITLE}接口
9 - * 创建人:FH Q313596790 9 + * 创建人:Elvis
10 * 创建时间:${nowDate?string("yyyy-MM-dd")} 10 * 创建时间:${nowDate?string("yyyy-MM-dd")}
11 * @version 11 * @version
12 */ 12 */
resources/ftl_backups/createTreeCode/controllerTemplate.ftl
@@ -29,7 +29,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; @@ -29,7 +29,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager;
29 29
30 /** 30 /**
31 * 说明:${TITLE} 31 * 说明:${TITLE}
32 - * 创建人:FH Q313596790 32 + * 创建人:Elvis
33 * 创建时间:${nowDate?string("yyyy-MM-dd")} 33 * 创建时间:${nowDate?string("yyyy-MM-dd")}
34 */ 34 */
35 @Controller 35 @Controller
resources/ftl_backups/createTreeCode/managerTemplate.ftl
@@ -7,7 +7,7 @@ import com.fh.util.PageData; @@ -7,7 +7,7 @@ import com.fh.util.PageData;
7 7
8 /** 8 /**
9 * 说明: ${TITLE}接口 9 * 说明: ${TITLE}接口
10 - * 创建人:FH Q313596790 10 + * 创建人:Elvis
11 * 创建时间:${nowDate?string("yyyy-MM-dd")} 11 * 创建时间:${nowDate?string("yyyy-MM-dd")}
12 * @version 12 * @version
13 */ 13 */
resources/mybatis1/sunvote/BasestationMapper.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="BasestationMapper">
  4 +
  5 + <!--表名 -->
  6 + <sql id="tableName">
  7 + SV_BASESTATION
  8 + </sql>
  9 +
  10 + <!-- 字段 -->
  11 + <sql id="Field">
  12 + NAME,
  13 + NO,
  14 + MATCH_CODE,
  15 + KEYPAD_MODE,
  16 + WORK_MODE,
  17 + PRODUCTION_TIME,
  18 + IS_OK,
  19 + REMARK,
  20 + BASESTATION_ID
  21 + </sql>
  22 +
  23 + <!-- 字段值 -->
  24 + <sql id="FieldValue">
  25 + #{NAME},
  26 + #{NO},
  27 + #{MATCH_CODE},
  28 + #{KEYPAD_MODE},
  29 + #{WORK_MODE},
  30 + #{PRODUCTION_TIME},
  31 + #{IS_OK},
  32 + #{REMARK},
  33 + #{BASESTATION_ID}
  34 + </sql>
  35 +
  36 + <!-- 新增-->
  37 + <insert id="save" parameterType="pd">
  38 + insert into
  39 + <include refid="tableName"></include>
  40 + (
  41 + NAME,
  42 + NO,
  43 + MATCH_CODE,
  44 + KEYPAD_MODE,
  45 + WORK_MODE,
  46 + PRODUCTION_TIME,
  47 + IS_OK,
  48 + REMARK
  49 + ) values (
  50 + #{NAME},
  51 + #{NO},
  52 + #{MATCH_CODE},
  53 + #{KEYPAD_MODE},
  54 + #{WORK_MODE},
  55 + #{PRODUCTION_TIME},
  56 + #{IS_OK},
  57 + #{REMARK}
  58 + )
  59 + </insert>
  60 +
  61 + <!-- 删除-->
  62 + <delete id="delete" parameterType="pd">
  63 + delete from
  64 + <include refid="tableName"></include>
  65 + where
  66 + BASESTATION_ID = #{BASESTATION_ID}
  67 + </delete>
  68 +
  69 + <!-- 修改 -->
  70 + <update id="edit" parameterType="pd">
  71 + update
  72 + <include refid="tableName"></include>
  73 + set
  74 + NAME = #{NAME},
  75 + NO = #{NO},
  76 + MATCH_CODE = #{MATCH_CODE},
  77 + KEYPAD_MODE = #{KEYPAD_MODE},
  78 + WORK_MODE = #{WORK_MODE},
  79 + PRODUCTION_TIME = #{PRODUCTION_TIME},
  80 + IS_OK = #{IS_OK},
  81 + REMARK = #{REMARK},
  82 + BASESTATION_ID = BASESTATION_ID
  83 + where
  84 + BASESTATION_ID = #{BASESTATION_ID}
  85 + </update>
  86 +
  87 + <!-- 通过ID获取数据 -->
  88 + <select id="findById" parameterType="pd" resultType="pd">
  89 + select
  90 + <include refid="Field"></include>
  91 + from
  92 + <include refid="tableName"></include>
  93 + where
  94 + BASESTATION_ID = #{BASESTATION_ID}
  95 + </select>
  96 +
  97 + <!-- 列表 -->
  98 + <select id="datalistPage" parameterType="page" resultType="pd">
  99 + select
  100 + <include refid="Field"></include>
  101 + from
  102 + <include refid="tableName"></include>
  103 + where 1=1
  104 + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 -->
  105 + and
  106 + (
  107 + <!-- 根据需求自己加检索条件
  108 + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  109 + or
  110 + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  111 + -->
  112 + )
  113 + </if>
  114 + </select>
  115 +
  116 + <!-- 列表(全部) -->
  117 + <select id="listAll" parameterType="pd" resultType="pd">
  118 + select
  119 + <include refid="Field"></include>
  120 + from
  121 + <include refid="tableName"></include>
  122 + </select>
  123 +
  124 + <!-- 批量删除 -->
  125 + <delete id="deleteAll" parameterType="String">
  126 + delete from
  127 + <include refid="tableName"></include>
  128 + where
  129 + BASESTATION_ID in
  130 + <foreach item="item" index="index" collection="array" open="(" separator="," close=")">
  131 + #{item}
  132 + </foreach>
  133 + </delete>
  134 +
  135 + <!-- fh313596790qq(青苔) -->
  136 +</mapper>
0 \ No newline at end of file 137 \ No newline at end of file
resources/mybatis1/sunvote/SchoolMapper.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="SchoolMapper">
  4 +
  5 + <!--表名 -->
  6 + <sql id="tableName">
  7 + SV_SCHOOL
  8 + </sql>
  9 +
  10 + <!-- 字段 -->
  11 + <sql id="Field">
  12 + NAME,
  13 + ADDRESS,
  14 + PRESIDENT,
  15 + PHONE,
  16 + REMARK,
  17 + SCHOOL_ID
  18 + </sql>
  19 +
  20 + <!-- 字段值 -->
  21 + <sql id="FieldValue">
  22 + #{NAME},
  23 + #{ADDRESS},
  24 + #{PRESIDENT},
  25 + #{PHONE},
  26 + #{REMARK},
  27 + #{SCHOOL_ID}
  28 + </sql>
  29 +
  30 + <!-- 新增-->
  31 + <insert id="save" parameterType="pd">
  32 + insert into
  33 + <include refid="tableName"></include>
  34 + (
  35 + NAME,
  36 + ADDRESS,
  37 + PRESIDENT,
  38 + PHONE,
  39 + REMARK
  40 + ) values (
  41 + #{NAME},
  42 + #{ADDRESS},
  43 + #{PRESIDENT},
  44 + #{PHONE},
  45 + #{REMARK}
  46 + )
  47 + </insert>
  48 +
  49 + <!-- 删除-->
  50 + <delete id="delete" parameterType="pd">
  51 + delete from
  52 + <include refid="tableName"></include>
  53 + where
  54 + SCHOOL_ID = #{SCHOOL_ID}
  55 + </delete>
  56 +
  57 + <!-- 修改 -->
  58 + <update id="edit" parameterType="pd">
  59 + update
  60 + <include refid="tableName"></include>
  61 + set
  62 + NAME = #{NAME},
  63 + ADDRESS = #{ADDRESS},
  64 + PRESIDENT = #{PRESIDENT},
  65 + PHONE = #{PHONE},
  66 + REMARK = #{REMARK},
  67 + SCHOOL_ID = SCHOOL_ID
  68 + where
  69 + SCHOOL_ID = #{SCHOOL_ID}
  70 + </update>
  71 +
  72 + <!-- 通过ID获取数据 -->
  73 + <select id="findById" parameterType="pd" resultType="pd">
  74 + select
  75 + <include refid="Field"></include>
  76 + from
  77 + <include refid="tableName"></include>
  78 + where
  79 + SCHOOL_ID = #{SCHOOL_ID}
  80 + </select>
  81 +
  82 + <!-- 列表 -->
  83 + <select id="datalistPage" parameterType="page" resultType="pd">
  84 + select
  85 + <include refid="Field"></include>
  86 + from
  87 + <include refid="tableName"></include>
  88 + where 1=1
  89 + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 -->
  90 + and
  91 + (
  92 + <!-- 根据需求自己加检索条件
  93 + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  94 + or
  95 + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  96 + -->
  97 + )
  98 + </if>
  99 + </select>
  100 +
  101 + <!-- 列表(全部) -->
  102 + <select id="listAll" parameterType="pd" resultType="pd">
  103 + select
  104 + <include refid="Field"></include>
  105 + from
  106 + <include refid="tableName"></include>
  107 + </select>
  108 +
  109 + <!-- 批量删除 -->
  110 + <delete id="deleteAll" parameterType="String">
  111 + delete from
  112 + <include refid="tableName"></include>
  113 + where
  114 + SCHOOL_ID in
  115 + <foreach item="item" index="index" collection="array" open="(" separator="," close=")">
  116 + #{item}
  117 + </foreach>
  118 + </delete>
  119 +
  120 + <!-- fh313596790qq(青苔) -->
  121 +</mapper>
0 \ No newline at end of file 122 \ No newline at end of file
resources/mybatis1/sunvote/TeachingMaterialMapper.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="TeachingMaterialMapper">
  4 +
  5 + <!--表名 -->
  6 + <sql id="tableName">
  7 + SV_TEACHINGMATERIAL
  8 + </sql>
  9 +
  10 + <!-- 字段 -->
  11 + <sql id="Field">
  12 + NAME,
  13 + SUBJECT_ID,
  14 + GRADE_ID,
  15 + VERSION_CODE,
  16 + VERSION_NAME,
  17 + TEACHINGMATERIAL_ID
  18 + </sql>
  19 +
  20 + <!-- 字段值 -->
  21 + <sql id="FieldValue">
  22 + #{NAME},
  23 + #{SUBJECT_ID},
  24 + #{GRADE_ID},
  25 + #{VERSION_CODE},
  26 + #{VERSION_NAME},
  27 + #{TEACHINGMATERIAL_ID}
  28 + </sql>
  29 +
  30 + <!-- 新增-->
  31 + <insert id="save" parameterType="pd">
  32 + insert into
  33 + <include refid="tableName"></include>
  34 + (
  35 + <include refid="Field"></include>
  36 + ) values (
  37 + <include refid="FieldValue"></include>
  38 + )
  39 + </insert>
  40 +
  41 + <!-- 删除-->
  42 + <delete id="delete" parameterType="pd">
  43 + delete from
  44 + <include refid="tableName"></include>
  45 + where
  46 + TEACHINGMATERIAL_ID = #{TEACHINGMATERIAL_ID}
  47 + </delete>
  48 +
  49 + <!-- 修改 -->
  50 + <update id="edit" parameterType="pd">
  51 + update
  52 + <include refid="tableName"></include>
  53 + set
  54 + NAME = #{NAME},
  55 + SUBJECT_ID = #{SUBJECT_ID},
  56 + GRADE_ID = #{GRADE_ID},
  57 + VERSION_CODE = #{VERSION_CODE},
  58 + VERSION_NAME = #{VERSION_NAME},
  59 + TEACHINGMATERIAL_ID = TEACHINGMATERIAL_ID
  60 + where
  61 + TEACHINGMATERIAL_ID = #{TEACHINGMATERIAL_ID}
  62 + </update>
  63 +
  64 + <!-- 通过ID获取数据 -->
  65 + <select id="findById" parameterType="pd" resultType="pd">
  66 + select
  67 + <include refid="Field"></include>
  68 + from
  69 + <include refid="tableName"></include>
  70 + where
  71 + TEACHINGMATERIAL_ID = #{TEACHINGMATERIAL_ID}
  72 + </select>
  73 +
  74 + <!-- 列表 -->
  75 + <select id="datalistPage" parameterType="page" resultType="pd">
  76 + select
  77 + <include refid="Field"></include>
  78 + from
  79 + <include refid="tableName"></include>
  80 + where 1=1
  81 + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 -->
  82 + and
  83 + (
  84 + <!-- 根据需求自己加检索条件
  85 + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  86 + or
  87 + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  88 + -->
  89 + )
  90 + </if>
  91 + </select>
  92 +
  93 + <!-- 列表(全部) -->
  94 + <select id="listAll" parameterType="pd" resultType="pd">
  95 + select
  96 + <include refid="Field"></include>
  97 + from
  98 + <include refid="tableName"></include>
  99 + </select>
  100 +
  101 + <!-- 批量删除 -->
  102 + <delete id="deleteAll" parameterType="String">
  103 + delete from
  104 + <include refid="tableName"></include>
  105 + where
  106 + TEACHINGMATERIAL_ID in
  107 + <foreach item="item" index="index" collection="array" open="(" separator="," close=")">
  108 + #{item}
  109 + </foreach>
  110 + </delete>
  111 +
  112 + <!-- fh313596790qq(青苔) -->
  113 +</mapper>
0 \ No newline at end of file 114 \ No newline at end of file
resources/spring/ApplicationContext-shiro.xml
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
41 /code.do = anon 41 /code.do = anon
42 /login_login = anon 42 /login_login = anon
43 /app**/** = anon 43 /app**/** = anon
  44 + /api/** = anon
44 /weixin/** = anon 45 /weixin/** = anon
45 /** = authc 46 /** = authc
46 </value> 47 </value>
src/com/fh/controller/api/ApiServer.java 0 → 100644
  1 +package com.fh.controller.api;
  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 +
  11 +import com.fh.controller.base.BaseController;
  12 +import com.fh.service.sunvote.basestation.BasestationManager;
  13 +import com.fh.service.sunvote.school.SchoolManager;
  14 +import com.fh.util.Jurisdiction;
  15 +import com.fh.util.PageData;
  16 +import com.google.gson.Gson;
  17 +
  18 +@Controller
  19 +@RequestMapping(value="/api")
  20 +public class ApiServer extends BaseController {
  21 +
  22 + @Resource(name="schoolService")
  23 + private SchoolManager schoolService;
  24 +
  25 + @Resource(name="basestationService")
  26 + private BasestationManager basestationService;
  27 +
  28 +
  29 + @RequestMapping(value="/school" ,produces="application/json;charset=UTF-8")
  30 + @ResponseBody
  31 + public Object school() throws Exception{
  32 + PageData pd = this.getPageData();
  33 + String id = pd.getString("id");
  34 + if(id != null && !"".equals(id)){
  35 + pd.put("SCHOOL_ID", pd.getString("id"));
  36 + PageData ret = schoolService.findById(pd);
  37 + Gson gson = new Gson();
  38 + return gson.toJson(ret);
  39 + }else{
  40 + List<PageData> ret = schoolService.listAll(pd);
  41 + Gson gson = new Gson();
  42 + return gson.toJson(ret);
  43 + }
  44 +
  45 + }
  46 +
  47 + @RequestMapping(value="/basestation" ,produces="application/json;charset=UTF-8")
  48 + @ResponseBody
  49 + public Object basestation() throws Exception{
  50 + PageData pd = this.getPageData();
  51 + String id = pd.getString("id");
  52 + if(id != null && !"".equals(id)){
  53 + pd.put("BASESTATION_ID", pd.getString("id"));
  54 + PageData ret = basestationService.findById(pd);
  55 + Gson gson = new Gson();
  56 + return gson.toJson(ret);
  57 + }else{
  58 + List<PageData> ret = basestationService.listAll(pd);
  59 + Gson gson = new Gson();
  60 + return gson.toJson(ret);
  61 + }
  62 +
  63 + }
  64 +}
src/com/fh/controller/base/BaseController.java
@@ -3,11 +3,15 @@ package com.fh.controller.base; @@ -3,11 +3,15 @@ package com.fh.controller.base;
3 3
4 import javax.servlet.http.HttpServletRequest; 4 import javax.servlet.http.HttpServletRequest;
5 5
  6 +import org.apache.shiro.session.Session;
6 import org.springframework.web.context.request.RequestContextHolder; 7 import org.springframework.web.context.request.RequestContextHolder;
7 import org.springframework.web.context.request.ServletRequestAttributes; 8 import org.springframework.web.context.request.ServletRequestAttributes;
8 import org.springframework.web.servlet.ModelAndView; 9 import org.springframework.web.servlet.ModelAndView;
9 10
10 import com.fh.entity.Page; 11 import com.fh.entity.Page;
  12 +import com.fh.entity.system.User;
  13 +import com.fh.util.Const;
  14 +import com.fh.util.Jurisdiction;
11 import com.fh.util.Logger; 15 import com.fh.util.Logger;
12 import com.fh.util.PageData; 16 import com.fh.util.PageData;
13 import com.fh.util.UuidUtil; 17 import com.fh.util.UuidUtil;
@@ -69,4 +73,13 @@ public class BaseController { @@ -69,4 +73,13 @@ public class BaseController {
69 logger.info(""); 73 logger.info("");
70 } 74 }
71 75
  76 +
  77 + public String getUsername(){
  78 + Session session = Jurisdiction.getSession();
  79 + User user = (User)session.getAttribute(Const.SESSION_USER);
  80 + if(user != null){
  81 + return user.getUSERNAME();
  82 + }
  83 + return "ERROR";
  84 + }
72 } 85 }
src/com/fh/controller/sunvote/basestation/BasestationController.java 0 → 100644
  1 +package com.fh.controller.sunvote.basestation;
  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.basestation.BasestationManager;
  27 +
  28 +/**
  29 + * 说明:基站管理
  30 + * 创建人:Elvis
  31 + * 创建时间:2018-04-19
  32 + */
  33 +@Controller
  34 +@RequestMapping(value="/basestation")
  35 +public class BasestationController extends BaseController {
  36 +
  37 + String menuUrl = "basestation/list.do"; //菜单地址(权限用)
  38 + @Resource(name="basestationService")
  39 + private BasestationManager basestationService;
  40 +
  41 + /**保存
  42 + * @param
  43 + * @throws Exception
  44 + */
  45 + @RequestMapping(value="/save")
  46 + public ModelAndView save() throws Exception{
  47 + logBefore(logger, Jurisdiction.getUsername()+"新增Basestation");
  48 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限
  49 + ModelAndView mv = this.getModelAndView();
  50 + PageData pd = new PageData();
  51 + pd = this.getPageData();
  52 + basestationService.save(pd);
  53 + mv.addObject("msg","success");
  54 + mv.setViewName("save_result");
  55 + return mv;
  56 + }
  57 +
  58 + /**删除
  59 + * @param out
  60 + * @throws Exception
  61 + */
  62 + @RequestMapping(value="/delete")
  63 + public void delete(PrintWriter out) throws Exception{
  64 + logBefore(logger, Jurisdiction.getUsername()+"删除Basestation");
  65 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限
  66 + PageData pd = new PageData();
  67 + pd = this.getPageData();
  68 + basestationService.delete(pd);
  69 + out.write("success");
  70 + out.close();
  71 + }
  72 +
  73 + /**修改
  74 + * @param
  75 + * @throws Exception
  76 + */
  77 + @RequestMapping(value="/edit")
  78 + public ModelAndView edit() throws Exception{
  79 + logBefore(logger, Jurisdiction.getUsername()+"修改Basestation");
  80 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限
  81 + ModelAndView mv = this.getModelAndView();
  82 + PageData pd = new PageData();
  83 + pd = this.getPageData();
  84 + basestationService.edit(pd);
  85 + mv.addObject("msg","success");
  86 + mv.setViewName("save_result");
  87 + return mv;
  88 + }
  89 +
  90 + /**列表
  91 + * @param page
  92 + * @throws Exception
  93 + */
  94 + @RequestMapping(value="/list")
  95 + public ModelAndView list(Page page) throws Exception{
  96 + logBefore(logger, Jurisdiction.getUsername()+"列表Basestation");
  97 + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
  98 + ModelAndView mv = this.getModelAndView();
  99 + PageData pd = new PageData();
  100 + pd = this.getPageData();
  101 + String keywords = pd.getString("keywords"); //关键词检索条件
  102 + if(null != keywords && !"".equals(keywords)){
  103 + pd.put("keywords", keywords.trim());
  104 + }
  105 + page.setPd(pd);
  106 + List<PageData> varList = basestationService.list(page); //列出Basestation列表
  107 + mv.setViewName("sunvote/basestation/basestation_list");
  108 + mv.addObject("varList", varList);
  109 + mv.addObject("pd", pd);
  110 + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
  111 + return mv;
  112 + }
  113 +
  114 + /**去新增页面
  115 + * @param
  116 + * @throws Exception
  117 + */
  118 + @RequestMapping(value="/goAdd")
  119 + public ModelAndView goAdd()throws Exception{
  120 + ModelAndView mv = this.getModelAndView();
  121 + PageData pd = new PageData();
  122 + pd = this.getPageData();
  123 + mv.setViewName("sunvote/basestation/basestation_edit");
  124 + mv.addObject("msg", "save");
  125 + mv.addObject("pd", pd);
  126 + return mv;
  127 + }
  128 +
  129 + /**去修改页面
  130 + * @param
  131 + * @throws Exception
  132 + */
  133 + @RequestMapping(value="/goEdit")
  134 + public ModelAndView goEdit()throws Exception{
  135 + ModelAndView mv = this.getModelAndView();
  136 + PageData pd = new PageData();
  137 + pd = this.getPageData();
  138 + pd = basestationService.findById(pd); //根据ID读取
  139 + mv.setViewName("sunvote/basestation/basestation_edit");
  140 + mv.addObject("msg", "edit");
  141 + mv.addObject("pd", pd);
  142 + return mv;
  143 + }
  144 +
  145 + /**批量删除
  146 + * @param
  147 + * @throws Exception
  148 + */
  149 + @RequestMapping(value="/deleteAll")
  150 + @ResponseBody
  151 + public Object deleteAll() throws Exception{
  152 + logBefore(logger, Jurisdiction.getUsername()+"批量删除Basestation");
  153 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
  154 + PageData pd = new PageData();
  155 + Map<String,Object> map = new HashMap<String,Object>();
  156 + pd = this.getPageData();
  157 + List<PageData> pdList = new ArrayList<PageData>();
  158 + String DATA_IDS = pd.getString("DATA_IDS");
  159 + if(null != DATA_IDS && !"".equals(DATA_IDS)){
  160 + String ArrayDATA_IDS[] = DATA_IDS.split(",");
  161 + basestationService.deleteAll(ArrayDATA_IDS);
  162 + pd.put("msg", "ok");
  163 + }else{
  164 + pd.put("msg", "no");
  165 + }
  166 + pdList.add(pd);
  167 + map.put("list", pdList);
  168 + return AppUtil.returnObject(pd, map);
  169 + }
  170 +
  171 + /**导出到excel
  172 + * @param
  173 + * @throws Exception
  174 + */
  175 + @RequestMapping(value="/excel")
  176 + public ModelAndView exportExcel() throws Exception{
  177 + logBefore(logger, Jurisdiction.getUsername()+"导出Basestation到excel");
  178 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
  179 + ModelAndView mv = new ModelAndView();
  180 + PageData pd = new PageData();
  181 + pd = this.getPageData();
  182 + Map<String,Object> dataMap = new HashMap<String,Object>();
  183 + List<String> titles = new ArrayList<String>();
  184 + titles.add("基站名称"); //1
  185 + titles.add("基站编号"); //2
  186 + titles.add("配对码"); //3
  187 + titles.add("键盘模式"); //4
  188 + titles.add("工作模式"); //5
  189 + titles.add("生产时间"); //6
  190 + titles.add("是否正常"); //7
  191 + titles.add("备注"); //8
  192 + dataMap.put("titles", titles);
  193 + List<PageData> varOList = basestationService.listAll(pd);
  194 + List<PageData> varList = new ArrayList<PageData>();
  195 + for(int i=0;i<varOList.size();i++){
  196 + PageData vpd = new PageData();
  197 + vpd.put("var1", varOList.get(i).getString("NAME")); //1
  198 + vpd.put("var2", varOList.get(i).getString("NO")); //2
  199 + vpd.put("var3", varOList.get(i).getString("MATCH_CODE")); //3
  200 + vpd.put("var4", varOList.get(i).getString("KEYPAD_MODE")); //4
  201 + vpd.put("var5", varOList.get(i).getString("WORK_MODE")); //5
  202 + vpd.put("var6", varOList.get(i).getString("PRODUCTION_TIME")); //6
  203 + vpd.put("var7", varOList.get(i).get("IS_OK").toString()); //7
  204 + vpd.put("var8", varOList.get(i).getString("REMARK")); //8
  205 + varList.add(vpd);
  206 + }
  207 + dataMap.put("varList", varList);
  208 + ObjectExcelView erv = new ObjectExcelView();
  209 + mv = new ModelAndView(erv,dataMap);
  210 + return mv;
  211 + }
  212 +
  213 + @InitBinder
  214 + public void initBinder(WebDataBinder binder){
  215 + DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
  216 + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true));
  217 + }
  218 +}
src/com/fh/controller/sunvote/school/SchoolController.java 0 → 100644
  1 +package com.fh.controller.sunvote.school;
  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.school.SchoolManager;
  25 +import com.fh.service.system.fhlog.FHlogManager;
  26 +import com.fh.util.AppUtil;
  27 +import com.fh.util.Jurisdiction;
  28 +import com.fh.util.ObjectExcelView;
  29 +import com.fh.util.PageData;
  30 +import com.google.gson.Gson;
  31 +
  32 +/**
  33 + * 说明:学校
  34 + * 创建人:Elvis
  35 + * 创建时间:2018-04-18
  36 + */
  37 +@Controller
  38 +@RequestMapping(value="/school")
  39 +public class SchoolController extends BaseController {
  40 +
  41 + String menuUrl = "school/list.do"; //菜单地址(权限用)
  42 + @Resource(name="schoolService")
  43 + private SchoolManager schoolService;
  44 +
  45 + @Resource(name="fhlogService")
  46 + private FHlogManager FHLOG;
  47 +
  48 + /**保存
  49 + * @param
  50 + * @throws Exception
  51 + */
  52 + @RequestMapping(value="/save")
  53 + public ModelAndView save() throws Exception{
  54 + logBefore(logger, Jurisdiction.getUsername()+"新增学校");
  55 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限
  56 + ModelAndView mv = this.getModelAndView();
  57 + PageData pd = new PageData();
  58 + pd = this.getPageData();
  59 + FHLOG.save(getUsername(), "新增学校:" + pd.getString("NAME"));
  60 + schoolService.save(pd);
  61 + mv.addObject("msg","success");
  62 + mv.setViewName("save_result");
  63 + return mv;
  64 + }
  65 +
  66 +
  67 +
  68 + /**删除
  69 + * @param out
  70 + * @throws Exception
  71 + */
  72 + @RequestMapping(value="/delete")
  73 + public void delete(PrintWriter out) throws Exception{
  74 + logBefore(logger, Jurisdiction.getUsername()+"删除学校");
  75 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限
  76 + PageData pd = new PageData();
  77 + pd = this.getPageData();
  78 + FHLOG.save(getUsername(), "删除学校:" + pd.getString("NAME"));
  79 + schoolService.delete(pd);
  80 + out.write("success");
  81 + out.close();
  82 + }
  83 +
  84 + /**修改
  85 + * @param
  86 + * @throws Exception
  87 + */
  88 + @RequestMapping(value="/edit")
  89 + public ModelAndView edit() throws Exception{
  90 + logBefore(logger, Jurisdiction.getUsername()+"修改学校");
  91 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限
  92 + ModelAndView mv = this.getModelAndView();
  93 + PageData pd = new PageData();
  94 + pd = this.getPageData();
  95 + FHLOG.save(getUsername(), "修改学校:" + pd.getString("NAME"));
  96 + schoolService.edit(pd);
  97 + mv.addObject("msg","success");
  98 + mv.setViewName("save_result");
  99 + return mv;
  100 + }
  101 +
  102 + /**列表
  103 + * @param page
  104 + * @throws Exception
  105 + */
  106 + @RequestMapping(value="/list")
  107 + public ModelAndView list(Page page) throws Exception{
  108 + logBefore(logger, Jurisdiction.getUsername()+"列表学校");
  109 + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
  110 + ModelAndView mv = this.getModelAndView();
  111 + PageData pd = new PageData();
  112 + pd = this.getPageData();
  113 + String keywords = pd.getString("keywords"); //关键词检索条件
  114 + if(null != keywords && !"".equals(keywords)){
  115 + pd.put("keywords", keywords.trim());
  116 + }
  117 + page.setPd(pd);
  118 + List<PageData> varList = schoolService.list(page); //列出School列表
  119 + mv.setViewName("sunvote/school/school_list");
  120 + mv.addObject("varList", varList);
  121 + mv.addObject("pd", pd);
  122 + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
  123 + return mv;
  124 + }
  125 +
  126 + /**去新增页面
  127 + * @param
  128 + * @throws Exception
  129 + */
  130 + @RequestMapping(value="/goAdd")
  131 + public ModelAndView goAdd()throws Exception{
  132 + ModelAndView mv = this.getModelAndView();
  133 + PageData pd = new PageData();
  134 + pd = this.getPageData();
  135 + mv.setViewName("sunvote/school/school_edit");
  136 + mv.addObject("msg", "save");
  137 + mv.addObject("pd", pd);
  138 + return mv;
  139 + }
  140 +
  141 + /**去修改页面
  142 + * @param
  143 + * @throws Exception
  144 + */
  145 + @RequestMapping(value="/goEdit")
  146 + public ModelAndView goEdit()throws Exception{
  147 + ModelAndView mv = this.getModelAndView();
  148 + PageData pd = new PageData();
  149 + pd = this.getPageData();
  150 + pd = schoolService.findById(pd); //根据ID读取
  151 + mv.setViewName("sunvote/school/school_edit");
  152 + mv.addObject("msg", "edit");
  153 + mv.addObject("pd", pd);
  154 + return mv;
  155 + }
  156 +
  157 + /**批量删除
  158 + * @param
  159 + * @throws Exception
  160 + */
  161 + @RequestMapping(value="/deleteAll")
  162 + @ResponseBody
  163 + public Object deleteAll() throws Exception{
  164 + logBefore(logger, Jurisdiction.getUsername()+"批量删除学校");
  165 + FHLOG.save(getUsername(), "批量删除学校");
  166 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
  167 + PageData pd = new PageData();
  168 + Map<String,Object> map = new HashMap<String,Object>();
  169 + pd = this.getPageData();
  170 + List<PageData> pdList = new ArrayList<PageData>();
  171 + String DATA_IDS = pd.getString("DATA_IDS");
  172 + if(null != DATA_IDS && !"".equals(DATA_IDS)){
  173 + String ArrayDATA_IDS[] = DATA_IDS.split(",");
  174 + schoolService.deleteAll(ArrayDATA_IDS);
  175 + pd.put("msg", "ok");
  176 + }else{
  177 + pd.put("msg", "no");
  178 + }
  179 + pdList.add(pd);
  180 + map.put("list", pdList);
  181 + return AppUtil.returnObject(pd, map);
  182 + }
  183 +
  184 + /**导出到excel
  185 + * @param
  186 + * @throws Exception
  187 + */
  188 + @RequestMapping(value="/excel")
  189 + public ModelAndView exportExcel() throws Exception{
  190 + logBefore(logger, Jurisdiction.getUsername()+"导出School到excel");
  191 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
  192 + ModelAndView mv = new ModelAndView();
  193 + PageData pd = new PageData();
  194 + pd = this.getPageData();
  195 + Map<String,Object> dataMap = new HashMap<String,Object>();
  196 + List<String> titles = new ArrayList<String>();
  197 + titles.add("学校名称"); //1
  198 + titles.add("学校地址"); //2
  199 + titles.add("校长"); //3
  200 + titles.add("联系电话"); //4
  201 + titles.add("备注"); //5
  202 + dataMap.put("titles", titles);
  203 + List<PageData> varOList = schoolService.listAll(pd);
  204 + List<PageData> varList = new ArrayList<PageData>();
  205 + for(int i=0;i<varOList.size();i++){
  206 + PageData vpd = new PageData();
  207 + vpd.put("var1", varOList.get(i).getString("NAME")); //1
  208 + vpd.put("var2", varOList.get(i).getString("ADDRESS")); //2
  209 + vpd.put("var3", varOList.get(i).getString("PRESIDENT")); //3
  210 + vpd.put("var4", varOList.get(i).getString("PHONE")); //4
  211 + vpd.put("var5", varOList.get(i).getString("REMARK")); //5
  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/teachingmaterial/TeachingMaterialController.java 0 → 100644
  1 +package com.fh.controller.sunvote.teachingmaterial;
  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.teachingmaterial.TeachingMaterialManager;
  27 +
  28 +/**
  29 + * 说明:教材
  30 + * 创建人:FH Q313596790
  31 + * 创建时间:2018-04-18
  32 + */
  33 +@Controller
  34 +@RequestMapping(value="/teachingmaterial")
  35 +public class TeachingMaterialController extends BaseController {
  36 +
  37 + String menuUrl = "teachingmaterial/list.do"; //菜单地址(权限用)
  38 + @Resource(name="teachingmaterialService")
  39 + private TeachingMaterialManager teachingmaterialService;
  40 +
  41 + /**保存
  42 + * @param
  43 + * @throws Exception
  44 + */
  45 + @RequestMapping(value="/save")
  46 + public ModelAndView save() throws Exception{
  47 + logBefore(logger, Jurisdiction.getUsername()+"新增TeachingMaterial");
  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("TEACHINGMATERIAL_ID", this.get32UUID()); //主键
  53 + teachingmaterialService.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()+"删除TeachingMaterial");
  66 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限
  67 + PageData pd = new PageData();
  68 + pd = this.getPageData();
  69 + teachingmaterialService.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()+"修改TeachingMaterial");
  81 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限
  82 + ModelAndView mv = this.getModelAndView();
  83 + PageData pd = new PageData();
  84 + pd = this.getPageData();
  85 + teachingmaterialService.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()+"列表TeachingMaterial");
  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 = teachingmaterialService.list(page); //列出TeachingMaterial列表
  108 + mv.setViewName("sunvote/teachingmaterial/teachingmaterial_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/teachingmaterial/teachingmaterial_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 = teachingmaterialService.findById(pd); //根据ID读取
  140 + mv.setViewName("sunvote/teachingmaterial/teachingmaterial_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()+"批量删除TeachingMaterial");
  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 + teachingmaterialService.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()+"导出TeachingMaterial到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 + dataMap.put("titles", titles);
  191 + List<PageData> varOList = teachingmaterialService.listAll(pd);
  192 + List<PageData> varList = new ArrayList<PageData>();
  193 + for(int i=0;i<varOList.size();i++){
  194 + PageData vpd = new PageData();
  195 + vpd.put("var1", varOList.get(i).getString("NAME")); //1
  196 + vpd.put("var2", varOList.get(i).getString("SUBJECT_ID")); //2
  197 + vpd.put("var3", varOList.get(i).getString("GRADE_ID")); //3
  198 + vpd.put("var4", varOList.get(i).getString("VERSION_CODE")); //4
  199 + vpd.put("var5", varOList.get(i).getString("VERSION_NAME")); //5
  200 + varList.add(vpd);
  201 + }
  202 + dataMap.put("varList", varList);
  203 + ObjectExcelView erv = new ObjectExcelView();
  204 + mv = new ModelAndView(erv,dataMap);
  205 + return mv;
  206 + }
  207 +
  208 + @InitBinder
  209 + public void initBinder(WebDataBinder binder){
  210 + DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
  211 + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true));
  212 + }
  213 +}
src/com/fh/controller/system/login/LoginController.java
@@ -97,7 +97,7 @@ public class LoginController extends BaseController { @@ -97,7 +97,7 @@ public class LoginController extends BaseController {
97 PageData pd = new PageData(); 97 PageData pd = new PageData();
98 pd = this.getPageData(); 98 pd = this.getPageData();
99 String errInfo = ""; 99 String errInfo = "";
100 - String KEYDATA[] = pd.getString("KEYDATA").replaceAll("qq313596790fh", "").replaceAll("QQ978336446fh", "").split(",fh,"); 100 + String KEYDATA[] = pd.getString("KEYDATA").replaceAll("elvis", "").split(",fh,");
101 if(null != KEYDATA && KEYDATA.length == 3){ 101 if(null != KEYDATA && KEYDATA.length == 3){
102 Session session = Jurisdiction.getSession(); 102 Session session = Jurisdiction.getSession();
103 String sessionCode = (String)session.getAttribute(Const.SESSION_SECURITY_CODE); //获取session中的验证码 103 String sessionCode = (String)session.getAttribute(Const.SESSION_SECURITY_CODE); //获取session中的验证码
src/com/fh/controller/system/secCode/SecCodeController.java
@@ -84,7 +84,8 @@ public class SecCodeController { @@ -84,7 +84,8 @@ public class SecCodeController {
84 84
85 private char randomChar(){ 85 private char randomChar(){
86 Random r = new Random(); 86 Random r = new Random();
87 - String s = "ABCDEFGHJKLMNPRSTUVWXYZ0123456789"; 87 +// String s = "ABCDEFGHJKLMNPRSTUVWXYZ0123456789";
  88 + String s = "0123456789";
88 return s.charAt(r.nextInt(s.length())); 89 return s.charAt(r.nextInt(s.length()));
89 } 90 }
90 } 91 }
src/com/fh/interceptor/LoginHandlerInterceptor.java
@@ -10,7 +10,7 @@ import com.fh.util.Jurisdiction; @@ -10,7 +10,7 @@ import com.fh.util.Jurisdiction;
10 * 10 *
11 * 类名称:登录过滤,权限验证 11 * 类名称:登录过滤,权限验证
12 * 类描述: 12 * 类描述:
13 -* @author FH qq313596790[青苔] 13 +* @author Elvis
14 * 作者单位: 14 * 作者单位:
15 * 联系方式: 15 * 联系方式:
16 * 创建时间:2015年11月2日 16 * 创建时间:2015年11月2日
src/com/fh/service/sunvote/basestation/BasestationManager.java 0 → 100644
  1 +package com.fh.service.sunvote.basestation;
  2 +
  3 +import java.util.List;
  4 +import com.fh.entity.Page;
  5 +import com.fh.util.PageData;
  6 +
  7 +/**
  8 + * 说明: 基站管理接口
  9 + * 创建人:Elvis
  10 + * 创建时间:2018-04-19
  11 + * @version
  12 + */
  13 +public interface BasestationManager{
  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/basestation/impl/BasestationService.java 0 → 100644
  1 +package com.fh.service.sunvote.basestation.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.basestation.BasestationManager;
  10 +
  11 +/**
  12 + * 说明: 基站管理
  13 + * 创建人:FH Q313596790
  14 + * 创建时间:2018-04-19
  15 + * @version
  16 + */
  17 +@Service("basestationService")
  18 +public class BasestationService implements BasestationManager{
  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("BasestationMapper.save", pd);
  29 + }
  30 +
  31 + /**删除
  32 + * @param pd
  33 + * @throws Exception
  34 + */
  35 + public void delete(PageData pd)throws Exception{
  36 + dao.delete("BasestationMapper.delete", pd);
  37 + }
  38 +
  39 + /**修改
  40 + * @param pd
  41 + * @throws Exception
  42 + */
  43 + public void edit(PageData pd)throws Exception{
  44 + dao.update("BasestationMapper.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("BasestationMapper.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("BasestationMapper.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("BasestationMapper.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("BasestationMapper.deleteAll", ArrayDATA_IDS);
  79 + }
  80 +
  81 +}
  82 +
src/com/fh/service/sunvote/school/SchoolManager.java 0 → 100644
  1 +package com.fh.service.sunvote.school;
  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-04-18
  11 + * @version
  12 + */
  13 +public interface SchoolManager{
  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/school/impl/SchoolService.java 0 → 100644
  1 +package com.fh.service.sunvote.school.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.school.SchoolManager;
  10 +
  11 +/**
  12 + * 说明: 学校
  13 + * 创建人:FH Q313596790
  14 + * 创建时间:2018-04-18
  15 + * @version
  16 + */
  17 +@Service("schoolService")
  18 +public class SchoolService implements SchoolManager{
  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("SchoolMapper.save", pd);
  29 + }
  30 +
  31 + /**删除
  32 + * @param pd
  33 + * @throws Exception
  34 + */
  35 + public void delete(PageData pd)throws Exception{
  36 + dao.delete("SchoolMapper.delete", pd);
  37 + }
  38 +
  39 + /**修改
  40 + * @param pd
  41 + * @throws Exception
  42 + */
  43 + public void edit(PageData pd)throws Exception{
  44 + dao.update("SchoolMapper.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("SchoolMapper.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("SchoolMapper.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("SchoolMapper.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("SchoolMapper.deleteAll", ArrayDATA_IDS);
  79 + }
  80 +
  81 +}
  82 +
src/com/fh/service/sunvote/teachingmaterial/TeachingMaterialManager.java 0 → 100644
  1 +package com.fh.service.sunvote.teachingmaterial;
  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-04-18
  11 + * @version
  12 + */
  13 +public interface TeachingMaterialManager{
  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/teachingmaterial/impl/TeachingMaterialService.java 0 → 100644
  1 +package com.fh.service.sunvote.teachingmaterial.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.teachingmaterial.TeachingMaterialManager;
  10 +
  11 +/**
  12 + * 说明: 教材
  13 + * 创建人:FH Q313596790
  14 + * 创建时间:2018-04-18
  15 + * @version
  16 + */
  17 +@Service("teachingmaterialService")
  18 +public class TeachingMaterialService implements TeachingMaterialManager{
  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("TeachingMaterialMapper.save", pd);
  29 + }
  30 +
  31 + /**删除
  32 + * @param pd
  33 + * @throws Exception
  34 + */
  35 + public void delete(PageData pd)throws Exception{
  36 + dao.delete("TeachingMaterialMapper.delete", pd);
  37 + }
  38 +
  39 + /**修改
  40 + * @param pd
  41 + * @throws Exception
  42 + */
  43 + public void edit(PageData pd)throws Exception{
  44 + dao.update("TeachingMaterialMapper.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("TeachingMaterialMapper.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("TeachingMaterialMapper.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("TeachingMaterialMapper.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("TeachingMaterialMapper.deleteAll", ArrayDATA_IDS);
  79 + }
  80 +
  81 +}
  82 +
src/com/fh/util/Const.java
@@ -37,7 +37,7 @@ public class Const { @@ -37,7 +37,7 @@ public class Const {
37 public static final String FILEPATHFILE = "uploadFiles/file/"; //文件上传路径 37 public static final String FILEPATHFILE = "uploadFiles/file/"; //文件上传路径
38 public static final String FILEPATHFILEOA = "uploadFiles/uploadFile/"; //文件上传路径(oa管理) 38 public static final String FILEPATHFILEOA = "uploadFiles/uploadFile/"; //文件上传路径(oa管理)
39 public static final String FILEPATHTWODIMENSIONCODE = "uploadFiles/twoDimensionCode/"; //二维码存放路径 39 public static final String FILEPATHTWODIMENSIONCODE = "uploadFiles/twoDimensionCode/"; //二维码存放路径
40 - public static final String NO_INTERCEPTOR_PATH = ".*/((login)|(logout)|(code)|(app)|(weixin)|(static)|(main)|(websocket)|(uploadImgs)).*"; //不对匹配该值的访问路径拦截(正则) 40 + public static final String NO_INTERCEPTOR_PATH = ".*/((login)|(logout)|(code)|(app)|(weixin)|(static)|(main)|(api)|(websocket)|(uploadImgs)).*"; //不对匹配该值的访问路径拦截(正则)
41 public static ApplicationContext WEB_APP_CONTEXT = null; //该值会在web容器启动时由WebAppContextListener初始化 41 public static ApplicationContext WEB_APP_CONTEXT = null; //该值会在web容器启动时由WebAppContextListener初始化
42 42
43 /** 43 /**