Commit 7db3ebeb7623fd3c59c92942c67f2c2396cbf166
1 parent
8afe9e2e
添加一些模块
Showing
54 changed files
with
4011 additions
and
106 deletions
WebRoot/WEB-INF/jsp/sunvote/classtype/classtype_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="classtype/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${pd.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="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
| 41 | + </tr> | |
| 42 | + <tr> | |
| 43 | + <td style="text-align: center;" colspan="10"> | |
| 44 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 45 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 46 | + </td> | |
| 47 | + </tr> | |
| 48 | + </table> | |
| 49 | + </div> | |
| 50 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 51 | + </form> | |
| 52 | + </div> | |
| 53 | + <!-- /.col --> | |
| 54 | + </div> | |
| 55 | + <!-- /.row --> | |
| 56 | + </div> | |
| 57 | + <!-- /.page-content --> | |
| 58 | + </div> | |
| 59 | + </div> | |
| 60 | + <!-- /.main-content --> | |
| 61 | +</div> | |
| 62 | +<!-- /.main-container --> | |
| 63 | + | |
| 64 | + | |
| 65 | + <!-- 页面底部js¨ --> | |
| 66 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 67 | + <!-- 下拉框 --> | |
| 68 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 69 | + <!-- 日期框 --> | |
| 70 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 71 | + <!--提示框--> | |
| 72 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 73 | + <script type="text/javascript"> | |
| 74 | + $(top.hangge()); | |
| 75 | + //保存 | |
| 76 | + function save(){ | |
| 77 | + if($("#NAME").val()==""){ | |
| 78 | + $("#NAME").tips({ | |
| 79 | + side:3, | |
| 80 | + msg:'请输入名称', | |
| 81 | + bg:'#AE81FF', | |
| 82 | + time:2 | |
| 83 | + }); | |
| 84 | + $("#NAME").focus(); | |
| 85 | + return false; | |
| 86 | + } | |
| 87 | + if($("#REMARK").val()==""){ | |
| 88 | + $("#REMARK").tips({ | |
| 89 | + side:3, | |
| 90 | + msg:'请输入备注', | |
| 91 | + bg:'#AE81FF', | |
| 92 | + time:2 | |
| 93 | + }); | |
| 94 | + $("#REMARK").focus(); | |
| 95 | + return false; | |
| 96 | + } | |
| 97 | + $("#Form").submit(); | |
| 98 | + $("#zhongxin").hide(); | |
| 99 | + $("#zhongxin2").show(); | |
| 100 | + } | |
| 101 | + | |
| 102 | + $(function() { | |
| 103 | + //日期框 | |
| 104 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 105 | + }); | |
| 106 | + </script> | |
| 107 | +</body> | |
| 108 | +</html> | |
| 0 | 109 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/classtype/classtype_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="classtype/list.do" method="post" name="Form" id="Form"> | |
| 34 | + <table style="margin-top:5px;"> | |
| 35 | + <tr> | |
| 36 | + <td> | |
| 37 | + <div class="nav-search"> | |
| 38 | + <span class="input-icon"> | |
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + </td> | |
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 48 | + <option value=""></option> | |
| 49 | + <option value="">全部</option> | |
| 50 | + <option value="">1</option> | |
| 51 | + <option value="">2</option> | |
| 52 | + </select> | |
| 53 | + </td> | |
| 54 | + <c:if test="${QX.cha == 1 }"> | |
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 56 | + </c:if> | |
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + <!-- 检索 --> | |
| 61 | + | |
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 63 | + <thead> | |
| 64 | + <tr> | |
| 65 | + <th class="center" style="width:35px;"> | |
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 67 | + </th> | |
| 68 | + <th class="center" style="width:50px;">序号</th> | |
| 69 | + <th class="center">名称</th> | |
| 70 | + <th class="center">备注</th> | |
| 71 | + <th class="center">操作</th> | |
| 72 | + </tr> | |
| 73 | + </thead> | |
| 74 | + | |
| 75 | + <tbody> | |
| 76 | + <!-- 开始循环 --> | |
| 77 | + <c:choose> | |
| 78 | + <c:when test="${not empty varList}"> | |
| 79 | + <c:if test="${QX.cha == 1 }"> | |
| 80 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 81 | + <tr> | |
| 82 | + <td class='center'> | |
| 83 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
| 84 | + </td> | |
| 85 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 86 | + <td class='center'>${var.NAME}</td> | |
| 87 | + <td class='center'>${var.REMARK}</td> | |
| 88 | + <td class="center"> | |
| 89 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 90 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 91 | + </c:if> | |
| 92 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 93 | + <c:if test="${QX.edit == 1 }"> | |
| 94 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
| 95 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 96 | + </a> | |
| 97 | + </c:if> | |
| 98 | + <c:if test="${QX.del == 1 }"> | |
| 99 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
| 100 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 101 | + </a> | |
| 102 | + </c:if> | |
| 103 | + </div> | |
| 104 | + <div class="hidden-md hidden-lg"> | |
| 105 | + <div class="inline pos-rel"> | |
| 106 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 107 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 108 | + </button> | |
| 109 | + | |
| 110 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 111 | + <c:if test="${QX.edit == 1 }"> | |
| 112 | + <li> | |
| 113 | + <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 114 | + <span class="green"> | |
| 115 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 116 | + </span> | |
| 117 | + </a> | |
| 118 | + </li> | |
| 119 | + </c:if> | |
| 120 | + <c:if test="${QX.del == 1 }"> | |
| 121 | + <li> | |
| 122 | + <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 123 | + <span class="red"> | |
| 124 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 125 | + </span> | |
| 126 | + </a> | |
| 127 | + </li> | |
| 128 | + </c:if> | |
| 129 | + </ul> | |
| 130 | + </div> | |
| 131 | + </div> | |
| 132 | + </td> | |
| 133 | + </tr> | |
| 134 | + | |
| 135 | + </c:forEach> | |
| 136 | + </c:if> | |
| 137 | + <c:if test="${QX.cha == 0 }"> | |
| 138 | + <tr> | |
| 139 | + <td colspan="100" class="center">您无权查看</td> | |
| 140 | + </tr> | |
| 141 | + </c:if> | |
| 142 | + </c:when> | |
| 143 | + <c:otherwise> | |
| 144 | + <tr class="main_info"> | |
| 145 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 146 | + </tr> | |
| 147 | + </c:otherwise> | |
| 148 | + </c:choose> | |
| 149 | + </tbody> | |
| 150 | + </table> | |
| 151 | + <div class="page-header position-relative"> | |
| 152 | + <table style="width:100%;"> | |
| 153 | + <tr> | |
| 154 | + <td style="vertical-align:top;"> | |
| 155 | + <c:if test="${QX.add == 1 }"> | |
| 156 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 157 | + </c:if> | |
| 158 | + <c:if test="${QX.del == 1 }"> | |
| 159 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 160 | + </c:if> | |
| 161 | + </td> | |
| 162 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 163 | + </tr> | |
| 164 | + </table> | |
| 165 | + </div> | |
| 166 | + </form> | |
| 167 | + | |
| 168 | + </div> | |
| 169 | + <!-- /.col --> | |
| 170 | + </div> | |
| 171 | + <!-- /.row --> | |
| 172 | + </div> | |
| 173 | + <!-- /.page-content --> | |
| 174 | + </div> | |
| 175 | + </div> | |
| 176 | + <!-- /.main-content --> | |
| 177 | + | |
| 178 | + <!-- 返回顶部 --> | |
| 179 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 180 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 181 | + </a> | |
| 182 | + | |
| 183 | + </div> | |
| 184 | + <!-- /.main-container --> | |
| 185 | + | |
| 186 | + <!-- basic scripts --> | |
| 187 | + <!-- 页面底部js¨ --> | |
| 188 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 189 | + <!-- 删除时确认窗口 --> | |
| 190 | + <script src="static/ace/js/bootbox.js"></script> | |
| 191 | + <!-- ace scripts --> | |
| 192 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 193 | + <!-- 下拉框 --> | |
| 194 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 195 | + <!-- 日期框 --> | |
| 196 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 197 | + <!--提示框--> | |
| 198 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 199 | + <script type="text/javascript"> | |
| 200 | + $(top.hangge());//关闭加载状态 | |
| 201 | + //检索 | |
| 202 | + function tosearch(){ | |
| 203 | + top.jzts(); | |
| 204 | + $("#Form").submit(); | |
| 205 | + } | |
| 206 | + $(function() { | |
| 207 | + | |
| 208 | + //日期框 | |
| 209 | + $('.date-picker').datepicker({ | |
| 210 | + autoclose: true, | |
| 211 | + todayHighlight: true | |
| 212 | + }); | |
| 213 | + | |
| 214 | + //下拉框 | |
| 215 | + if(!ace.vars['touch']) { | |
| 216 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 217 | + $(window) | |
| 218 | + .off('resize.chosen') | |
| 219 | + .on('resize.chosen', function() { | |
| 220 | + $('.chosen-select').each(function() { | |
| 221 | + var $this = $(this); | |
| 222 | + $this.next().css({'width': $this.parent().width()}); | |
| 223 | + }); | |
| 224 | + }).trigger('resize.chosen'); | |
| 225 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 226 | + if(event_name != 'sidebar_collapsed') return; | |
| 227 | + $('.chosen-select').each(function() { | |
| 228 | + var $this = $(this); | |
| 229 | + $this.next().css({'width': $this.parent().width()}); | |
| 230 | + }); | |
| 231 | + }); | |
| 232 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 233 | + var target = $(this).find('input[type=radio]'); | |
| 234 | + var which = parseInt(target.val()); | |
| 235 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 236 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 237 | + }); | |
| 238 | + } | |
| 239 | + | |
| 240 | + | |
| 241 | + //复选框全选控制 | |
| 242 | + var active_class = 'active'; | |
| 243 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 244 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 245 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 246 | + var row = this; | |
| 247 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 248 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 249 | + }); | |
| 250 | + }); | |
| 251 | + }); | |
| 252 | + | |
| 253 | + //新增 | |
| 254 | + function add(){ | |
| 255 | + top.jzts(); | |
| 256 | + var diag = new top.Dialog(); | |
| 257 | + diag.Drag=true; | |
| 258 | + diag.Title ="新增"; | |
| 259 | + diag.URL = '<%=basePath%>classtype/goAdd.do'; | |
| 260 | + diag.Width = 450; | |
| 261 | + diag.Height = 355; | |
| 262 | + diag.Modal = true; //有无遮罩窗口 | |
| 263 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 264 | + diag.ShowMinButton = true; //最小化按钮 | |
| 265 | + diag.CancelEvent = function(){ //关闭事件 | |
| 266 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 267 | + if('${page.currentPage}' == '0'){ | |
| 268 | + tosearch(); | |
| 269 | + }else{ | |
| 270 | + tosearch(); | |
| 271 | + } | |
| 272 | + } | |
| 273 | + diag.close(); | |
| 274 | + }; | |
| 275 | + diag.show(); | |
| 276 | + } | |
| 277 | + | |
| 278 | + //删除 | |
| 279 | + function del(Id){ | |
| 280 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 281 | + if(result) { | |
| 282 | + top.jzts(); | |
| 283 | + var url = "<%=basePath%>classtype/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 284 | + $.get(url,function(data){ | |
| 285 | + tosearch(); | |
| 286 | + }); | |
| 287 | + } | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + | |
| 291 | + //修改 | |
| 292 | + function edit(Id){ | |
| 293 | + top.jzts(); | |
| 294 | + var diag = new top.Dialog(); | |
| 295 | + diag.Drag=true; | |
| 296 | + diag.Title ="编辑"; | |
| 297 | + diag.URL = '<%=basePath%>classtype/goEdit.do?ID='+Id; | |
| 298 | + diag.Width = 450; | |
| 299 | + diag.Height = 355; | |
| 300 | + diag.Modal = true; //有无遮罩窗口 | |
| 301 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 302 | + diag.ShowMinButton = true; //最小化按钮 | |
| 303 | + diag.CancelEvent = function(){ //关闭事件 | |
| 304 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 305 | + tosearch(); | |
| 306 | + } | |
| 307 | + diag.close(); | |
| 308 | + }; | |
| 309 | + diag.show(); | |
| 310 | + } | |
| 311 | + | |
| 312 | + //批量操作 | |
| 313 | + function makeAll(msg){ | |
| 314 | + bootbox.confirm(msg, function(result) { | |
| 315 | + if(result) { | |
| 316 | + var str = ''; | |
| 317 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 318 | + if(document.getElementsByName('ids')[i].checked){ | |
| 319 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 320 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 321 | + } | |
| 322 | + } | |
| 323 | + if(str==''){ | |
| 324 | + bootbox.dialog({ | |
| 325 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 326 | + buttons: | |
| 327 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 328 | + }); | |
| 329 | + $("#zcheckbox").tips({ | |
| 330 | + side:1, | |
| 331 | + msg:'点这里全选', | |
| 332 | + bg:'#AE81FF', | |
| 333 | + time:8 | |
| 334 | + }); | |
| 335 | + return; | |
| 336 | + }else{ | |
| 337 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 338 | + top.jzts(); | |
| 339 | + $.ajax({ | |
| 340 | + type: "POST", | |
| 341 | + url: '<%=basePath%>classtype/deleteAll.do?tm='+new Date().getTime(), | |
| 342 | + data: {DATA_IDS:str}, | |
| 343 | + dataType:'json', | |
| 344 | + //beforeSend: validateData, | |
| 345 | + cache: false, | |
| 346 | + success: function(data){ | |
| 347 | + $.each(data.list, function(i, list){ | |
| 348 | + tosearch(); | |
| 349 | + }); | |
| 350 | + } | |
| 351 | + }); | |
| 352 | + } | |
| 353 | + } | |
| 354 | + } | |
| 355 | + }); | |
| 356 | + }; | |
| 357 | + | |
| 358 | + //导出excel | |
| 359 | + function toExcel(){ | |
| 360 | + window.location.href='<%=basePath%>classtype/excel.do'; | |
| 361 | + } | |
| 362 | + </script> | |
| 363 | + | |
| 364 | + | |
| 365 | +</body> | |
| 366 | +</html> | |
| 0 | 367 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/grade/grade_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="grade/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${pd.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="DESC" id="DESC" value="${pd.DESC}" 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="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="text-align: center;" colspan="10"> | |
| 48 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 49 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 50 | + </td> | |
| 51 | + </tr> | |
| 52 | + </table> | |
| 53 | + </div> | |
| 54 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 55 | + </form> | |
| 56 | + </div> | |
| 57 | + <!-- /.col --> | |
| 58 | + </div> | |
| 59 | + <!-- /.row --> | |
| 60 | + </div> | |
| 61 | + <!-- /.page-content --> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <!-- /.main-content --> | |
| 65 | +</div> | |
| 66 | +<!-- /.main-container --> | |
| 67 | + | |
| 68 | + | |
| 69 | + <!-- 页面底部js¨ --> | |
| 70 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 71 | + <!-- 下拉框 --> | |
| 72 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 73 | + <!-- 日期框 --> | |
| 74 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 75 | + <!--提示框--> | |
| 76 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 77 | + <script type="text/javascript"> | |
| 78 | + $(top.hangge()); | |
| 79 | + //保存 | |
| 80 | + function save(){ | |
| 81 | + if($("#NAME").val()==""){ | |
| 82 | + $("#NAME").tips({ | |
| 83 | + side:3, | |
| 84 | + msg:'请输入年级名称', | |
| 85 | + bg:'#AE81FF', | |
| 86 | + time:2 | |
| 87 | + }); | |
| 88 | + $("#NAME").focus(); | |
| 89 | + return false; | |
| 90 | + } | |
| 91 | + if($("#DESC").val()==""){ | |
| 92 | + $("#DESC").tips({ | |
| 93 | + side:3, | |
| 94 | + msg:'请输入年级描述', | |
| 95 | + bg:'#AE81FF', | |
| 96 | + time:2 | |
| 97 | + }); | |
| 98 | + $("#DESC").focus(); | |
| 99 | + return false; | |
| 100 | + } | |
| 101 | + if($("#REMARK").val()==""){ | |
| 102 | + $("#REMARK").tips({ | |
| 103 | + side:3, | |
| 104 | + msg:'请输入备注', | |
| 105 | + bg:'#AE81FF', | |
| 106 | + time:2 | |
| 107 | + }); | |
| 108 | + $("#REMARK").focus(); | |
| 109 | + return false; | |
| 110 | + } | |
| 111 | + $("#Form").submit(); | |
| 112 | + $("#zhongxin").hide(); | |
| 113 | + $("#zhongxin2").show(); | |
| 114 | + } | |
| 115 | + | |
| 116 | + $(function() { | |
| 117 | + //日期框 | |
| 118 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 119 | + }); | |
| 120 | + </script> | |
| 121 | +</body> | |
| 122 | +</html> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/grade/grade_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="grade/list.do" method="post" name="Form" id="Form"> | |
| 34 | + <table style="margin-top:5px;"> | |
| 35 | + <tr> | |
| 36 | + <td> | |
| 37 | + <div class="nav-search"> | |
| 38 | + <span class="input-icon"> | |
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + </td> | |
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 48 | + <option value=""></option> | |
| 49 | + <option value="">全部</option> | |
| 50 | + <option value="">1</option> | |
| 51 | + <option value="">2</option> | |
| 52 | + </select> | |
| 53 | + </td> | |
| 54 | + <c:if test="${QX.cha == 1 }"> | |
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 56 | + </c:if> | |
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + <!-- 检索 --> | |
| 61 | + | |
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 63 | + <thead> | |
| 64 | + <tr> | |
| 65 | + <th class="center" style="width:35px;"> | |
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 67 | + </th> | |
| 68 | + <th class="center" style="width:50px;">序号</th> | |
| 69 | + <th class="center">年级名称</th> | |
| 70 | + <th class="center">年级描述</th> | |
| 71 | + <th class="center">备注</th> | |
| 72 | + <th class="center">操作</th> | |
| 73 | + </tr> | |
| 74 | + </thead> | |
| 75 | + | |
| 76 | + <tbody> | |
| 77 | + <!-- 开始循环 --> | |
| 78 | + <c:choose> | |
| 79 | + <c:when test="${not empty varList}"> | |
| 80 | + <c:if test="${QX.cha == 1 }"> | |
| 81 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 82 | + <tr> | |
| 83 | + <td class='center'> | |
| 84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
| 85 | + </td> | |
| 86 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 87 | + <td class='center'>${var.NAME}</td> | |
| 88 | + <td class='center'>${var.DESC}</td> | |
| 89 | + <td class='center'>${var.REMARK}</td> | |
| 90 | + <td class="center"> | |
| 91 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 92 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 93 | + </c:if> | |
| 94 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 95 | + <c:if test="${QX.edit == 1 }"> | |
| 96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
| 97 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 98 | + </a> | |
| 99 | + </c:if> | |
| 100 | + <c:if test="${QX.del == 1 }"> | |
| 101 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
| 102 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 103 | + </a> | |
| 104 | + </c:if> | |
| 105 | + </div> | |
| 106 | + <div class="hidden-md hidden-lg"> | |
| 107 | + <div class="inline pos-rel"> | |
| 108 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 109 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 110 | + </button> | |
| 111 | + | |
| 112 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 113 | + <c:if test="${QX.edit == 1 }"> | |
| 114 | + <li> | |
| 115 | + <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 116 | + <span class="green"> | |
| 117 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 118 | + </span> | |
| 119 | + </a> | |
| 120 | + </li> | |
| 121 | + </c:if> | |
| 122 | + <c:if test="${QX.del == 1 }"> | |
| 123 | + <li> | |
| 124 | + <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 125 | + <span class="red"> | |
| 126 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 127 | + </span> | |
| 128 | + </a> | |
| 129 | + </li> | |
| 130 | + </c:if> | |
| 131 | + </ul> | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | + </td> | |
| 135 | + </tr> | |
| 136 | + | |
| 137 | + </c:forEach> | |
| 138 | + </c:if> | |
| 139 | + <c:if test="${QX.cha == 0 }"> | |
| 140 | + <tr> | |
| 141 | + <td colspan="100" class="center">您无权查看</td> | |
| 142 | + </tr> | |
| 143 | + </c:if> | |
| 144 | + </c:when> | |
| 145 | + <c:otherwise> | |
| 146 | + <tr class="main_info"> | |
| 147 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 148 | + </tr> | |
| 149 | + </c:otherwise> | |
| 150 | + </c:choose> | |
| 151 | + </tbody> | |
| 152 | + </table> | |
| 153 | + <div class="page-header position-relative"> | |
| 154 | + <table style="width:100%;"> | |
| 155 | + <tr> | |
| 156 | + <td style="vertical-align:top;"> | |
| 157 | + <c:if test="${QX.add == 1 }"> | |
| 158 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 159 | + </c:if> | |
| 160 | + <c:if test="${QX.del == 1 }"> | |
| 161 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 162 | + </c:if> | |
| 163 | + </td> | |
| 164 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 165 | + </tr> | |
| 166 | + </table> | |
| 167 | + </div> | |
| 168 | + </form> | |
| 169 | + | |
| 170 | + </div> | |
| 171 | + <!-- /.col --> | |
| 172 | + </div> | |
| 173 | + <!-- /.row --> | |
| 174 | + </div> | |
| 175 | + <!-- /.page-content --> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + <!-- /.main-content --> | |
| 179 | + | |
| 180 | + <!-- 返回顶部 --> | |
| 181 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 182 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 183 | + </a> | |
| 184 | + | |
| 185 | + </div> | |
| 186 | + <!-- /.main-container --> | |
| 187 | + | |
| 188 | + <!-- basic scripts --> | |
| 189 | + <!-- 页面底部js¨ --> | |
| 190 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 191 | + <!-- 删除时确认窗口 --> | |
| 192 | + <script src="static/ace/js/bootbox.js"></script> | |
| 193 | + <!-- ace scripts --> | |
| 194 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 195 | + <!-- 下拉框 --> | |
| 196 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 197 | + <!-- 日期框 --> | |
| 198 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 199 | + <!--提示框--> | |
| 200 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 201 | + <script type="text/javascript"> | |
| 202 | + $(top.hangge());//关闭加载状态 | |
| 203 | + //检索 | |
| 204 | + function tosearch(){ | |
| 205 | + top.jzts(); | |
| 206 | + $("#Form").submit(); | |
| 207 | + } | |
| 208 | + $(function() { | |
| 209 | + | |
| 210 | + //日期框 | |
| 211 | + $('.date-picker').datepicker({ | |
| 212 | + autoclose: true, | |
| 213 | + todayHighlight: true | |
| 214 | + }); | |
| 215 | + | |
| 216 | + //下拉框 | |
| 217 | + if(!ace.vars['touch']) { | |
| 218 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 219 | + $(window) | |
| 220 | + .off('resize.chosen') | |
| 221 | + .on('resize.chosen', function() { | |
| 222 | + $('.chosen-select').each(function() { | |
| 223 | + var $this = $(this); | |
| 224 | + $this.next().css({'width': $this.parent().width()}); | |
| 225 | + }); | |
| 226 | + }).trigger('resize.chosen'); | |
| 227 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 228 | + if(event_name != 'sidebar_collapsed') return; | |
| 229 | + $('.chosen-select').each(function() { | |
| 230 | + var $this = $(this); | |
| 231 | + $this.next().css({'width': $this.parent().width()}); | |
| 232 | + }); | |
| 233 | + }); | |
| 234 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 235 | + var target = $(this).find('input[type=radio]'); | |
| 236 | + var which = parseInt(target.val()); | |
| 237 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 238 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 239 | + }); | |
| 240 | + } | |
| 241 | + | |
| 242 | + | |
| 243 | + //复选框全选控制 | |
| 244 | + var active_class = 'active'; | |
| 245 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 246 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 247 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 248 | + var row = this; | |
| 249 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 250 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 251 | + }); | |
| 252 | + }); | |
| 253 | + }); | |
| 254 | + | |
| 255 | + //新增 | |
| 256 | + function add(){ | |
| 257 | + top.jzts(); | |
| 258 | + var diag = new top.Dialog(); | |
| 259 | + diag.Drag=true; | |
| 260 | + diag.Title ="新增"; | |
| 261 | + diag.URL = '<%=basePath%>grade/goAdd.do'; | |
| 262 | + diag.Width = 450; | |
| 263 | + diag.Height = 355; | |
| 264 | + diag.Modal = true; //有无遮罩窗口 | |
| 265 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 266 | + diag.ShowMinButton = true; //最小化按钮 | |
| 267 | + diag.CancelEvent = function(){ //关闭事件 | |
| 268 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 269 | + if('${page.currentPage}' == '0'){ | |
| 270 | + tosearch(); | |
| 271 | + }else{ | |
| 272 | + tosearch(); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + diag.close(); | |
| 276 | + }; | |
| 277 | + diag.show(); | |
| 278 | + } | |
| 279 | + | |
| 280 | + //删除 | |
| 281 | + function del(Id){ | |
| 282 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 283 | + if(result) { | |
| 284 | + top.jzts(); | |
| 285 | + var url = "<%=basePath%>grade/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | + $.get(url,function(data){ | |
| 287 | + tosearch(); | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + | |
| 293 | + //修改 | |
| 294 | + function edit(Id){ | |
| 295 | + top.jzts(); | |
| 296 | + var diag = new top.Dialog(); | |
| 297 | + diag.Drag=true; | |
| 298 | + diag.Title ="编辑"; | |
| 299 | + diag.URL = '<%=basePath%>grade/goEdit.do?ID='+Id; | |
| 300 | + diag.Width = 450; | |
| 301 | + diag.Height = 355; | |
| 302 | + diag.Modal = true; //有无遮罩窗口 | |
| 303 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 304 | + diag.ShowMinButton = true; //最小化按钮 | |
| 305 | + diag.CancelEvent = function(){ //关闭事件 | |
| 306 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 307 | + tosearch(); | |
| 308 | + } | |
| 309 | + diag.close(); | |
| 310 | + }; | |
| 311 | + diag.show(); | |
| 312 | + } | |
| 313 | + | |
| 314 | + //批量操作 | |
| 315 | + function makeAll(msg){ | |
| 316 | + bootbox.confirm(msg, function(result) { | |
| 317 | + if(result) { | |
| 318 | + var str = ''; | |
| 319 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 320 | + if(document.getElementsByName('ids')[i].checked){ | |
| 321 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 322 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 323 | + } | |
| 324 | + } | |
| 325 | + if(str==''){ | |
| 326 | + bootbox.dialog({ | |
| 327 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 328 | + buttons: | |
| 329 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 330 | + }); | |
| 331 | + $("#zcheckbox").tips({ | |
| 332 | + side:1, | |
| 333 | + msg:'点这里全选', | |
| 334 | + bg:'#AE81FF', | |
| 335 | + time:8 | |
| 336 | + }); | |
| 337 | + return; | |
| 338 | + }else{ | |
| 339 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 340 | + top.jzts(); | |
| 341 | + $.ajax({ | |
| 342 | + type: "POST", | |
| 343 | + url: '<%=basePath%>grade/deleteAll.do?tm='+new Date().getTime(), | |
| 344 | + data: {DATA_IDS:str}, | |
| 345 | + dataType:'json', | |
| 346 | + //beforeSend: validateData, | |
| 347 | + cache: false, | |
| 348 | + success: function(data){ | |
| 349 | + $.each(data.list, function(i, list){ | |
| 350 | + tosearch(); | |
| 351 | + }); | |
| 352 | + } | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + } | |
| 356 | + } | |
| 357 | + }); | |
| 358 | + }; | |
| 359 | + | |
| 360 | + //导出excel | |
| 361 | + function toExcel(){ | |
| 362 | + window.location.href='<%=basePath%>grade/excel.do'; | |
| 363 | + } | |
| 364 | + </script> | |
| 365 | + | |
| 366 | + | |
| 367 | +</body> | |
| 368 | +</html> | |
| 0 | 369 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_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="sclass/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${pd.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="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="255" placeholder="这里输入所属学校" title="所属学校" style="width:98%;"/></td> | |
| 37 | + </tr> | |
| 38 | + <tr> | |
| 39 | + <td style="width:75px;text-align: right;padding-top: 13px;">所属年级:</td> | |
| 40 | + <td><input type="text" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_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="CLASS_TYPE" id="CLASS_TYPE" value="${pd.CLASS_TYPE}" maxlength="255" placeholder="这里输入班级类型" title="班级类型" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级名称:</td> | |
| 48 | + <td><input type="text" name="CLASS_NAME" id="CLASS_NAME" value="${pd.CLASS_NAME}" maxlength="255" placeholder="这里输入班级名称" title="班级名称" style="width:98%;"/></td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="width:75px;text-align: right;padding-top: 13px;">班级编码:</td> | |
| 52 | + <td><input type="text" name="CLASS_CODE" id="CLASS_CODE" value="${pd.CLASS_CODE}" 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="BASESTATION_ID" id="BASESTATION_ID" value="${pd.BASESTATION_ID}" maxlength="255" placeholder="这里输入班级基站" title="班级基站" style="width:98%;"/></td> | |
| 57 | + </tr> | |
| 58 | + <tr> | |
| 59 | + <td style="text-align: center;" colspan="10"> | |
| 60 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 61 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 62 | + </td> | |
| 63 | + </tr> | |
| 64 | + </table> | |
| 65 | + </div> | |
| 66 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 67 | + </form> | |
| 68 | + </div> | |
| 69 | + <!-- /.col --> | |
| 70 | + </div> | |
| 71 | + <!-- /.row --> | |
| 72 | + </div> | |
| 73 | + <!-- /.page-content --> | |
| 74 | + </div> | |
| 75 | + </div> | |
| 76 | + <!-- /.main-content --> | |
| 77 | +</div> | |
| 78 | +<!-- /.main-container --> | |
| 79 | + | |
| 80 | + | |
| 81 | + <!-- 页面底部js¨ --> | |
| 82 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 83 | + <!-- 下拉框 --> | |
| 84 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 85 | + <!-- 日期框 --> | |
| 86 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 87 | + <!--提示框--> | |
| 88 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 89 | + <script type="text/javascript"> | |
| 90 | + $(top.hangge()); | |
| 91 | + //保存 | |
| 92 | + function save(){ | |
| 93 | + if($("#SCHOOL_ID").val()==""){ | |
| 94 | + $("#SCHOOL_ID").tips({ | |
| 95 | + side:3, | |
| 96 | + msg:'请输入所属学校', | |
| 97 | + bg:'#AE81FF', | |
| 98 | + time:2 | |
| 99 | + }); | |
| 100 | + $("#SCHOOL_ID").focus(); | |
| 101 | + return false; | |
| 102 | + } | |
| 103 | + if($("#GRADE_ID").val()==""){ | |
| 104 | + $("#GRADE_ID").tips({ | |
| 105 | + side:3, | |
| 106 | + msg:'请输入所属年级', | |
| 107 | + bg:'#AE81FF', | |
| 108 | + time:2 | |
| 109 | + }); | |
| 110 | + $("#GRADE_ID").focus(); | |
| 111 | + return false; | |
| 112 | + } | |
| 113 | + if($("#CLASS_TYPE").val()==""){ | |
| 114 | + $("#CLASS_TYPE").tips({ | |
| 115 | + side:3, | |
| 116 | + msg:'请输入班级类型', | |
| 117 | + bg:'#AE81FF', | |
| 118 | + time:2 | |
| 119 | + }); | |
| 120 | + $("#CLASS_TYPE").focus(); | |
| 121 | + return false; | |
| 122 | + } | |
| 123 | + if($("#CLASS_NAME").val()==""){ | |
| 124 | + $("#CLASS_NAME").tips({ | |
| 125 | + side:3, | |
| 126 | + msg:'请输入班级名称', | |
| 127 | + bg:'#AE81FF', | |
| 128 | + time:2 | |
| 129 | + }); | |
| 130 | + $("#CLASS_NAME").focus(); | |
| 131 | + return false; | |
| 132 | + } | |
| 133 | + if($("#CLASS_CODE").val()==""){ | |
| 134 | + $("#CLASS_CODE").tips({ | |
| 135 | + side:3, | |
| 136 | + msg:'请输入班级编码', | |
| 137 | + bg:'#AE81FF', | |
| 138 | + time:2 | |
| 139 | + }); | |
| 140 | + $("#CLASS_CODE").focus(); | |
| 141 | + return false; | |
| 142 | + } | |
| 143 | + if($("#BASESTATION_ID").val()==""){ | |
| 144 | + $("#BASESTATION_ID").tips({ | |
| 145 | + side:3, | |
| 146 | + msg:'请输入班级基站', | |
| 147 | + bg:'#AE81FF', | |
| 148 | + time:2 | |
| 149 | + }); | |
| 150 | + $("#BASESTATION_ID").focus(); | |
| 151 | + return false; | |
| 152 | + } | |
| 153 | + $("#Form").submit(); | |
| 154 | + $("#zhongxin").hide(); | |
| 155 | + $("#zhongxin2").show(); | |
| 156 | + } | |
| 157 | + | |
| 158 | + $(function() { | |
| 159 | + //日期框 | |
| 160 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 161 | + }); | |
| 162 | + </script> | |
| 163 | +</body> | |
| 164 | +</html> | |
| 0 | 165 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_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="sclass/list.do" method="post" name="Form" id="Form"> | |
| 34 | + <table style="margin-top:5px;"> | |
| 35 | + <tr> | |
| 36 | + <td> | |
| 37 | + <div class="nav-search"> | |
| 38 | + <span class="input-icon"> | |
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + </td> | |
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 48 | + <option value=""></option> | |
| 49 | + <option value="">全部</option> | |
| 50 | + <option value="">1</option> | |
| 51 | + <option value="">2</option> | |
| 52 | + </select> | |
| 53 | + </td> | |
| 54 | + <c:if test="${QX.cha == 1 }"> | |
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 56 | + </c:if> | |
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + <!-- 检索 --> | |
| 61 | + | |
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 63 | + <thead> | |
| 64 | + <tr> | |
| 65 | + <th class="center" style="width:35px;"> | |
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 67 | + </th> | |
| 68 | + <th class="center" style="width:50px;">序号</th> | |
| 69 | + <th class="center">所属学校</th> | |
| 70 | + <th class="center">所属年级</th> | |
| 71 | + <th class="center">班级类型</th> | |
| 72 | + <th class="center">班级名称</th> | |
| 73 | + <th class="center">班级编码</th> | |
| 74 | + <th class="center">班级基站</th> | |
| 75 | + <th class="center">操作</th> | |
| 76 | + </tr> | |
| 77 | + </thead> | |
| 78 | + | |
| 79 | + <tbody> | |
| 80 | + <!-- 开始循环 --> | |
| 81 | + <c:choose> | |
| 82 | + <c:when test="${not empty varList}"> | |
| 83 | + <c:if test="${QX.cha == 1 }"> | |
| 84 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 85 | + <tr> | |
| 86 | + <td class='center'> | |
| 87 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
| 88 | + </td> | |
| 89 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 90 | + <td class='center'>${var.SCHOOL_ID}</td> | |
| 91 | + <td class='center'>${var.GRADE_ID}</td> | |
| 92 | + <td class='center'>${var.CLASS_TYPE}</td> | |
| 93 | + <td class='center'>${var.CLASS_NAME}</td> | |
| 94 | + <td class='center'>${var.CLASS_CODE}</td> | |
| 95 | + <td class='center'>${var.BASESTATION_ID}</td> | |
| 96 | + <td class="center"> | |
| 97 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 98 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 99 | + </c:if> | |
| 100 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 101 | + <c:if test="${QX.edit == 1 }"> | |
| 102 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
| 103 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 104 | + </a> | |
| 105 | + </c:if> | |
| 106 | + <c:if test="${QX.del == 1 }"> | |
| 107 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
| 108 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 109 | + </a> | |
| 110 | + </c:if> | |
| 111 | + </div> | |
| 112 | + <div class="hidden-md hidden-lg"> | |
| 113 | + <div class="inline pos-rel"> | |
| 114 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 115 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 116 | + </button> | |
| 117 | + | |
| 118 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 119 | + <c:if test="${QX.edit == 1 }"> | |
| 120 | + <li> | |
| 121 | + <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 122 | + <span class="green"> | |
| 123 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 124 | + </span> | |
| 125 | + </a> | |
| 126 | + </li> | |
| 127 | + </c:if> | |
| 128 | + <c:if test="${QX.del == 1 }"> | |
| 129 | + <li> | |
| 130 | + <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 131 | + <span class="red"> | |
| 132 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 133 | + </span> | |
| 134 | + </a> | |
| 135 | + </li> | |
| 136 | + </c:if> | |
| 137 | + </ul> | |
| 138 | + </div> | |
| 139 | + </div> | |
| 140 | + </td> | |
| 141 | + </tr> | |
| 142 | + | |
| 143 | + </c:forEach> | |
| 144 | + </c:if> | |
| 145 | + <c:if test="${QX.cha == 0 }"> | |
| 146 | + <tr> | |
| 147 | + <td colspan="100" class="center">您无权查看</td> | |
| 148 | + </tr> | |
| 149 | + </c:if> | |
| 150 | + </c:when> | |
| 151 | + <c:otherwise> | |
| 152 | + <tr class="main_info"> | |
| 153 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 154 | + </tr> | |
| 155 | + </c:otherwise> | |
| 156 | + </c:choose> | |
| 157 | + </tbody> | |
| 158 | + </table> | |
| 159 | + <div class="page-header position-relative"> | |
| 160 | + <table style="width:100%;"> | |
| 161 | + <tr> | |
| 162 | + <td style="vertical-align:top;"> | |
| 163 | + <c:if test="${QX.add == 1 }"> | |
| 164 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 165 | + </c:if> | |
| 166 | + <c:if test="${QX.del == 1 }"> | |
| 167 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 168 | + </c:if> | |
| 169 | + </td> | |
| 170 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 171 | + </tr> | |
| 172 | + </table> | |
| 173 | + </div> | |
| 174 | + </form> | |
| 175 | + | |
| 176 | + </div> | |
| 177 | + <!-- /.col --> | |
| 178 | + </div> | |
| 179 | + <!-- /.row --> | |
| 180 | + </div> | |
| 181 | + <!-- /.page-content --> | |
| 182 | + </div> | |
| 183 | + </div> | |
| 184 | + <!-- /.main-content --> | |
| 185 | + | |
| 186 | + <!-- 返回顶部 --> | |
| 187 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 188 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 189 | + </a> | |
| 190 | + | |
| 191 | + </div> | |
| 192 | + <!-- /.main-container --> | |
| 193 | + | |
| 194 | + <!-- basic scripts --> | |
| 195 | + <!-- 页面底部js¨ --> | |
| 196 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 197 | + <!-- 删除时确认窗口 --> | |
| 198 | + <script src="static/ace/js/bootbox.js"></script> | |
| 199 | + <!-- ace scripts --> | |
| 200 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 201 | + <!-- 下拉框 --> | |
| 202 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 203 | + <!-- 日期框 --> | |
| 204 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 205 | + <!--提示框--> | |
| 206 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 207 | + <script type="text/javascript"> | |
| 208 | + $(top.hangge());//关闭加载状态 | |
| 209 | + //检索 | |
| 210 | + function tosearch(){ | |
| 211 | + top.jzts(); | |
| 212 | + $("#Form").submit(); | |
| 213 | + } | |
| 214 | + $(function() { | |
| 215 | + | |
| 216 | + //日期框 | |
| 217 | + $('.date-picker').datepicker({ | |
| 218 | + autoclose: true, | |
| 219 | + todayHighlight: true | |
| 220 | + }); | |
| 221 | + | |
| 222 | + //下拉框 | |
| 223 | + if(!ace.vars['touch']) { | |
| 224 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 225 | + $(window) | |
| 226 | + .off('resize.chosen') | |
| 227 | + .on('resize.chosen', function() { | |
| 228 | + $('.chosen-select').each(function() { | |
| 229 | + var $this = $(this); | |
| 230 | + $this.next().css({'width': $this.parent().width()}); | |
| 231 | + }); | |
| 232 | + }).trigger('resize.chosen'); | |
| 233 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 234 | + if(event_name != 'sidebar_collapsed') return; | |
| 235 | + $('.chosen-select').each(function() { | |
| 236 | + var $this = $(this); | |
| 237 | + $this.next().css({'width': $this.parent().width()}); | |
| 238 | + }); | |
| 239 | + }); | |
| 240 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 241 | + var target = $(this).find('input[type=radio]'); | |
| 242 | + var which = parseInt(target.val()); | |
| 243 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 244 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 245 | + }); | |
| 246 | + } | |
| 247 | + | |
| 248 | + | |
| 249 | + //复选框全选控制 | |
| 250 | + var active_class = 'active'; | |
| 251 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 252 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 253 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 254 | + var row = this; | |
| 255 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 256 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 257 | + }); | |
| 258 | + }); | |
| 259 | + }); | |
| 260 | + | |
| 261 | + //新增 | |
| 262 | + function add(){ | |
| 263 | + top.jzts(); | |
| 264 | + var diag = new top.Dialog(); | |
| 265 | + diag.Drag=true; | |
| 266 | + diag.Title ="新增"; | |
| 267 | + diag.URL = '<%=basePath%>sclass/goAdd.do'; | |
| 268 | + diag.Width = 450; | |
| 269 | + diag.Height = 355; | |
| 270 | + diag.Modal = true; //有无遮罩窗口 | |
| 271 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 272 | + diag.ShowMinButton = true; //最小化按钮 | |
| 273 | + diag.CancelEvent = function(){ //关闭事件 | |
| 274 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 275 | + if('${page.currentPage}' == '0'){ | |
| 276 | + tosearch(); | |
| 277 | + }else{ | |
| 278 | + tosearch(); | |
| 279 | + } | |
| 280 | + } | |
| 281 | + diag.close(); | |
| 282 | + }; | |
| 283 | + diag.show(); | |
| 284 | + } | |
| 285 | + | |
| 286 | + //删除 | |
| 287 | + function del(Id){ | |
| 288 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 289 | + if(result) { | |
| 290 | + top.jzts(); | |
| 291 | + var url = "<%=basePath%>sclass/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 292 | + $.get(url,function(data){ | |
| 293 | + tosearch(); | |
| 294 | + }); | |
| 295 | + } | |
| 296 | + }); | |
| 297 | + } | |
| 298 | + | |
| 299 | + //修改 | |
| 300 | + function edit(Id){ | |
| 301 | + top.jzts(); | |
| 302 | + var diag = new top.Dialog(); | |
| 303 | + diag.Drag=true; | |
| 304 | + diag.Title ="编辑"; | |
| 305 | + diag.URL = '<%=basePath%>sclass/goEdit.do?ID='+Id; | |
| 306 | + diag.Width = 450; | |
| 307 | + diag.Height = 355; | |
| 308 | + diag.Modal = true; //有无遮罩窗口 | |
| 309 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 310 | + diag.ShowMinButton = true; //最小化按钮 | |
| 311 | + diag.CancelEvent = function(){ //关闭事件 | |
| 312 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 313 | + tosearch(); | |
| 314 | + } | |
| 315 | + diag.close(); | |
| 316 | + }; | |
| 317 | + diag.show(); | |
| 318 | + } | |
| 319 | + | |
| 320 | + //批量操作 | |
| 321 | + function makeAll(msg){ | |
| 322 | + bootbox.confirm(msg, function(result) { | |
| 323 | + if(result) { | |
| 324 | + var str = ''; | |
| 325 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 326 | + if(document.getElementsByName('ids')[i].checked){ | |
| 327 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 328 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 329 | + } | |
| 330 | + } | |
| 331 | + if(str==''){ | |
| 332 | + bootbox.dialog({ | |
| 333 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 334 | + buttons: | |
| 335 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 336 | + }); | |
| 337 | + $("#zcheckbox").tips({ | |
| 338 | + side:1, | |
| 339 | + msg:'点这里全选', | |
| 340 | + bg:'#AE81FF', | |
| 341 | + time:8 | |
| 342 | + }); | |
| 343 | + return; | |
| 344 | + }else{ | |
| 345 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 346 | + top.jzts(); | |
| 347 | + $.ajax({ | |
| 348 | + type: "POST", | |
| 349 | + url: '<%=basePath%>sclass/deleteAll.do?tm='+new Date().getTime(), | |
| 350 | + data: {DATA_IDS:str}, | |
| 351 | + dataType:'json', | |
| 352 | + //beforeSend: validateData, | |
| 353 | + cache: false, | |
| 354 | + success: function(data){ | |
| 355 | + $.each(data.list, function(i, list){ | |
| 356 | + tosearch(); | |
| 357 | + }); | |
| 358 | + } | |
| 359 | + }); | |
| 360 | + } | |
| 361 | + } | |
| 362 | + } | |
| 363 | + }); | |
| 364 | + }; | |
| 365 | + | |
| 366 | + //导出excel | |
| 367 | + function toExcel(){ | |
| 368 | + window.location.href='<%=basePath%>sclass/excel.do'; | |
| 369 | + } | |
| 370 | + </script> | |
| 371 | + | |
| 372 | + | |
| 373 | +</body> | |
| 374 | +</html> | |
| 0 | 375 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/subject/subject_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="subject/${msg }.do" name="Form" id="Form" method="post"> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${pd.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="CNAME" id="CNAME" value="${pd.CNAME}" 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="ENAME" id="ENAME" value="${pd.ENAME}" 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="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td style="text-align: center;" colspan="10"> | |
| 48 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
| 49 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
| 50 | + </td> | |
| 51 | + </tr> | |
| 52 | + </table> | |
| 53 | + </div> | |
| 54 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
| 55 | + </form> | |
| 56 | + </div> | |
| 57 | + <!-- /.col --> | |
| 58 | + </div> | |
| 59 | + <!-- /.row --> | |
| 60 | + </div> | |
| 61 | + <!-- /.page-content --> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <!-- /.main-content --> | |
| 65 | +</div> | |
| 66 | +<!-- /.main-container --> | |
| 67 | + | |
| 68 | + | |
| 69 | + <!-- 页面底部js¨ --> | |
| 70 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 71 | + <!-- 下拉框 --> | |
| 72 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 73 | + <!-- 日期框 --> | |
| 74 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 75 | + <!--提示框--> | |
| 76 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 77 | + <script type="text/javascript"> | |
| 78 | + $(top.hangge()); | |
| 79 | + //保存 | |
| 80 | + function save(){ | |
| 81 | + if($("#CNAME").val()==""){ | |
| 82 | + $("#CNAME").tips({ | |
| 83 | + side:3, | |
| 84 | + msg:'请输入中文名称', | |
| 85 | + bg:'#AE81FF', | |
| 86 | + time:2 | |
| 87 | + }); | |
| 88 | + $("#CNAME").focus(); | |
| 89 | + return false; | |
| 90 | + } | |
| 91 | + if($("#ENAME").val()==""){ | |
| 92 | + $("#ENAME").tips({ | |
| 93 | + side:3, | |
| 94 | + msg:'请输入英文名称', | |
| 95 | + bg:'#AE81FF', | |
| 96 | + time:2 | |
| 97 | + }); | |
| 98 | + $("#ENAME").focus(); | |
| 99 | + return false; | |
| 100 | + } | |
| 101 | + if($("#REMARK").val()==""){ | |
| 102 | + $("#REMARK").tips({ | |
| 103 | + side:3, | |
| 104 | + msg:'请输入备注', | |
| 105 | + bg:'#AE81FF', | |
| 106 | + time:2 | |
| 107 | + }); | |
| 108 | + $("#REMARK").focus(); | |
| 109 | + return false; | |
| 110 | + } | |
| 111 | + $("#Form").submit(); | |
| 112 | + $("#zhongxin").hide(); | |
| 113 | + $("#zhongxin2").show(); | |
| 114 | + } | |
| 115 | + | |
| 116 | + $(function() { | |
| 117 | + //日期框 | |
| 118 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
| 119 | + }); | |
| 120 | + </script> | |
| 121 | +</body> | |
| 122 | +</html> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/subject/subject_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="subject/list.do" method="post" name="Form" id="Form"> | |
| 34 | + <table style="margin-top:5px;"> | |
| 35 | + <tr> | |
| 36 | + <td> | |
| 37 | + <div class="nav-search"> | |
| 38 | + <span class="input-icon"> | |
| 39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | |
| 40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + </td> | |
| 44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | |
| 45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | |
| 46 | + <td style="vertical-align:top;padding-left:2px;"> | |
| 47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
| 48 | + <option value=""></option> | |
| 49 | + <option value="">全部</option> | |
| 50 | + <option value="">1</option> | |
| 51 | + <option value="">2</option> | |
| 52 | + </select> | |
| 53 | + </td> | |
| 54 | + <c:if test="${QX.cha == 1 }"> | |
| 55 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
| 56 | + </c:if> | |
| 57 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + <!-- 检索 --> | |
| 61 | + | |
| 62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
| 63 | + <thead> | |
| 64 | + <tr> | |
| 65 | + <th class="center" style="width:35px;"> | |
| 66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
| 67 | + </th> | |
| 68 | + <th class="center" style="width:50px;">序号</th> | |
| 69 | + <th class="center">中文名称</th> | |
| 70 | + <th class="center">英文名称</th> | |
| 71 | + <th class="center">备注</th> | |
| 72 | + <th class="center">操作</th> | |
| 73 | + </tr> | |
| 74 | + </thead> | |
| 75 | + | |
| 76 | + <tbody> | |
| 77 | + <!-- 开始循环 --> | |
| 78 | + <c:choose> | |
| 79 | + <c:when test="${not empty varList}"> | |
| 80 | + <c:if test="${QX.cha == 1 }"> | |
| 81 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
| 82 | + <tr> | |
| 83 | + <td class='center'> | |
| 84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
| 85 | + </td> | |
| 86 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
| 87 | + <td class='center'>${var.CNAME}</td> | |
| 88 | + <td class='center'>${var.ENAME}</td> | |
| 89 | + <td class='center'>${var.REMARK}</td> | |
| 90 | + <td class="center"> | |
| 91 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
| 92 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
| 93 | + </c:if> | |
| 94 | + <div class="hidden-sm hidden-xs btn-group"> | |
| 95 | + <c:if test="${QX.edit == 1 }"> | |
| 96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
| 97 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
| 98 | + </a> | |
| 99 | + </c:if> | |
| 100 | + <c:if test="${QX.del == 1 }"> | |
| 101 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
| 102 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
| 103 | + </a> | |
| 104 | + </c:if> | |
| 105 | + </div> | |
| 106 | + <div class="hidden-md hidden-lg"> | |
| 107 | + <div class="inline pos-rel"> | |
| 108 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
| 109 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
| 110 | + </button> | |
| 111 | + | |
| 112 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
| 113 | + <c:if test="${QX.edit == 1 }"> | |
| 114 | + <li> | |
| 115 | + <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 116 | + <span class="green"> | |
| 117 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
| 118 | + </span> | |
| 119 | + </a> | |
| 120 | + </li> | |
| 121 | + </c:if> | |
| 122 | + <c:if test="${QX.del == 1 }"> | |
| 123 | + <li> | |
| 124 | + <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 125 | + <span class="red"> | |
| 126 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
| 127 | + </span> | |
| 128 | + </a> | |
| 129 | + </li> | |
| 130 | + </c:if> | |
| 131 | + </ul> | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | + </td> | |
| 135 | + </tr> | |
| 136 | + | |
| 137 | + </c:forEach> | |
| 138 | + </c:if> | |
| 139 | + <c:if test="${QX.cha == 0 }"> | |
| 140 | + <tr> | |
| 141 | + <td colspan="100" class="center">您无权查看</td> | |
| 142 | + </tr> | |
| 143 | + </c:if> | |
| 144 | + </c:when> | |
| 145 | + <c:otherwise> | |
| 146 | + <tr class="main_info"> | |
| 147 | + <td colspan="100" class="center" >没有相关数据</td> | |
| 148 | + </tr> | |
| 149 | + </c:otherwise> | |
| 150 | + </c:choose> | |
| 151 | + </tbody> | |
| 152 | + </table> | |
| 153 | + <div class="page-header position-relative"> | |
| 154 | + <table style="width:100%;"> | |
| 155 | + <tr> | |
| 156 | + <td style="vertical-align:top;"> | |
| 157 | + <c:if test="${QX.add == 1 }"> | |
| 158 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
| 159 | + </c:if> | |
| 160 | + <c:if test="${QX.del == 1 }"> | |
| 161 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
| 162 | + </c:if> | |
| 163 | + </td> | |
| 164 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
| 165 | + </tr> | |
| 166 | + </table> | |
| 167 | + </div> | |
| 168 | + </form> | |
| 169 | + | |
| 170 | + </div> | |
| 171 | + <!-- /.col --> | |
| 172 | + </div> | |
| 173 | + <!-- /.row --> | |
| 174 | + </div> | |
| 175 | + <!-- /.page-content --> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + <!-- /.main-content --> | |
| 179 | + | |
| 180 | + <!-- 返回顶部 --> | |
| 181 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
| 182 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
| 183 | + </a> | |
| 184 | + | |
| 185 | + </div> | |
| 186 | + <!-- /.main-container --> | |
| 187 | + | |
| 188 | + <!-- basic scripts --> | |
| 189 | + <!-- 页面底部js¨ --> | |
| 190 | + <%@ include file="../../system/index/foot.jsp"%> | |
| 191 | + <!-- 删除时确认窗口 --> | |
| 192 | + <script src="static/ace/js/bootbox.js"></script> | |
| 193 | + <!-- ace scripts --> | |
| 194 | + <script src="static/ace/js/ace/ace.js"></script> | |
| 195 | + <!-- 下拉框 --> | |
| 196 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
| 197 | + <!-- 日期框 --> | |
| 198 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
| 199 | + <!--提示框--> | |
| 200 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
| 201 | + <script type="text/javascript"> | |
| 202 | + $(top.hangge());//关闭加载状态 | |
| 203 | + //检索 | |
| 204 | + function tosearch(){ | |
| 205 | + top.jzts(); | |
| 206 | + $("#Form").submit(); | |
| 207 | + } | |
| 208 | + $(function() { | |
| 209 | + | |
| 210 | + //日期框 | |
| 211 | + $('.date-picker').datepicker({ | |
| 212 | + autoclose: true, | |
| 213 | + todayHighlight: true | |
| 214 | + }); | |
| 215 | + | |
| 216 | + //下拉框 | |
| 217 | + if(!ace.vars['touch']) { | |
| 218 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
| 219 | + $(window) | |
| 220 | + .off('resize.chosen') | |
| 221 | + .on('resize.chosen', function() { | |
| 222 | + $('.chosen-select').each(function() { | |
| 223 | + var $this = $(this); | |
| 224 | + $this.next().css({'width': $this.parent().width()}); | |
| 225 | + }); | |
| 226 | + }).trigger('resize.chosen'); | |
| 227 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
| 228 | + if(event_name != 'sidebar_collapsed') return; | |
| 229 | + $('.chosen-select').each(function() { | |
| 230 | + var $this = $(this); | |
| 231 | + $this.next().css({'width': $this.parent().width()}); | |
| 232 | + }); | |
| 233 | + }); | |
| 234 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
| 235 | + var target = $(this).find('input[type=radio]'); | |
| 236 | + var which = parseInt(target.val()); | |
| 237 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
| 238 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
| 239 | + }); | |
| 240 | + } | |
| 241 | + | |
| 242 | + | |
| 243 | + //复选框全选控制 | |
| 244 | + var active_class = 'active'; | |
| 245 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
| 246 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
| 247 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
| 248 | + var row = this; | |
| 249 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
| 250 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
| 251 | + }); | |
| 252 | + }); | |
| 253 | + }); | |
| 254 | + | |
| 255 | + //新增 | |
| 256 | + function add(){ | |
| 257 | + top.jzts(); | |
| 258 | + var diag = new top.Dialog(); | |
| 259 | + diag.Drag=true; | |
| 260 | + diag.Title ="新增"; | |
| 261 | + diag.URL = '<%=basePath%>subject/goAdd.do'; | |
| 262 | + diag.Width = 450; | |
| 263 | + diag.Height = 355; | |
| 264 | + diag.Modal = true; //有无遮罩窗口 | |
| 265 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 266 | + diag.ShowMinButton = true; //最小化按钮 | |
| 267 | + diag.CancelEvent = function(){ //关闭事件 | |
| 268 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 269 | + if('${page.currentPage}' == '0'){ | |
| 270 | + tosearch(); | |
| 271 | + }else{ | |
| 272 | + tosearch(); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + diag.close(); | |
| 276 | + }; | |
| 277 | + diag.show(); | |
| 278 | + } | |
| 279 | + | |
| 280 | + //删除 | |
| 281 | + function del(Id){ | |
| 282 | + bootbox.confirm("确定要删除吗?", function(result) { | |
| 283 | + if(result) { | |
| 284 | + top.jzts(); | |
| 285 | + var url = "<%=basePath%>subject/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | + $.get(url,function(data){ | |
| 287 | + tosearch(); | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + }); | |
| 291 | + } | |
| 292 | + | |
| 293 | + //修改 | |
| 294 | + function edit(Id){ | |
| 295 | + top.jzts(); | |
| 296 | + var diag = new top.Dialog(); | |
| 297 | + diag.Drag=true; | |
| 298 | + diag.Title ="编辑"; | |
| 299 | + diag.URL = '<%=basePath%>subject/goEdit.do?ID='+Id; | |
| 300 | + diag.Width = 450; | |
| 301 | + diag.Height = 355; | |
| 302 | + diag.Modal = true; //有无遮罩窗口 | |
| 303 | + diag. ShowMaxButton = true; //最大化按钮 | |
| 304 | + diag.ShowMinButton = true; //最小化按钮 | |
| 305 | + diag.CancelEvent = function(){ //关闭事件 | |
| 306 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
| 307 | + tosearch(); | |
| 308 | + } | |
| 309 | + diag.close(); | |
| 310 | + }; | |
| 311 | + diag.show(); | |
| 312 | + } | |
| 313 | + | |
| 314 | + //批量操作 | |
| 315 | + function makeAll(msg){ | |
| 316 | + bootbox.confirm(msg, function(result) { | |
| 317 | + if(result) { | |
| 318 | + var str = ''; | |
| 319 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
| 320 | + if(document.getElementsByName('ids')[i].checked){ | |
| 321 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
| 322 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
| 323 | + } | |
| 324 | + } | |
| 325 | + if(str==''){ | |
| 326 | + bootbox.dialog({ | |
| 327 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
| 328 | + buttons: | |
| 329 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
| 330 | + }); | |
| 331 | + $("#zcheckbox").tips({ | |
| 332 | + side:1, | |
| 333 | + msg:'点这里全选', | |
| 334 | + bg:'#AE81FF', | |
| 335 | + time:8 | |
| 336 | + }); | |
| 337 | + return; | |
| 338 | + }else{ | |
| 339 | + if(msg == '确定要删除选中的数据吗?'){ | |
| 340 | + top.jzts(); | |
| 341 | + $.ajax({ | |
| 342 | + type: "POST", | |
| 343 | + url: '<%=basePath%>subject/deleteAll.do?tm='+new Date().getTime(), | |
| 344 | + data: {DATA_IDS:str}, | |
| 345 | + dataType:'json', | |
| 346 | + //beforeSend: validateData, | |
| 347 | + cache: false, | |
| 348 | + success: function(data){ | |
| 349 | + $.each(data.list, function(i, list){ | |
| 350 | + tosearch(); | |
| 351 | + }); | |
| 352 | + } | |
| 353 | + }); | |
| 354 | + } | |
| 355 | + } | |
| 356 | + } | |
| 357 | + }); | |
| 358 | + }; | |
| 359 | + | |
| 360 | + //导出excel | |
| 361 | + function toExcel(){ | |
| 362 | + window.location.href='<%=basePath%>subject/excel.do'; | |
| 363 | + } | |
| 364 | + </script> | |
| 365 | + | |
| 366 | + | |
| 367 | +</body> | |
| 368 | +</html> | |
| 0 | 369 | \ No newline at end of file | ... | ... |
resources/dbconfig.properties
| 1 | 1 | #数据源 1 |
| 2 | -url:jdbc:mysql://localhost:3306/sunvote?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | |
| 2 | +url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | |
| 3 | 3 | driverClassName:com.mysql.jdbc.Driver |
| 4 | 4 | username:root |
| 5 | -password:elvis | |
| 5 | +#password:elvis | |
| 6 | +password:admin | |
| 6 | 7 | filters:stat |
| 7 | 8 | maxActive:20 |
| 8 | 9 | initialSize:1 |
| ... | ... | @@ -13,7 +14,7 @@ timeBetweenEvictionRunsMillis:60000 |
| 13 | 14 | minEvictableIdleTimeMillis:300000 |
| 14 | 15 | validationQuery:SELECT 'x' |
| 15 | 16 | testWhileIdle:true |
| 16 | -testOnBorrow:false | |
| 17 | +testOnBorrow:true | |
| 17 | 18 | testOnReturn:false |
| 18 | 19 | maxOpenPreparedStatements:20 |
| 19 | 20 | removeAbandoned:true | ... | ... |
resources/ftl/createCode/jsp_edit_Template.ftl
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <div class="col-xs-12"> |
| 29 | 29 | |
| 30 | 30 | <form action="${objectNameLower}/${r"${msg }"}.do" name="Form" id="Form" method="post"> |
| 31 | - <input type="hidden" name="${ID" id="${ID" value="${r"${pd."}${ID${r"}"}"/> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${r"${pd."}ID${r"}"}"/> | |
| 32 | 32 | <div id="zhongxin" style="padding-top: 13px;"> |
| 33 | 33 | <table id="table_report" class="table table-striped table-bordered table-hover"> |
| 34 | 34 | <#list fieldList as var> | ... | ... |
resources/ftl/createCode/jsp_list_Template.ftl
| ... | ... | @@ -81,7 +81,7 @@ |
| 81 | 81 | <c:forEach items="${r"${varList}"}" var="var" varStatus="vs"> |
| 82 | 82 | <tr> |
| 83 | 83 | <td class='center'> |
| 84 | - <label class="pos-rel"><input type='checkbox' name='ids' value="${r"${var."}${ID${r"}"}" class="ace" /><span class="lbl"></span></label> | |
| 84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${r"${var."}ID${r"}"}" class="ace" /><span class="lbl"></span></label> | |
| 85 | 85 | </td> |
| 86 | 86 | <td class='center' style="width: 30px;">${r"${vs.index+1}"}</td> |
| 87 | 87 | <#list fieldList as var> |
| ... | ... | @@ -93,12 +93,12 @@ |
| 93 | 93 | </c:if> |
| 94 | 94 | <div class="hidden-sm hidden-xs btn-group"> |
| 95 | 95 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 96 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}${ID${r"}"}');"> | |
| 96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}ID${r"}"}');"> | |
| 97 | 97 | <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> |
| 98 | 98 | </a> |
| 99 | 99 | </c:if> |
| 100 | 100 | <c:if test="${r"${QX.del == 1 }"}"> |
| 101 | - <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}${ID${r"}"}');"> | |
| 101 | + <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}ID${r"}"}');"> | |
| 102 | 102 | <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> |
| 103 | 103 | </a> |
| 104 | 104 | </c:if> |
| ... | ... | @@ -112,7 +112,7 @@ |
| 112 | 112 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
| 113 | 113 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 114 | 114 | <li> |
| 115 | - <a style="cursor:pointer;" onclick="edit('${r"${var."}${ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 115 | + <a style="cursor:pointer;" onclick="edit('${r"${var."}ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 116 | 116 | <span class="green"> |
| 117 | 117 | <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
| 118 | 118 | </span> |
| ... | ... | @@ -121,7 +121,7 @@ |
| 121 | 121 | </c:if> |
| 122 | 122 | <c:if test="${r"${QX.del == 1 }"}"> |
| 123 | 123 | <li> |
| 124 | - <a style="cursor:pointer;" onclick="del('${r"${var."}${ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 124 | + <a style="cursor:pointer;" onclick="del('${r"${var."}ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 125 | 125 | <span class="red"> |
| 126 | 126 | <i class="ace-icon fa fa-trash-o bigger-120"></i> |
| 127 | 127 | </span> |
| ... | ... | @@ -282,7 +282,7 @@ |
| 282 | 282 | bootbox.confirm("确定要删除吗?", function(result) { |
| 283 | 283 | if(result) { |
| 284 | 284 | top.jzts(); |
| 285 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${ID="+Id+"&tm="+new Date().getTime(); | |
| 285 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | 286 | $.get(url,function(data){ |
| 287 | 287 | tosearch(); |
| 288 | 288 | }); |
| ... | ... | @@ -296,7 +296,7 @@ |
| 296 | 296 | var diag = new top.Dialog(); |
| 297 | 297 | diag.Drag=true; |
| 298 | 298 | diag.Title ="编辑"; |
| 299 | - diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?${ID='+Id; | |
| 299 | + diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?ID='+Id; | |
| 300 | 300 | diag.Width = 450; |
| 301 | 301 | diag.Height = 355; |
| 302 | 302 | diag.Modal = true; //有无遮罩窗口 | ... | ... |
resources/ftl/createCode/mapperMysqlTemplate.ftl
| ... | ... | @@ -28,9 +28,13 @@ |
| 28 | 28 | insert into |
| 29 | 29 | <include refid="tableName"></include> |
| 30 | 30 | ( |
| 31 | - <include refid="Field"></include> | |
| 31 | + <#list fieldList as var> | |
| 32 | + ${var[0]}, | |
| 33 | + </#list> | |
| 32 | 34 | ) values ( |
| 33 | - <include refid="FieldValue"></include> | |
| 35 | + <#list fieldList as var> | |
| 36 | + ${r"#{"}${var[0]}${r"}"}, | |
| 37 | + </#list> | |
| 34 | 38 | ) |
| 35 | 39 | </insert> |
| 36 | 40 | ... | ... |
resources/ftl/createCode/mysql_SQL_Template.ftl
resources/ftl/createFaCode/jsp_edit_Template.ftl
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <div class="col-xs-12"> |
| 29 | 29 | |
| 30 | 30 | <form action="${objectNameLower}/${r"${msg }"}.do" name="Form" id="Form" method="post"> |
| 31 | - <input type="hidden" name="${ID" id="${ID" value="${r"${pd."}${ID${r"}"}"/> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${r"${pd."}ID${r"}"}"/> | |
| 32 | 32 | <div id="zhongxin" style="padding-top: 13px;"> |
| 33 | 33 | <table id="table_report" class="table table-striped table-bordered table-hover"> |
| 34 | 34 | <#list fieldList as var> |
| ... | ... | @@ -74,7 +74,7 @@ |
| 74 | 74 | |
| 75 | 75 | <c:if test="${r"${'edit' == msg }"}"> |
| 76 | 76 | <div> |
| 77 | - <iframe name="treeFrame" id="treeFrame" frameborder="0" src="<%=basePath%>/${objectNameLower}mx/list.do?${ID=${r"${pd."}${ID${r"}"}" style="margin:0 auto;width:805px;height:368px;;"></iframe> | |
| 77 | + <iframe name="treeFrame" id="treeFrame" frameborder="0" src="<%=basePath%>/${objectNameLower}mx/list.do?ID=${r"${pd."}ID${r"}"}" style="margin:0 auto;width:805px;height:368px;;"></iframe> | |
| 78 | 78 | </div> |
| 79 | 79 | </c:if> |
| 80 | 80 | ... | ... |
resources/ftl/createFaCode/jsp_list_Template.ftl
| ... | ... | @@ -87,12 +87,12 @@ |
| 87 | 87 | </c:if> |
| 88 | 88 | <div class="hidden-sm hidden-xs btn-group"> |
| 89 | 89 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 90 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}${ID${r"}"}');"> | |
| 90 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}ID${r"}"}');"> | |
| 91 | 91 | <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> |
| 92 | 92 | </a> |
| 93 | 93 | </c:if> |
| 94 | 94 | <c:if test="${r"${QX.del == 1 }"}"> |
| 95 | - <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}${ID${r"}"}');"> | |
| 95 | + <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}ID${r"}"}');"> | |
| 96 | 96 | <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> |
| 97 | 97 | </a> |
| 98 | 98 | </c:if> |
| ... | ... | @@ -106,7 +106,7 @@ |
| 106 | 106 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
| 107 | 107 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 108 | 108 | <li> |
| 109 | - <a style="cursor:pointer;" onclick="edit('${r"${var."}${ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 109 | + <a style="cursor:pointer;" onclick="edit('${r"${var."}ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 110 | 110 | <span class="green"> |
| 111 | 111 | <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
| 112 | 112 | </span> |
| ... | ... | @@ -115,7 +115,7 @@ |
| 115 | 115 | </c:if> |
| 116 | 116 | <c:if test="${r"${QX.del == 1 }"}"> |
| 117 | 117 | <li> |
| 118 | - <a style="cursor:pointer;" onclick="del('${r"${var."}${ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 118 | + <a style="cursor:pointer;" onclick="del('${r"${var."}ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 119 | 119 | <span class="red"> |
| 120 | 120 | <i class="ace-icon fa fa-trash-o bigger-120"></i> |
| 121 | 121 | </span> |
| ... | ... | @@ -273,7 +273,7 @@ |
| 273 | 273 | bootbox.confirm("确定要删除吗?", function(result) { |
| 274 | 274 | if(result) { |
| 275 | 275 | top.jzts(); |
| 276 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${ID="+Id+"&tm="+new Date().getTime(); | |
| 276 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 277 | 277 | $.get(url,function(data){ |
| 278 | 278 | if("success" == data.result){ |
| 279 | 279 | tosearch(); |
| ... | ... | @@ -302,7 +302,7 @@ |
| 302 | 302 | var diag = new top.Dialog(); |
| 303 | 303 | diag.Drag=true; |
| 304 | 304 | diag.Title ="编辑"; |
| 305 | - diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?${ID='+Id; | |
| 305 | + diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?ID='+Id; | |
| 306 | 306 | diag.Width = 800; |
| 307 | 307 | diag.Height = 600; |
| 308 | 308 | diag.Modal = true; //有无遮罩窗口 | ... | ... |
resources/ftl/createFaCode/mapperMysqlTemplate.ftl
| ... | ... | @@ -28,9 +28,13 @@ |
| 28 | 28 | insert into |
| 29 | 29 | <include refid="tableName"></include> |
| 30 | 30 | ( |
| 31 | - <include refid="Field"></include> | |
| 31 | + <#list fieldList as var> | |
| 32 | + ${var[0]}, | |
| 33 | + </#list> | |
| 32 | 34 | ) values ( |
| 33 | - <include refid="FieldValue"></include> | |
| 35 | + <#list fieldList as var> | |
| 36 | + ${r"#{"}${var[0]}${r"}"}, | |
| 37 | + </#list> | |
| 34 | 38 | ) |
| 35 | 39 | </insert> |
| 36 | 40 | ... | ... |
resources/ftl/createFaCode/mysql_SQL_Template.ftl
resources/ftl/createSoCode/jsp_edit_Template.ftl
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <div class="col-xs-12"> |
| 29 | 29 | |
| 30 | 30 | <form action="${objectNameLower}/${r"${msg }"}.do" name="Form" id="Form" method="post"> |
| 31 | - <input type="hidden" name="${ID" id="${ID" value="${r"${pd."}${ID${r"}"}"/> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${r"${pd."}ID${r"}"}"/> | |
| 32 | 32 | <input type="hidden" name="${faobject}_ID" id="${faobject}_ID" value="${r"${pd."}${faobject}_ID${r"}"}"/> |
| 33 | 33 | <div id="zhongxin" style="padding-top: 13px;"> |
| 34 | 34 | <table id="table_report" class="table table-striped table-bordered table-hover"> | ... | ... |
resources/ftl/createSoCode/jsp_list_Template.ftl
| ... | ... | @@ -83,7 +83,7 @@ |
| 83 | 83 | <c:forEach items="${r"${varList}"}" var="var" varStatus="vs"> |
| 84 | 84 | <tr> |
| 85 | 85 | <td class='center'> |
| 86 | - <label class="pos-rel"><input type='checkbox' name='ids' value="${r"${var."}${ID${r"}"}" class="ace" /><span class="lbl"></span></label> | |
| 86 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${r"${var."}ID${r"}"}" class="ace" /><span class="lbl"></span></label> | |
| 87 | 87 | </td> |
| 88 | 88 | <td class='center' style="width: 30px;">${r"${vs.index+1}"}</td> |
| 89 | 89 | <#list fieldList as var> |
| ... | ... | @@ -95,12 +95,12 @@ |
| 95 | 95 | </c:if> |
| 96 | 96 | <div class="hidden-sm hidden-xs btn-group"> |
| 97 | 97 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 98 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}${ID${r"}"}');"> | |
| 98 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}ID${r"}"}');"> | |
| 99 | 99 | <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> |
| 100 | 100 | </a> |
| 101 | 101 | </c:if> |
| 102 | 102 | <c:if test="${r"${QX.del == 1 }"}"> |
| 103 | - <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}${ID${r"}"}');"> | |
| 103 | + <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}ID${r"}"}');"> | |
| 104 | 104 | <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> |
| 105 | 105 | </a> |
| 106 | 106 | </c:if> |
| ... | ... | @@ -114,7 +114,7 @@ |
| 114 | 114 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
| 115 | 115 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 116 | 116 | <li> |
| 117 | - <a style="cursor:pointer;" onclick="edit('${r"${var."}${ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 117 | + <a style="cursor:pointer;" onclick="edit('${r"${var."}ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 118 | 118 | <span class="green"> |
| 119 | 119 | <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
| 120 | 120 | </span> |
| ... | ... | @@ -123,7 +123,7 @@ |
| 123 | 123 | </c:if> |
| 124 | 124 | <c:if test="${r"${QX.del == 1 }"}"> |
| 125 | 125 | <li> |
| 126 | - <a style="cursor:pointer;" onclick="del('${r"${var."}${ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 126 | + <a style="cursor:pointer;" onclick="del('${r"${var."}ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 127 | 127 | <span class="red"> |
| 128 | 128 | <i class="ace-icon fa fa-trash-o bigger-120"></i> |
| 129 | 129 | </span> |
| ... | ... | @@ -282,7 +282,7 @@ |
| 282 | 282 | bootbox.confirm("确定要删除吗?", function(result) { |
| 283 | 283 | if(result) { |
| 284 | 284 | top.jzts(); |
| 285 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${ID="+Id+"&tm="+new Date().getTime(); | |
| 285 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | 286 | $.get(url,function(data){ |
| 287 | 287 | tosearch(); |
| 288 | 288 | }); |
| ... | ... | @@ -296,7 +296,7 @@ |
| 296 | 296 | var diag = new top.Dialog(); |
| 297 | 297 | diag.Drag=true; |
| 298 | 298 | diag.Title ="编辑"; |
| 299 | - diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?${ID='+Id; | |
| 299 | + diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?ID='+Id; | |
| 300 | 300 | diag.Width = 450; |
| 301 | 301 | diag.Height = 355; |
| 302 | 302 | diag.Modal = true; //有无遮罩窗口 | ... | ... |
resources/ftl/createSoCode/mapperMysqlTemplate.ftl
| ... | ... | @@ -30,9 +30,15 @@ |
| 30 | 30 | insert into |
| 31 | 31 | <include refid="tableName"></include> |
| 32 | 32 | ( |
| 33 | - <include refid="Field"></include> | |
| 33 | + <#list fieldList as var> | |
| 34 | + ${var[0]}, | |
| 35 | + </#list> | |
| 36 | + ${faobject}_ID | |
| 34 | 37 | ) values ( |
| 35 | - <include refid="FieldValue"></include> | |
| 38 | + <#list fieldList as var> | |
| 39 | + ${r"#{"}${var[0]}${r"}"}, | |
| 40 | + </#list> | |
| 41 | + ${r"#{"}${faobject}_ID${r"}"} | |
| 36 | 42 | ) |
| 37 | 43 | </insert> |
| 38 | 44 | ... | ... |
resources/ftl/createSoCode/mysql_SQL_Template.ftl
resources/ftl/createTreeCode/jsp_edit_Template.ftl
| ... | ... | @@ -28,8 +28,8 @@ |
| 28 | 28 | <div class="col-xs-12"> |
| 29 | 29 | |
| 30 | 30 | <form action="${objectNameLower}/${r"${msg }"}.do" name="Form" id="Form" method="post"> |
| 31 | - <input type="hidden" name="${ID" id="${ID" value="${r"${pd."}${ID${r"}"}"/> | |
| 32 | - <input type="hidden" name="PARENT_ID" id="PARENT_ID" value="${r"${null == pd.PARENT_ID ? "}${ID${r":pd.PARENT_ID}"}"/> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${r"${pd."}ID${r"}"}"/> | |
| 32 | + <input type="hidden" name="PARENT_ID" id="PARENT_ID" value="${r"${null == pd.PARENT_ID ? "}ID${r":pd.PARENT_ID}"}"/> | |
| 33 | 33 | <div id="zhongxin" style="padding-top: 13px;"> |
| 34 | 34 | <table id="table_report" class="table table-striped table-bordered table-hover"> |
| 35 | 35 | <tr> | ... | ... |
resources/ftl/createTreeCode/jsp_list_Template.ftl
| ... | ... | @@ -79,7 +79,7 @@ |
| 79 | 79 | <c:forEach items="${r"${varList}"}" var="var" varStatus="vs"> |
| 80 | 80 | <tr> |
| 81 | 81 | <td class='center' style="width: 30px;">${r"${vs.index+1}"}</td> |
| 82 | - <td class='center'><a href="javascript:goSondict('${r"${var."}${ID${r"}"}')"><i class="ace-icon fa fa-share bigger-100"></i> ${r"${var.NAME}"}</a></td> | |
| 82 | + <td class='center'><a href="javascript:goSondict('${r"${var."}ID${r"}"}')"><i class="ace-icon fa fa-share bigger-100"></i> ${r"${var.NAME}"}</a></td> | |
| 83 | 83 | <#list fieldList as var> |
| 84 | 84 | <td class='center'>${r"${var."}${var[0]}${r"}"}</td> |
| 85 | 85 | </#list> |
| ... | ... | @@ -89,12 +89,12 @@ |
| 89 | 89 | </c:if> |
| 90 | 90 | <div class="hidden-sm hidden-xs btn-group"> |
| 91 | 91 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 92 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}${ID${r"}"}');"> | |
| 92 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}ID${r"}"}');"> | |
| 93 | 93 | <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> |
| 94 | 94 | </a> |
| 95 | 95 | </c:if> |
| 96 | 96 | <c:if test="${r"${QX.del == 1 }"}"> |
| 97 | - <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}${ID${r"}"}');"> | |
| 97 | + <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}ID${r"}"}');"> | |
| 98 | 98 | <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> |
| 99 | 99 | </a> |
| 100 | 100 | </c:if> |
| ... | ... | @@ -108,7 +108,7 @@ |
| 108 | 108 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
| 109 | 109 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 110 | 110 | <li> |
| 111 | - <a style="cursor:pointer;" onclick="edit('${r"${var."}${ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 111 | + <a style="cursor:pointer;" onclick="edit('${r"${var."}ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 112 | 112 | <span class="green"> |
| 113 | 113 | <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
| 114 | 114 | </span> |
| ... | ... | @@ -117,7 +117,7 @@ |
| 117 | 117 | </c:if> |
| 118 | 118 | <c:if test="${r"${QX.del == 1 }"}"> |
| 119 | 119 | <li> |
| 120 | - <a style="cursor:pointer;" onclick="del('${r"${var."}${ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 120 | + <a style="cursor:pointer;" onclick="del('${r"${var."}ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 121 | 121 | <span class="red"> |
| 122 | 122 | <i class="ace-icon fa fa-trash-o bigger-120"></i> |
| 123 | 123 | </span> |
| ... | ... | @@ -151,9 +151,9 @@ |
| 151 | 151 | <tr> |
| 152 | 152 | <td style="vertical-align:top;"> |
| 153 | 153 | <c:if test="${r"${QX.add == 1 }"}"> |
| 154 | - <a class="btn btn-mini btn-success" onclick="add('${r"${"}${ID${r"}"}');">新增</a> | |
| 154 | + <a class="btn btn-mini btn-success" onclick="add('${r"${"}ID${r"}"}');">新增</a> | |
| 155 | 155 | </c:if> |
| 156 | - <c:if test="${r"${null != pd."}${ID${r" && pd."}${ID${r" != ''}"}"> | |
| 156 | + <c:if test="${r"${null != pd."}ID${r" && pd."}ID${r" != ''}"}"> | |
| 157 | 157 | <a class="btn btn-mini btn-success" onclick="goSondict('${r"${pd.PARENT_ID}"}');">返回</a> |
| 158 | 158 | </c:if> |
| 159 | 159 | </td> |
| ... | ... | @@ -203,9 +203,9 @@ |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | //去此ID下子级列表 |
| 206 | - function goSondict(${ID){ | |
| 206 | + function goSondict(ID){ | |
| 207 | 207 | top.jzts(); |
| 208 | - window.location.href="<%=basePath%>${objectNameLower}/list.do?${ID="+${ID; | |
| 208 | + window.location.href="<%=basePath%>${objectNameLower}/list.do?ID="+ID; | |
| 209 | 209 | }; |
| 210 | 210 | |
| 211 | 211 | $(function() { |
| ... | ... | @@ -245,12 +245,12 @@ |
| 245 | 245 | }); |
| 246 | 246 | |
| 247 | 247 | //新增 |
| 248 | - function add(${ID){ | |
| 248 | + function add(ID){ | |
| 249 | 249 | top.jzts(); |
| 250 | 250 | var diag = new top.Dialog(); |
| 251 | 251 | diag.Drag=true; |
| 252 | 252 | diag.Title ="新增"; |
| 253 | - diag.URL = '<%=basePath%>${objectNameLower}/goAdd.do?${ID='+${ID; | |
| 253 | + diag.URL = '<%=basePath%>${objectNameLower}/goAdd.do?ID='+ID; | |
| 254 | 254 | diag.Width = 800; |
| 255 | 255 | diag.Height = 600; |
| 256 | 256 | diag.Modal = true; //有无遮罩窗口 |
| ... | ... | @@ -258,7 +258,7 @@ |
| 258 | 258 | diag.ShowMinButton = true; //最小化按钮 |
| 259 | 259 | diag.CancelEvent = function(){ //关闭事件 |
| 260 | 260 | if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ |
| 261 | - parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?${ID=${r"${"}${ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 261 | + parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?ID=${r"${"}ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 262 | 262 | } |
| 263 | 263 | diag.close(); |
| 264 | 264 | }; |
| ... | ... | @@ -270,7 +270,7 @@ |
| 270 | 270 | bootbox.confirm("确定要删除吗?", function(result) { |
| 271 | 271 | if(result) { |
| 272 | 272 | top.jzts(); |
| 273 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${ID="+Id+"&tm="+new Date().getTime(); | |
| 273 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 274 | 274 | $.get(url,function(data){ |
| 275 | 275 | tosearch(); |
| 276 | 276 | }); |
| ... | ... | @@ -283,10 +283,10 @@ |
| 283 | 283 | bootbox.confirm("确定要删除吗?", function(result) { |
| 284 | 284 | if(result) { |
| 285 | 285 | top.jzts(); |
| 286 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 287 | 287 | $.get(url,function(data){ |
| 288 | 288 | if("success" == data.result){ |
| 289 | - parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?${ID=${r"${"}${ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 289 | + parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?ID=${r"${"}ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 290 | 290 | }else if("false" == data.result){ |
| 291 | 291 | top.hangge(); |
| 292 | 292 | bootbox.dialog({ |
| ... | ... | @@ -313,7 +313,7 @@ |
| 313 | 313 | var diag = new top.Dialog(); |
| 314 | 314 | diag.Drag=true; |
| 315 | 315 | diag.Title ="编辑"; |
| 316 | - diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?${ID='+Id; | |
| 316 | + diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?ID='+Id; | |
| 317 | 317 | diag.Width = 800; |
| 318 | 318 | diag.Height = 600; |
| 319 | 319 | diag.Modal = true; //有无遮罩窗口 |
| ... | ... | @@ -321,7 +321,7 @@ |
| 321 | 321 | diag.ShowMinButton = true; //最小化按钮 |
| 322 | 322 | diag.CancelEvent = function(){ //关闭事件 |
| 323 | 323 | if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ |
| 324 | - parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?${ID=${r"${"}${ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 324 | + parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?ID=${r"${"}ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 325 | 325 | } |
| 326 | 326 | diag.close(); |
| 327 | 327 | }; | ... | ... |
resources/ftl/createTreeCode/mapperMysqlTemplate.ftl
| ... | ... | @@ -38,9 +38,17 @@ |
| 38 | 38 | insert into |
| 39 | 39 | <include refid="tableName"></include> |
| 40 | 40 | ( |
| 41 | - <include refid="Field"></include> | |
| 41 | + <#list fieldList as var> | |
| 42 | + ${var[0]}, | |
| 43 | + </#list> | |
| 44 | + PARENT_ID, | |
| 45 | + NAME | |
| 42 | 46 | ) values ( |
| 43 | - <include refid="FieldValue"></include> | |
| 47 | + <#list fieldList as var> | |
| 48 | + ${r"#{"}${var[0]}${r"}"}, | |
| 49 | + </#list> | |
| 50 | + ${r"#{"}PARENT_ID${r"}"}, | |
| 51 | + ${r"#{"}NAME${r"}"} | |
| 44 | 52 | ) |
| 45 | 53 | </insert> |
| 46 | 54 | ... | ... |
resources/ftl/createTreeCode/mysql_SQL_Template.ftl
resources/ftl_backups/createCode/jsp_edit_Template.ftl
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <div class="col-xs-12"> |
| 29 | 29 | |
| 30 | 30 | <form action="${objectNameLower}/${r"${msg }"}.do" name="Form" id="Form" method="post"> |
| 31 | - <input type="hidden" name="${objectNameUpper}_ID" id="${objectNameUpper}_ID" value="${r"${pd."}${objectNameUpper}_ID${r"}"}"/> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${r"${pd."}ID${r"}"}"/> | |
| 32 | 32 | <div id="zhongxin" style="padding-top: 13px;"> |
| 33 | 33 | <table id="table_report" class="table table-striped table-bordered table-hover"> |
| 34 | 34 | <#list fieldList as var> | ... | ... |
resources/ftl_backups/createCode/jsp_list_Template.ftl
| ... | ... | @@ -81,7 +81,7 @@ |
| 81 | 81 | <c:forEach items="${r"${varList}"}" var="var" varStatus="vs"> |
| 82 | 82 | <tr> |
| 83 | 83 | <td class='center'> |
| 84 | - <label class="pos-rel"><input type='checkbox' name='ids' value="${r"${var."}${objectNameUpper}_ID${r"}"}" class="ace" /><span class="lbl"></span></label> | |
| 84 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${r"${var."}ID${r"}"}" class="ace" /><span class="lbl"></span></label> | |
| 85 | 85 | </td> |
| 86 | 86 | <td class='center' style="width: 30px;">${r"${vs.index+1}"}</td> |
| 87 | 87 | <#list fieldList as var> |
| ... | ... | @@ -93,12 +93,12 @@ |
| 93 | 93 | </c:if> |
| 94 | 94 | <div class="hidden-sm hidden-xs btn-group"> |
| 95 | 95 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 96 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}${objectNameUpper}_ID${r"}"}');"> | |
| 96 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}ID${r"}"}');"> | |
| 97 | 97 | <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> |
| 98 | 98 | </a> |
| 99 | 99 | </c:if> |
| 100 | 100 | <c:if test="${r"${QX.del == 1 }"}"> |
| 101 | - <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}${objectNameUpper}_ID${r"}"}');"> | |
| 101 | + <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}ID${r"}"}');"> | |
| 102 | 102 | <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> |
| 103 | 103 | </a> |
| 104 | 104 | </c:if> |
| ... | ... | @@ -112,7 +112,7 @@ |
| 112 | 112 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
| 113 | 113 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 114 | 114 | <li> |
| 115 | - <a style="cursor:pointer;" onclick="edit('${r"${var."}${objectNameUpper}_ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 115 | + <a style="cursor:pointer;" onclick="edit('${r"${var."}ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 116 | 116 | <span class="green"> |
| 117 | 117 | <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
| 118 | 118 | </span> |
| ... | ... | @@ -121,7 +121,7 @@ |
| 121 | 121 | </c:if> |
| 122 | 122 | <c:if test="${r"${QX.del == 1 }"}"> |
| 123 | 123 | <li> |
| 124 | - <a style="cursor:pointer;" onclick="del('${r"${var."}${objectNameUpper}_ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 124 | + <a style="cursor:pointer;" onclick="del('${r"${var."}ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 125 | 125 | <span class="red"> |
| 126 | 126 | <i class="ace-icon fa fa-trash-o bigger-120"></i> |
| 127 | 127 | </span> |
| ... | ... | @@ -282,7 +282,7 @@ |
| 282 | 282 | bootbox.confirm("确定要删除吗?", function(result) { |
| 283 | 283 | if(result) { |
| 284 | 284 | top.jzts(); |
| 285 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${objectNameUpper}_ID="+Id+"&tm="+new Date().getTime(); | |
| 285 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | 286 | $.get(url,function(data){ |
| 287 | 287 | tosearch(); |
| 288 | 288 | }); |
| ... | ... | @@ -296,7 +296,7 @@ |
| 296 | 296 | var diag = new top.Dialog(); |
| 297 | 297 | diag.Drag=true; |
| 298 | 298 | diag.Title ="编辑"; |
| 299 | - diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?${objectNameUpper}_ID='+Id; | |
| 299 | + diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?ID='+Id; | |
| 300 | 300 | diag.Width = 450; |
| 301 | 301 | diag.Height = 355; |
| 302 | 302 | diag.Modal = true; //有无遮罩窗口 | ... | ... |
resources/ftl_backups/createFaCode/jsp_edit_Template.ftl
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <div class="col-xs-12"> |
| 29 | 29 | |
| 30 | 30 | <form action="${objectNameLower}/${r"${msg }"}.do" name="Form" id="Form" method="post"> |
| 31 | - <input type="hidden" name="${objectNameUpper}_ID" id="${objectNameUpper}_ID" value="${r"${pd."}${objectNameUpper}_ID${r"}"}"/> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${r"${pd."}ID${r"}"}"/> | |
| 32 | 32 | <div id="zhongxin" style="padding-top: 13px;"> |
| 33 | 33 | <table id="table_report" class="table table-striped table-bordered table-hover"> |
| 34 | 34 | <#list fieldList as var> |
| ... | ... | @@ -74,7 +74,7 @@ |
| 74 | 74 | |
| 75 | 75 | <c:if test="${r"${'edit' == msg }"}"> |
| 76 | 76 | <div> |
| 77 | - <iframe name="treeFrame" id="treeFrame" frameborder="0" src="<%=basePath%>/${objectNameLower}mx/list.do?${objectNameUpper}_ID=${r"${pd."}${objectNameUpper}_ID${r"}"}" style="margin:0 auto;width:805px;height:368px;;"></iframe> | |
| 77 | + <iframe name="treeFrame" id="treeFrame" frameborder="0" src="<%=basePath%>/${objectNameLower}mx/list.do?ID=${r"${pd."}ID${r"}"}" style="margin:0 auto;width:805px;height:368px;;"></iframe> | |
| 78 | 78 | </div> |
| 79 | 79 | </c:if> |
| 80 | 80 | ... | ... |
resources/ftl_backups/createFaCode/jsp_list_Template.ftl
| ... | ... | @@ -87,12 +87,12 @@ |
| 87 | 87 | </c:if> |
| 88 | 88 | <div class="hidden-sm hidden-xs btn-group"> |
| 89 | 89 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 90 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}${objectNameUpper}_ID${r"}"}');"> | |
| 90 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}ID${r"}"}');"> | |
| 91 | 91 | <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> |
| 92 | 92 | </a> |
| 93 | 93 | </c:if> |
| 94 | 94 | <c:if test="${r"${QX.del == 1 }"}"> |
| 95 | - <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}${objectNameUpper}_ID${r"}"}');"> | |
| 95 | + <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}ID${r"}"}');"> | |
| 96 | 96 | <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> |
| 97 | 97 | </a> |
| 98 | 98 | </c:if> |
| ... | ... | @@ -106,7 +106,7 @@ |
| 106 | 106 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
| 107 | 107 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 108 | 108 | <li> |
| 109 | - <a style="cursor:pointer;" onclick="edit('${r"${var."}${objectNameUpper}_ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 109 | + <a style="cursor:pointer;" onclick="edit('${r"${var."}ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 110 | 110 | <span class="green"> |
| 111 | 111 | <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
| 112 | 112 | </span> |
| ... | ... | @@ -115,7 +115,7 @@ |
| 115 | 115 | </c:if> |
| 116 | 116 | <c:if test="${r"${QX.del == 1 }"}"> |
| 117 | 117 | <li> |
| 118 | - <a style="cursor:pointer;" onclick="del('${r"${var."}${objectNameUpper}_ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 118 | + <a style="cursor:pointer;" onclick="del('${r"${var."}ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 119 | 119 | <span class="red"> |
| 120 | 120 | <i class="ace-icon fa fa-trash-o bigger-120"></i> |
| 121 | 121 | </span> |
| ... | ... | @@ -273,7 +273,7 @@ |
| 273 | 273 | bootbox.confirm("确定要删除吗?", function(result) { |
| 274 | 274 | if(result) { |
| 275 | 275 | top.jzts(); |
| 276 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${objectNameUpper}_ID="+Id+"&tm="+new Date().getTime(); | |
| 276 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 277 | 277 | $.get(url,function(data){ |
| 278 | 278 | if("success" == data.result){ |
| 279 | 279 | tosearch(); |
| ... | ... | @@ -302,7 +302,7 @@ |
| 302 | 302 | var diag = new top.Dialog(); |
| 303 | 303 | diag.Drag=true; |
| 304 | 304 | diag.Title ="编辑"; |
| 305 | - diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?${objectNameUpper}_ID='+Id; | |
| 305 | + diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?ID='+Id; | |
| 306 | 306 | diag.Width = 800; |
| 307 | 307 | diag.Height = 600; |
| 308 | 308 | diag.Modal = true; //有无遮罩窗口 | ... | ... |
resources/ftl_backups/createSoCode/jsp_edit_Template.ftl
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <div class="col-xs-12"> |
| 29 | 29 | |
| 30 | 30 | <form action="${objectNameLower}/${r"${msg }"}.do" name="Form" id="Form" method="post"> |
| 31 | - <input type="hidden" name="${objectNameUpper}_ID" id="${objectNameUpper}_ID" value="${r"${pd."}${objectNameUpper}_ID${r"}"}"/> | |
| 31 | + <input type="hidden" name="ID" id="ID" value="${r"${pd."}ID${r"}"}"/> | |
| 32 | 32 | <input type="hidden" name="${faobject}_ID" id="${faobject}_ID" value="${r"${pd."}${faobject}_ID${r"}"}"/> |
| 33 | 33 | <div id="zhongxin" style="padding-top: 13px;"> |
| 34 | 34 | <table id="table_report" class="table table-striped table-bordered table-hover"> | ... | ... |
resources/ftl_backups/createSoCode/jsp_list_Template.ftl
| ... | ... | @@ -83,7 +83,7 @@ |
| 83 | 83 | <c:forEach items="${r"${varList}"}" var="var" varStatus="vs"> |
| 84 | 84 | <tr> |
| 85 | 85 | <td class='center'> |
| 86 | - <label class="pos-rel"><input type='checkbox' name='ids' value="${r"${var."}${objectNameUpper}_ID${r"}"}" class="ace" /><span class="lbl"></span></label> | |
| 86 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${r"${var."}ID${r"}"}" class="ace" /><span class="lbl"></span></label> | |
| 87 | 87 | </td> |
| 88 | 88 | <td class='center' style="width: 30px;">${r"${vs.index+1}"}</td> |
| 89 | 89 | <#list fieldList as var> |
| ... | ... | @@ -95,12 +95,12 @@ |
| 95 | 95 | </c:if> |
| 96 | 96 | <div class="hidden-sm hidden-xs btn-group"> |
| 97 | 97 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 98 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}${objectNameUpper}_ID${r"}"}');"> | |
| 98 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}ID${r"}"}');"> | |
| 99 | 99 | <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> |
| 100 | 100 | </a> |
| 101 | 101 | </c:if> |
| 102 | 102 | <c:if test="${r"${QX.del == 1 }"}"> |
| 103 | - <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}${objectNameUpper}_ID${r"}"}');"> | |
| 103 | + <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}ID${r"}"}');"> | |
| 104 | 104 | <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> |
| 105 | 105 | </a> |
| 106 | 106 | </c:if> |
| ... | ... | @@ -114,7 +114,7 @@ |
| 114 | 114 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
| 115 | 115 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 116 | 116 | <li> |
| 117 | - <a style="cursor:pointer;" onclick="edit('${r"${var."}${objectNameUpper}_ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 117 | + <a style="cursor:pointer;" onclick="edit('${r"${var."}ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 118 | 118 | <span class="green"> |
| 119 | 119 | <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
| 120 | 120 | </span> |
| ... | ... | @@ -123,7 +123,7 @@ |
| 123 | 123 | </c:if> |
| 124 | 124 | <c:if test="${r"${QX.del == 1 }"}"> |
| 125 | 125 | <li> |
| 126 | - <a style="cursor:pointer;" onclick="del('${r"${var."}${objectNameUpper}_ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 126 | + <a style="cursor:pointer;" onclick="del('${r"${var."}ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 127 | 127 | <span class="red"> |
| 128 | 128 | <i class="ace-icon fa fa-trash-o bigger-120"></i> |
| 129 | 129 | </span> |
| ... | ... | @@ -282,7 +282,7 @@ |
| 282 | 282 | bootbox.confirm("确定要删除吗?", function(result) { |
| 283 | 283 | if(result) { |
| 284 | 284 | top.jzts(); |
| 285 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${objectNameUpper}_ID="+Id+"&tm="+new Date().getTime(); | |
| 285 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | 286 | $.get(url,function(data){ |
| 287 | 287 | tosearch(); |
| 288 | 288 | }); |
| ... | ... | @@ -296,7 +296,7 @@ |
| 296 | 296 | var diag = new top.Dialog(); |
| 297 | 297 | diag.Drag=true; |
| 298 | 298 | diag.Title ="编辑"; |
| 299 | - diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?${objectNameUpper}_ID='+Id; | |
| 299 | + diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?ID='+Id; | |
| 300 | 300 | diag.Width = 450; |
| 301 | 301 | diag.Height = 355; |
| 302 | 302 | diag.Modal = true; //有无遮罩窗口 | ... | ... |
resources/ftl_backups/createTreeCode/jsp_list_Template.ftl
| ... | ... | @@ -79,7 +79,7 @@ |
| 79 | 79 | <c:forEach items="${r"${varList}"}" var="var" varStatus="vs"> |
| 80 | 80 | <tr> |
| 81 | 81 | <td class='center' style="width: 30px;">${r"${vs.index+1}"}</td> |
| 82 | - <td class='center'><a href="javascript:goSondict('${r"${var."}${objectNameUpper}_ID${r"}"}')"><i class="ace-icon fa fa-share bigger-100"></i> ${r"${var.NAME}"}</a></td> | |
| 82 | + <td class='center'><a href="javascript:goSondict('${r"${var."}ID${r"}"}')"><i class="ace-icon fa fa-share bigger-100"></i> ${r"${var.NAME}"}</a></td> | |
| 83 | 83 | <#list fieldList as var> |
| 84 | 84 | <td class='center'>${r"${var."}${var[0]}${r"}"}</td> |
| 85 | 85 | </#list> |
| ... | ... | @@ -89,12 +89,12 @@ |
| 89 | 89 | </c:if> |
| 90 | 90 | <div class="hidden-sm hidden-xs btn-group"> |
| 91 | 91 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 92 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}${objectNameUpper}_ID${r"}"}');"> | |
| 92 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${r"${var."}ID${r"}"}');"> | |
| 93 | 93 | <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> |
| 94 | 94 | </a> |
| 95 | 95 | </c:if> |
| 96 | 96 | <c:if test="${r"${QX.del == 1 }"}"> |
| 97 | - <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}${objectNameUpper}_ID${r"}"}');"> | |
| 97 | + <a class="btn btn-xs btn-danger" onclick="del('${r"${var."}ID${r"}"}');"> | |
| 98 | 98 | <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> |
| 99 | 99 | </a> |
| 100 | 100 | </c:if> |
| ... | ... | @@ -108,7 +108,7 @@ |
| 108 | 108 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> |
| 109 | 109 | <c:if test="${r"${QX.edit == 1 }"}"> |
| 110 | 110 | <li> |
| 111 | - <a style="cursor:pointer;" onclick="edit('${r"${var."}${objectNameUpper}_ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 111 | + <a style="cursor:pointer;" onclick="edit('${r"${var."}ID${r"}"}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
| 112 | 112 | <span class="green"> |
| 113 | 113 | <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> |
| 114 | 114 | </span> |
| ... | ... | @@ -117,7 +117,7 @@ |
| 117 | 117 | </c:if> |
| 118 | 118 | <c:if test="${r"${QX.del == 1 }"}"> |
| 119 | 119 | <li> |
| 120 | - <a style="cursor:pointer;" onclick="del('${r"${var."}${objectNameUpper}_ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 120 | + <a style="cursor:pointer;" onclick="del('${r"${var."}ID${r"}"}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
| 121 | 121 | <span class="red"> |
| 122 | 122 | <i class="ace-icon fa fa-trash-o bigger-120"></i> |
| 123 | 123 | </span> |
| ... | ... | @@ -151,9 +151,9 @@ |
| 151 | 151 | <tr> |
| 152 | 152 | <td style="vertical-align:top;"> |
| 153 | 153 | <c:if test="${r"${QX.add == 1 }"}"> |
| 154 | - <a class="btn btn-mini btn-success" onclick="add('${r"${"}${objectNameUpper}_ID${r"}"}');">新增</a> | |
| 154 | + <a class="btn btn-mini btn-success" onclick="add('${r"${"}ID${r"}"}');">新增</a> | |
| 155 | 155 | </c:if> |
| 156 | - <c:if test="${r"${null != pd."}${objectNameUpper}_ID${r" && pd."}${objectNameUpper}_ID${r" != ''}"}"> | |
| 156 | + <c:if test="${r"${null != pd."}ID${r" && pd."}ID${r" != ''}"}"> | |
| 157 | 157 | <a class="btn btn-mini btn-success" onclick="goSondict('${r"${pd.PARENT_ID}"}');">返回</a> |
| 158 | 158 | </c:if> |
| 159 | 159 | </td> |
| ... | ... | @@ -203,9 +203,9 @@ |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | //去此ID下子级列表 |
| 206 | - function goSondict(${objectNameUpper}_ID){ | |
| 206 | + function goSondict(ID){ | |
| 207 | 207 | top.jzts(); |
| 208 | - window.location.href="<%=basePath%>${objectNameLower}/list.do?${objectNameUpper}_ID="+${objectNameUpper}_ID; | |
| 208 | + window.location.href="<%=basePath%>${objectNameLower}/list.do?ID="+ID; | |
| 209 | 209 | }; |
| 210 | 210 | |
| 211 | 211 | $(function() { |
| ... | ... | @@ -245,12 +245,12 @@ |
| 245 | 245 | }); |
| 246 | 246 | |
| 247 | 247 | //新增 |
| 248 | - function add(${objectNameUpper}_ID){ | |
| 248 | + function add(ID){ | |
| 249 | 249 | top.jzts(); |
| 250 | 250 | var diag = new top.Dialog(); |
| 251 | 251 | diag.Drag=true; |
| 252 | 252 | diag.Title ="新增"; |
| 253 | - diag.URL = '<%=basePath%>${objectNameLower}/goAdd.do?${objectNameUpper}_ID='+${objectNameUpper}_ID; | |
| 253 | + diag.URL = '<%=basePath%>${objectNameLower}/goAdd.do?ID='+ID; | |
| 254 | 254 | diag.Width = 800; |
| 255 | 255 | diag.Height = 600; |
| 256 | 256 | diag.Modal = true; //有无遮罩窗口 |
| ... | ... | @@ -258,7 +258,7 @@ |
| 258 | 258 | diag.ShowMinButton = true; //最小化按钮 |
| 259 | 259 | diag.CancelEvent = function(){ //关闭事件 |
| 260 | 260 | if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ |
| 261 | - parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?${objectNameUpper}_ID=${r"${"}${objectNameUpper}_ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 261 | + parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?ID=${r"${"}ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 262 | 262 | } |
| 263 | 263 | diag.close(); |
| 264 | 264 | }; |
| ... | ... | @@ -270,7 +270,7 @@ |
| 270 | 270 | bootbox.confirm("确定要删除吗?", function(result) { |
| 271 | 271 | if(result) { |
| 272 | 272 | top.jzts(); |
| 273 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${objectNameUpper}_ID="+Id+"&tm="+new Date().getTime(); | |
| 273 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 274 | 274 | $.get(url,function(data){ |
| 275 | 275 | tosearch(); |
| 276 | 276 | }); |
| ... | ... | @@ -283,10 +283,10 @@ |
| 283 | 283 | bootbox.confirm("确定要删除吗?", function(result) { |
| 284 | 284 | if(result) { |
| 285 | 285 | top.jzts(); |
| 286 | - var url = "<%=basePath%>${objectNameLower}/delete.do?${objectNameUpper}_ID="+Id+"&tm="+new Date().getTime(); | |
| 286 | + var url = "<%=basePath%>${objectNameLower}/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
| 287 | 287 | $.get(url,function(data){ |
| 288 | 288 | if("success" == data.result){ |
| 289 | - parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?${objectNameUpper}_ID=${r"${"}${objectNameUpper}_ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 289 | + parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?ID=${r"${"}ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 290 | 290 | }else if("false" == data.result){ |
| 291 | 291 | top.hangge(); |
| 292 | 292 | bootbox.dialog({ |
| ... | ... | @@ -313,7 +313,7 @@ |
| 313 | 313 | var diag = new top.Dialog(); |
| 314 | 314 | diag.Drag=true; |
| 315 | 315 | diag.Title ="编辑"; |
| 316 | - diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?${objectNameUpper}_ID='+Id; | |
| 316 | + diag.URL = '<%=basePath%>${objectNameLower}/goEdit.do?ID='+Id; | |
| 317 | 317 | diag.Width = 800; |
| 318 | 318 | diag.Height = 600; |
| 319 | 319 | diag.Modal = true; //有无遮罩窗口 |
| ... | ... | @@ -321,7 +321,7 @@ |
| 321 | 321 | diag.ShowMinButton = true; //最小化按钮 |
| 322 | 322 | diag.CancelEvent = function(){ //关闭事件 |
| 323 | 323 | if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ |
| 324 | - parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?${objectNameUpper}_ID=${r"${"}${objectNameUpper}_ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 324 | + parent.location.href="<%=basePath%>${objectNameLower}/listTree.do?ID=${r"${"}ID${r"}"}&dnowPage=${r"${page.currentPage}"}"; | |
| 325 | 325 | } |
| 326 | 326 | diag.close(); |
| 327 | 327 | }; | ... | ... |
resources/ftl_backups/createTreeCode/jsp_tree_Template.ftl
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | </div> |
| 24 | 24 | </td> |
| 25 | 25 | <td style="width:85%;" valign="top" > |
| 26 | - <iframe name="treeFrame" id="treeFrame" frameborder="0" src="<%=basePath%>/${objectNameLower}/list.do?${objectNameUpper}_ID=${r"${'' == "}${objectNameUpper}_ID${r"?'0':"}${objectNameUpper}_ID}"}¤tPage=${r"${null == pd.dnowPage || '' == pd.dnowPage?'1':pd.dnowPage}"}" style="margin:0 auto;width:100%;height:100%;"></iframe> | |
| 26 | + <iframe name="treeFrame" id="treeFrame" frameborder="0" src="<%=basePath%>/${objectNameLower}/list.do?ID=${r"${'' == "}ID${r"?'0':"}ID}"}¤tPage=${r"${null == pd.dnowPage || '' == pd.dnowPage?'1':pd.dnowPage}"}" style="margin:0 auto;width:100%;height:100%;"></iframe> | |
| 27 | 27 | </td> |
| 28 | 28 | </tr> |
| 29 | 29 | </table> | ... | ... |
resources/mybatis1/sunvote/ClassTypeMapper.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="ClassTypeMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_CLASSTYPE | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + NAME, | |
| 13 | + REMARK, | |
| 14 | + ID | |
| 15 | + </sql> | |
| 16 | + | |
| 17 | + <!-- 字段值 --> | |
| 18 | + <sql id="FieldValue"> | |
| 19 | + #{NAME}, | |
| 20 | + #{REMARK}, | |
| 21 | + #{ID} | |
| 22 | + </sql> | |
| 23 | + | |
| 24 | + <!-- 新增--> | |
| 25 | + <insert id="save" parameterType="pd"> | |
| 26 | + insert into | |
| 27 | + <include refid="tableName"></include> | |
| 28 | + ( | |
| 29 | + NAME, | |
| 30 | + REMARK | |
| 31 | + ) values ( | |
| 32 | + #{NAME}, | |
| 33 | + #{REMARK} | |
| 34 | + ) | |
| 35 | + </insert> | |
| 36 | + | |
| 37 | + <!-- 删除--> | |
| 38 | + <delete id="delete" parameterType="pd"> | |
| 39 | + delete from | |
| 40 | + <include refid="tableName"></include> | |
| 41 | + where | |
| 42 | + ID = #{ID} | |
| 43 | + </delete> | |
| 44 | + | |
| 45 | + <!-- 修改 --> | |
| 46 | + <update id="edit" parameterType="pd"> | |
| 47 | + update | |
| 48 | + <include refid="tableName"></include> | |
| 49 | + set | |
| 50 | + NAME = #{NAME}, | |
| 51 | + REMARK = #{REMARK}, | |
| 52 | + ID = ${ID} | |
| 53 | + where | |
| 54 | + ID = #{ID} | |
| 55 | + </update> | |
| 56 | + | |
| 57 | + <!-- 通过ID获取数据 --> | |
| 58 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 59 | + select | |
| 60 | + <include refid="Field"></include> | |
| 61 | + from | |
| 62 | + <include refid="tableName"></include> | |
| 63 | + where | |
| 64 | + ID = #{ID} | |
| 65 | + </select> | |
| 66 | + | |
| 67 | + <!-- 列表 --> | |
| 68 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 69 | + select | |
| 70 | + <include refid="Field"></include> | |
| 71 | + from | |
| 72 | + <include refid="tableName"></include> | |
| 73 | + where 1=1 | |
| 74 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 75 | + and | |
| 76 | + ( | |
| 77 | + <!-- 根据需求自己加检索条件 | |
| 78 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 79 | + or | |
| 80 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 81 | + --> | |
| 82 | + ) | |
| 83 | + </if> | |
| 84 | + </select> | |
| 85 | + | |
| 86 | + <!-- 列表(全部) --> | |
| 87 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 88 | + select | |
| 89 | + <include refid="Field"></include> | |
| 90 | + from | |
| 91 | + <include refid="tableName"></include> | |
| 92 | + </select> | |
| 93 | + | |
| 94 | + <!-- 批量删除 --> | |
| 95 | + <delete id="deleteAll" parameterType="String"> | |
| 96 | + delete from | |
| 97 | + <include refid="tableName"></include> | |
| 98 | + where | |
| 99 | + ID in | |
| 100 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 101 | + #{item} | |
| 102 | + </foreach> | |
| 103 | + </delete> | |
| 104 | + | |
| 105 | + <!-- fh313596790qq(青苔) --> | |
| 106 | +</mapper> | |
| 0 | 107 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/GradeMapper.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="GradeMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_GRADE | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + SV_GRADE.NAME,SV_GRADE.DESC,REMARK,ID | |
| 13 | + </sql> | |
| 14 | + | |
| 15 | + <!-- 字段值 --> | |
| 16 | + <sql id="FieldValue"> | |
| 17 | + #{NAME}, | |
| 18 | + #{DESC}, | |
| 19 | + #{REMARK}, | |
| 20 | + #{ID} | |
| 21 | + </sql> | |
| 22 | + | |
| 23 | + <!-- 新增--> | |
| 24 | + <insert id="save" parameterType="pd"> | |
| 25 | + insert into | |
| 26 | + <include refid="tableName"></include> | |
| 27 | + ( | |
| 28 | + SV_GRADE.NAME, SV_GRADE.DESC, REMARK) values (#{NAME},#{DESC},#{REMARK} | |
| 29 | + ) | |
| 30 | + </insert> | |
| 31 | + | |
| 32 | + <!-- 删除--> | |
| 33 | + <delete id="delete" parameterType="pd"> | |
| 34 | + delete from | |
| 35 | + <include refid="tableName"></include> | |
| 36 | + where | |
| 37 | + ID = #{ID} | |
| 38 | + </delete> | |
| 39 | + | |
| 40 | + <!-- 修改 --> | |
| 41 | + <update id="edit" parameterType="pd"> | |
| 42 | + update | |
| 43 | + <include refid="tableName"></include> | |
| 44 | + set | |
| 45 | + SV_GRADE.NAME = #{NAME}, | |
| 46 | + SV_GRADE.DESC = #{DESC}, | |
| 47 | + REMARK = #{REMARK}, | |
| 48 | + ID = #{ID} | |
| 49 | + where | |
| 50 | + ID = #{ID} | |
| 51 | + </update> | |
| 52 | + | |
| 53 | + <!-- 通过ID获取数据 --> | |
| 54 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 55 | + select | |
| 56 | + <include refid="Field"></include> | |
| 57 | + from | |
| 58 | + <include refid="tableName"></include> | |
| 59 | + where | |
| 60 | + ID = #{ID} | |
| 61 | + </select> | |
| 62 | + | |
| 63 | + <!-- 列表 --> | |
| 64 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 65 | + select | |
| 66 | + <include refid="Field"></include> | |
| 67 | + from | |
| 68 | + <include refid="tableName"></include> | |
| 69 | + where 1=1 | |
| 70 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 71 | + and | |
| 72 | + ( | |
| 73 | + <!-- 根据需求自己加检索条件 | |
| 74 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 75 | + or | |
| 76 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 77 | + --> | |
| 78 | + ) | |
| 79 | + </if> | |
| 80 | + </select> | |
| 81 | + | |
| 82 | + <!-- 列表(全部) --> | |
| 83 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 84 | + select | |
| 85 | + <include refid="Field"></include> | |
| 86 | + from | |
| 87 | + <include refid="tableName"></include> | |
| 88 | + </select> | |
| 89 | + | |
| 90 | + <!-- 批量删除 --> | |
| 91 | + <delete id="deleteAll" parameterType="String"> | |
| 92 | + delete from | |
| 93 | + <include refid="tableName"></include> | |
| 94 | + where | |
| 95 | + ID in | |
| 96 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 97 | + #{item} | |
| 98 | + </foreach> | |
| 99 | + </delete> | |
| 100 | + | |
| 101 | + <!-- fh313596790qq(青苔) --> | |
| 102 | +</mapper> | |
| 0 | 103 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/SClassMapper.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="SClassMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_SCLASS | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + SCHOOL_ID, | |
| 13 | + GRADE_ID, | |
| 14 | + CLASS_TYPE, | |
| 15 | + CLASS_NAME, | |
| 16 | + CLASS_CODE, | |
| 17 | + BASESTATION_ID, | |
| 18 | + ID | |
| 19 | + </sql> | |
| 20 | + | |
| 21 | + <!-- 字段值 --> | |
| 22 | + <sql id="FieldValue"> | |
| 23 | + #{SCHOOL_ID}, | |
| 24 | + #{GRADE_ID}, | |
| 25 | + #{CLASS_TYPE}, | |
| 26 | + #{CLASS_NAME}, | |
| 27 | + #{CLASS_CODE}, | |
| 28 | + #{BASESTATION_ID}, | |
| 29 | + #{ID} | |
| 30 | + </sql> | |
| 31 | + | |
| 32 | + <!-- 新增--> | |
| 33 | + <insert id="save" parameterType="pd"> | |
| 34 | + insert into | |
| 35 | + <include refid="tableName"></include> | |
| 36 | + ( | |
| 37 | + SCHOOL_ID, | |
| 38 | + GRADE_ID, | |
| 39 | + CLASS_TYPE, | |
| 40 | + CLASS_NAME, | |
| 41 | + CLASS_CODE, | |
| 42 | + BASESTATION_ID | |
| 43 | + ) values ( | |
| 44 | + #{SCHOOL_ID}, | |
| 45 | + #{GRADE_ID}, | |
| 46 | + #{CLASS_TYPE}, | |
| 47 | + #{CLASS_NAME}, | |
| 48 | + #{CLASS_CODE}, | |
| 49 | + #{BASESTATION_ID} | |
| 50 | + ) | |
| 51 | + </insert> | |
| 52 | + | |
| 53 | + <!-- 删除--> | |
| 54 | + <delete id="delete" parameterType="pd"> | |
| 55 | + delete from | |
| 56 | + <include refid="tableName"></include> | |
| 57 | + where | |
| 58 | + ID = #{ID} | |
| 59 | + </delete> | |
| 60 | + | |
| 61 | + <!-- 修改 --> | |
| 62 | + <update id="edit" parameterType="pd"> | |
| 63 | + update | |
| 64 | + <include refid="tableName"></include> | |
| 65 | + set | |
| 66 | + SCHOOL_ID = #{SCHOOL_ID}, | |
| 67 | + GRADE_ID = #{GRADE_ID}, | |
| 68 | + CLASS_TYPE = #{CLASS_TYPE}, | |
| 69 | + CLASS_NAME = #{CLASS_NAME}, | |
| 70 | + CLASS_CODE = #{CLASS_CODE}, | |
| 71 | + BASESTATION_ID = #{BASESTATION_ID}, | |
| 72 | + ID = #{ID} | |
| 73 | + where | |
| 74 | + ID = #{ID} | |
| 75 | + </update> | |
| 76 | + | |
| 77 | + <!-- 通过ID获取数据 --> | |
| 78 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 79 | + select | |
| 80 | + <include refid="Field"></include> | |
| 81 | + from | |
| 82 | + <include refid="tableName"></include> | |
| 83 | + where | |
| 84 | + ID = #{ID} | |
| 85 | + </select> | |
| 86 | + | |
| 87 | + <!-- 列表 --> | |
| 88 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 89 | + select | |
| 90 | + <include refid="Field"></include> | |
| 91 | + from | |
| 92 | + <include refid="tableName"></include> | |
| 93 | + where 1=1 | |
| 94 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 95 | + and | |
| 96 | + ( | |
| 97 | + <!-- 根据需求自己加检索条件 | |
| 98 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 99 | + or | |
| 100 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 101 | + --> | |
| 102 | + ) | |
| 103 | + </if> | |
| 104 | + </select> | |
| 105 | + | |
| 106 | + <!-- 列表(全部) --> | |
| 107 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 108 | + select | |
| 109 | + <include refid="Field"></include> | |
| 110 | + from | |
| 111 | + <include refid="tableName"></include> | |
| 112 | + </select> | |
| 113 | + | |
| 114 | + <!-- 批量删除 --> | |
| 115 | + <delete id="deleteAll" parameterType="String"> | |
| 116 | + delete from | |
| 117 | + <include refid="tableName"></include> | |
| 118 | + where | |
| 119 | + ID in | |
| 120 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 121 | + #{item} | |
| 122 | + </foreach> | |
| 123 | + </delete> | |
| 124 | + | |
| 125 | + <!-- fh313596790qq(青苔) --> | |
| 126 | +</mapper> | |
| 0 | 127 | \ No newline at end of file | ... | ... |
resources/mybatis1/sunvote/SubjectMapper.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="SubjectMapper"> | |
| 4 | + | |
| 5 | + <!--表名 --> | |
| 6 | + <sql id="tableName"> | |
| 7 | + SV_SUBJECT | |
| 8 | + </sql> | |
| 9 | + | |
| 10 | + <!-- 字段 --> | |
| 11 | + <sql id="Field"> | |
| 12 | + CNAME, | |
| 13 | + ENAME, | |
| 14 | + REMARK, | |
| 15 | + ID | |
| 16 | + </sql> | |
| 17 | + | |
| 18 | + <!-- 字段值 --> | |
| 19 | + <sql id="FieldValue"> | |
| 20 | + #{CNAME}, | |
| 21 | + #{ENAME}, | |
| 22 | + #{REMARK}, | |
| 23 | + #{ID} | |
| 24 | + </sql> | |
| 25 | + | |
| 26 | + <!-- 新增--> | |
| 27 | + <insert id="save" parameterType="pd"> | |
| 28 | + insert into | |
| 29 | + <include refid="tableName"></include> | |
| 30 | + ( | |
| 31 | + CNAME, | |
| 32 | + ENAME, | |
| 33 | + REMARK | |
| 34 | + ) values ( | |
| 35 | + #{CNAME}, | |
| 36 | + #{ENAME}, | |
| 37 | + #{REMARK} | |
| 38 | + ) | |
| 39 | + </insert> | |
| 40 | + | |
| 41 | + <!-- 删除--> | |
| 42 | + <delete id="delete" parameterType="pd"> | |
| 43 | + delete from | |
| 44 | + <include refid="tableName"></include> | |
| 45 | + where | |
| 46 | + ID = #{ID} | |
| 47 | + </delete> | |
| 48 | + | |
| 49 | + <!-- 修改 --> | |
| 50 | + <update id="edit" parameterType="pd"> | |
| 51 | + update | |
| 52 | + <include refid="tableName"></include> | |
| 53 | + set | |
| 54 | + CNAME = #{CNAME}, | |
| 55 | + ENAME = #{ENAME}, | |
| 56 | + REMARK = #{REMARK}, | |
| 57 | + ID = ID | |
| 58 | + where | |
| 59 | + ID = #{ID} | |
| 60 | + </update> | |
| 61 | + | |
| 62 | + <!-- 通过ID获取数据 --> | |
| 63 | + <select id="findById" parameterType="pd" resultType="pd"> | |
| 64 | + select | |
| 65 | + <include refid="Field"></include> | |
| 66 | + from | |
| 67 | + <include refid="tableName"></include> | |
| 68 | + where | |
| 69 | + ID = #{ID} | |
| 70 | + </select> | |
| 71 | + | |
| 72 | + <!-- 列表 --> | |
| 73 | + <select id="datalistPage" parameterType="page" resultType="pd"> | |
| 74 | + select | |
| 75 | + <include refid="Field"></include> | |
| 76 | + from | |
| 77 | + <include refid="tableName"></include> | |
| 78 | + where 1=1 | |
| 79 | + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | |
| 80 | + and | |
| 81 | + ( | |
| 82 | + <!-- 根据需求自己加检索条件 | |
| 83 | + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 84 | + or | |
| 85 | + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | |
| 86 | + --> | |
| 87 | + ) | |
| 88 | + </if> | |
| 89 | + </select> | |
| 90 | + | |
| 91 | + <!-- 列表(全部) --> | |
| 92 | + <select id="listAll" parameterType="pd" resultType="pd"> | |
| 93 | + select | |
| 94 | + <include refid="Field"></include> | |
| 95 | + from | |
| 96 | + <include refid="tableName"></include> | |
| 97 | + </select> | |
| 98 | + | |
| 99 | + <!-- 批量删除 --> | |
| 100 | + <delete id="deleteAll" parameterType="String"> | |
| 101 | + delete from | |
| 102 | + <include refid="tableName"></include> | |
| 103 | + where | |
| 104 | + ID in | |
| 105 | + <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | |
| 106 | + #{item} | |
| 107 | + </foreach> | |
| 108 | + </delete> | |
| 109 | + | |
| 110 | + <!-- fh313596790qq(青苔) --> | |
| 111 | +</mapper> | |
| 0 | 112 | \ No newline at end of file | ... | ... |
src/com/fh/controller/api/ApiServer.java
| ... | ... | @@ -28,6 +28,21 @@ public class ApiServer extends BaseController { |
| 28 | 28 | private KeypadManager keypadService; |
| 29 | 29 | |
| 30 | 30 | |
| 31 | + @RequestMapping(value="/*" ,produces="application/json;charset=UTF-8") | |
| 32 | + @ResponseBody | |
| 33 | + public Object Default() throws Exception{ | |
| 34 | + ResponseGson<Void> respone = new ResponseGson(); | |
| 35 | + respone.setPathError(); | |
| 36 | + return respone.toJson(); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @RequestMapping(value="/school" ,produces="application/json;charset=UTF-8") | |
| 40 | + @ResponseBody | |
| 41 | + public Object schoolDefault() throws Exception{ | |
| 42 | + return schoolList(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + | |
| 31 | 46 | @RequestMapping(value="/school/list" ,produces="application/json;charset=UTF-8") |
| 32 | 47 | @ResponseBody |
| 33 | 48 | public Object schoolList() throws Exception{ | ... | ... |
src/com/fh/controller/api/ResponseGson.java
| ... | ... | @@ -56,8 +56,43 @@ public class ResponseGson<T> { |
| 56 | 56 | message = "net error" ; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public void setDataError(){ | |
| 59 | + public void setPathError(){ | |
| 60 | 60 | code = "-2" ; |
| 61 | + message = "Path error" ; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void setDataError(){ | |
| 65 | + code = "-3" ; | |
| 61 | 66 | message = "Data error" ; |
| 62 | 67 | } |
| 68 | + public void setParmError(){ | |
| 69 | + code = "-4" ; | |
| 70 | + message = "Parm error" ; | |
| 71 | + } | |
| 72 | + public void setError(){ | |
| 73 | + code = "-5" ; | |
| 74 | + message = "server error" ; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void set1Error(){ | |
| 78 | + code = "1" ; | |
| 79 | + message = "分别对错误进行描述,1 具体到某个参数值问题的描述" ; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public void set2Error(){ | |
| 83 | + code = "2" ; | |
| 84 | + message = "分别对错误进行描述,1 具体到某个参数值问题的描述" ; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public void set3Error(){ | |
| 88 | + code = "3" ; | |
| 89 | + message = "分别对错误进行描述,1 具体到某个参数值问题的描述" ; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void set4Error(){ | |
| 93 | + code = "4" ; | |
| 94 | + message = "分别对错误进行描述,1 具体到某个参数值问题的描述" ; | |
| 95 | + } | |
| 96 | + | |
| 97 | + | |
| 63 | 98 | } | ... | ... |
src/com/fh/controller/sunvote/classtype/ClassTypeController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.classtype; | |
| 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.classtype.ClassTypeManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:班级类型 | |
| 30 | + * 创建人:Elvis | |
| 31 | + * 创建时间:2018-04-25 | |
| 32 | + */ | |
| 33 | +@Controller | |
| 34 | +@RequestMapping(value="/classtype") | |
| 35 | +public class ClassTypeController extends BaseController { | |
| 36 | + | |
| 37 | + String menuUrl = "classtype/list.do"; //菜单地址(权限用) | |
| 38 | + @Resource(name="classtypeService") | |
| 39 | + private ClassTypeManager classtypeService; | |
| 40 | + | |
| 41 | + /**保存 | |
| 42 | + * @param | |
| 43 | + * @throws Exception | |
| 44 | + */ | |
| 45 | + @RequestMapping(value="/save") | |
| 46 | + public ModelAndView save() throws Exception{ | |
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增ClassType"); | |
| 48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 49 | + ModelAndView mv = this.getModelAndView(); | |
| 50 | + PageData pd = new PageData(); | |
| 51 | + pd = this.getPageData(); | |
| 52 | + classtypeService.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()+"删除ClassType"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + classtypeService.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()+"修改ClassType"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + classtypeService.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()+"列表ClassType"); | |
| 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 = classtypeService.list(page); //列出ClassType列表 | |
| 107 | + mv.setViewName("sunvote/classtype/classtype_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/classtype/classtype_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 = classtypeService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/classtype/classtype_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()+"批量删除ClassType"); | |
| 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 | + classtypeService.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()+"导出ClassType到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("名称"); //1 | |
| 185 | + titles.add("备注"); //2 | |
| 186 | + dataMap.put("titles", titles); | |
| 187 | + List<PageData> varOList = classtypeService.listAll(pd); | |
| 188 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 189 | + for(int i=0;i<varOList.size();i++){ | |
| 190 | + PageData vpd = new PageData(); | |
| 191 | + vpd.put("var1", varOList.get(i).getString("NAME")); //1 | |
| 192 | + vpd.put("var2", varOList.get(i).getString("REMARK")); //2 | |
| 193 | + varList.add(vpd); | |
| 194 | + } | |
| 195 | + dataMap.put("varList", varList); | |
| 196 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 197 | + mv = new ModelAndView(erv,dataMap); | |
| 198 | + return mv; | |
| 199 | + } | |
| 200 | + | |
| 201 | + @InitBinder | |
| 202 | + public void initBinder(WebDataBinder binder){ | |
| 203 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 204 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 205 | + } | |
| 206 | +} | ... | ... |
src/com/fh/controller/sunvote/grade/GradeController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.grade; | |
| 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.grade.GradeManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:年级 | |
| 30 | + * 创建人:Elvis | |
| 31 | + * 创建时间:2018-04-25 | |
| 32 | + */ | |
| 33 | +@Controller | |
| 34 | +@RequestMapping(value="/grade") | |
| 35 | +public class GradeController extends BaseController { | |
| 36 | + | |
| 37 | + String menuUrl = "grade/list.do"; //菜单地址(权限用) | |
| 38 | + @Resource(name="gradeService") | |
| 39 | + private GradeManager gradeService; | |
| 40 | + | |
| 41 | + /**保存 | |
| 42 | + * @param | |
| 43 | + * @throws Exception | |
| 44 | + */ | |
| 45 | + @RequestMapping(value="/save") | |
| 46 | + public ModelAndView save() throws Exception{ | |
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增Grade"); | |
| 48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 49 | + ModelAndView mv = this.getModelAndView(); | |
| 50 | + PageData pd = new PageData(); | |
| 51 | + pd = this.getPageData(); | |
| 52 | + gradeService.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()+"删除Grade"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + gradeService.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()+"修改Grade"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + gradeService.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()+"列表Grade"); | |
| 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 = gradeService.list(page); //列出Grade列表 | |
| 107 | + mv.setViewName("sunvote/grade/grade_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/grade/grade_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 = gradeService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/grade/grade_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()+"批量删除Grade"); | |
| 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 | + gradeService.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()+"导出Grade到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("年级名称"); //1 | |
| 185 | + titles.add("年级描述"); //2 | |
| 186 | + titles.add("备注"); //3 | |
| 187 | + dataMap.put("titles", titles); | |
| 188 | + List<PageData> varOList = gradeService.listAll(pd); | |
| 189 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 190 | + for(int i=0;i<varOList.size();i++){ | |
| 191 | + PageData vpd = new PageData(); | |
| 192 | + vpd.put("var1", varOList.get(i).getString("NAME")); //1 | |
| 193 | + vpd.put("var2", varOList.get(i).getString("DESC")); //2 | |
| 194 | + vpd.put("var3", varOList.get(i).getString("REMARK")); //3 | |
| 195 | + varList.add(vpd); | |
| 196 | + } | |
| 197 | + dataMap.put("varList", varList); | |
| 198 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 199 | + mv = new ModelAndView(erv,dataMap); | |
| 200 | + return mv; | |
| 201 | + } | |
| 202 | + | |
| 203 | + @InitBinder | |
| 204 | + public void initBinder(WebDataBinder binder){ | |
| 205 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 206 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 207 | + } | |
| 208 | +} | ... | ... |
src/com/fh/controller/sunvote/sclass/SClassController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.sclass; | |
| 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.sclass.SClassManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:班级 | |
| 30 | + * 创建人:Elvis | |
| 31 | + * 创建时间:2018-04-25 | |
| 32 | + */ | |
| 33 | +@Controller | |
| 34 | +@RequestMapping(value="/sclass") | |
| 35 | +public class SClassController extends BaseController { | |
| 36 | + | |
| 37 | + String menuUrl = "sclass/list.do"; //菜单地址(权限用) | |
| 38 | + @Resource(name="sclassService") | |
| 39 | + private SClassManager sclassService; | |
| 40 | + | |
| 41 | + /**保存 | |
| 42 | + * @param | |
| 43 | + * @throws Exception | |
| 44 | + */ | |
| 45 | + @RequestMapping(value="/save") | |
| 46 | + public ModelAndView save() throws Exception{ | |
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增SClass"); | |
| 48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 49 | + ModelAndView mv = this.getModelAndView(); | |
| 50 | + PageData pd = new PageData(); | |
| 51 | + pd = this.getPageData(); | |
| 52 | + sclassService.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()+"删除SClass"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + sclassService.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()+"修改SClass"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + sclassService.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()+"列表SClass"); | |
| 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 = sclassService.list(page); //列出SClass列表 | |
| 107 | + mv.setViewName("sunvote/sclass/sclass_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/sclass/sclass_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 = sclassService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/sclass/sclass_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()+"批量删除SClass"); | |
| 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 | + sclassService.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()+"导出SClass到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("所属学校"); //1 | |
| 185 | + titles.add("所属年级"); //2 | |
| 186 | + titles.add("班级类型"); //3 | |
| 187 | + titles.add("班级名称"); //4 | |
| 188 | + titles.add("班级编码"); //5 | |
| 189 | + titles.add("班级基站"); //6 | |
| 190 | + dataMap.put("titles", titles); | |
| 191 | + List<PageData> varOList = sclassService.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("SCHOOL_ID")); //1 | |
| 196 | + vpd.put("var2", varOList.get(i).getString("GRADE_ID")); //2 | |
| 197 | + vpd.put("var3", varOList.get(i).getString("CLASS_TYPE")); //3 | |
| 198 | + vpd.put("var4", varOList.get(i).getString("CLASS_NAME")); //4 | |
| 199 | + vpd.put("var5", varOList.get(i).getString("CLASS_CODE")); //5 | |
| 200 | + vpd.put("var6", varOList.get(i).getString("BASESTATION_ID")); //6 | |
| 201 | + varList.add(vpd); | |
| 202 | + } | |
| 203 | + dataMap.put("varList", varList); | |
| 204 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 205 | + mv = new ModelAndView(erv,dataMap); | |
| 206 | + return mv; | |
| 207 | + } | |
| 208 | + | |
| 209 | + @InitBinder | |
| 210 | + public void initBinder(WebDataBinder binder){ | |
| 211 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 212 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 213 | + } | |
| 214 | +} | ... | ... |
src/com/fh/controller/sunvote/subject/SubjectController.java
0 → 100644
| 1 | +package com.fh.controller.sunvote.subject; | |
| 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.subject.SubjectManager; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 说明:科目 | |
| 30 | + * 创建人:Elvis | |
| 31 | + * 创建时间:2018-04-25 | |
| 32 | + */ | |
| 33 | +@Controller | |
| 34 | +@RequestMapping(value="/subject") | |
| 35 | +public class SubjectController extends BaseController { | |
| 36 | + | |
| 37 | + String menuUrl = "subject/list.do"; //菜单地址(权限用) | |
| 38 | + @Resource(name="subjectService") | |
| 39 | + private SubjectManager subjectService; | |
| 40 | + | |
| 41 | + /**保存 | |
| 42 | + * @param | |
| 43 | + * @throws Exception | |
| 44 | + */ | |
| 45 | + @RequestMapping(value="/save") | |
| 46 | + public ModelAndView save() throws Exception{ | |
| 47 | + logBefore(logger, Jurisdiction.getUsername()+"新增Subject"); | |
| 48 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
| 49 | + ModelAndView mv = this.getModelAndView(); | |
| 50 | + PageData pd = new PageData(); | |
| 51 | + pd = this.getPageData(); | |
| 52 | + subjectService.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()+"删除Subject"); | |
| 65 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | |
| 66 | + PageData pd = new PageData(); | |
| 67 | + pd = this.getPageData(); | |
| 68 | + subjectService.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()+"修改Subject"); | |
| 80 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | |
| 81 | + ModelAndView mv = this.getModelAndView(); | |
| 82 | + PageData pd = new PageData(); | |
| 83 | + pd = this.getPageData(); | |
| 84 | + subjectService.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()+"列表Subject"); | |
| 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 = subjectService.list(page); //列出Subject列表 | |
| 107 | + mv.setViewName("sunvote/subject/subject_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/subject/subject_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 = subjectService.findById(pd); //根据ID读取 | |
| 139 | + mv.setViewName("sunvote/subject/subject_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()+"批量删除Subject"); | |
| 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 | + subjectService.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()+"导出Subject到excel"); | |
| 178 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | |
| 179 | + ModelAndView mv = new ModelAndView(); | |
| 180 | + PageData pd = new PageData(); | |
| 181 | + pd = this.getPageData(); | |
| 182 | + Map<String,Object> dataMap = new HashMap<String,Object>(); | |
| 183 | + List<String> titles = new ArrayList<String>(); | |
| 184 | + titles.add("中文名称"); //1 | |
| 185 | + titles.add("英文名称"); //2 | |
| 186 | + titles.add("备注"); //3 | |
| 187 | + dataMap.put("titles", titles); | |
| 188 | + List<PageData> varOList = subjectService.listAll(pd); | |
| 189 | + List<PageData> varList = new ArrayList<PageData>(); | |
| 190 | + for(int i=0;i<varOList.size();i++){ | |
| 191 | + PageData vpd = new PageData(); | |
| 192 | + vpd.put("var1", varOList.get(i).getString("CNAME")); //1 | |
| 193 | + vpd.put("var2", varOList.get(i).getString("ENAME")); //2 | |
| 194 | + vpd.put("var3", varOList.get(i).getString("REMARK")); //3 | |
| 195 | + varList.add(vpd); | |
| 196 | + } | |
| 197 | + dataMap.put("varList", varList); | |
| 198 | + ObjectExcelView erv = new ObjectExcelView(); | |
| 199 | + mv = new ModelAndView(erv,dataMap); | |
| 200 | + return mv; | |
| 201 | + } | |
| 202 | + | |
| 203 | + @InitBinder | |
| 204 | + public void initBinder(WebDataBinder binder){ | |
| 205 | + DateFormat format = new SimpleDateFormat("yyyy-MM-dd"); | |
| 206 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true)); | |
| 207 | + } | |
| 208 | +} | ... | ... |
src/com/fh/controller/sunvote/teachingmaterial/TeachingMaterialController.java
| ... | ... | @@ -28,7 +28,7 @@ import com.fh.service.sunvote.teachingmaterial.TeachingMaterialManager; |
| 28 | 28 | /** |
| 29 | 29 | * 说明:教材 |
| 30 | 30 | * 创建人:Elvis |
| 31 | - * 创建时间:2018-04-18 | |
| 31 | + * 创建时间:2018-04-25 | |
| 32 | 32 | */ |
| 33 | 33 | @Controller |
| 34 | 34 | @RequestMapping(value="/teachingmaterial") |
| ... | ... | @@ -49,7 +49,6 @@ public class TeachingMaterialController extends BaseController { |
| 49 | 49 | ModelAndView mv = this.getModelAndView(); |
| 50 | 50 | PageData pd = new PageData(); |
| 51 | 51 | pd = this.getPageData(); |
| 52 | - pd.put("TEACHINGMATERIAL_ID", this.get32UUID()); //主键 | |
| 53 | 52 | teachingmaterialService.save(pd); |
| 54 | 53 | mv.addObject("msg","success"); |
| 55 | 54 | mv.setViewName("save_result"); | ... | ... |
src/com/fh/service/sunvote/classtype/ClassTypeManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.classtype; | |
| 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-25 | |
| 11 | + * @version | |
| 12 | + */ | |
| 13 | +public interface ClassTypeManager{ | |
| 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/classtype/impl/ClassTypeService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.classtype.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.classtype.ClassTypeManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 班级类型 | |
| 13 | + * 创建人:FH Q313596790 | |
| 14 | + * 创建时间:2018-04-25 | |
| 15 | + * @version | |
| 16 | + */ | |
| 17 | +@Service("classtypeService") | |
| 18 | +public class ClassTypeService implements ClassTypeManager{ | |
| 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("ClassTypeMapper.save", pd); | |
| 29 | + } | |
| 30 | + | |
| 31 | + /**删除 | |
| 32 | + * @param pd | |
| 33 | + * @throws Exception | |
| 34 | + */ | |
| 35 | + public void delete(PageData pd)throws Exception{ | |
| 36 | + dao.delete("ClassTypeMapper.delete", pd); | |
| 37 | + } | |
| 38 | + | |
| 39 | + /**修改 | |
| 40 | + * @param pd | |
| 41 | + * @throws Exception | |
| 42 | + */ | |
| 43 | + public void edit(PageData pd)throws Exception{ | |
| 44 | + dao.update("ClassTypeMapper.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("ClassTypeMapper.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("ClassTypeMapper.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("ClassTypeMapper.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("ClassTypeMapper.deleteAll", ArrayDATA_IDS); | |
| 79 | + } | |
| 80 | + | |
| 81 | +} | |
| 82 | + | ... | ... |
src/com/fh/service/sunvote/grade/GradeManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.grade; | |
| 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-25 | |
| 11 | + * @version | |
| 12 | + */ | |
| 13 | +public interface GradeManager{ | |
| 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/grade/impl/GradeService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.grade.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.grade.GradeManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 年级 | |
| 13 | + * 创建人:FH Q313596790 | |
| 14 | + * 创建时间:2018-04-25 | |
| 15 | + * @version | |
| 16 | + */ | |
| 17 | +@Service("gradeService") | |
| 18 | +public class GradeService implements GradeManager{ | |
| 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("GradeMapper.save", pd); | |
| 29 | + } | |
| 30 | + | |
| 31 | + /**删除 | |
| 32 | + * @param pd | |
| 33 | + * @throws Exception | |
| 34 | + */ | |
| 35 | + public void delete(PageData pd)throws Exception{ | |
| 36 | + dao.delete("GradeMapper.delete", pd); | |
| 37 | + } | |
| 38 | + | |
| 39 | + /**修改 | |
| 40 | + * @param pd | |
| 41 | + * @throws Exception | |
| 42 | + */ | |
| 43 | + public void edit(PageData pd)throws Exception{ | |
| 44 | + dao.update("GradeMapper.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("GradeMapper.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("GradeMapper.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("GradeMapper.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("GradeMapper.deleteAll", ArrayDATA_IDS); | |
| 79 | + } | |
| 80 | + | |
| 81 | +} | |
| 82 | + | ... | ... |
src/com/fh/service/sunvote/sclass/SClassManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.sclass; | |
| 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-25 | |
| 11 | + * @version | |
| 12 | + */ | |
| 13 | +public interface SClassManager{ | |
| 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/sclass/impl/SClassService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.sclass.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.sclass.SClassManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 班级 | |
| 13 | + * 创建人:FH Q313596790 | |
| 14 | + * 创建时间:2018-04-25 | |
| 15 | + * @version | |
| 16 | + */ | |
| 17 | +@Service("sclassService") | |
| 18 | +public class SClassService implements SClassManager{ | |
| 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("SClassMapper.save", pd); | |
| 29 | + } | |
| 30 | + | |
| 31 | + /**删除 | |
| 32 | + * @param pd | |
| 33 | + * @throws Exception | |
| 34 | + */ | |
| 35 | + public void delete(PageData pd)throws Exception{ | |
| 36 | + dao.delete("SClassMapper.delete", pd); | |
| 37 | + } | |
| 38 | + | |
| 39 | + /**修改 | |
| 40 | + * @param pd | |
| 41 | + * @throws Exception | |
| 42 | + */ | |
| 43 | + public void edit(PageData pd)throws Exception{ | |
| 44 | + dao.update("SClassMapper.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("SClassMapper.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("SClassMapper.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("SClassMapper.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("SClassMapper.deleteAll", ArrayDATA_IDS); | |
| 79 | + } | |
| 80 | + | |
| 81 | +} | |
| 82 | + | ... | ... |
src/com/fh/service/sunvote/subject/SubjectManager.java
0 → 100644
| 1 | +package com.fh.service.sunvote.subject; | |
| 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-25 | |
| 11 | + * @version | |
| 12 | + */ | |
| 13 | +public interface SubjectManager{ | |
| 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/subject/impl/SubjectService.java
0 → 100644
| 1 | +package com.fh.service.sunvote.subject.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.subject.SubjectManager; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 说明: 科目 | |
| 13 | + * 创建人:FH Q313596790 | |
| 14 | + * 创建时间:2018-04-25 | |
| 15 | + * @version | |
| 16 | + */ | |
| 17 | +@Service("subjectService") | |
| 18 | +public class SubjectService implements SubjectManager{ | |
| 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("SubjectMapper.save", pd); | |
| 29 | + } | |
| 30 | + | |
| 31 | + /**删除 | |
| 32 | + * @param pd | |
| 33 | + * @throws Exception | |
| 34 | + */ | |
| 35 | + public void delete(PageData pd)throws Exception{ | |
| 36 | + dao.delete("SubjectMapper.delete", pd); | |
| 37 | + } | |
| 38 | + | |
| 39 | + /**修改 | |
| 40 | + * @param pd | |
| 41 | + * @throws Exception | |
| 42 | + */ | |
| 43 | + public void edit(PageData pd)throws Exception{ | |
| 44 | + dao.update("SubjectMapper.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("SubjectMapper.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("SubjectMapper.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("SubjectMapper.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("SubjectMapper.deleteAll", ArrayDATA_IDS); | |
| 79 | + } | |
| 80 | + | |
| 81 | +} | |
| 82 | + | ... | ... |
src/com/fh/service/sunvote/teachingmaterial/TeachingMaterialManager.java
src/com/fh/service/sunvote/teachingmaterial/impl/TeachingMaterialService.java