From 92455d76d35d4f42abcee08c2a389d310be89ad8 Mon Sep 17 00:00:00 2001 From: Elvis Date: Thu, 19 Apr 2018 10:40:12 +0800 Subject: [PATCH] 添加更新到服务器 --- WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_edit.jsp | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_list.jsp | 378 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WebRoot/WEB-INF/jsp/sunvote/school/school_edit.jsp | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WebRoot/WEB-INF/jsp/sunvote/school/school_list.jsp | 372 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_edit.jsp | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_list.jsp | 372 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WebRoot/WEB-INF/jsp/system/index/login.jsp | 8 ++++---- resources/dbconfig.properties | 4 ++-- resources/ftl/createCode/controllerTemplate.ftl | 2 +- resources/ftl/createCode/managerTemplate.ftl | 2 +- resources/ftl/createFaCode/controllerTemplate.ftl | 2 +- resources/ftl/createFaCode/managerTemplate.ftl | 2 +- resources/ftl/createSoCode/controllerTemplate.ftl | 2 +- resources/ftl/createSoCode/managerTemplate.ftl | 2 +- resources/ftl/createTreeCode/controllerTemplate.ftl | 2 +- resources/ftl/createTreeCode/managerTemplate.ftl | 2 +- resources/ftl_backups/createCode/controllerTemplate.ftl | 2 +- resources/ftl_backups/createCode/managerTemplate.ftl | 2 +- resources/ftl_backups/createCode/serviceTemplate.ftl | 2 +- resources/ftl_backups/createFaCode/controllerTemplate.ftl | 2 +- resources/ftl_backups/createFaCode/managerTemplate.ftl | 2 +- resources/ftl_backups/createSoCode/controllerTemplate.ftl | 2 +- resources/ftl_backups/createSoCode/managerTemplate.ftl | 2 +- resources/ftl_backups/createTreeCode/controllerTemplate.ftl | 2 +- resources/ftl_backups/createTreeCode/managerTemplate.ftl | 2 +- resources/mybatis1/sunvote/BasestationMapper.xml | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ resources/mybatis1/sunvote/SchoolMapper.xml | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ resources/mybatis1/sunvote/TeachingMaterialMapper.xml | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ resources/spring/ApplicationContext-shiro.xml | 1 + src/com/fh/controller/api/ApiServer.java | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/controller/base/BaseController.java | 13 +++++++++++++ src/com/fh/controller/sunvote/basestation/BasestationController.java | 218 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/controller/sunvote/school/SchoolController.java | 225 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/controller/sunvote/teachingmaterial/TeachingMaterialController.java | 213 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/controller/system/login/LoginController.java | 2 +- src/com/fh/controller/system/secCode/SecCodeController.java | 3 ++- src/com/fh/interceptor/LoginHandlerInterceptor.java | 2 +- src/com/fh/service/sunvote/basestation/BasestationManager.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/service/sunvote/basestation/impl/BasestationService.java | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/service/sunvote/school/SchoolManager.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/service/sunvote/school/impl/SchoolService.java | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/service/sunvote/teachingmaterial/TeachingMaterialManager.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/service/sunvote/teachingmaterial/impl/TeachingMaterialService.java | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/com/fh/util/Const.java | 2 +- 44 files changed, 3166 insertions(+), 27 deletions(-) create mode 100644 WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_edit.jsp create mode 100644 WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_list.jsp create mode 100644 WebRoot/WEB-INF/jsp/sunvote/school/school_edit.jsp create mode 100644 WebRoot/WEB-INF/jsp/sunvote/school/school_list.jsp create mode 100644 WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_edit.jsp create mode 100644 WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_list.jsp create mode 100644 resources/mybatis1/sunvote/BasestationMapper.xml create mode 100644 resources/mybatis1/sunvote/SchoolMapper.xml create mode 100644 resources/mybatis1/sunvote/TeachingMaterialMapper.xml create mode 100644 src/com/fh/controller/api/ApiServer.java create mode 100644 src/com/fh/controller/sunvote/basestation/BasestationController.java create mode 100644 src/com/fh/controller/sunvote/school/SchoolController.java create mode 100644 src/com/fh/controller/sunvote/teachingmaterial/TeachingMaterialController.java create mode 100644 src/com/fh/service/sunvote/basestation/BasestationManager.java create mode 100644 src/com/fh/service/sunvote/basestation/impl/BasestationService.java create mode 100644 src/com/fh/service/sunvote/school/SchoolManager.java create mode 100644 src/com/fh/service/sunvote/school/impl/SchoolService.java create mode 100644 src/com/fh/service/sunvote/teachingmaterial/TeachingMaterialManager.java create mode 100644 src/com/fh/service/sunvote/teachingmaterial/impl/TeachingMaterialService.java diff --git a/WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_edit.jsp new file mode 100644 index 0000000..855eee7 --- /dev/null +++ b/WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_edit.jsp @@ -0,0 +1,192 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + <%@ include file="../../system/index/top.jsp"%> + + + + + +
+ +
+
+
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
基站名称:
基站编号:
配对码:
键盘模式:
工作模式:
生产时间:
是否正常:
备注:
+ 保存 + 取消 +
+
+ +
+
+ +
+ +
+ +
+
+ +
+ + + + + <%@ include file="../../system/index/foot.jsp"%> + + + + + + + + + \ No newline at end of file diff --git a/WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_list.jsp new file mode 100644 index 0000000..b8895d2 --- /dev/null +++ b/WebRoot/WEB-INF/jsp/sunvote/basestation/basestation_list.jsp @@ -0,0 +1,378 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + + + +<%@ include file="../../system/index/top.jsp"%> + + + + + + +
+ +
+
+
+
+
+ + +
+ + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 序号基站名称基站编号配对码键盘模式工作模式生产时间是否正常备注操作
+ + ${vs.index+1}${var.NAME}${var.NO}${var.MATCH_CODE}${var.KEYPAD_MODE}${var.WORK_MODE}${var.PRODUCTION_TIME}${var.IS_OK}${var.REMARK} + + + + + +
您无权查看
没有相关数据
+ +
+ +
+ +
+ +
+ +
+
+ + + + + + + +
+ + + + + <%@ include file="../../system/index/foot.jsp"%> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebRoot/WEB-INF/jsp/sunvote/school/school_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/school/school_edit.jsp new file mode 100644 index 0000000..7a3c6ae --- /dev/null +++ b/WebRoot/WEB-INF/jsp/sunvote/school/school_edit.jsp @@ -0,0 +1,150 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + <%@ include file="../../system/index/top.jsp"%> + + + + + +
+ +
+
+
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
学校名称:
学校地址:
校长:
联系电话:
备注:
+ 保存 + 取消 +
+
+ +
+
+ +
+ +
+ +
+
+ +
+ + + + + <%@ include file="../../system/index/foot.jsp"%> + + + + + + + + + \ No newline at end of file diff --git a/WebRoot/WEB-INF/jsp/sunvote/school/school_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/school/school_list.jsp new file mode 100644 index 0000000..2d32891 --- /dev/null +++ b/WebRoot/WEB-INF/jsp/sunvote/school/school_list.jsp @@ -0,0 +1,372 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + + + +<%@ include file="../../system/index/top.jsp"%> + + + + + + +
+ +
+
+
+
+
+ + +
+ + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 序号学校名称学校地址校长联系电话备注操作
+ + ${vs.index+1}${var.NAME}${var.ADDRESS}${var.PRESIDENT}${var.PHONE}${var.REMARK} + + + + + +
您无权查看
没有相关数据
+ +
+ +
+ +
+ +
+ +
+
+ + + + + + + +
+ + + + + <%@ include file="../../system/index/foot.jsp"%> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_edit.jsp new file mode 100644 index 0000000..637827a --- /dev/null +++ b/WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_edit.jsp @@ -0,0 +1,150 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + <%@ include file="../../system/index/top.jsp"%> + + + + + +
+ +
+
+
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
教材名称:
所属科目:
所属年级:
教材版本号:
教材版本名称:
+ 保存 + 取消 +
+
+ +
+
+ +
+ +
+ +
+
+ +
+ + + + + <%@ include file="../../system/index/foot.jsp"%> + + + + + + + + + \ No newline at end of file diff --git a/WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_list.jsp new file mode 100644 index 0000000..f9bbb93 --- /dev/null +++ b/WebRoot/WEB-INF/jsp/sunvote/teachingmaterial/teachingmaterial_list.jsp @@ -0,0 +1,372 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + + + +<%@ include file="../../system/index/top.jsp"%> + + + + + + +
+ +
+
+
+
+
+ + +
+ + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 序号教材名称所属科目所属年级教材版本号教材版本名称操作
+ + ${vs.index+1}${var.NAME}${var.SUBJECT_ID}${var.GRADE_ID}${var.VERSION_CODE}${var.VERSION_NAME} + + + + + +
您无权查看
没有相关数据
+ +
+ +
+ +
+ +
+ +
+
+ + + + + + + +
+ + + + + <%@ include file="../../system/index/foot.jsp"%> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebRoot/WEB-INF/jsp/system/index/login.jsp b/WebRoot/WEB-INF/jsp/system/index/login.jsp index 457b062..ff1cd66 100644 --- a/WebRoot/WEB-INF/jsp/system/index/login.jsp +++ b/WebRoot/WEB-INF/jsp/system/index/login.jsp @@ -232,11 +232,11 @@ -
-
+
+
@@ -249,7 +249,7 @@ if(check()){ var loginname = $("#loginname").val(); var password = $("#password").val(); - var code = "qq313596790fh"+loginname+",fh,"+password+"QQ978336446fh"+",fh,"+$("#code").val(); + var code = "elvis"+loginname+",fh,"+password+"elvis"+",fh,"+$("#code").val(); $.ajax({ type: "POST", url: 'login_login', diff --git a/resources/dbconfig.properties b/resources/dbconfig.properties index 3d2e99e..77c05f2 100644 --- a/resources/dbconfig.properties +++ b/resources/dbconfig.properties @@ -1,5 +1,5 @@ #数据源 1 -url:jdbc:mysql://localhost:3306/fhadmin?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 +url:jdbc:mysql://localhost:3306/sunvote?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 driverClassName:com.mysql.jdbc.Driver username:root password:elvis @@ -21,7 +21,7 @@ removeAbandonedTimeout:1800 logAbandoned:true #数据源 2(没启用,不用管,文档大全里面有配置文档) -url2:jdbc:mysql://localhost:3306/fhadmin2?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 +url2:jdbc:mysql://localhost:3306/sunvote2?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 driverClassName2:com.mysql.jdbc.Driver username2:root password2:elvis diff --git a/resources/ftl/createCode/controllerTemplate.ftl b/resources/ftl/createCode/controllerTemplate.ftl index 91a191f..c8a20d8 100644 --- a/resources/ftl/createCode/controllerTemplate.ftl +++ b/resources/ftl/createCode/controllerTemplate.ftl @@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; /** * 说明:${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} */ @Controller diff --git a/resources/ftl/createCode/managerTemplate.ftl b/resources/ftl/createCode/managerTemplate.ftl index f9814b2..e707529 100644 --- a/resources/ftl/createCode/managerTemplate.ftl +++ b/resources/ftl/createCode/managerTemplate.ftl @@ -6,7 +6,7 @@ import com.fh.util.PageData; /** * 说明: ${TITLE}接口 - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/ftl/createFaCode/controllerTemplate.ftl b/resources/ftl/createFaCode/controllerTemplate.ftl index 28f806a..eb16b3a 100644 --- a/resources/ftl/createFaCode/controllerTemplate.ftl +++ b/resources/ftl/createFaCode/controllerTemplate.ftl @@ -28,7 +28,7 @@ import com.fh.service.${packageName}.${objectNameLower}mx.${objectName}MxManager /** * 说明:${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} */ @Controller diff --git a/resources/ftl/createFaCode/managerTemplate.ftl b/resources/ftl/createFaCode/managerTemplate.ftl index f9814b2..e707529 100644 --- a/resources/ftl/createFaCode/managerTemplate.ftl +++ b/resources/ftl/createFaCode/managerTemplate.ftl @@ -6,7 +6,7 @@ import com.fh.util.PageData; /** * 说明: ${TITLE}接口 - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/ftl/createSoCode/controllerTemplate.ftl b/resources/ftl/createSoCode/controllerTemplate.ftl index 91a191f..c8a20d8 100644 --- a/resources/ftl/createSoCode/controllerTemplate.ftl +++ b/resources/ftl/createSoCode/controllerTemplate.ftl @@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; /** * 说明:${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} */ @Controller diff --git a/resources/ftl/createSoCode/managerTemplate.ftl b/resources/ftl/createSoCode/managerTemplate.ftl index c1d8762..601fb9e 100644 --- a/resources/ftl/createSoCode/managerTemplate.ftl +++ b/resources/ftl/createSoCode/managerTemplate.ftl @@ -6,7 +6,7 @@ import com.fh.util.PageData; /** * 说明: ${TITLE}接口 - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/ftl/createTreeCode/controllerTemplate.ftl b/resources/ftl/createTreeCode/controllerTemplate.ftl index b64c733..9297412 100644 --- a/resources/ftl/createTreeCode/controllerTemplate.ftl +++ b/resources/ftl/createTreeCode/controllerTemplate.ftl @@ -29,7 +29,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; /** * 说明:${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} */ @Controller diff --git a/resources/ftl/createTreeCode/managerTemplate.ftl b/resources/ftl/createTreeCode/managerTemplate.ftl index 3980116..83bbaa2 100644 --- a/resources/ftl/createTreeCode/managerTemplate.ftl +++ b/resources/ftl/createTreeCode/managerTemplate.ftl @@ -7,7 +7,7 @@ import com.fh.util.PageData; /** * 说明: ${TITLE}接口 - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/ftl_backups/createCode/controllerTemplate.ftl b/resources/ftl_backups/createCode/controllerTemplate.ftl index 91a191f..c8a20d8 100644 --- a/resources/ftl_backups/createCode/controllerTemplate.ftl +++ b/resources/ftl_backups/createCode/controllerTemplate.ftl @@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; /** * 说明:${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} */ @Controller diff --git a/resources/ftl_backups/createCode/managerTemplate.ftl b/resources/ftl_backups/createCode/managerTemplate.ftl index f9814b2..e707529 100644 --- a/resources/ftl_backups/createCode/managerTemplate.ftl +++ b/resources/ftl_backups/createCode/managerTemplate.ftl @@ -6,7 +6,7 @@ import com.fh.util.PageData; /** * 说明: ${TITLE}接口 - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/ftl_backups/createCode/serviceTemplate.ftl b/resources/ftl_backups/createCode/serviceTemplate.ftl index 67be8e2..40b3762 100644 --- a/resources/ftl_backups/createCode/serviceTemplate.ftl +++ b/resources/ftl_backups/createCode/serviceTemplate.ftl @@ -10,7 +10,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; /** * 说明: ${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/ftl_backups/createFaCode/controllerTemplate.ftl b/resources/ftl_backups/createFaCode/controllerTemplate.ftl index 28f806a..eb16b3a 100644 --- a/resources/ftl_backups/createFaCode/controllerTemplate.ftl +++ b/resources/ftl_backups/createFaCode/controllerTemplate.ftl @@ -28,7 +28,7 @@ import com.fh.service.${packageName}.${objectNameLower}mx.${objectName}MxManager /** * 说明:${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} */ @Controller diff --git a/resources/ftl_backups/createFaCode/managerTemplate.ftl b/resources/ftl_backups/createFaCode/managerTemplate.ftl index f9814b2..e707529 100644 --- a/resources/ftl_backups/createFaCode/managerTemplate.ftl +++ b/resources/ftl_backups/createFaCode/managerTemplate.ftl @@ -6,7 +6,7 @@ import com.fh.util.PageData; /** * 说明: ${TITLE}接口 - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/ftl_backups/createSoCode/controllerTemplate.ftl b/resources/ftl_backups/createSoCode/controllerTemplate.ftl index 91a191f..c8a20d8 100644 --- a/resources/ftl_backups/createSoCode/controllerTemplate.ftl +++ b/resources/ftl_backups/createSoCode/controllerTemplate.ftl @@ -27,7 +27,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; /** * 说明:${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} */ @Controller diff --git a/resources/ftl_backups/createSoCode/managerTemplate.ftl b/resources/ftl_backups/createSoCode/managerTemplate.ftl index c1d8762..601fb9e 100644 --- a/resources/ftl_backups/createSoCode/managerTemplate.ftl +++ b/resources/ftl_backups/createSoCode/managerTemplate.ftl @@ -6,7 +6,7 @@ import com.fh.util.PageData; /** * 说明: ${TITLE}接口 - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/ftl_backups/createTreeCode/controllerTemplate.ftl b/resources/ftl_backups/createTreeCode/controllerTemplate.ftl index b64c733..9297412 100644 --- a/resources/ftl_backups/createTreeCode/controllerTemplate.ftl +++ b/resources/ftl_backups/createTreeCode/controllerTemplate.ftl @@ -29,7 +29,7 @@ import com.fh.service.${packageName}.${objectNameLower}.${objectName}Manager; /** * 说明:${TITLE} - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} */ @Controller diff --git a/resources/ftl_backups/createTreeCode/managerTemplate.ftl b/resources/ftl_backups/createTreeCode/managerTemplate.ftl index 3980116..83bbaa2 100644 --- a/resources/ftl_backups/createTreeCode/managerTemplate.ftl +++ b/resources/ftl_backups/createTreeCode/managerTemplate.ftl @@ -7,7 +7,7 @@ import com.fh.util.PageData; /** * 说明: ${TITLE}接口 - * 创建人:FH Q313596790 + * 创建人:Elvis * 创建时间:${nowDate?string("yyyy-MM-dd")} * @version */ diff --git a/resources/mybatis1/sunvote/BasestationMapper.xml b/resources/mybatis1/sunvote/BasestationMapper.xml new file mode 100644 index 0000000..05efeee --- /dev/null +++ b/resources/mybatis1/sunvote/BasestationMapper.xml @@ -0,0 +1,136 @@ + + + + + + + SV_BASESTATION + + + + + NAME, + NO, + MATCH_CODE, + KEYPAD_MODE, + WORK_MODE, + PRODUCTION_TIME, + IS_OK, + REMARK, + BASESTATION_ID + + + + + #{NAME}, + #{NO}, + #{MATCH_CODE}, + #{KEYPAD_MODE}, + #{WORK_MODE}, + #{PRODUCTION_TIME}, + #{IS_OK}, + #{REMARK}, + #{BASESTATION_ID} + + + + + insert into + + ( + NAME, + NO, + MATCH_CODE, + KEYPAD_MODE, + WORK_MODE, + PRODUCTION_TIME, + IS_OK, + REMARK + ) values ( + #{NAME}, + #{NO}, + #{MATCH_CODE}, + #{KEYPAD_MODE}, + #{WORK_MODE}, + #{PRODUCTION_TIME}, + #{IS_OK}, + #{REMARK} + ) + + + + + delete from + + where + BASESTATION_ID = #{BASESTATION_ID} + + + + + update + + set + NAME = #{NAME}, + NO = #{NO}, + MATCH_CODE = #{MATCH_CODE}, + KEYPAD_MODE = #{KEYPAD_MODE}, + WORK_MODE = #{WORK_MODE}, + PRODUCTION_TIME = #{PRODUCTION_TIME}, + IS_OK = #{IS_OK}, + REMARK = #{REMARK}, + BASESTATION_ID = BASESTATION_ID + where + BASESTATION_ID = #{BASESTATION_ID} + + + + + + + + + + + + + + delete from + + where + BASESTATION_ID in + + #{item} + + + + + \ No newline at end of file diff --git a/resources/mybatis1/sunvote/SchoolMapper.xml b/resources/mybatis1/sunvote/SchoolMapper.xml new file mode 100644 index 0000000..9c4bd87 --- /dev/null +++ b/resources/mybatis1/sunvote/SchoolMapper.xml @@ -0,0 +1,121 @@ + + + + + + + SV_SCHOOL + + + + + NAME, + ADDRESS, + PRESIDENT, + PHONE, + REMARK, + SCHOOL_ID + + + + + #{NAME}, + #{ADDRESS}, + #{PRESIDENT}, + #{PHONE}, + #{REMARK}, + #{SCHOOL_ID} + + + + + insert into + + ( + NAME, + ADDRESS, + PRESIDENT, + PHONE, + REMARK + ) values ( + #{NAME}, + #{ADDRESS}, + #{PRESIDENT}, + #{PHONE}, + #{REMARK} + ) + + + + + delete from + + where + SCHOOL_ID = #{SCHOOL_ID} + + + + + update + + set + NAME = #{NAME}, + ADDRESS = #{ADDRESS}, + PRESIDENT = #{PRESIDENT}, + PHONE = #{PHONE}, + REMARK = #{REMARK}, + SCHOOL_ID = SCHOOL_ID + where + SCHOOL_ID = #{SCHOOL_ID} + + + + + + + + + + + + + + delete from + + where + SCHOOL_ID in + + #{item} + + + + + \ No newline at end of file diff --git a/resources/mybatis1/sunvote/TeachingMaterialMapper.xml b/resources/mybatis1/sunvote/TeachingMaterialMapper.xml new file mode 100644 index 0000000..0a8f1a5 --- /dev/null +++ b/resources/mybatis1/sunvote/TeachingMaterialMapper.xml @@ -0,0 +1,113 @@ + + + + + + + SV_TEACHINGMATERIAL + + + + + NAME, + SUBJECT_ID, + GRADE_ID, + VERSION_CODE, + VERSION_NAME, + TEACHINGMATERIAL_ID + + + + + #{NAME}, + #{SUBJECT_ID}, + #{GRADE_ID}, + #{VERSION_CODE}, + #{VERSION_NAME}, + #{TEACHINGMATERIAL_ID} + + + + + insert into + + ( + + ) values ( + + ) + + + + + delete from + + where + TEACHINGMATERIAL_ID = #{TEACHINGMATERIAL_ID} + + + + + update + + set + NAME = #{NAME}, + SUBJECT_ID = #{SUBJECT_ID}, + GRADE_ID = #{GRADE_ID}, + VERSION_CODE = #{VERSION_CODE}, + VERSION_NAME = #{VERSION_NAME}, + TEACHINGMATERIAL_ID = TEACHINGMATERIAL_ID + where + TEACHINGMATERIAL_ID = #{TEACHINGMATERIAL_ID} + + + + + + + + + + + + + + delete from + + where + TEACHINGMATERIAL_ID in + + #{item} + + + + + \ No newline at end of file diff --git a/resources/spring/ApplicationContext-shiro.xml b/resources/spring/ApplicationContext-shiro.xml index e32c62b..3f8ba8c 100644 --- a/resources/spring/ApplicationContext-shiro.xml +++ b/resources/spring/ApplicationContext-shiro.xml @@ -41,6 +41,7 @@ /code.do = anon /login_login = anon /app**/** = anon + /api/** = anon /weixin/** = anon /** = authc diff --git a/src/com/fh/controller/api/ApiServer.java b/src/com/fh/controller/api/ApiServer.java new file mode 100644 index 0000000..1362ce8 --- /dev/null +++ b/src/com/fh/controller/api/ApiServer.java @@ -0,0 +1,64 @@ +package com.fh.controller.api; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.fh.controller.base.BaseController; +import com.fh.service.sunvote.basestation.BasestationManager; +import com.fh.service.sunvote.school.SchoolManager; +import com.fh.util.Jurisdiction; +import com.fh.util.PageData; +import com.google.gson.Gson; + +@Controller +@RequestMapping(value="/api") +public class ApiServer extends BaseController { + + @Resource(name="schoolService") + private SchoolManager schoolService; + + @Resource(name="basestationService") + private BasestationManager basestationService; + + + @RequestMapping(value="/school" ,produces="application/json;charset=UTF-8") + @ResponseBody + public Object school() throws Exception{ + PageData pd = this.getPageData(); + String id = pd.getString("id"); + if(id != null && !"".equals(id)){ + pd.put("SCHOOL_ID", pd.getString("id")); + PageData ret = schoolService.findById(pd); + Gson gson = new Gson(); + return gson.toJson(ret); + }else{ + List ret = schoolService.listAll(pd); + Gson gson = new Gson(); + return gson.toJson(ret); + } + + } + + @RequestMapping(value="/basestation" ,produces="application/json;charset=UTF-8") + @ResponseBody + public Object basestation() throws Exception{ + PageData pd = this.getPageData(); + String id = pd.getString("id"); + if(id != null && !"".equals(id)){ + pd.put("BASESTATION_ID", pd.getString("id")); + PageData ret = basestationService.findById(pd); + Gson gson = new Gson(); + return gson.toJson(ret); + }else{ + List ret = basestationService.listAll(pd); + Gson gson = new Gson(); + return gson.toJson(ret); + } + + } +} diff --git a/src/com/fh/controller/base/BaseController.java b/src/com/fh/controller/base/BaseController.java index 802a60c..4392a9b 100644 --- a/src/com/fh/controller/base/BaseController.java +++ b/src/com/fh/controller/base/BaseController.java @@ -3,11 +3,15 @@ package com.fh.controller.base; import javax.servlet.http.HttpServletRequest; +import org.apache.shiro.session.Session; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.servlet.ModelAndView; import com.fh.entity.Page; +import com.fh.entity.system.User; +import com.fh.util.Const; +import com.fh.util.Jurisdiction; import com.fh.util.Logger; import com.fh.util.PageData; import com.fh.util.UuidUtil; @@ -69,4 +73,13 @@ public class BaseController { logger.info(""); } + + public String getUsername(){ + Session session = Jurisdiction.getSession(); + User user = (User)session.getAttribute(Const.SESSION_USER); + if(user != null){ + return user.getUSERNAME(); + } + return "ERROR"; + } } diff --git a/src/com/fh/controller/sunvote/basestation/BasestationController.java b/src/com/fh/controller/sunvote/basestation/BasestationController.java new file mode 100644 index 0000000..0933443 --- /dev/null +++ b/src/com/fh/controller/sunvote/basestation/BasestationController.java @@ -0,0 +1,218 @@ +package com.fh.controller.sunvote.basestation; + +import java.io.PrintWriter; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Resource; +import org.springframework.beans.propertyeditors.CustomDateEditor; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.InitBinder; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; +import com.fh.controller.base.BaseController; +import com.fh.entity.Page; +import com.fh.util.AppUtil; +import com.fh.util.ObjectExcelView; +import com.fh.util.PageData; +import com.fh.util.Jurisdiction; +import com.fh.util.Tools; +import com.fh.service.sunvote.basestation.BasestationManager; + +/** + * 说明:基站管理 + * 创建人:Elvis + * 创建时间:2018-04-19 + */ +@Controller +@RequestMapping(value="/basestation") +public class BasestationController extends BaseController { + + String menuUrl = "basestation/list.do"; //菜单地址(权限用) + @Resource(name="basestationService") + private BasestationManager basestationService; + + /**保存 + * @param + * @throws Exception + */ + @RequestMapping(value="/save") + public ModelAndView save() throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"新增Basestation"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + basestationService.save(pd); + mv.addObject("msg","success"); + mv.setViewName("save_result"); + return mv; + } + + /**删除 + * @param out + * @throws Exception + */ + @RequestMapping(value="/delete") + public void delete(PrintWriter out) throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"删除Basestation"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 + PageData pd = new PageData(); + pd = this.getPageData(); + basestationService.delete(pd); + out.write("success"); + out.close(); + } + + /**修改 + * @param + * @throws Exception + */ + @RequestMapping(value="/edit") + public ModelAndView edit() throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"修改Basestation"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + basestationService.edit(pd); + mv.addObject("msg","success"); + mv.setViewName("save_result"); + return mv; + } + + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/list") + public ModelAndView list(Page page) throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"列表Basestation"); + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + String keywords = pd.getString("keywords"); //关键词检索条件 + if(null != keywords && !"".equals(keywords)){ + pd.put("keywords", keywords.trim()); + } + page.setPd(pd); + List varList = basestationService.list(page); //列出Basestation列表 + mv.setViewName("sunvote/basestation/basestation_list"); + mv.addObject("varList", varList); + mv.addObject("pd", pd); + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 + return mv; + } + + /**去新增页面 + * @param + * @throws Exception + */ + @RequestMapping(value="/goAdd") + public ModelAndView goAdd()throws Exception{ + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + mv.setViewName("sunvote/basestation/basestation_edit"); + mv.addObject("msg", "save"); + mv.addObject("pd", pd); + return mv; + } + + /**去修改页面 + * @param + * @throws Exception + */ + @RequestMapping(value="/goEdit") + public ModelAndView goEdit()throws Exception{ + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + pd = basestationService.findById(pd); //根据ID读取 + mv.setViewName("sunvote/basestation/basestation_edit"); + mv.addObject("msg", "edit"); + mv.addObject("pd", pd); + return mv; + } + + /**批量删除 + * @param + * @throws Exception + */ + @RequestMapping(value="/deleteAll") + @ResponseBody + public Object deleteAll() throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"批量删除Basestation"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 + PageData pd = new PageData(); + Map map = new HashMap(); + pd = this.getPageData(); + List pdList = new ArrayList(); + String DATA_IDS = pd.getString("DATA_IDS"); + if(null != DATA_IDS && !"".equals(DATA_IDS)){ + String ArrayDATA_IDS[] = DATA_IDS.split(","); + basestationService.deleteAll(ArrayDATA_IDS); + pd.put("msg", "ok"); + }else{ + pd.put("msg", "no"); + } + pdList.add(pd); + map.put("list", pdList); + return AppUtil.returnObject(pd, map); + } + + /**导出到excel + * @param + * @throws Exception + */ + @RequestMapping(value="/excel") + public ModelAndView exportExcel() throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"导出Basestation到excel"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} + ModelAndView mv = new ModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + Map dataMap = new HashMap(); + List titles = new ArrayList(); + titles.add("基站名称"); //1 + titles.add("基站编号"); //2 + titles.add("配对码"); //3 + titles.add("键盘模式"); //4 + titles.add("工作模式"); //5 + titles.add("生产时间"); //6 + titles.add("是否正常"); //7 + titles.add("备注"); //8 + dataMap.put("titles", titles); + List varOList = basestationService.listAll(pd); + List varList = new ArrayList(); + for(int i=0;i varList = schoolService.list(page); //列出School列表 + mv.setViewName("sunvote/school/school_list"); + mv.addObject("varList", varList); + mv.addObject("pd", pd); + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 + return mv; + } + + /**去新增页面 + * @param + * @throws Exception + */ + @RequestMapping(value="/goAdd") + public ModelAndView goAdd()throws Exception{ + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + mv.setViewName("sunvote/school/school_edit"); + mv.addObject("msg", "save"); + mv.addObject("pd", pd); + return mv; + } + + /**去修改页面 + * @param + * @throws Exception + */ + @RequestMapping(value="/goEdit") + public ModelAndView goEdit()throws Exception{ + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + pd = schoolService.findById(pd); //根据ID读取 + mv.setViewName("sunvote/school/school_edit"); + mv.addObject("msg", "edit"); + mv.addObject("pd", pd); + return mv; + } + + /**批量删除 + * @param + * @throws Exception + */ + @RequestMapping(value="/deleteAll") + @ResponseBody + public Object deleteAll() throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"批量删除学校"); + FHLOG.save(getUsername(), "批量删除学校"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 + PageData pd = new PageData(); + Map map = new HashMap(); + pd = this.getPageData(); + List pdList = new ArrayList(); + String DATA_IDS = pd.getString("DATA_IDS"); + if(null != DATA_IDS && !"".equals(DATA_IDS)){ + String ArrayDATA_IDS[] = DATA_IDS.split(","); + schoolService.deleteAll(ArrayDATA_IDS); + pd.put("msg", "ok"); + }else{ + pd.put("msg", "no"); + } + pdList.add(pd); + map.put("list", pdList); + return AppUtil.returnObject(pd, map); + } + + /**导出到excel + * @param + * @throws Exception + */ + @RequestMapping(value="/excel") + public ModelAndView exportExcel() throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"导出School到excel"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} + ModelAndView mv = new ModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + Map dataMap = new HashMap(); + List titles = new ArrayList(); + titles.add("学校名称"); //1 + titles.add("学校地址"); //2 + titles.add("校长"); //3 + titles.add("联系电话"); //4 + titles.add("备注"); //5 + dataMap.put("titles", titles); + List varOList = schoolService.listAll(pd); + List varList = new ArrayList(); + for(int i=0;i varList = teachingmaterialService.list(page); //列出TeachingMaterial列表 + mv.setViewName("sunvote/teachingmaterial/teachingmaterial_list"); + mv.addObject("varList", varList); + mv.addObject("pd", pd); + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 + return mv; + } + + /**去新增页面 + * @param + * @throws Exception + */ + @RequestMapping(value="/goAdd") + public ModelAndView goAdd()throws Exception{ + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + mv.setViewName("sunvote/teachingmaterial/teachingmaterial_edit"); + mv.addObject("msg", "save"); + mv.addObject("pd", pd); + return mv; + } + + /**去修改页面 + * @param + * @throws Exception + */ + @RequestMapping(value="/goEdit") + public ModelAndView goEdit()throws Exception{ + ModelAndView mv = this.getModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + pd = teachingmaterialService.findById(pd); //根据ID读取 + mv.setViewName("sunvote/teachingmaterial/teachingmaterial_edit"); + mv.addObject("msg", "edit"); + mv.addObject("pd", pd); + return mv; + } + + /**批量删除 + * @param + * @throws Exception + */ + @RequestMapping(value="/deleteAll") + @ResponseBody + public Object deleteAll() throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"批量删除TeachingMaterial"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 + PageData pd = new PageData(); + Map map = new HashMap(); + pd = this.getPageData(); + List pdList = new ArrayList(); + String DATA_IDS = pd.getString("DATA_IDS"); + if(null != DATA_IDS && !"".equals(DATA_IDS)){ + String ArrayDATA_IDS[] = DATA_IDS.split(","); + teachingmaterialService.deleteAll(ArrayDATA_IDS); + pd.put("msg", "ok"); + }else{ + pd.put("msg", "no"); + } + pdList.add(pd); + map.put("list", pdList); + return AppUtil.returnObject(pd, map); + } + + /**导出到excel + * @param + * @throws Exception + */ + @RequestMapping(value="/excel") + public ModelAndView exportExcel() throws Exception{ + logBefore(logger, Jurisdiction.getUsername()+"导出TeachingMaterial到excel"); + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} + ModelAndView mv = new ModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + Map dataMap = new HashMap(); + List titles = new ArrayList(); + titles.add("教材名称"); //1 + titles.add("所属科目"); //2 + titles.add("所属年级"); //3 + titles.add("教材版本号"); //4 + titles.add("教材版本名称"); //5 + dataMap.put("titles", titles); + List varOList = teachingmaterialService.listAll(pd); + List varList = new ArrayList(); + for(int i=0;i list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + +} + diff --git a/src/com/fh/service/sunvote/basestation/impl/BasestationService.java b/src/com/fh/service/sunvote/basestation/impl/BasestationService.java new file mode 100644 index 0000000..6ca7de5 --- /dev/null +++ b/src/com/fh/service/sunvote/basestation/impl/BasestationService.java @@ -0,0 +1,82 @@ +package com.fh.service.sunvote.basestation.impl; + +import java.util.List; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; +import com.fh.dao.DaoSupport; +import com.fh.entity.Page; +import com.fh.util.PageData; +import com.fh.service.sunvote.basestation.BasestationManager; + +/** + * 说明: 基站管理 + * 创建人:FH Q313596790 + * 创建时间:2018-04-19 + * @version + */ +@Service("basestationService") +public class BasestationService implements BasestationManager{ + + @Resource(name = "daoSupport") + private DaoSupport dao; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + dao.save("BasestationMapper.save", pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + dao.delete("BasestationMapper.delete", pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + dao.update("BasestationMapper.edit", pd); + } + + /**列表 + * @param page + * @throws Exception + */ + @SuppressWarnings("unchecked") + public List list(Page page)throws Exception{ + return (List)dao.findForList("BasestationMapper.datalistPage", page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + @SuppressWarnings("unchecked") + public List listAll(PageData pd)throws Exception{ + return (List)dao.findForList("BasestationMapper.listAll", pd); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception{ + return (PageData)dao.findForObject("BasestationMapper.findById", pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + dao.delete("BasestationMapper.deleteAll", ArrayDATA_IDS); + } + +} + diff --git a/src/com/fh/service/sunvote/school/SchoolManager.java b/src/com/fh/service/sunvote/school/SchoolManager.java new file mode 100644 index 0000000..0495545 --- /dev/null +++ b/src/com/fh/service/sunvote/school/SchoolManager.java @@ -0,0 +1,58 @@ +package com.fh.service.sunvote.school; + +import java.util.List; +import com.fh.entity.Page; +import com.fh.util.PageData; + +/** + * 说明: 学校接口 + * 创建人:FH Q313596790 + * 创建时间:2018-04-18 + * @version + */ +public interface SchoolManager{ + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception; + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception; + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + +} + diff --git a/src/com/fh/service/sunvote/school/impl/SchoolService.java b/src/com/fh/service/sunvote/school/impl/SchoolService.java new file mode 100644 index 0000000..b2eeaa1 --- /dev/null +++ b/src/com/fh/service/sunvote/school/impl/SchoolService.java @@ -0,0 +1,82 @@ +package com.fh.service.sunvote.school.impl; + +import java.util.List; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; +import com.fh.dao.DaoSupport; +import com.fh.entity.Page; +import com.fh.util.PageData; +import com.fh.service.sunvote.school.SchoolManager; + +/** + * 说明: 学校 + * 创建人:FH Q313596790 + * 创建时间:2018-04-18 + * @version + */ +@Service("schoolService") +public class SchoolService implements SchoolManager{ + + @Resource(name = "daoSupport") + private DaoSupport dao; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + dao.save("SchoolMapper.save", pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + dao.delete("SchoolMapper.delete", pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + dao.update("SchoolMapper.edit", pd); + } + + /**列表 + * @param page + * @throws Exception + */ + @SuppressWarnings("unchecked") + public List list(Page page)throws Exception{ + return (List)dao.findForList("SchoolMapper.datalistPage", page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + @SuppressWarnings("unchecked") + public List listAll(PageData pd)throws Exception{ + return (List)dao.findForList("SchoolMapper.listAll", pd); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception{ + return (PageData)dao.findForObject("SchoolMapper.findById", pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + dao.delete("SchoolMapper.deleteAll", ArrayDATA_IDS); + } + +} + diff --git a/src/com/fh/service/sunvote/teachingmaterial/TeachingMaterialManager.java b/src/com/fh/service/sunvote/teachingmaterial/TeachingMaterialManager.java new file mode 100644 index 0000000..4a9532d --- /dev/null +++ b/src/com/fh/service/sunvote/teachingmaterial/TeachingMaterialManager.java @@ -0,0 +1,58 @@ +package com.fh.service.sunvote.teachingmaterial; + +import java.util.List; +import com.fh.entity.Page; +import com.fh.util.PageData; + +/** + * 说明: 教材接口 + * 创建人:FH Q313596790 + * 创建时间:2018-04-18 + * @version + */ +public interface TeachingMaterialManager{ + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception; + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception; + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + +} + diff --git a/src/com/fh/service/sunvote/teachingmaterial/impl/TeachingMaterialService.java b/src/com/fh/service/sunvote/teachingmaterial/impl/TeachingMaterialService.java new file mode 100644 index 0000000..7e09d0f --- /dev/null +++ b/src/com/fh/service/sunvote/teachingmaterial/impl/TeachingMaterialService.java @@ -0,0 +1,82 @@ +package com.fh.service.sunvote.teachingmaterial.impl; + +import java.util.List; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; +import com.fh.dao.DaoSupport; +import com.fh.entity.Page; +import com.fh.util.PageData; +import com.fh.service.sunvote.teachingmaterial.TeachingMaterialManager; + +/** + * 说明: 教材 + * 创建人:FH Q313596790 + * 创建时间:2018-04-18 + * @version + */ +@Service("teachingmaterialService") +public class TeachingMaterialService implements TeachingMaterialManager{ + + @Resource(name = "daoSupport") + private DaoSupport dao; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + dao.save("TeachingMaterialMapper.save", pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + dao.delete("TeachingMaterialMapper.delete", pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + dao.update("TeachingMaterialMapper.edit", pd); + } + + /**列表 + * @param page + * @throws Exception + */ + @SuppressWarnings("unchecked") + public List list(Page page)throws Exception{ + return (List)dao.findForList("TeachingMaterialMapper.datalistPage", page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + @SuppressWarnings("unchecked") + public List listAll(PageData pd)throws Exception{ + return (List)dao.findForList("TeachingMaterialMapper.listAll", pd); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception{ + return (PageData)dao.findForObject("TeachingMaterialMapper.findById", pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + dao.delete("TeachingMaterialMapper.deleteAll", ArrayDATA_IDS); + } + +} + diff --git a/src/com/fh/util/Const.java b/src/com/fh/util/Const.java index 0553a23..7dcee53 100644 --- a/src/com/fh/util/Const.java +++ b/src/com/fh/util/Const.java @@ -37,7 +37,7 @@ public class Const { public static final String FILEPATHFILE = "uploadFiles/file/"; //文件上传路径 public static final String FILEPATHFILEOA = "uploadFiles/uploadFile/"; //文件上传路径(oa管理) public static final String FILEPATHTWODIMENSIONCODE = "uploadFiles/twoDimensionCode/"; //二维码存放路径 - public static final String NO_INTERCEPTOR_PATH = ".*/((login)|(logout)|(code)|(app)|(weixin)|(static)|(main)|(websocket)|(uploadImgs)).*"; //不对匹配该值的访问路径拦截(正则) + public static final String NO_INTERCEPTOR_PATH = ".*/((login)|(logout)|(code)|(app)|(weixin)|(static)|(main)|(api)|(websocket)|(uploadImgs)).*"; //不对匹配该值的访问路径拦截(正则) public static ApplicationContext WEB_APP_CONTEXT = null; //该值会在web容器启动时由WebAppContextListener初始化 /** -- libgit2 0.21.4