├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── document
├── Mind-mapping.png
├── index_evaluation.sql
├── show01.png
├── show02.png
├── show03.png
├── show04.png
├── show05.png
└── show06.png
├── pom.xml
├── src
├── main
│ ├── java
│ │ └── org
│ │ │ └── wlgzs
│ │ │ └── index_evaluation
│ │ │ ├── IndexEvaluationApplication.java
│ │ │ ├── ServletInitializer.java
│ │ │ ├── config
│ │ │ ├── DruidStatFilter.java
│ │ │ ├── DruidStatViewServlet.java
│ │ │ ├── ErrorHandler.java
│ │ │ ├── FilterConfig.java
│ │ │ └── MybatisPlusConfig.java
│ │ │ ├── controller
│ │ │ ├── CollegeController.java
│ │ │ ├── EmployerSatisfactionController.java
│ │ │ ├── EmploymentController.java
│ │ │ ├── EmploymentPracticeController.java
│ │ │ ├── EmploymentRateController.java
│ │ │ ├── LastController.java
│ │ │ ├── MainsiteErrorController.java
│ │ │ ├── MajorController.java
│ │ │ ├── StudentQualityController.java
│ │ │ ├── TeachersStructureController.java
│ │ │ ├── UserController.java
│ │ │ └── YearController.java
│ │ │ ├── dao
│ │ │ ├── CollegeMapper.java
│ │ │ ├── EmployerSatisfactionMapper.java
│ │ │ ├── EmploymentMapper.java
│ │ │ ├── EmploymentPracticeMapper.java
│ │ │ ├── EmploymentRateMapper.java
│ │ │ ├── GradeMapper.java
│ │ │ ├── MajorDao.java
│ │ │ ├── StudentQualityMapper.java
│ │ │ ├── SuperMapper.java
│ │ │ ├── TeachersStructureMapper.java
│ │ │ ├── UserDao.java
│ │ │ └── YearDao.java
│ │ │ ├── enums
│ │ │ ├── Result.java
│ │ │ └── ResultCodeEnum.java
│ │ │ ├── filter
│ │ │ └── LoginFilter.java
│ │ │ ├── pojo
│ │ │ ├── College.java
│ │ │ ├── Echars.java
│ │ │ ├── EmployerSatisfaction.java
│ │ │ ├── Employment.java
│ │ │ ├── EmploymentPractice.java
│ │ │ ├── EmploymentRate.java
│ │ │ ├── ExcelBean.java
│ │ │ ├── Grade.java
│ │ │ ├── Last.java
│ │ │ ├── Major.java
│ │ │ ├── Query.java
│ │ │ ├── StudentQuality.java
│ │ │ ├── TeachersStructure.java
│ │ │ ├── User.java
│ │ │ └── Year.java
│ │ │ ├── service
│ │ │ ├── CollegeService.java
│ │ │ ├── EmployerSatisfactionService.java
│ │ │ ├── EmploymentPracticeService.java
│ │ │ ├── EmploymentRateService.java
│ │ │ ├── EmploymentService.java
│ │ │ ├── GradeService.java
│ │ │ ├── MajorService.java
│ │ │ ├── StudentQualityService.java
│ │ │ ├── TeachersStructureService.java
│ │ │ ├── UserService.java
│ │ │ ├── YearService.java
│ │ │ └── impl
│ │ │ │ ├── CollegeServiceImpl.java
│ │ │ │ ├── EmployerSatisfactionServiceImpl.java
│ │ │ │ ├── EmploymentPracticeServiceImpl.java
│ │ │ │ ├── EmploymentRateServiceImpl.java
│ │ │ │ ├── EmploymentServiceImpl.java
│ │ │ │ ├── GradeServiceImpl.java
│ │ │ │ ├── MajorServiceImpl.java
│ │ │ │ ├── StudentQualityServiceImpl.java
│ │ │ │ ├── TeachersStructureServiceImpl.java
│ │ │ │ ├── UserServiceImpl.java
│ │ │ │ └── YearServiceImpl.java
│ │ │ └── util
│ │ │ ├── DateConveter.java
│ │ │ ├── ExcelExport.java
│ │ │ ├── ExcelUtil.java
│ │ │ ├── ExcelUtilPratice.java
│ │ │ ├── ExcelUtilRate.java
│ │ │ └── ExportUtilTeachersStructure.java
│ └── resources
│ │ ├── application-dev.yml
│ │ ├── application-prod.yml
│ │ ├── application.yml
│ │ ├── rebel.xml
│ │ ├── static
│ │ ├── assets
│ │ │ └── js
│ │ │ │ ├── EasePack.min.js
│ │ │ │ ├── TweenLite.min.js
│ │ │ │ ├── custom.js
│ │ │ │ ├── exploding-triangles.js
│ │ │ │ ├── jquery-2.2.1.min.js
│ │ │ │ ├── jquery.magnific-popup.min.js
│ │ │ │ └── jquery.validate.min.js
│ │ ├── css
│ │ │ ├── Being-interviewed.css
│ │ │ ├── Enrolment.css
│ │ │ ├── bootstrap.css
│ │ │ ├── error.css
│ │ │ ├── index.css
│ │ │ ├── matter.css
│ │ │ ├── perinfor.css
│ │ │ ├── result.css
│ │ │ ├── set.css
│ │ │ ├── style.css
│ │ │ ├── style1.css
│ │ │ └── text.css
│ │ ├── dist
│ │ │ ├── css
│ │ │ │ └── txt.wav.css
│ │ │ └── js
│ │ │ │ └── txt.wav.min.js
│ │ ├── font-awesome-4.7.0
│ │ │ ├── HELP-US-OUT.txt
│ │ │ ├── css
│ │ │ │ ├── font-awesome.css
│ │ │ │ └── font-awesome.min.css
│ │ │ ├── fonts
│ │ │ │ ├── FontAwesome.otf
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ ├── fontawesome-webfont.woff
│ │ │ │ └── fontawesome-webfont.woff2
│ │ │ ├── less
│ │ │ │ ├── animated.less
│ │ │ │ ├── bordered-pulled.less
│ │ │ │ ├── core.less
│ │ │ │ ├── fixed-width.less
│ │ │ │ ├── font-awesome.less
│ │ │ │ ├── icons.less
│ │ │ │ ├── larger.less
│ │ │ │ ├── list.less
│ │ │ │ ├── mixins.less
│ │ │ │ ├── path.less
│ │ │ │ ├── rotated-flipped.less
│ │ │ │ ├── screen-reader.less
│ │ │ │ ├── stacked.less
│ │ │ │ └── variables.less
│ │ │ └── scss
│ │ │ │ ├── _animated.scss
│ │ │ │ ├── _bordered-pulled.scss
│ │ │ │ ├── _core.scss
│ │ │ │ ├── _fixed-width.scss
│ │ │ │ ├── _icons.scss
│ │ │ │ ├── _larger.scss
│ │ │ │ ├── _list.scss
│ │ │ │ ├── _mixins.scss
│ │ │ │ ├── _path.scss
│ │ │ │ ├── _rotated-flipped.scss
│ │ │ │ ├── _screen-reader.scss
│ │ │ │ ├── _stacked.scss
│ │ │ │ ├── _variables.scss
│ │ │ │ └── font-awesome.scss
│ │ ├── images
│ │ │ ├── a1.jpg
│ │ │ ├── a2.jpg
│ │ │ ├── favicon.ico
│ │ │ ├── top.png
│ │ │ └── top1.png
│ │ └── js
│ │ │ ├── Being-interviewed.js
│ │ │ ├── Enrolment.js
│ │ │ ├── Particleground.js
│ │ │ ├── bootstrap.min.js
│ │ │ ├── echarts.js
│ │ │ ├── index.js
│ │ │ ├── jquery-2.1.0.js
│ │ │ ├── jquery.js
│ │ │ ├── login.js
│ │ │ ├── result.js
│ │ │ ├── set.js
│ │ │ ├── testnode.js
│ │ │ └── verificationNumbers.js
│ │ └── templates
│ │ ├── 404.html
│ │ ├── 500.html
│ │ ├── Being-interviewed.html
│ │ ├── Echars.html
│ │ ├── collegeAdministration.html
│ │ ├── employment.html
│ │ ├── employmentPractice.html
│ │ ├── employmentRate.html
│ │ ├── index.html
│ │ ├── login.html
│ │ ├── result.html
│ │ ├── set.html
│ │ └── yearAdministration.html
└── test
│ └── java
│ └── org
│ └── wlgzs
│ └── index_evaluation
│ └── IndexEvaluationApplicationTests.java
└── template
├── 就业工作考核数据分析系统使用说明书.pdf
└── 就业工作考核数据分析系统模板.zip
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=java
2 | *.css linguist-language=java
3 | *.html linguist-language=java
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
indexEvaluation
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | #### 项目介绍
14 |
15 | 就业数据对于高校单位的招生就业处来说,是考核工作成效的重要指标。目前好多高校依然处于管理人员手工通过Excel进行计算的阶段,对于每年上万学生毕业就业的高校来说,数据量巨大,运算复杂。并且人工运算出错率高,速度缓慢。
16 |
17 | 本系统用于分析《本科毕业生就业竞争力指数评价体系》的一整套系统,对生源质量指数、师资结构指数、就业状态指数、就业率指数、用人单位满意度指数、就业创业实践指数进行分析计算,数据一键导入,分析数据一键导出,最终通过导出总表的方式,完成对就业工作考核。将管理人员从传统枯燥乏味的分析计算中解脱出来,极大的提高了办公效率。
18 |
19 | #### 模块介绍
20 |
21 |
22 |
23 | #### 技术选型
24 |
25 | | 框架 | 说明 | 版本 |
26 | | :-------------------------------------------------------: | :-------------------: | :-----: |
27 | | [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.1.1 |
28 | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 |
29 | | [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.1.9 |
30 | | [MyBatis](http://www.mybatis.org/mybatis-3/zh/index.html) | 数据持久层框架 | 3.4.6 |
31 | | [MyBatis-Plus](https://mp.baomidou.com/) | Mybatis 增强工具包 | 3.0-RC3 |
32 | | [Poi](http://poi.apache.org/) | Office解析库 | 3.9 |
33 | | [Ant](https://ant.apache.org/) | 自动化工具包 | 1.9.4 |
34 | | [Thymeleaf](https://www.thymeleaf.org/) | 扩展性强的模板引擎 | 3.0.11 |
35 |
36 | #### 部分页面展示
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/document/Mind-mapping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/futureGroup2017/index-evaluation/be2eb46342c4e54d8f8aec4be324f0a9a59a6f87/document/Mind-mapping.png
--------------------------------------------------------------------------------
/document/show01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/futureGroup2017/index-evaluation/be2eb46342c4e54d8f8aec4be324f0a9a59a6f87/document/show01.png
--------------------------------------------------------------------------------
/document/show02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/futureGroup2017/index-evaluation/be2eb46342c4e54d8f8aec4be324f0a9a59a6f87/document/show02.png
--------------------------------------------------------------------------------
/document/show03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/futureGroup2017/index-evaluation/be2eb46342c4e54d8f8aec4be324f0a9a59a6f87/document/show03.png
--------------------------------------------------------------------------------
/document/show04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/futureGroup2017/index-evaluation/be2eb46342c4e54d8f8aec4be324f0a9a59a6f87/document/show04.png
--------------------------------------------------------------------------------
/document/show05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/futureGroup2017/index-evaluation/be2eb46342c4e54d8f8aec4be324f0a9a59a6f87/document/show05.png
--------------------------------------------------------------------------------
/document/show06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/futureGroup2017/index-evaluation/be2eb46342c4e54d8f8aec4be324f0a9a59a6f87/document/show06.png
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | org.wlgzs
7 | index_evaluation
8 | 0.0.1-SNAPSHOT
9 | jar
10 |
11 |
12 | index_evaluation
13 | Demo project for Spring Boot
14 |
15 |
16 | org.springframework.boot
17 | spring-boot-starter-parent
18 | 2.1.1.RELEASE
19 |
20 |
21 |
22 |
23 |
24 |
25 | aliyun
26 | http://maven.aliyun.com/nexus/content/groups/public/
27 |
28 |
29 |
30 |
31 | 1.8
32 | 3.0-RC3
33 | 5.1.47
34 | 1.1.9
35 | 3.9
36 | 1.9.4
37 |
38 |
39 |
40 |
41 |
42 | org.springframework.boot
43 | spring-boot-starter-jdbc
44 |
45 |
46 |
47 | org.springframework.boot
48 | spring-boot-starter-thymeleaf
49 |
50 |
51 |
52 | org.springframework.boot
53 | spring-boot-starter-web
54 |
55 |
56 |
61 |
62 |
63 |
64 | mysql
65 | mysql-connector-java
66 | ${mysql.version}
67 |
68 |
69 |
70 | com.alibaba
71 | druid-spring-boot-starter
72 | ${druid.version}
73 |
74 |
75 |
76 | org.apache.poi
77 | poi
78 | ${poi.version}
79 |
80 |
81 | org.apache.poi
82 | poi-ooxml
83 | ${poi.version}
84 |
85 |
86 | org.springframework.boot
87 | spring-boot-starter-test
88 | test
89 |
90 |
91 |
92 |
93 | com.baomidou
94 | mybatis-plus-boot-starter
95 | ${mybatis-plus-boot-starter.version}
96 |
97 |
98 |
99 | org.springframework.boot
100 | spring-boot-starter-jetty
101 |
102 |
103 |
104 | org.projectlombok
105 | lombok
106 | true
107 |
108 |
109 |
110 | org.apache.ant
111 | ant
112 | ${ant.version}
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | org.springframework.boot
122 | spring-boot-maven-plugin
123 |
124 |
125 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/IndexEvaluationApplication.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | //注释部分打war包时需要
8 | //@ServletComponentScan
9 | //public class IndexEvaluationApplication extends SpringBootServletInitializer {
10 | public class IndexEvaluationApplication {
11 |
12 | /*@Override
13 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
14 | return application.sources(IndexEvaluationApplication.class);
15 | }*/
16 |
17 | public static void main(String[] args) {
18 | SpringApplication.run(IndexEvaluationApplication.class, args);
19 | }
20 |
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/ServletInitializer.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation;
2 |
3 | import org.springframework.boot.builder.SpringApplicationBuilder;
4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
5 |
6 | /**
7 | * @author zsh
8 | * @company wlgzs
9 | * @create 2019-01-12 12:01
10 | * @Describe 序列化
11 | */
12 | public class ServletInitializer extends SpringBootServletInitializer {
13 |
14 | @Override
15 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
16 | return application.sources(IndexEvaluationApplication.class);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/config/DruidStatFilter.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.config;
2 |
3 | import com.alibaba.druid.support.http.WebStatFilter;
4 |
5 | import javax.servlet.annotation.WebFilter;
6 | import javax.servlet.annotation.WebInitParam;
7 |
8 | /**
9 | druid过滤器
10 | */
11 | @WebFilter(filterName = "druidWebStatFilter", urlPatterns = "/*", initParams = {
12 | // 忽略资源
13 | @WebInitParam(name = "exclusions", value = "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*") })
14 | public class DruidStatFilter extends WebStatFilter {
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/config/DruidStatViewServlet.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.config;
2 |
3 | import com.alibaba.druid.support.http.StatViewServlet;
4 |
5 | import javax.servlet.annotation.WebInitParam;
6 | import javax.servlet.annotation.WebServlet;
7 |
8 | /**
9 | * druid数据源状态监控
10 | */
11 | @WebServlet(urlPatterns = "/druid/*", initParams = {
12 | // IP白名单 (没有配置或者为空,则允许所有访问)
13 | @WebInitParam(name = "allow", value = "wlgzs.org,127.0.0.1"),
14 | // IP黑名单 (存在共同时,deny优先于allow)
15 | @WebInitParam(name = "deny", value = "wlgzs.org"),
16 | // 用户名
17 | @WebInitParam(name = "loginUsername", value = "admin"),
18 | // 密码
19 | @WebInitParam(name = "loginPassword", value = "admin"),
20 | // 禁用HTML页面上的“Reset All”功能
21 | @WebInitParam(name = "resetEnable", value = "false") })
22 | @SuppressWarnings("serial")
23 | public class DruidStatViewServlet extends StatViewServlet {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/config/ErrorHandler.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.config;
2 |
3 | import org.slf4j.Logger;
4 | import org.slf4j.LoggerFactory;
5 | import org.springframework.http.HttpStatus;
6 | import org.springframework.web.bind.annotation.ControllerAdvice;
7 | import org.springframework.web.bind.annotation.ExceptionHandler;
8 | import org.springframework.web.bind.annotation.ResponseStatus;
9 |
10 | @ControllerAdvice
11 | public class ErrorHandler {
12 |
13 | private final Logger log = LoggerFactory.getLogger(getClass());
14 |
15 | // TODO add MethodArgumentNotValidException handler
16 | // TODO remove such general handler
17 | @ExceptionHandler(IllegalArgumentException.class)
18 | @ResponseStatus(HttpStatus.BAD_REQUEST)
19 | public void processValidationError(IllegalArgumentException e) {
20 | log.info("Returning HTTP 400 Bad Request", e);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/config/FilterConfig.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.config;
2 |
3 | import org.springframework.boot.web.servlet.FilterRegistrationBean;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.wlgzs.index_evaluation.filter.LoginFilter;
7 |
8 |
9 | /**
10 | * @author zsh
11 | * @company wlgzs
12 | * @create 2019-01-20 8:35
13 | * @Describe 过滤器配置
14 | */
15 |
16 | @Configuration
17 | public class FilterConfig {
18 |
19 | @Bean
20 | public FilterRegistrationBean someFilterRegistration1() {
21 | //新建过滤器注册类
22 | FilterRegistrationBean registration = new FilterRegistrationBean();
23 | // 添加我们写好的过滤器
24 | registration.setFilter(new LoginFilter());
25 | // 设置过滤器的URL模式
26 | registration.addUrlPatterns("/*");
27 | return registration;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/config/MybatisPlusConfig.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.config;
2 |
3 | import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
4 | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
5 | import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor;
6 | import org.mybatis.spring.annotation.MapperScan;
7 | import org.springframework.boot.context.properties.ConfigurationProperties;
8 | import org.springframework.context.annotation.Bean;
9 | import org.springframework.context.annotation.Configuration;
10 |
11 | import javax.sql.DataSource;
12 |
13 | /**
14 | * Description : MybatisPlus配置
15 | */
16 | @Configuration
17 | @MapperScan("org.wlgzs.index_evaluation.dao")
18 | public class MybatisPlusConfig {
19 | /***
20 | * plus 的性能优化
21 | */
22 | @Bean
23 | public PerformanceInterceptor performanceInterceptor() {
24 | return new PerformanceInterceptor();
25 | }
26 | /**
27 | * Description : mybatis-plus分页插件
28 | */
29 | @Bean
30 | public PaginationInterceptor paginationInterceptor() {
31 | return new PaginationInterceptor();
32 | }
33 | /**
34 | * Description : druid注入
35 | */
36 | @Bean
37 | @ConfigurationProperties("spring.datasource.druid")
38 | public DataSource dataSource() {
39 | return DruidDataSourceBuilder
40 | .create()
41 | .build();
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/controller/CollegeController.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.controller;
2 |
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 | import lombok.extern.log4j.Log4j2;
5 | import org.springframework.ui.Model;
6 | import org.springframework.web.bind.annotation.*;
7 | import org.springframework.web.servlet.ModelAndView;
8 | import org.wlgzs.index_evaluation.enums.Result;
9 | import org.wlgzs.index_evaluation.enums.ResultCodeEnum;
10 | import org.wlgzs.index_evaluation.pojo.College;
11 | import org.wlgzs.index_evaluation.service.CollegeService;
12 |
13 | import javax.annotation.Resource;
14 | import javax.servlet.http.HttpServletRequest;
15 | import java.util.List;
16 |
17 | /**
18 | *
19 | * CollegeController层
20 | *
21 | *
22 | * @author algerfan
23 | * @since 2019-01-13
24 | */
25 | @RestController
26 | @RequestMapping("/college")
27 | @Log4j2
28 | public class CollegeController {
29 |
30 | @Resource
31 | private CollegeService collegeService;
32 |
33 | @RequestMapping("/to")
34 | public ModelAndView to(){
35 | ModelAndView modelAndView = new ModelAndView();
36 | modelAndView.setViewName("collegeAdministration");
37 | modelAndView.addObject("allCollege",collegeService.list(null));
38 | return modelAndView;
39 | }
40 |
41 | /**
42 | * 新增学院
43 | * @param college
44 | */
45 | @PostMapping
46 | public Result save(College college){
47 | if(college == null) {
48 | return new Result(ResultCodeEnum.UNSAVE);
49 | }
50 | QueryWrapper wrapper = new QueryWrapper<>();
51 | wrapper.eq("college_name",college.getCollegeName());
52 | System.out.println(collegeService.list(wrapper).size());
53 | if(collegeService.list(wrapper).size()!=0) {
54 | Result result = new Result(ResultCodeEnum.UNSAVE);
55 | result.setMsg("该学院已存在");
56 | return result;
57 | }
58 | collegeService.save(college);
59 | return new Result(ResultCodeEnum.SAVE);
60 | }
61 |
62 | /**
63 | * 通过id删除
64 | * @param collegeId
65 | */
66 | @DeleteMapping("/{collegeId}")
67 | public Result delete(@PathVariable("collegeId") int collegeId){
68 | if(collegeId==0) {
69 | return new Result(ResultCodeEnum.UNDELETE);
70 | }
71 | collegeService.removeById(collegeId);
72 | return new Result(ResultCodeEnum.DELETE);
73 | }
74 |
75 | /**
76 | * 修改学院
77 | * @param college
78 | */
79 | @PutMapping
80 | public Result updateById(College college){
81 | if(college == null) {
82 | return new Result(ResultCodeEnum.UNUPDATE);
83 | }
84 | collegeService.updateById(college);
85 | return new Result(ResultCodeEnum.UPDATE);
86 | }
87 |
88 | /**
89 | * 通过id查询学院
90 | * @param collegeId
91 | */
92 | @RequestMapping("/id")
93 | public Result selectById(int collegeId){
94 | if(collegeId==0) {
95 | return new Result(ResultCodeEnum.UNFIND);
96 | }
97 | return new Result(ResultCodeEnum.FIND,collegeService.getById(collegeId));
98 | }
99 |
100 | /**
101 | * 查询
102 | * @param model
103 | */
104 | @GetMapping("/page")
105 | public ModelAndView findAllPage(String keyword,Model model){
106 | QueryWrapper wrapper = new QueryWrapper<>();
107 | if(keyword!=null && !keyword.equals("")){
108 | wrapper.eq("college_name",keyword);
109 | }
110 | List list = collegeService.list(wrapper);
111 | model.addAttribute("allCollege",list); //集合
112 | model.addAttribute("msg","查询成功");
113 | log.info("查询成功:"+list);
114 | return new ModelAndView("collegeAdministration");
115 | }
116 |
117 | /**
118 | * 批量导入学院
119 | * @param request
120 | * @throws Exception
121 | */
122 | @RequestMapping("/saveCollege")
123 | public Result saveCollege(HttpServletRequest request) throws Exception{
124 | return collegeService.saveCollege(request);
125 | }
126 | }
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/controller/EmployerSatisfactionController.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.controller;
2 |
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 | import com.baomidou.mybatisplus.core.metadata.IPage;
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 | import lombok.extern.log4j.Log4j2;
7 | import org.springframework.ui.Model;
8 | import org.springframework.web.bind.annotation.*;
9 | import org.springframework.web.multipart.MultipartFile;
10 | import org.springframework.web.servlet.ModelAndView;
11 | import org.wlgzs.index_evaluation.enums.Result;
12 | import org.wlgzs.index_evaluation.enums.ResultCodeEnum;
13 | import org.wlgzs.index_evaluation.pojo.EmployerSatisfaction;
14 | import org.wlgzs.index_evaluation.pojo.Query;
15 | import org.wlgzs.index_evaluation.pojo.Year;
16 | import org.wlgzs.index_evaluation.service.EmployerSatisfactionService;
17 | import org.wlgzs.index_evaluation.service.YearService;
18 |
19 | import javax.annotation.Resource;
20 | import javax.servlet.http.HttpServletResponse;
21 | import java.io.IOException;
22 | import java.util.List;
23 |
24 | /**
25 | * @author 武凯焱
26 | * @date 2019/1/13 17:48
27 | * @Description:
28 | */
29 | @RestController
30 | @RequestMapping("/es")
31 | @Log4j2
32 | public class EmployerSatisfactionController {
33 |
34 | @Resource
35 | private EmployerSatisfactionService empService;
36 | @Resource
37 | private YearService yearService;
38 |
39 | /**
40 | * 导入中间数据
41 | *
42 | * @param multipartFile
43 | * @param year
44 | * @throws IOException
45 | */
46 | /*@PostMapping("/oederImport")
47 | public Result orderImportExcel(@RequestParam("file") MultipartFile multipartFile, String year) throws IOException {
48 | if (multipartFile != null) {
49 | String string = multipartFile.getOriginalFilename();
50 | if (!string.contains("5.用人单位满意度指数样表.xlsx")) {
51 | return new Result(-1, "请确认文件名是否为--<5.用人单位满意度样表.xlsx>");
52 | }
53 | }
54 | QueryWrapper queryWrappers = new QueryWrapper<>();
55 | if (year != null && !year.equals("")) {
56 | queryWrappers.eq("year", Integer.parseInt(year));
57 | queryWrappers.last("limit 2");
58 | List list = empService.list(queryWrappers);
59 | if (list != null && list.size() > 0) {
60 | return new Result(0, "导入数据重复");
61 | }
62 | }
63 | QueryWrapper queryWrapper = new QueryWrapper();
64 | if (year != null && !year.equals("")) {
65 | queryWrapper.eq("year", Integer.parseInt(year));
66 | queryWrapper.last("limit 2");
67 | List list = empService.list(queryWrapper);
68 | if (list != null && list.size() > 0) {
69 | return new Result(0, "导入数据重复");
70 | }
71 | }
72 | List list = empService.importExcel(multipartFile, year);
73 | boolean isTrue = empService.add(list);
74 | if (isTrue) {
75 | return new Result(1, "导入成功");
76 | } else {
77 | return new Result(-1, "导入失败");
78 | }
79 |
80 | }*/
81 |
82 | /**
83 | * 导出数据
84 | *
85 | * @param response
86 | * @param year
87 | * @throws IOException
88 | */
89 | @GetMapping("/export")
90 | public void importExcel(HttpServletResponse response, String year) throws IOException {
91 | if (year != null && !year.equals(""))
92 | empService.exportData(Integer.parseInt(year), response);
93 | }
94 |
95 | @GetMapping("/search")
96 | public ModelAndView search(Model model, Query query,
97 | @RequestParam(name = "pageNum", defaultValue = "1") int pageNum,
98 | @RequestParam(name = "pageSize", defaultValue = "16") int pageSize) {
99 | Page employerSatisfactionPage = new Page<>(pageNum, pageSize);
100 | QueryWrapper employerSatisfactionQueryWrapper = new QueryWrapper<>();
101 | if (query.getYear() != null) {
102 | employerSatisfactionQueryWrapper.eq("year", query.getYear());
103 | }
104 | if (query.getCollege() != null && !query.getCollege().equals("")) {
105 | employerSatisfactionQueryWrapper.eq("college", query.getCollege());
106 | }
107 | List allYear = yearService.findAllYear();
108 | model.addAttribute("allYear", allYear);
109 | IPage iPage = empService.page(employerSatisfactionPage, employerSatisfactionQueryWrapper);
110 | model.addAttribute("current", iPage.getCurrent());//当前页数
111 | model.addAttribute("pages", iPage.getPages());//总页数
112 | model.addAttribute("employerSatisfactions", iPage.getRecords());//所有的数据集合
113 | model.addAttribute("query", query);
114 | return new ModelAndView("employment");
115 | }
116 |
117 | @GetMapping("/delete")
118 | public Result delete(String year) {
119 | boolean isDelete = empService.delete(year);
120 | if (isDelete) {
121 | return new Result(1, "删除成功");
122 | } else {
123 | return new Result(-1, "没有该年份数据");
124 | }
125 | }
126 | /**
127 | * 导入原始数据
128 | */
129 | @PostMapping("/import")
130 | public Result importExcel(@RequestParam("file") MultipartFile multipartFile, String year) throws IOException {
131 | if (multipartFile != null) {
132 | String string = multipartFile.getOriginalFilename();
133 | if (!string.contains("5.用人单位满意度指数样表")) {
134 | return new Result(-1, "请确认文件名是否为--<5.用人单位满意度样表>");
135 | }
136 | }
137 | QueryWrapper queryWrapper = new QueryWrapper();
138 | if (year != null && !year.equals("")) {
139 | queryWrapper.eq("year", Integer.parseInt(year));
140 | queryWrapper.last("limit 2");
141 | List list = empService.list(queryWrapper);
142 | if (list != null && list.size() > 0) {
143 | return new Result(0, "导入数据重复");
144 | }
145 | }
146 | boolean isTrue = empService.NewImportExcel(multipartFile,year);
147 | if (isTrue){
148 | return new Result(ResultCodeEnum.SUCCESS,"导入成功");
149 | }
150 | else {
151 | return new Result(ResultCodeEnum.FAIL,"导入失败");
152 | }
153 | }
154 | }
155 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/controller/EmploymentPracticeController.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.controller;
2 |
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 | import com.baomidou.mybatisplus.core.metadata.IPage;
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 | import lombok.extern.log4j.Log4j2;
7 | import org.springframework.ui.Model;
8 | import org.springframework.web.bind.annotation.*;
9 | import org.springframework.web.servlet.ModelAndView;
10 | import org.wlgzs.index_evaluation.enums.Result;
11 | import org.wlgzs.index_evaluation.enums.ResultCodeEnum;
12 | import org.wlgzs.index_evaluation.pojo.EmploymentPractice;
13 | import org.wlgzs.index_evaluation.pojo.Query;
14 | import org.wlgzs.index_evaluation.pojo.Year;
15 | import org.wlgzs.index_evaluation.service.EmploymentPracticeService;
16 | import org.wlgzs.index_evaluation.service.YearService;
17 |
18 | import javax.annotation.Resource;
19 | import javax.servlet.http.HttpServletRequest;
20 | import javax.servlet.http.HttpServletResponse;
21 | import java.io.IOException;
22 | import java.util.List;
23 |
24 | /**
25 | * @author AlgerFan
26 | * @date Created in 2019/1/14 15
27 | * @Description 就业创业实践指数
28 | */
29 | @RestController
30 | @RequestMapping("/employmentPractice")
31 | @Log4j2
32 | public class EmploymentPracticeController {
33 |
34 | @Resource
35 | private EmploymentPracticeService employmentPracticeService;
36 | @Resource
37 | private YearService yearService;
38 |
39 | /**
40 | * 导入就业创业实践数据
41 | * @param year
42 | * @param request
43 | */
44 | @PostMapping("/importData")
45 | public Result importData(Integer year, HttpServletRequest request){
46 | return employmentPracticeService.importData(year, request);
47 | }
48 |
49 | /**
50 | * 导出就业创业实践指数
51 | * @param year
52 | * @param response
53 | * @throws IOException
54 | */
55 | @GetMapping("/exportData")
56 | public void exportData(int year, HttpServletResponse response) throws IOException {
57 | employmentPracticeService.exportData(year, response);
58 | }
59 |
60 | /**
61 | * 查询全部就业创业实践
62 | * @param model
63 | * @param pageNum
64 | * @param pageSize
65 | */
66 | @GetMapping("/findAll")
67 | public ModelAndView findAll(Query query, Model model, @RequestParam(name = "pageNum", defaultValue = "1") int pageNum,
68 | @RequestParam(name = "pageSize", defaultValue = "16") int pageSize){
69 | Page practicePage = new Page<>(pageNum,pageSize);
70 | QueryWrapper practiceQueryWrapper = new QueryWrapper<>();
71 | if (query.getYear() != null){
72 | practiceQueryWrapper.eq("year",query.getYear());
73 | }
74 | if (query.getCollege() != "" && query.getCollege() != null){
75 | practiceQueryWrapper.eq("college",query.getCollege());
76 | }
77 | IPage page = employmentPracticeService.page(practicePage, practiceQueryWrapper);
78 | model.addAttribute("current",page.getCurrent()); //当前页数
79 | model.addAttribute("pages",page.getPages()); //总页数
80 | model.addAttribute("lists",page.getRecords()); //集合
81 | model.addAttribute("query",query);
82 | List allYear = yearService.findAllYear();
83 | model.addAttribute("allYear",allYear);//年份
84 | model.addAttribute("msg","查询成功");
85 | log.info("查询成功:"+page.getRecords());
86 | return new ModelAndView("employmentPractice");
87 | }
88 |
89 | /**
90 | * 按照年份删除数据
91 | * @param year
92 | */
93 | @DeleteMapping("/deleteYear")
94 | public Result deleteYear(Integer year){
95 | Result result;
96 | if(year==null){
97 | result = new Result(ResultCodeEnum.SELECTYEAR);
98 | log.info("请选择年份");
99 | return result;
100 | }
101 | QueryWrapper practiceQueryWrapper = new QueryWrapper<>();
102 | practiceQueryWrapper.eq("year",year);
103 | if(employmentPracticeService.list(practiceQueryWrapper).size()==0){
104 | result = new Result(ResultCodeEnum.UNEXIST);
105 | log.info("该年份数据不存在");
106 | return result;
107 | }
108 | if(employmentPracticeService.deleteYear(year)){
109 | result = new Result(ResultCodeEnum.DELETE);
110 | log.info("删除成功");
111 | } else {
112 | result = new Result(ResultCodeEnum.UNDELETE);
113 | log.info("删除失败");
114 | }
115 | return result;
116 | }
117 |
118 | }
119 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/controller/EmploymentRateController.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.controller;
2 |
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 | import com.baomidou.mybatisplus.core.metadata.IPage;
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 | import lombok.extern.log4j.Log4j2;
7 | import org.springframework.ui.Model;
8 | import org.springframework.web.bind.annotation.*;
9 | import org.springframework.web.servlet.ModelAndView;
10 | import org.wlgzs.index_evaluation.enums.Result;
11 | import org.wlgzs.index_evaluation.enums.ResultCodeEnum;
12 | import org.wlgzs.index_evaluation.pojo.EmploymentRate;
13 | import org.wlgzs.index_evaluation.pojo.Query;
14 | import org.wlgzs.index_evaluation.pojo.Year;
15 | import org.wlgzs.index_evaluation.service.EmploymentRateService;
16 | import org.wlgzs.index_evaluation.service.YearService;
17 |
18 | import javax.annotation.Resource;
19 | import javax.servlet.http.HttpServletRequest;
20 | import javax.servlet.http.HttpServletResponse;
21 | import java.io.IOException;
22 | import java.util.List;
23 |
24 | /**
25 | * @author AlgerFan
26 | * @date Created in 2019/1/13 17
27 | * @Description 就业率指数
28 | */
29 | @RestController
30 | @RequestMapping("/employmentRate")
31 | @Log4j2
32 | public class EmploymentRateController {
33 |
34 | @Resource
35 | private YearService yearService;
36 |
37 | @Resource
38 | private EmploymentRateService employmentRateService;
39 |
40 | /**
41 | * 导入学院、初次就业率、年终就业率
42 | * @param request
43 | * @param year
44 | */
45 | @PostMapping("/importData")
46 | public Result importData(Integer year, HttpServletRequest request){
47 | return employmentRateService.importData(year,request);
48 | }
49 |
50 | /**
51 | * 导出就业率指数
52 | * @param year
53 | * @param response
54 | * @throws IOException
55 | */
56 | @GetMapping("/exportData")
57 | public void exportData(int year, HttpServletResponse response) throws IOException {
58 | employmentRateService.exportData(year, response);
59 | }
60 |
61 | /**
62 | * 查询全部就业率
63 | * @param model
64 | * @param pageNum
65 | * @param pageSize
66 | */
67 | @GetMapping("/findAll")
68 | public ModelAndView findAll(Query query, Model model, @RequestParam(name = "pageNum", defaultValue = "1") int pageNum,
69 | @RequestParam(name = "pageSize", defaultValue = "16") int pageSize){
70 | Page ratePage = new Page<>(pageNum,pageSize);
71 | QueryWrapper rateQueryWrapper = new QueryWrapper<>();
72 | if (query.getYear() != null){
73 | rateQueryWrapper.eq("year",query.getYear());
74 | }
75 | if (query.getCollege() != "" && query.getCollege() != null){
76 | rateQueryWrapper.eq("college",query.getCollege());
77 | }
78 | IPage page = employmentRateService.page(ratePage, rateQueryWrapper);
79 | model.addAttribute("current",page.getCurrent()); //当前页数
80 | model.addAttribute("pages",page.getPages()); //总页数
81 | model.addAttribute("lists",page.getRecords()); //集合
82 | model.addAttribute("query",query);
83 | List allYear = yearService.findAllYear();
84 | model.addAttribute("allYear",allYear);//年份
85 | model.addAttribute("msg","查询成功");
86 | log.info("查询成功:"+page.getRecords());
87 | return new ModelAndView("employmentRate");
88 | }
89 |
90 | /**
91 | * 按照年份删除数据
92 | * @param year
93 | */
94 | @DeleteMapping("/deleteYear")
95 | public Result deleteYear(Integer year){
96 | Result result;
97 | if(year==null){
98 | result = new Result(ResultCodeEnum.SELECTYEAR);
99 | log.info("请选择年份");
100 | return result;
101 | }
102 | QueryWrapper rateQueryWrapper = new QueryWrapper<>();
103 | rateQueryWrapper.eq("year",year);
104 | if(employmentRateService.list(rateQueryWrapper).size()==0){
105 | result = new Result(ResultCodeEnum.UNEXIST);
106 | log.info("该年份数据不存在");
107 | return result;
108 | }
109 | if(employmentRateService.deleteYear(year)){
110 | result = new Result(ResultCodeEnum.DELETE);
111 | log.info("删除成功");
112 | } else {
113 | result = new Result(ResultCodeEnum.UNDELETE);
114 | log.info("删除失败");
115 | }
116 | return result;
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/controller/MainsiteErrorController.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.controller;
2 |
3 | import org.springframework.boot.web.servlet.error.ErrorController;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.servlet.ModelAndView;
7 |
8 | import javax.servlet.http.HttpServletRequest;
9 |
10 | /**
11 | * @author zsh
12 | * @company wlgzs
13 | * @create 2019-01-21 9:23
14 | * @Describe 404,500
15 | */
16 | @Controller
17 | public class MainsiteErrorController implements ErrorController {
18 |
19 | @RequestMapping("/error")
20 | public ModelAndView handleError(HttpServletRequest request){
21 | ModelAndView modelAndView = new ModelAndView();
22 | //获取statusCode:404,500
23 | Integer statusCode = (Integer) request.getAttribute("javax.servlet.error.status_code");
24 | if(statusCode == 404){
25 | modelAndView.setViewName("404");
26 | return modelAndView;
27 | }else {
28 | modelAndView.setViewName("500");
29 | return modelAndView;
30 | }
31 | }
32 |
33 | @Override
34 | public String getErrorPath() {
35 | return "/error";
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/controller/MajorController.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.controller;
2 |
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 | import com.baomidou.mybatisplus.core.metadata.IPage;
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 | import lombok.extern.log4j.Log4j2;
7 | import org.springframework.ui.Model;
8 | import org.springframework.web.bind.annotation.*;
9 | import org.springframework.web.multipart.MultipartFile;
10 | import org.wlgzs.index_evaluation.enums.Result;
11 | import org.wlgzs.index_evaluation.enums.ResultCodeEnum;
12 | import org.wlgzs.index_evaluation.pojo.Major;
13 | import org.wlgzs.index_evaluation.service.MajorService;
14 |
15 | import javax.annotation.Resource;
16 | import java.io.IOException;
17 | import java.util.List;
18 |
19 | /**
20 | * @author 武凯焱
21 | * @date 2019/1/13 11:11
22 | * @Description:
23 | */
24 | @RestController
25 | @RequestMapping("/major")
26 | @Log4j2
27 | public class MajorController {
28 | @Resource
29 | MajorService majorService;
30 |
31 | //导入专业与学院关系表
32 | @PostMapping("/import")
33 | public Result importExcel(@RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
34 | String str = file.getOriginalFilename();//.equals("");
35 | if (!str.equals("1.专业学院对应关系样表.xlsx")) {
36 | return new Result(-1, "请确认文件名是否为--<1.专业学院对应关系样表.xlsx>");
37 | }
38 | QueryWrapper queryW = new QueryWrapper<>();
39 | List majors = majorService.list(queryW);
40 | if (majors != null && majors.size() >= 0) {
41 | for (Major major : majors
42 | ) {
43 | majorService.removeById(major.getMajorId());
44 | }
45 |
46 | }
47 | boolean isTrue = majorService.importExcel(file);
48 | return new Result(1, "导入成功");
49 | }
50 |
51 | //添加专业
52 | @PostMapping
53 | public Result add(Major major) {
54 | if (major != null) {
55 | majorService.save(major);
56 | return new Result(ResultCodeEnum.SAVE);
57 | } else {
58 | return new Result(ResultCodeEnum.UNSAVE);
59 | }
60 | }
61 |
62 | //删除专业
63 | @DeleteMapping("/{majorId}")
64 | public Result delete(@PathVariable("majorId") int majorId) {
65 | if (majorId != 0) {
66 | majorService.removeById(majorId);
67 | return new Result(ResultCodeEnum.DELETE);
68 | } else
69 | return new Result(ResultCodeEnum.UNDELETE);
70 | }
71 |
72 | //修改专业
73 | @PutMapping()
74 | public Result update(Major major) {
75 | if (major != null) {
76 | majorService.save(major);
77 | return new Result(ResultCodeEnum.UPDATE);
78 | } else
79 | return new Result(ResultCodeEnum.UNUPDATE);
80 | }
81 |
82 | //查询全部专业
83 | @GetMapping()
84 | public List findAll(Model model, @RequestParam(name = "pageNum", defaultValue = "1") int pageNum, @RequestParam(name = "pageSize", defaultValue = "10") int pageSize) {
85 | Page page = new Page<>(pageNum, pageSize);
86 | QueryWrapper wrapper = new QueryWrapper<>();
87 | IPage pageList = majorService.page(page, wrapper);
88 | return pageList.getRecords();
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/controller/UserController.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.controller;
2 |
3 | import com.sun.org.apache.xpath.internal.operations.Mod;
4 | import lombok.extern.log4j.Log4j2;
5 | import org.apache.poi.util.IOUtils;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.util.ResourceUtils;
8 | import org.springframework.web.bind.annotation.GetMapping;
9 | import org.springframework.web.bind.annotation.PostMapping;
10 | import org.springframework.web.bind.annotation.RequestMapping;
11 | import org.springframework.web.bind.annotation.RestController;
12 | import org.springframework.web.servlet.ModelAndView;
13 | import org.wlgzs.index_evaluation.pojo.User;
14 | import org.wlgzs.index_evaluation.pojo.Year;
15 | import org.wlgzs.index_evaluation.service.UserService;
16 | import org.wlgzs.index_evaluation.service.YearService;
17 |
18 | import javax.servlet.http.HttpServletResponse;
19 | import javax.servlet.http.HttpSession;
20 | import java.io.*;
21 | import java.util.List;
22 |
23 | /**
24 | * @author zsh
25 | * @company wlgzs
26 | * @create 2019-01-14 15:09
27 | * @Describe
28 | */
29 | @RestController
30 | @Log4j2
31 | public class UserController {
32 |
33 | @Autowired
34 | private UserService userService;
35 |
36 | @Autowired
37 | private YearService yearService;
38 |
39 | @GetMapping("/")
40 | private ModelAndView toLogin(){
41 | ModelAndView modelAndView = new ModelAndView();
42 | modelAndView.setViewName("login");
43 | return modelAndView;
44 | }
45 |
46 | @GetMapping("/toindex")
47 | private ModelAndView toindex(){
48 | ModelAndView modelAndView = new ModelAndView();
49 | List allYear = yearService.findAllYear();
50 | modelAndView.addObject("allYear",allYear);
51 | modelAndView.setViewName("index");
52 | return modelAndView;
53 | }
54 |
55 | @GetMapping("/doc")
56 | public String getPDF(HttpServletResponse response) throws IOException {
57 | String filename = "就业工作考核数据分析系统使用说明书.pdf";
58 | String path = "./template/" + filename;
59 | File file = ResourceUtils.getFile(path);
60 | response.reset();
61 | response.setContentType("application/pdf");
62 | FileInputStream fileInputStream = null;
63 | OutputStream outputStream = null;
64 | try {
65 | fileInputStream = new FileInputStream(file);
66 | outputStream = response.getOutputStream();
67 | outputStream.write(IOUtils.toByteArray(fileInputStream));
68 | response.setHeader("Content-Disposition",
69 | "inline; filename= file");
70 | outputStream.flush();
71 | }catch (FileNotFoundException e) {
72 | e.printStackTrace();
73 | } catch (IOException e) {
74 | e.printStackTrace();
75 | }finally {
76 | IOUtils.closeQuietly(fileInputStream);
77 | IOUtils.closeQuietly(outputStream);
78 | }
79 | return null;
80 | }
81 |
82 | @PostMapping("/login")
83 | public ModelAndView login(User user, HttpSession session){
84 | log.info(user);
85 | ModelAndView modelAndView = new ModelAndView();
86 | User u = userService.findByUserName(user.getUserName());
87 | if (u == null){
88 | log.info("用户不存在");
89 | modelAndView.setViewName("login");
90 | modelAndView.addObject("msg","用户不存在");
91 | }else {
92 | if (u.getPassword().equals(user.getPassword())){
93 | log.info("登陆成功");
94 | modelAndView.setViewName("index");
95 | session.setAttribute("user",u);
96 | List allYear = yearService.findAllYear();
97 | modelAndView.addObject("allYear",allYear);
98 | return modelAndView;
99 | }else {
100 | log.info("用户名或密码错误");
101 | modelAndView.setViewName("login");
102 | modelAndView.addObject("msg","用户名或密码错误");
103 | }
104 | }
105 | return modelAndView;
106 | }
107 |
108 | @GetMapping("out")
109 | public ModelAndView out(HttpSession session){
110 | ModelAndView modelAndView = new ModelAndView();
111 | session.removeAttribute("user");
112 | modelAndView.setViewName("login");
113 | return modelAndView;
114 | }
115 |
116 | @PostMapping("/update")
117 | public ModelAndView update(User user,String old){
118 | ModelAndView modelAndView = new ModelAndView();
119 | if (old.equals(userService.findByUserName(user.getUserName()).getPassword())){
120 | modelAndView.addObject("msg","密码修改成功");
121 | userService.update(user);
122 | }else {
123 | modelAndView.addObject("msg","原密码错误");
124 | }
125 | modelAndView.setViewName("index");
126 | return modelAndView;
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/controller/YearController.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.controller;
2 |
3 | import com.baomidou.mybatisplus.core.metadata.IPage;
4 | import lombok.extern.log4j.Log4j2;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.web.bind.annotation.*;
7 | import org.springframework.web.servlet.ModelAndView;
8 | import org.wlgzs.index_evaluation.pojo.Year;
9 | import org.wlgzs.index_evaluation.service.YearService;
10 |
11 | import java.util.List;
12 |
13 | /**
14 | * @author zsh
15 | * @company wlgzs
16 | * @create 2019-01-12 15:32
17 | * @Describe 年份控制器
18 | */
19 |
20 | @RestController
21 | @RequestMapping("/year")
22 | @Log4j2
23 | public class YearController {
24 |
25 | @Autowired
26 | private YearService yearService;
27 |
28 | @GetMapping("/to")
29 | public ModelAndView to(){
30 | ModelAndView modelAndView = new ModelAndView();
31 | modelAndView.setViewName("yearAdministration");
32 | modelAndView.addObject("allYear",yearService.findAllYear());
33 | return modelAndView;
34 | }
35 |
36 | //添加年份
37 | @PostMapping("add")
38 | @ResponseBody
39 | public Integer add(Year year){
40 | log.info(year);
41 | if (yearService.findByName(year.getYearName()) == null){
42 | Integer add = yearService.add(year);
43 | return add;
44 | }else {
45 | log.info("重复");
46 | return 0;
47 | }
48 | }
49 |
50 | //删除年份
51 | @GetMapping("/delete")
52 | @ResponseBody
53 | public Integer delete(Integer id){
54 | log.info(id);
55 | Integer delete = yearService.delete(id);
56 | log.info(delete);
57 | return delete;
58 | }
59 |
60 | //修改年份
61 | @PostMapping("/update")
62 | @ResponseBody
63 | public Integer update(Year year){
64 | Integer update = 0;
65 | if (yearService.findByName(year.getYearName()) == null){
66 | update = yearService.update(year);
67 | }
68 | log.info(update);
69 | return update;
70 | }
71 |
72 | //通过name查询
73 | @RequestMapping("/findByName")
74 | public ModelAndView findName(Integer name){
75 | ModelAndView modelAndView = new ModelAndView();
76 | modelAndView.setViewName("yearAdministration");
77 | if (name == null){
78 | List allYear = yearService.findAllYear();
79 | modelAndView.addObject("allYear",allYear);
80 | }else {
81 | Year byName = yearService.findByName(name);
82 | modelAndView.addObject("allYear",byName);
83 | }
84 | return modelAndView;
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/CollegeMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import org.wlgzs.index_evaluation.pojo.College;
4 |
5 | /**
6 | *
7 | * CollegeMapper接口
8 | *
9 | *
10 | * @author algerfan
11 | * @since 2019-01-13
12 | */
13 | public interface CollegeMapper extends SuperMapper {
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/EmployerSatisfactionMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import org.wlgzs.index_evaluation.pojo.EmployerSatisfaction;
4 |
5 | /**
6 | * @author 武凯焱
7 | * @date 2019/1/13 18:05
8 | * @Description:
9 | */
10 | public interface EmployerSatisfactionMapper extends SuperMapper{
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/EmploymentMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import org.wlgzs.index_evaluation.pojo.Employment;
4 |
5 | /**
6 | * @author zsh
7 | * @company wlgzs
8 | * @create 2019-01-14 10:03
9 | * @Describe
10 | */
11 | public interface EmploymentMapper extends SuperMapper {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/EmploymentPracticeMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import org.wlgzs.index_evaluation.pojo.EmploymentPractice;
4 |
5 | /**
6 | * @author AlgerFan
7 | * @date Created in 2019/1/14 15
8 | * @Description 就业创业实践指数
9 | */
10 | public interface EmploymentPracticeMapper extends SuperMapper {
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/EmploymentRateMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import org.wlgzs.index_evaluation.pojo.EmploymentRate;
4 |
5 | /**
6 | * @author AlgerFan
7 | * @date Created in 2019/1/13 17
8 | * @Description 就业率指数
9 | */
10 |
11 | public interface EmploymentRateMapper extends SuperMapper {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/GradeMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 | import org.wlgzs.index_evaluation.pojo.Grade;
3 |
4 | /**
5 | * @author 武凯焱
6 | * @date 2019/3/26 21:57
7 | * @Description:
8 | */
9 | public interface GradeMapper extends SuperMapper {
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/MajorDao.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 | import org.apache.poi.ss.formula.functions.T;
5 | import org.wlgzs.index_evaluation.pojo.Major;
6 |
7 | /**
8 | * @author 武凯焱
9 | * @date 2019/1/13 10:57
10 | * @Description:
11 | */
12 | public interface MajorDao extends BaseMapper {
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/StudentQualityMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 | import org.wlgzs.index_evaluation.pojo.Major;
5 | import org.wlgzs.index_evaluation.pojo.StudentQuality;
6 |
7 | /**
8 | * @author 武凯焱
9 | * @date 2019/1/15 17:32
10 | * @Description:
11 | */
12 | public interface StudentQualityMapper extends BaseMapper {
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/SuperMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 |
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 |
6 | /**
7 | * 演示 mapper 父类,注意这个类不要让 mp 扫描到!!
8 | */
9 | public interface SuperMapper extends BaseMapper {
10 |
11 | // 这里可以放一些公共的方法
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/TeachersStructureMapper.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import org.wlgzs.index_evaluation.pojo.TeachersStructure;
4 |
5 | /**
6 | * @author zsh
7 | * @company wlgzs
8 | * @create 2019-01-13 10:22
9 | * @Describe
10 | */
11 | public interface TeachersStructureMapper extends SuperMapper {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/UserDao.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import org.wlgzs.index_evaluation.pojo.User;
4 |
5 | /**
6 | * @author zsh
7 | * @company wlgzs
8 | * @create 2019-01-14 14:58
9 | * @Describe 用户数据访问层
10 | */
11 | public interface UserDao extends SuperMapper {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/dao/YearDao.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.dao;
2 |
3 | import org.wlgzs.index_evaluation.pojo.Year;
4 |
5 | /**
6 | * @author zsh
7 | * @company wlgzs
8 | * @create 2019-01-12 15:39
9 | * @Describe 年份数据访问层
10 | */
11 | public interface YearDao extends SuperMapper {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/enums/Result.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.enums;
2 | import lombok.Data;
3 |
4 | @Data
5 | public class Result {
6 |
7 | //状态码
8 | private int code;
9 |
10 | public Result(int code, String msg, Object data) {
11 | this.code = code;
12 | this.msg = msg;
13 | this.data = data;
14 | }
15 |
16 | //状态信息
17 | private String msg;
18 | //返回数据
19 | private Object data;
20 |
21 | public Result (ResultCodeEnum resultCodeEnum) {
22 | this.code = resultCodeEnum.getCode();
23 | this.msg = resultCodeEnum.getMsg();
24 | }
25 |
26 | public Result (ResultCodeEnum resultCodeEnum , Object data) {
27 | this(resultCodeEnum);
28 | this.data = data;
29 | }
30 | public Result(int code,String msg){
31 | this.code = code;
32 | this.msg = msg;
33 | }
34 | }
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/enums/ResultCodeEnum.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.enums;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 |
6 | public enum ResultCodeEnum {
7 |
8 | SUCCESS(1,"成功"),//通过
9 | FAIL(-1,"失败"), //失败
10 | SAVE(1,"添加成功"),
11 | UNSAVE(-1,"添加失败"),
12 | UPDATE(1,"修改成功"),
13 | UNUPDATE(-1,"修改失败"),
14 | FIND(1,"查询成功"),
15 | UNFIND(-1,"查询失败"),
16 | DELETE(1,"删除成功"),
17 | UNDELETE(-1,"删除失败"),
18 | SELECTYEAR(-1,"请选择年份"),
19 | UNEXIST(-1,"该年份数据不存在"),
20 | IMport(1,"导入成功"),
21 | UNIMport(-1,"导入失败"),
22 | ;
23 |
24 | @Getter
25 | @Setter
26 | private int code;
27 |
28 | @Getter
29 | @Setter
30 | private String msg;
31 |
32 | ResultCodeEnum(int code, String msg) {
33 | this.code = code;
34 | this.msg = msg;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/filter/LoginFilter.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.filter;
2 |
3 | import lombok.extern.log4j.Log4j2;
4 |
5 | import javax.servlet.*;
6 | import javax.servlet.http.HttpServletRequest;
7 | import javax.servlet.http.HttpServletResponse;
8 | import javax.servlet.http.HttpSession;
9 | import java.io.IOException;
10 |
11 |
12 | /**
13 | * @author zsh
14 | * @company wlgzs
15 | * @create 2019-01-20 8:37
16 | * @Describe
17 | */
18 |
19 | @Log4j2
20 | public class LoginFilter implements Filter {
21 |
22 | String[] includeUrls = new String[]{"/login","/","/css","/js","/images","/out",".ico","/doc"};
23 |
24 | @Override
25 | public void init(FilterConfig filterConfig) throws ServletException {
26 | log.info("过滤器初始化");
27 | }
28 |
29 | @Override
30 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
31 | HttpServletRequest request = (HttpServletRequest) servletRequest;
32 | HttpServletResponse response = (HttpServletResponse) servletResponse;
33 | HttpSession session = request.getSession(false);
34 | String uri = request.getRequestURI();
35 | String returnUrl = "/";
36 | //是否需要过滤
37 | if (uri.equals("/") || !isNeedFilter(uri)) { //不需要过滤直接传给下一个过滤器
38 | filterChain.doFilter(servletRequest, servletResponse);
39 | } else { //需要过滤器
40 | // session中包含user对象,则是登录状态
41 | if (session != null && session.getAttribute("user") != null) {
42 | filterChain.doFilter(request, response);
43 | } else {
44 | servletRequest.setCharacterEncoding("UTF-8");
45 | // 转码
46 | response.setContentType("text/html; charset=UTF-8");
47 | response.getWriter().println("");
50 | response.getWriter().close();
51 | return;
52 | }
53 | }
54 | }
55 |
56 |
57 | /*
58 | * @Description: 是否需要过滤
59 | */
60 |
61 | public boolean isNeedFilter(String uri) {
62 | for (String includeUrl : includeUrls) {
63 | if(uri.contains(includeUrl)) {
64 | return false;
65 | }
66 | }
67 | return true;
68 |
69 | }
70 | @Override
71 | public void destroy() {
72 | log.info("过滤器销毁");
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/College.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.TableName;
4 | import com.baomidou.mybatisplus.annotation.IdType;
5 | import com.baomidou.mybatisplus.extension.activerecord.Model;
6 | import com.baomidou.mybatisplus.annotation.TableId;
7 | import com.baomidou.mybatisplus.annotation.TableField;
8 | import java.io.Serializable;
9 |
10 | import lombok.Data;
11 | import lombok.NoArgsConstructor;
12 | import lombok.EqualsAndHashCode;
13 |
14 | /**
15 | *
16 | * CollegeController实体类
17 | *
18 | *
19 | * @author algerfan
20 | * @since 2019-01-13
21 | */
22 |
23 | @Data
24 | @NoArgsConstructor
25 | @EqualsAndHashCode(callSuper = true)
26 | @TableName("tb_college")
27 | public class College extends Model {
28 |
29 | private static final long serialVersionUID = 1L;
30 |
31 | @TableId(value = "college_id", type = IdType.AUTO)
32 | private Integer collegeId;
33 | @TableField("college_name")
34 | private String collegeName;
35 |
36 | @Override
37 | protected Serializable pkVal() {
38 | return this.collegeId;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/Echars.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @author zsh
7 | * @company wlgzs
8 | * @create 2019-04-01 9:06
9 | * @Describe 图表测试类
10 | */
11 | @Data
12 | public class Echars {
13 | private String name;
14 | private double num;
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/Employment.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableId;
5 | import com.baomidou.mybatisplus.annotation.TableName;
6 | import lombok.Data;
7 |
8 | /**
9 | * @author zsh
10 | * @company wlgzs
11 | * @create 2019-01-14 9:40
12 | * @Describe 就业状态指数
13 | */
14 | @Data
15 | @TableName("tb_emp")
16 | public class Employment {
17 |
18 | /**
19 | * 就业状态ID
20 | */
21 | @TableId(type = IdType.AUTO)
22 | private Integer emId;
23 |
24 | /**
25 | * 学院
26 | */
27 | private String college;
28 |
29 | /**
30 | * 参与调查人数
31 | */
32 | private Integer parNum;
33 |
34 | /**
35 | * 专业知识能力:非常强,很强,一般,不强,很不强
36 | */
37 | private Integer MB1111;
38 | private Integer MB1112;
39 | private Integer MB1113;
40 | private Integer MB1114;
41 | private Integer MB1115;
42 |
43 | /**
44 | * 通用知识能力:非常强,很强,一般,不强,很不强
45 | */
46 | private Integer MB1121;
47 | private Integer MB1122;
48 | private Integer MB1123;
49 | private Integer MB1124;
50 | private Integer MB1125;
51 |
52 | /**
53 | * 求职应聘能力:非常强,很强,一般,不强,很不强
54 | */
55 | private Integer MB1131;
56 | private Integer MB1132;
57 | private Integer MB1133;
58 | private Integer MB1134;
59 | private Integer MB1135;
60 |
61 | /**
62 | * 社会兼职经历:3个月以上,2个月,1个月,半月,1周
63 | */
64 | private Integer MB1211;
65 | private Integer MB1212;
66 | private Integer MB1213;
67 | private Integer MB1214;
68 | private Integer MB1215;
69 |
70 | /**
71 | * “非学历、费荣誉”证书:3个以上,3个,2个,1个,0个
72 | */
73 | private Integer MB1221;
74 | private Integer MB1222;
75 | private Integer MB1223;
76 | private Integer MB1224;
77 | private Integer MB1225;
78 |
79 | /**
80 | * 社会职务:有,无
81 | */
82 | private Integer MB1231;
83 | private Integer MB1232;
84 |
85 | /**
86 | * 求职积极程度:很积极,积极,一般,不积极,很不积极
87 | */
88 | private Integer MB1311;
89 | private Integer MB1312;
90 | private Integer MB1313;
91 | private Integer MB1314;
92 | private Integer MB1315;
93 |
94 | /**
95 | * 自我效能感人数:很自信,自信,一般,不自信,很不自信
96 | */
97 | private Integer MB1321;
98 | private Integer MB1322;
99 | private Integer MB1323;
100 | private Integer MB1324;
101 | private Integer MB1325;
102 |
103 | /**
104 | * 就业起薪:2001-3000,3001-4000,4001-5000,5001-6000,6001-7000,7000以上
105 | */
106 | private Integer MB211;
107 | private Integer MB212;
108 | private Integer MB213;
109 | private Integer MB214;
110 | private Integer MB215;
111 | private Integer MB216;
112 |
113 | /**
114 | * 专业对口状态:很对口,对口,一般,不对口,很不对口
115 | */
116 | private Integer MB2211;
117 | private Integer MB2212;
118 | private Integer MB2213;
119 | private Integer MB2214;
120 | private Integer MB2215;
121 |
122 | /**
123 | * “能力-岗位”适配度:很匹配,匹配,一般,不匹配,很不匹配
124 | */
125 | private Integer MB2221;
126 | private Integer MB2222;
127 | private Integer MB2223;
128 | private Integer MB2224;
129 | private Integer MB2225;
130 |
131 | /**
132 | * 月薪兑付状态:正常,拖欠
133 | */
134 | private Integer MB2311;
135 | private Integer MB2312;
136 |
137 | /**
138 | * “五险一金”执行状态:正常,拖欠
139 | */
140 | private Integer MB2321;
141 | private Integer MB2322;
142 |
143 | /**
144 | * 成长发展空间:很宽广,宽广,一般,不宽广,很不宽广
145 | */
146 | private Integer MB2331;
147 | private Integer MB2332;
148 | private Integer MB2333;
149 | private Integer MB2334;
150 | private Integer MB2335;
151 |
152 | /**
153 | * 工作满意度:很满意,满意,一般,不满意,很不满意
154 | */
155 | private Integer MB2341;
156 | private Integer MB2342;
157 | private Integer MB2343;
158 | private Integer MB2344;
159 | private Integer MB2345;
160 |
161 | /**
162 | * 预期就业年限:10年以上,8-10年,3-7年,2年,1年
163 | */
164 | private Integer MB241;
165 | private Integer MB242;
166 | private Integer MB243;
167 | private Integer MB244;
168 | private Integer MB245;
169 |
170 | /**
171 | * 年份
172 | */
173 | private Integer year;
174 |
175 | /**
176 | * 知识能力结构40.75
177 | */
178 | private double B11;
179 |
180 | /**
181 | * 标识性优势31.35
182 | */
183 | private double B12;
184 |
185 | /**
186 | * 择业精神27.9
187 | */
188 | private double B13;
189 |
190 | /**
191 | * 就业起薪28.55
192 | */
193 | private double B21;
194 |
195 | /**
196 | * 岗位胜任度24.2
197 | */
198 | private double B22;
199 |
200 | /**
201 | * 就业现状满意度28
202 | */
203 | private double B23;
204 |
205 | /**
206 | * 预期就业年限19.25
207 | */
208 | private double B24;
209 |
210 | /**
211 | * 个体就业潜力44.8
212 | */
213 | private double A1;
214 |
215 | /**
216 | * 个体就业表现55.2
217 | */
218 | private double A2;
219 |
220 | /**
221 | * 就业状态指数25.3
222 | */
223 | private double employmentStatus;
224 |
225 | //学院,年份,就业起薪
226 | public Employment(String college, Integer year, double b21) {
227 | this.college = college;
228 | this.year = year;
229 | B21 = b21;
230 | }
231 |
232 | public Employment() {}
233 | }
234 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/EmploymentPractice.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableField;
5 | import com.baomidou.mybatisplus.annotation.TableId;
6 | import com.baomidou.mybatisplus.annotation.TableName;
7 | import com.baomidou.mybatisplus.extension.activerecord.Model;
8 | import lombok.Data;
9 | import lombok.EqualsAndHashCode;
10 | import lombok.NoArgsConstructor;
11 |
12 | import java.io.Serializable;
13 |
14 | /**
15 | * @author AlgerFan
16 | * @date Created in 2019/1/14 15
17 | * @Description 就业创业实践指数
18 | */
19 | @EqualsAndHashCode(callSuper = true)
20 | @Data
21 | @NoArgsConstructor
22 | @TableName("tb_e_practice")
23 | public class EmploymentPractice extends Model {
24 |
25 | /**
26 | * 就业创业实践指数id
27 | */
28 | @TableId(value = "employment_practice_id", type = IdType.AUTO)
29 | private int EmploymentPracticeId;
30 | /**
31 | * 学院
32 | */
33 | private String college;
34 | /**
35 | * 参赛人数比-1(职业生涯规划大赛)
36 | */
37 | private double m11;
38 | /**
39 | * 参赛人数比-1(简历大赛)
40 | */
41 | private double m12;
42 | /**
43 | * 参赛人数比-1(创业大赛)
44 | */
45 | private double m13;
46 | /**
47 | * 参赛人数2-省创业大赛
48 | */
49 | private double m14;
50 | /**
51 | * 处理数据
52 | * M1: 总参赛人数比47.5
53 | */
54 | @TableField("people_number")
55 | private double peopleNumber;
56 |
57 | /**
58 | * 获奖质量积分-1(生涯规划大赛)
59 | */
60 | private double m21;
61 | /**
62 | * 获奖质量积分-1(简历大赛)
63 | */
64 | private double m22;
65 | /**
66 | * 获奖质量积分-1(创业大赛)
67 | */
68 | private double m23;
69 | /**
70 | * 获奖质量积分-2-省创业大赛
71 | */
72 | private double m24;
73 | /**
74 | * 处理数据
75 | * M2: 总获奖质量比52.5
76 | */
77 | private double quality;
78 |
79 |
80 | /**
81 | * 项目数量积分
82 | */
83 | private double m31;
84 | /**
85 | * 处理数据
86 | * M3: 项目数量比47
87 | */
88 | @TableField("project_number")
89 | private double projectNumber;
90 |
91 | /**
92 | * 项目质量积分
93 | */
94 | private double m41;
95 | /**
96 | * 处理数据
97 | * M4: 项目质量比53
98 | */
99 | @TableField("project_quality")
100 | private double projectQuality;
101 |
102 |
103 | /**
104 | *
105 | * 处理数据
106 | * M5: 特色工作32.5
107 | */
108 | @TableField("featured_work")
109 | private double featuredWork;
110 |
111 | /**
112 | * 处理数据
113 | * 就业创业实践指数
114 | */
115 | private double practice;
116 | /**
117 | * 年份
118 | */
119 | private int year;
120 |
121 | @Override
122 | protected Serializable pkVal() {
123 | return this.EmploymentPracticeId;
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/EmploymentRate.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableField;
5 | import com.baomidou.mybatisplus.annotation.TableId;
6 | import com.baomidou.mybatisplus.annotation.TableName;
7 | import com.baomidou.mybatisplus.extension.activerecord.Model;
8 | import lombok.Data;
9 | import lombok.EqualsAndHashCode;
10 | import lombok.NoArgsConstructor;
11 |
12 | import java.io.Serializable;
13 |
14 | /**
15 | * @author AlgerFan
16 | * @date Created in 2019/1/13 17
17 | * @Description 就业率指数
18 | */
19 | @EqualsAndHashCode(callSuper = true)
20 | @Data
21 | @NoArgsConstructor
22 | @TableName("tb_e_rate")
23 | public class EmploymentRate extends Model {
24 |
25 | /**
26 | * 就业率指数id
27 | */
28 | @TableId(value = "employment_rate_id",type = IdType.AUTO)
29 | private int employmentRateId;
30 | /**
31 | * 学院
32 | */
33 | private String college;
34 | /**
35 | * 初次就业率
36 | */
37 | @TableField("first_employment_rate")
38 | private String firstEmploymentRate;
39 | /**
40 | * 年终就业率
41 | */
42 | @TableField("last_employment_rate")
43 | private String lastEmploymentRate;
44 | /**
45 | * 初次就业率指数=初次就业率*100*0.2495
46 | */
47 | @TableField("first_index")
48 | private String firstIndex;
49 | /**
50 | * 年终就业率指数=年终就业率*100*0.586
51 | */
52 | @TableField("last_index")
53 | private String lastIndex;
54 | /**
55 | * 就业率指数=(初次就业率指数+年终就业率指数)*0.2495
56 | */
57 | @TableField("employment_rate_index")
58 | private String employmentRateIndex;
59 | /**
60 | * 年份
61 | */
62 | private int year;
63 |
64 | @Override
65 | protected Serializable pkVal() {
66 | return this.employmentRateId;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/ExcelBean.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import lombok.Data;
4 | import org.apache.poi.xssf.usermodel.XSSFCellStyle;
5 |
6 | @Data
7 | public class ExcelBean implements java.io.Serializable{
8 | private String headTextName; //列头(标题)名
9 | private String propertyName; //对应字段名
10 | private Integer cols; //合并单元格数
11 | private XSSFCellStyle cellStyle;
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/Grade.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableField;
5 | import com.baomidou.mybatisplus.annotation.TableId;
6 | import com.baomidou.mybatisplus.annotation.TableName;
7 | import lombok.Data;
8 | import lombok.NoArgsConstructor;
9 |
10 | /**
11 | * @author 武凯焱
12 | * @date 2019/3/26 21:46
13 | * @Description:
14 | */
15 | @Data
16 | @NoArgsConstructor
17 | @TableName("tb_grade")
18 | public class Grade {
19 | private static final long serialVersionUID = 1L;
20 | @TableId(value = "grade_id", type = IdType.AUTO)
21 | private Integer gradeId;
22 | @TableField(value = "college_name")
23 | private String collegeName;
24 |
25 |
26 | /**
27 | * 高考成绩
28 | */
29 | @TableField(value = "college_grade")
30 | private Double collegeGrade;
31 | @TableField(value = "major_name")
32 | private String majorName;
33 | /**
34 | * 年份
35 | */
36 | @TableField(value = "year")
37 | private Integer year;
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/Last.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import lombok.Data;
4 | import lombok.NoArgsConstructor;
5 |
6 | /**
7 | * @author AlgerFan
8 | * @date Created in 2019/1/21 16
9 | * @Description
10 | */
11 | @Data
12 | @NoArgsConstructor
13 | public class Last {
14 |
15 | /**
16 | * 学院
17 | */
18 | private String college;
19 | /**
20 | * 生源质量指数10.08
21 | */
22 | private String studentQuality;
23 | /**
24 | * 师资结构指数11.07
25 | */
26 | private String teachersStructure;
27 | /**
28 | * 就业状态指数25.3
29 | */
30 | private String employment;
31 | /**
32 | * 就业率指数24.95
33 | */
34 | private String employmentRate;
35 | /**
36 | * 用人满意度指数13.25
37 | */
38 | private String employerSatisfaction;
39 | /**
40 | * 就业创业实践指数15.35
41 | */
42 | private String employmentPractice;
43 | /**
44 | * 就业竞争力指数
45 | */
46 | private String lastEmployment;
47 |
48 | public Last(String college) {
49 | this.college = college;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/Major.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableField;
5 | import com.baomidou.mybatisplus.annotation.TableId;
6 | import com.baomidou.mybatisplus.annotation.TableName;
7 | import lombok.Data;
8 | import lombok.NoArgsConstructor;
9 |
10 | /**
11 | * @author 武凯焱
12 | * @date 2019/1/13 10:59
13 | * @Description:
14 | */
15 | @Data
16 | @NoArgsConstructor
17 | @TableName("tb_major")
18 | public class Major {
19 | private static final long serialVersionUID = 1L;
20 |
21 | @TableId(value = "major_id", type = IdType.AUTO)
22 | private Integer majorId;
23 | /**
24 | * 专业名称
25 | */
26 | @TableField("major_name")
27 | private String majorName;
28 | /**
29 | * 学院名字
30 | */
31 | @TableField("collage_name")
32 | private String collage_name;
33 | public Major(String majorName, String collage_name) {
34 | this.majorName = majorName;
35 | this.collage_name = collage_name;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/Query.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import lombok.Data;
4 |
5 | /**
6 | * @author zsh
7 | * @company wlgzs
8 | * @create 2019-01-16 9:25
9 | * @Describe:查询Query
10 | */
11 | @Data
12 | public class Query {
13 |
14 | private Integer year;
15 | private String college;
16 | private String majorName;
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/StudentQuality.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableField;
5 | import com.baomidou.mybatisplus.annotation.TableId;
6 | import com.baomidou.mybatisplus.annotation.TableName;
7 | import lombok.Data;
8 | import lombok.NoArgsConstructor;
9 |
10 | /**
11 | * @author 武凯焱
12 | * @date 2019/1/15 15:49
13 | * @Description:
14 | */
15 | @Data
16 | @NoArgsConstructor
17 | @TableName("tb_student_quality")
18 | public class StudentQuality {
19 | private static final long serialVersionUID = 1L;
20 | /**
21 | * 生源质量Id
22 | */
23 | @TableId(value = "quality_id", type = IdType.AUTO)
24 | private Integer qualityId;
25 | /**
26 | * 专业名字
27 | */
28 | @TableField(value = "major_name")
29 | private String majorName;
30 | /**
31 | * 专业1志愿报考人数
32 | */
33 | @TableField(value = "fist_volunteer_num")
34 | private Integer fistVolunteerNum;
35 |
36 | /**
37 | * 学生实际进档人数
38 | */
39 | @TableField(value = "students_num")
40 | private Integer studentsNum;
41 |
42 | /**
43 | * 专业2-5志愿报考总人次
44 | */
45 | @TableField(value = "after_volunteer_num")
46 | private Integer afterVolunteerNum;
47 | /**
48 | *录取平均分
49 | */
50 | @TableField(value = "average_score")
51 | private Double averageScore;
52 |
53 | /**
54 | * 专业认可度
55 |
56 | */
57 | @TableField(value = "major_recognition")
58 | private Double majorRecognition;
59 | /**
60 | * 高考成绩
61 | */
62 | @TableField(value = "college_entrance")
63 | private Double collegeEntrance;
64 | /**
65 | * 专业优势
66 | */
67 | @TableField(value = "major_advantage")
68 | private Double majorAdvantage;
69 | /**
70 | * 年份
71 | */
72 | @TableField(value = "year")
73 | private Integer year;
74 |
75 | /**
76 | * 学院专业优势
77 | */
78 | @TableField(value = "collage_advantage")
79 | private Double colleageAdvantage;
80 | /**
81 | * 学院生源质量
82 | */
83 | @TableField(value = "collage_quality")
84 | private Double colleageQuality;
85 | /**
86 | * 报到率
87 | */
88 | @TableField(value = "yield_rate")
89 | private Double yieldRate;
90 |
91 | @TableField(value = "colleage_name")
92 | private String colleageName;
93 | /**
94 | * 文理科标识
95 | */
96 | @TableField(value = "mark")
97 | private int mark;
98 |
99 | public StudentQuality(String majorName, Integer fistVolunteerNum, Integer studentsNum, Integer afterVolunteerNum, Double averageScore, Double majorRecognition, Double collegeEntrance, Double majorAdvantage,Integer year) {
100 | this.majorName = majorName;
101 | this.fistVolunteerNum = fistVolunteerNum;
102 | this.studentsNum = studentsNum;
103 | this.afterVolunteerNum = afterVolunteerNum;
104 | this.averageScore = averageScore;
105 | this.majorRecognition = majorRecognition;
106 | this.collegeEntrance = collegeEntrance;
107 | this.majorAdvantage = majorAdvantage;
108 | this.year = year;
109 | }
110 | public StudentQuality(String majorName, Double averageScore, Double majorRecognition, Double collegeEntrance, Double majorAdvantage, Integer year) {
111 | this.majorName = majorName;
112 | this.averageScore = averageScore;
113 | this.majorRecognition = majorRecognition;
114 | this.collegeEntrance = collegeEntrance;
115 | this.majorAdvantage = majorAdvantage;
116 | this.year = year;
117 | }
118 | @Override
119 | public String toString() {
120 | return "StudentQuality{" +
121 | "qualityId=" + qualityId +
122 | ", majorName='" + majorName + '\'' +
123 | ", fistVolunteerNum=" + fistVolunteerNum +
124 | ", studentsNum=" + studentsNum +
125 | ", afterVolunteerNum=" + afterVolunteerNum +
126 | ", averageScore=" + averageScore +
127 | ", majorRecognition=" + majorRecognition +
128 | ", collegeEntrance=" + collegeEntrance +
129 | ", majorAdvantage=" + majorAdvantage +
130 | ", year=" + year +
131 | ", colleageAdvantage=" + colleageAdvantage +
132 | ", colleageQuality=" + colleageQuality +
133 | ", yieldRate=" + yieldRate +
134 | ", colleageName='" + colleageName + '\'' +
135 | '}';
136 | }
137 | }
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/TeachersStructure.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableId;
5 | import com.baomidou.mybatisplus.annotation.TableName;
6 | import lombok.Data;
7 |
8 | /**
9 | * @author zsh
10 | * @company wlgzs
11 | * @create 2019-01-13 10:11
12 | * @Describe 师资结构表的测量
13 | */
14 | @Data
15 | @TableName("tb_ts")
16 | public class TeachersStructure {
17 |
18 | /**
19 | * 师资结构ID
20 | */
21 | @TableId(type = IdType.AUTO)
22 | private Integer tsId;
23 |
24 | /**
25 | * 学院
26 | */
27 | private String collegeName;
28 |
29 | /**
30 | * 在校生数
31 | */
32 | private Integer stuNum;
33 |
34 | /**
35 | * 教师总数
36 | */
37 | private double teaNum;
38 |
39 | /**
40 | * 研究生学位教师数
41 | */
42 | private double graNum;
43 |
44 | /**
45 | * 高级职务教师总数
46 | */
47 | private double senNum;
48 |
49 | /**
50 | * 生师比
51 | */
52 | private double B21;
53 |
54 | /**
55 | * 研究生学位教师占教师总数比
56 | */
57 | private double B22;
58 |
59 | /**
60 | * 高级职称教师占教师总数比
61 | */
62 | private double B23;
63 |
64 | /**
65 | * 生师比合格值
66 | */
67 | private Integer qualified;
68 |
69 | /**
70 | * 生师比积分
71 | */
72 | private double M1;
73 |
74 | /**
75 | * 研究生学位教师积分
76 | */
77 | private double M2;
78 |
79 | /**
80 | * 高级职务教师积分
81 | */
82 | private double M3;
83 |
84 | /**
85 | * 生师比33.7
86 | */
87 | private double W1;
88 |
89 | /**
90 | * 高学历教师占比32.9
91 | */
92 | private double W2;
93 |
94 | /**
95 | * 高职称教师占比33.9
96 | */
97 | private double W3;
98 |
99 | /**
100 | * 师资结构指数
101 | */
102 | private double A2;
103 |
104 | /**
105 | * 年份
106 | */
107 | private Integer year;
108 | }
109 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/User.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableId;
5 | import com.baomidou.mybatisplus.annotation.TableName;
6 | import lombok.Data;
7 |
8 | /**
9 | * @author zsh
10 | * @company wlgzs
11 | * @create 2019-01-14 14:56
12 | * @Describe 用户
13 | */
14 | @Data
15 | @TableName("tb_user")
16 | public class User {
17 |
18 | /**
19 | * 用户ID
20 | */
21 | @TableId(type = IdType.AUTO)
22 | private Integer userId;
23 |
24 | /**
25 | * 用户名
26 | */
27 | private String userName;
28 |
29 | /**
30 | * 密码
31 | */
32 | private String password;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/pojo/Year.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.pojo;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableId;
5 | import com.baomidou.mybatisplus.annotation.TableName;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | import java.io.Serializable;
10 |
11 | /**
12 | * @author zsh
13 | * @company wlgzs
14 | * @create 2019-01-12 15:24
15 | * @Describe 年份实体类
16 | */
17 | @Data
18 | @NoArgsConstructor
19 | @TableName("tb_year")
20 | public class Year implements Serializable{
21 | /**
22 | * 年份id
23 | */
24 | @TableId(type = IdType.AUTO)
25 | private Integer yearId;
26 | /**
27 | * 年份
28 | */
29 | private Integer yearName;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/CollegeService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import org.wlgzs.index_evaluation.enums.Result;
4 | import org.wlgzs.index_evaluation.pojo.College;
5 | import com.baomidou.mybatisplus.extension.service.IService;
6 |
7 | import javax.servlet.http.HttpServletRequest;
8 | import java.io.IOException;
9 |
10 | /**
11 | *
12 | * 服务类
13 | *
14 | *
15 | * @author algerfan
16 | * @since 2019-01-13
17 | */
18 | public interface CollegeService extends IService {
19 |
20 | Result saveCollege(HttpServletRequest request) throws IOException;
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/EmployerSatisfactionService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.springframework.transaction.annotation.Transactional;
5 | import org.springframework.ui.Model;
6 | import org.springframework.web.multipart.MultipartFile;
7 | import org.wlgzs.index_evaluation.pojo.EmployerSatisfaction;
8 |
9 | import javax.servlet.http.HttpServletResponse;
10 | import java.io.IOException;
11 | import java.util.List;
12 |
13 | /**
14 | * @author 武凯焱
15 | * @date 2019/1/14 8:09
16 | * @Description:
17 | */
18 | public interface EmployerSatisfactionService extends IService {
19 | @Transactional
20 | //导入excel表
21 | List importExcel(MultipartFile file,String year)throws IOException;
22 | //数据添加到数据库
23 | @Transactional
24 | boolean add(List employerSatisfactions);
25 | //导出excel表
26 | void exportData(int year, HttpServletResponse response) throws IOException;
27 | //删除数据
28 | boolean delete(String year); @Transactional
29 | //导入excel表
30 | boolean NewImportExcel(MultipartFile file,String year)throws IOException;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/EmploymentPracticeService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.wlgzs.index_evaluation.enums.Result;
5 | import org.wlgzs.index_evaluation.pojo.EmploymentPractice;
6 |
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 | import java.io.IOException;
10 |
11 | /**
12 | * @author AlgerFan
13 | * @date Created in 2019/1/14 15
14 | * @Description 就业创业实践指数
15 | */
16 | public interface EmploymentPracticeService extends IService {
17 |
18 | Result importData(Integer year, HttpServletRequest request);
19 |
20 | boolean deleteYear(int year);
21 |
22 | void exportData(int year, HttpServletResponse response) throws IOException;
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/EmploymentRateService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.wlgzs.index_evaluation.enums.Result;
5 | import org.wlgzs.index_evaluation.pojo.EmploymentRate;
6 |
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 | import java.io.IOException;
10 |
11 | /**
12 | * @author AlgerFan
13 | * @date Created in 2019/1/13 17
14 | * @Description 就业率指数
15 | */
16 | public interface EmploymentRateService extends IService {
17 |
18 | /**
19 | * 导入学院、初次就业率、年终就业率
20 | * @param year
21 | * @param request
22 | */
23 | Result importData(Integer year, HttpServletRequest request);
24 |
25 | void exportData(int year, HttpServletResponse response) throws IOException;
26 |
27 | boolean deleteYear(int year);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/EmploymentService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.springframework.transaction.annotation.Transactional;
5 | import org.springframework.web.multipart.MultipartFile;
6 | import org.wlgzs.index_evaluation.pojo.Employment;
7 |
8 | import javax.servlet.http.HttpServletResponse;
9 | import java.io.InputStream;
10 | import java.util.List;
11 |
12 | /**
13 | * @author zsh
14 | * @company wlgzs
15 | * @create 2019-01-14 10:01
16 | * @Describe
17 | */
18 | public interface EmploymentService extends IService{
19 |
20 | //批量导入
21 | @Transactional
22 | List importExcelInfo(InputStream in, MultipartFile file,Integer year);
23 | //导入就业起薪值
24 | @Transactional
25 | List importExcelInfo1(InputStream in, MultipartFile file);
26 |
27 | //添加
28 | @Transactional
29 | Integer add(Employment employment);
30 |
31 | //批量导出
32 | @Transactional
33 | void export(Integer year, HttpServletResponse response);
34 |
35 | //删除
36 | @Transactional
37 | Integer delete(Employment employment);
38 |
39 | //通过年份查询
40 | @Transactional
41 | List findByYear(Integer year);
42 |
43 | //通过年份和学院查询
44 | @Transactional
45 | Employment findByCollegeAndYear(String college,Integer year);
46 |
47 | //更新
48 | Integer update(Employment employment);
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/GradeService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.wlgzs.index_evaluation.pojo.Grade;
5 |
6 | /**
7 | * @author 武凯焱
8 | * @date 2019/3/26 21:54
9 | * @Description:
10 | */
11 | public interface GradeService extends IService {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/MajorService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.springframework.ui.Model;
5 | import org.springframework.web.bind.annotation.RequestParam;
6 | import org.springframework.web.multipart.MultipartFile;
7 | import org.wlgzs.index_evaluation.pojo.Major;
8 |
9 | import java.io.IOException;
10 |
11 | /**
12 | * @author 武凯焱
13 | * @date 2019/1/13 11:15
14 | * @Description:
15 | */
16 | public interface MajorService extends IService {
17 | //导入excel数据
18 | boolean importExcel(@RequestParam("file") MultipartFile file)throws IOException;
19 |
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/StudentQualityService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.springframework.transaction.annotation.Transactional;
5 | import org.springframework.ui.Model;
6 | import org.springframework.web.multipart.MultipartFile;
7 | import org.wlgzs.index_evaluation.pojo.StudentQuality;
8 |
9 | import javax.servlet.http.HttpServletResponse;
10 | import java.io.IOException;
11 | import java.util.List;
12 |
13 | /**
14 | * @author 武凯焱
15 | * @date 2019/1/15 17:34
16 | * @Description:
17 | */
18 | public interface StudentQualityService extends IService {
19 | //导入excel数据
20 | @Transactional
21 | boolean importExcel(MultipartFile file, String year) throws IOException;
22 | @Transactional
23 | void add(List studentQualityList);
24 | //删除一个年份的数据
25 |
26 | @Transactional
27 | boolean delete( Integer year);
28 | //导出一个年份结果数据
29 | @Transactional
30 | void exportData(int year,HttpServletResponse response)throws IOException;
31 | @Transactional
32 | //获取所有学院生源质量指数
33 | List getQualityIndex(int year);
34 | @Transactional
35 | void download(HttpServletResponse response);
36 | @Transactional
37 | //文件写入
38 | boolean saveFile(MultipartFile file,String filePath);
39 | //文件上传 和解析(zip) 和解析录入数据
40 | @Transactional
41 | boolean upload(MultipartFile file,String year) throws IOException;
42 |
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/TeachersStructureService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.springframework.transaction.annotation.Transactional;
5 | import org.springframework.web.multipart.MultipartFile;
6 | import org.wlgzs.index_evaluation.pojo.TeachersStructure;
7 | import org.wlgzs.index_evaluation.pojo.Year;
8 |
9 | import javax.servlet.http.HttpServletResponse;
10 | import java.io.InputStream;
11 | import java.util.List;
12 |
13 | /**
14 | * @author zsh
15 | * @company wlgzs
16 | * @create 2019-01-13 10:20
17 | * @Describe
18 | */
19 | public interface TeachersStructureService extends IService {
20 |
21 | //批量导入
22 | @Transactional
23 | List importExcelInfo(InputStream in, MultipartFile file);
24 |
25 | //批量导出
26 | @Transactional
27 | void export(Integer year, HttpServletResponse response);
28 |
29 | //单个添加
30 | @Transactional
31 | Integer add(TeachersStructure teachersStructure);
32 |
33 | //更新操作
34 | @Transactional
35 | Integer update(TeachersStructure teachersStructure);
36 |
37 | //查询所有数据
38 | @Transactional
39 | List findAll();
40 |
41 | //根据年份查询
42 | @Transactional
43 | List findByYear(Integer year);
44 |
45 | //删除
46 | @Transactional
47 | Integer delete(TeachersStructure teachersStructure);
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/UserService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import org.springframework.transaction.annotation.Transactional;
5 | import org.wlgzs.index_evaluation.pojo.User;
6 |
7 | /**
8 | * @author zsh
9 | * @company wlgzs
10 | * @create 2019-01-14 14:59
11 | * @Describe
12 | */
13 | public interface UserService extends IService {
14 |
15 | //通过用户名查找用户
16 | @Transactional
17 | User findByUserName(String userName);
18 |
19 | //修改密码
20 | @Transactional
21 | Integer update(User user);
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/YearService.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service;
2 |
3 | import com.baomidou.mybatisplus.core.metadata.IPage;
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 | import com.baomidou.mybatisplus.extension.service.IService;
6 | import org.springframework.transaction.annotation.Transactional;
7 | import org.wlgzs.index_evaluation.pojo.Year;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | * @author zsh
13 | * @company wlgzs
14 | * @create 2019-01-12 15:45
15 | * @Describe
16 | */
17 | public interface YearService extends IService {
18 |
19 | //查询所有年份
20 | @Transactional
21 | List findAllYear();
22 |
23 | //通过年份名称查询
24 | @Transactional
25 | Year findByName(Integer name);
26 |
27 | //添加年份
28 | @Transactional
29 | Integer add(Year year);
30 |
31 | //删除年份
32 | @Transactional
33 | Integer delete(Integer id);
34 |
35 | //修改年份
36 | @Transactional
37 | Integer update(Year year);
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/org/wlgzs/index_evaluation/service/impl/CollegeServiceImpl.java:
--------------------------------------------------------------------------------
1 | package org.wlgzs.index_evaluation.service.impl;
2 |
3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4 | import org.springframework.stereotype.Service;
5 | import org.springframework.web.multipart.MultipartFile;
6 | import org.springframework.web.multipart.MultipartHttpServletRequest;
7 | import org.wlgzs.index_evaluation.dao.CollegeMapper;
8 | import org.wlgzs.index_evaluation.enums.Result;
9 | import org.wlgzs.index_evaluation.enums.ResultCodeEnum;
10 | import org.wlgzs.index_evaluation.pojo.College;
11 | import org.wlgzs.index_evaluation.service.CollegeService;
12 | import org.wlgzs.index_evaluation.util.ExcelUtil;
13 |
14 | import javax.annotation.Resource;
15 | import javax.servlet.http.HttpServletRequest;
16 | import java.io.InputStream;
17 | import java.util.ArrayList;
18 | import java.util.List;
19 |
20 | /**
21 | *
22 | * 服务实现类
23 | *
24 | *
25 | * @author algerfan
26 | * @since 2019-01-13
27 | */
28 | @Service
29 | public class CollegeServiceImpl extends ServiceImpl implements CollegeService {
30 |
31 | @Resource
32 | private CollegeMapper collegeMapper;
33 |
34 | @Override
35 | public Result saveCollege(HttpServletRequest request) {
36 | //获取上传的文件
37 | MultipartHttpServletRequest multipart = (MultipartHttpServletRequest) request;
38 | MultipartFile file = multipart.getFile("file");
39 | if(file!=null && file.getOriginalFilename()==null){
40 | Result result = new Result(ResultCodeEnum.UNSAVE);
41 | result.setMsg("上传失败");
42 | return result;
43 | }
44 | List colleges = new ArrayList<>();
45 | List> listob;
46 | try {
47 | assert file != null;
48 | InputStream in = file.getInputStream();
49 | listob = ExcelUtil.getBankListByExcel(in,file.getOriginalFilename());
50 | //遍历listob数据,把数据放到List中
51 | for (List