├── .gitignore ├── doc └── leave_system.sql ├── mvnw ├── mvnw.cmd ├── pom.xml └── src ├── main ├── java │ └── edu │ │ └── develop │ │ └── leave │ │ ├── LeaveApplication.java │ │ ├── SpringBootStartApplication.java │ │ ├── component │ │ ├── ReflectEngine.java │ │ ├── SpringContextHolder.java │ │ └── Swagger2.java │ │ ├── config │ │ ├── WebConfigurer.java │ │ └── intercepors │ │ │ └── LoginInterceptor.java │ │ ├── controller │ │ ├── ClassController.java │ │ ├── Hello.java │ │ ├── LeaderController.java │ │ ├── LeaveController.java │ │ ├── ManagerController.java │ │ ├── StudentController.java │ │ ├── TeacherController.java │ │ ├── TsetController.java │ │ ├── baseController │ │ │ ├── BaseController.java │ │ │ └── BaseLoginController.java │ │ ├── dto │ │ │ └── RespondsMessage.java │ │ └── vo │ │ │ └── LimitVO.java │ │ ├── dao │ │ └── mapper │ │ │ ├── ClassMapper.java │ │ │ ├── GradeMapper.java │ │ │ ├── LeaderMapper.java │ │ │ ├── LeaveMapper.java │ │ │ ├── ManagerMapper.java │ │ │ ├── RoleMapper.java │ │ │ ├── StudentMapper.java │ │ │ ├── TeacherMapper.java │ │ │ ├── TsetMapper.java │ │ │ └── base │ │ │ └── BaseMapper.java │ │ ├── model │ │ ├── ClassModel.java │ │ ├── GradeModel.java │ │ ├── Handler.java │ │ ├── LeaderModel.java │ │ ├── LeaveModel.java │ │ ├── ManagerModel.java │ │ ├── RoleModel.java │ │ ├── StudentModel.java │ │ ├── TeacherModel.java │ │ ├── Token.java │ │ └── TsetModel.java │ │ ├── service │ │ ├── ClassService.java │ │ ├── LeaderService.java │ │ ├── LeaveService.java │ │ ├── ManagerService.java │ │ ├── StudentService.java │ │ ├── TeacherService.java │ │ ├── TsetService.java │ │ └── baseService │ │ │ ├── BaseLoginService.java │ │ │ └── BaseService.java │ │ └── utils │ │ ├── ConditionStr.java │ │ ├── LogUtil.java │ │ └── SQLUtil.java ├── resources │ ├── application.properties │ └── edu │ │ └── develop │ │ └── leave │ │ └── dao │ │ └── mapper │ │ ├── ClassMapper.xml │ │ ├── GradeMapper.xml │ │ ├── LeaderMapper.xml │ │ ├── LeaveMapper.xml │ │ ├── ManagerMapper.xml │ │ ├── RoleMapper.xml │ │ ├── StudentMapper.xml │ │ ├── TeacherMapper.xml │ │ └── TsetMapper.xml └── webapp │ ├── WEB-INF │ └── web.xml │ ├── css │ ├── bootstrap.css │ ├── loginStyle.css │ ├── orderList.css │ ├── style.css │ ├── style9.css │ ├── style_common.css │ ├── supplierList.css │ └── swipebox.css │ ├── html │ ├── leaderIndex.html │ ├── leaderRestPw.html │ ├── leaveDetail.html │ ├── login.html │ ├── manager │ │ ├── leaves.html │ │ ├── login.html │ │ ├── manageLeader.html │ │ ├── manageTeacher.html │ │ ├── manager.html │ │ ├── managerLeaveDetail.html │ │ ├── managerNotice.html │ │ └── set.html │ ├── notice.html │ ├── studentIndex.html │ ├── studentRestPw.html │ ├── teacherIndex.html │ └── teacherRestPw.html │ ├── images │ ├── 1-.jpg │ ├── 1.jpg │ ├── 1.png │ ├── 10.jpg │ ├── 10.png │ ├── 11.jpg │ ├── 11.png │ ├── 12.jpg │ ├── 12.png │ ├── 13.png │ ├── 14.png │ ├── 15.png │ ├── 16.png │ ├── 17.png │ ├── 18.png │ ├── 2-.jpg │ ├── 2.jpg │ ├── 2.png │ ├── 3-.jpg │ ├── 3.jpg │ ├── 3.png │ ├── 4.jpg │ ├── 4.png │ ├── 5.jpg │ ├── 5.png │ ├── 6.jpg │ ├── 6.png │ ├── 7.jpg │ ├── 7.png │ ├── 8.jpg │ ├── 8.png │ ├── 9.jpg │ ├── 9.png │ ├── a.png │ ├── arrow.png │ ├── back.jpg │ ├── ban.jpg │ ├── bann.jpg │ ├── car.png │ ├── cc.jpg │ ├── chat.png │ ├── co.png │ ├── comments.png │ ├── date.png │ ├── dot.png │ ├── ff.jpg │ ├── icons.svg │ ├── img-sp.png │ ├── line.png │ ├── line1.png │ ├── loginBackGround.jpg │ ├── logo.png │ ├── logo001.jpg │ ├── logo1.png │ ├── male.png │ ├── menu.png │ ├── message.png │ ├── phone.png │ ├── plus.png │ ├── supplier.png │ ├── twitter.png │ ├── windows-.png │ └── windows.png │ ├── index.html │ ├── js │ ├── dateFormat.js │ ├── easing.js │ ├── jquery.mixitup.min.js │ ├── jquery.swipebox.min.js │ ├── leaderIndex.js │ ├── loginout.js │ ├── manager │ │ ├── leaves.js │ │ ├── manageLeader.js │ │ ├── manageStudent.js │ │ └── manageTeacher.js │ ├── move-top.js │ ├── responsiveslides.min.js │ ├── restPw.js │ ├── studentIndex.js │ └── teacherIndex.js │ └── resource │ ├── bootstrap-3.3.7-dist │ ├── css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ └── npm.js │ ├── bootstrap-table │ ├── bootstrap-table-zh-CN.js │ ├── bootstrap-table.css │ └── bootstrap-table.js │ └── js │ ├── bootstrap-paginator.js │ ├── jquery.min.js │ └── md5.js └── test └── java └── edu └── develop └── leave └── LeaveApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | src/main/resources/templates/ 31 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.0.4.RELEASE 9 | 10 | 11 | edu.develop 12 | leave 13 | 0.0.1-SNAPSHOT 14 | war 15 | leave 16 | Demo project for Spring Boot 17 | 18 | 19 | 1.8 20 | 21 | 22 | 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-tomcat 32 | 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-test 37 | test 38 | 39 | 40 | 41 | 42 | javax.servlet 43 | javax.servlet-api 44 | 45 | 46 | javax.servlet 47 | jstl 48 | 49 | 50 | 51 | 52 | org.apache.tomcat.embed 53 | tomcat-embed-jasper 54 | 55 | 56 | org.springframework.boot 57 | spring-boot-devtools 58 | true 59 | 60 | 61 | 62 | javax.servlet 63 | javax.servlet-api 64 | 3.1.0 65 | provided 66 | 67 | 68 | 69 | 70 | org.mybatis.spring.boot 71 | mybatis-spring-boot-starter 72 | 1.3.1 73 | 74 | 75 | 76 | 77 | mysql 78 | mysql-connector-java 79 | 5.1.34 80 | runtime 81 | 82 | 83 | 84 | 85 | org.projectlombok 86 | lombok 87 | 1.16.10 88 | 89 | 90 | 91 | cn.hutool 92 | hutool-all 93 | 4.1.19 94 | 95 | 96 | 97 | io.springfox 98 | springfox-swagger2 99 | 2.2.2 100 | 101 | 102 | io.springfox 103 | springfox-swagger-ui 104 | 2.2.2 105 | 106 | 107 | 108 | 109 | leaveSystem 110 | 111 | 112 | org.springframework.boot 113 | spring-boot-maven-plugin 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/LeaveApplication.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; 7 | import org.springframework.context.annotation.ComponentScan; 8 | import org.springframework.transaction.annotation.EnableTransactionManagement; 9 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 10 | 11 | @SpringBootApplication() 12 | @MapperScan("edu.develop.leave.dao.mapper") 13 | @ComponentScan(basePackages = { "edu.develop.leave.component" 14 | ,"edu.develop.leave.service" 15 | ,"edu.develop.leave.controller" 16 | ,"edu.develop.leave.config"}) 17 | @EnableTransactionManagement 18 | public class LeaveApplication { 19 | 20 | public static void main(String[] args) { 21 | SpringApplication.run(LeaveApplication.class, args); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/SpringBootStartApplication.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave; 2 | 3 | import org.springframework.boot.builder.SpringApplicationBuilder; 4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 5 | 6 | /** 7 | * @version 1.0 8 | * @anthor zsl on 2019/6/20 9 | * @since jdk8 10 | */ 11 | public class SpringBootStartApplication extends SpringBootServletInitializer { 12 | 13 | @Override 14 | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { 15 | // 注意这里要指向原先用main方法执行的Application启动类 16 | return builder.sources(LeaveApplication.class); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/component/ReflectEngine.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.component; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | /** 8 | * @version 1.0 9 | * @anthor on 2019/3/30 10 | * @since jdk8 11 | */ 12 | @Component 13 | public class ReflectEngine { 14 | 15 | /** 16 | * 反射执行执行dao方法 17 | * @param methodName 需要执行的dao方法名 18 | * @param clazzs 方法参数对象组类类型(为了反射时找到具体方法) 19 | * @param objects 调用方法参数组(执行方法需要的参数) 20 | * @return 返回方法执行结果 21 | * @throws Exception 抛出反射执行过程中出现的异常 22 | * */ 23 | public Object invokeMapperMethod(String methodName,String objectName,Class[] clazzs, Object... objects) throws Exception { 24 | try { 25 | // 从容器中获取bean的实例 26 | Object o = SpringContextHolder.getBean(objectName); 27 | // 根据实例获取对象的类类型 28 | Class clazz = o.getClass(); 29 | // 根据方法名和参数的类类型获取方法对象 30 | Method method = clazz.getMethod(methodName, clazzs); 31 | return method.invoke(o,objects); 32 | }catch (Exception e){ 33 | throw e; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/component/SpringContextHolder.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.component; 2 | 3 | import org.springframework.context.ApplicationContext; 4 | import org.springframework.context.ApplicationContextAware; 5 | import org.springframework.stereotype.Component; 6 | import org.springframework.stereotype.Controller; 7 | 8 | /** 9 | * Created by 11723 on 2017/5/4. 10 | */ 11 | @Component 12 | public class SpringContextHolder implements ApplicationContextAware { 13 | private static ApplicationContext applicationContext; 14 | 15 | /** 16 | * 实现ApplicationContextAware接口的context注入函数, 将其存入静态变量. 17 | */ 18 | @Override 19 | public void setApplicationContext(ApplicationContext applicationContext) { 20 | SpringContextHolder.applicationContext = applicationContext; // NOSONAR 21 | } 22 | 23 | /** 24 | * 取得存储在静态变量中的ApplicationContext. 25 | */ 26 | public static ApplicationContext getApplicationContext() { 27 | checkApplicationContext(); 28 | return applicationContext; 29 | } 30 | 31 | /** 32 | * 从静态变量ApplicationContext中取得Bean, 自动转型为所赋值对象的类型. 33 | */ 34 | @SuppressWarnings("unchecked") 35 | public static T getBean(String name) { 36 | checkApplicationContext(); 37 | return (T) applicationContext.getBean(name); 38 | } 39 | 40 | /** 41 | * 从静态变量ApplicationContext中取得Bean, 自动转型为所赋值对象的类型. 42 | */ 43 | @SuppressWarnings("unchecked") 44 | public static T getBean(Class clazz) { 45 | checkApplicationContext(); 46 | return (T) applicationContext.getBeansOfType(clazz); 47 | } 48 | 49 | /** 50 | * 清除applicationContext静态变量. 51 | */ 52 | public static void cleanApplicationContext() { 53 | applicationContext = null; 54 | } 55 | 56 | public static String[] getBeans(){ 57 | return applicationContext.getBeanNamesForAnnotation(Controller.class); 58 | } 59 | 60 | private static void checkApplicationContext() { 61 | if (applicationContext == null) { 62 | throw new IllegalStateException("applicaitonContext未注入,请在applicationContext.xml中定义SpringContextHolder"); 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/component/Swagger2.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.component; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import springfox.documentation.builders.ApiInfoBuilder; 6 | import springfox.documentation.builders.PathSelectors; 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.service.ApiInfo; 9 | import springfox.documentation.spi.DocumentationType; 10 | import springfox.documentation.spring.web.plugins.Docket; 11 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 12 | 13 | /** 14 | * @version 1.0 15 | * @anthor on 2019/4/19 16 | * @since jdk8 17 | */ 18 | @Configuration 19 | @EnableSwagger2 20 | public class Swagger2 { 21 | 22 | @Bean 23 | public Docket createRestApi() { 24 | return new Docket(DocumentationType.SWAGGER_2) 25 | .apiInfo(apiInfo()) 26 | .select() 27 | //选择controller包 28 | .apis(RequestHandlerSelectors.basePackage("edu.develop.leave.controller")) 29 | .paths(PathSelectors.any()) 30 | .build(); 31 | } 32 | 33 | private ApiInfo apiInfo() { 34 | return new ApiInfoBuilder() 35 | //自定义信息可按需求填写 36 | .title("Spring Boot中使用Swagger构建RESTful APIs") 37 | .description("测试") 38 | .contact("7788") 39 | .version("1.0") 40 | .build(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/config/WebConfigurer.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.config; 2 | 3 | import edu.develop.leave.config.intercepors.LoginInterceptor; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.boot.SpringBootConfiguration; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.stereotype.Component; 8 | import org.springframework.web.servlet.config.annotation.*; 9 | 10 | /** 11 | * @version 1.0 12 | * @anthor on 2019/5/7 13 | * @since jdk8 14 | */ 15 | 16 | //@Component 17 | public class WebConfigurer extends WebMvcConfigurerAdapter { 18 | 19 | @Autowired 20 | private LoginInterceptor loginInterceptor; 21 | 22 | // 这个方法是用来配置静态资源的,比如html,js,css,等等 23 | @Override 24 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 25 | 26 | } 27 | 28 | /** 29 | * 注册拦截器 30 | * addPathPatterns()配置拦截请求 31 | * excludePathPatterns()配置白名单,多个路径用, 32 | * 将字符串隔开 33 | * @param registry 34 | */ 35 | @Override 36 | public void addInterceptors(InterceptorRegistry registry) { 37 | registry.addInterceptor(loginInterceptor) 38 | .addPathPatterns("/**") 39 | .excludePathPatterns("/html/login.html", 40 | "/login", "/","/44551/login","/resource/**","/css/**","/js/**","/images/**","/7788" 41 | ,"/html/manager/login.html","/manager/login"); 42 | super.addInterceptors(registry); 43 | } 44 | 45 | /** 46 | * @param registry 47 | */ 48 | public void addViewControllers(ViewControllerRegistry registry){ 49 | registry.addViewController("/").setViewName("login"); 50 | registry.addViewController("/7788").setViewName("manager/login"); 51 | super.addViewControllers(registry); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/config/intercepors/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.config.intercepors; 2 | 3 | import edu.develop.leave.model.Token; 4 | import org.springframework.lang.Nullable; 5 | import org.springframework.stereotype.Component; 6 | import org.springframework.web.servlet.HandlerInterceptor; 7 | import org.springframework.web.servlet.ModelAndView; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import javax.servlet.http.HttpSession; 11 | 12 | /** 13 | * @version 1.0 14 | * @anthor on 2019/5/7 15 | * @since jdk8 16 | */ 17 | @Component 18 | public class LoginInterceptor implements HandlerInterceptor { 19 | //这个方法是在访问接口之前执行的,我们只需要在这里写验证登陆状态的业务逻辑,就可以在用户调用指定接口之前验证登陆状态了 20 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 21 | System.out.println("请求地址:"+request.getRequestURI()); 22 | //每一个项目对于登陆的实现逻辑都有所区别,我这里使用最简单的Session提取User来验证登陆。 23 | HttpSession session = request.getSession(); 24 | 25 | //这里的User是登陆时放入session的 26 | Token token = (Token) session.getAttribute("token"); 27 | 28 | //token,表示没登陆 29 | if (token == null){ 30 | //这个方法返回false表示忽略当前请求,如果一个用户调用了需要登陆才能使用的接口,如果他没有登陆这里会直接忽略掉 31 | //当然你可以利用response给用户返回一些提示信息,告诉他没登陆 32 | response.sendRedirect("/"); 33 | return false; 34 | }else { 35 | return true; //如果session里有user,表示该用户已经登陆,放行,用户即可继续调用自己需要的接口 36 | } 37 | } 38 | 39 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, @Nullable ModelAndView modelAndView) throws Exception { 40 | } 41 | 42 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, @Nullable Exception ex) throws Exception { 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/ClassController.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller; 2 | 3 | import edu.develop.leave.controller.dto.RespondsMessage; 4 | import edu.develop.leave.controller.vo.LimitVO; 5 | import edu.develop.leave.model.ClassModel; 6 | import edu.develop.leave.model.LeaveModel; 7 | import edu.develop.leave.service.ClassService; 8 | import edu.develop.leave.service.LeaveService; 9 | import edu.develop.leave.utils.ConditionStr; 10 | import edu.develop.leave.utils.LogUtil; 11 | import edu.develop.leave.utils.SQLUtil; 12 | import io.swagger.annotations.Api; 13 | import lombok.extern.slf4j.Slf4j; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.web.bind.annotation.*; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * @version 1.0 21 | * @anthor on 2019/5/9 22 | * @since jdk8 23 | */ 24 | @RestController 25 | @RequestMapping("class") 26 | @Slf4j 27 | @Api("班级接口") 28 | public class ClassController { 29 | 30 | @Autowired 31 | ClassService classService; 32 | 33 | /** 34 | * 获取数据列表 35 | * 老师查询数据接口 36 | * 37 | * @return 38 | */ 39 | @RequestMapping(value = "findAllClass", method = RequestMethod.GET) 40 | @ResponseBody 41 | public RespondsMessage findAllClass() { 42 | try { 43 | List list = classService.findAllClass(); 44 | return RespondsMessage.success(LogUtil.logInfo(log, "获取数据列表执行成功"), list); 45 | } catch (Exception e) { 46 | return RespondsMessage.failure(LogUtil.logInfo(log, "获取数据列表执行失败")); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/Hello.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller; 2 | 3 | import io.swagger.annotations.Api; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | * @version 1.0 9 | * @anthor on 2019/5/8 10 | * @since jdk8 11 | */ 12 | @RestController 13 | @Api("测试接口") 14 | public class Hello { 15 | 16 | 17 | @RequestMapping("/hello") 18 | public String sqy(){ 19 | return "hello"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/LeaderController.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller; 2 | 3 | import edu.develop.leave.controller.baseController.BaseController; 4 | import edu.develop.leave.model.LeaderModel; 5 | import io.swagger.annotations.Api; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | /** 10 | * @version 1.0 11 | * @anthor on 2019/5/15 12 | * @since jdk8 13 | * 14 | * 领导接口 15 | */ 16 | @RestController 17 | @RequestMapping("leader") 18 | @Api(value = "领导接口") 19 | public class LeaderController extends BaseController { 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/LeaveController.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller; 2 | 3 | import edu.develop.leave.controller.baseController.BaseController; 4 | import edu.develop.leave.controller.dto.RespondsMessage; 5 | import edu.develop.leave.controller.vo.LimitVO; 6 | import edu.develop.leave.model.LeaveModel; 7 | import edu.develop.leave.service.LeaveService; 8 | import edu.develop.leave.utils.ConditionStr; 9 | import edu.develop.leave.utils.LogUtil; 10 | import edu.develop.leave.utils.SQLUtil; 11 | import io.swagger.annotations.Api; 12 | import lombok.extern.slf4j.Slf4j; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.web.bind.annotation.*; 15 | 16 | import java.util.List; 17 | 18 | /** 19 | * @version 1.0 20 | * @anthor on 2019/5/8 21 | * @since jdk8 22 | */ 23 | @RestController 24 | @RequestMapping("leave") 25 | @Api(value = "请假条接口",description = "请假条基本接口") 26 | @Slf4j 27 | public class LeaveController extends BaseController { 28 | 29 | @Autowired 30 | LeaveService leaveService; 31 | 32 | /** 33 | * 获取数据列表 34 | * 老师查询数据接口 35 | * 36 | * @return 37 | */ 38 | @RequestMapping(value = "teacherSlist", method = RequestMethod.GET) 39 | @ResponseBody 40 | public RespondsMessage teacherSlist(@ModelAttribute LeaveModel m, @ModelAttribute LimitVO limitVO,Integer teacherId) { 41 | Class clazz = m.getClass(); 42 | // 获取被调用对象的名称 43 | getInvokeObjName(); 44 | Object[] values = getParameters(clazz, m); 45 | String[] names = getParameterNames(clazz, m); 46 | 47 | List list = null; 48 | Long total; 49 | String sql = SQLUtil.fillCondition(ConditionStr.sqlTemplate(names), values); 50 | try { 51 | // 条件查询 52 | list = leaveService.teacherSlist( 53 | SQLUtil.getOffset(limitVO.getCurPage(), limitVO.getLimit()), 54 | limitVO.getLimit(), 55 | teacherId, 56 | sql); 57 | total = leaveService.teacherGetAmount(sql); 58 | return RespondsMessage.success(LogUtil.logInfo(log, "获取数据列表执行成功"), list,total); 59 | } catch (Exception e) { 60 | return RespondsMessage.failure(LogUtil.logInfo(log, "获取数据列表执行失败")); 61 | } 62 | } 63 | 64 | /** 65 | * 获取数据列表 66 | * 系领导查询数据接口 67 | * 68 | * @return 69 | */ 70 | @RequestMapping(value = "leaderSlist", method = RequestMethod.GET) 71 | @ResponseBody 72 | public RespondsMessage leaderSlist(@ModelAttribute LeaveModel m, @ModelAttribute LimitVO limitVO) { 73 | Class clazz = m.getClass(); 74 | // 获取被调用对象的名称 75 | getInvokeObjName(); 76 | Object[] values = getParameters(clazz, m); 77 | String[] names = getParameterNames(clazz, m); 78 | 79 | List list = null; 80 | Long total; 81 | String sql = SQLUtil.fillCondition(ConditionStr.sqlTemplate(names), values); 82 | try { 83 | // 条件查询 84 | list = leaveService.leaderSlist( 85 | SQLUtil.getOffset(limitVO.getCurPage(), limitVO.getLimit()), 86 | limitVO.getLimit(), 87 | sql); 88 | total = leaveService.leaderGetAmount(sql); 89 | return RespondsMessage.success(LogUtil.logInfo(log, "获取数据列表执行成功"), list,total); 90 | } catch (Exception e) { 91 | return RespondsMessage.failure(LogUtil.logInfo(log, "获取数据列表执行失败")); 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/ManagerController.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller; 2 | 3 | import edu.develop.leave.controller.baseController.BaseController; 4 | import edu.develop.leave.controller.dto.RespondsMessage; 5 | import edu.develop.leave.model.ManagerModel; 6 | import edu.develop.leave.model.Token; 7 | import edu.develop.leave.service.ManagerService; 8 | import io.swagger.annotations.Api; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RequestMethod; 12 | import org.springframework.web.bind.annotation.RequestParam; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import javax.servlet.http.HttpSession; 16 | 17 | /** 18 | * @version 1.0 19 | * @anthor on 2019/5/15 20 | * @since jdk8 21 | * 22 | * 管理员接口 23 | */ 24 | @RestController 25 | @RequestMapping("manager") 26 | @Api("管理员接口") 27 | public class ManagerController extends BaseController { 28 | 29 | @Autowired 30 | ManagerService managerService; 31 | 32 | 33 | /** 34 | * 管理员登录 35 | * @param id 36 | * @param password 37 | * @return 38 | */ 39 | @RequestMapping(value = "login",method = RequestMethod.POST) 40 | public RespondsMessage login(@RequestParam("id") Integer id, @RequestParam("password") String password, HttpSession session) { 41 | Integer status = managerService.login(id,password); 42 | if(status == 0){ 43 | return RespondsMessage.failure(null,status); 44 | }else { 45 | session.setAttribute("token",new Token()); 46 | return RespondsMessage.success(null,status); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/StudentController.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller; 2 | 3 | import edu.develop.leave.controller.dto.RespondsMessage; 4 | import edu.develop.leave.controller.vo.LimitVO; 5 | import edu.develop.leave.model.StudentModel; 6 | import edu.develop.leave.controller.baseController.BaseController; 7 | import edu.develop.leave.service.StudentService; 8 | import edu.develop.leave.utils.ConditionStr; 9 | import edu.develop.leave.utils.LogUtil; 10 | import edu.develop.leave.utils.SQLUtil; 11 | import io.swagger.annotations.Api; 12 | import io.swagger.annotations.ApiParam; 13 | import lombok.extern.slf4j.Slf4j; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.ui.Model; 16 | import org.springframework.web.bind.annotation.*; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * @version 1.0 22 | * @anthor on 2019/5/8 23 | * @since jdk8 24 | */ 25 | @RestController 26 | @RequestMapping("/student") 27 | @Slf4j 28 | @Api(value = "学生接口",description = "学生基本接口") 29 | public class StudentController extends BaseController { 30 | 31 | 32 | @Autowired 33 | StudentService studentService; 34 | 35 | @RequestMapping(value = "stuDeletes", method = RequestMethod.DELETE) 36 | public RespondsMessage stuDeletes(@ApiParam("用户id数组") @RequestParam Long[] ids) { 37 | getInvokeObjName(); 38 | Integer status; 39 | try { 40 | status = studentService.stuDeletes(ids); 41 | return RespondsMessage.success(LogUtil.logInfo(log, "批量删除数据执行成功"), status); 42 | } catch (Exception e) { 43 | return RespondsMessage.failure(LogUtil.logInfo(log, "用户{}批量删除数据据执行失败:{}", e.getMessage())); 44 | } 45 | } 46 | 47 | /** 48 | *获取数据列表 49 | * @return 50 | */ 51 | // @RequestMapping(value = "listByConDition", method = RequestMethod.GET) 52 | // @ResponseBody 53 | // public RespondsMessage listByConDition(@ModelAttribute StudentModel m, @ModelAttribute LimitVO limitVO) { 54 | // System.out.println("controller......"); 55 | // System.out.println(m.toString()); 56 | // System.out.println(limitVO.toString()); 57 | // Class clazz = m.getClass(); 58 | // // 获取被调用对象的名称 59 | // getInvokeObjName(); 60 | // Object[] values = getParameters(clazz, m); 61 | // String[] names = studentService.getParameterNames(clazz, m); 62 | // 63 | // List list = null; 64 | // try { 65 | // // 查询数据列表 66 | // list = (List) reflectEngine.invokeMapperMethod( 67 | // "list", 68 | // invokeObjName, 69 | // new Class[]{Integer.class, Integer.class, String.class}, 70 | // limitVO.getCurPage(), 71 | // limitVO.getLimit(), 72 | // SQLUtil.fillCondition(ConditionStr.sqlTemplate(names), values)); 73 | // 74 | // // 查询数据条数 75 | // Long amount = (Long)reflectEngine.invokeMapperMethod( 76 | // "queryAmount", 77 | // invokeObjName, 78 | // new Class[]{String.class}, 79 | // SQLUtil.fillCondition(ConditionStr.sqlTemplate(names), values)); 80 | // 81 | // return RespondsMessage.success(LogUtil.logInfo(log, "获取数据列表执行成功"), list,amount); 82 | // } catch (Exception e) { 83 | // return RespondsMessage.failure(LogUtil.logInfo(log, "获取数据列表执行失败")); 84 | // } 85 | // } 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/TeacherController.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller; 2 | 3 | import edu.develop.leave.controller.baseController.BaseController; 4 | import edu.develop.leave.model.TeacherModel; 5 | import io.swagger.annotations.Api; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | /** 10 | * @version 1.0 11 | * @anthor on 2019/5/15 12 | * @since jdk8 13 | * 14 | * 老师接口 15 | */ 16 | @RestController 17 | @RequestMapping("teacher") 18 | @Api(value = "教师接口") 19 | public class TeacherController extends BaseController { 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/TsetController.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller; 2 | 3 | import edu.develop.leave.controller.baseController.BaseController; 4 | import edu.develop.leave.controller.dto.RespondsMessage; 5 | import edu.develop.leave.controller.vo.LimitVO; 6 | import edu.develop.leave.model.TsetModel; 7 | import edu.develop.leave.service.TsetService; 8 | import edu.develop.leave.utils.ConditionStr; 9 | import edu.develop.leave.utils.LogUtil; 10 | import edu.develop.leave.utils.SQLUtil; 11 | import io.swagger.annotations.Api; 12 | import lombok.extern.slf4j.Slf4j; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.ui.Model; 15 | import org.springframework.web.bind.annotation.*; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * @version 1.0 21 | * @anthor on 2019/5/15 22 | * @since jdk8 23 | * 24 | * 设置接口 25 | */ 26 | @RestController 27 | @RequestMapping("tset") 28 | @Api(value = "设置接口") 29 | @Slf4j 30 | public class TsetController extends BaseController { 31 | 32 | @Autowired 33 | TsetService tsetService; 34 | 35 | /** 36 | * 获取数据列表 37 | * 38 | * @return 39 | */ 40 | @RequestMapping(value = "list", method = RequestMethod.GET) 41 | @Override 42 | public RespondsMessage list(@ModelAttribute TsetModel m, @ModelAttribute LimitVO limitVO) { 43 | System.out.println("controller......"); 44 | System.out.println(m.toString()); 45 | System.out.println(limitVO.toString()); 46 | Class clazz = m.getClass(); 47 | // 获取被调用对象的名称 48 | getInvokeObjName(); 49 | Object[] values = getParameters(clazz, m); 50 | String[] names = getParameterNames(clazz, m); 51 | 52 | List list = null; 53 | try { 54 | // 查询数据列表 55 | list = (List) reflectEngine.invokeMapperMethod( 56 | "list", 57 | invokeObjName, 58 | new Class[]{Integer.class, Integer.class, String.class}, 59 | limitVO.getCurPage(), 60 | limitVO.getLimit(), 61 | SQLUtil.fillCondition(ConditionStr.sqlTemplate(names), values)); 62 | return RespondsMessage.success(LogUtil.logInfo(log, "获取数据列表执行成功"), list); 63 | } catch (Exception e) { 64 | e.printStackTrace(); 65 | return RespondsMessage.failure(LogUtil.logInfo(log, "获取数据列表执行失败")); 66 | } 67 | } 68 | 69 | /** 70 | * 更新设置 71 | * 72 | * @param maxDays 73 | * @param teacherDays 74 | * @return 75 | */ 76 | @RequestMapping(value = "update/set", method = RequestMethod.PUT) 77 | public RespondsMessage update(@RequestParam("maxDays")Integer maxDays,@RequestParam("teacherDays")Integer teacherDays) { 78 | 79 | getInvokeObjName(); 80 | Integer status = 0; 81 | try { 82 | status = tsetService.updateSet(maxDays,teacherDays); 83 | System.out.println("-----------------"+status); 84 | if(status == 1){ 85 | return RespondsMessage.success(LogUtil.logInfo(log, "设置成功"), status); 86 | } 87 | return RespondsMessage.failure(LogUtil.logInfo(log, "设置失败"), status); 88 | } catch (Exception e) { 89 | return RespondsMessage.failure(LogUtil.logInfo(log, "用户{}更新数据执行失败:{}", e.getMessage()), status); 90 | } 91 | } 92 | 93 | @RequestMapping(value = "notices",method = RequestMethod.GET) 94 | public RespondsMessage queryNotice(){ 95 | return RespondsMessage.success("",tsetService.queryNotice()); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/baseController/BaseLoginController.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller.baseController; 2 | 3 | import edu.develop.leave.model.Token; 4 | import edu.develop.leave.service.baseService.BaseLoginService; 5 | import io.swagger.annotations.Api; 6 | import io.swagger.annotations.ApiOperation; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestMethod; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | import javax.servlet.http.HttpSession; 13 | import java.util.HashMap; 14 | import java.util.Map; 15 | 16 | /** 17 | * @version 1.0 18 | * @anthor on 2019/5/7 19 | * @since jdk8 20 | * 21 | * 用户登录接口 22 | */ 23 | @Api(value = "登录接口") 24 | @RestController 25 | @RequestMapping("44551") 26 | public class BaseLoginController { 27 | 28 | @Autowired 29 | BaseLoginService baseLoginService; 30 | 31 | @ApiOperation(value = "登录") 32 | @RequestMapping(value = "/login",method = {RequestMethod.POST}) 33 | public Map login(@RequestParam("no") Long no, 34 | @RequestParam("password") String password, 35 | @RequestParam("roleType") Integer roleType, 36 | HttpSession session){ 37 | Map resultMap = new HashMap<>(); 38 | Token token = baseLoginService.login(no,password,roleType); 39 | if(token == null){ 40 | resultMap.put("code",-1); 41 | resultMap.put("msg","账号或密码错误"); 42 | resultMap.put("token",null); 43 | return resultMap; 44 | } 45 | resultMap.put("code",1); 46 | resultMap.put("msg","登录成功"); 47 | resultMap.put("token",token); 48 | session.setAttribute("token",token); 49 | return resultMap; 50 | 51 | } 52 | 53 | @RequestMapping(value = "/resetpassw",method = {RequestMethod.PUT}) 54 | public Map resetPassword(@RequestParam("password") String password, 55 | @RequestParam("id") Long id, 56 | @RequestParam("role") Integer role){ 57 | 58 | Map resultMap = new HashMap<>(); 59 | 60 | Integer status = baseLoginService.resetPassword(password,id,role); 61 | if(status == 0 || status == null){ 62 | resultMap.put("code",-1); 63 | } 64 | resultMap.put("code",1); 65 | 66 | return resultMap; 67 | } 68 | 69 | /** 70 | * 退出登录 71 | * @param session 72 | * @return 73 | */ 74 | @RequestMapping(value = "/loginout",method = {RequestMethod.GET}) 75 | public Map loginout(HttpSession session){ 76 | Map resultMap = new HashMap<>(); 77 | session.setAttribute("token",null); 78 | resultMap.put("status",1); 79 | return resultMap; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/dto/RespondsMessage.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller.dto; 2 | 3 | import com.fasterxml.jackson.annotation.JsonView; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | import org.springframework.http.HttpStatus; 8 | 9 | /** 10 | * @author zhangpei 11 | * @version 1.0 12 | * @description 响应客户端的信息 13 | * @date 2019/4/20 14 | */ 15 | @Data 16 | @Builder 17 | @NoArgsConstructor 18 | public class RespondsMessage { 19 | public static final Integer SUCCESS_CODE = 200; 20 | 21 | public static final Integer CLIENT_ERROR = 400; 22 | public static final Integer UNAUTHORIZED = HttpStatus.UNAUTHORIZED.value(); 23 | public static final Integer SERVER_ERROR = 500; 24 | 25 | private D data; 26 | 27 | private D amount; 28 | 29 | /** 30 | * 基础展示视图 31 | */ 32 | public interface BaseView { 33 | } 34 | 35 | @JsonView(value = BaseView.class) 36 | private Integer code; 37 | 38 | @JsonView(value = BaseView.class) 39 | private String msg; 40 | 41 | public RespondsMessage(Integer code, String msg) { 42 | this.code = code; 43 | this.msg = msg; 44 | } 45 | 46 | public RespondsMessage(D data, Integer code, String msg) { 47 | this.data = data; 48 | this.code = code; 49 | this.msg = msg; 50 | } 51 | 52 | public RespondsMessage(D data, D amount, Integer code, String msg) { 53 | this.data = data; 54 | this.amount = amount; 55 | this.code = code; 56 | this.msg = msg; 57 | } 58 | 59 | public static RespondsMessage success(String msg) { 60 | return new RespondsMessage(SUCCESS_CODE, msg); 61 | } 62 | 63 | public static RespondsMessage success(String msg, D data,D amount) { 64 | return new RespondsMessage<>(data,amount, SUCCESS_CODE, msg); 65 | } 66 | 67 | public static RespondsMessage success(String msg, D data) { 68 | return new RespondsMessage<>(data, SUCCESS_CODE, msg); 69 | } 70 | 71 | public static RespondsMessage failure(Integer code, String msg) { 72 | return new RespondsMessage(code, msg); 73 | } 74 | 75 | public static RespondsMessage failure(String msg) { 76 | return new RespondsMessage(CLIENT_ERROR, msg); 77 | } 78 | 79 | public static RespondsMessage failurePermission(String msg) { 80 | return new RespondsMessage(UNAUTHORIZED, msg); 81 | } 82 | 83 | public static RespondsMessage failure(String msg, D data) { 84 | return new RespondsMessage<>(data, CLIENT_ERROR, msg); 85 | } 86 | 87 | public static RespondsMessage clientError(String msg) { 88 | return failure(CLIENT_ERROR, msg); 89 | } 90 | 91 | public static RespondsMessage serverError(String msg) { 92 | return failure(SERVER_ERROR, msg); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/controller/vo/LimitVO.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.controller.vo; 2 | 3 | /** 4 | * 数据展示控制 5 | * 6 | * @anthor zsl 7 | * @date 2018/08/19 8 | */ 9 | public class LimitVO { 10 | 11 | /** 12 | * 前端页面的当前页 13 | */ 14 | private Integer curPage; 15 | 16 | /** 17 | * 前端每页显示的数据条数 18 | */ 19 | private Integer limit; 20 | 21 | public Integer getCurPage() { 22 | return curPage; 23 | } 24 | 25 | public Integer getLimit() { 26 | return limit; 27 | } 28 | 29 | public void setCurPage(Integer curPage) { 30 | this.curPage = curPage; 31 | } 32 | 33 | public void setLimit(Integer limit) { 34 | this.limit = limit; 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return "LimitVO{" + 40 | "curPage=" + curPage + 41 | ", limit=" + limit + 42 | '}'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/ClassMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | import edu.develop.leave.dao.mapper.base.BaseMapper; 4 | import edu.develop.leave.model.ClassModel; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import java.util.List; 7 | 8 | /** 9 | * 班级接口 10 | */ 11 | @Mapper 12 | public interface ClassMapper extends BaseMapper { 13 | 14 | public List findAllClass(); 15 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/GradeMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | import edu.develop.leave.dao.mapper.base.BaseMapper; 4 | import edu.develop.leave.model.GradeModel; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * 年级接口 9 | */ 10 | @Mapper 11 | public interface GradeMapper extends BaseMapper { 12 | 13 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/LeaderMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | import edu.develop.leave.dao.mapper.base.BaseMapper; 4 | import edu.develop.leave.model.LeaderModel; 5 | import edu.develop.leave.model.Token; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | /** 10 | * 系领导接口 11 | */ 12 | @Mapper 13 | public interface LeaderMapper extends BaseMapper { 14 | /** 15 | * 系领导登录 16 | * @param no 职工号 17 | * @param password 密码 18 | * @return 19 | */ 20 | Token login(@Param("no") Integer no, @Param("password") String password); 21 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/LeaveMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | 4 | import edu.develop.leave.dao.mapper.base.BaseMapper; 5 | import edu.develop.leave.model.LeaveModel; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.Param; 8 | import java.util.List; 9 | 10 | /** 11 | * 请假条接口 12 | */ 13 | @Mapper 14 | public interface LeaveMapper extends BaseMapper { 15 | 16 | /** 17 | * 老师查询请假条 18 | * @return 19 | */ 20 | List teacherSlist(@Param("offset") Integer offset, 21 | @Param("limit") Integer limit, 22 | @Param("teacherId") Integer teacherId, 23 | @Param("conditions") String conditions, 24 | @Param("endIndex") Integer endIndex); 25 | 26 | /** 27 | * 系领导查询请假条 28 | * @return 29 | */ 30 | List leaderSlist(@Param("offset") Integer offset, 31 | @Param("limit") Integer limit, 32 | @Param("conditions") String conditions, 33 | @Param("startIndex") Integer startIndex, 34 | @Param("endIndex") Integer endIndex); 35 | 36 | /** 37 | * 老师查询数据条数 38 | * @param sql 39 | * @return 40 | */ 41 | Long teacherGetAmount(@Param("sql") String sql, 42 | @Param("endIndex") Integer endIndex); 43 | 44 | /** 45 | * 领导查询数据条数 46 | * @param sql 47 | * @return 48 | */ 49 | Long leaderGetAmount(@Param("sql") String sql, 50 | @Param("startIndex") Integer startIndex, 51 | @Param("endIndex") Integer endIndex); 52 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/ManagerMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | 4 | import edu.develop.leave.dao.mapper.base.BaseMapper; 5 | import edu.develop.leave.model.ManagerModel; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | /** 9 | * 管理员接口 10 | */ 11 | public interface ManagerMapper extends BaseMapper { 12 | 13 | /** 14 | * 管理员登录 15 | * @param id 16 | * @param password 17 | * @return 18 | */ 19 | Integer login(@Param("id") Integer id,@Param("password") String password); 20 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | import edu.develop.leave.dao.mapper.base.BaseMapper; 4 | import edu.develop.leave.model.RoleModel; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * 角色接口 9 | */ 10 | @Mapper 11 | public interface RoleMapper extends BaseMapper { 12 | 13 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/StudentMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | import edu.develop.leave.dao.mapper.base.BaseMapper; 4 | import edu.develop.leave.model.StudentModel; 5 | import edu.develop.leave.model.Token; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | /** 10 | * 学生接口 11 | */ 12 | @Mapper 13 | public interface StudentMapper extends BaseMapper { 14 | 15 | /** 16 | * 学生登录接口 17 | * @param no 学号 18 | * @param password 密码 19 | * @return 20 | */ 21 | Token login(@Param("no") Long no,@Param("password") String password); 22 | 23 | /** 24 | *多相删除 25 | * @param ids 26 | * @return 27 | */ 28 | int stuDeletes(@Param("ids") Long[] ids); 29 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/TeacherMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | import edu.develop.leave.dao.mapper.base.BaseMapper; 4 | import edu.develop.leave.model.TeacherModel; 5 | import edu.develop.leave.model.Token; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | /** 10 | * 教师接口 11 | */ 12 | @Mapper 13 | public interface TeacherMapper extends BaseMapper { 14 | /** 15 | * 教师登录 16 | * @param no 职工号 17 | * @param password 密码 18 | * @return 19 | */ 20 | Token login(@Param("no") Integer no, @Param("password") String password); 21 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/TsetMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper; 2 | 3 | 4 | import edu.develop.leave.dao.mapper.base.BaseMapper; 5 | import edu.develop.leave.model.TsetModel; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * 设置接口 12 | */ 13 | public interface TsetMapper extends BaseMapper { 14 | 15 | /** 16 | * 更新设置 17 | * @param totalDays 18 | * @param teacherDays 19 | * @return 20 | */ 21 | Integer updateSet(@Param("totalDays") Integer totalDays,@Param("teacherDays") Integer teacherDays); 22 | 23 | /** 24 | * 查询最近五条公告 25 | * 26 | * @return 27 | */ 28 | List queryNotice(); 29 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/dao/mapper/base/BaseMapper.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.dao.mapper.base; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | *mapper的基本方法 9 | * 10 | * @anthor zsl 11 | * @date 2018/08/19 12 | * 13 | */ 14 | public interface BaseMapper { 15 | /** 16 | * 根据id删除数据 17 | * 18 | * @param id 19 | * @return 20 | */ 21 | int deleteByPrimaryKey(@Param("id") Integer id); 22 | 23 | /** 24 | * 添加数据 25 | * 26 | * @param e 27 | * @return 28 | */ 29 | int insertSelective(E e); 30 | 31 | /** 32 | * 根据id更新整条数据 33 | * 34 | * @param e 35 | * @return 36 | */ 37 | int updateByPrimaryKey(E e); 38 | 39 | /** 40 | * 根据id更新对应的字段 41 | * 42 | * @param e 43 | * @param 44 | * @return 45 | */ 46 | int updateByPrimaryKeySelective(E e); 47 | 48 | 49 | 50 | /** 51 | * 根据条件查询数据 52 | * 53 | * @param offset 开始查询的数据下标 54 | * @param limit 读出的数据条数 55 | * @param conditions 查询的条件 56 | * @return 57 | */ 58 | List queryByCondition(@Param("offset") Integer offset, @Param("limit") Integer limit, @Param("conditions") String conditions); 59 | 60 | /** 61 | * 根据id查询数据 62 | * 63 | * @param id 64 | * @return 65 | */ 66 | E selectByPrimaryKey(@Param("id") Integer id); 67 | 68 | 69 | /** 70 | * 根据条件查询数据条数 71 | * 72 | * @param conditions 73 | * @return 74 | */ 75 | Long queryAmount(@Param("conditions") String conditions); 76 | 77 | /** 78 | * 批量删除数据 79 | * @param ids 80 | * @return 81 | */ 82 | Integer deletes(@Param("ids") Integer[] ids); 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/ClassModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class ClassModel implements Serializable { 6 | private Integer classId = null; 7 | 8 | private Integer teacherId = null; 9 | 10 | private Integer gradeId = null; 11 | 12 | private String className = null; 13 | 14 | private static final long serialVersionUID = 1L; 15 | 16 | public Integer getClassId() { 17 | return classId; 18 | } 19 | 20 | public void setClassId(Integer classId) { 21 | this.classId = classId; 22 | } 23 | 24 | public Integer getTeacherId() { 25 | return teacherId; 26 | } 27 | 28 | public void setTeacherId(Integer teacherId) { 29 | this.teacherId = teacherId; 30 | } 31 | 32 | public Integer getGradeId() { 33 | return gradeId; 34 | } 35 | 36 | public void setGradeId(Integer gradeId) { 37 | this.gradeId = gradeId; 38 | } 39 | 40 | public String getClassName() { 41 | return className; 42 | } 43 | 44 | public void setClassName(String className) { 45 | this.className = className; 46 | } 47 | 48 | @Override 49 | public String toString() { 50 | return "ClassModel{" + 51 | "classId=" + classId + 52 | ", teacherId=" + teacherId + 53 | ", gradeId=" + gradeId + 54 | ", className='" + className + '\'' + 55 | '}'; 56 | } 57 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/GradeModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class GradeModel implements Serializable { 6 | private Integer gradeId = null; 7 | 8 | private Integer leaderId = null; 9 | 10 | private String gradeName; 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | public Integer getGradeId() { 15 | return gradeId; 16 | } 17 | 18 | public void setGradeId(Integer gradeId) { 19 | this.gradeId = gradeId; 20 | } 21 | 22 | public Integer getLeaderId() { 23 | return leaderId; 24 | } 25 | 26 | public void setLeaderId(Integer leaderId) { 27 | this.leaderId = leaderId; 28 | } 29 | 30 | public String getGradeName() { 31 | return gradeName; 32 | } 33 | 34 | public void setGradeName(String gradeName) { 35 | this.gradeName = gradeName; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/Handler.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @version 1.0 7 | * @anthor on 2019/5/8 8 | * @since jdk8 9 | * 处理人 10 | */ 11 | 12 | @Data 13 | public class Handler { 14 | private String name; 15 | 16 | private String roleName; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/LeaderModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class LeaderModel implements Serializable { 6 | private Integer leaderId = null; 7 | 8 | private Integer roleId = null; 9 | 10 | private String leaderName; 11 | 12 | private String leaderPassword; 13 | 14 | private static final long serialVersionUID = 1L; 15 | 16 | public Integer getLeaderId() { 17 | return leaderId; 18 | } 19 | 20 | public void setLeaderId(Integer leaderId) { 21 | this.leaderId = leaderId; 22 | } 23 | 24 | public Integer getRoleId() { 25 | return roleId; 26 | } 27 | 28 | public void setRoleId(Integer roleId) { 29 | this.roleId = roleId; 30 | } 31 | 32 | public String getLeaderName() { 33 | return leaderName; 34 | } 35 | 36 | public void setLeaderName(String leaderName) { 37 | this.leaderName = leaderName; 38 | } 39 | 40 | public String getLeaderPassword() { 41 | return leaderPassword; 42 | } 43 | 44 | public void setLeaderPassword(String leaderPassword) { 45 | this.leaderPassword = leaderPassword; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/LeaveModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | import java.util.Date; 7 | 8 | @Data 9 | public class LeaveModel implements Serializable { 10 | 11 | private Integer leaveId = null; 12 | 13 | private Long studentId = null; 14 | 15 | private String cause; 16 | 17 | private String startTime; 18 | 19 | private String endTime; 20 | 21 | private Integer status; 22 | 23 | private Integer totalDay; 24 | 25 | private String handlerName; 26 | 27 | private String handlerRole; 28 | 29 | private String handlerTime; 30 | 31 | private StudentModel student; 32 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/ManagerModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class ManagerModel implements Serializable { 6 | private Integer id; 7 | 8 | private String password; 9 | 10 | private String name; 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | public Integer getId() { 15 | return id; 16 | } 17 | 18 | public void setId(Integer id) { 19 | this.id = id; 20 | } 21 | 22 | public String getPassword() { 23 | return password; 24 | } 25 | 26 | public void setPassword(String password) { 27 | this.password = password; 28 | } 29 | 30 | public String getName() { 31 | return name; 32 | } 33 | 34 | public void setName(String name) { 35 | this.name = name; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/RoleModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class RoleModel implements Serializable { 6 | private Integer roleId =null; 7 | 8 | private Integer leaderId = null; 9 | 10 | private Long studentId = null; 11 | 12 | private Integer teacherId = null; 13 | 14 | private String roleName; 15 | 16 | private String msg; 17 | 18 | private static final long serialVersionUID = 1L; 19 | 20 | public Integer getRoleId() { 21 | return roleId; 22 | } 23 | 24 | public void setRoleId(Integer roleId) { 25 | this.roleId = roleId; 26 | } 27 | 28 | public Integer getLeaderId() { 29 | return leaderId; 30 | } 31 | 32 | public void setLeaderId(Integer leaderId) { 33 | this.leaderId = leaderId; 34 | } 35 | 36 | public Long getStudentId() { 37 | return studentId; 38 | } 39 | 40 | public void setStudentId(Long studentId) { 41 | this.studentId = studentId; 42 | } 43 | 44 | public Integer getTeacherId() { 45 | return teacherId; 46 | } 47 | 48 | public void setTeacherId(Integer teacherId) { 49 | this.teacherId = teacherId; 50 | } 51 | 52 | public String getRoleName() { 53 | return roleName; 54 | } 55 | 56 | public void setRoleName(String roleName) { 57 | this.roleName = roleName; 58 | } 59 | 60 | public String getMsg() { 61 | return msg; 62 | } 63 | 64 | public void setMsg(String msg) { 65 | this.msg = msg; 66 | } 67 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/StudentModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import lombok.Data; 4 | import java.io.Serializable; 5 | 6 | @Data 7 | public class StudentModel implements Serializable { 8 | private Long studentId = null; 9 | 10 | private Integer roleId = null; 11 | 12 | private Integer classId = null; 13 | 14 | private String studentName = null; 15 | 16 | private String studentPassword = null; 17 | 18 | private ClassModel classModel; 19 | 20 | private static final long serialVersionUID = 1L; 21 | 22 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/TeacherModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import io.swagger.models.auth.In; 4 | import lombok.Data; 5 | import java.io.Serializable; 6 | 7 | @Data 8 | public class TeacherModel implements Serializable { 9 | 10 | /** 11 | * 老师的工作号 12 | */ 13 | private Integer teacherId = null; 14 | 15 | /** 16 | * 班级id 17 | */ 18 | private Integer classId = null; 19 | 20 | /** 21 | * 班级 22 | */ 23 | private ClassModel clazz = null; 24 | 25 | /** 26 | * 角色id 27 | */ 28 | private Integer roleId = null; 29 | 30 | 31 | /** 32 | * 老师名称 33 | */ 34 | private String teacherName; 35 | 36 | /** 37 | * 老师登录密码 38 | */ 39 | private String teacherPassword; 40 | 41 | public TeacherModel() { 42 | } 43 | 44 | private static final long serialVersionUID = 1L; 45 | 46 | public TeacherModel(Integer classId, Integer roleId, String teacherName, String teacherPassword) { 47 | this.classId = classId; 48 | this.roleId = roleId; 49 | this.teacherName = teacherName; 50 | this.teacherPassword = teacherPassword; 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/Token.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @version 1.0 7 | * @anthor on 2019/5/7 8 | * @since jdk8 9 | */ 10 | @Data 11 | public class Token { 12 | 13 | // 学号或者职工号 14 | private Long no; 15 | 16 | // 名字 17 | private String name; 18 | 19 | // 角色名称 20 | private String roleName; 21 | 22 | // 角色id 23 | private Integer roleId; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/model/TsetModel.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class TsetModel implements Serializable { 6 | private Integer id; 7 | 8 | private Integer type; 9 | 10 | private String content; 11 | 12 | /** 13 | * 数据更新或者插入时间 14 | */ 15 | private String updateTime; 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | public Integer getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Integer id) { 24 | this.id = id; 25 | } 26 | 27 | public Integer getType() { 28 | return type; 29 | } 30 | 31 | public void setType(Integer type) { 32 | this.type = type; 33 | } 34 | 35 | public String getContent() { 36 | return content; 37 | } 38 | 39 | public void setContent(String content) { 40 | this.content = content; 41 | } 42 | 43 | public String getUpdateTime() { 44 | return updateTime; 45 | } 46 | 47 | public void setUpdateTime(String updateTime) { 48 | this.updateTime = updateTime; 49 | } 50 | } -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/ClassService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service; 2 | 3 | import edu.develop.leave.dao.mapper.ClassMapper; 4 | import edu.develop.leave.model.ClassModel; 5 | import edu.develop.leave.service.baseService.BaseService; 6 | import org.springframework.stereotype.Service; 7 | 8 | import javax.annotation.Resource; 9 | import java.util.List; 10 | 11 | /** 12 | * @version 1.0 13 | * @anthor on 2019/5/9 14 | * @since jdk8 15 | * 16 | * 班级管理业务层 17 | */ 18 | @Service 19 | public class ClassService extends BaseService { 20 | 21 | @Resource 22 | ClassMapper classMapper; 23 | 24 | public List findAllClass(){ 25 | return classMapper.findAllClass(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/LeaderService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service; 2 | 3 | import edu.develop.leave.model.LeaderModel; 4 | import edu.develop.leave.service.baseService.BaseService; 5 | import org.springframework.stereotype.Service; 6 | 7 | /** 8 | * @version 1.0 9 | * @anthor on 2019/5/15 10 | * @since jdk8 11 | * 12 | * 领导服务层 13 | */ 14 | @Service 15 | public class LeaderService extends BaseService { 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/LeaveService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service; 2 | 3 | import edu.develop.leave.controller.vo.LimitVO; 4 | import edu.develop.leave.dao.mapper.LeaveMapper; 5 | import edu.develop.leave.model.LeaveModel; 6 | import edu.develop.leave.model.TsetModel; 7 | import edu.develop.leave.service.baseService.BaseService; 8 | import io.swagger.models.auth.In; 9 | import org.apache.ibatis.annotations.Param; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.web.bind.annotation.ModelAttribute; 13 | 14 | import javax.annotation.Resource; 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | /** 19 | * @version 1.0 20 | * @anthor on 2019/5/8 21 | * @since jdk8 22 | */ 23 | @Service 24 | public class LeaveService extends BaseService { 25 | 26 | @Resource 27 | LeaveMapper leaveMapper; 28 | 29 | @Autowired 30 | TsetService tsetService; 31 | 32 | /** 33 | * 老师查询 34 | * @param offset 35 | * @param limit 36 | * @param teacherId 37 | * @param conditions 38 | * @return 39 | */ 40 | public List teacherSlist(Integer offset, Integer limit,Integer teacherId, String conditions){ 41 | return leaveMapper.teacherSlist(offset,limit,teacherId,conditions,getLimit(1).get(0)); 42 | } 43 | 44 | /** 45 | * 系领导查询 46 | * @param offset 47 | * @param limit 48 | * @param conditions 49 | * @return 50 | */ 51 | public List leaderSlist(Integer offset, Integer limit, String conditions){ 52 | List sectiones = getLimit(2); 53 | return leaveMapper.leaderSlist(offset,limit,conditions,sectiones.get(0)+1,sectiones.get(1)); 54 | } 55 | 56 | /** 57 | * 老师查询数据条数 58 | * @param sql 59 | * @return 60 | */ 61 | public Long teacherGetAmount(String sql){ 62 | return leaveMapper.teacherGetAmount(sql,getLimit(1).get(0)); 63 | } 64 | 65 | /** 66 | * 学生查询数据条数 67 | * @param sql 68 | * @return 69 | */ 70 | public Long leaderGetAmount(String sql){ 71 | List sectiones = getLimit(2); 72 | return leaveMapper.leaderGetAmount(sql,sectiones.get(0)+1,sectiones.get(1)); 73 | } 74 | 75 | /** 76 | * 获取不同角色不同审核时间区间 77 | * @param role 78 | * @return 79 | */ 80 | private List getLimit(Integer role){ 81 | List list = tsetService.list(0,10,null); 82 | List resultList = new ArrayList<>(); 83 | Integer max = 0; 84 | Integer min = 0; 85 | for (TsetModel t: 86 | list) { 87 | if(role == 1 && t.getType() == 3){ 88 | resultList.add(Integer.valueOf(t.getContent())); 89 | return resultList; 90 | }else if(t.getType() == 2){ 91 | max = Integer.valueOf(t.getContent()); 92 | }else if(t.getType() == 3){ 93 | min = Integer.valueOf(t.getContent()); 94 | } 95 | } 96 | resultList.add(min); 97 | resultList.add(max); 98 | return resultList; 99 | } 100 | 101 | 102 | } 103 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/ManagerService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service; 2 | 3 | import edu.develop.leave.controller.dto.RespondsMessage; 4 | import edu.develop.leave.dao.mapper.ManagerMapper; 5 | import edu.develop.leave.model.ManagerModel; 6 | import edu.develop.leave.service.baseService.BaseService; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | 10 | import javax.annotation.Resource; 11 | 12 | /** 13 | * @version 1.0 14 | * @anthor on 2019/5/15 15 | * @since jdk8 16 | * 17 | * 管理员服务层 18 | */ 19 | @Service 20 | public class ManagerService extends BaseService { 21 | 22 | @Resource 23 | ManagerMapper managerMapper; 24 | 25 | /** 26 | * 管理员登录 27 | * @param id 28 | * @param password 29 | * @return 30 | */ 31 | public Integer login(Integer id,String password){ 32 | return managerMapper.login(id,password); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/StudentService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service; 2 | 3 | import edu.develop.leave.dao.mapper.StudentMapper; 4 | import edu.develop.leave.model.StudentModel; 5 | import edu.develop.leave.service.baseService.BaseService; 6 | import org.springframework.stereotype.Service; 7 | import javax.annotation.Resource; 8 | import java.lang.reflect.Field; 9 | import java.util.ArrayList; 10 | import static edu.develop.leave.controller.baseController.BaseController.toDatabaseField; 11 | 12 | /** 13 | * @version 1.0 14 | * @anthor on 2019/5/8 15 | * @since jdk8 16 | */ 17 | @Service 18 | public class StudentService extends BaseService { 19 | 20 | @Resource 21 | StudentMapper studentMapper; 22 | 23 | /** 24 | * 多向删除 25 | * @param ids 26 | * @return 27 | */ 28 | public int stuDeletes(Long[] ids){ 29 | return studentMapper.stuDeletes(ids); 30 | } 31 | 32 | /** 33 | * 获取有值的字段名 34 | * @param clazz 35 | * @param m 36 | * @return 37 | */ 38 | public String[] getParameterNames(Class clazz, StudentModel m) { 39 | ArrayList arrayList = new ArrayList<>(); 40 | Field[] fields = clazz.getDeclaredFields(); 41 | for (Field f : 42 | fields) { 43 | f.setAccessible(true); 44 | try { 45 | if (f.get(m) != null && 46 | !f.get(m).equals(0) && 47 | !f.getName().equals("serialVersionUID")&& 48 | !f.get(m).equals("")) { 49 | // 获取域的名称 50 | String name = toDatabaseField(f.getName()); 51 | if(name.equals("class_id")){ 52 | name = "student."+name; 53 | } 54 | arrayList.add(name); 55 | } 56 | } catch (IllegalAccessException e) { 57 | e.printStackTrace(); 58 | } 59 | } 60 | 61 | String[] values = new String[arrayList.size()]; 62 | 63 | for (int i = 0; i < arrayList.size(); i++) { 64 | values[i] = arrayList.get(i); 65 | } 66 | return values; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/TeacherService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service; 2 | 3 | import edu.develop.leave.model.TeacherModel; 4 | import edu.develop.leave.service.baseService.BaseService; 5 | import org.springframework.stereotype.Service; 6 | 7 | /** 8 | * @version 1.0 9 | * @anthor on 2019/5/9 10 | * @since jdk8 11 | */ 12 | @Service 13 | public class TeacherService extends BaseService { 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/TsetService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service; 2 | 3 | import edu.develop.leave.dao.mapper.TsetMapper; 4 | import edu.develop.leave.model.TsetModel; 5 | import edu.develop.leave.service.baseService.BaseService; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.web.bind.annotation.RequestParam; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.List; 11 | 12 | /** 13 | * @version 1.0 14 | * @anthor on 2019/5/17 15 | * @since jdk8 16 | */ 17 | @Service 18 | public class TsetService extends BaseService { 19 | 20 | @Resource 21 | TsetMapper tsetMapper; 22 | 23 | /** 24 | * 更新设置 25 | * @param totalDays 26 | * @param teacherDays 27 | * @return 28 | */ 29 | public Integer updateSet(Integer totalDays,Integer teacherDays){ 30 | return tsetMapper.updateSet(totalDays,teacherDays); 31 | } 32 | 33 | /** 34 | * 查询最近五条公告 35 | * 36 | * @return 37 | */ 38 | public List queryNotice(){ 39 | return tsetMapper.queryNotice(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/baseService/BaseLoginService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service.baseService; 2 | 3 | import edu.develop.leave.dao.mapper.LeaderMapper; 4 | import edu.develop.leave.dao.mapper.StudentMapper; 5 | import edu.develop.leave.dao.mapper.TeacherMapper; 6 | import edu.develop.leave.model.LeaderModel; 7 | import edu.develop.leave.model.StudentModel; 8 | import edu.develop.leave.model.TeacherModel; 9 | import edu.develop.leave.model.Token; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.web.bind.annotation.RequestParam; 12 | 13 | import javax.annotation.Resource; 14 | import java.util.Map; 15 | 16 | /** 17 | * @version 1.0 18 | * @anthor on 2019/5/7 19 | * @since jdk8 20 | */ 21 | @Service 22 | public class BaseLoginService { 23 | 24 | @Resource 25 | StudentMapper studentMapper; 26 | 27 | @Resource 28 | TeacherMapper teacherMapper; 29 | 30 | @Resource 31 | LeaderMapper leaderMapper; 32 | 33 | public Token login(Long no,String password,Integer roleType){ 34 | Token token = null; 35 | switch (roleType){ 36 | 37 | case 0: token = studentMapper.login(no,password);break;//学生登录 38 | case 1: token = teacherMapper.login(no.intValue(),password);break;//教师登录 39 | case 2: token = leaderMapper.login(no.intValue(),password);break;//系领导登录 40 | default:break; 41 | 42 | } 43 | return token; 44 | } 45 | 46 | /** 47 | * 学生、老师、系领导更改密码 48 | * @param password 49 | * @param id 50 | * @param role 51 | * @return 52 | */ 53 | public Integer resetPassword(String password, Long id, Integer role){ 54 | Integer status; 55 | if(role == 1){ 56 | StudentModel studentModel = new StudentModel(); 57 | studentModel.setStudentId(id); 58 | studentModel.setStudentPassword(password); 59 | status = studentMapper.updateByPrimaryKeySelective(studentModel); 60 | }else if (role == 2){ 61 | TeacherModel teacherModel = new TeacherModel(); 62 | teacherModel.setTeacherId(id.intValue()); 63 | teacherModel.setTeacherPassword(password); 64 | status = teacherMapper.updateByPrimaryKeySelective(teacherModel); 65 | }else if(role == 3){ 66 | LeaderModel leaderModel = new LeaderModel(); 67 | leaderModel.setLeaderId(id.intValue()); 68 | leaderModel.setLeaderPassword(password); 69 | status = leaderMapper.updateByPrimaryKeySelective(leaderModel); 70 | }else { 71 | return 0; 72 | } 73 | 74 | return status; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/service/baseService/BaseService.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.service.baseService; 2 | 3 | import edu.develop.leave.component.ReflectEngine; 4 | import edu.develop.leave.utils.SQLUtil; 5 | import org.springframework.transaction.annotation.Transactional; 6 | import javax.annotation.Resource; 7 | import java.util.List; 8 | 9 | /** 10 | * service基础类 11 | * 12 | * @param 13 | */ 14 | @Transactional(rollbackFor = Exception.class) 15 | public class BaseService { 16 | 17 | @Resource 18 | private ReflectEngine reflectEngine; 19 | 20 | // 被调用对象的名字 21 | protected String invokeObjName; 22 | 23 | /** 24 | * 添加一条记录 25 | * 26 | * @param t 27 | * @throws Exception 28 | */ 29 | public Integer add(T t) throws Exception { 30 | getInvokeObjName(); 31 | return (Integer) reflectEngine.invokeMapperMethod("insertSelective", invokeObjName, new Class[]{Object.class}, t); 32 | } 33 | 34 | /** 35 | * 批量删除用户 36 | * 37 | * @param ids id数组 38 | * @return 数据库影响行数 39 | * @throws Exception 删除失败抛出异常 40 | */ 41 | public Integer deletes(Integer[] ids) throws Exception { 42 | getInvokeObjName(); 43 | return (Integer) reflectEngine.invokeMapperMethod("deletes", invokeObjName, new Class[]{Integer[].class}, new Object[]{ids}); 44 | } 45 | 46 | /** 47 | * 在数据库中删除一个对象 48 | * 49 | * @param id 需要删除对象的id值 50 | * @return 数据库影响行数 51 | * @throws Exception 删除失败抛出异常 52 | */ 53 | public Integer delete(Integer id) throws Exception { 54 | getInvokeObjName(); 55 | return (Integer) reflectEngine.invokeMapperMethod("deleteByPrimaryKey", invokeObjName, new Class[]{Integer.class}, id); 56 | } 57 | 58 | /** 59 | * 更新数据库中某个对象的相应字段 60 | * 61 | * @param t 需要更新的对象 62 | * @return 63 | * @throws Exception 修改失败抛出异常 64 | */ 65 | public Integer update(T t) throws Exception { 66 | System.out.println("service:"+t.toString()); 67 | getInvokeObjName(); 68 | return (Integer) reflectEngine.invokeMapperMethod("updateByPrimaryKeySelective", invokeObjName, new Class[]{Object.class}, t); 69 | } 70 | 71 | 72 | /** 73 | * 查找某个相应条件的对象列表 74 | * 75 | * @param page 列表分页页数 76 | * @param size 当前页需要查询对象的最大数量 77 | * @param conditionsSql 查找列表时的sql条件 sql语=语句里where后面的部分都写在改字符串里 78 | * @return 返回符合条件的对象列表 但查找失败时返回null 79 | */ 80 | public List list(Integer page, Integer size, String conditionsSql) { 81 | getInvokeObjName(); 82 | try { 83 | System.out.println("-----------------:"+page+",size:"+size+"getOffset:"+SQLUtil.getOffset(page, size)); 84 | Object find = reflectEngine.invokeMapperMethod("queryByCondition", invokeObjName, new Class[]{Integer.class, Integer.class, String.class}, 85 | SQLUtil.getOffset(page, size), size, conditionsSql); 86 | return (List) find; 87 | } catch (Exception e) { 88 | e.printStackTrace(); 89 | return null; 90 | } 91 | } 92 | 93 | /** 94 | * 根据条件查询数据条数 95 | * 96 | * @param conditionsSql 查找列表时的sql条件 sql语=语句里where后面的部分都写在改字符串里 97 | * @return 98 | */ 99 | public Long queryAmount(String conditionsSql) { 100 | getInvokeObjName(); 101 | try { 102 | Object findAmount = reflectEngine.invokeMapperMethod("queryAmount", invokeObjName, new Class[]{String.class}, conditionsSql); 103 | return (Long) findAmount; 104 | } catch (Exception e) { 105 | e.printStackTrace(); 106 | return null; 107 | } 108 | } 109 | 110 | /** 111 | * 根据唯一id值查找某个对象 112 | * 113 | * @param id 查找的id值 114 | * @return 返回查找到的对象 查找失败返回空值 115 | */ 116 | public T findById(Integer id) { 117 | getInvokeObjName(); 118 | try { 119 | Object find = reflectEngine.invokeMapperMethod("selectByPrimaryKey", invokeObjName, new Class[]{Integer.class}, id); 120 | return (T) find; 121 | } catch (Exception e) { 122 | e.printStackTrace(); 123 | return null; 124 | } 125 | } 126 | 127 | /** 128 | * 获取被调用对象的名字 129 | */ 130 | protected void getInvokeObjName() { 131 | invokeObjName = this.getClass().getSimpleName(); 132 | invokeObjName = invokeObjName.replace("Service", "Mapper"); 133 | invokeObjName = invokeObjName.substring(0, 1).toLowerCase() + invokeObjName.substring(1); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/utils/ConditionStr.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.utils; 2 | 3 | /** 4 | * @version 1.0 5 | * @anthor zsl on 2019/3/31 6 | * @since jdk8 7 | * 8 | * 搜索条件模板 9 | */ 10 | public class ConditionStr { 11 | 12 | public static String sqlTemplate(String[] strs){ 13 | if(strs.length == 0){ 14 | return null; 15 | } 16 | 17 | StringBuilder stringBuilder = new StringBuilder(); 18 | stringBuilder.append(strs[0]).append(" like ?"); 19 | if(strs.length >= 2){ 20 | for(int i = 1; i < strs.length; i++){ 21 | stringBuilder.append(" and "); 22 | stringBuilder.append(strs[i]).append(" like ?"); 23 | 24 | } 25 | } 26 | return stringBuilder.toString(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/utils/LogUtil.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.utils; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import org.slf4j.Logger; 5 | 6 | /** 7 | * @author zhangpei 8 | * @version 1.0 9 | * @description 日志生成工具 10 | * @date 2019/4/20 11 | */ 12 | public class LogUtil { 13 | 14 | public static String logInfo(Logger log, String model, Object... parms) { 15 | String format = StrUtil.format(model, parms); 16 | log.info(format); 17 | return format; 18 | } 19 | 20 | public static String logErr(Logger log, String model, Object... parms) { 21 | String format = StrUtil.format(model, parms); 22 | log.error(format); 23 | return format; 24 | } 25 | 26 | public static String logWarn(Logger log, String model, Object... parms) { 27 | String format = StrUtil.format(model, parms); 28 | log.warn(format); 29 | return format; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/edu/develop/leave/utils/SQLUtil.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | 7 | /** 8 | * SQL工具类 9 | * 10 | * @author Ming 11 | */ 12 | public class SQLUtil { 13 | 14 | /** 15 | * 格式化字段 16 | * 17 | * @param parameters 字段 18 | * @return 格式化结果 19 | */ 20 | public static String formatParameters(String[] parameters) { 21 | if (parameters == null) { 22 | return null; 23 | } 24 | StringBuilder stringBuilder = new StringBuilder(); 25 | 26 | stringBuilder.append(parameters[0]); 27 | for (int i = 1, length = parameters.length; i < length; i++) { 28 | stringBuilder.append("," + parameters[i]); 29 | } 30 | 31 | return stringBuilder.toString(); 32 | } 33 | 34 | /** 35 | * 条件SQL参数填充 36 | * 37 | * @param condition 条件 38 | * @param values 参数 39 | * @return 条件SQL 40 | */ 41 | @SuppressWarnings("deprecation") 42 | public static String fillCondition(String condition, Object... values) { 43 | if (condition == null) { 44 | return null; 45 | } 46 | 47 | StringBuilder stringBuilder = new StringBuilder(condition); 48 | 49 | for (int i = 0, length = values.length; i < length; i++) { 50 | int index = stringBuilder.indexOf("?"); 51 | Object value = values[i]; 52 | String param; 53 | if (value instanceof String) { 54 | param = "\'%" + ((String) value).replaceAll("'", "''") + "%\'"; 55 | } else if (value instanceof Date) { 56 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 57 | param = "\'%" + simpleDateFormat.format((Date) value) + "%\'"; 58 | } else if (value instanceof java.sql.Date) { 59 | param = "\'%" + ((java.sql.Date) value).toLocaleString() + "%\'"; 60 | } else { 61 | if (value == null) { 62 | param = "\'\'"; 63 | } else { 64 | param = "\'%"+value.toString()+"%\'"; 65 | } 66 | 67 | } 68 | stringBuilder.replace(index, index + 1, param); 69 | } 70 | 71 | return stringBuilder.toString(); 72 | } 73 | 74 | public static Integer getOffset(Integer curPage, Integer limit) { 75 | if (curPage == null || limit == null) { 76 | return null; 77 | } 78 | return (curPage - 1) * limit; 79 | } 80 | 81 | public static String stringToStringgroup(String targetString) { 82 | if (targetString == null) { 83 | return null; 84 | } 85 | StringBuffer endString = new StringBuffer("%"); 86 | String string = targetString.replaceAll(" ", "%"); 87 | endString.append(string + "%"); 88 | return endString.toString(); 89 | } 90 | 91 | 92 | // public static void main(String[] args) throws ParseException { 93 | // 94 | // Date date=new Date(); 95 | // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); 96 | // date=sdf.parse("1995-02-04"); 97 | // System.out.println(date.toString()); 98 | // 99 | // 100 | // String[] parameters = new String[] {"username", "password"}; 101 | // System.out.println(formatParameters(parameters)); 102 | // 103 | // 104 | // 105 | // String condition = "username = ? and sex = ? and create_date = ? and update_date = ?"; 106 | // Object[] values = new Object[] {"Ming", 1, new Date(), new java.sql.Date(System.currentTimeMillis())}; 107 | // System.out.println(fillCondition(condition, values)); 108 | // } 109 | } 110 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/resources/application.properties -------------------------------------------------------------------------------- /src/main/resources/edu/develop/leave/dao/mapper/ClassMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | class_id, teacher_id, grade_id, class_name 12 | 13 | 19 | 20 | delete from class 21 | where class_id = #{classId,jdbcType=INTEGER} 22 | 23 | 24 | insert into class (class_id, teacher_id, grade_id, 25 | class_name) 26 | values (#{classId,jdbcType=INTEGER}, #{teacherId,jdbcType=INTEGER}, #{gradeId,jdbcType=INTEGER}, 27 | #{className,jdbcType=VARCHAR}) 28 | 29 | 30 | insert into class 31 | 32 | 33 | class_id, 34 | 35 | 36 | teacher_id, 37 | 38 | 39 | grade_id, 40 | 41 | 42 | class_name, 43 | 44 | 45 | 46 | 47 | #{classId,jdbcType=INTEGER}, 48 | 49 | 50 | #{teacherId,jdbcType=INTEGER}, 51 | 52 | 53 | #{gradeId,jdbcType=INTEGER}, 54 | 55 | 56 | #{className,jdbcType=VARCHAR}, 57 | 58 | 59 | 60 | 61 | update class 62 | 63 | 64 | teacher_id = #{teacherId,jdbcType=INTEGER}, 65 | 66 | 67 | grade_id = #{gradeId,jdbcType=INTEGER}, 68 | 69 | 70 | class_name = #{className,jdbcType=VARCHAR}, 71 | 72 | 73 | where class_id = #{classId,jdbcType=INTEGER} 74 | 75 | 76 | update class 77 | set teacher_id = #{teacherId,jdbcType=INTEGER}, 78 | grade_id = #{gradeId,jdbcType=INTEGER}, 79 | class_name = #{className,jdbcType=VARCHAR} 80 | where class_id = #{classId,jdbcType=INTEGER} 81 | 82 | 83 | 84 | 93 | 94 | 95 | 107 | 108 | 109 | delete from `class` where class_id in 110 | 111 | #{id} 112 | 113 | 114 | 115 | 116 | 122 | -------------------------------------------------------------------------------- /src/main/resources/edu/develop/leave/dao/mapper/GradeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | grade_id, leader_id, grade_name 11 | 12 | 18 | 19 | delete from grade 20 | where grade_id = #{gradeId,jdbcType=INTEGER} 21 | 22 | 23 | insert into grade (leader_id, grade_name) 24 | values (#{leaderId,jdbcType=INTEGER}, #{gradeName,jdbcType=VARCHAR}) 25 | 26 | 27 | insert into grade 28 | 29 | 30 | leader_id, 31 | 32 | 33 | grade_name, 34 | 35 | 36 | 37 | 38 | #{leaderId,jdbcType=INTEGER}, 39 | 40 | 41 | #{gradeName,jdbcType=VARCHAR}, 42 | 43 | 44 | 45 | 46 | update grade 47 | 48 | 49 | leader_id = #{leaderId,jdbcType=INTEGER}, 50 | 51 | 52 | grade_name = #{gradeName,jdbcType=VARCHAR}, 53 | 54 | 55 | where grade_id = #{gradeId,jdbcType=INTEGER} 56 | 57 | 58 | update grade 59 | set leader_id = #{leaderId,jdbcType=INTEGER}, 60 | grade_name = #{gradeName,jdbcType=VARCHAR} 61 | where grade_id = #{gradeId,jdbcType=INTEGER} 62 | 63 | 64 | 65 | 74 | 75 | 76 | 88 | 89 | 90 | delete from `grade` where grade_id in 91 | 92 | #{id} 93 | 94 | 95 | -------------------------------------------------------------------------------- /src/main/resources/edu/develop/leave/dao/mapper/LeaderMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | leader_id, role_id, leader_name, leader_password 12 | 13 | 19 | 20 | delete from leader 21 | where leader_id = #{leaderId,jdbcType=INTEGER} 22 | 23 | 24 | insert into leader (role_id, leader_name, leader_password 25 | ) 26 | values (#{roleId,jdbcType=INTEGER}, #{leaderName,jdbcType=VARCHAR}, #{leaderPassword,jdbcType=VARCHAR} 27 | ) 28 | 29 | 30 | insert into leader 31 | 32 | 33 | role_id, 34 | 35 | 36 | leader_name, 37 | 38 | 39 | leader_password, 40 | 41 | 42 | 43 | 44 | #{roleId,jdbcType=INTEGER}, 45 | 46 | 47 | #{leaderName,jdbcType=VARCHAR}, 48 | 49 | 50 | #{leaderPassword,jdbcType=VARCHAR}, 51 | 52 | 53 | 54 | 55 | update leader 56 | 57 | 58 | role_id = #{roleId,jdbcType=INTEGER}, 59 | 60 | 61 | leader_name = #{leaderName,jdbcType=VARCHAR}, 62 | 63 | 64 | leader_password = #{leaderPassword,jdbcType=VARCHAR}, 65 | 66 | 67 | where leader_id = #{leaderId,jdbcType=INTEGER} 68 | 69 | 70 | update leader 71 | set role_id = #{roleId,jdbcType=INTEGER}, 72 | leader_name = #{leaderName,jdbcType=VARCHAR}, 73 | leader_password = #{leaderPassword,jdbcType=VARCHAR} 74 | where leader_id = #{leaderId,jdbcType=INTEGER} 75 | 76 | 77 | 78 | 79 | 88 | 89 | 90 | 102 | 103 | 104 | delete from `leader` where leader_id in 105 | 106 | #{id} 107 | 108 | 109 | 110 | 128 | -------------------------------------------------------------------------------- /src/main/resources/edu/develop/leave/dao/mapper/ManagerMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | id, password, name 11 | 12 | 18 | 19 | delete from manager 20 | where id = #{id,jdbcType=INTEGER} 21 | 22 | 23 | insert into manager (password, name) 24 | values (#{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}) 25 | 26 | 27 | insert into manager 28 | 29 | 30 | password, 31 | 32 | 33 | name, 34 | 35 | 36 | 37 | 38 | #{password,jdbcType=VARCHAR}, 39 | 40 | 41 | #{name,jdbcType=VARCHAR}, 42 | 43 | 44 | 45 | 46 | update manager 47 | 48 | 49 | password = #{password,jdbcType=VARCHAR}, 50 | 51 | 52 | name = #{name,jdbcType=VARCHAR}, 53 | 54 | 55 | where id = #{id,jdbcType=INTEGER} 56 | 57 | 58 | update manager 59 | set password = #{password,jdbcType=VARCHAR}, 60 | name = #{name,jdbcType=VARCHAR} 61 | where id = #{id,jdbcType=INTEGER} 62 | 63 | 64 | 70 | -------------------------------------------------------------------------------- /src/main/resources/edu/develop/leave/dao/mapper/RoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | role_id, leader_id, student_id, teacher_id, role_name, msg 14 | 15 | 21 | 22 | delete from role 23 | where role_id = #{roleId,jdbcType=INTEGER} 24 | 25 | 26 | insert into role (leader_id, student_id, teacher_id, 27 | role_name, msg) 28 | values (#{leaderId,jdbcType=INTEGER}, #{studentId,jdbcType=BIGINT}, #{teacherId,jdbcType=INTEGER}, 29 | #{roleName,jdbcType=VARCHAR}, #{msg,jdbcType=VARCHAR}) 30 | 31 | 32 | insert into role 33 | 34 | 35 | leader_id, 36 | 37 | 38 | student_id, 39 | 40 | 41 | teacher_id, 42 | 43 | 44 | role_name, 45 | 46 | 47 | msg, 48 | 49 | 50 | 51 | 52 | #{leaderId,jdbcType=INTEGER}, 53 | 54 | 55 | #{studentId,jdbcType=BIGINT}, 56 | 57 | 58 | #{teacherId,jdbcType=INTEGER}, 59 | 60 | 61 | #{roleName,jdbcType=VARCHAR}, 62 | 63 | 64 | #{msg,jdbcType=VARCHAR}, 65 | 66 | 67 | 68 | 69 | update role 70 | 71 | 72 | leader_id = #{leaderId,jdbcType=INTEGER}, 73 | 74 | 75 | student_id = #{studentId,jdbcType=BIGINT}, 76 | 77 | 78 | teacher_id = #{teacherId,jdbcType=INTEGER}, 79 | 80 | 81 | role_name = #{roleName,jdbcType=VARCHAR}, 82 | 83 | 84 | msg = #{msg,jdbcType=VARCHAR}, 85 | 86 | 87 | where role_id = #{roleId,jdbcType=INTEGER} 88 | 89 | 90 | update role 91 | set leader_id = #{leaderId,jdbcType=INTEGER}, 92 | student_id = #{studentId,jdbcType=BIGINT}, 93 | teacher_id = #{teacherId,jdbcType=INTEGER}, 94 | role_name = #{roleName,jdbcType=VARCHAR}, 95 | msg = #{msg,jdbcType=VARCHAR} 96 | where role_id = #{roleId,jdbcType=INTEGER} 97 | 98 | 99 | 100 | 109 | 110 | 111 | 123 | 124 | 125 | delete from `role` where role_id in 126 | 127 | #{id} 128 | 129 | 130 | -------------------------------------------------------------------------------- /src/main/resources/edu/develop/leave/dao/mapper/StudentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | student_id, role_id, student.class_id, student_name, student_password,class_name 17 | 18 | 24 | 25 | delete from student 26 | where student_id = #{studentId,jdbcType=BIGINT} 27 | 28 | 29 | insert into student (role_id, class_id, student_name, 30 | student_password) 31 | values (#{roleId,jdbcType=INTEGER}, #{classId,jdbcType=INTEGER}, #{studentName,jdbcType=VARCHAR}, 32 | #{studentPassword,jdbcType=VARCHAR}) 33 | 34 | 35 | insert into student 36 | 37 | 38 | role_id, 39 | 40 | 41 | class_id, 42 | 43 | 44 | student_name, 45 | 46 | 47 | student_password, 48 | 49 | 50 | 51 | 52 | #{roleId,jdbcType=INTEGER}, 53 | 54 | 55 | #{classId,jdbcType=INTEGER}, 56 | 57 | 58 | #{studentName,jdbcType=VARCHAR}, 59 | 60 | 61 | #{studentPassword,jdbcType=VARCHAR}, 62 | 63 | 64 | 65 | 66 | update student 67 | 68 | 69 | role_id = #{roleId,jdbcType=INTEGER}, 70 | 71 | 72 | class_id = #{classId,jdbcType=INTEGER}, 73 | 74 | 75 | student_name = #{studentName,jdbcType=VARCHAR}, 76 | 77 | 78 | student_password = #{studentPassword,jdbcType=VARCHAR}, 79 | 80 | 81 | where student_id = #{studentId,jdbcType=BIGINT} 82 | 83 | 84 | update student 85 | set role_id = #{roleId,jdbcType=INTEGER}, 86 | class_id = #{classId,jdbcType=INTEGER}, 87 | student_name = #{studentName,jdbcType=VARCHAR}, 88 | student_password = #{studentPassword,jdbcType=VARCHAR} 89 | where student_id = #{studentId,jdbcType=BIGINT} 90 | 91 | 92 | 93 | 102 | 103 | 104 | 126 | 127 | 128 | 129 | delete from `student` where student_id in 130 | 131 | #{id} 132 | 133 | 134 | 135 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /src/main/resources/edu/develop/leave/dao/mapper/TeacherMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | teacher_id, `class`.class_id, role_id, teacher_name, teacher_password,class_name 17 | 18 | 24 | 25 | delete from teacher 26 | where teacher_id = #{teacherId,jdbcType=INTEGER} 27 | 28 | 29 | insert into teacher (class_id, role_id, teacher_name, 30 | teacher_password) 31 | values (#{classId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{teacherName,jdbcType=VARCHAR}, 32 | #{teacherPassword,jdbcType=VARCHAR}) 33 | 34 | 35 | insert into teacher 36 | 37 | 38 | class_id, 39 | 40 | 41 | role_id, 42 | 43 | 44 | teacher_name, 45 | 46 | 47 | teacher_password, 48 | 49 | 50 | 51 | 52 | #{classId,jdbcType=INTEGER}, 53 | 54 | 55 | #{roleId,jdbcType=INTEGER}, 56 | 57 | 58 | #{teacherName,jdbcType=VARCHAR}, 59 | 60 | 61 | #{teacherPassword,jdbcType=VARCHAR}, 62 | 63 | 64 | 65 | 66 | update teacher 67 | 68 | 69 | class_id = #{classId,jdbcType=INTEGER}, 70 | 71 | 72 | role_id = #{roleId,jdbcType=INTEGER}, 73 | 74 | 75 | teacher_name = #{teacherName,jdbcType=VARCHAR}, 76 | 77 | 78 | teacher_password = #{teacherPassword,jdbcType=VARCHAR}, 79 | 80 | 81 | where teacher_id = #{teacherId,jdbcType=INTEGER} 82 | 83 | 84 | update teacher 85 | set class_id = #{classId,jdbcType=INTEGER}, 86 | role_id = #{roleId,jdbcType=INTEGER}, 87 | teacher_name = #{teacherName,jdbcType=VARCHAR}, 88 | teacher_password = #{teacherPassword,jdbcType=VARCHAR} 89 | where teacher_id = #{id,jdbcType=INTEGER} 90 | 91 | 92 | 93 | 102 | 103 | 104 | 125 | 126 | 127 | delete from `teacher` where teacher_id in 128 | 129 | #{id} 130 | 131 | 132 | 133 | 151 | -------------------------------------------------------------------------------- /src/main/resources/edu/develop/leave/dao/mapper/TsetMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | id, type, content,update_time 12 | 13 | 19 | 20 | delete from t_set 21 | where id = #{id,jdbcType=INTEGER} 22 | 23 | 24 | insert into t_set (type, content) 25 | values (#{type,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}) 26 | 27 | 28 | insert into t_set 29 | 30 | 31 | type, 32 | 33 | 34 | content, 35 | 36 | 37 | 38 | 39 | #{type,jdbcType=INTEGER}, 40 | 41 | 42 | #{content,jdbcType=VARCHAR}, 43 | 44 | 45 | 46 | 47 | update t_set 48 | 49 | 50 | type = #{type,jdbcType=INTEGER}, 51 | 52 | 53 | content = #{content,jdbcType=VARCHAR}, 54 | 55 | 56 | where id = #{id,jdbcType=INTEGER} 57 | 58 | 59 | update t_set 60 | set type = #{type,jdbcType=INTEGER}, 61 | content = #{content,jdbcType=VARCHAR} 62 | where id = #{id,jdbcType=INTEGER} 63 | 64 | 65 | 66 | 76 | 77 | 78 | update 79 | t_set 80 | set 81 | content = #{totalDays,jdbcType=INTEGER} 82 | WHERE 83 | id = 2; 84 | 85 | update 86 | t_set 87 | set 88 | content = #{teacherDays,jdbcType=INTEGER} 89 | WHERE 90 | id = 3; 91 | 92 | 93 | 94 | 104 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /src/main/webapp/css/loginStyle.css: -------------------------------------------------------------------------------- 1 | .center { 2 | text-align: center; 3 | } 4 | 5 | .login-page { 6 | width: 360px; 7 | padding: 8% 0 0; 8 | margin: auto; 9 | } 10 | 11 | .form { 12 | 13 | z-index: 1; 14 | background: #FFFFFF; 15 | max-width: 360px; 16 | position: absolute; 17 | top: 50%; 18 | left: 50%; 19 | transform: translate(-50%, -50%); 20 | padding: 45px 45px 50px 45px; 21 | text-align: center; 22 | box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24); 23 | } 24 | 25 | .form input { 26 | font-family: "Roboto", sans-serif; 27 | outline: 0; 28 | background: #f2f2f2; 29 | width: 100%; 30 | height: 35px; 31 | border: 0; 32 | margin: 0 0 15px; 33 | padding: 15px; 34 | box-sizing: border-box; 35 | font-size: 14px; 36 | border-radius: 3px; 37 | } 38 | .selectItAddress { 39 | width: 100%; 40 | height: 35px; 41 | background: #f2f2f2; 42 | margin: 0 0 15px; 43 | border-radius: 3px; 44 | font-size: 14px; 45 | border: 0; 46 | color: #777; 47 | } 48 | .form button { 49 | font-family: "Microsoft YaHei","Roboto", sans-serif; 50 | outline: 0; 51 | background: orange; 52 | width: 100%; 53 | height: 35px; 54 | border: 0; 55 | padding: 9px 15px 15px 15px; 56 | color: #FFFFFF; 57 | font-size: 14px; 58 | cursor: pointer; 59 | border-radius: 3px; 60 | } 61 | 62 | .form button:hover,.form button:active,.form button:focus { 63 | background: orange; 64 | } 65 | 66 | .form .message { 67 | margin: 15px 0 0; 68 | color: #b3b3b3; 69 | font-size: 12px; 70 | } 71 | 72 | body { 73 | background:url(../images/loginBackGround.jpg) 0px 0px; 74 | font-family: "Roboto", sans-serif; 75 | -webkit-font-smoothing: antialiased; 76 | -moz-osx-font-smoothing: grayscale; 77 | } 78 | .radioGroup label::before, .radioGroup label::after { 79 | content: ''; 80 | position: absolute; 81 | top: 0; 82 | bottom: 0; 83 | left: 0; 84 | margin: auto; 85 | width: 1em; 86 | height: 1em; 87 | border-radius: 50%; 88 | } 89 | .radio_box{ 90 | display:inline-block; 91 | position:relative; 92 | width: 30%; 93 | float: left; 94 | padding-bottom: 5%; 95 | } 96 | 97 | .radio_box label{ 98 | width:13px; 99 | height:13px; 100 | position:absolute; 101 | top:0; left:0; 102 | border:1px solid orange; 103 | border-radius:50%; 104 | background:#fff; 105 | cursor:pointer; 106 | margin-top: 3%; 107 | } 108 | 109 | .radio_box input:checked + label:after{ 110 | content:''; 111 | width:9px; height:9px; 112 | position:absolute; 113 | top:2px; left:2px; 114 | background:orange; 115 | border-radius:50%; 116 | } 117 | 118 | .student{ 119 | margin:0 0 0 -1%; 120 | font-family: "Microsoft YaHei","Roboto", sans-serif; 121 | font-size: 14px; 122 | } 123 | .teacher { 124 | margin:0 0 0 -16%; 125 | font-family: "Microsoft YaHei","Roboto", sans-serif; 126 | font-size: 14px; 127 | } 128 | .leader{ 129 | margin:0 0 0 -16%; 130 | font-family: "Microsoft YaHei","Roboto", sans-serif; 131 | font-size: 14px; 132 | } -------------------------------------------------------------------------------- /src/main/webapp/css/orderList.css: -------------------------------------------------------------------------------- 1 | .find_button{ 2 | padding:5px 10px; 3 | background:#F9AA01; 4 | font-size: 14px; 5 | color: #fff; 6 | text-decoration: none; 7 | border-radius: 5px; 8 | border-radius: 5px; 9 | -webkit-border-radius: 5px; 10 | -moz-border-radius: 5px; 11 | -o-border-radius: 5px; 12 | -ms-border-radius: 5px; 13 | font-family: 'Titillium Web', sans-serif; 14 | font-style:normal; 15 | text-decoration:none; 16 | 17 | } 18 | 19 | .form-group select { 20 | background: transparent; 21 | width: 100%; 22 | border-radius: 5px; 23 | padding: 5px; 24 | font-size: 16px; 25 | border: 1px solid #ccc; 26 | height: 34px; 27 | -webkit-appearance: none; /*for chrome*/ 28 | } 29 | 30 | #btn_query:hover{ 31 | cursor: pointer; 32 | } -------------------------------------------------------------------------------- /src/main/webapp/css/style9.css: -------------------------------------------------------------------------------- 1 | /* NINTH EXAMPLE*/ 2 | .view-ninth .mask-1, .view-ninth .mask-2 { 3 | background-color: rgba(0, 0, 0, 0.5); 4 | height: 361px; 5 | width: 361px; 6 | background: rgba(232, 177, 22, 0.5); 7 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; 8 | filter: alpha(opacity=100); 9 | opacity: 1; 10 | -webkit-transition: all 0.3s ease-in-out 0.6s; 11 | -moz-transition: all 0.3s ease-in-out 0.6s; 12 | -o-transition: all 0.3s ease-in-out 0.6s; 13 | transition: all 0.3s ease-in-out 0.6s; 14 | } 15 | .view-ninth .mask-1 { 16 | left: auto; 17 | right: 0; 18 | -webkit-transform: rotate(56.5deg) translateX(-180px); 19 | -moz-transform: rotate(56.5deg) translateX(-180px); 20 | -o-transform: rotate(56.5deg) translateX(-180px); 21 | -ms-transform: rotate(56.5deg) translateX(-180px); 22 | transform: rotate(56.5deg) translateX(-180px); 23 | -webkit-transform-origin: 100% 0%; 24 | -moz-transform-origin: 100% 0%; 25 | -o-transform-origin: 100% 0%; 26 | -ms-transform-origin: 100% 0%; 27 | transform-origin: 100% 0%; 28 | } 29 | .view-ninth .mask-2 { 30 | top: auto; 31 | bottom: 0; 32 | -webkit-transform: rotate(56.5deg) translateX(180px); 33 | -moz-transform: rotate(56.5deg) translateX(180px); 34 | -o-transform: rotate(56.5deg) translateX(180px); 35 | -ms-transform: rotate(56.5deg) translateX(180px); 36 | transform: rotate(56.5deg) translateX(180px); 37 | -webkit-transform-origin: 0% 100%; 38 | -moz-transform-origin: 0% 100%; 39 | -o-transform-origin: 0% 100%; 40 | -ms-transform-origin: 0% 100%; 41 | transform-origin: 0% 100%; 42 | } 43 | .view-ninth .content { 44 | background: rgba(0, 0, 0, 0.9); 45 | height: 0; 46 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; 47 | filter: alpha(opacity=50); 48 | opacity: 0.5; 49 | width: 361px; 50 | overflow: hidden; 51 | -webkit-transform: rotate(-33.5deg) translate(-112px, 166px); 52 | -moz-transform: rotate(-33.5deg) translate(-112px, 166px); 53 | -o-transform: rotate(-33.5deg) translate(-112px, 166px); 54 | -ms-transform: rotate(-33.5deg) translate(-112px, 166px); 55 | transform: rotate(-33.5deg) translate(-112px, 166px); 56 | -webkit-transform-origin: 0% 100%; 57 | -moz-transform-origin: 0% 100%; 58 | -o-transform-origin: 0% 100%; 59 | -ms-transform-origin: 0% 100%; 60 | transform-origin: 0% 100%; 61 | -webkit-transition: all 0.4s ease-in-out 0.3s; 62 | -moz-transition: all 0.4s ease-in-out 0.3s; 63 | -o-transition: all 0.4s ease-in-out 0.3s; 64 | transition: all 0.4s ease-in-out 0.3s; 65 | } 66 | .view-ninth h2 { 67 | background: transparent; 68 | margin-top: 5px; 69 | border-bottom: 1px solid rgba(255, 255, 255, 0.2); 70 | } 71 | .view-ninth a.info { 72 | display: none; 73 | } 74 | .view-ninth:hover .content { 75 | height: 120px; 76 | width: 245px; 77 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)"; 78 | filter: alpha(opacity=90); 79 | opacity: 0.9; 80 | top: 40px; 81 | -webkit-transform: rotate(0deg) translate(0, 0); 82 | -moz-transform: rotate(0deg) translate(0, 0); 83 | -o-transform: rotate(0deg) translate(0, 0); 84 | -ms-transform: rotate(0deg) translate(0, 0); 85 | transform: rotate(0deg) translate(0, 0); 86 | } 87 | .view-ninth:hover .mask-1, .view-ninth:hover .mask-2 { 88 | -webkit-transition-delay: 0s; 89 | -moz-transition-delay: 0s; 90 | -o-transition-delay: 0s; 91 | transition-delay: 0s; 92 | } 93 | .view-ninth:hover .mask-1 { 94 | -webkit-transform: rotate(56.5deg) translateX(1px); 95 | -moz-transform: rotate(56.5deg) translateX(1px); 96 | -o-transform: rotate(56.5deg) translateX(1px); 97 | -ms-transform: rotate(56.5deg) translateX(1px); 98 | transform: rotate(56.5deg) translateX(1px); 99 | } 100 | .view-ninth:hover .mask-2 { 101 | -webkit-transform: rotate(56.5deg) translateX(-1px); 102 | -moz-transform: rotate(56.5deg) translateX(-1px); 103 | -o-transform: rotate(56.5deg) translateX(-1px); 104 | -ms-transform: rotate(56.5deg) translateX(-1px); 105 | transform: rotate(56.5deg) translateX(-1px); 106 | } 107 | @media (max-width: 1024px) 108 | { 109 | .view-ninth:hover .content { 110 | width: 200px; 111 | top: 29px; 112 | height:97px; 113 | } 114 | } 115 | @media (max-width: 640px) 116 | { 117 | .view-ninth:hover .content { 118 | width: 168px; 119 | top: 25px; 120 | } 121 | } 122 | @media (max-width: 480px) 123 | { 124 | .view-ninth:hover .content { 125 | width: 181px; 126 | } 127 | } 128 | @media (max-width: 320px) 129 | { 130 | .view-ninth:hover .content { 131 | width: 100% !important; 132 | top: 0px; 133 | } 134 | } -------------------------------------------------------------------------------- /src/main/webapp/css/style_common.css: -------------------------------------------------------------------------------- 1 | .view { 2 | width: 245px; 3 | height: 200px; 4 | margin: 10px 10px 0; 5 | float: left; 6 | border: 3px solid #EEE; 7 | overflow: hidden; 8 | position: relative; 9 | text-align: center; 10 | -webkit-box-shadow: 1px 1px 2px #e6e6e6; 11 | -moz-box-shadow: 1px 1px 2px #e6e6e6; 12 | box-shadow: 1px 1px 2px #e6e6e6; 13 | cursor: default; 14 | background: #fff url(../images/bgimg.jpg) no-repeat center center; 15 | } 16 | .view .mask,.view .content { 17 | width: 300px; 18 | height: 200px; 19 | position: absolute; 20 | overflow: hidden; 21 | top: 0; 22 | left: 0; 23 | } 24 | .view img { 25 | display: block; 26 | position: relative; 27 | } 28 | .view h2 { 29 | text-transform: uppercase; 30 | color: #fff; 31 | text-align: center; 32 | position: relative; 33 | font-size: 14px; 34 | padding: 10px; 35 | background: rgba(0, 0, 0, 0.8); 36 | margin: 20px 0 0 0; 37 | } 38 | .view p { 39 | font-family: Georgia, serif; 40 | font-style: italic; 41 | font-size: 11px; 42 | position: relative; 43 | color: #fff; 44 | padding: 10px 10px 20px; 45 | text-align: center; 46 | } 47 | .view a.info { 48 | display: inline-block; 49 | text-decoration: none; 50 | padding: 7px 14px; 51 | background: #000; 52 | color: #fff; 53 | text-transform: uppercase; 54 | -webkit-box-shadow: 0 0 1px #000; 55 | -moz-box-shadow: 0 0 1px #000; 56 | box-shadow: 0 0 1px #000; 57 | } 58 | .view a.info: hover { 59 | -webkit-box-shadow: 0 0 5px #000; 60 | -moz-box-shadow: 0 0 5px #000; 61 | box-shadow: 0 0 5px #000; 62 | } 63 | @media (max-width: 1024px) 64 | { 65 | .view { 66 | width: 197px; 67 | height: 161px; 68 | } 69 | .view img { 70 | width: 100%; 71 | } 72 | .view-ninth:hover .content { 73 | width: 197px; 74 | } 75 | .view p { 76 | font-family: Georgia, serif; 77 | font-style: italic; 78 | font-size: 10px; 79 | overflow: hidden; 80 | padding: 6px 10px 20px; 81 | height: 48px; 82 | } 83 | } 84 | @media (max-width: 768px) 85 | { 86 | .view { 87 | width: 196px; 88 | } 89 | } 90 | @media (max-width: 640px) 91 | { 92 | .view { 93 | width: 173px; 94 | height: 141px; 95 | } 96 | .view h2 { 97 | font-size: 12px; 98 | padding: 6px 6px; 99 | } 100 | .view p { 101 | font-size: 9px; 102 | padding: 10px 3px 20px; 103 | } 104 | } 105 | @media (max-width: 480px) 106 | { 107 | .view { 108 | width: 188px; 109 | } 110 | } 111 | @media (max-width: 320px) 112 | { 113 | .view h2 { 114 | font-size: 8px; 115 | padding: 4px 6px; 116 | } 117 | .view { 118 | width: 121px; 119 | height:101px; 120 | margin: 10px 4px 0 !important; 121 | } 122 | .view p { 123 | padding: 3px 3px 20px; 124 | } 125 | .view p { 126 | overflow: hidden; 127 | height: 63px; 128 | } 129 | .view-ninth:hover .content { 130 | width: 100% !important; 131 | top: 0px; 132 | } 133 | } -------------------------------------------------------------------------------- /src/main/webapp/css/supplierList.css: -------------------------------------------------------------------------------- 1 | .form-group select { 2 | background: transparent; 3 | width: 100%; 4 | border-radius: 5px; 5 | padding: 5px; 6 | font-size: 16px; 7 | border: 1px solid #ccc; 8 | height: 34px; 9 | -webkit-appearance: none; /*for chrome*/ 10 | } 11 | 12 | .find_button_sty{ 13 | display: block; 14 | width: 48px; 15 | margin-top: 10px; 16 | margin-left: 88px; 17 | } -------------------------------------------------------------------------------- /src/main/webapp/css/swipebox.css: -------------------------------------------------------------------------------- 1 | .swipebox-overflow-hidden { 2 | overflow: hidden!important; 3 | } 4 | 5 | #swipebox-overlay img { 6 | border: none!important; 7 | width: 55%!important; 8 | } 9 | 10 | #swipebox-overlay { 11 | width: 100%!important; 12 | height: 100%; 13 | position: fixed; 14 | top: 0; 15 | left: 0; 16 | opacity: 0; 17 | z-index: 9999; 18 | overflow: hidden; 19 | display: none; 20 | -webkit-user-select: none; 21 | -moz-user-select: none; 22 | user-select: none; 23 | } 24 | 25 | #swipebox-slider { 26 | height: 100%; 27 | left: 0; 28 | top: 0; 29 | width: 100%; 30 | white-space: nowrap; 31 | position: absolute; 32 | } 33 | 34 | #swipebox-slider .slide { 35 | background: url(../images/loader.gif) no-repeat center center; 36 | height: 100%; 37 | line-height: 1px; 38 | text-align: center; 39 | width: 100%; 40 | display: inline-block; 41 | } 42 | 43 | #swipebox-slider .slide:before { 44 | content: ""; 45 | display: inline-block; 46 | height: 50%; 47 | width: 1px; 48 | margin-right: -1px; 49 | } 50 | 51 | #swipebox-slider .slide img { 52 | display: inline-block; 53 | max-height: 100%; 54 | max-width: 100%; 55 | width: auto; 56 | height: auto; 57 | vertical-align: middle; 58 | } 59 | 60 | #swipebox-action, #swipebox-caption { 61 | position: absolute; 62 | left: 0; 63 | z-index: 999; 64 | height: 50px; 65 | width: 100%; 66 | } 67 | 68 | #swipebox-action { 69 | bottom: -50px; 70 | } 71 | #swipebox-action.visible-bars { 72 | bottom: 0; 73 | } 74 | 75 | #swipebox-action.force-visible-bars { 76 | bottom: 0!important; 77 | } 78 | 79 | #swipebox-caption { 80 | top: -50px; 81 | text-align: center; 82 | } 83 | #swipebox-caption.visible-bars { 84 | top: 0; 85 | } 86 | 87 | #swipebox-caption.force-visible-bars { 88 | top: 0!important; 89 | } 90 | 91 | #swipebox-action #swipebox-prev, #swipebox-action #swipebox-next, 92 | #swipebox-action #swipebox-close { 93 | background-image: url(../images/icons.png); 94 | background-repeat: no-repeat; 95 | border: none!important; 96 | text-decoration: none!important; 97 | cursor: pointer; 98 | position: absolute; 99 | width: 50px; 100 | height: 50px; 101 | top: 0; 102 | } 103 | 104 | #swipebox-action #swipebox-close { 105 | background-position: 15px 12px; 106 | left: 40px; 107 | } 108 | 109 | #swipebox-action #swipebox-prev { 110 | background-position: -32px 13px; 111 | right: 100px; 112 | } 113 | 114 | #swipebox-action #swipebox-next { 115 | background-position: -78px 13px; 116 | right: 40px; 117 | } 118 | 119 | #swipebox-action #swipebox-prev.disabled, 120 | #swipebox-action #swipebox-next.disabled { 121 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30); 122 | opacity: 0.3; 123 | } 124 | 125 | #swipebox-slider.rightSpring { 126 | -moz-animation: rightSpring 0.3s; 127 | -webkit-animation: rightSpring 0.3s; 128 | } 129 | 130 | #swipebox-slider.leftSpring { 131 | -moz-animation: leftSpring 0.3s; 132 | -webkit-animation: leftSpring 0.3s; 133 | } 134 | 135 | @-moz-keyframes rightSpring { 136 | 0% { 137 | margin-left: 0px; 138 | } 139 | 140 | 50% { 141 | margin-left: -30px; 142 | } 143 | 144 | 100% { 145 | margin-left: 0px; 146 | } 147 | } 148 | 149 | @-moz-keyframes leftSpring { 150 | 0% { 151 | margin-left: 0px; 152 | } 153 | 154 | 50% { 155 | margin-left: 30px; 156 | } 157 | 158 | 100% { 159 | margin-left: 0px; 160 | } 161 | } 162 | 163 | @-webkit-keyframes rightSpring { 164 | 0% { 165 | margin-left: 0px; 166 | } 167 | 168 | 50% { 169 | margin-left: -30px; 170 | } 171 | 172 | 100% { 173 | margin-left: 0px; 174 | } 175 | } 176 | 177 | @-webkit-keyframes leftSpring { 178 | 0% { 179 | margin-left: 0px; 180 | } 181 | 182 | 50% { 183 | margin-left: 30px; 184 | } 185 | 186 | 100% { 187 | margin-left: 0px; 188 | } 189 | } 190 | 191 | /* Skin 192 | --------------------------*/ 193 | #swipebox-overlay { 194 | background:rgba(13, 13, 13, 0.88); 195 | } 196 | 197 | #swipebox-action, #swipebox-caption { 198 | text-shadow: 1px 1px 1px black; 199 | background-color: #0d0d0d; 200 | background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0d0d0d), color-stop(100%, #000000)); 201 | background-image: -webkit-linear-gradient(#0d0d0d, #000000); 202 | background-image: -moz-linear-gradient(#0d0d0d, #000000); 203 | background-image: -o-linear-gradient(#0d0d0d, #000000); 204 | background-image: linear-gradient(#0d0d0d, #000000); 205 | -webkit-box-shadow: 0 1px 1px 1px #212121, inset 0 1px 1px 1px black; 206 | -moz-box-shadow: 0 1px 1px 1px #212121, inset 0 1px 1px 1px black; 207 | box-shadow: 0 1px 1px 1px #212121, inset 0 1px 1px 1px black; 208 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=95); 209 | opacity: 0.95; 210 | } 211 | 212 | #swipebox-action { 213 | -webkit-box-shadow: 0 -1px -1px 1px #212121, inset 0 -1px -1px 1px black; 214 | -moz-box-shadow: 0 -1px -1px 1px #212121, inset 0 -1px -1px 1px black; 215 | box-shadow: 0 -1px -1px 1px #212121, inset 0 -1px -1px 1px black; 216 | } 217 | 218 | #swipebox-caption { 219 | color: white!important; 220 | font-size: 15px; 221 | line-height: 43px; 222 | font-family: Helvetica, Arial, sans-serif; 223 | } 224 | @media(max-width:768px){ 225 | #swipebox-slider .slide img { 226 | display: inline-block; 227 | max-height: 100%; 228 | max-width: 91%; 229 | } 230 | } 231 | @media(max-width:480px){ 232 | #swipebox-overlay img { 233 | width: 80%!important; 234 | } 235 | } 236 | -------------------------------------------------------------------------------- /src/main/webapp/html/leaderRestPw.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 修改密码 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 28 | 29 | 30 | 31 | 32 |
33 |
34 | 35 |
36 | 39 |
40 | 41 | 48 | 49 |
50 | 51 | 52 |
53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 |
64 | 68 |
69 | 70 |
71 | 72 |
73 | 74 |
75 | 76 | 77 | 89 | 90 |
91 |
92 | 93 | 108 | 109 | 110 | 116 | -------------------------------------------------------------------------------- /src/main/webapp/html/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录 6 | 7 | 8 | 9 | 10 | 11 |
12 | 36 |
37 | 38 | 89 | 90 | -------------------------------------------------------------------------------- /src/main/webapp/html/manager/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 管理员登录 6 | 7 | 8 | 9 | 10 |
11 | 20 |
21 | 22 | 62 | 63 | -------------------------------------------------------------------------------- /src/main/webapp/html/manager/managerLeaveDetail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 假条详情 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 30 | 31 | 32 | 33 | 34 |
35 |
36 | 37 |
38 |
39 |  40 |
41 | 42 | 49 | 50 |
51 | 52 | 53 |
54 | 55 |
56 |
57 |
58 |
59 |
60 |

假条详情

61 |
62 |
63 |
64 | 65 |
66 | 67 |
68 |
69 |
70 |
71 | 72 |
73 |
74 |
75 | 76 | 77 | 88 | 89 |
90 |
91 | 92 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /src/main/webapp/html/notice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 公告详情 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 30 | 31 | 32 | 33 | 34 |
35 |
36 | 37 |
38 |
39 |  40 |
41 | 42 | 49 | 50 |
51 | 52 | 53 |
54 | 55 |
56 |
57 |
58 |
59 |
60 |

最近公告详情

61 |
62 |
63 | 64 |
65 |
66 |
67 | 68 | 69 | 80 | 81 |
82 |
83 | 84 | 121 | 122 | 123 | 138 | -------------------------------------------------------------------------------- /src/main/webapp/html/studentRestPw.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 修改密码 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 28 | 29 | 30 | 31 | 32 |
33 |
34 | 35 |
36 | 39 |
40 | 41 | 48 | 49 |
50 | 51 | 52 |
53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 |
64 | 68 |
69 | 70 |
71 | 72 |
73 | 74 |
75 | 76 | 77 | 89 | 90 |
91 |
92 | 93 | 108 | 109 | 110 | 116 | -------------------------------------------------------------------------------- /src/main/webapp/html/teacherRestPw.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 修改密码 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 28 | 29 | 30 | 31 | 32 |
33 |
34 | 35 |
36 | 39 |
40 | 41 | 48 | 49 |
50 | 51 | 52 |
53 |
54 |
55 | 56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 |
64 | 68 |
69 | 70 |
71 | 72 |
73 | 74 |
75 | 76 | 77 | 89 | 90 |
91 |
92 | 93 | 108 | 109 | 110 | 116 | -------------------------------------------------------------------------------- /src/main/webapp/images/1-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/1-.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/1.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/1.png -------------------------------------------------------------------------------- /src/main/webapp/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/10.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/10.png -------------------------------------------------------------------------------- /src/main/webapp/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/11.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/11.png -------------------------------------------------------------------------------- /src/main/webapp/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/12.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/12.png -------------------------------------------------------------------------------- /src/main/webapp/images/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/13.png -------------------------------------------------------------------------------- /src/main/webapp/images/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/14.png -------------------------------------------------------------------------------- /src/main/webapp/images/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/15.png -------------------------------------------------------------------------------- /src/main/webapp/images/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/16.png -------------------------------------------------------------------------------- /src/main/webapp/images/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/17.png -------------------------------------------------------------------------------- /src/main/webapp/images/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/18.png -------------------------------------------------------------------------------- /src/main/webapp/images/2-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/2-.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/2.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/2.png -------------------------------------------------------------------------------- /src/main/webapp/images/3-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/3-.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/3.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/3.png -------------------------------------------------------------------------------- /src/main/webapp/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/4.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/4.png -------------------------------------------------------------------------------- /src/main/webapp/images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/5.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/5.png -------------------------------------------------------------------------------- /src/main/webapp/images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/6.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/6.png -------------------------------------------------------------------------------- /src/main/webapp/images/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/7.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/7.png -------------------------------------------------------------------------------- /src/main/webapp/images/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/8.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/8.png -------------------------------------------------------------------------------- /src/main/webapp/images/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/9.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/9.png -------------------------------------------------------------------------------- /src/main/webapp/images/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/a.png -------------------------------------------------------------------------------- /src/main/webapp/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/arrow.png -------------------------------------------------------------------------------- /src/main/webapp/images/back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/back.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/ban.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/ban.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/bann.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/bann.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/car.png -------------------------------------------------------------------------------- /src/main/webapp/images/cc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/cc.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/chat.png -------------------------------------------------------------------------------- /src/main/webapp/images/co.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/co.png -------------------------------------------------------------------------------- /src/main/webapp/images/comments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/comments.png -------------------------------------------------------------------------------- /src/main/webapp/images/date.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/date.png -------------------------------------------------------------------------------- /src/main/webapp/images/dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/dot.png -------------------------------------------------------------------------------- /src/main/webapp/images/ff.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/ff.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/icons.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/webapp/images/img-sp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/img-sp.png -------------------------------------------------------------------------------- /src/main/webapp/images/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/line.png -------------------------------------------------------------------------------- /src/main/webapp/images/line1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/line1.png -------------------------------------------------------------------------------- /src/main/webapp/images/loginBackGround.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/loginBackGround.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/logo.png -------------------------------------------------------------------------------- /src/main/webapp/images/logo001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/logo001.jpg -------------------------------------------------------------------------------- /src/main/webapp/images/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/logo1.png -------------------------------------------------------------------------------- /src/main/webapp/images/male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/male.png -------------------------------------------------------------------------------- /src/main/webapp/images/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/menu.png -------------------------------------------------------------------------------- /src/main/webapp/images/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/message.png -------------------------------------------------------------------------------- /src/main/webapp/images/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/phone.png -------------------------------------------------------------------------------- /src/main/webapp/images/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/plus.png -------------------------------------------------------------------------------- /src/main/webapp/images/supplier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/supplier.png -------------------------------------------------------------------------------- /src/main/webapp/images/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/twitter.png -------------------------------------------------------------------------------- /src/main/webapp/images/windows-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/windows-.png -------------------------------------------------------------------------------- /src/main/webapp/images/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/images/windows.png -------------------------------------------------------------------------------- /src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/webapp/js/dateFormat.js: -------------------------------------------------------------------------------- 1 | Date.prototype.Format = function (fmt) { 2 | var o = { 3 | "M+": this.getMonth() + 1, //月份 4 | "d+": this.getDate(), //日 5 | "H+": this.getHours(), //小时 6 | "m+": this.getMinutes(), //分 7 | "s+": this.getSeconds(), //秒 8 | "q+": Math.floor((this.getMonth() + 3) / 3), //季度 9 | "S": this.getMilliseconds() //毫秒 10 | }; 11 | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); 12 | for (var k in o) 13 | if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); 14 | return fmt; 15 | } -------------------------------------------------------------------------------- /src/main/webapp/js/easing.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php 3 | * 4 | * Uses the built In easIng capabilities added In jQuery 1.1 5 | * to offer multiple easIng options 6 | * 7 | * Copyright (c) 2007 George Smith 8 | * Licensed under the MIT License: 9 | * http://www.opensource.org/licenses/mit-license.php 10 | */ 11 | 12 | // t: current time, b: begInnIng value, c: change In value, d: duration 13 | 14 | jQuery.extend( jQuery.easing, 15 | { 16 | easeInQuad: function (x, t, b, c, d) { 17 | return c*(t/=d)*t + b; 18 | }, 19 | easeOutQuad: function (x, t, b, c, d) { 20 | return -c *(t/=d)*(t-2) + b; 21 | }, 22 | easeInOutQuad: function (x, t, b, c, d) { 23 | if ((t/=d/2) < 1) return c/2*t*t + b; 24 | return -c/2 * ((--t)*(t-2) - 1) + b; 25 | }, 26 | easeInCubic: function (x, t, b, c, d) { 27 | return c*(t/=d)*t*t + b; 28 | }, 29 | easeOutCubic: function (x, t, b, c, d) { 30 | return c*((t=t/d-1)*t*t + 1) + b; 31 | }, 32 | easeInOutCubic: function (x, t, b, c, d) { 33 | if ((t/=d/2) < 1) return c/2*t*t*t + b; 34 | return c/2*((t-=2)*t*t + 2) + b; 35 | }, 36 | easeInQuart: function (x, t, b, c, d) { 37 | return c*(t/=d)*t*t*t + b; 38 | }, 39 | easeOutQuart: function (x, t, b, c, d) { 40 | return -c * ((t=t/d-1)*t*t*t - 1) + b; 41 | }, 42 | easeInOutQuart: function (x, t, b, c, d) { 43 | if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 44 | return -c/2 * ((t-=2)*t*t*t - 2) + b; 45 | }, 46 | easeInQuint: function (x, t, b, c, d) { 47 | return c*(t/=d)*t*t*t*t + b; 48 | }, 49 | easeOutQuint: function (x, t, b, c, d) { 50 | return c*((t=t/d-1)*t*t*t*t + 1) + b; 51 | }, 52 | easeInOutQuint: function (x, t, b, c, d) { 53 | if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 54 | return c/2*((t-=2)*t*t*t*t + 2) + b; 55 | }, 56 | easeInSine: function (x, t, b, c, d) { 57 | return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 58 | }, 59 | easeOutSine: function (x, t, b, c, d) { 60 | return c * Math.sin(t/d * (Math.PI/2)) + b; 61 | }, 62 | easeInOutSine: function (x, t, b, c, d) { 63 | return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 64 | }, 65 | easeInExpo: function (x, t, b, c, d) { 66 | return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 67 | }, 68 | easeOutExpo: function (x, t, b, c, d) { 69 | return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 70 | }, 71 | easeInOutExpo: function (x, t, b, c, d) { 72 | if (t==0) return b; 73 | if (t==d) return b+c; 74 | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 75 | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 76 | }, 77 | easeInCirc: function (x, t, b, c, d) { 78 | return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 79 | }, 80 | easeOutCirc: function (x, t, b, c, d) { 81 | return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 82 | }, 83 | easeInOutCirc: function (x, t, b, c, d) { 84 | if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 85 | return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 86 | }, 87 | easeInElastic: function (x, t, b, c, d) { 88 | var s=1.70158;var p=0;var a=c; 89 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 90 | if (a < Math.abs(c)) { a=c; var s=p/4; } 91 | else var s = p/(2*Math.PI) * Math.asin (c/a); 92 | return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 93 | }, 94 | easeOutElastic: function (x, t, b, c, d) { 95 | var s=1.70158;var p=0;var a=c; 96 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 97 | if (a < Math.abs(c)) { a=c; var s=p/4; } 98 | else var s = p/(2*Math.PI) * Math.asin (c/a); 99 | return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 100 | }, 101 | easeInOutElastic: function (x, t, b, c, d) { 102 | var s=1.70158;var p=0;var a=c; 103 | if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 104 | if (a < Math.abs(c)) { a=c; var s=p/4; } 105 | else var s = p/(2*Math.PI) * Math.asin (c/a); 106 | if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 107 | return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 108 | }, 109 | easeInBack: function (x, t, b, c, d, s) { 110 | if (s == undefined) s = 1.70158; 111 | return c*(t/=d)*t*((s+1)*t - s) + b; 112 | }, 113 | easeOutBack: function (x, t, b, c, d, s) { 114 | if (s == undefined) s = 1.70158; 115 | return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 116 | }, 117 | easeInOutBack: function (x, t, b, c, d, s) { 118 | if (s == undefined) s = 1.70158; 119 | if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 120 | return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 121 | }, 122 | easeInBounce: function (x, t, b, c, d) { 123 | return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 124 | }, 125 | easeOutBounce: function (x, t, b, c, d) { 126 | if ((t/=d) < (1/2.75)) { 127 | return c*(7.5625*t*t) + b; 128 | } else if (t < (2/2.75)) { 129 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 130 | } else if (t < (2.5/2.75)) { 131 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 132 | } else { 133 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 134 | } 135 | }, 136 | easeInOutBounce: function (x, t, b, c, d) { 137 | if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 138 | return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 139 | } 140 | }); 141 | -------------------------------------------------------------------------------- /src/main/webapp/js/leaderIndex.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | //1.初始化Table 4 | var oTable = new TableInit(); 5 | oTable.Init(); 6 | 7 | //2.初始化Button的点击事件 8 | var oButtonInit = new ButtonInit(); 9 | oButtonInit.Init(); 10 | 11 | 12 | //查询 13 | $("#btn_query").click(function (){ 14 | var token = JSON.parse(localStorage.getItem("token")); 15 | 16 | $.ajax({ 17 | type: 'get', 18 | url: "/leave/leaderSlist", 19 | dataType: 'json', 20 | data: { 21 | limit: 10, //页面大小 22 | curPage: 1, //页码 23 | status: $("#statusSelect").val(), 24 | }, 25 | success: function(data){ 26 | console.log(data); 27 | $('#orderTable').bootstrapTable('removeAll'); 28 | $('#orderTable').bootstrapTable('append', data.data); 29 | } 30 | }) 31 | }); 32 | 33 | }); 34 | 35 | var TableInit = function () { 36 | var oTableInit = new Object(); 37 | //初始化Table 38 | oTableInit.Init = function () { 39 | $('#orderTable').bootstrapTable({ 40 | url: '/leave/leaderSlist', //请求后台的URL(*) 41 | method: 'get', //请求方式(*) 42 | toolbar: '#toolbar', //工具按钮用哪个容器 43 | striped: true, //是否显示行间隔色 44 | cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) 45 | pagination: true, //是否显示分页(*) 46 | sortable: false, //是否启用排序 47 | sortOrder: "asc", //排序方式 48 | queryParams: oTableInit.queryParams,//传递参数(*) 49 | sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) 50 | pageNumber:1, //初始化加载第一页,默认第一页 51 | pageSize: 10, //每页的记录行数(*) 52 | pageList: [5,10], //可供选择的每页的行数(*) 53 | search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大 54 | strictSearch: true, 55 | showColumns: true, //是否显示所有的列 56 | showRefresh: true, //是否显示刷新按钮 57 | minimumCountColumns: 2, //最少允许的列数 58 | clickToSelect: true, //是否启用点击选中行 59 | height: 526, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 60 | uniqueId: "ID", //每一行的唯一标识,一般为主键列 61 | showToggle:true, //是否显示详细视图和列表视图的切换按钮 62 | cardView: false, //是否显示详细视图 63 | detailView: false, //是否显示父子表 64 | responseHandler: function(result) { 65 | console.log(result); 66 | return { 67 | //总页数,前面的key必须为"total" 68 | total : result.amount, 69 | //行数据,前面的key要与之前设置的dataField的值一致. 70 | data : result.data 71 | }; 72 | }, 73 | onLoadSuccess: function(data) { 74 | $('#orderTable').bootstrapTable('removeAll'); 75 | $('#orderTable').bootstrapTable('append',data.data); 76 | }, 77 | columns: [ { 78 | field: 'leaveId', 79 | title: '假条编号', 80 | visible:false 81 | },{ 82 | field: 'student.studentId', 83 | title: '学号', 84 | },{ 85 | field: 'student.studentName', 86 | title: '请假人', 87 | // visible:false 88 | }, { 89 | field: 'startTime', 90 | title: '开始时间', 91 | // visible:false 92 | }, { 93 | field: 'endTime', 94 | title: '结束时间' 95 | }, { 96 | field: 'totalDay', 97 | title: '天数' 98 | },{ 99 | field: 'status', 100 | title: '状态', 101 | formatter:function(value,row,index){ 102 | var element = ""; 103 | if(value == 1) { 104 | element = ''+'审批中'+''; 105 | }else if(value == 2){ 106 | element = ''+'通过'+''; 107 | }else if(value == 3) { 108 | element = ''+'未通过'+''; 109 | }else{ 110 | element = ''+value+''; 111 | } 112 | return element; 113 | } 114 | }, { 115 | field: 'tool', 116 | title: '操作', 117 | align: 'center', 118 | formatter:function(value,row,index){ 119 | var element = 120 | "详情 "; 121 | return element; 122 | } 123 | } 124 | ] 125 | }); 126 | }; 127 | 128 | //得到查询的参数 129 | oTableInit.queryParams = function (params) { 130 | var token = JSON.parse(localStorage.getItem("token")); 131 | var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的 132 | limit: params.limit, //页面大小 133 | curPage: parseInt(params.offset)/parseInt(params.limit)+1, //页码 134 | status: $("#statusSelect").val(), 135 | }; 136 | return temp; 137 | }; 138 | return oTableInit; 139 | }; 140 | 141 | 142 | var ButtonInit = function () { 143 | var oInit = new Object(); 144 | var postdata = {}; 145 | 146 | oInit.Init = function () { 147 | //初始化页面上面的按钮事件 148 | }; 149 | 150 | return oInit; 151 | }; 152 | 153 | var validate = function (cause,startTime,endTime) { 154 | if(cause == "" || startTime == "" || endTime == ""){ 155 | return false; 156 | } 157 | return true; 158 | }; 159 | -------------------------------------------------------------------------------- /src/main/webapp/js/loginout.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | //查询 3 | $("#loginout_btn").click(function (){ 4 | 5 | $.ajax({ 6 | type: 'get', 7 | url: "/44551/loginout", 8 | dataType: 'json', 9 | success: function(data){ 10 | window.location.href = "/"; 11 | } 12 | }) 13 | }); 14 | }); -------------------------------------------------------------------------------- /src/main/webapp/js/manager/leaves.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | //1.初始化Table 4 | var oTable = new TableInit(); 5 | oTable.Init(); 6 | 7 | //2.初始化Button的点击事件 8 | var oButtonInit = new ButtonInit(); 9 | oButtonInit.Init(); 10 | 11 | 12 | //查询 13 | $("#btn_query").click(function (){ 14 | var token = JSON.parse(localStorage.getItem("token")); 15 | 16 | $.ajax({ 17 | type: 'get', 18 | url: "/leave/list", 19 | dataType: 'json', 20 | data: { 21 | limit: 10, //页面大小 22 | curPage: 1, //页码 23 | status: $("#statusSelect").val(), 24 | }, 25 | success: function(data){ 26 | console.log(data); 27 | $('#orderTable').bootstrapTable('removeAll'); 28 | $('#orderTable').bootstrapTable('append', data.data); 29 | } 30 | }) 31 | }); 32 | 33 | }); 34 | 35 | var TableInit = function () { 36 | var oTableInit = new Object(); 37 | //初始化Table 38 | oTableInit.Init = function () { 39 | $('#orderTable').bootstrapTable({ 40 | url: '/leave/list', //请求后台的URL(*) 41 | method: 'get', //请求方式(*) 42 | toolbar: '#toolbar', //工具按钮用哪个容器 43 | striped: true, //是否显示行间隔色 44 | cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) 45 | pagination: true, //是否显示分页(*) 46 | sortable: false, //是否启用排序 47 | sortOrder: "asc", //排序方式 48 | queryParams: oTableInit.queryParams,//传递参数(*) 49 | sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) 50 | pageNumber:1, //初始化加载第一页,默认第一页 51 | pageSize: 10, //每页的记录行数(*) 52 | pageList: [5,10], //可供选择的每页的行数(*) 53 | search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大 54 | strictSearch: true, 55 | showColumns: true, //是否显示所有的列 56 | showRefresh: true, //是否显示刷新按钮 57 | minimumCountColumns: 2, //最少允许的列数 58 | clickToSelect: true, //是否启用点击选中行 59 | height: 526, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 60 | uniqueId: "ID", //每一行的唯一标识,一般为主键列 61 | showToggle:true, //是否显示详细视图和列表视图的切换按钮 62 | cardView: false, //是否显示详细视图 63 | detailView: false, //是否显示父子表 64 | responseHandler: function(result) { 65 | console.log(result); 66 | return { 67 | //总页数,前面的key必须为"total" 68 | total : result.amount, 69 | //行数据,前面的key要与之前设置的dataField的值一致. 70 | data : result.data 71 | }; 72 | }, 73 | onLoadSuccess: function(data) { 74 | $('#orderTable').bootstrapTable('removeAll'); 75 | $('#orderTable').bootstrapTable('append',data.data); 76 | }, 77 | columns: [ { 78 | field: 'leaveId', 79 | title: '假条编号', 80 | visible:false 81 | }, { 82 | field: 'student.studentId', 83 | title: '学号', 84 | },{ 85 | field: 'student.studentName', 86 | title: '请假人', 87 | // visible:false 88 | }, { 89 | field: 'startTime', 90 | title: '开始时间', 91 | // visible:false 92 | }, { 93 | field: 'endTime', 94 | title: '结束时间' 95 | }, { 96 | field: 'totalDay', 97 | title: '天数' 98 | },{ 99 | field: 'status', 100 | title: '状态', 101 | formatter:function(value,row,index){ 102 | var element = ""; 103 | if(value == 1) { 104 | element = ''+'审批中'+''; 105 | }else if(value == 2){ 106 | element = ''+'通过'+''; 107 | }else if(value == 3) { 108 | element = ''+'未通过'+''; 109 | }else{ 110 | element = ''+value+''; 111 | } 112 | return element; 113 | } 114 | }, { 115 | field: 'tool', 116 | title: '操作', 117 | align: 'center', 118 | formatter:function(value,row,index){ 119 | var element = 120 | "详情 "; 121 | return element; 122 | } 123 | } 124 | ] 125 | }); 126 | }; 127 | 128 | //得到查询的参数 129 | oTableInit.queryParams = function (params) { 130 | var token = JSON.parse(localStorage.getItem("token")); 131 | var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的 132 | limit: params.limit, //页面大小 133 | curPage: parseInt(params.offset)/parseInt(params.limit)+1, //页码 134 | status: $("#statusSelect").val(), 135 | }; 136 | return temp; 137 | }; 138 | return oTableInit; 139 | }; 140 | 141 | 142 | var ButtonInit = function () { 143 | var oInit = new Object(); 144 | var postdata = {}; 145 | 146 | oInit.Init = function () { 147 | //初始化页面上面的按钮事件 148 | }; 149 | 150 | return oInit; 151 | }; 152 | 153 | var validate = function (cause,startTime,endTime) { 154 | if(cause == "" || startTime == "" || endTime == ""){ 155 | return false; 156 | } 157 | return true; 158 | }; 159 | -------------------------------------------------------------------------------- /src/main/webapp/js/move-top.js: -------------------------------------------------------------------------------- 1 | /* UItoTop jQuery Plugin 1.2 | Matt Varone | http://www.mattvarone.com/web-design/uitotop-jquery-plugin */ 2 | (function($){$.fn.UItoTop=function(options){var defaults={text:'To Top',min:200,inDelay:600,outDelay:400,containerID:'toTop',containerHoverID:'toTopHover',scrollSpeed:1000,easingType:'linear'},settings=$.extend(defaults,options),containerIDhash='#'+settings.containerID,containerHoverIDHash='#'+settings.containerHoverID;$('body').append(''+settings.text+'');$(containerIDhash).hide().on('click.UItoTop',function(){$('html, body').animate({scrollTop:0},settings.scrollSpeed,settings.easingType);$('#'+settings.containerHoverID,this).stop().animate({'opacity':0},settings.inDelay,settings.easingType);return false;}).prepend('').hover(function(){$(containerHoverIDHash,this).stop().animate({'opacity':1},600,'linear');},function(){$(containerHoverIDHash,this).stop().animate({'opacity':0},700,'linear');});$(window).scroll(function(){var sd=$(window).scrollTop();if(typeof document.body.style.maxHeight==="undefined"){$(containerIDhash).css({'position':'absolute','top':sd+$(window).height()-50});} 3 | if(sd>settings.min) 4 | $(containerIDhash).fadeIn(settings.inDelay);else 5 | $(containerIDhash).fadeOut(settings.Outdelay);});};})(jQuery); -------------------------------------------------------------------------------- /src/main/webapp/js/responsiveslides.min.js: -------------------------------------------------------------------------------- 1 | /*! http://responsiveslides.com v1.54 by @viljamis */ 2 | (function(c,I,B){c.fn.responsiveSlides=function(l){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:c.noop,after:c.noop},l);return this.each(function(){B++;var f=c(this),s,r,t,m,p,q,n=0,e=f.children(),C=e.size(),h=parseFloat(a.speed),D=parseFloat(a.timeout),u=parseFloat(a.maxwidth),g=a.namespace,d=g+B,E=g+"_nav "+d+"_nav",v=g+"_here",j=d+"_on", 3 | w=d+"_s",k=c("
    "),x={"float":"left",position:"relative",opacity:1,zIndex:2},y={"float":"none",position:"absolute",opacity:0,zIndex:1},F=function(){var b=(document.body||document.documentElement).style,a="transition";if("string"===typeof b[a])return!0;s=["Moz","Webkit","Khtml","O","ms"];var a=a.charAt(0).toUpperCase()+a.substr(1),c;for(c=0;c"+a+""});k.append(A);l.navContainer?c(a.navContainer).append(k):f.after(k)}a.manualControls&&(k=c(a.manualControls),k.addClass(g+"_tabs "+d+"_tabs"));(a.pager||a.manualControls)&&k.find("li").each(function(a){c(this).addClass(w+(a+1))});if(a.pager||a.manualControls)q= 6 | k.find("a"),r=function(a){q.closest("li").removeClass(v).eq(a).addClass(v)};a.auto&&(t=function(){p=setInterval(function(){e.stop(!0,!0);var b=n+1"+a.prevText+"";l.navContainer?c(a.navContainer).append(g):f.after(g);var d=c("."+d+"_nav"),G=d.filter(".prev");d.bind("click",function(b){b.preventDefault();b=c("."+j);if(!b.queue("fx").length){var d=e.index(b);b=d-1;d=d+1u&&f.css("width",u)};H();c(I).bind("resize",function(){H()})}})}})(jQuery,this,0); 9 | -------------------------------------------------------------------------------- /src/main/webapp/js/restPw.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $("#btn_submit").click(function(){ 3 | 4 | var password = $("#password").val(); 5 | var repassword = $("#repassword").val(); 6 | var token = JSON.parse(localStorage.getItem("token")); 7 | console.log("修改密码 token.no:"+token.no); 8 | console.log("修改密码 token.roleId:"+token.roleId); 9 | 10 | if(validate(password,repassword)){ 11 | $.ajax({ 12 | type: "put", 13 | url: '/44551/resetpassw', 14 | data: { 15 | "id": token.no, 16 | "password": password, 17 | "role": token.roleId 18 | }, 19 | dataType: "json", 20 | success: function (data) { 21 | if (data.code == 1) { 22 | alert("修改成功"); 23 | window.location.href="login.html"; 24 | } 25 | else { 26 | alert("修改失败"); 27 | } 28 | }, 29 | error: function () { 30 | alert("修改失败"); 31 | } 32 | }); 33 | } 34 | }); 35 | 36 | $("#back_btn").click(function(){ 37 | window.history.back(); 38 | }); 39 | }); 40 | 41 | function validate(password,repassword) { 42 | if(password == "" || repassword == ""){ 43 | alert("请输入新密码"); 44 | return false; 45 | } 46 | if(password != repassword){ 47 | alert("两次输入的密码不一致"); 48 | return false; 49 | } 50 | return true; 51 | } 52 | -------------------------------------------------------------------------------- /src/main/webapp/js/teacherIndex.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | //1.初始化Table 4 | var oTable = new TableInit(); 5 | oTable.Init(); 6 | 7 | //2.初始化Button的点击事件 8 | var oButtonInit = new ButtonInit(); 9 | oButtonInit.Init(); 10 | 11 | 12 | //查询 13 | $("#btn_query").click(function (){ 14 | var token = JSON.parse(localStorage.getItem("token")); 15 | 16 | $.ajax({ 17 | type: 'get', 18 | url: "/leave/teacherSlist", 19 | dataType: 'json', 20 | data: { 21 | limit: 10, //页面大小 22 | curPage: 1, //页码 23 | status: $("#statusSelect").val(), 24 | teacherId:token.no 25 | }, 26 | success: function(data){ 27 | console.log(data); 28 | $('#orderTable').bootstrapTable('removeAll'); 29 | $('#orderTable').bootstrapTable('append', data.data); 30 | } 31 | }) 32 | }); 33 | 34 | }); 35 | 36 | var TableInit = function () { 37 | var oTableInit = new Object(); 38 | //初始化Table 39 | oTableInit.Init = function () { 40 | $('#orderTable').bootstrapTable({ 41 | url: '/leave/teacherSlist', //请求后台的URL(*) 42 | method: 'get', //请求方式(*) 43 | toolbar: '#toolbar', //工具按钮用哪个容器 44 | striped: true, //是否显示行间隔色 45 | cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) 46 | pagination: true, //是否显示分页(*) 47 | sortable: false, //是否启用排序 48 | sortOrder: "asc", //排序方式 49 | queryParams: oTableInit.queryParams,//传递参数(*) 50 | sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) 51 | pageNumber:1, //初始化加载第一页,默认第一页 52 | pageSize: 10, //每页的记录行数(*) 53 | pageList: [5,10], //可供选择的每页的行数(*) 54 | search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大 55 | strictSearch: true, 56 | showColumns: true, //是否显示所有的列 57 | showRefresh: true, //是否显示刷新按钮 58 | minimumCountColumns: 2, //最少允许的列数 59 | clickToSelect: true, //是否启用点击选中行 60 | height: 526, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 61 | uniqueId: "ID", //每一行的唯一标识,一般为主键列 62 | showToggle:true, //是否显示详细视图和列表视图的切换按钮 63 | cardView: false, //是否显示详细视图 64 | detailView: false, //是否显示父子表 65 | responseHandler: function(result) { 66 | console.log(result); 67 | return { 68 | //总页数,前面的key必须为"total" 69 | total : result.amount, 70 | //行数据,前面的key要与之前设置的dataField的值一致. 71 | data : result.data 72 | }; 73 | }, 74 | onLoadSuccess: function(data) { 75 | $('#orderTable').bootstrapTable('removeAll'); 76 | $('#orderTable').bootstrapTable('append',data.data); 77 | }, 78 | columns: [ { 79 | field: 'leaveId', 80 | title: '假条编号', 81 | visible:false 82 | }, { 83 | field: 'student.studentId', 84 | title: '学号', 85 | },{ 86 | field: 'student.studentName', 87 | title: '请假人', 88 | // visible:false 89 | }, { 90 | field: 'startTime', 91 | title: '开始时间', 92 | // visible:false 93 | }, { 94 | field: 'endTime', 95 | title: '结束时间' 96 | }, { 97 | field: 'totalDay', 98 | title: '天数' 99 | },{ 100 | field: 'status', 101 | title: '状态', 102 | formatter:function(value,row,index){ 103 | var element = ""; 104 | if(value == 1) { 105 | element = ''+'审批中'+''; 106 | }else if(value == 2){ 107 | element = ''+'通过'+''; 108 | }else if(value == 3) { 109 | element = ''+'未通过'+''; 110 | }else{ 111 | element = ''+value+''; 112 | } 113 | return element; 114 | } 115 | }, { 116 | field: 'tool', 117 | title: '操作', 118 | align: 'center', 119 | formatter:function(value,row,index){ 120 | var element = 121 | "详情 "; 122 | return element; 123 | } 124 | } 125 | ] 126 | }); 127 | }; 128 | 129 | //得到查询的参数 130 | oTableInit.queryParams = function (params) { 131 | var token = JSON.parse(localStorage.getItem("token")); 132 | var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的 133 | limit: params.limit, //页面大小 134 | curPage: parseInt(params.offset)/parseInt(params.limit)+1, //页码 135 | status: $("#statusSelect").val(), 136 | teacherId:token.no 137 | }; 138 | return temp; 139 | }; 140 | return oTableInit; 141 | }; 142 | 143 | 144 | var ButtonInit = function () { 145 | var oInit = new Object(); 146 | var postdata = {}; 147 | 148 | oInit.Init = function () { 149 | //初始化页面上面的按钮事件 150 | }; 151 | 152 | return oInit; 153 | }; 154 | 155 | var validate = function (cause,startTime,endTime) { 156 | if(cause == "" || startTime == "" || endTime == ""){ 157 | return false; 158 | } 159 | return true; 160 | }; 161 | -------------------------------------------------------------------------------- /src/main/webapp/resource/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/resource/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/resource/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/resource/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/resource/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/resource/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/resource/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fullen2018/leaveSystem/ea74471d53b162a0552abd1f0661e7e9d85aedb1/src/main/webapp/resource/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/resource/bootstrap-3.3.7-dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/main/webapp/resource/bootstrap-table/bootstrap-table-zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstrap Table Chinese translation 3 | * Author: Zhixin Wen 4 | */ 5 | (function ($) { 6 | 'use strict'; 7 | 8 | $.fn.bootstrapTable.locales['zh-CN'] = { 9 | formatLoadingMessage: function () { 10 | return '正在努力地加载数据中,请稍候……'; 11 | }, 12 | formatRecordsPerPage: function (pageNumber) { 13 | return '每页显示 ' + pageNumber + ' 条记录'; 14 | }, 15 | formatShowingRows: function (pageFrom, pageTo, totalRows) { 16 | return '显示第 ' + pageFrom + ' 到第 ' + pageTo + ' 条记录,总共 ' + totalRows + ' 条记录'; 17 | }, 18 | formatSearch: function () { 19 | return '搜索'; 20 | }, 21 | formatNoMatches: function () { 22 | return '没有找到匹配的记录'; 23 | }, 24 | formatPaginationSwitch: function () { 25 | return '隐藏/显示分页'; 26 | }, 27 | formatRefresh: function () { 28 | return '刷新'; 29 | }, 30 | formatToggle: function () { 31 | return '切换'; 32 | }, 33 | formatColumns: function () { 34 | return '列'; 35 | }, 36 | formatExport: function () { 37 | return '导出数据'; 38 | }, 39 | formatClearFilters: function () { 40 | return '清空过滤'; 41 | } 42 | }; 43 | 44 | $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']); 45 | 46 | })(jQuery); 47 | -------------------------------------------------------------------------------- /src/test/java/edu/develop/leave/LeaveApplicationTests.java: -------------------------------------------------------------------------------- 1 | package edu.develop.leave; 2 | 3 | import edu.develop.leave.model.ClassModel; 4 | import edu.develop.leave.model.StudentModel; 5 | import edu.develop.leave.model.TeacherModel; 6 | import edu.develop.leave.service.ClassService; 7 | import edu.develop.leave.service.StudentService; 8 | import edu.develop.leave.service.TeacherService; 9 | import org.junit.Test; 10 | import org.junit.runner.RunWith; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.boot.test.context.SpringBootTest; 13 | import org.springframework.test.context.junit4.SpringRunner; 14 | 15 | import java.util.List; 16 | import java.util.Random; 17 | 18 | @RunWith(SpringRunner.class) 19 | @SpringBootTest 20 | public class LeaveApplicationTests { 21 | 22 | @Autowired 23 | StudentService studentService; 24 | 25 | @Autowired 26 | ClassService classService; 27 | 28 | @Autowired 29 | TeacherService teacherService; 30 | 31 | 32 | 33 | // 添加测试数据 34 | @Test 35 | public void contextLoads() throws Exception { 36 | setStudentName(); 37 | // studentAdd(); 38 | } 39 | 40 | /** 41 | * 添加班级 42 | * @throws Exception 43 | */ 44 | private void classAdd() throws Exception{ 45 | 46 | // 获取所有的班级 47 | List classModelList = classService.findAllClass(); 48 | 49 | for(int i = 1; i < classModelList.size(); i++){ 50 | TeacherModel teacherModel = new TeacherModel(classModelList.get(i).getClassId() 51 | ,2 52 | ,"教师"+i 53 | ,"123456"); 54 | teacherService.add(teacherModel); 55 | } 56 | } 57 | 58 | /** 59 | * 添加学生 60 | */ 61 | private void studentAdd() throws Exception { 62 | // 获取所有的班级 63 | List classModelList = classService.findAllClass(); 64 | 65 | for(int i = 0; i < 300; i++){ 66 | int classIndex = (int)(Math.random()*8); 67 | StudentModel studentModel = new StudentModel(); 68 | studentModel.setRoleId(1); 69 | studentModel.setStudentName("学生"+i); 70 | studentModel.setClassId(classModelList.get(classIndex).getClassId()); 71 | studentModel.setStudentPassword("123456"); 72 | studentService.add(studentModel); 73 | } 74 | } 75 | 76 | /** 77 | * 修改学生名字 78 | */ 79 | private void setStudentName() throws Exception{ 80 | Long amount = studentService.queryAmount(null); 81 | 82 | List stuList = studentService.list(1,amount.intValue(),null); 83 | 84 | int i = 1; 85 | for (StudentModel stu: 86 | stuList) { 87 | StudentModel studentModel = new StudentModel(); 88 | studentModel.setStudentId(stu.getStudentId()); 89 | studentModel.setStudentName("学生"+i); 90 | studentService.update(studentModel); 91 | i++; 92 | } 93 | 94 | } 95 | 96 | } 97 | --------------------------------------------------------------------------------