Commit b7ccb8add03c77d4b5ba7811f71d688b75adf5d9
1 parent
5efb4092
Exists in
master
and in
1 other branch
学情 排课 嵌入分布式
Showing
257 changed files
with
16090 additions
and
2343 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 257 files displayed.
cloud/common/pom.xml
@@ -19,6 +19,16 @@ | @@ -19,6 +19,16 @@ | ||
19 | 19 | ||
20 | <dependencies> | 20 | <dependencies> |
21 | <dependency> | 21 | <dependency> |
22 | + <groupId>redis.clients</groupId> | ||
23 | + <artifactId>jedis</artifactId> | ||
24 | + <version>2.9.0</version> | ||
25 | + </dependency> | ||
26 | + <dependency> | ||
27 | + <groupId>org.apache.httpcomponents</groupId> | ||
28 | + <artifactId>httpclient</artifactId> | ||
29 | + <version>4.3</version> | ||
30 | + </dependency> | ||
31 | + <dependency> | ||
22 | <groupId>org.apache.tomcat.embed</groupId> | 32 | <groupId>org.apache.tomcat.embed</groupId> |
23 | <artifactId>tomcat-embed-core</artifactId> | 33 | <artifactId>tomcat-embed-core</artifactId> |
24 | </dependency> | 34 | </dependency> |
@@ -40,6 +50,16 @@ | @@ -40,6 +50,16 @@ | ||
40 | <artifactId>commons-collections</artifactId> | 50 | <artifactId>commons-collections</artifactId> |
41 | <version>3.2.2</version> | 51 | <version>3.2.2</version> |
42 | </dependency> | 52 | </dependency> |
53 | + <dependency> | ||
54 | + <groupId>io.springfox</groupId> | ||
55 | + <artifactId>springfox-swagger2</artifactId> | ||
56 | + <version>2.5.0</version> | ||
57 | + </dependency> | ||
58 | + <dependency> | ||
59 | + <groupId>io.springfox</groupId> | ||
60 | + <artifactId>springfox-swagger-ui</artifactId> | ||
61 | + <version>2.5.0</version> | ||
62 | + </dependency> | ||
43 | </dependencies> | 63 | </dependencies> |
44 | 64 | ||
45 | <build> | 65 | <build> |
cloud/common/src/main/java/com/sincere/common/dto/independence/AnalyseDetailDto.java
0 → 100644
@@ -0,0 +1,76 @@ | @@ -0,0 +1,76 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/11/13 0013 10:05 | ||
10 | + */ | ||
11 | +public class AnalyseDetailDto implements Serializable { | ||
12 | + | ||
13 | + private int id ; | ||
14 | + private int analyseId ; | ||
15 | + private String questionNumber ; | ||
16 | + private String questionType ; | ||
17 | + private int difficult ; | ||
18 | + private Double score ; | ||
19 | + private Date createTime ; | ||
20 | + | ||
21 | + public int getId() { | ||
22 | + return id; | ||
23 | + } | ||
24 | + | ||
25 | + public void setId(int id) { | ||
26 | + this.id = id; | ||
27 | + } | ||
28 | + | ||
29 | + public int getAnalyseId() { | ||
30 | + return analyseId; | ||
31 | + } | ||
32 | + | ||
33 | + public void setAnalyseId(int analyseId) { | ||
34 | + this.analyseId = analyseId; | ||
35 | + } | ||
36 | + | ||
37 | + public String getQuestionNumber() { | ||
38 | + return questionNumber; | ||
39 | + } | ||
40 | + | ||
41 | + public void setQuestionNumber(String questionNumber) { | ||
42 | + this.questionNumber = questionNumber; | ||
43 | + } | ||
44 | + | ||
45 | + public int getDifficult() { | ||
46 | + return difficult; | ||
47 | + } | ||
48 | + | ||
49 | + public void setDifficult(int difficult) { | ||
50 | + this.difficult = difficult; | ||
51 | + } | ||
52 | + | ||
53 | + public Double getScore() { | ||
54 | + return score; | ||
55 | + } | ||
56 | + | ||
57 | + public void setScore(Double score) { | ||
58 | + this.score = score; | ||
59 | + } | ||
60 | + | ||
61 | + public Date getCreateTime() { | ||
62 | + return createTime; | ||
63 | + } | ||
64 | + | ||
65 | + public void setCreateTime(Date createTime) { | ||
66 | + this.createTime = createTime; | ||
67 | + } | ||
68 | + | ||
69 | + public String getQuestionType() { | ||
70 | + return questionType; | ||
71 | + } | ||
72 | + | ||
73 | + public void setQuestionType(String questionType) { | ||
74 | + this.questionType = questionType; | ||
75 | + } | ||
76 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/AnalyseDimensionalDto.java
0 → 100644
@@ -0,0 +1,67 @@ | @@ -0,0 +1,67 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/11/13 0013 10:19 | ||
10 | + */ | ||
11 | +public class AnalyseDimensionalDto implements Serializable { | ||
12 | + | ||
13 | + private int id ; | ||
14 | + private int analyseId ; | ||
15 | + private String questionNumber ; | ||
16 | + private int dimensionalId ; | ||
17 | + private Double score ; | ||
18 | + private Date createTime ; | ||
19 | + | ||
20 | + public int getId() { | ||
21 | + return id; | ||
22 | + } | ||
23 | + | ||
24 | + public void setId(int id) { | ||
25 | + this.id = id; | ||
26 | + } | ||
27 | + | ||
28 | + public int getAnalyseId() { | ||
29 | + return analyseId; | ||
30 | + } | ||
31 | + | ||
32 | + public void setAnalyseId(int analyseId) { | ||
33 | + this.analyseId = analyseId; | ||
34 | + } | ||
35 | + | ||
36 | + public String getQuestionNumber() { | ||
37 | + return questionNumber; | ||
38 | + } | ||
39 | + | ||
40 | + public void setQuestionNumber(String questionNumber) { | ||
41 | + this.questionNumber = questionNumber; | ||
42 | + } | ||
43 | + | ||
44 | + public int getDimensionalId() { | ||
45 | + return dimensionalId; | ||
46 | + } | ||
47 | + | ||
48 | + public void setDimensionalId(int dimensionalId) { | ||
49 | + this.dimensionalId = dimensionalId; | ||
50 | + } | ||
51 | + | ||
52 | + public Double getScore() { | ||
53 | + return score; | ||
54 | + } | ||
55 | + | ||
56 | + public void setScore(Double score) { | ||
57 | + this.score = score; | ||
58 | + } | ||
59 | + | ||
60 | + public Date getCreateTime() { | ||
61 | + return createTime; | ||
62 | + } | ||
63 | + | ||
64 | + public void setCreateTime(Date createTime) { | ||
65 | + this.createTime = createTime; | ||
66 | + } | ||
67 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/AnalyseDto.java
0 → 100644
@@ -0,0 +1,85 @@ | @@ -0,0 +1,85 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/11/13 0013 9:39 | ||
10 | + */ | ||
11 | +public class AnalyseDto implements Serializable { | ||
12 | + | ||
13 | + private int id ; | ||
14 | + private String examName ; | ||
15 | + private String examTime ; | ||
16 | + private String courseName ; | ||
17 | + private Date createTime ; | ||
18 | + private Double maxScore ; | ||
19 | + private String grade ; | ||
20 | + private String examScope ; | ||
21 | + | ||
22 | + public int getId() { | ||
23 | + return id; | ||
24 | + } | ||
25 | + | ||
26 | + public void setId(int id) { | ||
27 | + this.id = id; | ||
28 | + } | ||
29 | + | ||
30 | + public String getExamName() { | ||
31 | + return examName; | ||
32 | + } | ||
33 | + | ||
34 | + public void setExamName(String examName) { | ||
35 | + this.examName = examName; | ||
36 | + } | ||
37 | + | ||
38 | + public String getExamTime() { | ||
39 | + return examTime; | ||
40 | + } | ||
41 | + | ||
42 | + public void setExamTime(String examTime) { | ||
43 | + this.examTime = examTime; | ||
44 | + } | ||
45 | + | ||
46 | + public String getCourseName() { | ||
47 | + return courseName; | ||
48 | + } | ||
49 | + | ||
50 | + public void setCourseName(String courseName) { | ||
51 | + this.courseName = courseName; | ||
52 | + } | ||
53 | + | ||
54 | + public Date getCreateTime() { | ||
55 | + return createTime; | ||
56 | + } | ||
57 | + | ||
58 | + public void setCreateTime(Date createTime) { | ||
59 | + this.createTime = createTime; | ||
60 | + } | ||
61 | + | ||
62 | + public Double getMaxScore() { | ||
63 | + return maxScore; | ||
64 | + } | ||
65 | + | ||
66 | + public void setMaxScore(Double maxScore) { | ||
67 | + this.maxScore = maxScore; | ||
68 | + } | ||
69 | + | ||
70 | + public String getGrade() { | ||
71 | + return grade; | ||
72 | + } | ||
73 | + | ||
74 | + public void setGrade(String grade) { | ||
75 | + this.grade = grade; | ||
76 | + } | ||
77 | + | ||
78 | + public String getExamScope() { | ||
79 | + return examScope; | ||
80 | + } | ||
81 | + | ||
82 | + public void setExamScope(String examScope) { | ||
83 | + this.examScope = examScope; | ||
84 | + } | ||
85 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/ChapterDto.java
0 → 100644
@@ -0,0 +1,67 @@ | @@ -0,0 +1,67 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/11/13 0013 9:17 | ||
9 | + */ | ||
10 | +public class ChapterDto implements Serializable { | ||
11 | + | ||
12 | + private int id ; | ||
13 | + private int analyseId ; | ||
14 | + private int chapterNumber ; | ||
15 | + private String chapterName ; | ||
16 | + private Double chapterScore ; | ||
17 | + | ||
18 | + private Double percent ; | ||
19 | + | ||
20 | + public int getId() { | ||
21 | + return id; | ||
22 | + } | ||
23 | + | ||
24 | + public void setId(int id) { | ||
25 | + this.id = id; | ||
26 | + } | ||
27 | + | ||
28 | + public int getAnalyseId() { | ||
29 | + return analyseId; | ||
30 | + } | ||
31 | + | ||
32 | + public void setAnalyseId(int analyseId) { | ||
33 | + this.analyseId = analyseId; | ||
34 | + } | ||
35 | + | ||
36 | + public int getChapterNumber() { | ||
37 | + return chapterNumber; | ||
38 | + } | ||
39 | + | ||
40 | + public void setChapterNumber(int chapterNumber) { | ||
41 | + this.chapterNumber = chapterNumber; | ||
42 | + } | ||
43 | + | ||
44 | + public String getChapterName() { | ||
45 | + return chapterName; | ||
46 | + } | ||
47 | + | ||
48 | + public void setChapterName(String chapterName) { | ||
49 | + this.chapterName = chapterName; | ||
50 | + } | ||
51 | + | ||
52 | + public Double getChapterScore() { | ||
53 | + return chapterScore; | ||
54 | + } | ||
55 | + | ||
56 | + public void setChapterScore(Double chapterScore) { | ||
57 | + this.chapterScore = chapterScore; | ||
58 | + } | ||
59 | + | ||
60 | + public Double getPercent() { | ||
61 | + return percent; | ||
62 | + } | ||
63 | + | ||
64 | + public void setPercent(Double percent) { | ||
65 | + this.percent = percent; | ||
66 | + } | ||
67 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/ClassCourseDto.java
0 → 100644
@@ -0,0 +1,132 @@ | @@ -0,0 +1,132 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/11/13 0013 16:46 | ||
10 | + */ | ||
11 | +public class ClassCourseDto implements Serializable { | ||
12 | + | ||
13 | + private Integer courseId; | ||
14 | + | ||
15 | + private Integer schoolId; | ||
16 | + | ||
17 | + private String grade; | ||
18 | + | ||
19 | + private Integer classId; | ||
20 | + | ||
21 | + private Integer singleOrDouble; | ||
22 | + | ||
23 | + private Integer week; | ||
24 | + | ||
25 | + private Integer courseNumber; | ||
26 | + | ||
27 | + private String courseName; | ||
28 | + | ||
29 | + private Date createTime; | ||
30 | + | ||
31 | + private Date updateTime; | ||
32 | + | ||
33 | + private String team ; | ||
34 | + | ||
35 | + private int courseOpenId ; | ||
36 | + | ||
37 | + public Integer getCourseId() { | ||
38 | + return courseId; | ||
39 | + } | ||
40 | + | ||
41 | + public void setCourseId(Integer courseId) { | ||
42 | + this.courseId = courseId; | ||
43 | + } | ||
44 | + | ||
45 | + public Integer getSchoolId() { | ||
46 | + return schoolId; | ||
47 | + } | ||
48 | + | ||
49 | + public void setSchoolId(Integer schoolId) { | ||
50 | + this.schoolId = schoolId; | ||
51 | + } | ||
52 | + | ||
53 | + public String getGrade() { | ||
54 | + return grade; | ||
55 | + } | ||
56 | + | ||
57 | + public void setGrade(String grade) { | ||
58 | + this.grade = grade; | ||
59 | + } | ||
60 | + | ||
61 | + public Integer getClassId() { | ||
62 | + return classId; | ||
63 | + } | ||
64 | + | ||
65 | + public void setClassId(Integer classId) { | ||
66 | + this.classId = classId; | ||
67 | + } | ||
68 | + | ||
69 | + public Integer getSingleOrDouble() { | ||
70 | + return singleOrDouble; | ||
71 | + } | ||
72 | + | ||
73 | + public void setSingleOrDouble(Integer singleOrDouble) { | ||
74 | + this.singleOrDouble = singleOrDouble; | ||
75 | + } | ||
76 | + | ||
77 | + public Integer getWeek() { | ||
78 | + return week; | ||
79 | + } | ||
80 | + | ||
81 | + public void setWeek(Integer week) { | ||
82 | + this.week = week; | ||
83 | + } | ||
84 | + | ||
85 | + public Integer getCourseNumber() { | ||
86 | + return courseNumber; | ||
87 | + } | ||
88 | + | ||
89 | + public void setCourseNumber(Integer courseNumber) { | ||
90 | + this.courseNumber = courseNumber; | ||
91 | + } | ||
92 | + | ||
93 | + public String getCourseName() { | ||
94 | + return courseName; | ||
95 | + } | ||
96 | + | ||
97 | + public void setCourseName(String courseName) { | ||
98 | + this.courseName = courseName == null ? null : courseName.trim(); | ||
99 | + } | ||
100 | + | ||
101 | + public Date getCreateTime() { | ||
102 | + return createTime; | ||
103 | + } | ||
104 | + | ||
105 | + public void setCreateTime(Date createTime) { | ||
106 | + this.createTime = createTime; | ||
107 | + } | ||
108 | + | ||
109 | + public Date getUpdateTime() { | ||
110 | + return updateTime; | ||
111 | + } | ||
112 | + | ||
113 | + public void setUpdateTime(Date updateTime) { | ||
114 | + this.updateTime = updateTime; | ||
115 | + } | ||
116 | + | ||
117 | + public String getTeam() { | ||
118 | + return team; | ||
119 | + } | ||
120 | + | ||
121 | + public void setTeam(String team) { | ||
122 | + this.team = team; | ||
123 | + } | ||
124 | + | ||
125 | + public int getCourseOpenId() { | ||
126 | + return courseOpenId; | ||
127 | + } | ||
128 | + | ||
129 | + public void setCourseOpenId(int courseOpenId) { | ||
130 | + this.courseOpenId = courseOpenId; | ||
131 | + } | ||
132 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/ClassModelDto.java
0 → 100644
@@ -0,0 +1,51 @@ | @@ -0,0 +1,51 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/11/13 0013 16:35 | ||
9 | + */ | ||
10 | +public class ClassModelDto implements Serializable { | ||
11 | + | ||
12 | + private Integer classId; | ||
13 | + | ||
14 | + private Integer schoolId; | ||
15 | + | ||
16 | + private String grade; | ||
17 | + | ||
18 | + private String className; | ||
19 | + | ||
20 | + public Integer getClassId() { | ||
21 | + return classId; | ||
22 | + } | ||
23 | + | ||
24 | + public void setClassId(Integer classId) { | ||
25 | + this.classId = classId; | ||
26 | + } | ||
27 | + | ||
28 | + public Integer getSchoolId() { | ||
29 | + return schoolId; | ||
30 | + } | ||
31 | + | ||
32 | + public void setSchoolId(Integer schoolId) { | ||
33 | + this.schoolId = schoolId; | ||
34 | + } | ||
35 | + | ||
36 | + public String getGrade() { | ||
37 | + return grade; | ||
38 | + } | ||
39 | + | ||
40 | + public void setGrade(String grade) { | ||
41 | + this.grade = grade; | ||
42 | + } | ||
43 | + | ||
44 | + public String getClassName() { | ||
45 | + return className; | ||
46 | + } | ||
47 | + | ||
48 | + public void setClassName(String className) { | ||
49 | + this.className = className == null ? null : className.trim(); | ||
50 | + } | ||
51 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/CourseDto.java
0 → 100644
@@ -0,0 +1,57 @@ | @@ -0,0 +1,57 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/11/13 0013 16:38 | ||
9 | + */ | ||
10 | +public class CourseDto implements Serializable { | ||
11 | + | ||
12 | + private int id ; | ||
13 | + private int schoolId ; | ||
14 | + private int courseId ; | ||
15 | + private String courseName ; | ||
16 | + private int courseType; | ||
17 | + | ||
18 | + public int getCourseId() { | ||
19 | + return courseId; | ||
20 | + } | ||
21 | + | ||
22 | + public void setCourseId(int courseId) { | ||
23 | + this.courseId = courseId; | ||
24 | + } | ||
25 | + | ||
26 | + public String getCourseName() { | ||
27 | + return courseName; | ||
28 | + } | ||
29 | + | ||
30 | + public void setCourseName(String courseName) { | ||
31 | + this.courseName = courseName; | ||
32 | + } | ||
33 | + | ||
34 | + public int getId() { | ||
35 | + return id; | ||
36 | + } | ||
37 | + | ||
38 | + public void setId(int id) { | ||
39 | + this.id = id; | ||
40 | + } | ||
41 | + | ||
42 | + public int getSchoolId() { | ||
43 | + return schoolId; | ||
44 | + } | ||
45 | + | ||
46 | + public void setSchoolId(int schoolId) { | ||
47 | + this.schoolId = schoolId; | ||
48 | + } | ||
49 | + | ||
50 | + public int getCourseType() { | ||
51 | + return courseType; | ||
52 | + } | ||
53 | + | ||
54 | + public void setCourseType(int courseType) { | ||
55 | + this.courseType = courseType; | ||
56 | + } | ||
57 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/GetLearnDto.java
0 → 100644
@@ -0,0 +1,30 @@ | @@ -0,0 +1,30 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/11/13 0013 9:04 | ||
9 | + */ | ||
10 | +public class GetLearnDto implements Serializable { | ||
11 | + | ||
12 | + private int analyseId ; | ||
13 | + private String schoolName ; | ||
14 | + | ||
15 | + public int getAnalyseId() { | ||
16 | + return analyseId; | ||
17 | + } | ||
18 | + | ||
19 | + public void setAnalyseId(int analyseId) { | ||
20 | + this.analyseId = analyseId; | ||
21 | + } | ||
22 | + | ||
23 | + public String getSchoolName() { | ||
24 | + return schoolName; | ||
25 | + } | ||
26 | + | ||
27 | + public void setSchoolName(String schoolName) { | ||
28 | + this.schoolName = schoolName; | ||
29 | + } | ||
30 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/JoinClassDto.java
0 → 100644
@@ -0,0 +1,75 @@ | @@ -0,0 +1,75 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/11/13 0013 15:32 | ||
9 | + */ | ||
10 | +public class JoinClassDto implements Serializable { | ||
11 | + | ||
12 | + private int id ; | ||
13 | + private int schoolId ; | ||
14 | + private int classId ; | ||
15 | + private String team ; | ||
16 | + private int courseId ; | ||
17 | + private String courseName ; | ||
18 | + private int courseGroup ; | ||
19 | + | ||
20 | + public int getId() { | ||
21 | + return id; | ||
22 | + } | ||
23 | + | ||
24 | + public void setId(int id) { | ||
25 | + this.id = id; | ||
26 | + } | ||
27 | + | ||
28 | + public int getSchoolId() { | ||
29 | + return schoolId; | ||
30 | + } | ||
31 | + | ||
32 | + public void setSchoolId(int schoolId) { | ||
33 | + this.schoolId = schoolId; | ||
34 | + } | ||
35 | + | ||
36 | + public int getClassId() { | ||
37 | + return classId; | ||
38 | + } | ||
39 | + | ||
40 | + public void setClassId(int classId) { | ||
41 | + this.classId = classId; | ||
42 | + } | ||
43 | + | ||
44 | + public String getTeam() { | ||
45 | + return team; | ||
46 | + } | ||
47 | + | ||
48 | + public void setTeam(String team) { | ||
49 | + this.team = team; | ||
50 | + } | ||
51 | + | ||
52 | + public int getCourseId() { | ||
53 | + return courseId; | ||
54 | + } | ||
55 | + | ||
56 | + public void setCourseId(int courseId) { | ||
57 | + this.courseId = courseId; | ||
58 | + } | ||
59 | + | ||
60 | + public String getCourseName() { | ||
61 | + return courseName; | ||
62 | + } | ||
63 | + | ||
64 | + public void setCourseName(String courseName) { | ||
65 | + this.courseName = courseName; | ||
66 | + } | ||
67 | + | ||
68 | + public int getCourseGroup() { | ||
69 | + return courseGroup; | ||
70 | + } | ||
71 | + | ||
72 | + public void setCourseGroup(int courseGroup) { | ||
73 | + this.courseGroup = courseGroup; | ||
74 | + } | ||
75 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/LeagueDto.java
0 → 100644
@@ -0,0 +1,48 @@ | @@ -0,0 +1,48 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/11/13 0013 9:46 | ||
9 | + */ | ||
10 | +public class LeagueDto implements Serializable { | ||
11 | + | ||
12 | + private int id ; | ||
13 | + private int analyseId ; | ||
14 | + private String league ; | ||
15 | + private String schoolName ; | ||
16 | + | ||
17 | + public int getId() { | ||
18 | + return id; | ||
19 | + } | ||
20 | + | ||
21 | + public void setId(int id) { | ||
22 | + this.id = id; | ||
23 | + } | ||
24 | + | ||
25 | + public int getAnalyseId() { | ||
26 | + return analyseId; | ||
27 | + } | ||
28 | + | ||
29 | + public void setAnalyseId(int analyseId) { | ||
30 | + this.analyseId = analyseId; | ||
31 | + } | ||
32 | + | ||
33 | + public String getLeague() { | ||
34 | + return league; | ||
35 | + } | ||
36 | + | ||
37 | + public void setLeague(String league) { | ||
38 | + this.league = league; | ||
39 | + } | ||
40 | + | ||
41 | + public String getSchoolName() { | ||
42 | + return schoolName; | ||
43 | + } | ||
44 | + | ||
45 | + public void setSchoolName(String schoolName) { | ||
46 | + this.schoolName = schoolName; | ||
47 | + } | ||
48 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/ScheduleDto.java
0 → 100644
@@ -0,0 +1,103 @@ | @@ -0,0 +1,103 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/11/13 0013 13:51 | ||
10 | + */ | ||
11 | +public class ScheduleDto implements Serializable { | ||
12 | + | ||
13 | + private int id ; | ||
14 | + private String scheduleName ; | ||
15 | + private int schoolId ; | ||
16 | + private String team ; | ||
17 | + private Date createTime ; | ||
18 | + private Date updateTime ; | ||
19 | + private int speed ; | ||
20 | + private int morning ; | ||
21 | + private int afternoon; | ||
22 | + private int night ; | ||
23 | + | ||
24 | + public int getId() { | ||
25 | + return id; | ||
26 | + } | ||
27 | + | ||
28 | + public void setId(int id) { | ||
29 | + this.id = id; | ||
30 | + } | ||
31 | + | ||
32 | + public String getScheduleName() { | ||
33 | + return scheduleName; | ||
34 | + } | ||
35 | + | ||
36 | + public void setScheduleName(String scheduleName) { | ||
37 | + this.scheduleName = scheduleName; | ||
38 | + } | ||
39 | + | ||
40 | + public int getSchoolId() { | ||
41 | + return schoolId; | ||
42 | + } | ||
43 | + | ||
44 | + public void setSchoolId(int schoolId) { | ||
45 | + this.schoolId = schoolId; | ||
46 | + } | ||
47 | + | ||
48 | + public String getTeam() { | ||
49 | + return team; | ||
50 | + } | ||
51 | + | ||
52 | + public void setTeam(String team) { | ||
53 | + this.team = team; | ||
54 | + } | ||
55 | + | ||
56 | + public Date getCreateTime() { | ||
57 | + return createTime; | ||
58 | + } | ||
59 | + | ||
60 | + public void setCreateTime(Date createTime) { | ||
61 | + this.createTime = createTime; | ||
62 | + } | ||
63 | + | ||
64 | + public Date getUpdateTime() { | ||
65 | + return updateTime; | ||
66 | + } | ||
67 | + | ||
68 | + public void setUpdateTime(Date updateTime) { | ||
69 | + this.updateTime = updateTime; | ||
70 | + } | ||
71 | + | ||
72 | + public int getSpeed() { | ||
73 | + return speed; | ||
74 | + } | ||
75 | + | ||
76 | + public void setSpeed(int speed) { | ||
77 | + this.speed = speed; | ||
78 | + } | ||
79 | + | ||
80 | + public int getMorning() { | ||
81 | + return morning; | ||
82 | + } | ||
83 | + | ||
84 | + public void setMorning(int morning) { | ||
85 | + this.morning = morning; | ||
86 | + } | ||
87 | + | ||
88 | + public int getAfternoon() { | ||
89 | + return afternoon; | ||
90 | + } | ||
91 | + | ||
92 | + public void setAfternoon(int afternoon) { | ||
93 | + this.afternoon = afternoon; | ||
94 | + } | ||
95 | + | ||
96 | + public int getNight() { | ||
97 | + return night; | ||
98 | + } | ||
99 | + | ||
100 | + public void setNight(int night) { | ||
101 | + this.night = night; | ||
102 | + } | ||
103 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/StudentDetailDto.java
0 → 100644
@@ -0,0 +1,112 @@ | @@ -0,0 +1,112 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/11/13 0013 10:56 | ||
10 | + */ | ||
11 | +public class StudentDetailDto implements Serializable { | ||
12 | + | ||
13 | + private long id ; | ||
14 | + private int openId; | ||
15 | + private String schoolName ; | ||
16 | + private String className ; | ||
17 | + private String studentName ; | ||
18 | + private String studentNumber ; | ||
19 | + private int analyseId ; | ||
20 | + private String examNumber ; | ||
21 | + private Double score ; | ||
22 | + private Date createTime ; | ||
23 | + private int correct ; //1 正确 0 错误 | ||
24 | + | ||
25 | + public long getId() { | ||
26 | + return id; | ||
27 | + } | ||
28 | + | ||
29 | + public void setId(long id) { | ||
30 | + this.id = id; | ||
31 | + } | ||
32 | + | ||
33 | + public int getOpenId() { | ||
34 | + return openId; | ||
35 | + } | ||
36 | + | ||
37 | + public void setOpenId(int openId) { | ||
38 | + this.openId = openId; | ||
39 | + } | ||
40 | + | ||
41 | + public String getSchoolName() { | ||
42 | + return schoolName; | ||
43 | + } | ||
44 | + | ||
45 | + public void setSchoolName(String schoolName) { | ||
46 | + this.schoolName = schoolName; | ||
47 | + } | ||
48 | + | ||
49 | + public String getClassName() { | ||
50 | + return className; | ||
51 | + } | ||
52 | + | ||
53 | + public void setClassName(String className) { | ||
54 | + this.className = className; | ||
55 | + } | ||
56 | + | ||
57 | + public String getStudentName() { | ||
58 | + return studentName; | ||
59 | + } | ||
60 | + | ||
61 | + public void setStudentName(String studentName) { | ||
62 | + this.studentName = studentName; | ||
63 | + } | ||
64 | + | ||
65 | + public String getStudentNumber() { | ||
66 | + return studentNumber; | ||
67 | + } | ||
68 | + | ||
69 | + public void setStudentNumber(String studentNumber) { | ||
70 | + this.studentNumber = studentNumber; | ||
71 | + } | ||
72 | + | ||
73 | + public int getAnalyseId() { | ||
74 | + return analyseId; | ||
75 | + } | ||
76 | + | ||
77 | + public void setAnalyseId(int analyseId) { | ||
78 | + this.analyseId = analyseId; | ||
79 | + } | ||
80 | + | ||
81 | + public String getExamNumber() { | ||
82 | + return examNumber; | ||
83 | + } | ||
84 | + | ||
85 | + public void setExamNumber(String examNumber) { | ||
86 | + this.examNumber = examNumber; | ||
87 | + } | ||
88 | + | ||
89 | + public Double getScore() { | ||
90 | + return score; | ||
91 | + } | ||
92 | + | ||
93 | + public void setScore(Double score) { | ||
94 | + this.score = score; | ||
95 | + } | ||
96 | + | ||
97 | + public Date getCreateTime() { | ||
98 | + return createTime; | ||
99 | + } | ||
100 | + | ||
101 | + public void setCreateTime(Date createTime) { | ||
102 | + this.createTime = createTime; | ||
103 | + } | ||
104 | + | ||
105 | + public int getCorrect() { | ||
106 | + return correct; | ||
107 | + } | ||
108 | + | ||
109 | + public void setCorrect(int correct) { | ||
110 | + this.correct = correct; | ||
111 | + } | ||
112 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/StudentDto.java
0 → 100644
@@ -0,0 +1,95 @@ | @@ -0,0 +1,95 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/11/13 0013 10:51 | ||
10 | + */ | ||
11 | +public class StudentDto implements Serializable { | ||
12 | + | ||
13 | + private int id ; | ||
14 | + private int openId; | ||
15 | + private String schoolName ; | ||
16 | + private String className ; | ||
17 | + private String studentName ; | ||
18 | + private String studentNumber ; | ||
19 | + private int analyseId ; | ||
20 | + private double score ; | ||
21 | + private Date createTime ; | ||
22 | + | ||
23 | + | ||
24 | + public int getId() { | ||
25 | + return id; | ||
26 | + } | ||
27 | + | ||
28 | + public void setId(int id) { | ||
29 | + this.id = id; | ||
30 | + } | ||
31 | + | ||
32 | + public int getOpenId() { | ||
33 | + return openId; | ||
34 | + } | ||
35 | + | ||
36 | + public void setOpenId(int openId) { | ||
37 | + this.openId = openId; | ||
38 | + } | ||
39 | + | ||
40 | + public String getSchoolName() { | ||
41 | + return schoolName; | ||
42 | + } | ||
43 | + | ||
44 | + public void setSchoolName(String schoolName) { | ||
45 | + this.schoolName = schoolName; | ||
46 | + } | ||
47 | + | ||
48 | + public String getClassName() { | ||
49 | + return className; | ||
50 | + } | ||
51 | + | ||
52 | + public void setClassName(String className) { | ||
53 | + this.className = className; | ||
54 | + } | ||
55 | + | ||
56 | + public String getStudentName() { | ||
57 | + return studentName; | ||
58 | + } | ||
59 | + | ||
60 | + public void setStudentName(String studentName) { | ||
61 | + this.studentName = studentName; | ||
62 | + } | ||
63 | + | ||
64 | + public String getStudentNumber() { | ||
65 | + return studentNumber; | ||
66 | + } | ||
67 | + | ||
68 | + public void setStudentNumber(String studentNumber) { | ||
69 | + this.studentNumber = studentNumber; | ||
70 | + } | ||
71 | + | ||
72 | + public int getAnalyseId() { | ||
73 | + return analyseId; | ||
74 | + } | ||
75 | + | ||
76 | + public void setAnalyseId(int analyseId) { | ||
77 | + this.analyseId = analyseId; | ||
78 | + } | ||
79 | + | ||
80 | + public double getScore() { | ||
81 | + return score; | ||
82 | + } | ||
83 | + | ||
84 | + public void setScore(double score) { | ||
85 | + this.score = score; | ||
86 | + } | ||
87 | + | ||
88 | + public Date getCreateTime() { | ||
89 | + return createTime; | ||
90 | + } | ||
91 | + | ||
92 | + public void setCreateTime(Date createTime) { | ||
93 | + this.createTime = createTime; | ||
94 | + } | ||
95 | +} |
cloud/common/src/main/java/com/sincere/common/dto/independence/TeacherClassDto.java
0 → 100644
@@ -0,0 +1,132 @@ | @@ -0,0 +1,132 @@ | ||
1 | +package com.sincere.common.dto.independence; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.Date; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/11/13 0013 16:53 | ||
10 | + */ | ||
11 | +public class TeacherClassDto implements Serializable { | ||
12 | + | ||
13 | + private Integer tClassId; | ||
14 | + | ||
15 | + private Integer teacherId; | ||
16 | + | ||
17 | + private String teacherName; | ||
18 | + | ||
19 | + private Integer schoolId; | ||
20 | + | ||
21 | + private String grade; | ||
22 | + | ||
23 | + private Integer classId; | ||
24 | + | ||
25 | + private String courseName; | ||
26 | + | ||
27 | + private Integer times; | ||
28 | + | ||
29 | + private Integer joinTimes; | ||
30 | + | ||
31 | + private Date createTime; | ||
32 | + | ||
33 | + private String team ; | ||
34 | + | ||
35 | + private int status ; | ||
36 | + | ||
37 | + public Integer gettClassId() { | ||
38 | + return tClassId; | ||
39 | + } | ||
40 | + | ||
41 | + public void settClassId(Integer tClassId) { | ||
42 | + this.tClassId = tClassId; | ||
43 | + } | ||
44 | + | ||
45 | + public Integer getTeacherId() { | ||
46 | + return teacherId; | ||
47 | + } | ||
48 | + | ||
49 | + public void setTeacherId(Integer teacherId) { | ||
50 | + this.teacherId = teacherId; | ||
51 | + } | ||
52 | + | ||
53 | + public String getTeacherName() { | ||
54 | + return teacherName; | ||
55 | + } | ||
56 | + | ||
57 | + public void setTeacherName(String teacherName) { | ||
58 | + this.teacherName = teacherName == null ? null : teacherName.trim(); | ||
59 | + } | ||
60 | + | ||
61 | + public Integer getSchoolId() { | ||
62 | + return schoolId; | ||
63 | + } | ||
64 | + | ||
65 | + public void setSchoolId(Integer schoolId) { | ||
66 | + this.schoolId = schoolId; | ||
67 | + } | ||
68 | + | ||
69 | + public String getGrade() { | ||
70 | + return grade; | ||
71 | + } | ||
72 | + | ||
73 | + public void setGrade(String grade) { | ||
74 | + this.grade = grade; | ||
75 | + } | ||
76 | + | ||
77 | + public Integer getClassId() { | ||
78 | + return classId; | ||
79 | + } | ||
80 | + | ||
81 | + public void setClassId(Integer classId) { | ||
82 | + this.classId = classId; | ||
83 | + } | ||
84 | + | ||
85 | + public String getCourseName() { | ||
86 | + return courseName; | ||
87 | + } | ||
88 | + | ||
89 | + public void setCourseName(String courseName) { | ||
90 | + this.courseName = courseName == null ? null : courseName.trim(); | ||
91 | + } | ||
92 | + | ||
93 | + public Integer getTimes() { | ||
94 | + return times; | ||
95 | + } | ||
96 | + | ||
97 | + public void setTimes(Integer times) { | ||
98 | + this.times = times; | ||
99 | + } | ||
100 | + | ||
101 | + public Integer getJoinTimes() { | ||
102 | + return joinTimes; | ||
103 | + } | ||
104 | + | ||
105 | + public void setJoinTimes(Integer joinTimes) { | ||
106 | + this.joinTimes = joinTimes; | ||
107 | + } | ||
108 | + | ||
109 | + public Date getCreateTime() { | ||
110 | + return createTime; | ||
111 | + } | ||
112 | + | ||
113 | + public void setCreateTime(Date createTime) { | ||
114 | + this.createTime = createTime; | ||
115 | + } | ||
116 | + | ||
117 | + public String getTeam() { | ||
118 | + return team; | ||
119 | + } | ||
120 | + | ||
121 | + public void setTeam(String team) { | ||
122 | + this.team = team; | ||
123 | + } | ||
124 | + | ||
125 | + public int getStatus() { | ||
126 | + return status; | ||
127 | + } | ||
128 | + | ||
129 | + public void setStatus(int status) { | ||
130 | + this.status = status; | ||
131 | + } | ||
132 | +} |
cloud/common/src/main/java/com/sincere/common/enums/DifficultEnums.java
0 → 100644
@@ -0,0 +1,66 @@ | @@ -0,0 +1,66 @@ | ||
1 | +package com.sincere.common.enums; | ||
2 | + | ||
3 | +/** | ||
4 | + * 学情分析 题目困难程度 | ||
5 | + * @author chen | ||
6 | + * @version 1.0 1 | ||
7 | + * @date 2019/10/18 0018 8:40 | ||
8 | + */ | ||
9 | +public enum DifficultEnums { | ||
10 | + | ||
11 | + easy(1,"易","认知"), | ||
12 | + medium(2,"中","理解"), | ||
13 | + difficult(3,"难","应用"); | ||
14 | + | ||
15 | + private int difficultType ; | ||
16 | + private String difficultName ; | ||
17 | + private String difficultShow ; | ||
18 | + | ||
19 | + DifficultEnums(int difficultType, String difficultName, String difficultShow) { | ||
20 | + this.difficultType = difficultType; | ||
21 | + this.difficultName = difficultName; | ||
22 | + this.difficultShow = difficultShow; | ||
23 | + } | ||
24 | + | ||
25 | + public String getDifficultShow() { | ||
26 | + return difficultShow; | ||
27 | + } | ||
28 | + | ||
29 | + public void setDifficultShow(String difficultShow) { | ||
30 | + this.difficultShow = difficultShow; | ||
31 | + } | ||
32 | + | ||
33 | + public int getDifficultType() { | ||
34 | + return difficultType; | ||
35 | + } | ||
36 | + | ||
37 | + public void setDifficultType(int difficultType) { | ||
38 | + this.difficultType = difficultType; | ||
39 | + } | ||
40 | + | ||
41 | + public String getDifficultName() { | ||
42 | + return difficultName; | ||
43 | + } | ||
44 | + | ||
45 | + public void setDifficultName(String difficultName) { | ||
46 | + this.difficultName = difficultName; | ||
47 | + } | ||
48 | + | ||
49 | + public static int getDifficultType(String difficultName){ | ||
50 | + for (DifficultEnums difficultEnums : DifficultEnums.values()) { | ||
51 | + if (difficultEnums.getDifficultName().equals(difficultName)) { | ||
52 | + return difficultEnums.getDifficultType(); | ||
53 | + } | ||
54 | + } | ||
55 | + return 0 ; | ||
56 | + } | ||
57 | + | ||
58 | + public static String getDifficultName(int difficultType){ | ||
59 | + for (DifficultEnums difficultEnums : DifficultEnums.values()) { | ||
60 | + if (difficultEnums.getDifficultType() == difficultType) { | ||
61 | + return difficultEnums.getDifficultName(); | ||
62 | + } | ||
63 | + } | ||
64 | + return "" ; | ||
65 | + } | ||
66 | +} |
cloud/common/src/main/java/com/sincere/common/enums/DimensionalEnums.java
0 → 100644
@@ -0,0 +1,38 @@ | @@ -0,0 +1,38 @@ | ||
1 | +package com.sincere.common.enums; | ||
2 | + | ||
3 | +/** | ||
4 | + * 学情分析 四维细目 | ||
5 | + * @author chen | ||
6 | + * @version 1.0 | ||
7 | + * @date 2019/10/18 0018 8:33 | ||
8 | + */ | ||
9 | +public enum DimensionalEnums { | ||
10 | + knowledge(1,"知识点"), | ||
11 | + ability(2,"能力"), | ||
12 | + skill(3,"技能"), | ||
13 | + think(4,"四维"); | ||
14 | + | ||
15 | + private int dimensionalType ; | ||
16 | + private String dimensionalName ; | ||
17 | + | ||
18 | + DimensionalEnums(int dimensionalType, String dimensionalName) { | ||
19 | + this.dimensionalType = dimensionalType; | ||
20 | + this.dimensionalName = dimensionalName; | ||
21 | + } | ||
22 | + | ||
23 | + public int getDimensionalType() { | ||
24 | + return dimensionalType; | ||
25 | + } | ||
26 | + | ||
27 | + public void setDimensionalType(int dimensionalType) { | ||
28 | + this.dimensionalType = dimensionalType; | ||
29 | + } | ||
30 | + | ||
31 | + public String getDimensionalName() { | ||
32 | + return dimensionalName; | ||
33 | + } | ||
34 | + | ||
35 | + public void setDimensionalName(String dimensionalName) { | ||
36 | + this.dimensionalName = dimensionalName; | ||
37 | + } | ||
38 | +} |
cloud/common/src/main/java/com/sincere/common/util/HttpClientUtils.java
0 → 100644
@@ -0,0 +1,164 @@ | @@ -0,0 +1,164 @@ | ||
1 | +package com.sincere.common.util; | ||
2 | + | ||
3 | +import com.alibaba.fastjson.JSONObject; | ||
4 | +import org.apache.http.HttpEntity; | ||
5 | +import org.apache.http.HttpStatus; | ||
6 | +import org.apache.http.client.config.RequestConfig; | ||
7 | +import org.apache.http.client.methods.CloseableHttpResponse; | ||
8 | +import org.apache.http.client.methods.HttpGet; | ||
9 | +import org.apache.http.client.methods.HttpPost; | ||
10 | +import org.apache.http.entity.StringEntity; | ||
11 | +import org.apache.http.impl.client.CloseableHttpClient; | ||
12 | +import org.apache.http.impl.client.HttpClients; | ||
13 | +import org.apache.http.util.EntityUtils; | ||
14 | + | ||
15 | +import java.io.IOException; | ||
16 | +import java.io.InputStream; | ||
17 | +import java.net.HttpURLConnection; | ||
18 | +import java.net.URL; | ||
19 | + | ||
20 | +/** | ||
21 | + * HttpClient4.3工具类 | ||
22 | + * @author chen | ||
23 | + * @version 1.0 | ||
24 | + * @date 2019/10/11 0011 10:17 | ||
25 | + */ | ||
26 | +public class HttpClientUtils { | ||
27 | + | ||
28 | + private static RequestConfig requestConfig = null; | ||
29 | + | ||
30 | + static | ||
31 | + { | ||
32 | + // 设置请求和传输超时时间 | ||
33 | + requestConfig = RequestConfig.custom().setSocketTimeout(2000).setConnectTimeout(2000).build(); | ||
34 | + } | ||
35 | + | ||
36 | + public static void main(String[] args){ | ||
37 | + JSONObject teacherList = HttpClientUtils.httpGet("http://60.190.202.57:1000/api/EasyN/GetSchoolSubject?SchoolId=1"); | ||
38 | + System.out.println("1"); | ||
39 | + } | ||
40 | + | ||
41 | + /** | ||
42 | + * post请求传输json参数 | ||
43 | + * @param url url地址 | ||
44 | + * @param jsonParam 参数 | ||
45 | + * @return | ||
46 | + */ | ||
47 | + public static JSONObject httpPost(String url, JSONObject jsonParam) { | ||
48 | + // post请求返回结果 | ||
49 | + CloseableHttpClient httpClient = HttpClients.createDefault(); | ||
50 | + JSONObject jsonResult = null; | ||
51 | + HttpPost httpPost = new HttpPost(url); | ||
52 | + // 设置请求和传输超时时间 | ||
53 | + httpPost.setConfig(requestConfig); | ||
54 | + try { | ||
55 | + if (null != jsonParam) { | ||
56 | + // 解决中文乱码问题 | ||
57 | + StringEntity entity = new StringEntity(jsonParam.toString(), "utf-8"); | ||
58 | + entity.setContentEncoding("UTF-8"); | ||
59 | + entity.setContentType("application/json"); | ||
60 | + httpPost.setEntity(entity); | ||
61 | + } | ||
62 | + CloseableHttpResponse result = httpClient.execute(httpPost); | ||
63 | + // 请求发送成功,并得到响应 | ||
64 | + if (result.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { | ||
65 | + String str = ""; | ||
66 | + // 读取服务器返回过来的json字符串数据 | ||
67 | + str = EntityUtils.toString(result.getEntity(), "utf-8"); | ||
68 | + // 把json字符串转换成json对象 | ||
69 | + jsonResult = JSONObject.parseObject(str); | ||
70 | + | ||
71 | + } | ||
72 | + } catch (IOException e) { | ||
73 | + | ||
74 | + } finally { | ||
75 | + httpPost.releaseConnection(); | ||
76 | + } | ||
77 | + return jsonResult; | ||
78 | + } | ||
79 | + | ||
80 | + /** | ||
81 | + * post请求传输String参数 例如:name=Jack&sex=1&type=2 | ||
82 | + * Content-type:application/x-www-form-urlencoded | ||
83 | + * @param url url地址 | ||
84 | + * @param strParam 参数 | ||
85 | + * @return | ||
86 | + */ | ||
87 | + public static JSONObject httpPost(String url, String strParam) { | ||
88 | + // post请求返回结果 | ||
89 | + CloseableHttpClient httpClient = HttpClients.createDefault(); | ||
90 | + JSONObject jsonResult = null; | ||
91 | + HttpPost httpPost = new HttpPost(url); | ||
92 | + httpPost.setConfig(requestConfig); | ||
93 | + try { | ||
94 | + if (null != strParam) { | ||
95 | + // 解决中文乱码问题 | ||
96 | + StringEntity entity = new StringEntity(strParam, "utf-8"); | ||
97 | + entity.setContentEncoding("UTF-8"); | ||
98 | + entity.setContentType("application/x-www-form-urlencoded"); | ||
99 | + httpPost.setEntity(entity); | ||
100 | + } | ||
101 | + CloseableHttpResponse result = httpClient.execute(httpPost); | ||
102 | + // 请求发送成功,并得到响应 | ||
103 | + if (result.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { | ||
104 | + String str = ""; | ||
105 | + // 读取服务器返回过来的json字符串数据 | ||
106 | + str = EntityUtils.toString(result.getEntity(), "utf-8"); | ||
107 | + // 把json字符串转换成json对象 | ||
108 | + jsonResult = JSONObject.parseObject(str); | ||
109 | + } | ||
110 | + } catch (IOException e) { | ||
111 | + | ||
112 | + } finally { | ||
113 | + httpPost.releaseConnection(); | ||
114 | + } | ||
115 | + return jsonResult; | ||
116 | + } | ||
117 | + | ||
118 | + /** | ||
119 | + * 发送get请求 | ||
120 | + * @param url 路径 | ||
121 | + * @return | ||
122 | + */ | ||
123 | + public static JSONObject httpGet(String url) { | ||
124 | + // get请求返回结果 | ||
125 | + JSONObject jsonResult = null; | ||
126 | + CloseableHttpClient client = HttpClients.createDefault(); | ||
127 | + // 发送get请求 | ||
128 | + HttpGet request = new HttpGet(url); | ||
129 | + request.setConfig(requestConfig); | ||
130 | + try { | ||
131 | + CloseableHttpResponse response = client.execute(request); | ||
132 | + // 请求发送成功,并得到响应 | ||
133 | + if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { | ||
134 | + // 读取服务器返回过来的json字符串数据 | ||
135 | + HttpEntity entity = response.getEntity(); | ||
136 | + String strResult = EntityUtils.toString(entity, "utf-8"); | ||
137 | + // 把json字符串转换成json对象 | ||
138 | + jsonResult = JSONObject.parseObject(strResult); | ||
139 | + } | ||
140 | + } catch (IOException e) { | ||
141 | + | ||
142 | + } finally { | ||
143 | + request.releaseConnection(); | ||
144 | + } | ||
145 | + return jsonResult; | ||
146 | + } | ||
147 | + | ||
148 | + | ||
149 | + public static InputStream GetFileInputStream(String fileUrl){ | ||
150 | + try{ | ||
151 | + URL url = new URL(fileUrl); | ||
152 | + HttpURLConnection conn = (HttpURLConnection)url.openConnection(); | ||
153 | + //设置超时间为3秒 | ||
154 | + conn.setConnectTimeout(8*1000); | ||
155 | + //得到输入流 | ||
156 | + InputStream inputStream = conn.getInputStream(); | ||
157 | + | ||
158 | + return inputStream ; | ||
159 | + }catch (Exception e){ | ||
160 | + | ||
161 | + } | ||
162 | + return null ; | ||
163 | + } | ||
164 | +} | ||
0 | \ No newline at end of file | 165 | \ No newline at end of file |
cloud/common/src/main/java/com/sincere/common/util/RedisUtils.java
0 → 100644
@@ -0,0 +1,225 @@ | @@ -0,0 +1,225 @@ | ||
1 | +package com.sincere.common.util; | ||
2 | + | ||
3 | +import org.springframework.beans.factory.annotation.Value; | ||
4 | +import org.springframework.context.annotation.PropertySource; | ||
5 | +import org.springframework.stereotype.Component; | ||
6 | +import redis.clients.jedis.Jedis; | ||
7 | +import redis.clients.jedis.JedisPool; | ||
8 | +import redis.clients.jedis.JedisPoolConfig; | ||
9 | + | ||
10 | +import javax.annotation.PostConstruct; | ||
11 | + | ||
12 | +/** | ||
13 | + * @author chen | ||
14 | + * @version 1.0 | ||
15 | + * @date 2019/11/5 0005 8:51 | ||
16 | + */ | ||
17 | +@Component | ||
18 | +@PropertySource(value = "classpath:conf.properties") | ||
19 | +public class RedisUtils { | ||
20 | + | ||
21 | + | ||
22 | + @Value("${redis.host}") | ||
23 | + private String host; | ||
24 | + @Value("${redis.port}") | ||
25 | + private int port; | ||
26 | + @Value("${redis.password}") | ||
27 | + private String password; | ||
28 | + | ||
29 | + @PostConstruct | ||
30 | + public void getApiToken() { | ||
31 | + ADDR = this.host ; | ||
32 | + PORT = this.port ; | ||
33 | + AUTH = this.password ; | ||
34 | + } | ||
35 | + | ||
36 | + //Redis服务器IP | ||
37 | + private static String ADDR; | ||
38 | + | ||
39 | + //Redis的端口号 | ||
40 | + private static int PORT; | ||
41 | + | ||
42 | + //访问密码 | ||
43 | + private static String AUTH; | ||
44 | + | ||
45 | + //可用连接实例的最大数目,默认值为8; | ||
46 | + //如果赋值为-1,则表示不限制;如果pool已经分配了maxActive个jedis实例,则此时pool的状态为exhausted(耗尽)。 | ||
47 | + private static int MAX_ACTIVE = 1024; | ||
48 | + | ||
49 | + //控制一个pool最多有多少个状态为idle(空闲的)的jedis实例,默认值也是8。 | ||
50 | + private static int MAX_IDLE = 200; | ||
51 | + | ||
52 | + //等待可用连接的最大时间,单位毫秒,默认值为-1,表示永不超时。如果超过等待时间,则直接抛出JedisConnectionException; | ||
53 | + private static int MAX_WAIT = 10000; | ||
54 | + | ||
55 | + private static int TIMEOUT = 10000; | ||
56 | + | ||
57 | + //在borrow一个jedis实例时,是否提前进行validate操作;如果为true,则得到的jedis实例均是可用的; | ||
58 | + private static boolean TEST_ON_BORROW = true; | ||
59 | + | ||
60 | + private static JedisPool jedisPool = null; | ||
61 | + | ||
62 | + | ||
63 | + /** | ||
64 | + * 获取Jedis实例 | ||
65 | + * @return | ||
66 | + */ | ||
67 | + public synchronized static Jedis getJedis() { | ||
68 | + | ||
69 | + try { | ||
70 | + if (jedisPool != null) { | ||
71 | + Jedis resource = jedisPool.getResource(); | ||
72 | + return resource; | ||
73 | + } else { | ||
74 | + JedisPoolConfig config = new JedisPoolConfig(); | ||
75 | + config.setMaxTotal(MAX_ACTIVE); | ||
76 | + config.setMaxIdle(MAX_IDLE); | ||
77 | + config.setMaxWaitMillis(MAX_WAIT); | ||
78 | + config.setTestOnBorrow(TEST_ON_BORROW); | ||
79 | + jedisPool = new JedisPool(config, ADDR, PORT, TIMEOUT, AUTH); | ||
80 | + Jedis resource = jedisPool.getResource(); | ||
81 | + return resource; | ||
82 | + } | ||
83 | + } catch (Exception e) { | ||
84 | + e.printStackTrace(); | ||
85 | + return null; | ||
86 | + } | ||
87 | + } | ||
88 | + | ||
89 | + public static void main(String[] args) { | ||
90 | + RedisUtils.setString("test","test"); | ||
91 | + } | ||
92 | + /** | ||
93 | + * 释放jedis资源 | ||
94 | + * @param jedis | ||
95 | + */ | ||
96 | + public static void returnResource(final Jedis jedis) { | ||
97 | + if (jedis != null) { | ||
98 | + jedisPool.returnResource(jedis); | ||
99 | + } | ||
100 | + } | ||
101 | + | ||
102 | + public static void setString(String key ,String value){ | ||
103 | + Jedis jedis = null; | ||
104 | + try { | ||
105 | + jedis = getJedis(); | ||
106 | + jedis.set(key,value); | ||
107 | + } catch (Exception e) { | ||
108 | + System.out.println("setString设置redis键值异常:key=" + key + " value=" + value + " cause:" + e.getMessage()); | ||
109 | + } finally { | ||
110 | + if(jedis != null) | ||
111 | + { | ||
112 | + jedis.close(); | ||
113 | + } | ||
114 | + } | ||
115 | + } | ||
116 | + | ||
117 | + public static void setObject(String key,Object object) { | ||
118 | + Jedis jedis = null; | ||
119 | + try { | ||
120 | + jedis = getJedis(); | ||
121 | + jedis.set(key.getBytes(), SerializeUtil.serialize(object)); | ||
122 | + } catch (Exception e) { | ||
123 | + e.printStackTrace(); | ||
124 | + System.out.println("setString设置redis键值异常:key=" + key + " value=" + object + " cause:" + e.getMessage()); | ||
125 | + } finally { | ||
126 | + if(jedis != null) | ||
127 | + { | ||
128 | + jedis.close(); | ||
129 | + } | ||
130 | + } | ||
131 | + } | ||
132 | + | ||
133 | + public static void setString(String key ,String value , int expireTime){ | ||
134 | + String result = "OK"; | ||
135 | + Jedis jedis = null; | ||
136 | + try { | ||
137 | + jedis = getJedis(); | ||
138 | + jedis.set(key,value); | ||
139 | + if(result.equals("OK")) { | ||
140 | + jedis.expire(key.getBytes(), expireTime); | ||
141 | + } | ||
142 | + } catch (Exception e) { | ||
143 | + System.out.println("setString设置redis键值异常:key=" + key + " value=" + value + " cause:" + e.getMessage()); | ||
144 | + } finally { | ||
145 | + if(jedis != null) | ||
146 | + { | ||
147 | + jedis.close(); | ||
148 | + } | ||
149 | + } | ||
150 | + } | ||
151 | + | ||
152 | + public static String getString(String key) { | ||
153 | + Jedis jedis = null; | ||
154 | + try { | ||
155 | + jedis = getJedis(); | ||
156 | + String value = jedis.get(key); | ||
157 | + return value; | ||
158 | + } catch (Exception e) { | ||
159 | + System.out.println("getString获取redis键值异常:key=" + key + " cause:" + e.getMessage()); | ||
160 | + } finally { | ||
161 | + jedis.close(); | ||
162 | + } | ||
163 | + return null; | ||
164 | + } | ||
165 | + | ||
166 | + public static Object getObject(String key) { | ||
167 | + Jedis jedis = null; | ||
168 | + try { | ||
169 | + jedis = getJedis(); | ||
170 | + byte[] value = jedis.get(key.getBytes()); | ||
171 | + return SerializeUtil. unserialize(value); | ||
172 | + } catch (Exception e) { | ||
173 | + System.out.println("getString获取redis键值异常:key=" + key + " cause:" + e.getMessage()); | ||
174 | + } finally { | ||
175 | + jedis.close(); | ||
176 | + } | ||
177 | + return null; | ||
178 | + } | ||
179 | + | ||
180 | + | ||
181 | + /** | ||
182 | + * 删除key | ||
183 | + */ | ||
184 | + public static Long delkeyObject(String key) { | ||
185 | + Jedis jedis = null; | ||
186 | + try { | ||
187 | + jedis = getJedis(); | ||
188 | + return jedis.del(key.getBytes()); | ||
189 | + }catch(Exception e) { | ||
190 | + e.printStackTrace(); | ||
191 | + return null; | ||
192 | + }finally{ | ||
193 | + if(jedis != null) | ||
194 | + { | ||
195 | + jedis.close(); | ||
196 | + } | ||
197 | + } | ||
198 | + } | ||
199 | + | ||
200 | + public static Boolean existsObject(String key) { | ||
201 | + Jedis jedis = null; | ||
202 | + try { | ||
203 | + jedis = getJedis(); | ||
204 | + return jedis.exists(key); | ||
205 | + }catch(Exception e) { | ||
206 | + e.printStackTrace(); | ||
207 | + return false; | ||
208 | + }finally{ | ||
209 | + if(jedis != null) | ||
210 | + { | ||
211 | + jedis.close(); | ||
212 | + } | ||
213 | + } | ||
214 | + } | ||
215 | + | ||
216 | + public static void flushAll() { | ||
217 | + Jedis jedis = null; | ||
218 | + try { | ||
219 | + jedis = getJedis(); | ||
220 | + jedis.flushAll(); | ||
221 | + } catch (Exception e) { | ||
222 | + System.out.println("Cache清空失败:" + e); | ||
223 | + } | ||
224 | + } | ||
225 | +} |
cloud/common/src/main/java/com/sincere/common/util/SerializeUtil.java
0 → 100644
@@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
1 | +package com.sincere.common.util; | ||
2 | + | ||
3 | +import java.io.ByteArrayInputStream; | ||
4 | +import java.io.ByteArrayOutputStream; | ||
5 | +import java.io.ObjectInputStream; | ||
6 | +import java.io.ObjectOutputStream; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/11/5 0005 9:06 | ||
12 | + */ | ||
13 | +public class SerializeUtil { | ||
14 | + | ||
15 | + // 序列化 | ||
16 | + public static byte[] serialize(Object object) { | ||
17 | + ObjectOutputStream oos; | ||
18 | + oos = null; | ||
19 | + ByteArrayOutputStream baos = null; | ||
20 | + try { | ||
21 | + baos = new ByteArrayOutputStream(); | ||
22 | + oos = new ObjectOutputStream(baos); | ||
23 | + oos.writeObject(object); | ||
24 | + byte[] bytes = baos.toByteArray(); | ||
25 | + return bytes; | ||
26 | + } catch (Exception e) { | ||
27 | + e.printStackTrace(); | ||
28 | + } | ||
29 | + return null; | ||
30 | + } | ||
31 | + | ||
32 | + // 反序列化 | ||
33 | + public static Object unserialize( byte[] bytes) { | ||
34 | + ByteArrayInputStream bais = null; | ||
35 | + try { | ||
36 | + bais = new ByteArrayInputStream(bytes); | ||
37 | + ObjectInputStream ois = new ObjectInputStream(bais); | ||
38 | + return ois.readObject(); | ||
39 | + } catch (Exception e) { | ||
40 | + | ||
41 | + } | ||
42 | + return null; | ||
43 | + } | ||
44 | +} |
cloud/common/src/main/java/com/sincere/common/vo/BaseVo.java
0 → 100644
@@ -0,0 +1,29 @@ | @@ -0,0 +1,29 @@ | ||
1 | +package com.sincere.common.vo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +public class BaseVo implements Serializable { | ||
6 | + | ||
7 | + private boolean success; | ||
8 | + private String message ; | ||
9 | + | ||
10 | + public boolean isSuccess() { | ||
11 | + return success; | ||
12 | + } | ||
13 | + | ||
14 | + public void setSuccess(boolean success) { | ||
15 | + this.success = success; | ||
16 | + } | ||
17 | + | ||
18 | + public String getMessage() { | ||
19 | + return message; | ||
20 | + } | ||
21 | + | ||
22 | + public void setMessage(String message) { | ||
23 | + this.message = message; | ||
24 | + } | ||
25 | + | ||
26 | + public BaseVo() { | ||
27 | + success = true; | ||
28 | + } | ||
29 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/ClassCourseDetailVo.java
0 → 100644
@@ -0,0 +1,58 @@ | @@ -0,0 +1,58 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.TeacherClassDto; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/10/12 0012 8:30 | ||
9 | + */ | ||
10 | +public class ClassCourseDetailVo { | ||
11 | + | ||
12 | + private String courseName ; | ||
13 | + private String teacherName ; | ||
14 | + private int times ; | ||
15 | + private int joinTimes ; | ||
16 | + | ||
17 | + | ||
18 | + public ClassCourseDetailVo(TeacherClassDto teacherClass) { | ||
19 | + this.courseName = teacherClass.getCourseName(); | ||
20 | + this.teacherName = teacherClass.getTeacherName(); | ||
21 | + this.joinTimes = teacherClass.getJoinTimes(); | ||
22 | + this.times = teacherClass.getTimes()-2*(teacherClass.getJoinTimes()); | ||
23 | + } | ||
24 | + | ||
25 | + | ||
26 | + public String getCourseName() { | ||
27 | + return courseName; | ||
28 | + } | ||
29 | + | ||
30 | + public void setCourseName(String courseName) { | ||
31 | + this.courseName = courseName; | ||
32 | + } | ||
33 | + | ||
34 | + public String getTeacherName() { | ||
35 | + return teacherName; | ||
36 | + } | ||
37 | + | ||
38 | + public void setTeacherName(String teacherName) { | ||
39 | + this.teacherName = teacherName; | ||
40 | + } | ||
41 | + | ||
42 | + public int getTimes() { | ||
43 | + return times; | ||
44 | + } | ||
45 | + | ||
46 | + public void setTimes(int times) { | ||
47 | + this.times = times; | ||
48 | + } | ||
49 | + | ||
50 | + public int getJoinTimes() { | ||
51 | + return joinTimes; | ||
52 | + } | ||
53 | + | ||
54 | + public void setJoinTimes(int joinTimes) { | ||
55 | + this.joinTimes = joinTimes; | ||
56 | + } | ||
57 | + | ||
58 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/ClassCourseRepVo.java
0 → 100644
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | + | ||
4 | +import com.sincere.common.dto.independence.ClassCourseDto; | ||
5 | +import com.sincere.common.vo.BaseVo; | ||
6 | + | ||
7 | +import java.util.List; | ||
8 | + | ||
9 | +/** | ||
10 | + * @author chen | ||
11 | + * @version 1.0 | ||
12 | + * @date 2019/10/11 0011 10:17 | ||
13 | + */ | ||
14 | +public class ClassCourseRepVo extends BaseVo { | ||
15 | + | ||
16 | + private List<ClassCourseDto> data; | ||
17 | + | ||
18 | + public List<ClassCourseDto> getData() { | ||
19 | + return data; | ||
20 | + } | ||
21 | + | ||
22 | + public void setData(List<ClassCourseDto> data) { | ||
23 | + this.data = data; | ||
24 | + } | ||
25 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/ClassCourseVO.java
0 → 100644
@@ -0,0 +1,49 @@ | @@ -0,0 +1,49 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/10/12 0012 8:30 | ||
9 | + */ | ||
10 | +public class ClassCourseVO { | ||
11 | + | ||
12 | + private int classId ; | ||
13 | + private String className ; | ||
14 | + private int allCount ; | ||
15 | + | ||
16 | + List<ClassCourseDetailVo> list ; | ||
17 | + | ||
18 | + public int getClassId() { | ||
19 | + return classId; | ||
20 | + } | ||
21 | + | ||
22 | + public void setClassId(int classId) { | ||
23 | + this.classId = classId; | ||
24 | + } | ||
25 | + | ||
26 | + public String getClassName() { | ||
27 | + return className; | ||
28 | + } | ||
29 | + | ||
30 | + public void setClassName(String className) { | ||
31 | + this.className = className; | ||
32 | + } | ||
33 | + | ||
34 | + public int getAllCount() { | ||
35 | + return allCount; | ||
36 | + } | ||
37 | + | ||
38 | + public void setAllCount(int allCount) { | ||
39 | + this.allCount = allCount; | ||
40 | + } | ||
41 | + | ||
42 | + public List<ClassCourseDetailVo> getList() { | ||
43 | + return list; | ||
44 | + } | ||
45 | + | ||
46 | + public void setList(List<ClassCourseDetailVo> list) { | ||
47 | + this.list = list; | ||
48 | + } | ||
49 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/ClassRepVo.java
0 → 100644
@@ -0,0 +1,24 @@ | @@ -0,0 +1,24 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.ClassModelDto; | ||
4 | +import com.sincere.common.vo.BaseVo; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/11 0011 14:08 | ||
12 | + */ | ||
13 | +public class ClassRepVo extends BaseVo { | ||
14 | + | ||
15 | + private List<ClassModelDto> data ; | ||
16 | + | ||
17 | + public List<ClassModelDto> getData() { | ||
18 | + return data; | ||
19 | + } | ||
20 | + | ||
21 | + public void setData(List<ClassModelDto> data) { | ||
22 | + this.data = data; | ||
23 | + } | ||
24 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/CourseGroupReqVo.java
0 → 100644
@@ -0,0 +1,30 @@ | @@ -0,0 +1,30 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/10/12 0012 8:58 | ||
9 | + */ | ||
10 | +public class CourseGroupReqVo implements Serializable { | ||
11 | + | ||
12 | + private int scheduleId ; | ||
13 | + private int courseGroup ; | ||
14 | + | ||
15 | + public int getScheduleId() { | ||
16 | + return scheduleId; | ||
17 | + } | ||
18 | + | ||
19 | + public void setScheduleId(int scheduleId) { | ||
20 | + this.scheduleId = scheduleId; | ||
21 | + } | ||
22 | + | ||
23 | + public int getCourseGroup() { | ||
24 | + return courseGroup; | ||
25 | + } | ||
26 | + | ||
27 | + public void setCourseGroup(int courseGroup) { | ||
28 | + this.courseGroup = courseGroup; | ||
29 | + } | ||
30 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/CourseRepVo.java
0 → 100644
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.CourseDto; | ||
4 | +import com.sincere.common.vo.BaseVo; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/11 0011 10:12 | ||
12 | + */ | ||
13 | +public class CourseRepVo extends BaseVo { | ||
14 | + | ||
15 | + private List<CourseDto> data ; | ||
16 | + | ||
17 | + public List<CourseDto> getData() { | ||
18 | + return data; | ||
19 | + } | ||
20 | + | ||
21 | + public void setData(List<CourseDto> data) { | ||
22 | + this.data = data; | ||
23 | + } | ||
24 | + | ||
25 | + public CourseRepVo(){ | ||
26 | + super(); | ||
27 | + } | ||
28 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/CourseTypeListVO.java
0 → 100644
@@ -0,0 +1,42 @@ | @@ -0,0 +1,42 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import com.jevon.model.Course; | ||
4 | +import com.sincere.common.dto.independence.CourseDto; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/14 0014 7:58 | ||
12 | + */ | ||
13 | +public class CourseTypeListVO { | ||
14 | + | ||
15 | + private int courseType ; | ||
16 | + private String courseTypeName ; | ||
17 | + private List<CourseDto> list ; | ||
18 | + | ||
19 | + public int getCourseType() { | ||
20 | + return courseType; | ||
21 | + } | ||
22 | + | ||
23 | + public void setCourseType(int courseType) { | ||
24 | + this.courseType = courseType; | ||
25 | + } | ||
26 | + | ||
27 | + public String getCourseTypeName() { | ||
28 | + return courseTypeName; | ||
29 | + } | ||
30 | + | ||
31 | + public void setCourseTypeName(String courseTypeName) { | ||
32 | + this.courseTypeName = courseTypeName; | ||
33 | + } | ||
34 | + | ||
35 | + public List<CourseDto> getList() { | ||
36 | + return list; | ||
37 | + } | ||
38 | + | ||
39 | + public void setList(List<CourseDto> list) { | ||
40 | + this.list = list; | ||
41 | + } | ||
42 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/FirstReqVo.java
0 → 100644
@@ -0,0 +1,52 @@ | @@ -0,0 +1,52 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +public class FirstReqVo implements Serializable { | ||
6 | + | ||
7 | + private int scheduleId; | ||
8 | + private int morning ; | ||
9 | + private int afternoon; | ||
10 | + private int night ; | ||
11 | + private int dayNumber; | ||
12 | + | ||
13 | + public int getScheduleId() { | ||
14 | + return scheduleId; | ||
15 | + } | ||
16 | + | ||
17 | + public void setScheduleId(int scheduleId) { | ||
18 | + this.scheduleId = scheduleId; | ||
19 | + } | ||
20 | + | ||
21 | + public int getMorning() { | ||
22 | + return morning; | ||
23 | + } | ||
24 | + | ||
25 | + public void setMorning(int morning) { | ||
26 | + this.morning = morning; | ||
27 | + } | ||
28 | + | ||
29 | + public int getAfternoon() { | ||
30 | + return afternoon; | ||
31 | + } | ||
32 | + | ||
33 | + public void setAfternoon(int afternoon) { | ||
34 | + this.afternoon = afternoon; | ||
35 | + } | ||
36 | + | ||
37 | + public int getNight() { | ||
38 | + return night; | ||
39 | + } | ||
40 | + | ||
41 | + public void setNight(int night) { | ||
42 | + this.night = night; | ||
43 | + } | ||
44 | + | ||
45 | + public int getDayNumber() { | ||
46 | + return dayNumber; | ||
47 | + } | ||
48 | + | ||
49 | + public void setDayNumber(int dayNumber) { | ||
50 | + this.dayNumber = dayNumber; | ||
51 | + } | ||
52 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/GetCourseClassListRepVo.java
0 → 100644
@@ -0,0 +1,57 @@ | @@ -0,0 +1,57 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/10/12 0012 9:20 | ||
9 | + */ | ||
10 | +public class GetCourseClassListRepVo implements Serializable { | ||
11 | + | ||
12 | + private int classId ; | ||
13 | + private String className ; | ||
14 | + private int courseId ; | ||
15 | + private String courseName ; | ||
16 | + private String teacherName ; | ||
17 | + | ||
18 | + public int getClassId() { | ||
19 | + return classId; | ||
20 | + } | ||
21 | + | ||
22 | + public void setClassId(int classId) { | ||
23 | + this.classId = classId; | ||
24 | + } | ||
25 | + | ||
26 | + public String getClassName() { | ||
27 | + return className; | ||
28 | + } | ||
29 | + | ||
30 | + public void setClassName(String className) { | ||
31 | + this.className = className; | ||
32 | + } | ||
33 | + | ||
34 | + public int getCourseId() { | ||
35 | + return courseId; | ||
36 | + } | ||
37 | + | ||
38 | + public void setCourseId(int courseId) { | ||
39 | + this.courseId = courseId; | ||
40 | + } | ||
41 | + | ||
42 | + public String getCourseName() { | ||
43 | + return courseName; | ||
44 | + } | ||
45 | + | ||
46 | + public void setCourseName(String courseName) { | ||
47 | + this.courseName = courseName; | ||
48 | + } | ||
49 | + | ||
50 | + public String getTeacherName() { | ||
51 | + return teacherName; | ||
52 | + } | ||
53 | + | ||
54 | + public void setTeacherName(String teacherName) { | ||
55 | + this.teacherName = teacherName; | ||
56 | + } | ||
57 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/GetCourseTypeListRepVo.java
0 → 100644
@@ -0,0 +1,32 @@ | @@ -0,0 +1,32 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/14 0014 7:59 | ||
11 | + */ | ||
12 | +public class GetCourseTypeListRepVo extends BaseVo { | ||
13 | + | ||
14 | + private int scheduleId ; | ||
15 | + private List<CourseTypeListVO> data ; | ||
16 | + | ||
17 | + public int getScheduleId() { | ||
18 | + return scheduleId; | ||
19 | + } | ||
20 | + | ||
21 | + public void setScheduleId(int scheduleId) { | ||
22 | + this.scheduleId = scheduleId; | ||
23 | + } | ||
24 | + | ||
25 | + public List<CourseTypeListVO> getData() { | ||
26 | + return data; | ||
27 | + } | ||
28 | + | ||
29 | + public void setData(List<CourseTypeListVO> data) { | ||
30 | + this.data = data; | ||
31 | + } | ||
32 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/InitRepVo.java
0 → 100644
@@ -0,0 +1,40 @@ | @@ -0,0 +1,40 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | + | ||
4 | +import com.sincere.common.vo.BaseVo; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/10/11 0011 16:55 | ||
10 | + */ | ||
11 | +public class InitRepVo extends BaseVo { | ||
12 | + | ||
13 | + private int classNumber ; | ||
14 | + private int teacherNumber ; | ||
15 | + private int courseNumber ; | ||
16 | + | ||
17 | + public int getClassNumber() { | ||
18 | + return classNumber; | ||
19 | + } | ||
20 | + | ||
21 | + public void setClassNumber(int classNumber) { | ||
22 | + this.classNumber = classNumber; | ||
23 | + } | ||
24 | + | ||
25 | + public int getTeacherNumber() { | ||
26 | + return teacherNumber; | ||
27 | + } | ||
28 | + | ||
29 | + public void setTeacherNumber(int teacherNumber) { | ||
30 | + this.teacherNumber = teacherNumber; | ||
31 | + } | ||
32 | + | ||
33 | + public int getCourseNumber() { | ||
34 | + return courseNumber; | ||
35 | + } | ||
36 | + | ||
37 | + public void setCourseNumber(int courseNumber) { | ||
38 | + this.courseNumber = courseNumber; | ||
39 | + } | ||
40 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/JoinClassReqVo.java
0 → 100644
@@ -0,0 +1,40 @@ | @@ -0,0 +1,40 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.List; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/10/10 0010 8:40 | ||
10 | + */ | ||
11 | +public class JoinClassReqVo implements Serializable { | ||
12 | + | ||
13 | + private int scheduleId ; | ||
14 | + private int courseId ; | ||
15 | + private List<Integer> classIdList ; | ||
16 | + | ||
17 | + public int getScheduleId() { | ||
18 | + return scheduleId; | ||
19 | + } | ||
20 | + | ||
21 | + public void setScheduleId(int scheduleId) { | ||
22 | + this.scheduleId = scheduleId; | ||
23 | + } | ||
24 | + | ||
25 | + public int getCourseId() { | ||
26 | + return courseId; | ||
27 | + } | ||
28 | + | ||
29 | + public void setCourseId(int courseId) { | ||
30 | + this.courseId = courseId; | ||
31 | + } | ||
32 | + | ||
33 | + public List<Integer> getClassIdList() { | ||
34 | + return classIdList; | ||
35 | + } | ||
36 | + | ||
37 | + public void setClassIdList(List<Integer> classIdList) { | ||
38 | + this.classIdList = classIdList; | ||
39 | + } | ||
40 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/JoinDetail.java
0 → 100644
@@ -0,0 +1,46 @@ | @@ -0,0 +1,46 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +/** | ||
4 | + * @author chen | ||
5 | + * @version 1.0 | ||
6 | + * @date 2019/10/11 0011 14:27 | ||
7 | + */ | ||
8 | +public class JoinDetail { | ||
9 | + | ||
10 | + private int courseGroup ; | ||
11 | + private String courseName ; | ||
12 | + private String className ; | ||
13 | + private String teacherName ; | ||
14 | + | ||
15 | + public int getCourseGroup() { | ||
16 | + return courseGroup; | ||
17 | + } | ||
18 | + | ||
19 | + public void setCourseGroup(int courseGroup) { | ||
20 | + this.courseGroup = courseGroup; | ||
21 | + } | ||
22 | + | ||
23 | + public String getCourseName() { | ||
24 | + return courseName; | ||
25 | + } | ||
26 | + | ||
27 | + public void setCourseName(String courseName) { | ||
28 | + this.courseName = courseName; | ||
29 | + } | ||
30 | + | ||
31 | + public String getClassName() { | ||
32 | + return className; | ||
33 | + } | ||
34 | + | ||
35 | + public void setClassName(String className) { | ||
36 | + this.className = className; | ||
37 | + } | ||
38 | + | ||
39 | + public String getTeacherName() { | ||
40 | + return teacherName; | ||
41 | + } | ||
42 | + | ||
43 | + public void setTeacherName(String teacherName) { | ||
44 | + this.teacherName = teacherName; | ||
45 | + } | ||
46 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/JoinRepVo.java
0 → 100644
@@ -0,0 +1,24 @@ | @@ -0,0 +1,24 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | + | ||
4 | +import com.sincere.common.vo.BaseVo; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/11 0011 14:28 | ||
12 | + */ | ||
13 | +public class JoinRepVo extends BaseVo { | ||
14 | + | ||
15 | + private List<JoinDetail> data ; | ||
16 | + | ||
17 | + public List<JoinDetail> getData() { | ||
18 | + return data; | ||
19 | + } | ||
20 | + | ||
21 | + public void setData(List<JoinDetail> data) { | ||
22 | + this.data = data; | ||
23 | + } | ||
24 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/NoScheduleReqVo.java
0 → 100644
@@ -0,0 +1,58 @@ | @@ -0,0 +1,58 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.List; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/10/9 0009 15:53 | ||
10 | + */ | ||
11 | +public class NoScheduleReqVo implements Serializable { | ||
12 | + | ||
13 | + private int scheduleId ; | ||
14 | + private String grade ; | ||
15 | + private int classId ; | ||
16 | + private int level ; //1 班级不排 2 年级不排 3 学校不排 | ||
17 | + private List<String> list ; | ||
18 | + | ||
19 | + public int getScheduleId() { | ||
20 | + return scheduleId; | ||
21 | + } | ||
22 | + | ||
23 | + public void setScheduleId(int scheduleId) { | ||
24 | + this.scheduleId = scheduleId; | ||
25 | + } | ||
26 | + | ||
27 | + public int getLevel() { | ||
28 | + return level; | ||
29 | + } | ||
30 | + | ||
31 | + public void setLevel(int level) { | ||
32 | + this.level = level; | ||
33 | + } | ||
34 | + | ||
35 | + public List<String> getList() { | ||
36 | + return list; | ||
37 | + } | ||
38 | + | ||
39 | + public void setList(List<String> list) { | ||
40 | + this.list = list; | ||
41 | + } | ||
42 | + | ||
43 | + public String getGrade() { | ||
44 | + return grade; | ||
45 | + } | ||
46 | + | ||
47 | + public void setGrade(String grade) { | ||
48 | + this.grade = grade; | ||
49 | + } | ||
50 | + | ||
51 | + public int getClassId() { | ||
52 | + return classId; | ||
53 | + } | ||
54 | + | ||
55 | + public void setClassId(int classId) { | ||
56 | + this.classId = classId; | ||
57 | + } | ||
58 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/ParallelClassReqVo.java
0 → 100644
@@ -0,0 +1,68 @@ | @@ -0,0 +1,68 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.List; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/9/25 0025 8:41 | ||
10 | + */ | ||
11 | +public class ParallelClassReqVo implements Serializable { | ||
12 | + | ||
13 | + private int scheduleId ; | ||
14 | + private List<String> intervalList ; | ||
15 | + private int courseType; | ||
16 | + | ||
17 | + private int level ; //1 班级不排 2 年级不排 3 学校不排 | ||
18 | + private String grade ; | ||
19 | + private int classId ; | ||
20 | + | ||
21 | + public int getScheduleId() { | ||
22 | + return scheduleId; | ||
23 | + } | ||
24 | + | ||
25 | + public void setScheduleId(int scheduleId) { | ||
26 | + this.scheduleId = scheduleId; | ||
27 | + } | ||
28 | + | ||
29 | + public List<String> getIntervalList() { | ||
30 | + return intervalList; | ||
31 | + } | ||
32 | + | ||
33 | + public void setIntervalList(List<String> intervalList) { | ||
34 | + this.intervalList = intervalList; | ||
35 | + } | ||
36 | + | ||
37 | + public int getCourseType() { | ||
38 | + return courseType; | ||
39 | + } | ||
40 | + | ||
41 | + public void setCourseType(int courseType) { | ||
42 | + this.courseType = courseType; | ||
43 | + } | ||
44 | + | ||
45 | + public int getLevel() { | ||
46 | + return level; | ||
47 | + } | ||
48 | + | ||
49 | + public void setLevel(int level) { | ||
50 | + this.level = level; | ||
51 | + } | ||
52 | + | ||
53 | + public String getGrade() { | ||
54 | + return grade; | ||
55 | + } | ||
56 | + | ||
57 | + public void setGrade(String grade) { | ||
58 | + this.grade = grade; | ||
59 | + } | ||
60 | + | ||
61 | + public int getClassId() { | ||
62 | + return classId; | ||
63 | + } | ||
64 | + | ||
65 | + public void setClassId(int classId) { | ||
66 | + this.classId = classId; | ||
67 | + } | ||
68 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/RecallReqVo.java
0 → 100644
@@ -0,0 +1,29 @@ | @@ -0,0 +1,29 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author chen | ||
7 | + * @version 1.0 | ||
8 | + * @date 2019/10/15 0015 8:08 | ||
9 | + */ | ||
10 | +public class RecallReqVo implements Serializable { | ||
11 | + private int scheduleId ; | ||
12 | + private int number ;// 对应页面 1不排课 2 公共课 3 主课 4 副课 | ||
13 | + | ||
14 | + public int getScheduleId() { | ||
15 | + return scheduleId; | ||
16 | + } | ||
17 | + | ||
18 | + public void setScheduleId(int scheduleId) { | ||
19 | + this.scheduleId = scheduleId; | ||
20 | + } | ||
21 | + | ||
22 | + public int getNumber() { | ||
23 | + return number; | ||
24 | + } | ||
25 | + | ||
26 | + public void setNumber(int number) { | ||
27 | + this.number = number; | ||
28 | + } | ||
29 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/ScheduleListRepVo.java
0 → 100644
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | + | ||
4 | +import com.sincere.common.dto.independence.ScheduleDto; | ||
5 | +import com.sincere.common.vo.BaseVo; | ||
6 | + | ||
7 | +import java.util.List; | ||
8 | + | ||
9 | +/** | ||
10 | + * @author chen | ||
11 | + * @version 1.0 | ||
12 | + * @date 2019/10/11 0011 14:03 | ||
13 | + */ | ||
14 | +public class ScheduleListRepVo extends BaseVo { | ||
15 | + | ||
16 | + private List<ScheduleDto> data ; | ||
17 | + | ||
18 | + public List<ScheduleDto> getData() { | ||
19 | + return data; | ||
20 | + } | ||
21 | + | ||
22 | + public void setData(List<ScheduleDto> data) { | ||
23 | + this.data = data; | ||
24 | + } | ||
25 | + public ScheduleListRepVo(){ | ||
26 | + super(); | ||
27 | + } | ||
28 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/SetTypeReqVo.java
0 → 100644
@@ -0,0 +1,41 @@ | @@ -0,0 +1,41 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.List; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/10/9 0009 16:32 | ||
10 | + */ | ||
11 | +public class SetTypeReqVo implements Serializable { | ||
12 | + | ||
13 | + private int scheduleId ; | ||
14 | + private int courseType ; // 1 主课 2 副课 3 公共课 | ||
15 | + private List<Integer> courseIdList ; | ||
16 | + | ||
17 | + | ||
18 | + public int getCourseType() { | ||
19 | + return courseType; | ||
20 | + } | ||
21 | + | ||
22 | + public void setCourseType(int courseType) { | ||
23 | + this.courseType = courseType; | ||
24 | + } | ||
25 | + | ||
26 | + public int getScheduleId() { | ||
27 | + return scheduleId; | ||
28 | + } | ||
29 | + | ||
30 | + public void setScheduleId(int scheduleId) { | ||
31 | + this.scheduleId = scheduleId; | ||
32 | + } | ||
33 | + | ||
34 | + public List<Integer> getCourseIdList() { | ||
35 | + return courseIdList; | ||
36 | + } | ||
37 | + | ||
38 | + public void setCourseIdList(List<Integer> courseIdList) { | ||
39 | + this.courseIdList = courseIdList; | ||
40 | + } | ||
41 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/paike/TeacherCourseRepVo.java
0 → 100644
@@ -0,0 +1,33 @@ | @@ -0,0 +1,33 @@ | ||
1 | +package com.sincere.common.vo.independence.paike; | ||
2 | + | ||
3 | + | ||
4 | +import com.sincere.common.vo.BaseVo; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/12 0012 8:32 | ||
12 | + */ | ||
13 | +public class TeacherCourseRepVo extends BaseVo { | ||
14 | + | ||
15 | + private List<ClassCourseVO> data ; | ||
16 | + private List<String> courseNameList ; | ||
17 | + | ||
18 | + public List<ClassCourseVO> getData() { | ||
19 | + return data; | ||
20 | + } | ||
21 | + | ||
22 | + public void setData(List<ClassCourseVO> data) { | ||
23 | + this.data = data; | ||
24 | + } | ||
25 | + | ||
26 | + public List<String> getCourseNameList() { | ||
27 | + return courseNameList; | ||
28 | + } | ||
29 | + | ||
30 | + public void setCourseNameList(List<String> courseNameList) { | ||
31 | + this.courseNameList = courseNameList; | ||
32 | + } | ||
33 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form1.java
0 → 100644
@@ -0,0 +1,46 @@ | @@ -0,0 +1,46 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/18 0018 15:37 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form1 implements Serializable { | ||
15 | + | ||
16 | + @ApiModelProperty(value="等级") | ||
17 | + private String level ; | ||
18 | + @ApiModelProperty(value="人数") | ||
19 | + private int number ; | ||
20 | + @ApiModelProperty(value="比例") | ||
21 | + private double prop ; | ||
22 | + | ||
23 | + public String getLevel() { | ||
24 | + return level; | ||
25 | + } | ||
26 | + | ||
27 | + public void setLevel(String level) { | ||
28 | + this.level = level; | ||
29 | + } | ||
30 | + | ||
31 | + public int getNumber() { | ||
32 | + return number; | ||
33 | + } | ||
34 | + | ||
35 | + public void setNumber(int number) { | ||
36 | + this.number = number; | ||
37 | + } | ||
38 | + | ||
39 | + public double getProp() { | ||
40 | + return prop; | ||
41 | + } | ||
42 | + | ||
43 | + public void setProp(double prop) { | ||
44 | + this.prop = prop; | ||
45 | + } | ||
46 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form1RepVO.java
0 → 100644
@@ -0,0 +1,38 @@ | @@ -0,0 +1,38 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | +import io.swagger.annotations.ApiModel; | ||
5 | +import io.swagger.annotations.ApiModelProperty; | ||
6 | + | ||
7 | +import java.util.List; | ||
8 | +import java.util.Map; | ||
9 | + | ||
10 | +/** | ||
11 | + * @author chen | ||
12 | + * @version 1.0 | ||
13 | + * @date 2019/10/18 0018 15:46 | ||
14 | + */ | ||
15 | +@ApiModel | ||
16 | +public class Form1RepVO extends BaseVo { | ||
17 | + | ||
18 | + @ApiModelProperty(value="分数段区间") | ||
19 | + private Map<String ,String> map ; | ||
20 | + @ApiModelProperty(value="分数段详情") | ||
21 | + private List<Form1> list ; | ||
22 | + | ||
23 | + public Map<String, String> getMap() { | ||
24 | + return map; | ||
25 | + } | ||
26 | + | ||
27 | + public void setMap(Map<String, String> map) { | ||
28 | + this.map = map; | ||
29 | + } | ||
30 | + | ||
31 | + public List<Form1> getList() { | ||
32 | + return list; | ||
33 | + } | ||
34 | + | ||
35 | + public void setList(List<Form1> list) { | ||
36 | + this.list = list; | ||
37 | + } | ||
38 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form2.java
0 → 100644
@@ -0,0 +1,86 @@ | @@ -0,0 +1,86 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/18 0018 16:10 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form2 implements Serializable { | ||
15 | + | ||
16 | + @ApiModelProperty(value="名称") | ||
17 | + private String name ; | ||
18 | + @ApiModelProperty(value="参考人数") | ||
19 | + private int studentNumber ; | ||
20 | + @ApiModelProperty(value="参考人数占比") | ||
21 | + private double studentProp ; | ||
22 | + @ApiModelProperty(value="高分段人数") | ||
23 | + private int highNumber ; | ||
24 | + @ApiModelProperty(value="高分段人数占比") | ||
25 | + private double highProp ; | ||
26 | + @ApiModelProperty(value="低分段人数") | ||
27 | + private int lowNumber ; | ||
28 | + @ApiModelProperty(value="低分段人数占比") | ||
29 | + private double lowProp ; | ||
30 | + | ||
31 | + public String getName() { | ||
32 | + return name; | ||
33 | + } | ||
34 | + | ||
35 | + public void setName(String name) { | ||
36 | + this.name = name; | ||
37 | + } | ||
38 | + | ||
39 | + public int getStudentNumber() { | ||
40 | + return studentNumber; | ||
41 | + } | ||
42 | + | ||
43 | + public void setStudentNumber(int studentNumber) { | ||
44 | + this.studentNumber = studentNumber; | ||
45 | + } | ||
46 | + | ||
47 | + public int getHighNumber() { | ||
48 | + return highNumber; | ||
49 | + } | ||
50 | + | ||
51 | + public void setHighNumber(int highNumber) { | ||
52 | + this.highNumber = highNumber; | ||
53 | + } | ||
54 | + | ||
55 | + public double getHighProp() { | ||
56 | + return highProp; | ||
57 | + } | ||
58 | + | ||
59 | + public void setHighProp(double highProp) { | ||
60 | + this.highProp = highProp; | ||
61 | + } | ||
62 | + | ||
63 | + public int getLowNumber() { | ||
64 | + return lowNumber; | ||
65 | + } | ||
66 | + | ||
67 | + public void setLowNumber(int lowNumber) { | ||
68 | + this.lowNumber = lowNumber; | ||
69 | + } | ||
70 | + | ||
71 | + public double getLowProp() { | ||
72 | + return lowProp; | ||
73 | + } | ||
74 | + | ||
75 | + public void setLowProp(double lowProp) { | ||
76 | + this.lowProp = lowProp; | ||
77 | + } | ||
78 | + | ||
79 | + public double getStudentProp() { | ||
80 | + return studentProp; | ||
81 | + } | ||
82 | + | ||
83 | + public void setStudentProp(double studentProp) { | ||
84 | + this.studentProp = studentProp; | ||
85 | + } | ||
86 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form2RepVO.java
0 → 100644
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | +import io.swagger.annotations.ApiModel; | ||
5 | +import io.swagger.annotations.ApiModelProperty; | ||
6 | + | ||
7 | +import java.util.List; | ||
8 | + | ||
9 | +/** | ||
10 | + * @author chen | ||
11 | + * @version 1.0 | ||
12 | + * @date 2019/10/22 0022 9:51 | ||
13 | + */ | ||
14 | +@ApiModel | ||
15 | +public class Form2RepVO extends BaseVo { | ||
16 | + @ApiModelProperty(value="数据") | ||
17 | + private List<Form2> data ; | ||
18 | + | ||
19 | + public List<Form2> getData() { | ||
20 | + return data; | ||
21 | + } | ||
22 | + | ||
23 | + public void setData(List<Form2> data) { | ||
24 | + this.data = data; | ||
25 | + } | ||
26 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form3.java
0 → 100644
@@ -0,0 +1,96 @@ | @@ -0,0 +1,96 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/21 0021 9:03 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form3 implements Serializable { | ||
15 | + | ||
16 | + @ApiModelProperty(value="名称") | ||
17 | + private String name ; | ||
18 | + @ApiModelProperty(value="最高分") | ||
19 | + private Double maxScore ; | ||
20 | + @ApiModelProperty(value="平均分") | ||
21 | + private Double average ; | ||
22 | + @ApiModelProperty(value="最低分") | ||
23 | + private Double minScore ; | ||
24 | + @ApiModelProperty(value="优秀率") | ||
25 | + private Double apercent ; | ||
26 | + @ApiModelProperty(value="良好率") | ||
27 | + private Double bpercent ; | ||
28 | + @ApiModelProperty(value="及格率") | ||
29 | + private Double cpercent ; | ||
30 | + @ApiModelProperty(value="不及格率") | ||
31 | + private Double dpercent ; | ||
32 | + | ||
33 | + public String getName() { | ||
34 | + return name; | ||
35 | + } | ||
36 | + | ||
37 | + public void setName(String name) { | ||
38 | + this.name = name; | ||
39 | + } | ||
40 | + | ||
41 | + public Double getMaxScore() { | ||
42 | + return maxScore; | ||
43 | + } | ||
44 | + | ||
45 | + public void setMaxScore(Double maxScore) { | ||
46 | + this.maxScore = maxScore; | ||
47 | + } | ||
48 | + | ||
49 | + public Double getAverage() { | ||
50 | + return average; | ||
51 | + } | ||
52 | + | ||
53 | + public void setAverage(Double average) { | ||
54 | + this.average = average; | ||
55 | + } | ||
56 | + | ||
57 | + public Double getMinScore() { | ||
58 | + return minScore; | ||
59 | + } | ||
60 | + | ||
61 | + public void setMinScore(Double minScore) { | ||
62 | + this.minScore = minScore; | ||
63 | + } | ||
64 | + | ||
65 | + public Double getApercent() { | ||
66 | + return apercent; | ||
67 | + } | ||
68 | + | ||
69 | + public void setApercent(Double apercent) { | ||
70 | + this.apercent = apercent; | ||
71 | + } | ||
72 | + | ||
73 | + public Double getBpercent() { | ||
74 | + return bpercent; | ||
75 | + } | ||
76 | + | ||
77 | + public void setBpercent(Double bpercent) { | ||
78 | + this.bpercent = bpercent; | ||
79 | + } | ||
80 | + | ||
81 | + public Double getCpercent() { | ||
82 | + return cpercent; | ||
83 | + } | ||
84 | + | ||
85 | + public void setCpercent(Double cpercent) { | ||
86 | + this.cpercent = cpercent; | ||
87 | + } | ||
88 | + | ||
89 | + public Double getDpercent() { | ||
90 | + return dpercent; | ||
91 | + } | ||
92 | + | ||
93 | + public void setDpercent(Double dpercent) { | ||
94 | + this.dpercent = dpercent; | ||
95 | + } | ||
96 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form3RepVO.java
0 → 100644
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/22 0022 10:14 | ||
11 | + */ | ||
12 | +public class Form3RepVO extends BaseVo { | ||
13 | + | ||
14 | + private List<Form3> data ; | ||
15 | + | ||
16 | + public List<Form3> getData() { | ||
17 | + return data; | ||
18 | + } | ||
19 | + | ||
20 | + public void setData(List<Form3> data) { | ||
21 | + this.data = data; | ||
22 | + } | ||
23 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form4.java
0 → 100644
@@ -0,0 +1,66 @@ | @@ -0,0 +1,66 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/21 0021 9:51 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form4 implements Serializable { | ||
15 | + | ||
16 | + @ApiModelProperty(value="名称") | ||
17 | + private String name ; | ||
18 | + @ApiModelProperty(value="众数") | ||
19 | + private Double modeNumber ; | ||
20 | + @ApiModelProperty(value="中位数") | ||
21 | + private Double medianNumber ; | ||
22 | + @ApiModelProperty(value="标准差") | ||
23 | + private Double stdev ; | ||
24 | + @ApiModelProperty(value="平均分") | ||
25 | + private Double avgNumber ; | ||
26 | + | ||
27 | + public String getName() { | ||
28 | + return name; | ||
29 | + } | ||
30 | + | ||
31 | + public void setName(String name) { | ||
32 | + this.name = name; | ||
33 | + } | ||
34 | + | ||
35 | + public Double getModeNumber() { | ||
36 | + return modeNumber; | ||
37 | + } | ||
38 | + | ||
39 | + public void setModeNumber(Double modeNumber) { | ||
40 | + this.modeNumber = modeNumber; | ||
41 | + } | ||
42 | + | ||
43 | + public Double getMedianNumber() { | ||
44 | + return medianNumber; | ||
45 | + } | ||
46 | + | ||
47 | + public void setMedianNumber(Double medianNumber) { | ||
48 | + this.medianNumber = medianNumber; | ||
49 | + } | ||
50 | + | ||
51 | + public Double getStdev() { | ||
52 | + return stdev; | ||
53 | + } | ||
54 | + | ||
55 | + public void setStdev(Double stdev) { | ||
56 | + this.stdev = stdev; | ||
57 | + } | ||
58 | + | ||
59 | + public Double getAvgNumber() { | ||
60 | + return avgNumber; | ||
61 | + } | ||
62 | + | ||
63 | + public void setAvgNumber(Double avgNumber) { | ||
64 | + this.avgNumber = avgNumber; | ||
65 | + } | ||
66 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form4RepVO.java
0 → 100644
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | +import io.swagger.annotations.ApiModel; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/22 0022 10:23 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form4RepVO extends BaseVo { | ||
15 | + | ||
16 | + private List<Form4> data ; | ||
17 | + | ||
18 | + public List<Form4> getData() { | ||
19 | + return data; | ||
20 | + } | ||
21 | + | ||
22 | + public void setData(List<Form4> data) { | ||
23 | + this.data = data; | ||
24 | + } | ||
25 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form5.java
0 → 100644
@@ -0,0 +1,136 @@ | @@ -0,0 +1,136 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/21 0021 9:59 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form5 implements Serializable { | ||
15 | + @ApiModelProperty(value="题号") | ||
16 | + private String examNumber ; | ||
17 | + @ApiModelProperty(value="难度") | ||
18 | + private String difficultName ; | ||
19 | + @ApiModelProperty(value="分值") | ||
20 | + private Double score ; | ||
21 | + @ApiModelProperty(value="得分率 区") | ||
22 | + private Double allRate ; | ||
23 | + @ApiModelProperty(value="得分率 联盟校") | ||
24 | + private Double leagueRate ; | ||
25 | + @ApiModelProperty(value="得分率 本校") | ||
26 | + private Double schoolRate ; | ||
27 | + @ApiModelProperty(value="平均分 区") | ||
28 | + private Double allAvg ; | ||
29 | + @ApiModelProperty(value="平均分 联盟校") | ||
30 | + private Double leagueAvg ; | ||
31 | + @ApiModelProperty(value="平均分 本校") | ||
32 | + private Double schoolAvg ; | ||
33 | + @ApiModelProperty(value="区分度 区") | ||
34 | + private Double allDist ; | ||
35 | + @ApiModelProperty(value="区分度 联盟校") | ||
36 | + private Double leagueDist ; | ||
37 | + @ApiModelProperty(value="区分度 本校") | ||
38 | + private Double schoolDist ; | ||
39 | + | ||
40 | + | ||
41 | + public String getExamNumber() { | ||
42 | + return examNumber; | ||
43 | + } | ||
44 | + | ||
45 | + public void setExamNumber(String examNumber) { | ||
46 | + this.examNumber = examNumber; | ||
47 | + } | ||
48 | + | ||
49 | + public Double getScore() { | ||
50 | + return score; | ||
51 | + } | ||
52 | + | ||
53 | + public void setScore(Double score) { | ||
54 | + this.score = score; | ||
55 | + } | ||
56 | + | ||
57 | + public Double getAllRate() { | ||
58 | + return allRate; | ||
59 | + } | ||
60 | + | ||
61 | + public void setAllRate(Double allRate) { | ||
62 | + this.allRate = allRate; | ||
63 | + } | ||
64 | + | ||
65 | + public Double getSchoolRate() { | ||
66 | + return schoolRate; | ||
67 | + } | ||
68 | + | ||
69 | + public void setSchoolRate(Double schoolRate) { | ||
70 | + this.schoolRate = schoolRate; | ||
71 | + } | ||
72 | + | ||
73 | + public Double getAllAvg() { | ||
74 | + return allAvg; | ||
75 | + } | ||
76 | + | ||
77 | + public void setAllAvg(Double allAvg) { | ||
78 | + this.allAvg = allAvg; | ||
79 | + } | ||
80 | + | ||
81 | + public Double getSchoolAvg() { | ||
82 | + return schoolAvg; | ||
83 | + } | ||
84 | + | ||
85 | + public void setSchoolAvg(Double schoolAvg) { | ||
86 | + this.schoolAvg = schoolAvg; | ||
87 | + } | ||
88 | + | ||
89 | + public Double getAllDist() { | ||
90 | + return allDist; | ||
91 | + } | ||
92 | + | ||
93 | + public void setAllDist(Double allDist) { | ||
94 | + this.allDist = allDist; | ||
95 | + } | ||
96 | + | ||
97 | + public Double getSchoolDist() { | ||
98 | + return schoolDist; | ||
99 | + } | ||
100 | + | ||
101 | + public void setSchoolDist(Double schoolDist) { | ||
102 | + this.schoolDist = schoolDist; | ||
103 | + } | ||
104 | + | ||
105 | + public String getDifficultName() { | ||
106 | + return difficultName; | ||
107 | + } | ||
108 | + | ||
109 | + public void setDifficultName(String difficultName) { | ||
110 | + this.difficultName = difficultName; | ||
111 | + } | ||
112 | + | ||
113 | + public Double getLeagueRate() { | ||
114 | + return leagueRate; | ||
115 | + } | ||
116 | + | ||
117 | + public void setLeagueRate(Double leagueRate) { | ||
118 | + this.leagueRate = leagueRate; | ||
119 | + } | ||
120 | + | ||
121 | + public Double getLeagueAvg() { | ||
122 | + return leagueAvg; | ||
123 | + } | ||
124 | + | ||
125 | + public void setLeagueAvg(Double leagueAvg) { | ||
126 | + this.leagueAvg = leagueAvg; | ||
127 | + } | ||
128 | + | ||
129 | + public Double getLeagueDist() { | ||
130 | + return leagueDist; | ||
131 | + } | ||
132 | + | ||
133 | + public void setLeagueDist(Double leagueDist) { | ||
134 | + this.leagueDist = leagueDist; | ||
135 | + } | ||
136 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form5RepVO.java
0 → 100644
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | +import io.swagger.annotations.ApiModel; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/22 0022 10:28 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form5RepVO extends BaseVo { | ||
15 | + | ||
16 | + private List<Form5> data ; | ||
17 | + | ||
18 | + public List<Form5> getData() { | ||
19 | + return data; | ||
20 | + } | ||
21 | + | ||
22 | + public void setData(List<Form5> data) { | ||
23 | + this.data = data; | ||
24 | + } | ||
25 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form6.java
0 → 100644
@@ -0,0 +1,137 @@ | @@ -0,0 +1,137 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/21 0021 11:25 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form6 implements Serializable { | ||
15 | + @ApiModelProperty(value="维度名称") | ||
16 | + private String dimensional ; | ||
17 | + @ApiModelProperty(value="分值") | ||
18 | + private Double score ; | ||
19 | + @ApiModelProperty(value="得分率 区") | ||
20 | + private Double allRate ; | ||
21 | + @ApiModelProperty(value="得分率 联盟校") | ||
22 | + private Double leagueRate ; | ||
23 | + @ApiModelProperty(value="得分率 本校") | ||
24 | + private Double schoolRate ; | ||
25 | + @ApiModelProperty(value="平均分 区") | ||
26 | + private Double allAvg ; | ||
27 | + @ApiModelProperty(value="平均分 联盟校") | ||
28 | + private Double leagueAvg ; | ||
29 | + @ApiModelProperty(value="平均分 本校") | ||
30 | + private Double schoolAvg ; | ||
31 | + @ApiModelProperty(value="区分度 区") | ||
32 | + private Double allDist ; | ||
33 | + @ApiModelProperty(value="区分度 联盟校") | ||
34 | + private Double leagueDist ; | ||
35 | + @ApiModelProperty(value="区分度 本校") | ||
36 | + private Double schoolDist ; | ||
37 | + | ||
38 | + | ||
39 | + private String examNumber ; | ||
40 | + | ||
41 | + | ||
42 | + public Double getScore() { | ||
43 | + return score; | ||
44 | + } | ||
45 | + | ||
46 | + public void setScore(Double score) { | ||
47 | + this.score = score; | ||
48 | + } | ||
49 | + | ||
50 | + public Double getAllRate() { | ||
51 | + return allRate; | ||
52 | + } | ||
53 | + | ||
54 | + public void setAllRate(Double allRate) { | ||
55 | + this.allRate = allRate; | ||
56 | + } | ||
57 | + | ||
58 | + public Double getSchoolRate() { | ||
59 | + return schoolRate; | ||
60 | + } | ||
61 | + | ||
62 | + public void setSchoolRate(Double schoolRate) { | ||
63 | + this.schoolRate = schoolRate; | ||
64 | + } | ||
65 | + | ||
66 | + public Double getAllAvg() { | ||
67 | + return allAvg; | ||
68 | + } | ||
69 | + | ||
70 | + public void setAllAvg(Double allAvg) { | ||
71 | + this.allAvg = allAvg; | ||
72 | + } | ||
73 | + | ||
74 | + public Double getSchoolAvg() { | ||
75 | + return schoolAvg; | ||
76 | + } | ||
77 | + | ||
78 | + public void setSchoolAvg(Double schoolAvg) { | ||
79 | + this.schoolAvg = schoolAvg; | ||
80 | + } | ||
81 | + | ||
82 | + public Double getAllDist() { | ||
83 | + return allDist; | ||
84 | + } | ||
85 | + | ||
86 | + public void setAllDist(Double allDist) { | ||
87 | + this.allDist = allDist; | ||
88 | + } | ||
89 | + | ||
90 | + public Double getSchoolDist() { | ||
91 | + return schoolDist; | ||
92 | + } | ||
93 | + | ||
94 | + public void setSchoolDist(Double schoolDist) { | ||
95 | + this.schoolDist = schoolDist; | ||
96 | + } | ||
97 | + | ||
98 | + public String getExamNumber() { | ||
99 | + return examNumber; | ||
100 | + } | ||
101 | + | ||
102 | + public void setExamNumber(String examNumber) { | ||
103 | + this.examNumber = examNumber; | ||
104 | + } | ||
105 | + | ||
106 | + public String getDimensional() { | ||
107 | + return dimensional; | ||
108 | + } | ||
109 | + | ||
110 | + public void setDimensional(String dimensional) { | ||
111 | + this.dimensional = dimensional; | ||
112 | + } | ||
113 | + | ||
114 | + public Double getLeagueRate() { | ||
115 | + return leagueRate; | ||
116 | + } | ||
117 | + | ||
118 | + public void setLeagueRate(Double leagueRate) { | ||
119 | + this.leagueRate = leagueRate; | ||
120 | + } | ||
121 | + | ||
122 | + public Double getLeagueAvg() { | ||
123 | + return leagueAvg; | ||
124 | + } | ||
125 | + | ||
126 | + public void setLeagueAvg(Double leagueAvg) { | ||
127 | + this.leagueAvg = leagueAvg; | ||
128 | + } | ||
129 | + | ||
130 | + public Double getLeagueDist() { | ||
131 | + return leagueDist; | ||
132 | + } | ||
133 | + | ||
134 | + public void setLeagueDist(Double leagueDist) { | ||
135 | + this.leagueDist = leagueDist; | ||
136 | + } | ||
137 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form6RepVO.java
0 → 100644
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | +import io.swagger.annotations.ApiModel; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/22 0022 10:51 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form6RepVO extends BaseVo { | ||
15 | + | ||
16 | + private List<Form6> data ; | ||
17 | + | ||
18 | + public List<Form6> getData() { | ||
19 | + return data; | ||
20 | + } | ||
21 | + | ||
22 | + public void setData(List<Form6> data) { | ||
23 | + this.data = data; | ||
24 | + } | ||
25 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form7.java
0 → 100644
@@ -0,0 +1,46 @@ | @@ -0,0 +1,46 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/21 0021 14:58 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form7 implements Serializable { | ||
15 | + | ||
16 | + @ApiModelProperty(value = "名称") | ||
17 | + private String name ; | ||
18 | + @ApiModelProperty(value = "分值") | ||
19 | + private Double score ; | ||
20 | + @ApiModelProperty(value = "占比") | ||
21 | + private Double percent ; | ||
22 | + | ||
23 | + public Double getScore() { | ||
24 | + return score; | ||
25 | + } | ||
26 | + | ||
27 | + public void setScore(Double score) { | ||
28 | + this.score = score; | ||
29 | + } | ||
30 | + | ||
31 | + public String getName() { | ||
32 | + return name; | ||
33 | + } | ||
34 | + | ||
35 | + public void setName(String name) { | ||
36 | + this.name = name; | ||
37 | + } | ||
38 | + | ||
39 | + public Double getPercent() { | ||
40 | + return percent; | ||
41 | + } | ||
42 | + | ||
43 | + public void setPercent(Double percent) { | ||
44 | + this.percent = percent; | ||
45 | + } | ||
46 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form7RepVO.java
0 → 100644
@@ -0,0 +1,88 @@ | @@ -0,0 +1,88 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.ChapterDto; | ||
4 | +import com.sincere.common.vo.BaseVo; | ||
5 | +import io.swagger.annotations.ApiModel; | ||
6 | +import io.swagger.annotations.ApiModelProperty; | ||
7 | + | ||
8 | +import java.util.List; | ||
9 | + | ||
10 | +/** | ||
11 | + * @author chen | ||
12 | + * @version 1.0 | ||
13 | + * @date 2019/10/24 0024 9:20 | ||
14 | + */ | ||
15 | +@ApiModel | ||
16 | +public class Form7RepVO extends BaseVo { | ||
17 | + | ||
18 | + @ApiModelProperty(value = "举例七年级上册") | ||
19 | + private String examScope ; | ||
20 | + @ApiModelProperty(value = "科目") | ||
21 | + private String courseName ; | ||
22 | + @ApiModelProperty(value = "满分") | ||
23 | + private Double maxScore ; | ||
24 | + @ApiModelProperty(value = "考试时长") | ||
25 | + private String examTime ; | ||
26 | + @ApiModelProperty(value = "章节列表对应分值") | ||
27 | + private List<ChapterDto> list ; | ||
28 | + @ApiModelProperty(value = "难度列表对应分值") | ||
29 | + private List<Form7> difficultList ; | ||
30 | + @ApiModelProperty(value = "题型类型对应分值") | ||
31 | + private List<Form7> typeList ; | ||
32 | + | ||
33 | + public String getExamScope() { | ||
34 | + return examScope; | ||
35 | + } | ||
36 | + | ||
37 | + public void setExamScope(String examScope) { | ||
38 | + this.examScope = examScope; | ||
39 | + } | ||
40 | + | ||
41 | + public String getCourseName() { | ||
42 | + return courseName; | ||
43 | + } | ||
44 | + | ||
45 | + public void setCourseName(String courseName) { | ||
46 | + this.courseName = courseName; | ||
47 | + } | ||
48 | + | ||
49 | + public List<ChapterDto> getList() { | ||
50 | + return list; | ||
51 | + } | ||
52 | + | ||
53 | + public void setList(List<ChapterDto> list) { | ||
54 | + this.list = list; | ||
55 | + } | ||
56 | + | ||
57 | + public List<Form7> getDifficultList() { | ||
58 | + return difficultList; | ||
59 | + } | ||
60 | + | ||
61 | + public void setDifficultList(List<Form7> difficultList) { | ||
62 | + this.difficultList = difficultList; | ||
63 | + } | ||
64 | + | ||
65 | + public List<Form7> getTypeList() { | ||
66 | + return typeList; | ||
67 | + } | ||
68 | + | ||
69 | + public void setTypeList(List<Form7> typeList) { | ||
70 | + this.typeList = typeList; | ||
71 | + } | ||
72 | + | ||
73 | + public Double getMaxScore() { | ||
74 | + return maxScore; | ||
75 | + } | ||
76 | + | ||
77 | + public void setMaxScore(Double maxScore) { | ||
78 | + this.maxScore = maxScore; | ||
79 | + } | ||
80 | + | ||
81 | + public String getExamTime() { | ||
82 | + return examTime; | ||
83 | + } | ||
84 | + | ||
85 | + public void setExamTime(String examTime) { | ||
86 | + this.examTime = examTime; | ||
87 | + } | ||
88 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form8.java
0 → 100644
@@ -0,0 +1,66 @@ | @@ -0,0 +1,66 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/21 0021 15:14 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form8 implements Serializable { | ||
15 | + | ||
16 | + @ApiModelProperty(value="题目难度") | ||
17 | + private String difficultName ; | ||
18 | + @ApiModelProperty(value="分值") | ||
19 | + private Double score ; | ||
20 | + @ApiModelProperty(value="得分率 区") | ||
21 | + private Double allRate ; | ||
22 | + @ApiModelProperty(value="得分率 联盟校") | ||
23 | + private Double leagueRate ; | ||
24 | + @ApiModelProperty(value="得分率 本校") | ||
25 | + private Double schoolRate ; | ||
26 | + | ||
27 | + public String getDifficultName() { | ||
28 | + return difficultName; | ||
29 | + } | ||
30 | + | ||
31 | + public void setDifficultName(String difficultName) { | ||
32 | + this.difficultName = difficultName; | ||
33 | + } | ||
34 | + | ||
35 | + public Double getScore() { | ||
36 | + return score; | ||
37 | + } | ||
38 | + | ||
39 | + public void setScore(Double score) { | ||
40 | + this.score = score; | ||
41 | + } | ||
42 | + | ||
43 | + public Double getAllRate() { | ||
44 | + return allRate; | ||
45 | + } | ||
46 | + | ||
47 | + public void setAllRate(Double allRate) { | ||
48 | + this.allRate = allRate; | ||
49 | + } | ||
50 | + | ||
51 | + public Double getSchoolRate() { | ||
52 | + return schoolRate; | ||
53 | + } | ||
54 | + | ||
55 | + public void setSchoolRate(Double schoolRate) { | ||
56 | + this.schoolRate = schoolRate; | ||
57 | + } | ||
58 | + | ||
59 | + public Double getLeagueRate() { | ||
60 | + return leagueRate; | ||
61 | + } | ||
62 | + | ||
63 | + public void setLeagueRate(Double leagueRate) { | ||
64 | + this.leagueRate = leagueRate; | ||
65 | + } | ||
66 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Form8RepVO.java
0 → 100644
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | +import io.swagger.annotations.ApiModel; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/22 0022 10:47 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Form8RepVO extends BaseVo { | ||
15 | + | ||
16 | + private List<Form8> data ; | ||
17 | + | ||
18 | + public List<Form8> getData() { | ||
19 | + return data; | ||
20 | + } | ||
21 | + | ||
22 | + public void setData(List<Form8> data) { | ||
23 | + this.data = data; | ||
24 | + } | ||
25 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/SuggestRepVo.java
0 → 100644
@@ -0,0 +1,135 @@ | @@ -0,0 +1,135 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/23 0023 9:04 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class SuggestRepVo { | ||
15 | + @ApiModelProperty(value = "总体情况") | ||
16 | + private String assess ; | ||
17 | + @ApiModelProperty(value = "难度系数") | ||
18 | + private String difficultyDegree ; | ||
19 | + @ApiModelProperty(value = "优秀率") | ||
20 | + private String excellentRate ; | ||
21 | + @ApiModelProperty(value = "知识点得分率不到50%的") | ||
22 | + private List<String> lessKnowledgeList ; | ||
23 | + @ApiModelProperty(value = "知识点得分率不到70%") | ||
24 | + private List<String> midKnowledgeList ; | ||
25 | + @ApiModelProperty(value = "学习能力得分率<69%") | ||
26 | + private List<String> lessAbilityList ; | ||
27 | + @ApiModelProperty(value = "学习能力得分率在70%≤η<80%") | ||
28 | + private List<String> midAbilityList ; | ||
29 | + @ApiModelProperty(value = "学习能力得分率≥80%") | ||
30 | + private List<String> highAbilityList ; | ||
31 | + @ApiModelProperty(value = "探究技能方面得分率<69%") | ||
32 | + private List<String> lessSkillList ; | ||
33 | + @ApiModelProperty(value = "探究技能方面得分率在70%≤η<80%") | ||
34 | + private List<String> midSkillList ; | ||
35 | + @ApiModelProperty(value = "探究技能方面得分率≥80%") | ||
36 | + private List<String> highSkillList ; | ||
37 | + @ApiModelProperty(value = "选择题错误率>15%") | ||
38 | + private List<String> errorList ; | ||
39 | + | ||
40 | + public List<String> getErrorList() { | ||
41 | + return errorList; | ||
42 | + } | ||
43 | + | ||
44 | + public void setErrorList(List<String> errorList) { | ||
45 | + this.errorList = errorList; | ||
46 | + } | ||
47 | + | ||
48 | + public String getAssess() { | ||
49 | + return assess; | ||
50 | + } | ||
51 | + | ||
52 | + public void setAssess(String assess) { | ||
53 | + this.assess = assess; | ||
54 | + } | ||
55 | + | ||
56 | + public String getDifficultyDegree() { | ||
57 | + return difficultyDegree; | ||
58 | + } | ||
59 | + | ||
60 | + public void setDifficultyDegree(String difficultyDegree) { | ||
61 | + this.difficultyDegree = difficultyDegree; | ||
62 | + } | ||
63 | + | ||
64 | + public String getExcellentRate() { | ||
65 | + return excellentRate; | ||
66 | + } | ||
67 | + | ||
68 | + public void setExcellentRate(String excellentRate) { | ||
69 | + this.excellentRate = excellentRate; | ||
70 | + } | ||
71 | + | ||
72 | + public List<String> getLessKnowledgeList() { | ||
73 | + return lessKnowledgeList; | ||
74 | + } | ||
75 | + | ||
76 | + public void setLessKnowledgeList(List<String> lessKnowledgeList) { | ||
77 | + this.lessKnowledgeList = lessKnowledgeList; | ||
78 | + } | ||
79 | + | ||
80 | + public List<String> getMidKnowledgeList() { | ||
81 | + return midKnowledgeList; | ||
82 | + } | ||
83 | + | ||
84 | + public void setMidKnowledgeList(List<String> midKnowledgeList) { | ||
85 | + this.midKnowledgeList = midKnowledgeList; | ||
86 | + } | ||
87 | + | ||
88 | + public List<String> getLessAbilityList() { | ||
89 | + return lessAbilityList; | ||
90 | + } | ||
91 | + | ||
92 | + public void setLessAbilityList(List<String> lessAbilityList) { | ||
93 | + this.lessAbilityList = lessAbilityList; | ||
94 | + } | ||
95 | + | ||
96 | + public List<String> getMidAbilityList() { | ||
97 | + return midAbilityList; | ||
98 | + } | ||
99 | + | ||
100 | + public void setMidAbilityList(List<String> midAbilityList) { | ||
101 | + this.midAbilityList = midAbilityList; | ||
102 | + } | ||
103 | + | ||
104 | + public List<String> getHighAbilityList() { | ||
105 | + return highAbilityList; | ||
106 | + } | ||
107 | + | ||
108 | + public void setHighAbilityList(List<String> highAbilityList) { | ||
109 | + this.highAbilityList = highAbilityList; | ||
110 | + } | ||
111 | + | ||
112 | + public List<String> getLessSkillList() { | ||
113 | + return lessSkillList; | ||
114 | + } | ||
115 | + | ||
116 | + public void setLessSkillList(List<String> lessSkillList) { | ||
117 | + this.lessSkillList = lessSkillList; | ||
118 | + } | ||
119 | + | ||
120 | + public List<String> getMidSkillList() { | ||
121 | + return midSkillList; | ||
122 | + } | ||
123 | + | ||
124 | + public void setMidSkillList(List<String> midSkillList) { | ||
125 | + this.midSkillList = midSkillList; | ||
126 | + } | ||
127 | + | ||
128 | + public List<String> getHighSkillList() { | ||
129 | + return highSkillList; | ||
130 | + } | ||
131 | + | ||
132 | + public void setHighSkillList(List<String> highSkillList) { | ||
133 | + this.highSkillList = highSkillList; | ||
134 | + } | ||
135 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Table1.java
0 → 100644
@@ -0,0 +1,35 @@ | @@ -0,0 +1,35 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/21 0021 8:34 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Table1 implements Serializable { | ||
15 | + @ApiModelProperty(value="分数段") | ||
16 | + private String score ; | ||
17 | + @ApiModelProperty(value="人数") | ||
18 | + private int number ; | ||
19 | + | ||
20 | + public String getScore() { | ||
21 | + return score; | ||
22 | + } | ||
23 | + | ||
24 | + public void setScore(String score) { | ||
25 | + this.score = score; | ||
26 | + } | ||
27 | + | ||
28 | + public int getNumber() { | ||
29 | + return number; | ||
30 | + } | ||
31 | + | ||
32 | + public void setNumber(int number) { | ||
33 | + this.number = number; | ||
34 | + } | ||
35 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Table2.java
0 → 100644
@@ -0,0 +1,55 @@ | @@ -0,0 +1,55 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.io.Serializable; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/11/5 0005 8:27 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class Table2 implements Serializable { | ||
15 | + @ApiModelProperty(value = "知识点") | ||
16 | + private String knowledge ; | ||
17 | + @ApiModelProperty(value = "得分率") | ||
18 | + private Double schoolRate ; | ||
19 | + @ApiModelProperty(value = "考频") | ||
20 | + private String rate ; | ||
21 | + @ApiModelProperty(value = "平均分") | ||
22 | + private String avg ; | ||
23 | + | ||
24 | + public String getKnowledge() { | ||
25 | + return knowledge; | ||
26 | + } | ||
27 | + | ||
28 | + public void setKnowledge(String knowledge) { | ||
29 | + this.knowledge = knowledge; | ||
30 | + } | ||
31 | + | ||
32 | + public Double getSchoolRate() { | ||
33 | + return schoolRate; | ||
34 | + } | ||
35 | + | ||
36 | + public void setSchoolRate(Double schoolRate) { | ||
37 | + this.schoolRate = schoolRate; | ||
38 | + } | ||
39 | + | ||
40 | + public String getRate() { | ||
41 | + return rate; | ||
42 | + } | ||
43 | + | ||
44 | + public void setRate(String rate) { | ||
45 | + this.rate = rate; | ||
46 | + } | ||
47 | + | ||
48 | + public String getAvg() { | ||
49 | + return avg; | ||
50 | + } | ||
51 | + | ||
52 | + public void setAvg(String avg) { | ||
53 | + this.avg = avg; | ||
54 | + } | ||
55 | +} |
cloud/common/src/main/java/com/sincere/common/vo/independence/school/Table2RepVO.java
0 → 100644
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +package com.sincere.common.vo.independence.school; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/11/5 0005 8:39 | ||
11 | + */ | ||
12 | +public class Table2RepVO extends BaseVo { | ||
13 | + | ||
14 | + private List<Table2> data ; | ||
15 | + | ||
16 | + public List<Table2> getData() { | ||
17 | + return data; | ||
18 | + } | ||
19 | + | ||
20 | + public void setData(List<Table2> data) { | ||
21 | + this.data = data; | ||
22 | + } | ||
23 | +} |
@@ -0,0 +1,181 @@ | @@ -0,0 +1,181 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
5 | + <parent> | ||
6 | + <artifactId>cloud</artifactId> | ||
7 | + <groupId>com.sincere</groupId> | ||
8 | + <version>1.0.0</version> | ||
9 | + </parent> | ||
10 | + <modelVersion>4.0.0</modelVersion> | ||
11 | + | ||
12 | + <artifactId>independence</artifactId> | ||
13 | + | ||
14 | + <dependencies> | ||
15 | + <dependency> | ||
16 | + <groupId>com.sincere</groupId> | ||
17 | + <artifactId>common</artifactId> | ||
18 | + <version>0.0.1-SNAPSHOT</version> | ||
19 | + </dependency> | ||
20 | + <dependency> | ||
21 | + <groupId>com.googlecode.rapid-framework</groupId> | ||
22 | + <artifactId>rapid-core</artifactId> | ||
23 | + <version>4.0.5</version> | ||
24 | + </dependency> | ||
25 | + <dependency> | ||
26 | + <groupId>org.apache.commons</groupId> | ||
27 | + <artifactId>commons-lang3</artifactId> | ||
28 | + <version>3.3.2</version> | ||
29 | + </dependency> | ||
30 | + <dependency> | ||
31 | + <groupId>org.springframework.boot</groupId> | ||
32 | + <artifactId>spring-boot-starter-test</artifactId> | ||
33 | + <scope>test</scope> | ||
34 | + </dependency> | ||
35 | + <dependency> | ||
36 | + <groupId>org.springframework.cloud</groupId> | ||
37 | + <artifactId>spring-cloud-starter-feign</artifactId> | ||
38 | + <version>1.3.6.RELEASE</version> | ||
39 | + </dependency> | ||
40 | + <dependency> | ||
41 | + <groupId>org.springframework.cloud</groupId> | ||
42 | + <artifactId>spring-cloud-openfeign-core</artifactId> | ||
43 | + <version>2.1.2.RELEASE</version> | ||
44 | + </dependency> | ||
45 | + <dependency> | ||
46 | + <groupId>io.springfox</groupId> | ||
47 | + <artifactId>springfox-swagger2</artifactId> | ||
48 | + <version>2.5.0</version> | ||
49 | + </dependency> | ||
50 | + <dependency> | ||
51 | + <groupId>io.springfox</groupId> | ||
52 | + <artifactId>springfox-swagger-ui</artifactId> | ||
53 | + <version>2.5.0</version> | ||
54 | + </dependency> | ||
55 | + <!--只有slf4j-api依赖--> | ||
56 | + <dependency> | ||
57 | + <groupId>org.slf4j</groupId> | ||
58 | + <artifactId>slf4j-api</artifactId> | ||
59 | + <version>1.7.13</version> | ||
60 | + </dependency> | ||
61 | + | ||
62 | + <!-- https://mvnrepository.com/artifact/commons-net/commons-net --> | ||
63 | + <dependency> | ||
64 | + <groupId>commons-net</groupId> | ||
65 | + <artifactId>commons-net</artifactId> | ||
66 | + <version>2.0</version> | ||
67 | + </dependency> | ||
68 | + <dependency> | ||
69 | + <groupId>org.apache.poi</groupId> | ||
70 | + <artifactId>poi</artifactId> | ||
71 | + <version>4.1.0</version> | ||
72 | + </dependency> | ||
73 | + | ||
74 | + <dependency> | ||
75 | + <groupId>org.apache.poi</groupId> | ||
76 | + <artifactId>poi-ooxml</artifactId> | ||
77 | + <version>4.1.0</version> | ||
78 | + </dependency> | ||
79 | + <dependency> | ||
80 | + <groupId>com.fasterxml.jackson.core</groupId> | ||
81 | + <artifactId>jackson-core</artifactId> | ||
82 | + <version>2.6.5</version> | ||
83 | + </dependency> | ||
84 | + <dependency> | ||
85 | + <groupId>com.fasterxml.jackson.core</groupId> | ||
86 | + <artifactId>jackson-databind</artifactId> | ||
87 | + <version>2.6.5</version> | ||
88 | + </dependency> | ||
89 | + <dependency> | ||
90 | + <groupId>com.fasterxml.jackson.core</groupId> | ||
91 | + <artifactId>jackson-annotations</artifactId> | ||
92 | + <version>2.6.5</version> | ||
93 | + </dependency> | ||
94 | + </dependencies> | ||
95 | + | ||
96 | + <build> | ||
97 | + <!--打包文件名--> | ||
98 | + <finalName>independence</finalName> | ||
99 | + <!--打包方式--> | ||
100 | + <plugins> | ||
101 | + <!-- 设置编译版本 --> | ||
102 | + <plugin> | ||
103 | + <groupId>org.apache.maven.plugins</groupId> | ||
104 | + <artifactId>maven-compiler-plugin</artifactId> | ||
105 | + <version>3.1</version> | ||
106 | + <configuration> | ||
107 | + <source>1.8</source> | ||
108 | + <target>1.8</target> | ||
109 | + <encoding>UTF-8</encoding> | ||
110 | + </configuration> | ||
111 | + </plugin> | ||
112 | + <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 --> | ||
113 | + <!-- 本地启动需要注释--> | ||
114 | + <plugin> | ||
115 | + <groupId>org.apache.maven.plugins</groupId> | ||
116 | + <artifactId>maven-jar-plugin</artifactId> | ||
117 | + <configuration> | ||
118 | + <archive> | ||
119 | + <manifest> | ||
120 | + <mainClass>com.jevon.Application</mainClass> | ||
121 | + <addClasspath>true</addClasspath> | ||
122 | + <classpathPrefix>lib/</classpathPrefix> | ||
123 | + </manifest> | ||
124 | + <manifestEntries> | ||
125 | + <Class-Path>./config/</Class-Path> | ||
126 | + </manifestEntries> | ||
127 | + </archive> | ||
128 | + <excludes> | ||
129 | + <exclude>config/**</exclude> | ||
130 | + </excludes> | ||
131 | + <classesDirectory></classesDirectory> | ||
132 | + </configuration> | ||
133 | + </plugin> | ||
134 | + <!-- 拷贝依赖的jar包到lib目录 --> | ||
135 | + <plugin> | ||
136 | + <groupId>org.apache.maven.plugins</groupId> | ||
137 | + <artifactId>maven-dependency-plugin</artifactId> | ||
138 | + <executions> | ||
139 | + <execution> | ||
140 | + <id>copy</id> | ||
141 | + <phase>package</phase> | ||
142 | + <goals> | ||
143 | + <goal>copy-dependencies</goal> | ||
144 | + </goals> | ||
145 | + <configuration> | ||
146 | + <outputDirectory> | ||
147 | + ${project.build.directory}/lib | ||
148 | + </outputDirectory> | ||
149 | + </configuration> | ||
150 | + </execution> | ||
151 | + </executions> | ||
152 | + </plugin> | ||
153 | + <!-- 解决资源文件的编码问题 --> | ||
154 | + <plugin> | ||
155 | + <groupId>org.apache.maven.plugins</groupId> | ||
156 | + <artifactId>maven-resources-plugin</artifactId> | ||
157 | + <version>2.5</version> | ||
158 | + <configuration> | ||
159 | + <encoding>UTF-8</encoding> | ||
160 | + </configuration> | ||
161 | + </plugin> | ||
162 | + <!-- 打包source文件为jar文件 --> | ||
163 | + <plugin> | ||
164 | + <artifactId>maven-source-plugin</artifactId> | ||
165 | + <version>2.2</version> | ||
166 | + <configuration> | ||
167 | + <attach>true</attach> | ||
168 | + </configuration> | ||
169 | + <executions> | ||
170 | + <execution> | ||
171 | + <phase>compile</phase> | ||
172 | + <goals> | ||
173 | + <goal>jar</goal> | ||
174 | + </goals> | ||
175 | + </execution> | ||
176 | + </executions> | ||
177 | + </plugin> | ||
178 | + </plugins> | ||
179 | + </build> | ||
180 | + | ||
181 | +</project> | ||
0 | \ No newline at end of file | 182 | \ No newline at end of file |
cloud/independence/src/main/java/com/sincere/independence/IndependenceApplication.java
0 → 100644
@@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
1 | +package com.sincere.independence; | ||
2 | + | ||
3 | +import org.springframework.boot.SpringApplication; | ||
4 | +import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
5 | +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; | ||
6 | +import org.springframework.cloud.openfeign.EnableFeignClients; | ||
7 | + | ||
8 | +@EnableFeignClients(basePackages = "com.sincere.independence.feign") | ||
9 | +@EnableEurekaClient | ||
10 | +@SpringBootApplication | ||
11 | +public class IndependenceApplication { | ||
12 | + | ||
13 | + | ||
14 | + public static void main(String[] args) { | ||
15 | + SpringApplication.run(IndependenceApplication.class, args); | ||
16 | + } | ||
17 | + | ||
18 | +} |
cloud/independence/src/main/java/com/sincere/independence/Swagger2.java
0 → 100644
@@ -0,0 +1,38 @@ | @@ -0,0 +1,38 @@ | ||
1 | +package com.sincere.independence; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiOperation; | ||
4 | +import org.springframework.context.annotation.Bean; | ||
5 | +import org.springframework.context.annotation.Configuration; | ||
6 | +import springfox.documentation.builders.ApiInfoBuilder; | ||
7 | +import springfox.documentation.builders.PathSelectors; | ||
8 | +import springfox.documentation.builders.RequestHandlerSelectors; | ||
9 | +import springfox.documentation.service.ApiInfo; | ||
10 | +import springfox.documentation.spi.DocumentationType; | ||
11 | +import springfox.documentation.spring.web.plugins.Docket; | ||
12 | +import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
13 | + | ||
14 | +@EnableSwagger2 | ||
15 | +@Configuration //让Spring来加载该类配置 | ||
16 | +public class Swagger2 { | ||
17 | + | ||
18 | + @Bean | ||
19 | + public Docket createRestApi() { | ||
20 | + return new Docket(DocumentationType.SWAGGER_2) | ||
21 | + .apiInfo(apiInfo()) | ||
22 | + .enableUrlTemplating(true) | ||
23 | + .select() | ||
24 | + // 扫描所有有注解的api,用这种方式更灵活 | ||
25 | + .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) | ||
26 | + .paths(PathSelectors.any()) | ||
27 | + .build(); | ||
28 | + | ||
29 | + } | ||
30 | + private ApiInfo apiInfo() { | ||
31 | + return new ApiInfoBuilder() | ||
32 | + .title("Spring Boot中使用Swagger2构建RESTful APIs") | ||
33 | + .description("接口文档") | ||
34 | + .termsOfServiceUrl("") | ||
35 | + .version("1.0") | ||
36 | + .build(); | ||
37 | + } | ||
38 | +} |
cloud/independence/src/main/java/com/sincere/independence/controller/LearnController.java
0 → 100644
@@ -0,0 +1,444 @@ | @@ -0,0 +1,444 @@ | ||
1 | +package com.sincere.independence.controller; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.*; | ||
4 | +import com.sincere.common.enums.DifficultEnums; | ||
5 | +import com.sincere.common.enums.DimensionalEnums; | ||
6 | +import com.sincere.common.util.RedisUtils; | ||
7 | +import com.sincere.common.vo.BaseVo; | ||
8 | +import com.sincere.independence.feign.LearnFeign; | ||
9 | +import com.sincere.independence.vo.*; | ||
10 | +import com.sincere.independence.vo.excel.ExamExcelVo; | ||
11 | +import com.sincere.independence.vo.excel.ScoreExcelVo; | ||
12 | +import io.swagger.annotations.Api; | ||
13 | +import io.swagger.annotations.ApiOperation; | ||
14 | +import org.apache.commons.lang3.StringUtils; | ||
15 | +import org.apache.poi.hssf.usermodel.HSSFWorkbook; | ||
16 | +import org.apache.poi.ss.usermodel.*; | ||
17 | +import org.apache.poi.xssf.usermodel.XSSFWorkbook; | ||
18 | +import org.springframework.beans.factory.annotation.Autowired; | ||
19 | +import org.springframework.web.bind.annotation.*; | ||
20 | +import org.springframework.web.multipart.MultipartFile; | ||
21 | + | ||
22 | +import java.io.File; | ||
23 | +import java.io.FileInputStream; | ||
24 | +import java.io.InputStream; | ||
25 | +import java.util.*; | ||
26 | + | ||
27 | +/** | ||
28 | + * @author chen | ||
29 | + * @version 1.0 | ||
30 | + * @date 2019/10/17 0017 13:33 | ||
31 | + */ | ||
32 | +@RestController | ||
33 | +@RequestMapping(value = "/learn") | ||
34 | +@Api(value = "学情分析") | ||
35 | +public class LearnController { | ||
36 | + | ||
37 | + @Autowired | ||
38 | + LearnFeign learnFeign ; | ||
39 | + | ||
40 | + @ApiOperation("获取列表") | ||
41 | + @RequestMapping(value = "getList", method = RequestMethod.POST) | ||
42 | + public List<AnalyseDto> getList(){ | ||
43 | + return learnFeign.getList(new AnalyseDto()); | ||
44 | + } | ||
45 | + | ||
46 | + @ApiOperation("获取详情,微信入口") | ||
47 | + @RequestMapping(value = "getDetail", method = RequestMethod.GET) | ||
48 | + public List<AnalyseDto> getAnalyseId(String grade , String schoolName){ | ||
49 | + List<AnalyseDto> result = new ArrayList<>(); | ||
50 | + AnalyseDto search = new AnalyseDto(); | ||
51 | + String[] msg = grade.split(","); | ||
52 | + for(String gradeMsg : msg){ | ||
53 | + search.setGrade(initGrade(gradeMsg,schoolName)); | ||
54 | + List<AnalyseDto> analyseList = learnFeign.getList(search); | ||
55 | + if(analyseList != null && analyseList.size() > 0){ | ||
56 | + for(AnalyseDto analyse :analyseList){ | ||
57 | + List<LeagueDto> leagues = learnFeign.getLeagueByAnalyse(analyse.getId()); | ||
58 | + for(LeagueDto league : leagues){ | ||
59 | + if(league.getSchoolName() != null && league.getSchoolName().equals(schoolName)){ | ||
60 | + result.add(analyse); | ||
61 | + break; | ||
62 | + } | ||
63 | + } | ||
64 | + } | ||
65 | + } | ||
66 | + } | ||
67 | + if(result.size() == 0){ | ||
68 | + AnalyseDto searchAnalyse = new AnalyseDto(); | ||
69 | + searchAnalyse.setExamName("顺治中学模拟考试"); | ||
70 | + List<AnalyseDto> analyseList = learnFeign.getList(searchAnalyse); | ||
71 | + if(analyseList != null && analyseList.size() > 0){ | ||
72 | + result.add(analyseList.get(0)); | ||
73 | + } | ||
74 | + } | ||
75 | + return result ; | ||
76 | + } | ||
77 | + | ||
78 | + private String initGrade(String grade , String schoolName){ | ||
79 | + String result = null ; | ||
80 | + if(schoolName.equals("绍兴市越城区皋埠中学")){ | ||
81 | + if(grade.equals("2019级初中一年级")){ | ||
82 | + result = "七年级" ; | ||
83 | + } | ||
84 | + if(grade.equals("2017级初中三年级")){ | ||
85 | + result = "九年级" ; | ||
86 | + } | ||
87 | + } | ||
88 | + if(schoolName.equals("绍兴市建功中学")){ | ||
89 | + if(grade.equals("2019级初中一年级")){ | ||
90 | + result = "七年级" ; | ||
91 | + } | ||
92 | + if(grade.equals("2017级初中三年级")){ | ||
93 | + result = "九年级" ; | ||
94 | + } | ||
95 | + } | ||
96 | + if(schoolName.equals("绍兴长城中学")){ | ||
97 | + if(grade.equals("2019级初中一年级")){ | ||
98 | + result = "七年级" ; | ||
99 | + } | ||
100 | + if(grade.equals("2017级初中三年级")){ | ||
101 | + result = "九年级" ; | ||
102 | + } | ||
103 | + } | ||
104 | + if(schoolName.equals("绍兴市文澜中学")){ | ||
105 | + if(grade.equals("2019级初中一年级")){ | ||
106 | + result = "七年级" ; | ||
107 | + } | ||
108 | + if(grade.equals("2017级初中三年级")){ | ||
109 | + result = "九年级" ; | ||
110 | + } | ||
111 | + } | ||
112 | + if(schoolName.equals("绍兴文理学院附属中学(慧)")){ | ||
113 | + if(grade.equals("2019级初中一年级")){ | ||
114 | + result = "七年级" ; | ||
115 | + } | ||
116 | + if(grade.equals("2017级初中三年级")){ | ||
117 | + result = "九年级" ; | ||
118 | + } | ||
119 | + } | ||
120 | + if(result == null){ | ||
121 | + result = grade ; | ||
122 | + } | ||
123 | + return result ; | ||
124 | + } | ||
125 | + | ||
126 | + @ApiOperation("创建考试") | ||
127 | + @RequestMapping(value = "createExam", method = RequestMethod.POST) | ||
128 | + public BaseVo createExam(@RequestBody CreateExamReqVo createExamReqVo){ | ||
129 | + AnalyseDto analyse = new AnalyseDto(); | ||
130 | + analyse.setCourseName(createExamReqVo.getCourseName()); | ||
131 | + analyse.setExamName(createExamReqVo.getExamName()); | ||
132 | + analyse.setExamTime(createExamReqVo.getExamTime()); | ||
133 | + analyse.setCreateTime(new Date()); | ||
134 | + analyse.setGrade(createExamReqVo.getGrade()); | ||
135 | + return learnFeign.insertAnalyse(analyse); | ||
136 | + } | ||
137 | + | ||
138 | + @ApiOperation("更新考试信息") | ||
139 | + @RequestMapping(value = "updateExam", method = RequestMethod.POST) | ||
140 | + public BaseVo updateExam(@RequestBody UpdateExamReqVo updateExamReqVo){ | ||
141 | + BaseVo baseVo = new BaseVo(); | ||
142 | + AnalyseDto analyse = learnFeign.selectById(updateExamReqVo.getAnalyseId()); | ||
143 | + if(analyse == null){ | ||
144 | + baseVo.setMessage("考试不存在"); | ||
145 | + baseVo.setSuccess(false); | ||
146 | + return baseVo; | ||
147 | + } | ||
148 | + analyse.setExamTime(updateExamReqVo.getExamTime()); | ||
149 | + analyse.setExamName(updateExamReqVo.getExamName()); | ||
150 | + analyse.setCourseName(updateExamReqVo.getCourseName()); | ||
151 | + analyse.setGrade(updateExamReqVo.getGrade()); | ||
152 | + return learnFeign.updateAnalyse(analyse); | ||
153 | + } | ||
154 | + | ||
155 | + @ApiOperation("试卷信息导入") | ||
156 | + @RequestMapping(value = "initAnalyse", method = RequestMethod.POST) | ||
157 | + public BaseVo initAnalyse(@RequestBody InitAnalyseReqVo initAnalyseReqVo){ | ||
158 | + BaseVo baseVo = new BaseVo(); | ||
159 | + AnalyseDto analyse = learnFeign.selectById(initAnalyseReqVo.getAnalyseId()); | ||
160 | + List<AnalyseDetailDto> analyseDetails = learnFeign.isImportExam(analyse.getId()); | ||
161 | + if(analyseDetails != null & analyseDetails.size() > 0){ | ||
162 | + baseVo.setMessage("已经导入"); | ||
163 | + baseVo.setSuccess(false); | ||
164 | + }else { | ||
165 | + RedisUtils.flushAll(); | ||
166 | + analysisExcel(initAnalyseReqVo); | ||
167 | + } | ||
168 | + return baseVo; | ||
169 | + } | ||
170 | + | ||
171 | + private void analysisExcel(InitAnalyseReqVo initAnalyseReqVo){ | ||
172 | + try{ | ||
173 | + List<AnalyseDetailDto> analyseDetails = new ArrayList<>(); | ||
174 | + List<AnalyseDimensionalDto> analyseDimensionals = new ArrayList<>(); | ||
175 | + Float maxScore = 0f; | ||
176 | + AnalyseDto analyse = learnFeign.selectById(initAnalyseReqVo.getAnalyseId()); | ||
177 | + File excelFile = new File(initAnalyseReqVo.getUrl()); | ||
178 | + // 获得工作簿 | ||
179 | + String file = excelFile.getName(); | ||
180 | + Workbook workbook = null; | ||
181 | + InputStream inputStream = new FileInputStream(excelFile) ; | ||
182 | + //InputStream inputStream = HttpClientUtils.GetFileInputStream(initAnalyseReqVo.getUrl()); | ||
183 | + if(inputStream == null){ | ||
184 | + return; | ||
185 | + } | ||
186 | + if (file.endsWith("xls")) { | ||
187 | + workbook = new HSSFWorkbook(inputStream); | ||
188 | + } else { | ||
189 | + workbook = new XSSFWorkbook(inputStream); | ||
190 | + } | ||
191 | + // 获得工作表 | ||
192 | + Sheet sheet = workbook.getSheetAt(0); | ||
193 | + Date date = new Date(); | ||
194 | + int rows = sheet.getPhysicalNumberOfRows(); | ||
195 | + for (int i = 0; i < rows; i++) { | ||
196 | + // 获取第i行数据 | ||
197 | + Row sheetRow = sheet.getRow(i); | ||
198 | + if (i == 0) { | ||
199 | + //获取标题 | ||
200 | + String title = sheetRow.getCell(0).getStringCellValue().trim(); | ||
201 | + }else if(i == 1){ | ||
202 | + //获取表头 | ||
203 | + } else { | ||
204 | + ExamExcelVo examExcelVo = new ExamExcelVo(sheetRow); | ||
205 | + if(examExcelVo.getScore() != null){ | ||
206 | + maxScore = maxScore + new Float(examExcelVo.getScore()); | ||
207 | + AnalyseDetailDto analyseDetail = new AnalyseDetailDto(); | ||
208 | + String questionNumber = null ; | ||
209 | + if(StringUtils.isNotBlank(examExcelVo.getQuestionSmallNumber())){ | ||
210 | + questionNumber = examExcelVo.getQuestionNumber()+"("+examExcelVo.getQuestionSmallNumber()+")"; | ||
211 | + }else { | ||
212 | + questionNumber = examExcelVo.getQuestionNumber() ; | ||
213 | + } | ||
214 | + analyseDetail.setQuestionNumber(questionNumber); | ||
215 | + analyseDetail.setAnalyseId(analyse.getId()); | ||
216 | + analyseDetail.setQuestionType(examExcelVo.getQuestionType()); | ||
217 | + analyseDetail.setDifficult(DifficultEnums.getDifficultType(examExcelVo.getDifficult())); | ||
218 | + analyseDetail.setScore(new Double(examExcelVo.getScore())); | ||
219 | + analyseDetail.setCreateTime(date); | ||
220 | + analyseDetails.add(analyseDetail); | ||
221 | + initAnalyseDimensional(analyse,questionNumber,examExcelVo.getScore(),examExcelVo.getKnowledge(), DimensionalEnums.knowledge.getDimensionalType(),analyseDimensionals); | ||
222 | + initAnalyseDimensional(analyse,questionNumber,examExcelVo.getScore(),examExcelVo.getAbility(),DimensionalEnums.ability.getDimensionalType(),analyseDimensionals); | ||
223 | + initAnalyseDimensional(analyse,questionNumber,examExcelVo.getScore(),examExcelVo.getSkill(),DimensionalEnums.skill.getDimensionalType(),analyseDimensionals); | ||
224 | + initAnalyseDimensional(analyse,questionNumber,examExcelVo.getScore(),examExcelVo.getThink(),DimensionalEnums.think.getDimensionalType(),analyseDimensionals); | ||
225 | + } | ||
226 | + } | ||
227 | + } | ||
228 | + learnFeign.insertBatchAnalyseDetail(analyseDetails); | ||
229 | + learnFeign.insertBatchAnalyseDimensional(analyseDimensionals); | ||
230 | + analyse.setMaxScore(new Double(maxScore)); | ||
231 | + learnFeign.updateAnalyse(analyse); | ||
232 | + }catch (Exception e){ | ||
233 | + e.printStackTrace(); | ||
234 | + } | ||
235 | + } | ||
236 | + | ||
237 | + private void initAnalyseDimensional(AnalyseDto analyse ,String questionNumber , String score , String dimensionalMessage , int dimensionalType , List<AnalyseDimensionalDto> analyseDimensionals){ | ||
238 | + if(StringUtils.isNotBlank(dimensionalMessage)){ | ||
239 | + String[] message =dimensionalMessage.split("、"); | ||
240 | + for (int j = 0; j < message.length ; j++) { | ||
241 | + if(StringUtils.isNotBlank(message[j])){ | ||
242 | + //查数据库是否已存在该四维诊断 不存在则导入 | ||
243 | + int dimensionalId = learnFeign.selectDimensional(dimensionalType,message[j]); | ||
244 | + AnalyseDimensionalDto analyseDimensional = new AnalyseDimensionalDto(); | ||
245 | + analyseDimensional.setAnalyseId(analyse.getId()); | ||
246 | + analyseDimensional.setDimensionalId(dimensionalId); | ||
247 | + analyseDimensional.setQuestionNumber(questionNumber); | ||
248 | + analyseDimensional.setScore(new Double(score)); | ||
249 | + analyseDimensional.setCreateTime(new Date()); | ||
250 | + analyseDimensionals.add(analyseDimensional); | ||
251 | + } | ||
252 | + } | ||
253 | + } | ||
254 | + } | ||
255 | + | ||
256 | + @ApiOperation("考生成绩导入") | ||
257 | + @RequestMapping(value = "initScore", method = RequestMethod.POST) | ||
258 | + public BaseVo initScore(@RequestBody InitScoreReqVo initScoreReqVo){ | ||
259 | + BaseVo baseVo = new BaseVo(); | ||
260 | + boolean success = analysisScoreExcel(initScoreReqVo); | ||
261 | + if(!success){ | ||
262 | + baseVo.setSuccess(false); | ||
263 | + baseVo.setMessage("一个学校不能在两个联盟下"); | ||
264 | + } | ||
265 | + return baseVo; | ||
266 | + } | ||
267 | + | ||
268 | + private boolean analysisScoreExcel(InitScoreReqVo initScoreReqVo){ | ||
269 | + try{ | ||
270 | + AnalyseDto analyse = learnFeign.selectById(initScoreReqVo.getAnalyseId()); | ||
271 | + List<AnalyseDetailDto> analyseDetails = learnFeign.isImportExam(analyse.getId()); | ||
272 | + Map<String , Double> scoreMap = new HashMap<>(); | ||
273 | + for(AnalyseDetailDto analyseDetail : analyseDetails){ | ||
274 | + scoreMap.put(analyseDetail.getQuestionNumber(),analyseDetail.getScore()); | ||
275 | + } | ||
276 | + File excelFile = new File(initScoreReqVo.getUrl()); | ||
277 | + // 获得工作簿 | ||
278 | + String file = excelFile.getName(); | ||
279 | + Workbook workbook = null; | ||
280 | + InputStream inputStream = new FileInputStream(excelFile) ; | ||
281 | + //InputStream inputStream = HttpClientUtils.GetFileInputStream(initScoreReqVo.getUrl()); | ||
282 | + if(inputStream == null){ | ||
283 | + return false ; | ||
284 | + } | ||
285 | + if (file.endsWith("xls")) { | ||
286 | + workbook = new HSSFWorkbook(inputStream); | ||
287 | + } else { | ||
288 | + workbook = new XSSFWorkbook(inputStream); | ||
289 | + } | ||
290 | + // 获得工作表 | ||
291 | + for(int number = 0 ; number < workbook.getNumberOfSheets() ; number++){ | ||
292 | + Sheet sheet = workbook.getSheetAt(number); | ||
293 | + List<StudentDetailDto> studentDetails = new ArrayList<>(); | ||
294 | + List<StudentDto> students = new ArrayList<>(); | ||
295 | + Date date = new Date(); | ||
296 | + int rows = sheet.getPhysicalNumberOfRows(); | ||
297 | + Map<Integer , String> map = new HashMap<>(); | ||
298 | + int column = 0 ; | ||
299 | + for (int i = 0; i < rows; i++) { | ||
300 | + // 获取第i行数据 | ||
301 | + Row sheetRow = sheet.getRow(i); | ||
302 | + if (i == 0) { | ||
303 | + //获取标题 | ||
304 | + }else if(i == 1){ | ||
305 | + //获取表头 | ||
306 | + int j = 7 ; | ||
307 | + while (sheetRow.getCell(j) != null){ | ||
308 | + Cell cell = sheetRow.getCell(j); | ||
309 | + cell.setCellType(CellType.STRING); | ||
310 | + map.put(j,cell.getStringCellValue().trim().replace("(","(").replace(")",")")); | ||
311 | + j++; | ||
312 | + } | ||
313 | + column = j ; | ||
314 | + } else { | ||
315 | + ScoreExcelVo scoreExcelVo = new ScoreExcelVo(sheetRow); | ||
316 | + if(StringUtils.isNotBlank(scoreExcelVo.getStudentName())){ | ||
317 | + StudentDto student = initStudent(scoreExcelVo); | ||
318 | + student.setAnalyseId(analyse.getId()); | ||
319 | + student.setCreateTime(date); | ||
320 | + students.add(student); | ||
321 | + for(int j = 7 ; j < column ; j++){ | ||
322 | + Cell cell = sheetRow.getCell(j); | ||
323 | + StudentDetailDto studentDetail = initStudentDetail(scoreExcelVo); | ||
324 | + studentDetail.setAnalyseId(analyse.getId()); | ||
325 | + studentDetail.setExamNumber(map.get(j)); | ||
326 | + studentDetail.setScore(new Double(cell.getNumericCellValue())); | ||
327 | + Double score = scoreMap.get((map.get(j))) ; | ||
328 | + Double studentScore = studentDetail.getScore() ; | ||
329 | + if(Double.doubleToLongBits(score) == Double.doubleToLongBits(studentScore) ){ | ||
330 | + studentDetail.setCorrect(1); | ||
331 | + }else { | ||
332 | + studentDetail.setCorrect(0); | ||
333 | + } | ||
334 | + studentDetail.setCreateTime(date); | ||
335 | + studentDetails.add(studentDetail); | ||
336 | + } | ||
337 | + } | ||
338 | + } | ||
339 | + } | ||
340 | + boolean flag = learnFeign.initLeagueSchool(initScoreReqVo.getLeagueId(),students.get(0).getSchoolName()); | ||
341 | + if(flag){ | ||
342 | + learnFeign.insertBatchStudent(students); | ||
343 | + learnFeign.insertBatchStudentDetail(studentDetails); | ||
344 | + return true ; | ||
345 | + }else { | ||
346 | + return false ; | ||
347 | + } | ||
348 | + } | ||
349 | + }catch (Exception e){ | ||
350 | + e.printStackTrace(); | ||
351 | + System.out.println(e.toString()); | ||
352 | + } | ||
353 | + return false ; | ||
354 | + } | ||
355 | + | ||
356 | + private StudentDto initStudent(ScoreExcelVo scoreExcelVo){ | ||
357 | + StudentDto studentDto = new StudentDto(); | ||
358 | + studentDto.setSchoolName(scoreExcelVo.getSchoolName()); | ||
359 | + studentDto.setClassName(scoreExcelVo.getClassName()); | ||
360 | + studentDto.setStudentName(scoreExcelVo.getStudentName()); | ||
361 | + studentDto.setStudentNumber(scoreExcelVo.getStudentNumber()); | ||
362 | + studentDto.setScore(new Double(scoreExcelVo.getScore())); | ||
363 | + return studentDto; | ||
364 | + } | ||
365 | + | ||
366 | + private StudentDetailDto initStudentDetail(ScoreExcelVo scoreExcelVo){ | ||
367 | + StudentDetailDto studentDetailDto = new StudentDetailDto(); | ||
368 | + studentDetailDto.setSchoolName(scoreExcelVo.getSchoolName()); | ||
369 | + studentDetailDto.setClassName(scoreExcelVo.getClassName()); | ||
370 | + studentDetailDto.setStudentName(scoreExcelVo.getStudentName()); | ||
371 | + studentDetailDto.setStudentNumber(scoreExcelVo.getStudentNumber()); | ||
372 | + return studentDetailDto ; | ||
373 | + } | ||
374 | + | ||
375 | + @ApiOperation("获取该次考试联盟学校信息") | ||
376 | + @RequestMapping(value = "getLeague", method = RequestMethod.GET) | ||
377 | + public GetLeagueRepVo getLeague(int analyseId){ | ||
378 | + GetLeagueRepVo getLeagueRepVo = new GetLeagueRepVo(); | ||
379 | + List<LeagueDto> leagues = learnFeign.getLeagueByAnalyse(analyseId); | ||
380 | + List<GetLeague> getLeagues = new ArrayList<>(); | ||
381 | + for(LeagueDto league : leagues){ | ||
382 | + boolean isExist = false ; | ||
383 | + for(GetLeague getLeague : getLeagues){ | ||
384 | + if(getLeague.getLeagueName().equals(league.getLeague())){ | ||
385 | + isExist = true ; | ||
386 | + List<LeagueDto> list = getLeague.getLeagues(); | ||
387 | + list.add(league); | ||
388 | + getLeague.setLeagues(list); | ||
389 | + } | ||
390 | + } | ||
391 | + if(!isExist){ | ||
392 | + GetLeague getLeague = new GetLeague(); | ||
393 | + getLeague.setLeagueName(league.getLeague()); | ||
394 | + List<LeagueDto> list = new ArrayList<>(); | ||
395 | + list.add(league); | ||
396 | + getLeague.setLeagues(list); | ||
397 | + getLeagues.add(getLeague); | ||
398 | + } | ||
399 | + } | ||
400 | + getLeagueRepVo.setData(getLeagues); | ||
401 | + return getLeagueRepVo; | ||
402 | + } | ||
403 | + | ||
404 | + @ApiOperation("创建联盟") | ||
405 | + @RequestMapping(value = "createLeague", method = RequestMethod.POST) | ||
406 | + public BaseVo createLeague(@RequestBody CreateLeagueReqVo createLeagueReqVo){ | ||
407 | + BaseVo baseVo = new BaseVo(); | ||
408 | + LeagueDto league = new LeagueDto(); | ||
409 | + AnalyseDto analyse = learnFeign.selectById(createLeagueReqVo.getAnalyseId()); | ||
410 | + league.setAnalyseId(analyse.getId()); | ||
411 | + league.setLeague(createLeagueReqVo.getLeague()); | ||
412 | + int id = learnFeign.insertLeague(league); | ||
413 | + baseVo.setMessage(id +""); | ||
414 | + return baseVo; | ||
415 | + } | ||
416 | + | ||
417 | + @ApiOperation("基础信息输入") | ||
418 | + @RequestMapping(value = "createChapter", method = RequestMethod.POST) | ||
419 | + public BaseVo createChapter(@RequestBody ChapterReqVo chapterReqVo){ | ||
420 | + BaseVo baseVo = new BaseVo(); | ||
421 | + AnalyseDto analyseDto = new AnalyseDto(); | ||
422 | + analyseDto.setId(chapterReqVo.getAnalyseId()); | ||
423 | + analyseDto.setExamTime(chapterReqVo.getExamTime()); | ||
424 | + analyseDto.setExamScope(chapterReqVo.getExamScope()); | ||
425 | + learnFeign.updateAnalyse(analyseDto); | ||
426 | + List<ChapterDto> list = new ArrayList<>(); | ||
427 | + for(ChapterReq chapterReq :chapterReqVo.getList()){ | ||
428 | + ChapterDto chapter = new ChapterDto(); | ||
429 | + chapter.setAnalyseId(chapterReqVo.getAnalyseId()); | ||
430 | + chapter.setChapterNumber(chapterReq.getChapterNumber()); | ||
431 | + chapter.setChapterName(chapterReq.getChapterName()); | ||
432 | + chapter.setChapterScore(chapterReq.getScore()); | ||
433 | + list.add(chapter); | ||
434 | + } | ||
435 | + learnFeign.initChapter(list); | ||
436 | + return baseVo; | ||
437 | + } | ||
438 | + | ||
439 | + @ApiOperation("获取导入的学校列表") | ||
440 | + @RequestMapping(value = "getSchoolName", method = RequestMethod.GET) | ||
441 | + public List<String> getSchoolName(int analyseId){ | ||
442 | + return learnFeign.getSchoolName(analyseId); | ||
443 | + } | ||
444 | +} |
cloud/independence/src/main/java/com/sincere/independence/controller/LearnStatController.java
0 → 100644
@@ -0,0 +1,132 @@ | @@ -0,0 +1,132 @@ | ||
1 | +package com.sincere.independence.controller; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.GetLearnDto; | ||
4 | +import com.sincere.common.vo.independence.school.*; | ||
5 | +import com.sincere.independence.feign.LearnFeign; | ||
6 | +import io.swagger.annotations.Api; | ||
7 | +import io.swagger.annotations.ApiOperation; | ||
8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
9 | +import org.springframework.web.bind.annotation.RequestBody; | ||
10 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
11 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
12 | +import org.springframework.web.bind.annotation.RestController; | ||
13 | + | ||
14 | +import java.util.List; | ||
15 | +import java.util.Map; | ||
16 | + | ||
17 | +/** | ||
18 | + * @author chen | ||
19 | + * @version 1.0 | ||
20 | + * @date 2019/10/18 0018 15:54 | ||
21 | + */ | ||
22 | +@RestController | ||
23 | +@RequestMapping(value = "/getLearn") | ||
24 | +@Api(value = "学情分析") | ||
25 | +public class LearnStatController { | ||
26 | + @Autowired | ||
27 | + LearnFeign learnFeign ; | ||
28 | + | ||
29 | + | ||
30 | + @ApiOperation("getForm1_1") | ||
31 | + @RequestMapping(value = "getForm1_1", method = RequestMethod.POST) | ||
32 | + public Form7RepVO getForm1_1(@RequestBody GetLearnDto getLearnDto){ | ||
33 | + return learnFeign.getForm1_1(getLearnDto); | ||
34 | + } | ||
35 | + | ||
36 | + @ApiOperation("getForm2_1_1") | ||
37 | + @RequestMapping(value = "getForm2_1_1", method = RequestMethod.POST) | ||
38 | + public Form1RepVO getForm2_1_1(@RequestBody GetLearnDto getLearnDto){ | ||
39 | + return learnFeign.getForm2_1_1(getLearnDto); | ||
40 | + } | ||
41 | + | ||
42 | + @ApiOperation("getForm2_1_2") | ||
43 | + @RequestMapping(value = "getForm2_1_2", method = RequestMethod.POST) | ||
44 | + public Form2RepVO getForm2_1_2(@RequestBody GetLearnDto getLearnDto){ | ||
45 | + return learnFeign.getForm2_1_2(getLearnDto); | ||
46 | + } | ||
47 | + | ||
48 | + @ApiOperation("getForm2_1_3_2") | ||
49 | + @RequestMapping(value = "getForm2_1_3_2", method = RequestMethod.POST) | ||
50 | + public Form2RepVO getForm2_1_3_2(@RequestBody GetLearnDto getLearnDto){ | ||
51 | + return learnFeign.getForm2_1_3_2(getLearnDto); | ||
52 | + } | ||
53 | + | ||
54 | + @ApiOperation("getForm2_1_3") | ||
55 | + @RequestMapping(value = "getForm2_1_3", method = RequestMethod.POST) | ||
56 | + public List<Table1> getForm2_1_3(@RequestBody GetLearnDto getLearnDto){ | ||
57 | + return learnFeign.getForm2_1_3(getLearnDto); | ||
58 | + } | ||
59 | + | ||
60 | + @ApiOperation("getForm2_2_1") | ||
61 | + @RequestMapping(value = "getForm2_2_1", method = RequestMethod.POST) | ||
62 | + public Form3RepVO getForm2_2_1(@RequestBody GetLearnDto getLearnDto){ | ||
63 | + return learnFeign.getForm2_2_1(getLearnDto); | ||
64 | + } | ||
65 | + | ||
66 | + @ApiOperation("getForm2_2_2") | ||
67 | + @RequestMapping(value = "getForm2_2_2", method = RequestMethod.POST) | ||
68 | + public Form4RepVO getForm2_2_2(@RequestBody GetLearnDto getLearnDto){ | ||
69 | + return learnFeign.getForm2_2_2(getLearnDto); | ||
70 | + } | ||
71 | + | ||
72 | + @ApiOperation("getForm2_2_3") | ||
73 | + @RequestMapping(value = "getForm2_2_3", method = RequestMethod.POST) | ||
74 | + public Form5RepVO getForm2_2_3(@RequestBody GetLearnDto getLearnDto){ | ||
75 | + return learnFeign.getForm2_2_3(getLearnDto); | ||
76 | + } | ||
77 | + | ||
78 | + @ApiOperation("getForm2_2_4") | ||
79 | + @RequestMapping(value = "getForm2_2_4", method = RequestMethod.POST) | ||
80 | + public Form8RepVO getForm2_2_4(@RequestBody GetLearnDto getLearnDto){ | ||
81 | + return learnFeign.getForm2_2_4(getLearnDto); | ||
82 | + } | ||
83 | + | ||
84 | + @ApiOperation("getForm2_2_5") | ||
85 | + @RequestMapping(value = "getForm2_2_5", method = RequestMethod.POST) | ||
86 | + public Map<String,Double> getForm2_2_5(@RequestBody GetLearnDto getLearnDto){ | ||
87 | + return learnFeign.getForm2_2_5(getLearnDto); | ||
88 | + } | ||
89 | + | ||
90 | + @ApiOperation("getForm3_1") | ||
91 | + @RequestMapping(value = "getForm3_1", method = RequestMethod.POST) | ||
92 | + public Form6RepVO getForm3_1(@RequestBody GetLearnDto getLearnDto){ | ||
93 | + return learnFeign.getForm3_1(getLearnDto); | ||
94 | + } | ||
95 | + | ||
96 | + @ApiOperation("getForm3_1_1") | ||
97 | + @RequestMapping(value = "getForm3_1_1", method = RequestMethod.POST) | ||
98 | + public Table2RepVO getForm3_1_1(@RequestBody GetLearnDto getLearnDto){ | ||
99 | + return learnFeign.getForm3_1_1(getLearnDto); | ||
100 | + } | ||
101 | + | ||
102 | + @ApiOperation("getForm3_2") | ||
103 | + @RequestMapping(value = "getForm3_2", method = RequestMethod.POST) | ||
104 | + public Form6RepVO getForm3_2(@RequestBody GetLearnDto getLearnDto){ | ||
105 | + return learnFeign.getForm3_2(getLearnDto); | ||
106 | + } | ||
107 | + | ||
108 | + @ApiOperation("getForm3_3") | ||
109 | + @RequestMapping(value = "getForm3_3", method = RequestMethod.POST) | ||
110 | + public Form6RepVO getForm3_3(@RequestBody GetLearnDto getLearnDto){ | ||
111 | + return learnFeign.getForm3_3(getLearnDto); | ||
112 | + } | ||
113 | + | ||
114 | + @ApiOperation("getForm3_4") | ||
115 | + @RequestMapping(value = "getForm3_4", method = RequestMethod.POST) | ||
116 | + public Form6RepVO getForm3_4(@RequestBody GetLearnDto getLearnDto){ | ||
117 | + return learnFeign.getForm3_4(getLearnDto); | ||
118 | + } | ||
119 | + | ||
120 | + @ApiOperation("获取教学改进建议") | ||
121 | + @RequestMapping(value = "getSuggest", method = RequestMethod.POST) | ||
122 | + public String getSuggest(@RequestBody GetLearnDto getLearnDto){ | ||
123 | + return learnFeign.getSuggest(getLearnDto); | ||
124 | + } | ||
125 | + | ||
126 | + @ApiOperation("获取教学改进建议") | ||
127 | + @RequestMapping(value = "getSuggest2", method = RequestMethod.POST) | ||
128 | + public String getSuggest2(@RequestBody GetLearnDto getLearnDto){ | ||
129 | + return learnFeign.getSuggest2(getLearnDto); | ||
130 | + } | ||
131 | + | ||
132 | +} |
cloud/independence/src/main/java/com/sincere/independence/feign/LearnFeign.java
0 → 100644
@@ -0,0 +1,121 @@ | @@ -0,0 +1,121 @@ | ||
1 | +package com.sincere.independence.feign; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.*; | ||
4 | +import com.sincere.common.vo.BaseVo; | ||
5 | +import com.sincere.common.vo.independence.school.*; | ||
6 | +import org.springframework.cloud.openfeign.FeignClient; | ||
7 | +import org.springframework.web.bind.annotation.RequestBody; | ||
8 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
9 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
10 | +import org.springframework.web.bind.annotation.RequestParam; | ||
11 | + | ||
12 | +import java.util.List; | ||
13 | +import java.util.Map; | ||
14 | + | ||
15 | +/** | ||
16 | + * @author chen | ||
17 | + * @version 1.0 | ||
18 | + * @date 2019/11/13 0013 11:32 | ||
19 | + */ | ||
20 | +@FeignClient("independenceSearch") | ||
21 | +public interface LearnFeign { | ||
22 | + | ||
23 | + @RequestMapping(value = "/learn/init/getList", method = RequestMethod.POST) | ||
24 | + List<AnalyseDto> getList(@RequestBody AnalyseDto analyseDto); | ||
25 | + | ||
26 | + @RequestMapping(value = "/learn/init/insertAnalyse", method = RequestMethod.POST) | ||
27 | + BaseVo insertAnalyse(@RequestBody AnalyseDto analyseDto); | ||
28 | + | ||
29 | + @RequestMapping(value = "/learn/init/updateAnalyse", method = RequestMethod.POST) | ||
30 | + BaseVo updateAnalyse(@RequestBody AnalyseDto analyseDto); | ||
31 | + | ||
32 | + @RequestMapping(value = "/learn/init/selectById", method = RequestMethod.GET) | ||
33 | + AnalyseDto selectById(@RequestParam("analyseId") int analyseId) ; | ||
34 | + | ||
35 | + @RequestMapping(value = "/learn/init/getLeagueByAnalyse", method = RequestMethod.GET) | ||
36 | + List<LeagueDto> getLeagueByAnalyse(@RequestParam("analyseId") int analyseId); | ||
37 | + | ||
38 | + @RequestMapping(value = "/learn/init/isImportExam", method = RequestMethod.GET) | ||
39 | + List<AnalyseDetailDto> isImportExam(@RequestParam("analyseId") int analyseId); | ||
40 | + | ||
41 | + @RequestMapping(value = "/learn/init/insertBatchAnalyseDetail", method = RequestMethod.POST) | ||
42 | + boolean insertBatchAnalyseDetail(@RequestBody List<AnalyseDetailDto> analyseDetailDtos); | ||
43 | + | ||
44 | + @RequestMapping(value = "/learn/init/insertBatchAnalyseDimensional", method = RequestMethod.POST) | ||
45 | + boolean insertBatchAnalyseDimensional(@RequestBody List<AnalyseDimensionalDto> analyseDimensionalDtos); | ||
46 | + | ||
47 | + //查数据库是否已存在该四维诊断 不存在则导入 返回主键 | ||
48 | + @RequestMapping(value = "/learn/init/selectDimensional", method = RequestMethod.GET) | ||
49 | + int selectDimensional(@RequestParam("type") int type, @RequestParam("name") String name); | ||
50 | + | ||
51 | + @RequestMapping(value = "/learn/init/insertBatchStudent", method = RequestMethod.POST) | ||
52 | + boolean insertBatchStudent(@RequestBody List<StudentDto> studentDtos); | ||
53 | + | ||
54 | + @RequestMapping(value = "/learn/init/insertBatchStudentDetail", method = RequestMethod.POST) | ||
55 | + boolean insertBatchStudentDetail(@RequestBody List<StudentDetailDto> studentDetailDtos); | ||
56 | + | ||
57 | + @RequestMapping(value = "/learn/init/initLeagueSchool", method = RequestMethod.GET) | ||
58 | + boolean initLeagueSchool(@RequestParam("leagueId")int leagueId , @RequestParam("schoolName")String schoolName); | ||
59 | + | ||
60 | + @RequestMapping(value = "/learn/init/insertLeague", method = RequestMethod.POST) | ||
61 | + int insertLeague(@RequestBody LeagueDto leagueDto); | ||
62 | + | ||
63 | + @RequestMapping(value = "/learn/init/getSchoolName", method = RequestMethod.GET) | ||
64 | + List<String> getSchoolName(@RequestParam("analyseId")int analyseId); | ||
65 | + | ||
66 | + @RequestMapping(value = "/learn/init/initChapter", method = RequestMethod.POST) | ||
67 | + boolean initChapter(@RequestBody List<ChapterDto> chapterDtos); | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + @RequestMapping(value = "learn/getLearn/getForm1_1", method = RequestMethod.POST) | ||
72 | + Form7RepVO getForm1_1(@RequestBody GetLearnDto getLearnDto); | ||
73 | + | ||
74 | + @RequestMapping(value = "learn/getLearn/getForm2_1_1", method = RequestMethod.POST) | ||
75 | + Form1RepVO getForm2_1_1(@RequestBody GetLearnDto getLearnDto); | ||
76 | + | ||
77 | + @RequestMapping(value = "learn/getLearn/getForm2_1_2", method = RequestMethod.POST) | ||
78 | + Form2RepVO getForm2_1_2(@RequestBody GetLearnDto GetLearnDto); | ||
79 | + | ||
80 | + @RequestMapping(value = "learn/getLearn/getForm2_1_3_2", method = RequestMethod.POST) | ||
81 | + Form2RepVO getForm2_1_3_2(@RequestBody GetLearnDto GetLearnDto); | ||
82 | + | ||
83 | + @RequestMapping(value = "learn/getLearn/getForm2_1_3", method = RequestMethod.POST) | ||
84 | + List<Table1> getForm2_1_3(@RequestBody GetLearnDto GetLearnDto); | ||
85 | + | ||
86 | + @RequestMapping(value = "learn/getLearn/getForm2_2_1", method = RequestMethod.POST) | ||
87 | + Form3RepVO getForm2_2_1(@RequestBody GetLearnDto GetLearnDto); | ||
88 | + | ||
89 | + @RequestMapping(value = "learn/getLearn/getForm2_2_2", method = RequestMethod.POST) | ||
90 | + public Form4RepVO getForm2_2_2(@RequestBody GetLearnDto GetLearnDto); | ||
91 | + | ||
92 | + @RequestMapping(value = "learn/getLearn/getForm2_2_3", method = RequestMethod.POST) | ||
93 | + Form5RepVO getForm2_2_3(@RequestBody GetLearnDto GetLearnDto); | ||
94 | + | ||
95 | + @RequestMapping(value = "learn/getLearn/getForm2_2_4", method = RequestMethod.POST) | ||
96 | + Form8RepVO getForm2_2_4(@RequestBody GetLearnDto GetLearnDto); | ||
97 | + | ||
98 | + @RequestMapping(value = "learn/getLearn/getForm2_2_5", method = RequestMethod.POST) | ||
99 | + Map<String,Double> getForm2_2_5(@RequestBody GetLearnDto GetLearnDto); | ||
100 | + | ||
101 | + @RequestMapping(value = "learn/getLearn/getForm3_1", method = RequestMethod.POST) | ||
102 | + Form6RepVO getForm3_1(@RequestBody GetLearnDto GetLearnDto); | ||
103 | + | ||
104 | + @RequestMapping(value = "learn/getLearn/getForm3_1_1", method = RequestMethod.POST) | ||
105 | + Table2RepVO getForm3_1_1(@RequestBody GetLearnDto GetLearnDto); | ||
106 | + | ||
107 | + @RequestMapping(value = "learn/getLearn/getForm3_2", method = RequestMethod.POST) | ||
108 | + Form6RepVO getForm3_2(@RequestBody GetLearnDto GetLearnDto); | ||
109 | + | ||
110 | + @RequestMapping(value = "learn/getLearn/getForm3_3", method = RequestMethod.POST) | ||
111 | + Form6RepVO getForm3_3(@RequestBody GetLearnDto GetLearnDto); | ||
112 | + | ||
113 | + @RequestMapping(value = "learn/getLearn/getForm3_4", method = RequestMethod.POST) | ||
114 | + Form6RepVO getForm3_4(@RequestBody GetLearnDto GetLearnDto); | ||
115 | + | ||
116 | + @RequestMapping(value = "learn/getLearn/getSuggest", method = RequestMethod.POST) | ||
117 | + String getSuggest(@RequestBody GetLearnDto GetLearnDto); | ||
118 | + | ||
119 | + @RequestMapping(value = "learn/getLearn/getSuggest2", method = RequestMethod.POST) | ||
120 | + String getSuggest2(@RequestBody GetLearnDto GetLearnDto); | ||
121 | +} |
cloud/independence/src/main/java/com/sincere/independence/filter/AllowOriginFilter.java
0 → 100644
@@ -0,0 +1,38 @@ | @@ -0,0 +1,38 @@ | ||
1 | +package com.sincere.independence.filter; | ||
2 | + | ||
3 | +import org.springframework.stereotype.Component; | ||
4 | + | ||
5 | +import javax.servlet.*; | ||
6 | +import javax.servlet.annotation.WebFilter; | ||
7 | +import javax.servlet.http.HttpServletResponse; | ||
8 | +import java.io.IOException; | ||
9 | + | ||
10 | +/** | ||
11 | + * 用于解决跨域问题 | ||
12 | + * @author chen | ||
13 | + * @version 1.0 | ||
14 | + * @date 2019/10/11 0011 10:17 | ||
15 | + */ | ||
16 | +@Component | ||
17 | +@WebFilter(urlPatterns = "/*", filterName = "authFilter") | ||
18 | +public class AllowOriginFilter implements Filter { | ||
19 | + | ||
20 | + @Override | ||
21 | + public void init(FilterConfig filterConfig) throws ServletException { | ||
22 | + } | ||
23 | + | ||
24 | + public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { | ||
25 | + HttpServletResponse response = (HttpServletResponse) res; | ||
26 | + response.setHeader("Access-Control-Allow-Origin", "*"); | ||
27 | + response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); | ||
28 | + response.setHeader("Access-Control-Allow-Credentials", "true"); | ||
29 | + response.setHeader("Access-Control-Allow-Headers","Origin, X-Requested-With, Content-Type, Accept"); | ||
30 | + chain.doFilter(req, res); | ||
31 | + } | ||
32 | + | ||
33 | + @Override | ||
34 | + public void destroy() { | ||
35 | + } | ||
36 | +} | ||
37 | + | ||
38 | + |
cloud/independence/src/main/java/com/sincere/independence/vo/ChapterReq.java
0 → 100644
@@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/10/24 0024 8:55 | ||
10 | + */ | ||
11 | +@ApiModel | ||
12 | +public class ChapterReq { | ||
13 | + | ||
14 | + @ApiModelProperty(value = "考试章节") | ||
15 | + private int chapterNumber ; | ||
16 | + @ApiModelProperty(value = "章节名称") | ||
17 | + private String chapterName ; | ||
18 | + @ApiModelProperty(value = "章节 分值") | ||
19 | + private Double score ; | ||
20 | + | ||
21 | + public int getChapterNumber() { | ||
22 | + return chapterNumber; | ||
23 | + } | ||
24 | + | ||
25 | + public void setChapterNumber(int chapterNumber) { | ||
26 | + this.chapterNumber = chapterNumber; | ||
27 | + } | ||
28 | + | ||
29 | + public String getChapterName() { | ||
30 | + return chapterName; | ||
31 | + } | ||
32 | + | ||
33 | + public void setChapterName(String chapterName) { | ||
34 | + this.chapterName = chapterName; | ||
35 | + } | ||
36 | + | ||
37 | + public Double getScore() { | ||
38 | + return score; | ||
39 | + } | ||
40 | + | ||
41 | + public void setScore(Double score) { | ||
42 | + this.score = score; | ||
43 | + } | ||
44 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/ChapterReqVo.java
0 → 100644
@@ -0,0 +1,65 @@ | @@ -0,0 +1,65 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author chen | ||
10 | + * @version 1.0 | ||
11 | + * @date 2019/10/24 0024 8:53 | ||
12 | + */ | ||
13 | +@ApiModel | ||
14 | +public class ChapterReqVo { | ||
15 | + | ||
16 | + private int analyseId ; | ||
17 | + @ApiModelProperty(value = "考试时长") | ||
18 | + private String examTime ; | ||
19 | + @ApiModelProperty(value = "考试范围 七年级上册") | ||
20 | + private String examScope ; | ||
21 | + @ApiModelProperty(value = "满分") | ||
22 | + private Double maxScore ; | ||
23 | + @ApiModelProperty(value = "考试内容") | ||
24 | + private List<ChapterReq> list ; | ||
25 | + | ||
26 | + public int getAnalyseId() { | ||
27 | + return analyseId; | ||
28 | + } | ||
29 | + | ||
30 | + public void setAnalyseId(int analyseId) { | ||
31 | + this.analyseId = analyseId; | ||
32 | + } | ||
33 | + | ||
34 | + public String getExamTime() { | ||
35 | + return examTime; | ||
36 | + } | ||
37 | + | ||
38 | + public void setExamTime(String examTime) { | ||
39 | + this.examTime = examTime; | ||
40 | + } | ||
41 | + | ||
42 | + public String getExamScope() { | ||
43 | + return examScope; | ||
44 | + } | ||
45 | + | ||
46 | + public void setExamScope(String examScope) { | ||
47 | + this.examScope = examScope; | ||
48 | + } | ||
49 | + | ||
50 | + public List<ChapterReq> getList() { | ||
51 | + return list; | ||
52 | + } | ||
53 | + | ||
54 | + public void setList(List<ChapterReq> list) { | ||
55 | + this.list = list; | ||
56 | + } | ||
57 | + | ||
58 | + public Double getMaxScore() { | ||
59 | + return maxScore; | ||
60 | + } | ||
61 | + | ||
62 | + public void setMaxScore(Double maxScore) { | ||
63 | + this.maxScore = maxScore; | ||
64 | + } | ||
65 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/CreateExamReqVo.java
0 → 100644
@@ -0,0 +1,53 @@ | @@ -0,0 +1,53 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/10/18 0018 14:48 | ||
10 | + */ | ||
11 | +@ApiModel | ||
12 | +public class CreateExamReqVo { | ||
13 | + @ApiModelProperty(value="考试名称") | ||
14 | + private String examName ; | ||
15 | + @ApiModelProperty(value="学科") | ||
16 | + private String courseName ; | ||
17 | + @ApiModelProperty(value="考试时间") | ||
18 | + private String examTime ; | ||
19 | + @ApiModelProperty(value="年级") | ||
20 | + private String grade ; | ||
21 | + | ||
22 | + public String getExamName() { | ||
23 | + return examName; | ||
24 | + } | ||
25 | + | ||
26 | + public void setExamName(String examName) { | ||
27 | + this.examName = examName; | ||
28 | + } | ||
29 | + | ||
30 | + public String getCourseName() { | ||
31 | + return courseName; | ||
32 | + } | ||
33 | + | ||
34 | + public void setCourseName(String courseName) { | ||
35 | + this.courseName = courseName; | ||
36 | + } | ||
37 | + | ||
38 | + public String getExamTime() { | ||
39 | + return examTime; | ||
40 | + } | ||
41 | + | ||
42 | + public void setExamTime(String examTime) { | ||
43 | + this.examTime = examTime; | ||
44 | + } | ||
45 | + | ||
46 | + public String getGrade() { | ||
47 | + return grade; | ||
48 | + } | ||
49 | + | ||
50 | + public void setGrade(String grade) { | ||
51 | + this.grade = grade; | ||
52 | + } | ||
53 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/CreateLeagueReqVo.java
0 → 100644
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +/** | ||
4 | + * @author chen | ||
5 | + * @version 1.0 | ||
6 | + * @date 2019/10/23 0023 15:46 | ||
7 | + */ | ||
8 | +public class CreateLeagueReqVo { | ||
9 | + | ||
10 | + private int analyseId ; | ||
11 | + private String league ; | ||
12 | + | ||
13 | + public int getAnalyseId() { | ||
14 | + return analyseId; | ||
15 | + } | ||
16 | + | ||
17 | + public void setAnalyseId(int analyseId) { | ||
18 | + this.analyseId = analyseId; | ||
19 | + } | ||
20 | + | ||
21 | + public String getLeague() { | ||
22 | + return league; | ||
23 | + } | ||
24 | + | ||
25 | + public void setLeague(String league) { | ||
26 | + this.league = league; | ||
27 | + } | ||
28 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/GetLeague.java
0 → 100644
@@ -0,0 +1,32 @@ | @@ -0,0 +1,32 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.LeagueDto; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/22 0022 15:46 | ||
11 | + */ | ||
12 | +public class GetLeague { | ||
13 | + | ||
14 | + private String leagueName ; | ||
15 | + private List<LeagueDto> leagues ; | ||
16 | + | ||
17 | + public String getLeagueName() { | ||
18 | + return leagueName; | ||
19 | + } | ||
20 | + | ||
21 | + public void setLeagueName(String leagueName) { | ||
22 | + this.leagueName = leagueName; | ||
23 | + } | ||
24 | + | ||
25 | + public List<LeagueDto> getLeagues() { | ||
26 | + return leagues; | ||
27 | + } | ||
28 | + | ||
29 | + public void setLeagues(List<LeagueDto> leagues) { | ||
30 | + this.leagues = leagues; | ||
31 | + } | ||
32 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/GetLeagueRepVo.java
0 → 100644
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/22 0022 15:48 | ||
11 | + */ | ||
12 | +public class GetLeagueRepVo extends BaseVo { | ||
13 | + | ||
14 | + private List<GetLeague> data ; | ||
15 | + | ||
16 | + public List<GetLeague> getData() { | ||
17 | + return data; | ||
18 | + } | ||
19 | + | ||
20 | + public void setData(List<GetLeague> data) { | ||
21 | + this.data = data; | ||
22 | + } | ||
23 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/InitAnalyseReqVo.java
0 → 100644
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +/** | ||
4 | + * @author chen | ||
5 | + * @version 1.0 | ||
6 | + * @date 2019/10/17 0017 13:36 | ||
7 | + */ | ||
8 | +public class InitAnalyseReqVo { | ||
9 | + | ||
10 | + private int analyseId ; | ||
11 | + private String url ; | ||
12 | + | ||
13 | + public int getAnalyseId() { | ||
14 | + return analyseId; | ||
15 | + } | ||
16 | + | ||
17 | + public void setAnalyseId(int analyseId) { | ||
18 | + this.analyseId = analyseId; | ||
19 | + } | ||
20 | + | ||
21 | + public String getUrl() { | ||
22 | + return url; | ||
23 | + } | ||
24 | + | ||
25 | + public void setUrl(String url) { | ||
26 | + this.url = url; | ||
27 | + } | ||
28 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/InitScoreReqVo.java
0 → 100644
@@ -0,0 +1,19 @@ | @@ -0,0 +1,19 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +/** | ||
4 | + * @author chen | ||
5 | + * @version 1.0 | ||
6 | + * @date 2019/10/23 0023 15:50 | ||
7 | + */ | ||
8 | +public class InitScoreReqVo extends InitAnalyseReqVo { | ||
9 | + | ||
10 | + private int leagueId ; | ||
11 | + | ||
12 | + public int getLeagueId() { | ||
13 | + return leagueId; | ||
14 | + } | ||
15 | + | ||
16 | + public void setLeagueId(int leagueId) { | ||
17 | + this.leagueId = leagueId; | ||
18 | + } | ||
19 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/UpdateExamReqVo.java
0 → 100644
@@ -0,0 +1,24 @@ | @@ -0,0 +1,24 @@ | ||
1 | +package com.sincere.independence.vo; | ||
2 | + | ||
3 | +import io.swagger.annotations.ApiModel; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +/** | ||
7 | + * @author chen | ||
8 | + * @version 1.0 | ||
9 | + * @date 2019/10/18 0018 14:53 | ||
10 | + */ | ||
11 | +@ApiModel | ||
12 | +public class UpdateExamReqVo extends CreateExamReqVo{ | ||
13 | + | ||
14 | + @ApiModelProperty(value="主键") | ||
15 | + private int analyseId ; | ||
16 | + | ||
17 | + public int getAnalyseId() { | ||
18 | + return analyseId; | ||
19 | + } | ||
20 | + | ||
21 | + public void setAnalyseId(int analyseId) { | ||
22 | + this.analyseId = analyseId; | ||
23 | + } | ||
24 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/excel/ExamExcelVo.java
0 → 100644
@@ -0,0 +1,168 @@ | @@ -0,0 +1,168 @@ | ||
1 | +package com.sincere.independence.vo.excel; | ||
2 | + | ||
3 | +import org.apache.poi.ss.usermodel.Cell; | ||
4 | +import org.apache.poi.ss.usermodel.CellType; | ||
5 | +import org.apache.poi.ss.usermodel.Row; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/18 0018 8:51 | ||
11 | + */ | ||
12 | +public class ExamExcelVo extends ExcelVo { | ||
13 | + | ||
14 | + private String questionNumber ; | ||
15 | + private String questionSmallNumber ; | ||
16 | + private String questionType ; | ||
17 | + private String difficult ; | ||
18 | + private String score ; | ||
19 | + private String knowledge ; | ||
20 | + private String ability ; | ||
21 | + private String skill ; | ||
22 | + private String think ; | ||
23 | + | ||
24 | + public String getQuestionNumber() { | ||
25 | + return questionNumber; | ||
26 | + } | ||
27 | + | ||
28 | + public void setQuestionNumber(String questionNumber) { | ||
29 | + this.questionNumber = questionNumber; | ||
30 | + } | ||
31 | + | ||
32 | + public String getQuestionSmallNumber() { | ||
33 | + return questionSmallNumber; | ||
34 | + } | ||
35 | + | ||
36 | + public void setQuestionSmallNumber(String questionSmallNumber) { | ||
37 | + this.questionSmallNumber = questionSmallNumber; | ||
38 | + } | ||
39 | + | ||
40 | + public String getQuestionType() { | ||
41 | + return questionType; | ||
42 | + } | ||
43 | + | ||
44 | + public void setQuestionType(String questionType) { | ||
45 | + this.questionType = questionType; | ||
46 | + } | ||
47 | + | ||
48 | + public String getDifficult() { | ||
49 | + return difficult; | ||
50 | + } | ||
51 | + | ||
52 | + public void setDifficult(String difficult) { | ||
53 | + this.difficult = difficult; | ||
54 | + } | ||
55 | + | ||
56 | + public String getScore() { | ||
57 | + return score; | ||
58 | + } | ||
59 | + | ||
60 | + public void setScore(String score) { | ||
61 | + this.score = score; | ||
62 | + } | ||
63 | + | ||
64 | + public String getKnowledge() { | ||
65 | + return knowledge; | ||
66 | + } | ||
67 | + | ||
68 | + public void setKnowledge(String knowledge) { | ||
69 | + this.knowledge = knowledge; | ||
70 | + } | ||
71 | + | ||
72 | + public String getAbility() { | ||
73 | + return ability; | ||
74 | + } | ||
75 | + | ||
76 | + public void setAbility(String ability) { | ||
77 | + this.ability = ability; | ||
78 | + } | ||
79 | + | ||
80 | + public String getSkill() { | ||
81 | + return skill; | ||
82 | + } | ||
83 | + | ||
84 | + public void setSkill(String skill) { | ||
85 | + this.skill = skill; | ||
86 | + } | ||
87 | + | ||
88 | + public String getThink() { | ||
89 | + return think; | ||
90 | + } | ||
91 | + | ||
92 | + public void setThink(String think) { | ||
93 | + this.think = think; | ||
94 | + } | ||
95 | + | ||
96 | + public ExamExcelVo(Row sheetRow) { | ||
97 | + super(sheetRow); | ||
98 | + Cell cell1 = sheetRow.getCell(0); | ||
99 | + if(cell1 != null){ | ||
100 | + cell1.setCellType(CellType.STRING); | ||
101 | + this.questionNumber = cell1.getStringCellValue().trim(); | ||
102 | + } | ||
103 | + | ||
104 | + Cell cell2 = sheetRow.getCell(1); | ||
105 | + if(cell2 != null){ | ||
106 | + cell2.setCellType(CellType.STRING); | ||
107 | + this.questionSmallNumber = cell2.getStringCellValue().trim(); | ||
108 | + }else { | ||
109 | + this.questionSmallNumber = null ; | ||
110 | + } | ||
111 | + | ||
112 | + Cell cell3 = sheetRow.getCell(2); | ||
113 | + if(cell3 != null){ | ||
114 | + cell3.setCellType(CellType.STRING); | ||
115 | + this.questionType = cell3.getStringCellValue().trim(); | ||
116 | + }else { | ||
117 | + this.questionType = null ; | ||
118 | + } | ||
119 | + | ||
120 | + Cell cell4 = sheetRow.getCell(3); | ||
121 | + if(cell4 != null){ | ||
122 | + cell4.setCellType(CellType.STRING); | ||
123 | + this.difficult = cell4.getStringCellValue().trim(); | ||
124 | + }else { | ||
125 | + this.difficult = null ; | ||
126 | + } | ||
127 | + | ||
128 | + Cell cell5 = sheetRow.getCell(4); | ||
129 | + if(cell5 != null){ | ||
130 | + cell5.setCellType(CellType.STRING); | ||
131 | + this.score = cell5.getStringCellValue().trim(); | ||
132 | + }else { | ||
133 | + this.score = null ; | ||
134 | + } | ||
135 | + | ||
136 | + Cell cell6 = sheetRow.getCell(5); | ||
137 | + if(cell6 != null){ | ||
138 | + cell6.setCellType(CellType.STRING); | ||
139 | + this.knowledge = cell6.getStringCellValue().trim(); | ||
140 | + }else { | ||
141 | + this.knowledge = null ; | ||
142 | + } | ||
143 | + | ||
144 | + Cell cell7 = sheetRow.getCell(6); | ||
145 | + if(cell7 != null){ | ||
146 | + cell7.setCellType(CellType.STRING); | ||
147 | + this.ability = cell7.getStringCellValue().trim(); | ||
148 | + }else { | ||
149 | + this.ability = null ; | ||
150 | + } | ||
151 | + | ||
152 | + Cell cell8 = sheetRow.getCell(7); | ||
153 | + if(cell8 != null){ | ||
154 | + cell8.setCellType(CellType.STRING); | ||
155 | + this.skill = cell8.getStringCellValue().trim(); | ||
156 | + }else { | ||
157 | + this.skill = null ; | ||
158 | + } | ||
159 | + | ||
160 | + Cell cell9 = sheetRow.getCell(8); | ||
161 | + if(cell9 != null){ | ||
162 | + cell9.setCellType(CellType.STRING); | ||
163 | + this.think = cell9.getStringCellValue().trim(); | ||
164 | + }else { | ||
165 | + this.think = null ; | ||
166 | + } | ||
167 | + } | ||
168 | +} |
cloud/independence/src/main/java/com/sincere/independence/vo/excel/ExcelVo.java
0 → 100644
cloud/independence/src/main/java/com/sincere/independence/vo/excel/ScoreExcelVo.java
0 → 100644
@@ -0,0 +1,102 @@ | @@ -0,0 +1,102 @@ | ||
1 | +package com.sincere.independence.vo.excel; | ||
2 | + | ||
3 | +import org.apache.poi.ss.usermodel.Cell; | ||
4 | +import org.apache.poi.ss.usermodel.CellType; | ||
5 | +import org.apache.poi.ss.usermodel.Row; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/18 0018 13:50 | ||
11 | + */ | ||
12 | +public class ScoreExcelVo extends ExcelVo { | ||
13 | + | ||
14 | + private String schoolName ; | ||
15 | + private String className ; | ||
16 | + private String studentNumber ; | ||
17 | + private String studentName ; | ||
18 | + private String courseName ; | ||
19 | + private String score ; | ||
20 | + | ||
21 | + public String getSchoolName() { | ||
22 | + return schoolName; | ||
23 | + } | ||
24 | + | ||
25 | + public void setSchoolName(String schoolName) { | ||
26 | + this.schoolName = schoolName; | ||
27 | + } | ||
28 | + | ||
29 | + public String getClassName() { | ||
30 | + return className; | ||
31 | + } | ||
32 | + | ||
33 | + public void setClassName(String className) { | ||
34 | + this.className = className; | ||
35 | + } | ||
36 | + | ||
37 | + public String getStudentNumber() { | ||
38 | + return studentNumber; | ||
39 | + } | ||
40 | + | ||
41 | + public void setStudentNumber(String studentNumber) { | ||
42 | + this.studentNumber = studentNumber; | ||
43 | + } | ||
44 | + | ||
45 | + public String getStudentName() { | ||
46 | + return studentName; | ||
47 | + } | ||
48 | + | ||
49 | + public void setStudentName(String studentName) { | ||
50 | + this.studentName = studentName; | ||
51 | + } | ||
52 | + | ||
53 | + public String getCourseName() { | ||
54 | + return courseName; | ||
55 | + } | ||
56 | + | ||
57 | + public void setCourseName(String courseName) { | ||
58 | + this.courseName = courseName; | ||
59 | + } | ||
60 | + | ||
61 | + public String getScore() { | ||
62 | + return score; | ||
63 | + } | ||
64 | + | ||
65 | + public void setScore(String score) { | ||
66 | + this.score = score; | ||
67 | + } | ||
68 | + | ||
69 | + public ScoreExcelVo(Row sheetRow) { | ||
70 | + super(sheetRow); | ||
71 | + Cell cell1 = sheetRow.getCell(1); | ||
72 | + if(cell1 != null){ | ||
73 | + cell1.setCellType(CellType.STRING); | ||
74 | + this.schoolName = cell1.getStringCellValue().trim(); | ||
75 | + } | ||
76 | + Cell cell2 = sheetRow.getCell(2); | ||
77 | + if(cell2 != null){ | ||
78 | + cell2.setCellType(CellType.STRING); | ||
79 | + this.className = cell2.getStringCellValue().trim(); | ||
80 | + } | ||
81 | + Cell cell3 = sheetRow.getCell(3); | ||
82 | + if(cell3 != null){ | ||
83 | + cell3.setCellType(CellType.STRING); | ||
84 | + this.studentNumber = cell3.getStringCellValue().trim(); | ||
85 | + } | ||
86 | + Cell cell4 = sheetRow.getCell(4); | ||
87 | + if(cell4 != null){ | ||
88 | + cell4.setCellType(CellType.STRING); | ||
89 | + this.studentName = cell4.getStringCellValue().trim(); | ||
90 | + } | ||
91 | + Cell cell5 = sheetRow.getCell(5); | ||
92 | + if(cell5 != null){ | ||
93 | + cell5.setCellType(CellType.STRING); | ||
94 | + this.courseName = cell5.getStringCellValue().trim(); | ||
95 | + } | ||
96 | + Cell cell6 = sheetRow.getCell(6); | ||
97 | + if(cell6 != null){ | ||
98 | + cell6.setCellType(CellType.STRING); | ||
99 | + this.score = cell6.getStringCellValue().trim(); | ||
100 | + } | ||
101 | + } | ||
102 | +} |
@@ -0,0 +1,20 @@ | @@ -0,0 +1,20 @@ | ||
1 | +server: | ||
2 | + port: 8008 | ||
3 | + | ||
4 | +spring: | ||
5 | + application: | ||
6 | + name: independence | ||
7 | + profiles: | ||
8 | + active: dev | ||
9 | + | ||
10 | + | ||
11 | +eureka: | ||
12 | + instance: | ||
13 | + hostname: localhost | ||
14 | + lease-expiration-duration-in-seconds: 60 | ||
15 | + lease-renewal-interval-in-seconds: 10 | ||
16 | + client: | ||
17 | + service-url: | ||
18 | + # defaultZone: http://localhost:8761/eureka/ | ||
19 | + defaultZone: http://localhost:8761/eureka/,http://localhost:8762/eureka/ | ||
20 | + |
@@ -0,0 +1,61 @@ | @@ -0,0 +1,61 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<configuration debug="true"> | ||
3 | + <!-- 项目名称 --> | ||
4 | + <property name="PROJECT_NAME" value="smartCampus_java" /> | ||
5 | + | ||
6 | + <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> | ||
7 | + <!-- <property name="LOG_HOME" value="/opt/web/log/" />--> | ||
8 | + <property name="LOG_HOME" value="D://smartCampus_java//log"/> | ||
9 | + | ||
10 | + <!-- 控制台输出 --> | ||
11 | + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
12 | + <!--<withJansi>true</withJansi>--> | ||
13 | + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
14 | + <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> | ||
15 | + <pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %highlight([%-5level] %logger{50} - %msg%n)</pattern> | ||
16 | + <charset>UTF-8</charset> | ||
17 | + </encoder> | ||
18 | + </appender> | ||
19 | + | ||
20 | + <!-- 按照每天生成日志文件 --> | ||
21 | + <appender name="SYSTEM_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
22 | + <!-- 过滤器,只打印ERROR级别的日志 --> | ||
23 | + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
24 | + <!--日志文件输出的文件名--> | ||
25 | + <FileNamePattern>${LOG_HOME}/${PROJECT_NAME}.system-dev.%d{yyyy-MM-dd HH}.%i.log</FileNamePattern> | ||
26 | + <!--日志文件保留天数--> | ||
27 | + <MaxHistory>30</MaxHistory> | ||
28 | + <!--日志文件最大的大小--> | ||
29 | + <MaxFileSize>100MB</MaxFileSize> | ||
30 | + </rollingPolicy> | ||
31 | + | ||
32 | + <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
33 | + <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> | ||
34 | + <pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] [%-5level] %logger{50} - %msg%n</pattern> | ||
35 | + <charset>UTF-8</charset> | ||
36 | + </encoder> | ||
37 | + </appender> | ||
38 | + <logger name="system_error" additivity="true"> | ||
39 | + <appender-ref ref="SYSTEM_FILE"/> | ||
40 | + </logger> | ||
41 | + | ||
42 | + <!-- 设置Spring&Hibernate日志输出级别 --> | ||
43 | + <logger name="org.springframework" level="WARN" /> | ||
44 | + <logger name="org.mybatis" level="WARN" /> | ||
45 | + <logger name="com.ibatis" level="DEBUG" /> | ||
46 | + <logger name="com.ibatis.common.jdbc.SimpleDataSource" level="DEBUG" /> | ||
47 | + <logger name="com.ibatis.common.jdbc.ScriptRunner" level="DEBUG" /> | ||
48 | + <logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" level="DEBUG" /> | ||
49 | + | ||
50 | + | ||
51 | + <logger name="java.sql.Connection" level="DEBUG" /> | ||
52 | + <logger name="java.sql.Statement" level="DEBUG" /> | ||
53 | + <logger name="java.sql.PreparedStatement" level="DEBUG" /> | ||
54 | + <logger name="com.jevon.mapper" level="DEBUG" /> | ||
55 | + <!-- 开发环境下的日志配置 --> | ||
56 | + <root level="ERROR"> | ||
57 | + <appender-ref ref="CONSOLE" /> | ||
58 | + <appender-ref ref="SYSTEM_FILE" /> | ||
59 | + </root> | ||
60 | + | ||
61 | +</configuration> | ||
0 | \ No newline at end of file | 62 | \ No newline at end of file |
cloud/pom.xml
@@ -24,10 +24,12 @@ | @@ -24,10 +24,12 @@ | ||
24 | <module>dahua</module> | 24 | <module>dahua</module> |
25 | <module>consumer</module> | 25 | <module>consumer</module> |
26 | <module>haikangface</module> | 26 | <module>haikangface</module> |
27 | - <module>smartCampus_search</module> | ||
28 | - <module>xiaoan_search</module> | 27 | + <module>search_independence</module> |
28 | + <module>search_smartCampus</module> | ||
29 | + <module>search_xiaoan</module> | ||
29 | <module>mypulsar</module> | 30 | <module>mypulsar</module> |
30 | <module>weigeng</module> | 31 | <module>weigeng</module> |
32 | + <module>independence</module> | ||
31 | </modules> | 33 | </modules> |
32 | 34 | ||
33 | <properties> | 35 | <properties> |
@@ -0,0 +1,146 @@ | @@ -0,0 +1,146 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
5 | + <parent> | ||
6 | + <artifactId>cloud</artifactId> | ||
7 | + <groupId>com.sincere</groupId> | ||
8 | + <version>1.0.0</version> | ||
9 | + </parent> | ||
10 | + <modelVersion>4.0.0</modelVersion> | ||
11 | + | ||
12 | + <artifactId>search_independence</artifactId> | ||
13 | + | ||
14 | + <dependencies> | ||
15 | + <dependency> | ||
16 | + <groupId>com.sincere</groupId> | ||
17 | + <artifactId>common</artifactId> | ||
18 | + <version>0.0.1-SNAPSHOT</version> | ||
19 | + </dependency> | ||
20 | + <dependency> | ||
21 | + <groupId>org.apache.httpcomponents</groupId> | ||
22 | + <artifactId>httpclient</artifactId> | ||
23 | + <version>4.3</version> | ||
24 | + </dependency> | ||
25 | + <dependency> | ||
26 | + <groupId>com.microsoft.sqlserver</groupId> | ||
27 | + <artifactId>mssql-jdbc</artifactId> | ||
28 | + <version>6.4.0.jre8</version> | ||
29 | + </dependency> | ||
30 | + <dependency> | ||
31 | + <groupId>com.alibaba</groupId> | ||
32 | + <artifactId>fastjson</artifactId> | ||
33 | + <version>1.2.16</version> | ||
34 | + </dependency> | ||
35 | + <dependency> | ||
36 | + <groupId>org.apache.commons</groupId> | ||
37 | + <artifactId>commons-lang3</artifactId> | ||
38 | + <version>3.3.2</version> | ||
39 | + </dependency> | ||
40 | + | ||
41 | + <!--只有slf4j-api依赖--> | ||
42 | + <dependency> | ||
43 | + <groupId>org.slf4j</groupId> | ||
44 | + <artifactId>slf4j-api</artifactId> | ||
45 | + <version>1.7.13</version> | ||
46 | + </dependency> | ||
47 | + <!-- https://mvnrepository.com/artifact/commons-net/commons-net --> | ||
48 | + <dependency> | ||
49 | + <groupId>commons-net</groupId> | ||
50 | + <artifactId>commons-net</artifactId> | ||
51 | + <version>2.0</version> | ||
52 | + </dependency> | ||
53 | + <!--数据库--> | ||
54 | + <dependency> | ||
55 | + <groupId>org.mybatis.spring.boot</groupId> | ||
56 | + <artifactId>mybatis-spring-boot-starter</artifactId> | ||
57 | + <version>1.3.0</version> | ||
58 | + </dependency> | ||
59 | + </dependencies> | ||
60 | + | ||
61 | + <build> | ||
62 | + <!--打包文件名--> | ||
63 | + <finalName>search_smartCampus</finalName> | ||
64 | + <!--打包方式--> | ||
65 | + <plugins> | ||
66 | + <!-- 设置编译版本 --> | ||
67 | + <plugin> | ||
68 | + <groupId>org.apache.maven.plugins</groupId> | ||
69 | + <artifactId>maven-compiler-plugin</artifactId> | ||
70 | + <version>3.1</version> | ||
71 | + <configuration> | ||
72 | + <source>1.8</source> | ||
73 | + <target>1.8</target> | ||
74 | + <encoding>UTF-8</encoding> | ||
75 | + </configuration> | ||
76 | + </plugin> | ||
77 | + <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 --> | ||
78 | + <!-- 本地启动需要注释--> | ||
79 | + <plugin> | ||
80 | + <groupId>org.apache.maven.plugins</groupId> | ||
81 | + <artifactId>maven-jar-plugin</artifactId> | ||
82 | + <configuration> | ||
83 | + <archive> | ||
84 | + <manifest> | ||
85 | + <mainClass>com.sincere.smartSearch.SmartSearchApplication</mainClass> | ||
86 | + <addClasspath>true</addClasspath> | ||
87 | + <classpathPrefix>lib/</classpathPrefix> | ||
88 | + </manifest> | ||
89 | + <manifestEntries> | ||
90 | + <Class-Path>./config/</Class-Path> | ||
91 | + </manifestEntries> | ||
92 | + </archive> | ||
93 | + <excludes> | ||
94 | + <exclude>config/**</exclude> | ||
95 | + </excludes> | ||
96 | + <classesDirectory></classesDirectory> | ||
97 | + </configuration> | ||
98 | + </plugin> | ||
99 | + <!-- 拷贝依赖的jar包到lib目录 --> | ||
100 | + <plugin> | ||
101 | + <groupId>org.apache.maven.plugins</groupId> | ||
102 | + <artifactId>maven-dependency-plugin</artifactId> | ||
103 | + <executions> | ||
104 | + <execution> | ||
105 | + <id>copy</id> | ||
106 | + <phase>package</phase> | ||
107 | + <goals> | ||
108 | + <goal>copy-dependencies</goal> | ||
109 | + </goals> | ||
110 | + <configuration> | ||
111 | + <outputDirectory> | ||
112 | + ${project.build.directory}/lib | ||
113 | + </outputDirectory> | ||
114 | + </configuration> | ||
115 | + </execution> | ||
116 | + </executions> | ||
117 | + </plugin> | ||
118 | + <!-- 解决资源文件的编码问题 --> | ||
119 | + <plugin> | ||
120 | + <groupId>org.apache.maven.plugins</groupId> | ||
121 | + <artifactId>maven-resources-plugin</artifactId> | ||
122 | + <version>2.5</version> | ||
123 | + <configuration> | ||
124 | + <encoding>UTF-8</encoding> | ||
125 | + </configuration> | ||
126 | + </plugin> | ||
127 | + <!-- 打包source文件为jar文件 --> | ||
128 | + <plugin> | ||
129 | + <artifactId>maven-source-plugin</artifactId> | ||
130 | + <version>2.2</version> | ||
131 | + <configuration> | ||
132 | + <attach>true</attach> | ||
133 | + </configuration> | ||
134 | + <executions> | ||
135 | + <execution> | ||
136 | + <phase>compile</phase> | ||
137 | + <goals> | ||
138 | + <goal>jar</goal> | ||
139 | + </goals> | ||
140 | + </execution> | ||
141 | + </executions> | ||
142 | + </plugin> | ||
143 | + </plugins> | ||
144 | + </build> | ||
145 | + | ||
146 | +</project> | ||
0 | \ No newline at end of file | 147 | \ No newline at end of file |
cloud/search_independence/src/main/java/com/sincere/independence/IndependenceSearchApplication.java
0 → 100644
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +package com.sincere.independence; | ||
2 | + | ||
3 | +import org.mybatis.spring.annotation.MapperScan; | ||
4 | +import org.springframework.boot.SpringApplication; | ||
5 | +import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
6 | +import org.springframework.cloud.netflix.eureka.EnableEurekaClient; | ||
7 | +import org.springframework.context.annotation.ComponentScan; | ||
8 | + | ||
9 | +/** | ||
10 | + * @author chen | ||
11 | + * @version 1.0 | ||
12 | + * @date 2019/11/13 0013 8:40 | ||
13 | + */ | ||
14 | +@EnableEurekaClient | ||
15 | +@SpringBootApplication | ||
16 | +@MapperScan("com.sincere.independence.mapper") | ||
17 | +@ComponentScan("com.sincere.common") | ||
18 | +public class IndependenceSearchApplication { | ||
19 | + | ||
20 | + public static void main(String[] args) { | ||
21 | + SpringApplication.run(IndependenceSearchApplication.class, args); | ||
22 | + } | ||
23 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/controller/LearnController.java
0 → 100644
@@ -0,0 +1,225 @@ | @@ -0,0 +1,225 @@ | ||
1 | +package com.sincere.independence.controller; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.*; | ||
4 | +import com.sincere.common.util.RedisUtils; | ||
5 | +import com.sincere.common.vo.BaseVo; | ||
6 | +import com.sincere.independence.model.*; | ||
7 | +import com.sincere.independence.service.*; | ||
8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
9 | +import org.springframework.web.bind.annotation.*; | ||
10 | + | ||
11 | +import java.util.ArrayList; | ||
12 | +import java.util.Date; | ||
13 | +import java.util.List; | ||
14 | + | ||
15 | +/** | ||
16 | + * @author chen | ||
17 | + * @version 1.0 | ||
18 | + * @date 2019/11/13 0013 9:33 | ||
19 | + */ | ||
20 | +@RestController | ||
21 | +@RequestMapping(value = "/learn/init") | ||
22 | +public class LearnController { | ||
23 | + | ||
24 | + @Autowired | ||
25 | + AnalyseService analyseService; | ||
26 | + | ||
27 | + @Autowired | ||
28 | + DimensionalService dimensionalService; | ||
29 | + | ||
30 | + @Autowired | ||
31 | + AnalyseDimensionalService analyseDimensionalService; | ||
32 | + | ||
33 | + @Autowired | ||
34 | + AnalyseDetailService analyseDetailService; | ||
35 | + | ||
36 | + @Autowired | ||
37 | + StudentDetailService studentDetailService; | ||
38 | + | ||
39 | + @Autowired | ||
40 | + StudentService studentService; | ||
41 | + | ||
42 | + @Autowired | ||
43 | + LeagueService leagueService; | ||
44 | + | ||
45 | + @Autowired | ||
46 | + ChapterService chapterService; | ||
47 | + | ||
48 | + @Autowired | ||
49 | + KnowledgeService knowledgeService; | ||
50 | + | ||
51 | + @RequestMapping(value = "getList", method = RequestMethod.POST) | ||
52 | + public List<AnalyseDto> getList(@RequestBody AnalyseDto analyseDto){ | ||
53 | + List<Analyse> list = analyseService.select(new Analyse(analyseDto)); | ||
54 | + List<AnalyseDto> analyseDtos = new ArrayList<>(); | ||
55 | + for(Analyse analyse : list){ | ||
56 | + AnalyseDto temp = initAnalyseDto(analyse); | ||
57 | + analyseDtos.add(temp); | ||
58 | + } | ||
59 | + return analyseDtos; | ||
60 | + } | ||
61 | + | ||
62 | + private AnalyseDto initAnalyseDto(Analyse analyse){ | ||
63 | + AnalyseDto analyseDto = new AnalyseDto(); | ||
64 | + analyseDto.setCourseName(analyse.getCourseName()); | ||
65 | + analyseDto.setCreateTime(analyse.getCreateTime()); | ||
66 | + analyseDto.setExamName(analyse.getExamName()); | ||
67 | + analyseDto.setExamScope(analyse.getExamScope()); | ||
68 | + analyseDto.setExamTime(analyse.getExamTime()); | ||
69 | + analyseDto.setGrade(analyse.getGrade()); | ||
70 | + analyseDto.setId(analyse.getId()); | ||
71 | + analyseDto.setMaxScore(analyse.getMaxScore()); | ||
72 | + return analyseDto; | ||
73 | + } | ||
74 | + | ||
75 | + @RequestMapping(value = "insertAnalyse", method = RequestMethod.POST) | ||
76 | + public BaseVo insertAnalyse(@RequestBody AnalyseDto analyseDto){ | ||
77 | + BaseVo baseVo = new BaseVo(); | ||
78 | + Analyse analyse = new Analyse(analyseDto); | ||
79 | + analyseService.insert(analyse); | ||
80 | + baseVo.setMessage(analyse.getId()+""); | ||
81 | + return baseVo; | ||
82 | + } | ||
83 | + | ||
84 | + @RequestMapping(value = "updateAnalyse", method = RequestMethod.POST) | ||
85 | + public BaseVo updateAnalyse(@RequestBody AnalyseDto analyseDto){ | ||
86 | + BaseVo baseVo = new BaseVo(); | ||
87 | + Analyse analyse = new Analyse(analyseDto); | ||
88 | + analyseService.update(analyse); | ||
89 | + return baseVo; | ||
90 | + } | ||
91 | + | ||
92 | + @RequestMapping(value = "selectById", method = RequestMethod.GET) | ||
93 | + public AnalyseDto selectById(@RequestParam("analyseId") int analyseId) { | ||
94 | + Analyse analyse = analyseService.selectById(analyseId); | ||
95 | + return initAnalyseDto(analyse); | ||
96 | + } | ||
97 | + | ||
98 | + @RequestMapping(value = "getLeagueByAnalyse", method = RequestMethod.GET) | ||
99 | + public List<LeagueDto> getLeagueByAnalyse(@RequestParam("analyseId") int analyseId){ | ||
100 | + List<League> leagues = leagueService.selectByAnalyseId(analyseId); | ||
101 | + List<LeagueDto> leagueDtos = new ArrayList<>(); | ||
102 | + for(League league : leagues){ | ||
103 | + leagueDtos.add(initLeagueDto(league)); | ||
104 | + } | ||
105 | + return leagueDtos ; | ||
106 | + } | ||
107 | + | ||
108 | + private LeagueDto initLeagueDto(League league){ | ||
109 | + LeagueDto leagueDto = new LeagueDto(); | ||
110 | + leagueDto.setAnalyseId(league.getAnalyseId()); | ||
111 | + leagueDto.setId(league.getId()); | ||
112 | + leagueDto.setLeague(league.getLeague()); | ||
113 | + leagueDto.setSchoolName(league.getSchoolName()); | ||
114 | + return leagueDto; | ||
115 | + } | ||
116 | + | ||
117 | + @RequestMapping(value = "isImportExam", method = RequestMethod.GET) | ||
118 | + public List<AnalyseDetailDto> isImportExam(@RequestParam("analyseId") int analyseId){ | ||
119 | + List<AnalyseDetail> analyseDetails = analyseDetailService.selectByAnalyseId(analyseId); | ||
120 | + List<AnalyseDetailDto> analyseDetailDtos = new ArrayList<>(); | ||
121 | + if(analyseDetails != null & analyseDetails.size() > 0){ | ||
122 | + for(AnalyseDetail analyseDetail : analyseDetails){ | ||
123 | + analyseDetailDtos.add(initAnalyseDetail(analyseDetail)); | ||
124 | + } | ||
125 | + } | ||
126 | + return analyseDetailDtos ; | ||
127 | + } | ||
128 | + | ||
129 | + private AnalyseDetailDto initAnalyseDetail(AnalyseDetail analyseDetail){ | ||
130 | + AnalyseDetailDto analyseDetailDto = new AnalyseDetailDto(); | ||
131 | + analyseDetailDto.setAnalyseId(analyseDetail.getAnalyseId()); | ||
132 | + analyseDetailDto.setCreateTime(analyseDetail.getCreateTime()); | ||
133 | + analyseDetailDto.setDifficult(analyseDetail.getDifficult()); | ||
134 | + analyseDetailDto.setQuestionNumber(analyseDetail.getQuestionNumber()); | ||
135 | + analyseDetailDto.setScore(analyseDetail.getScore()); | ||
136 | + analyseDetailDto.setId(analyseDetail.getId()); | ||
137 | + return analyseDetailDto; | ||
138 | + } | ||
139 | + | ||
140 | + @RequestMapping(value = "insertBatchAnalyseDetail", method = RequestMethod.POST) | ||
141 | + public boolean insertBatchAnalyseDetail(@RequestBody List<AnalyseDetailDto> analyseDetailDtos){ | ||
142 | + List<AnalyseDetail> list = new ArrayList<>(); | ||
143 | + for(AnalyseDetailDto analyseDetailDto :analyseDetailDtos){ | ||
144 | + list.add(new AnalyseDetail(analyseDetailDto)); | ||
145 | + } | ||
146 | + analyseDetailService.insertBatch(list); | ||
147 | + return true ; | ||
148 | + } | ||
149 | + | ||
150 | + @RequestMapping(value = "insertBatchAnalyseDimensional", method = RequestMethod.POST) | ||
151 | + public boolean insertBatchAnalyseDimensional(@RequestBody List<AnalyseDimensionalDto> analyseDimensionalDtos){ | ||
152 | + List<AnalyseDimensional> list = new ArrayList<>(); | ||
153 | + for(AnalyseDimensionalDto analyseDimensionalDto :analyseDimensionalDtos){ | ||
154 | + list.add(new AnalyseDimensional(analyseDimensionalDto)); | ||
155 | + } | ||
156 | + analyseDimensionalService.insertBatch(list); | ||
157 | + return true ; | ||
158 | + } | ||
159 | + | ||
160 | + //查数据库是否已存在该四维诊断 不存在则导入 返回主键 | ||
161 | + @RequestMapping(value = "selectDimensional", method = RequestMethod.GET) | ||
162 | + public int selectDimensional(@RequestParam("type") int type, @RequestParam("name") String name) { | ||
163 | + Dimensional result = dimensionalService.selectByTypeAndName(type,name); | ||
164 | + int dimensionalId = 0 ; | ||
165 | + if(result == null || result.getId() == 0){ | ||
166 | + Dimensional dimensional = new Dimensional(); | ||
167 | + dimensional.setDimensionalType(type); | ||
168 | + dimensional.setDimensionalName(name); | ||
169 | + dimensional.setCreateTime(new Date()); | ||
170 | + dimensionalService.insert(dimensional); | ||
171 | + dimensionalId = dimensional.getId(); | ||
172 | + }else{ | ||
173 | + dimensionalId = result.getId(); | ||
174 | + } | ||
175 | + return dimensionalId ; | ||
176 | + } | ||
177 | + | ||
178 | + @RequestMapping(value = "insertBatchStudent", method = RequestMethod.POST) | ||
179 | + public boolean insertBatchStudent(@RequestBody List<StudentDto> studentDtos){ | ||
180 | + List<Student> list = new ArrayList<>(); | ||
181 | + for(StudentDto studentDto :studentDtos){ | ||
182 | + list.add(new Student(studentDto)); | ||
183 | + } | ||
184 | + studentService.insertBatch(list); | ||
185 | + return true ; | ||
186 | + } | ||
187 | + | ||
188 | + @RequestMapping(value = "insertBatchStudentDetail", method = RequestMethod.POST) | ||
189 | + public boolean insertBatchStudentDetail(@RequestBody List<StudentDetailDto> studentDetailDtos){ | ||
190 | + List<StudentDetail> list = new ArrayList<>(); | ||
191 | + for(StudentDetailDto studentDetailDto :studentDetailDtos){ | ||
192 | + list.add(new StudentDetail(studentDetailDto)); | ||
193 | + } | ||
194 | + studentDetailService.insertBatch(list); | ||
195 | + return true ; | ||
196 | + } | ||
197 | + | ||
198 | + @RequestMapping(value = "initLeagueSchool", method = RequestMethod.GET) | ||
199 | + public boolean initLeagueSchool(@RequestParam("leagueId")int leagueId , @RequestParam("schoolName")String schoolName){ | ||
200 | + return leagueService.initLeagueSchool(leagueId,schoolName)==1 ? true : false ; | ||
201 | + } | ||
202 | + | ||
203 | + @RequestMapping(value = "insertLeague", method = RequestMethod.POST) | ||
204 | + public int insertLeague(@RequestBody LeagueDto leagueDto){ | ||
205 | + League league = new League(leagueDto); | ||
206 | + leagueService.insert(league); | ||
207 | + return league.getId(); | ||
208 | + } | ||
209 | + | ||
210 | + @RequestMapping(value = "getSchoolName", method = RequestMethod.GET) | ||
211 | + public List<String> getSchoolName(@RequestParam("analyseId")int analyseId){ | ||
212 | + return studentService.selectSchoolNameByAnalyse(analyseId); | ||
213 | + } | ||
214 | + | ||
215 | + @RequestMapping(value = "initChapter", method = RequestMethod.POST) | ||
216 | + public boolean initChapter(@RequestBody List<ChapterDto> chapterDtos){ | ||
217 | + List<Chapter> list = new ArrayList<>(); | ||
218 | + for(ChapterDto chapterDto : chapterDtos){ | ||
219 | + list.add(new Chapter(chapterDto)); | ||
220 | + } | ||
221 | + chapterService.insertBatch(list); | ||
222 | + return true ; | ||
223 | + } | ||
224 | + | ||
225 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/controller/LearnStatController.java
0 → 100644
@@ -0,0 +1,1216 @@ | @@ -0,0 +1,1216 @@ | ||
1 | +package com.sincere.independence.controller; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.ChapterDto; | ||
4 | +import com.sincere.common.dto.independence.GetLearnDto; | ||
5 | +import com.sincere.common.enums.DifficultEnums; | ||
6 | +import com.sincere.common.enums.DimensionalEnums; | ||
7 | +import com.sincere.common.util.RedisUtils; | ||
8 | +import com.sincere.common.vo.independence.school.SuggestRepVo; | ||
9 | +import com.sincere.common.vo.independence.school.*; | ||
10 | +import com.sincere.independence.model.*; | ||
11 | +import com.sincere.independence.service.*; | ||
12 | +import io.swagger.annotations.ApiOperation; | ||
13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
14 | +import org.springframework.web.bind.annotation.RequestBody; | ||
15 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
16 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
17 | +import org.springframework.web.bind.annotation.RestController; | ||
18 | + | ||
19 | +import java.text.DecimalFormat; | ||
20 | +import java.util.ArrayList; | ||
21 | +import java.util.HashMap; | ||
22 | +import java.util.List; | ||
23 | +import java.util.Map; | ||
24 | + | ||
25 | +/** | ||
26 | + * @author chen | ||
27 | + * @version 1.0 | ||
28 | + * @date 2019/10/18 0018 15:54 | ||
29 | + */ | ||
30 | +@RestController | ||
31 | +@RequestMapping(value = "learn/getLearn") | ||
32 | +public class LearnStatController { | ||
33 | + @Autowired | ||
34 | + AnalyseService analyseService; | ||
35 | + | ||
36 | + @Autowired | ||
37 | + DimensionalService dimensionalService; | ||
38 | + | ||
39 | + @Autowired | ||
40 | + AnalyseDimensionalService analyseDimensionalService; | ||
41 | + | ||
42 | + @Autowired | ||
43 | + AnalyseDetailService analyseDetailService; | ||
44 | + | ||
45 | + @Autowired | ||
46 | + StudentDetailService studentDetailService; | ||
47 | + | ||
48 | + @Autowired | ||
49 | + StudentService studentService; | ||
50 | + | ||
51 | + @Autowired | ||
52 | + LeagueService leagueService; | ||
53 | + | ||
54 | + @Autowired | ||
55 | + ChapterService chapterService; | ||
56 | + | ||
57 | + @Autowired | ||
58 | + KnowledgeService knowledgeService ; | ||
59 | + | ||
60 | + | ||
61 | + @RequestMapping(value = "getForm1_1", method = RequestMethod.POST) | ||
62 | + public Form7RepVO getForm1_1(@RequestBody GetLearnDto getLearnDto){ | ||
63 | + Form7RepVO form7RepVO = new Form7RepVO(); | ||
64 | + if(RedisUtils.existsObject(getLearnDto.getAnalyseId()+"_"+getLearnDto.getSchoolName()+"_1_1")){ | ||
65 | + form7RepVO = (Form7RepVO) RedisUtils.getObject(getLearnDto.getAnalyseId()+"_"+getLearnDto.getSchoolName()+"_1_1"); | ||
66 | + }else { | ||
67 | + Analyse analyse = analyseService.selectById(getLearnDto.getAnalyseId()); | ||
68 | + form7RepVO.setExamTime(analyse.getExamTime()); | ||
69 | + form7RepVO.setMaxScore(analyse.getMaxScore()); | ||
70 | + form7RepVO.setExamScope(analyse.getExamScope()); | ||
71 | + form7RepVO.setCourseName(analyse.getCourseName()); | ||
72 | + | ||
73 | + List<Chapter> chapters = chapterService.selectByAnalyse(analyse.getId()); | ||
74 | + List<ChapterDto> chapterDtos = new ArrayList<>(); | ||
75 | + for(Chapter chapter : chapters){ | ||
76 | + ChapterDto chapterDto = new ChapterDto(); | ||
77 | + chapterDto.setAnalyseId(chapter.getAnalyseId()); | ||
78 | + chapterDto.setChapterName(chapter.getChapterName()); | ||
79 | + chapterDto.setChapterNumber(chapter.getChapterNumber()); | ||
80 | + chapterDto.setChapterScore(chapter.getChapterScore()); | ||
81 | + chapterDto.setPercent(chapter.getChapterScore() / analyse.getMaxScore() * 100); | ||
82 | + chapterDtos.add(chapterDto); | ||
83 | + } | ||
84 | + form7RepVO.setList(chapterDtos); | ||
85 | + List<Form7> difficultList = new ArrayList<>(); | ||
86 | + for (DifficultEnums difficultEnums : DifficultEnums.values()){ | ||
87 | + Form7 form7 = new Form7(); | ||
88 | + form7.setName(difficultEnums.getDifficultShow()); | ||
89 | + form7.setPercent(analyseDetailService.selectDifficult(analyse.getId(),difficultEnums.getDifficultType())/analyse.getMaxScore()*100); | ||
90 | + difficultList.add(form7); | ||
91 | + } | ||
92 | + form7RepVO.setDifficultList(difficultList); | ||
93 | + | ||
94 | + List<Form7> typeList = new ArrayList<>(); | ||
95 | + List<String> list = analyseDetailService.selectQuestionType(analyse.getId()); | ||
96 | + for(String type : list){ | ||
97 | + Form7 form7 = new Form7(); | ||
98 | + form7.setName(type); | ||
99 | + Double score = analyseDetailService.selectSumType(analyse.getId(),type); | ||
100 | + form7.setScore(score); | ||
101 | + form7.setPercent(score / analyse.getMaxScore() * 100); | ||
102 | + typeList.add(form7); | ||
103 | + } | ||
104 | + form7RepVO.setTypeList(typeList); | ||
105 | + RedisUtils.setObject(getLearnDto.getAnalyseId()+"_"+getLearnDto.getSchoolName()+"_1_1",form7RepVO); | ||
106 | + } | ||
107 | + return form7RepVO; | ||
108 | + } | ||
109 | + | ||
110 | + @RequestMapping(value = "getForm2_1_1", method = RequestMethod.POST) | ||
111 | + public Form1RepVO getForm2_1_1(@RequestBody GetLearnDto getLearnDto){ | ||
112 | + Form1RepVO form1RepVo = new Form1RepVO(); | ||
113 | + if(RedisUtils.existsObject(getLearnDto.getAnalyseId()+"_"+getLearnDto.getSchoolName()+"_2_1_1")){ | ||
114 | + form1RepVo = (Form1RepVO) RedisUtils.getObject(getLearnDto.getAnalyseId()+"_"+getLearnDto.getSchoolName()+"_2_1_1"); | ||
115 | + }else { | ||
116 | + //2.1表 | ||
117 | + Analyse analyse = analyseService.selectById(getLearnDto.getAnalyseId()); | ||
118 | + //分数段 | ||
119 | + Double maxScore = analyse.getMaxScore(); | ||
120 | + Map<String,String> segmentMap = new HashMap<>(); | ||
121 | + segmentMap.put("A(优秀)",maxScore*0.85 + "~" + maxScore+"分"); | ||
122 | + segmentMap.put("B(良好)",maxScore*0.7 + "~" + (maxScore*0.85-1f)+"分"); | ||
123 | + segmentMap.put("C(及格)",maxScore*0.6 + "~" + (maxScore*0.7-1f)+"分"); | ||
124 | + segmentMap.put("D(不及格)",0 + "~" + (maxScore*0.6-1f)+"分"); | ||
125 | + form1RepVo.setMap(segmentMap); | ||
126 | + List<Student> students = studentService.selectBySchoolName(getLearnDto.getAnalyseId(),null,getLearnDto.getSchoolName()); | ||
127 | + double sum = new Double(students.size()); | ||
128 | + int a = studentService.selectCountByScore(getLearnDto.getAnalyseId(),null,getLearnDto.getSchoolName(),maxScore*0.85,maxScore+1f); | ||
129 | + int b = studentService.selectCountByScore(getLearnDto.getAnalyseId(),null,getLearnDto.getSchoolName(),maxScore*0.7,(maxScore*0.85)); | ||
130 | + int c = studentService.selectCountByScore(getLearnDto.getAnalyseId(),null,getLearnDto.getSchoolName(),maxScore*0.6,(maxScore*0.7)); | ||
131 | + int d = studentService.selectCountByScore(getLearnDto.getAnalyseId(),null,getLearnDto.getSchoolName(),maxScore*0,(maxScore*0.6)); | ||
132 | + List<Form1> form1List = new ArrayList<>(); | ||
133 | + Form1 formA = new Form1(); | ||
134 | + formA.setLevel("A"); | ||
135 | + formA.setNumber(a); | ||
136 | + formA.setProp(a/sum*100); | ||
137 | + Form1 formB = new Form1(); | ||
138 | + formB.setLevel("B"); | ||
139 | + formB.setNumber(b); | ||
140 | + formB.setProp(b/sum*100); | ||
141 | + Form1 formC = new Form1(); | ||
142 | + formC.setLevel("C"); | ||
143 | + formC.setNumber(c); | ||
144 | + formC.setProp(c/sum*100); | ||
145 | + Form1 formD = new Form1(); | ||
146 | + formD.setLevel("D"); | ||
147 | + formD.setNumber(d); | ||
148 | + formD.setProp(d/sum*100); | ||
149 | + form1List.add(formA); | ||
150 | + form1List.add(formB); | ||
151 | + form1List.add(formC); | ||
152 | + form1List.add(formD); | ||
153 | + form1RepVo.setList(form1List); | ||
154 | + RedisUtils.setObject(getLearnDto.getAnalyseId()+"_"+getLearnDto.getSchoolName()+"_2_1_1",form1RepVo); | ||
155 | + } | ||
156 | + return form1RepVo; | ||
157 | + } | ||
158 | + | ||
159 | + @RequestMapping(value = "getForm2_1_2", method = RequestMethod.POST) | ||
160 | + public Form2RepVO getForm2_1_2(@RequestBody GetLearnDto GetLearnDto){ | ||
161 | + Form2RepVO repVO = new Form2RepVO(); | ||
162 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_1_2")){ | ||
163 | + repVO = (Form2RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_1_2"); | ||
164 | + }else { | ||
165 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
166 | + if(analyse == null){ | ||
167 | + repVO.setSuccess(false); | ||
168 | + repVO.setMessage("请先创建考试"); | ||
169 | + return repVO; | ||
170 | + } | ||
171 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),GetLearnDto.getSchoolName()); | ||
172 | + if(leagues == null){ | ||
173 | + repVO.setSuccess(false); | ||
174 | + repVO.setMessage("请先设定联盟校"); | ||
175 | + return repVO; | ||
176 | + } | ||
177 | + List<Student> allStudents = studentService.selectBySchoolName(GetLearnDto.getAnalyseId(),null,null); | ||
178 | + List<Student> leagueStudents = studentService.selectBySchoolName(GetLearnDto.getAnalyseId(),leagues,null); | ||
179 | + List<Student> students = studentService.selectBySchoolName(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName()); | ||
180 | + //先算高分段的分数 | ||
181 | + int highNumber = (int) Math.floor(allStudents.size()*0.27); | ||
182 | + double highScore = allStudents.get(highNumber).getScore(); | ||
183 | + int lowNumber = allStudents.size()-highNumber; | ||
184 | + double lowScore = allStudents.get(lowNumber).getScore(); | ||
185 | + List<Form2> list = new ArrayList<>(); | ||
186 | + | ||
187 | + int highAllCount = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),null,null,highScore,analyse.getMaxScore()+1f); | ||
188 | + int lowAllCount = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),null,null,0,lowScore); | ||
189 | + Form2 form2 = new Form2(); | ||
190 | + form2.setName("区"); | ||
191 | + form2.setStudentNumber(allStudents.size()); | ||
192 | + form2.setHighNumber(highAllCount); | ||
193 | + form2.setLowNumber(lowAllCount); | ||
194 | + list.add(form2); | ||
195 | + { | ||
196 | + int highLeagueCount = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),leagues,null,highScore,analyse.getMaxScore()+1f); | ||
197 | + int lowLeagueCount = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),leagues,null,0,lowScore); | ||
198 | + Form2 form = new Form2(); | ||
199 | + form.setName("联盟校"); | ||
200 | + form.setStudentNumber(leagueStudents.size()); | ||
201 | + form.setStudentProp(new Double(leagueStudents.size()) / new Double(allStudents.size())); | ||
202 | + form.setHighNumber(highLeagueCount); | ||
203 | + form.setLowNumber(lowLeagueCount); | ||
204 | + form.setHighProp(highLeagueCount/new Double(highAllCount)); | ||
205 | + form.setLowProp(lowLeagueCount/new Double(lowAllCount)); | ||
206 | + list.add(form); | ||
207 | + } | ||
208 | + { | ||
209 | + int highCount = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName(),highScore,analyse.getMaxScore()+1f); | ||
210 | + int lowCount = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName(),0,lowScore); | ||
211 | + Form2 form = new Form2(); | ||
212 | + form.setName(GetLearnDto.getSchoolName()); | ||
213 | + form.setStudentNumber(students.size()); | ||
214 | + form.setStudentProp(new Double(students.size()) / new Double(allStudents.size())); | ||
215 | + form.setHighNumber(highCount); | ||
216 | + form.setLowNumber(lowCount); | ||
217 | + form.setHighProp(highCount/new Double(highAllCount)); | ||
218 | + form.setLowProp(lowCount/new Double(lowAllCount)); | ||
219 | + list.add(form); | ||
220 | + } | ||
221 | + repVO.setData(list); | ||
222 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_1_2",repVO); | ||
223 | + } | ||
224 | + return repVO; | ||
225 | + } | ||
226 | + | ||
227 | + @RequestMapping(value = "getForm2_1_3_2", method = RequestMethod.POST) | ||
228 | + public Form2RepVO getForm2_1_3_2(@RequestBody GetLearnDto GetLearnDto){ | ||
229 | + Form2RepVO repVO = new Form2RepVO(); | ||
230 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_1_3_2")){ | ||
231 | + repVO = (Form2RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_1_3_2"); | ||
232 | + }else { | ||
233 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
234 | + if(analyse == null){ | ||
235 | + repVO.setSuccess(false); | ||
236 | + repVO.setMessage("请先创建考试"); | ||
237 | + return repVO; | ||
238 | + } | ||
239 | + List<Student> allStudents = studentService.selectBySchoolName(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName()); | ||
240 | + //先算高分段的分数 | ||
241 | + int highNumber = (int) Math.floor(allStudents.size()*0.27); | ||
242 | + double highScore = allStudents.get(highNumber).getScore(); | ||
243 | + int lowNumber = allStudents.size()-highNumber; | ||
244 | + double lowScore = allStudents.get(lowNumber).getScore(); | ||
245 | + int highAllCount = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName(),highScore,analyse.getMaxScore()+1f); | ||
246 | + int lowAllCount = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName(),0,lowScore); | ||
247 | + List<Form2> resultList = new ArrayList<>(); | ||
248 | + Form2 form = new Form2(); | ||
249 | + form.setName(GetLearnDto.getSchoolName()); | ||
250 | + form.setStudentNumber(allStudents.size()); | ||
251 | + form.setHighNumber(highAllCount); | ||
252 | + form.setLowNumber(lowAllCount); | ||
253 | + resultList.add(form); | ||
254 | + List<String> classNamList = studentService.selectClassNameBySchool(GetLearnDto.getAnalyseId(),GetLearnDto.getSchoolName()); | ||
255 | + for(String className : classNamList){ | ||
256 | + List<Student> list = studentService.selectByClassName(GetLearnDto.getAnalyseId(),GetLearnDto.getSchoolName(),className); | ||
257 | + int highCount = studentService.selectCountBySchoolScore(GetLearnDto.getAnalyseId(),GetLearnDto.getSchoolName(),className,highScore,analyse.getMaxScore()+1f); | ||
258 | + int lowCount = studentService.selectCountBySchoolScore(GetLearnDto.getAnalyseId(),GetLearnDto.getSchoolName(),className,0,lowScore); | ||
259 | + Form2 form2 = new Form2(); | ||
260 | + form2.setName(className); | ||
261 | + form2.setStudentNumber(list.size()); | ||
262 | + form2.setStudentProp(new Double(list.size()) / new Double(allStudents.size())); | ||
263 | + form2.setHighNumber(highCount); | ||
264 | + form2.setLowNumber(lowCount); | ||
265 | + form2.setHighProp(highCount/new Double(highAllCount)); | ||
266 | + form2.setLowProp(lowCount/new Double(lowAllCount)); | ||
267 | + resultList.add(form2); | ||
268 | + } | ||
269 | + repVO.setData(resultList); | ||
270 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_1_3_2",repVO); | ||
271 | + } | ||
272 | + return repVO; | ||
273 | + } | ||
274 | + | ||
275 | + @RequestMapping(value = "getForm2_1_3", method = RequestMethod.POST) | ||
276 | + public List<Table1> getForm2_1_3(@RequestBody GetLearnDto GetLearnDto){ | ||
277 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
278 | + List<Double> list = new ArrayList<>(); | ||
279 | + list.add(Math.ceil(analyse.getMaxScore())); | ||
280 | + list.add(Math.ceil(analyse.getMaxScore()*0.95)); | ||
281 | + list.add(Math.ceil(analyse.getMaxScore()*0.9)); | ||
282 | + list.add(Math.ceil(analyse.getMaxScore()*0.85)); | ||
283 | + list.add(Math.ceil(analyse.getMaxScore()*0.8)); | ||
284 | + list.add(Math.ceil(analyse.getMaxScore()*0.75)); | ||
285 | + list.add(Math.ceil(analyse.getMaxScore()*0.7)); | ||
286 | + list.add(Math.ceil(analyse.getMaxScore()*0.65)); | ||
287 | + list.add(Math.ceil(analyse.getMaxScore()*0.6)); | ||
288 | + list.add(Math.ceil(analyse.getMaxScore()*0.55)); | ||
289 | + list.add(Math.ceil(analyse.getMaxScore()*0.5)); | ||
290 | + list.add(Math.ceil(analyse.getMaxScore()*0.45)); | ||
291 | + list.add(Math.ceil(analyse.getMaxScore()*0.4)); | ||
292 | + list.add(Math.ceil(analyse.getMaxScore()*0.35)); | ||
293 | + list.add(Math.ceil(analyse.getMaxScore()*0.3)); | ||
294 | + list.add(Math.ceil(analyse.getMaxScore()*0)); | ||
295 | + List<Table1> list1 = new ArrayList<>(); | ||
296 | + for(int i =0 ; i <list.size() ; i++){ | ||
297 | + Table1 table1 = new Table1(); | ||
298 | + if(i == 0){ | ||
299 | + table1.setScore(list.get(i)+""); | ||
300 | + table1.setNumber(studentService.selectCountByScore(analyse.getId(),null,GetLearnDto.getSchoolName(),new Double(list.get(i)),new Double(list.get(i)+1))); | ||
301 | + }else { | ||
302 | + table1.setScore(list.get(i)+"-"+(list.get(i-1)-0.5)); | ||
303 | + table1.setNumber(studentService.selectCountByScore(analyse.getId(),null,GetLearnDto.getSchoolName(),new Double(list.get(i)),new Double(list.get(i-1)))); | ||
304 | + } | ||
305 | + list1.add(table1); | ||
306 | + } | ||
307 | + return list1; | ||
308 | + } | ||
309 | + | ||
310 | + @RequestMapping(value = "getForm2_2_1", method = RequestMethod.POST) | ||
311 | + public Form3RepVO getForm2_2_1(@RequestBody GetLearnDto GetLearnDto){ | ||
312 | + Form3RepVO repVO = new Form3RepVO(); | ||
313 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_1")){ | ||
314 | + repVO = (Form3RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_1"); | ||
315 | + }else { | ||
316 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
317 | + if(analyse == null){ | ||
318 | + repVO.setSuccess(false); | ||
319 | + repVO.setMessage("请先创建考试"); | ||
320 | + return repVO; | ||
321 | + } | ||
322 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),GetLearnDto.getSchoolName()); | ||
323 | + if(leagues == null){ | ||
324 | + repVO.setSuccess(false); | ||
325 | + repVO.setMessage("请先设定联盟校"); | ||
326 | + return repVO; | ||
327 | + } | ||
328 | + List<Form3> list = new ArrayList<>(); | ||
329 | + List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null,null); | ||
330 | + { | ||
331 | + Form3 form3 = new Form3(); | ||
332 | + form3.setName("区"); | ||
333 | + form3.setMaxScore(studentService.selectMaxScore(analyse.getId(),null,null)); | ||
334 | + form3.setAverage(studentService.selectAvgScore(analyse.getId(),null,null)); | ||
335 | + form3.setMinScore(studentService.selectMinScore(analyse.getId(),null,null)); | ||
336 | + int a = studentService.selectCountByScore(analyse.getId(),null,null,analyse.getMaxScore()*0.85,analyse.getMaxScore()+1); | ||
337 | + form3.setApercent(a / new Double(allStudents.size()) * 100); | ||
338 | + int b = studentService.selectCountByScore(analyse.getId(),null,null,analyse.getMaxScore()*0.7,analyse.getMaxScore()*0.85); | ||
339 | + form3.setBpercent(b / new Double(allStudents.size()) * 100); | ||
340 | + int c = studentService.selectCountByScore(analyse.getId(),null,null,analyse.getMaxScore()*0.6,analyse.getMaxScore()*0.7); | ||
341 | + form3.setCpercent(c / new Double(allStudents.size()) * 100); | ||
342 | + int d = studentService.selectCountByScore(analyse.getId(),null,null,analyse.getMaxScore()*0,analyse.getMaxScore()*0.6); | ||
343 | + form3.setDpercent(d / new Double(allStudents.size()) * 100); | ||
344 | + list.add(form3); | ||
345 | + } | ||
346 | + { | ||
347 | + Form3 form = new Form3(); | ||
348 | + form.setName("联盟校"); | ||
349 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),leagues,null); | ||
350 | + form.setMaxScore(studentService.selectMaxScore(analyse.getId(),leagues,null)); | ||
351 | + form.setAverage(studentService.selectAvgScore(analyse.getId(),leagues,null)); | ||
352 | + form.setMinScore(studentService.selectMinScore(analyse.getId(),leagues,null)); | ||
353 | + int a1 = studentService.selectCountByScore(analyse.getId(),leagues,null,analyse.getMaxScore()*0.85,analyse.getMaxScore()+1); | ||
354 | + form.setApercent(a1 / new Double(students.size()) * 100); | ||
355 | + int b1 = studentService.selectCountByScore(analyse.getId(),leagues,null,analyse.getMaxScore()*0.7,analyse.getMaxScore()*0.85); | ||
356 | + form.setBpercent(b1 / new Double(students.size()) * 100); | ||
357 | + int c1 = studentService.selectCountByScore(analyse.getId(),leagues,null,analyse.getMaxScore()*0.6,analyse.getMaxScore()*0.7); | ||
358 | + form.setCpercent(c1 / new Double(students.size()) * 100); | ||
359 | + int d1 = studentService.selectCountByScore(analyse.getId(),leagues,null,analyse.getMaxScore()*0,analyse.getMaxScore()*0.6); | ||
360 | + form.setDpercent(d1 / new Double(students.size()) * 100); | ||
361 | + list.add(form); | ||
362 | + } | ||
363 | + { | ||
364 | + Form3 form = new Form3(); | ||
365 | + form.setName(GetLearnDto.getSchoolName()); | ||
366 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,GetLearnDto.getSchoolName()); | ||
367 | + form.setMaxScore(studentService.selectMaxScore(analyse.getId(),null,GetLearnDto.getSchoolName())); | ||
368 | + form.setAverage(studentService.selectAvgScore(analyse.getId(),null,GetLearnDto.getSchoolName())); | ||
369 | + form.setMinScore(studentService.selectMinScore(analyse.getId(),null,GetLearnDto.getSchoolName())); | ||
370 | + int a1 = studentService.selectCountByScore(analyse.getId(),null,GetLearnDto.getSchoolName(),analyse.getMaxScore()*0.85,analyse.getMaxScore()+1); | ||
371 | + form.setApercent(a1 / new Double(students.size()) * 100); | ||
372 | + int b1 = studentService.selectCountByScore(analyse.getId(),null,GetLearnDto.getSchoolName(),analyse.getMaxScore()*0.7,analyse.getMaxScore()*0.85); | ||
373 | + form.setBpercent(b1 / new Double(students.size()) * 100); | ||
374 | + int c1 = studentService.selectCountByScore(analyse.getId(),null,GetLearnDto.getSchoolName(),analyse.getMaxScore()*0.6,analyse.getMaxScore()*0.7); | ||
375 | + form.setCpercent(c1 / new Double(students.size()) * 100); | ||
376 | + int d1 = studentService.selectCountByScore(analyse.getId(),null,GetLearnDto.getSchoolName(),analyse.getMaxScore()*0,analyse.getMaxScore()*0.6); | ||
377 | + form.setDpercent(d1 / new Double(students.size()) * 100); | ||
378 | + list.add(form); | ||
379 | + } | ||
380 | + repVO.setData(list); | ||
381 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_1",repVO); | ||
382 | + } | ||
383 | + return repVO ; | ||
384 | + } | ||
385 | + | ||
386 | + @RequestMapping(value = "getForm2_2_2", method = RequestMethod.POST) | ||
387 | + public Form4RepVO getForm2_2_2(@RequestBody GetLearnDto GetLearnDto){ | ||
388 | + Form4RepVO repVO = new Form4RepVO(); | ||
389 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_2")){ | ||
390 | + repVO = (Form4RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_2"); | ||
391 | + }else { | ||
392 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
393 | + if(analyse == null){ | ||
394 | + repVO.setSuccess(false); | ||
395 | + repVO.setMessage("请先创建考试"); | ||
396 | + return repVO; | ||
397 | + } | ||
398 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),GetLearnDto.getSchoolName()); | ||
399 | + if(leagues == null){ | ||
400 | + repVO.setSuccess(false); | ||
401 | + repVO.setMessage("请先设定联盟校"); | ||
402 | + return repVO; | ||
403 | + } | ||
404 | + List<Form4> list = new ArrayList<>(); | ||
405 | + { | ||
406 | + Form4 form4 = new Form4(); | ||
407 | + form4.setName("区"); | ||
408 | + form4.setModeNumber(studentService.selectModeNumber(analyse.getId(),null,null)); | ||
409 | + form4.setMedianNumber(studentService.selectMedian(analyse.getId(),null,null)); | ||
410 | + form4.setStdev(studentService.selectStdev(analyse.getId(),null,null)); | ||
411 | + form4.setAvgNumber(studentService.selectAvgScore(analyse.getId(),null,null)); | ||
412 | + list.add(form4); | ||
413 | + } | ||
414 | + { | ||
415 | + Form4 form = new Form4(); | ||
416 | + form.setName("联盟校"); | ||
417 | + form.setModeNumber(studentService.selectModeNumber(analyse.getId(),leagues,null)); | ||
418 | + form.setMedianNumber(studentService.selectMedian(analyse.getId(),leagues,null)); | ||
419 | + form.setStdev(studentService.selectStdev(analyse.getId(),leagues,null)); | ||
420 | + form.setAvgNumber(studentService.selectAvgScore(analyse.getId(),leagues,null)); | ||
421 | + list.add(form); | ||
422 | + } | ||
423 | + { | ||
424 | + Form4 form = new Form4(); | ||
425 | + form.setName(GetLearnDto.getSchoolName()); | ||
426 | + form.setModeNumber(studentService.selectModeNumber(analyse.getId(),null,GetLearnDto.getSchoolName())); | ||
427 | + form.setMedianNumber(studentService.selectMedian(analyse.getId(),null,GetLearnDto.getSchoolName())); | ||
428 | + form.setStdev(studentService.selectStdev(analyse.getId(),null,GetLearnDto.getSchoolName())); | ||
429 | + form.setAvgNumber(studentService.selectAvgScore(analyse.getId(),null,GetLearnDto.getSchoolName())); | ||
430 | + list.add(form); | ||
431 | + } | ||
432 | + repVO.setData(list); | ||
433 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_2",repVO); | ||
434 | + } | ||
435 | + return repVO; | ||
436 | + } | ||
437 | + | ||
438 | + @RequestMapping(value = "getForm2_2_3", method = RequestMethod.POST) | ||
439 | + public Form5RepVO getForm2_2_3(@RequestBody GetLearnDto GetLearnDto){ | ||
440 | + Form5RepVO repVO = new Form5RepVO(); | ||
441 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_3")){ | ||
442 | + repVO = (Form5RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_3"); | ||
443 | + }else { | ||
444 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
445 | + if(analyse == null){ | ||
446 | + repVO.setSuccess(false); | ||
447 | + repVO.setMessage("请先创建考试"); | ||
448 | + return repVO; | ||
449 | + } | ||
450 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),GetLearnDto.getSchoolName()); | ||
451 | + if(leagues == null){ | ||
452 | + repVO.setSuccess(false); | ||
453 | + repVO.setMessage("请先设定联盟校"); | ||
454 | + return repVO; | ||
455 | + } | ||
456 | + List<String> allHighStudent = new ArrayList<>(); | ||
457 | + List<String> allLowStudent = new ArrayList<>(); | ||
458 | + List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null,null); | ||
459 | + int allNumber = (int) Math.floor(allStudents.size()*0.27) ; | ||
460 | + { | ||
461 | + //获取区 高分段,低分段学生编号 | ||
462 | + for (int i = 0; i < allNumber ; i++) { | ||
463 | + allHighStudent.add(allStudents.get(i).getStudentNumber()); | ||
464 | + } | ||
465 | + for(int i =allStudents.size()-allNumber ; i < allStudents.size() ; i++){ | ||
466 | + allLowStudent.add(allStudents.get(i).getStudentNumber()); | ||
467 | + } | ||
468 | + } | ||
469 | + List<String> leagueHighStudent = new ArrayList<>(); | ||
470 | + List<String> leagueLowStudent = new ArrayList<>(); | ||
471 | + List<Student> leagueStudents = studentService.selectBySchoolName(analyse.getId(),leagues,null); | ||
472 | + int leagueNumber = (int) Math.floor(leagueStudents.size()*0.27) ; | ||
473 | + { | ||
474 | + //获取联盟校 高分段 低分段 学生编号 | ||
475 | + for (int i = 0; i < leagueNumber ; i++) { | ||
476 | + leagueHighStudent.add(leagueStudents.get(i).getStudentNumber()); | ||
477 | + } | ||
478 | + for(int i =leagueStudents.size()-leagueNumber ; i < leagueStudents.size() ; i++){ | ||
479 | + leagueLowStudent.add(leagueStudents.get(i).getStudentNumber()); | ||
480 | + } | ||
481 | + } | ||
482 | + List<String> highStudent = new ArrayList<>(); | ||
483 | + List<String> lowStudent = new ArrayList<>(); | ||
484 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,GetLearnDto.getSchoolName()); | ||
485 | + int number = (int) Math.floor(students.size()*0.27) ; | ||
486 | + { | ||
487 | + //获取本校高分段 低分段 学生编号 | ||
488 | + for (int i = 0; i < number ; i++) { | ||
489 | + highStudent.add(students.get(i).getStudentNumber()); | ||
490 | + } | ||
491 | + for(int i =students.size()-number ; i < students.size() ; i++){ | ||
492 | + lowStudent.add(students.get(i).getStudentNumber()); | ||
493 | + } | ||
494 | + } | ||
495 | + | ||
496 | + List<Form5> list = new ArrayList<>(); | ||
497 | + | ||
498 | + List<AnalyseDetail> analyseDetails = analyseDetailService.selectByAnalyseId(analyse.getId()); | ||
499 | + for(AnalyseDetail analyseDetail : analyseDetails){ | ||
500 | + Form5 from5 = new Form5(); | ||
501 | + Double allSumScore = studentDetailService.selectSumScore(analyse.getId(),null,null,analyseDetail.getQuestionNumber()); | ||
502 | + Double leagueSumScore = studentDetailService.selectSumScore(analyse.getId(),leagues,null,analyseDetail.getQuestionNumber()); | ||
503 | + Double schoolSumScore = studentDetailService.selectSumScore(analyse.getId(),null,GetLearnDto.getSchoolName(),analyseDetail.getQuestionNumber()); | ||
504 | + from5.setExamNumber(analyseDetail.getQuestionNumber()); | ||
505 | + from5.setScore(analyseDetail.getScore()); | ||
506 | + from5.setDifficultName(DifficultEnums.getDifficultName(analyseDetail.getDifficult())); | ||
507 | + from5.setAllRate(allSumScore/new Double(allStudents.size()) / analyseDetail.getScore()); | ||
508 | + from5.setLeagueRate(leagueSumScore/new Double(leagueStudents.size()) / analyseDetail.getScore()); | ||
509 | + from5.setSchoolRate(schoolSumScore/new Double(students.size()) / analyseDetail.getScore()); | ||
510 | + | ||
511 | + from5.setAllAvg(allSumScore / new Double(allStudents.size())); | ||
512 | + from5.setLeagueAvg(leagueSumScore / new Double(leagueStudents.size())); | ||
513 | + from5.setSchoolAvg(schoolSumScore / new Double(students.size())); | ||
514 | + | ||
515 | + int allHigh = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,null ,analyseDetail.getQuestionNumber(),allHighStudent); | ||
516 | + int allLow = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,null ,analyseDetail.getQuestionNumber(),allLowStudent); | ||
517 | + | ||
518 | + int leagueHigh = studentDetailService.selectTrueByExamNumber(analyse.getId(),leagues,null ,analyseDetail.getQuestionNumber(),allHighStudent); | ||
519 | + int leagueLow = studentDetailService.selectTrueByExamNumber(analyse.getId(),leagues,null ,analyseDetail.getQuestionNumber(),allLowStudent); | ||
520 | + | ||
521 | + int high = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,GetLearnDto.getSchoolName() ,analyseDetail.getQuestionNumber(),highStudent); | ||
522 | + int low = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,GetLearnDto.getSchoolName() ,analyseDetail.getQuestionNumber(),lowStudent); | ||
523 | + from5.setAllDist(new Double(allHigh-allLow)/new Double(allNumber)); | ||
524 | + from5.setLeagueDist(new Double(leagueHigh-leagueLow)/new Double(leagueNumber)); | ||
525 | + from5.setSchoolDist(new Double(high-low)/new Double(number)); | ||
526 | + list.add(from5); | ||
527 | + } | ||
528 | + repVO.setData(list); | ||
529 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_3",repVO); | ||
530 | + } | ||
531 | + return repVO; | ||
532 | + } | ||
533 | + | ||
534 | + @RequestMapping(value = "getForm2_2_4", method = RequestMethod.POST) | ||
535 | + public Form8RepVO getForm2_2_4(@RequestBody GetLearnDto GetLearnDto){ | ||
536 | + Form8RepVO repVO = new Form8RepVO(); | ||
537 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_4")){ | ||
538 | + repVO = (Form8RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_4"); | ||
539 | + }else { | ||
540 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
541 | + if(analyse == null){ | ||
542 | + repVO.setSuccess(false); | ||
543 | + repVO.setMessage("请先创建考试"); | ||
544 | + return repVO; | ||
545 | + } | ||
546 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),GetLearnDto.getSchoolName()); | ||
547 | + if(leagues == null){ | ||
548 | + repVO.setSuccess(false); | ||
549 | + repVO.setMessage("请先设定联盟校"); | ||
550 | + return repVO; | ||
551 | + } | ||
552 | + List<Form8> list = new ArrayList<>(); | ||
553 | + List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null,null); | ||
554 | + List<Student> leagueStudents = studentService.selectBySchoolName(analyse.getId(),leagues,null); | ||
555 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,GetLearnDto.getSchoolName()); | ||
556 | + for(DifficultEnums enums : DifficultEnums.values()){ | ||
557 | + Form8 form8 = new Form8(); | ||
558 | + form8.setDifficultName(enums.getDifficultName()); | ||
559 | + form8.setScore(analyseDetailService.selectDifficult(analyse.getId(),enums.getDifficultType())); | ||
560 | + List<AnalyseDetail> analyseDetails = analyseDetailService.selectDifficultDetail(analyse.getId(),enums.getDifficultType()); | ||
561 | + Double allSumScore = 0d , leagueSumScore = 0d , schoolSumScore = 0d , score = 0d; | ||
562 | + for(AnalyseDetail analyseDetail : analyseDetails){ | ||
563 | + allSumScore = allSumScore + studentDetailService.selectSumScore(analyse.getId(),null,null,analyseDetail.getQuestionNumber()); | ||
564 | + leagueSumScore = leagueSumScore + studentDetailService.selectSumScore(analyse.getId(),leagues,null,analyseDetail.getQuestionNumber()); | ||
565 | + schoolSumScore = schoolSumScore + studentDetailService.selectSumScore(analyse.getId(),null,GetLearnDto.getSchoolName(),analyseDetail.getQuestionNumber()); | ||
566 | + score = score + analyseDetail.getScore() ; | ||
567 | + } | ||
568 | + form8.setAllRate(allSumScore / new Double(allStudents.size()) / score ); | ||
569 | + form8.setLeagueRate(leagueSumScore / new Double(leagueStudents.size()) / score ); | ||
570 | + form8.setSchoolRate(schoolSumScore / new Double(students.size()) / score); | ||
571 | + list.add(form8); | ||
572 | + } | ||
573 | + repVO.setData(list); | ||
574 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_2_2_4",repVO); | ||
575 | + } | ||
576 | + return repVO; | ||
577 | + } | ||
578 | + | ||
579 | + @RequestMapping(value = "getForm2_2_5", method = RequestMethod.POST) | ||
580 | + public Map<String,Double> getForm2_2_5(@RequestBody GetLearnDto GetLearnDto){ | ||
581 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
582 | + //分数段 | ||
583 | + Double maxScore = analyse.getMaxScore(); | ||
584 | + Map<String,Double> segmentMap = new HashMap<>(); | ||
585 | + segmentMap.put("A",maxScore*0.85); | ||
586 | + segmentMap.put("B",maxScore*0.7); | ||
587 | + segmentMap.put("C",maxScore*0.6); | ||
588 | + segmentMap.put("D",maxScore*0.6); | ||
589 | + return segmentMap ; | ||
590 | + } | ||
591 | + | ||
592 | + @RequestMapping(value = "getForm3_1", method = RequestMethod.POST) | ||
593 | + public Form6RepVO getForm3_1(@RequestBody GetLearnDto GetLearnDto){ | ||
594 | + Form6RepVO form6RepVO = new Form6RepVO(); | ||
595 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_1")){ | ||
596 | + form6RepVO = (Form6RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_1"); | ||
597 | + }else { | ||
598 | + form6RepVO = initDimensional(GetLearnDto, DimensionalEnums.knowledge.getDimensionalType()) ; | ||
599 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_1",form6RepVO); | ||
600 | + } | ||
601 | + return form6RepVO; | ||
602 | + } | ||
603 | + | ||
604 | + @RequestMapping(value = "getForm3_1_1", method = RequestMethod.POST) | ||
605 | + public Table2RepVO getForm3_1_1(@RequestBody GetLearnDto GetLearnDto){ | ||
606 | + Table2RepVO table2RepVO = new Table2RepVO(); | ||
607 | + Form6RepVO form6RepVO = new Form6RepVO(); | ||
608 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_1")){ | ||
609 | + form6RepVO = (Form6RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_1"); | ||
610 | + }else { | ||
611 | + form6RepVO = initDimensional(GetLearnDto,DimensionalEnums.knowledge.getDimensionalType()) ; | ||
612 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_1",form6RepVO); | ||
613 | + } | ||
614 | + List<Knowledge> knowledges = knowledgeService.selectAll(); | ||
615 | + List<Table2> table2List = new ArrayList<>(); | ||
616 | + for(Knowledge knowledge : knowledges){ | ||
617 | + Double sumScore = new Double("0"); | ||
618 | + Double getScore = new Double("0"); | ||
619 | + String[] detailArray = knowledge.getDetail().split("、"); | ||
620 | + for(String detail : detailArray){ | ||
621 | + for(Form6 form6 : form6RepVO.getData()){ | ||
622 | + if(detail.equals(form6.getDimensional())){ | ||
623 | + sumScore = sumScore + form6.getScore() ; | ||
624 | + getScore = getScore + form6.getSchoolRate()*form6.getScore(); | ||
625 | + } | ||
626 | + } | ||
627 | + } | ||
628 | + if(sumScore > 0){ | ||
629 | + Table2 table2 = new Table2(); | ||
630 | + table2.setKnowledge(knowledge.getKnowledge()); | ||
631 | + table2.setAvg(knowledge.getAvg()); | ||
632 | + table2.setRate(knowledge.getRate()); | ||
633 | + table2.setSchoolRate(getScore / sumScore); | ||
634 | + table2List.add(table2); | ||
635 | + } | ||
636 | + } | ||
637 | + List<Table2> data = sort(table2List); | ||
638 | + table2RepVO.setData(data); | ||
639 | + return table2RepVO; | ||
640 | + } | ||
641 | + | ||
642 | + private List<Table2> sort(List<Table2> target){ | ||
643 | + List<Table2> course = new ArrayList<>(); | ||
644 | + if(target.size() > 0){ | ||
645 | + for(Table2 table2 : target){ | ||
646 | + if(table2.getSchoolRate() < 0.75 && Double.valueOf(table2.getAvg()) >2){ | ||
647 | + course.add(table2); | ||
648 | + } | ||
649 | + } | ||
650 | + if(course.size() == 0){ | ||
651 | + Double avg = new Double("0"); | ||
652 | + Table2 result = new Table2(); | ||
653 | + for(Table2 table2 : target){ | ||
654 | + if(avg < new Double(table2.getAvg())){ | ||
655 | + avg = new Double(table2.getAvg()) ; | ||
656 | + result = table2 ; | ||
657 | + } | ||
658 | + } | ||
659 | + course.add(result); | ||
660 | + } | ||
661 | + | ||
662 | + if(course.size() > 5){ | ||
663 | + course = course.subList(0,5); | ||
664 | + } | ||
665 | + for (int i = 0; i < course.size() ; i++) { | ||
666 | + Table2 temp = new Table2(); | ||
667 | + for (int j = 0; j < course.size() ; j++) { | ||
668 | + if(new Double(course.get(i).getAvg()) > new Double(course.get(j).getAvg())){ | ||
669 | + temp = course.get(j); | ||
670 | + course.set(j,course.get(i)); | ||
671 | + course.set(i,temp); | ||
672 | + } | ||
673 | + } | ||
674 | + } | ||
675 | + } | ||
676 | + return course; | ||
677 | + } | ||
678 | + | ||
679 | + @RequestMapping(value = "getForm3_2", method = RequestMethod.POST) | ||
680 | + public Form6RepVO getForm3_2(@RequestBody GetLearnDto GetLearnDto){ | ||
681 | + Form6RepVO form6RepVO = new Form6RepVO(); | ||
682 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_2")){ | ||
683 | + form6RepVO = (Form6RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_2"); | ||
684 | + }else { | ||
685 | + form6RepVO = initDimensional(GetLearnDto,DimensionalEnums.skill.getDimensionalType()) ; | ||
686 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_2",form6RepVO); | ||
687 | + } | ||
688 | + return form6RepVO; | ||
689 | + } | ||
690 | + | ||
691 | + @RequestMapping(value = "getForm3_3", method = RequestMethod.POST) | ||
692 | + public Form6RepVO getForm3_3(@RequestBody GetLearnDto GetLearnDto){ | ||
693 | + Form6RepVO form6RepVO = new Form6RepVO(); | ||
694 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_3")){ | ||
695 | + form6RepVO = (Form6RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_3"); | ||
696 | + }else { | ||
697 | + form6RepVO = initDimensional(GetLearnDto,DimensionalEnums.ability.getDimensionalType()) ; | ||
698 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_3",form6RepVO); | ||
699 | + } | ||
700 | + return form6RepVO; | ||
701 | + } | ||
702 | + | ||
703 | + @RequestMapping(value = "getForm3_4", method = RequestMethod.POST) | ||
704 | + public Form6RepVO getForm3_4(@RequestBody GetLearnDto GetLearnDto){ | ||
705 | + Form6RepVO form6RepVO = new Form6RepVO(); | ||
706 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_4")){ | ||
707 | + form6RepVO = (Form6RepVO) RedisUtils.getObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_4"); | ||
708 | + }else { | ||
709 | + form6RepVO = initDimensional(GetLearnDto,DimensionalEnums.think.getDimensionalType()) ; | ||
710 | + RedisUtils.setObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_3_4",form6RepVO); | ||
711 | + } | ||
712 | + return form6RepVO; | ||
713 | + } | ||
714 | + | ||
715 | + private Form6RepVO initDimensional(GetLearnDto GetLearnDto , int dimensionalType){ | ||
716 | + Form6RepVO repVO = new Form6RepVO(); | ||
717 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
718 | + if(analyse == null){ | ||
719 | + repVO.setSuccess(false); | ||
720 | + repVO.setMessage("请先创建考试"); | ||
721 | + return repVO; | ||
722 | + } | ||
723 | + List<String> leagues = leagueService.getLeagueBySchoolName(analyse.getId(),GetLearnDto.getSchoolName()); | ||
724 | + if(leagues == null){ | ||
725 | + repVO.setSuccess(false); | ||
726 | + repVO.setMessage("请先设定区"); | ||
727 | + return repVO; | ||
728 | + } | ||
729 | + List<String> allHighStudent = new ArrayList<>(); | ||
730 | + List<String> allLowStudent = new ArrayList<>(); | ||
731 | + List<Student> allStudents = studentService.selectBySchoolName(analyse.getId(),null,null); | ||
732 | + int allNumber = (int) Math.floor(allStudents.size()*0.27) ; | ||
733 | + { | ||
734 | + //获取区 高分段,低分段学生编号 | ||
735 | + for (int i = 0; i < allNumber ; i++) { | ||
736 | + allHighStudent.add(allStudents.get(i).getStudentNumber()); | ||
737 | + } | ||
738 | + for(int i =allStudents.size()-allNumber ; i < allStudents.size() ; i++){ | ||
739 | + allLowStudent.add(allStudents.get(i).getStudentNumber()); | ||
740 | + } | ||
741 | + } | ||
742 | + List<String> leagueHighStudent = new ArrayList<>(); | ||
743 | + List<String> leagueLowStudent = new ArrayList<>(); | ||
744 | + List<Student> leagueStudents = studentService.selectBySchoolName(analyse.getId(),leagues,null); | ||
745 | + int leagueNumber = (int) Math.floor(leagueStudents.size()*0.27) ; | ||
746 | + { | ||
747 | + //获取联盟校 高分段 低分段 学生编号 | ||
748 | + for (int i = 0; i < leagueNumber ; i++) { | ||
749 | + leagueHighStudent.add(leagueStudents.get(i).getStudentNumber()); | ||
750 | + } | ||
751 | + for(int i =leagueStudents.size()-leagueNumber ; i < leagueStudents.size() ; i++){ | ||
752 | + leagueLowStudent.add(leagueStudents.get(i).getStudentNumber()); | ||
753 | + } | ||
754 | + } | ||
755 | + List<String> highStudent = new ArrayList<>(); | ||
756 | + List<String> lowStudent = new ArrayList<>(); | ||
757 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,GetLearnDto.getSchoolName()); | ||
758 | + int number = (int) Math.floor(students.size()*0.27) ; | ||
759 | + { | ||
760 | + //获取本校高分段 低分段 学生编号 | ||
761 | + for (int i = 0; i < number ; i++) { | ||
762 | + highStudent.add(students.get(i).getStudentNumber()); | ||
763 | + } | ||
764 | + for(int i =students.size()-number ; i < students.size() ; i++){ | ||
765 | + lowStudent.add(students.get(i).getStudentNumber()); | ||
766 | + } | ||
767 | + } | ||
768 | + | ||
769 | + List<Form6> list = new ArrayList<>(); | ||
770 | + | ||
771 | + List<Dimensional> knowledgeList = dimensionalService.selectByAnalyse(analyse.getId(),dimensionalType); | ||
772 | + for(Dimensional dimensional : knowledgeList){ | ||
773 | + Form6 form6 = new Form6(); | ||
774 | + form6.setDimensional(dimensional.getDimensionalName()); | ||
775 | + List<AnalyseDimensional> analyseDimensionals = analyseDimensionalService.selectByDimensional(analyse.getId(),dimensional.getId()); | ||
776 | + Double score = 0d; | ||
777 | + StringBuffer examNumber = new StringBuffer(); | ||
778 | + List<String> examNumberList = new ArrayList<>(); | ||
779 | + for(AnalyseDimensional analyseDimensional :analyseDimensionals){ | ||
780 | + score = score + analyseDimensional.getScore() ; | ||
781 | + String questionNumber = analyseDimensional.getQuestionNumber(); | ||
782 | + if(questionNumber.contains("(")){ | ||
783 | + questionNumber = questionNumber.split("\\(")[0]; | ||
784 | + } | ||
785 | + if(!examNumber.toString().contains(questionNumber)){ | ||
786 | + examNumber.append(questionNumber).append(","); | ||
787 | + } | ||
788 | + examNumberList.add(analyseDimensional.getQuestionNumber()); | ||
789 | + } | ||
790 | + Double allSumScore = studentDetailService.selectSumScore(analyse.getId(),null,null,examNumberList); | ||
791 | + int allHigh = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,null ,examNumberList,allHighStudent); | ||
792 | + int allLow = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,null ,examNumberList,allLowStudent); | ||
793 | + | ||
794 | + Double leagueSumScore = studentDetailService.selectSumScore(analyse.getId(),leagues,null,examNumberList); | ||
795 | + int leagueHigh = studentDetailService.selectTrueByExamNumber(analyse.getId(),leagues,null ,examNumberList,leagueHighStudent); | ||
796 | + int leagueLow = studentDetailService.selectTrueByExamNumber(analyse.getId(),leagues,null ,examNumberList,leagueLowStudent); | ||
797 | + | ||
798 | + Double schoolSumScore = studentDetailService.selectSumScore(analyse.getId(),null,GetLearnDto.getSchoolName(),examNumberList); | ||
799 | + int high = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,GetLearnDto.getSchoolName() ,examNumberList,highStudent); | ||
800 | + int low = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,GetLearnDto.getSchoolName() ,examNumberList,lowStudent); | ||
801 | + | ||
802 | + form6.setScore(score); | ||
803 | + form6.setAllRate(allSumScore / new Double(allStudents.size()) / score ); | ||
804 | + form6.setLeagueRate(leagueSumScore / new Double(leagueStudents.size()) / score ); | ||
805 | + form6.setSchoolRate(schoolSumScore / new Double(students.size()) / score); | ||
806 | + | ||
807 | + form6.setAllAvg(allSumScore / new Double(allStudents.size())); | ||
808 | + form6.setLeagueAvg(leagueSumScore / new Double(leagueStudents.size())); | ||
809 | + form6.setSchoolAvg(schoolSumScore / new Double(students.size())); | ||
810 | + | ||
811 | + form6.setAllDist(new Double(allHigh-allLow) / new Double(allNumber * analyseDimensionals.size())); | ||
812 | + form6.setLeagueDist(new Double(leagueHigh-leagueLow) / new Double(leagueNumber * analyseDimensionals.size())); | ||
813 | + form6.setSchoolDist(new Double(high-low) / new Double(number * analyseDimensionals.size())); | ||
814 | + form6.setExamNumber(examNumber.toString().substring(0,examNumber.toString().length()-1)); | ||
815 | + list.add(form6); | ||
816 | + } | ||
817 | + repVO.setData(list); | ||
818 | + return repVO; | ||
819 | + } | ||
820 | + | ||
821 | + private Form6RepVO initSchoolDimensional(GetLearnDto GetLearnDto , int dimensionalType){ | ||
822 | + Form6RepVO repVO = new Form6RepVO(); | ||
823 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
824 | + if(analyse == null){ | ||
825 | + repVO.setSuccess(false); | ||
826 | + repVO.setMessage("请先创建考试"); | ||
827 | + return repVO; | ||
828 | + } | ||
829 | + List<String> highStudent = new ArrayList<>(); | ||
830 | + List<String> lowStudent = new ArrayList<>(); | ||
831 | + List<Student> students = studentService.selectBySchoolName(analyse.getId(),null,GetLearnDto.getSchoolName()); | ||
832 | + int number = (int) Math.floor(students.size()*0.27) ; | ||
833 | + { | ||
834 | + //获取本校高分段 低分段 学生编号 | ||
835 | + for (int i = 0; i < number ; i++) { | ||
836 | + highStudent.add(students.get(i).getStudentNumber()); | ||
837 | + } | ||
838 | + for(int i =students.size()-number ; i < students.size() ; i++){ | ||
839 | + lowStudent.add(students.get(i).getStudentNumber()); | ||
840 | + } | ||
841 | + } | ||
842 | + List<Form6> list = new ArrayList<>(); | ||
843 | + List<Dimensional> knowledgeList = dimensionalService.selectByAnalyse(analyse.getId(),dimensionalType); | ||
844 | + for(Dimensional dimensional : knowledgeList){ | ||
845 | + Form6 form6 = new Form6(); | ||
846 | + form6.setDimensional(dimensional.getDimensionalName()); | ||
847 | + List<AnalyseDimensional> analyseDimensionals = analyseDimensionalService.selectByDimensional(analyse.getId(),dimensional.getId()); | ||
848 | + Double score = 0d; | ||
849 | + StringBuffer examNumber = new StringBuffer(); | ||
850 | + List<String> examNumberList = new ArrayList<>(); | ||
851 | + for(AnalyseDimensional analyseDimensional :analyseDimensionals){ | ||
852 | + score = score + analyseDimensional.getScore() ; | ||
853 | + examNumber.append(analyseDimensional.getQuestionNumber()).append(","); | ||
854 | + examNumberList.add(analyseDimensional.getQuestionNumber()); | ||
855 | + } | ||
856 | + Double schoolSumScore = studentDetailService.selectSumScore(analyse.getId(),null,GetLearnDto.getSchoolName(),examNumberList); | ||
857 | + int high = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,GetLearnDto.getSchoolName() ,examNumberList,highStudent); | ||
858 | + int low = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,GetLearnDto.getSchoolName() ,examNumberList,lowStudent); | ||
859 | + form6.setScore(score); | ||
860 | + form6.setSchoolRate(schoolSumScore / new Double(students.size()) / score); | ||
861 | + form6.setSchoolAvg(schoolSumScore / new Double(students.size())); | ||
862 | + form6.setSchoolDist(new Double(high-low) / new Double(number * analyseDimensionals.size())); | ||
863 | + form6.setExamNumber(examNumber.toString().substring(0,examNumber.toString().length()-1)); | ||
864 | + list.add(form6); | ||
865 | + } | ||
866 | + repVO.setData(list); | ||
867 | + return repVO; | ||
868 | + } | ||
869 | + | ||
870 | + @RequestMapping(value = "getSuggest", method = RequestMethod.POST) | ||
871 | + public String getSuggest(@RequestBody GetLearnDto GetLearnDto){ | ||
872 | + String suggest = null ; | ||
873 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_suggest")){ | ||
874 | + suggest = RedisUtils.getString(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_suggest"); | ||
875 | + }else { | ||
876 | + SuggestRepVo suggestRepVo = new SuggestRepVo() ; | ||
877 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
878 | + Double avg = studentService.selectAvgScore(analyse.getId(),null,GetLearnDto.getSchoolName()) ; | ||
879 | + DecimalFormat df = new DecimalFormat("#.00"); | ||
880 | + //得分率 | ||
881 | + String avgStr = df.format(avg / analyse.getMaxScore()); | ||
882 | + | ||
883 | + List<Student> students = studentService.selectBySchoolName(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName()); | ||
884 | + int a = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName(),analyse.getMaxScore()*0.85,analyse.getMaxScore()+1f); | ||
885 | + //优秀率 | ||
886 | + Double apercent = new Double(a) / new Double(students.size()) * 100 ; | ||
887 | + String aStr = df.format(apercent); | ||
888 | + String access = ""; | ||
889 | + if(avg>=80){ | ||
890 | + if(apercent >= 20){ | ||
891 | + access = "良好"; | ||
892 | + }else { | ||
893 | + access = "相对可以"; | ||
894 | + } | ||
895 | + }else if(avg >= 75){ | ||
896 | + if(apercent >= 35){ | ||
897 | + access = "很好"; | ||
898 | + }else if(apercent >= 20){ | ||
899 | + access = "良好"; | ||
900 | + }else { | ||
901 | + access = "相对可以"; | ||
902 | + } | ||
903 | + }else if(avg >= 70){ | ||
904 | + if(apercent >= 20){ | ||
905 | + access = "良好"; | ||
906 | + }else { | ||
907 | + access = "相对可以"; | ||
908 | + } | ||
909 | + } else if (avg >= 60) { | ||
910 | + if(apercent >= 10){ | ||
911 | + access = "相对可以"; | ||
912 | + }else { | ||
913 | + access = "一般"; | ||
914 | + } | ||
915 | + }else { | ||
916 | + access = "暴露出一些问题,试卷偏难,学生掌握不够理想"; | ||
917 | + } | ||
918 | + suggestRepVo.setAssess(access); | ||
919 | + suggestRepVo.setDifficultyDegree(avgStr); | ||
920 | + suggestRepVo.setExcellentRate(aStr); | ||
921 | + suggestRepVo.setErrorList(getErrorRate(GetLearnDto.getAnalyseId(),GetLearnDto.getSchoolName(),students.size())); | ||
922 | + Form6RepVO knowledge = initSchoolDimensional(GetLearnDto,DimensionalEnums.knowledge.getDimensionalType()); | ||
923 | + List<String> lessKnowledgeList = new ArrayList<>(); //不足50% | ||
924 | + List<String> midKnowledgeList = new ArrayList<>(); //50-70% | ||
925 | + for(Form6 form6 :knowledge.getData()){ | ||
926 | + if(form6.getSchoolRate() < 0.5d){ | ||
927 | + lessKnowledgeList.add(form6.getDimensional()); | ||
928 | + }else if(form6.getSchoolRate() < 0.7d){ | ||
929 | + midKnowledgeList.add(form6.getDimensional()); | ||
930 | + } | ||
931 | + } | ||
932 | + suggestRepVo.setLessKnowledgeList(lessKnowledgeList); | ||
933 | + suggestRepVo.setMidKnowledgeList(midKnowledgeList); | ||
934 | + Form6RepVO ability = initSchoolDimensional(GetLearnDto,DimensionalEnums.ability.getDimensionalType()); | ||
935 | + List<String> lessAbilityList = new ArrayList<>(); //不足70% | ||
936 | + List<String> midAbilityList = new ArrayList<>(); //70-80% | ||
937 | + List<String> highAbilityList = new ArrayList<>(); //大于80% | ||
938 | + for(Form6 form6 :ability.getData()){ | ||
939 | + if(form6.getSchoolRate() < 0.7d){ | ||
940 | + lessAbilityList.add(form6.getDimensional()); | ||
941 | + }else if(form6.getSchoolRate() < 0.8d){ | ||
942 | + midAbilityList.add(form6.getDimensional()); | ||
943 | + }else if(form6.getSchoolRate() >= 0.8d){ | ||
944 | + highAbilityList.add(form6.getDimensional()); | ||
945 | + } | ||
946 | + } | ||
947 | + suggestRepVo.setLessAbilityList(lessAbilityList); | ||
948 | + suggestRepVo.setMidAbilityList(midAbilityList); | ||
949 | + suggestRepVo.setHighAbilityList(highAbilityList); | ||
950 | + Form6RepVO skill = initSchoolDimensional(GetLearnDto,DimensionalEnums.skill.getDimensionalType()); | ||
951 | + List<String> lessSkillList = new ArrayList<>(); //不足70% | ||
952 | + List<String> midSkillList = new ArrayList<>(); //70-80% | ||
953 | + List<String> highSkillList = new ArrayList<>(); //大于80% | ||
954 | + for(Form6 form6 :skill.getData()){ | ||
955 | + if(form6.getSchoolRate() < 0.7d){ | ||
956 | + lessSkillList.add(form6.getDimensional()); | ||
957 | + }else if(form6.getSchoolRate() < 0.8d){ | ||
958 | + midSkillList.add(form6.getDimensional()); | ||
959 | + }else if(form6.getSchoolRate() >= 0.8d){ | ||
960 | + highSkillList.add(form6.getDimensional()); | ||
961 | + } | ||
962 | + } | ||
963 | + suggestRepVo.setLessSkillList(lessSkillList); | ||
964 | + suggestRepVo.setMidSkillList(midSkillList); | ||
965 | + suggestRepVo.setHighSkillList(highSkillList); | ||
966 | + suggest = initSuggest(suggestRepVo); | ||
967 | + RedisUtils.setString(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_suggest",suggest); | ||
968 | + } | ||
969 | + return suggest; | ||
970 | + } | ||
971 | + | ||
972 | + private List<String> getErrorRate(int analyseId , String schoolName , int studentSize){ | ||
973 | + List<String> errorList = new ArrayList<>(); | ||
974 | + List<AnalyseDetail> analyseDetails = analyseDetailService.selectByAnalyseId(analyseId); | ||
975 | + double errorNumber = Math.ceil(studentSize * 0.15) ; | ||
976 | + for(AnalyseDetail analyseDetail :analyseDetails){ | ||
977 | + if("选择题".equals(analyseDetail.getQuestionType())){ | ||
978 | + int number = studentDetailService.selectTrueByExamNumber(analyseId,schoolName,analyseDetail.getQuestionNumber()); | ||
979 | + if(errorNumber < (studentSize-number)){ | ||
980 | + errorList.add(analyseDetail.getQuestionNumber()); | ||
981 | + } | ||
982 | + } | ||
983 | + } | ||
984 | + return errorList; | ||
985 | + } | ||
986 | + | ||
987 | + private String initSuggest(SuggestRepVo suggestRepVo){ | ||
988 | + StringBuffer stringBuffer = new StringBuffer(); | ||
989 | + stringBuffer.append("<p>本次检测总体情况").append(suggestRepVo.getAssess()).append(",难度系数是0") | ||
990 | + .append(suggestRepVo.getDifficultyDegree()).append(",优秀率是").append(suggestRepVo.getExcellentRate()).append("%。") | ||
991 | + .append("对有关知识,总体掌握情况比较好。</p><p>从考试结果分析,各知识点掌握程度较好,唯"); | ||
992 | + if(suggestRepVo.getMidKnowledgeList().size() != 0){ | ||
993 | + for (int i = 0; i < suggestRepVo.getMidKnowledgeList().size(); i++) { | ||
994 | + if(i == suggestRepVo.getMidKnowledgeList().size() - 1 ){ | ||
995 | + stringBuffer.append(suggestRepVo.getMidKnowledgeList().get(i)); | ||
996 | + }else { | ||
997 | + stringBuffer.append(suggestRepVo.getMidKnowledgeList().get(i)).append("、"); | ||
998 | + } | ||
999 | + } | ||
1000 | + stringBuffer.append("几个知识点掌握较弱,"); | ||
1001 | + } | ||
1002 | + if(suggestRepVo.getLessKnowledgeList().size() != 0){ | ||
1003 | + for (int i = 0; i < suggestRepVo.getLessKnowledgeList().size(); i++) { | ||
1004 | + if(i == suggestRepVo.getLessKnowledgeList().size() - 1 ){ | ||
1005 | + stringBuffer.append(suggestRepVo.getLessKnowledgeList().get(i)); | ||
1006 | + }else { | ||
1007 | + stringBuffer.append(suggestRepVo.getLessKnowledgeList().get(i)).append("、"); | ||
1008 | + } | ||
1009 | + } | ||
1010 | + stringBuffer.append("几个知识点学生的理解有些问题。"); | ||
1011 | + } | ||
1012 | + stringBuffer.append("</p><p>探究技能方面:"); | ||
1013 | + if(suggestRepVo.getHighSkillList().size() != 0){ | ||
1014 | + for (int i = 0; i < suggestRepVo.getHighSkillList().size(); i++) { | ||
1015 | + if(i == suggestRepVo.getHighSkillList().size() - 1 ){ | ||
1016 | + stringBuffer.append(suggestRepVo.getHighSkillList().get(i)); | ||
1017 | + }else { | ||
1018 | + stringBuffer.append(suggestRepVo.getHighSkillList().get(i)).append("、"); | ||
1019 | + } | ||
1020 | + } | ||
1021 | + stringBuffer.append("掌握的比较好,"); | ||
1022 | + } | ||
1023 | + if(suggestRepVo.getMidSkillList().size() != 0){ | ||
1024 | + for (int i = 0; i < suggestRepVo.getMidSkillList().size(); i++) { | ||
1025 | + if(i == suggestRepVo.getMidSkillList().size() - 1 ){ | ||
1026 | + stringBuffer.append(suggestRepVo.getMidSkillList().get(i)); | ||
1027 | + }else { | ||
1028 | + stringBuffer.append(suggestRepVo.getMidSkillList().get(i)).append("、"); | ||
1029 | + } | ||
1030 | + } | ||
1031 | + stringBuffer.append("等相对较弱一些,"); | ||
1032 | + } | ||
1033 | + if(suggestRepVo.getLessSkillList().size() != 0){ | ||
1034 | + for (int i = 0; i < suggestRepVo.getLessSkillList().size(); i++) { | ||
1035 | + if(i == suggestRepVo.getLessSkillList().size() - 1 ){ | ||
1036 | + stringBuffer.append(suggestRepVo.getLessSkillList().get(i)); | ||
1037 | + }else { | ||
1038 | + stringBuffer.append(suggestRepVo.getLessSkillList().get(i)).append("、"); | ||
1039 | + } | ||
1040 | + } | ||
1041 | + stringBuffer.append("学生掌握有些问题。"); | ||
1042 | + } | ||
1043 | + stringBuffer.append("</p><p>学习能力上:"); | ||
1044 | + if(suggestRepVo.getHighAbilityList().size() != 0){ | ||
1045 | + for (int i = 0; i < suggestRepVo.getHighAbilityList().size(); i++) { | ||
1046 | + if(i == suggestRepVo.getHighAbilityList().size() - 1 ){ | ||
1047 | + stringBuffer.append(suggestRepVo.getHighAbilityList().get(i)); | ||
1048 | + }else { | ||
1049 | + stringBuffer.append(suggestRepVo.getHighAbilityList().get(i)).append("、"); | ||
1050 | + } | ||
1051 | + } | ||
1052 | + stringBuffer.append("掌握较好,"); | ||
1053 | + } | ||
1054 | + if(suggestRepVo.getMidAbilityList().size() != 0){ | ||
1055 | + for (int i = 0; i < suggestRepVo.getMidAbilityList().size(); i++) { | ||
1056 | + if(i == suggestRepVo.getMidAbilityList().size() - 1 ){ | ||
1057 | + stringBuffer.append(suggestRepVo.getMidAbilityList().get(i)); | ||
1058 | + }else { | ||
1059 | + stringBuffer.append(suggestRepVo.getMidAbilityList().get(i)).append("、"); | ||
1060 | + } | ||
1061 | + } | ||
1062 | + stringBuffer.append("等相对较弱一些,"); | ||
1063 | + } | ||
1064 | + if(suggestRepVo.getLessAbilityList().size() != 0){ | ||
1065 | + for (int i = 0; i < suggestRepVo.getLessAbilityList().size(); i++) { | ||
1066 | + if(i == suggestRepVo.getLessAbilityList().size() - 1 ){ | ||
1067 | + stringBuffer.append(suggestRepVo.getLessAbilityList().get(i)); | ||
1068 | + }else { | ||
1069 | + stringBuffer.append(suggestRepVo.getLessAbilityList().get(i)).append("、"); | ||
1070 | + } | ||
1071 | + } | ||
1072 | + stringBuffer.append("学得还欠缺一些。"); | ||
1073 | + } | ||
1074 | + if(suggestRepVo.getErrorList().size() != 0){ | ||
1075 | + stringBuffer.append("另外,部分学生审题不够清楚、思维有定势,如选择题"); | ||
1076 | + for (int i = 0; i < suggestRepVo.getErrorList().size(); i++) { | ||
1077 | + if(i == suggestRepVo.getErrorList().size() - 1 ){ | ||
1078 | + stringBuffer.append(suggestRepVo.getErrorList().get(i)); | ||
1079 | + }else { | ||
1080 | + stringBuffer.append(suggestRepVo.getErrorList().get(i)).append("、"); | ||
1081 | + } | ||
1082 | + } | ||
1083 | + stringBuffer.append("错误率大于15%。"); | ||
1084 | + } | ||
1085 | + stringBuffer.append("</p><p>后续复习巩固可以从抓好基础、提高能力和注重应用上下功夫。提升"); | ||
1086 | + for (int i = 0; i < suggestRepVo.getLessKnowledgeList().size(); i++) { | ||
1087 | + if(i == suggestRepVo.getLessKnowledgeList().size() - 1 ){ | ||
1088 | + stringBuffer.append(suggestRepVo.getLessKnowledgeList().get(i)); | ||
1089 | + }else { | ||
1090 | + stringBuffer.append(suggestRepVo.getLessKnowledgeList().get(i)).append("、"); | ||
1091 | + } | ||
1092 | + } | ||
1093 | + stringBuffer.append("的教学,减少低分面;以思维教学促进学生能力的提高,特别是"); | ||
1094 | + for (int i = 0; i < suggestRepVo.getLessAbilityList().size(); i++) { | ||
1095 | + if(i == suggestRepVo.getLessAbilityList().size() - 1 ){ | ||
1096 | + stringBuffer.append(suggestRepVo.getLessAbilityList().get(i)); | ||
1097 | + }else { | ||
1098 | + stringBuffer.append(suggestRepVo.getLessAbilityList().get(i)).append("、"); | ||
1099 | + } | ||
1100 | + } | ||
1101 | + stringBuffer.append("等方面的能力;重视将知识应用到具体的实践中,尤其是做好试题审题和思路分析的引导,教师自己开发一些新情景的试题。</p>"); | ||
1102 | + return stringBuffer.toString(); | ||
1103 | + } | ||
1104 | + | ||
1105 | + @RequestMapping(value = "getSuggest2", method = RequestMethod.POST) | ||
1106 | + public String getSuggest2(@RequestBody GetLearnDto GetLearnDto){ | ||
1107 | + String suggest = null ; | ||
1108 | + if(RedisUtils.existsObject(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_suggest2")){ | ||
1109 | + suggest = RedisUtils.getString(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_suggest2"); | ||
1110 | + }else { | ||
1111 | + SuggestRepVo suggestRepVo = new SuggestRepVo() ; | ||
1112 | + Analyse analyse = analyseService.selectById(GetLearnDto.getAnalyseId()); | ||
1113 | + Double avg = studentService.selectAvgScore(analyse.getId(),null,GetLearnDto.getSchoolName()) ; | ||
1114 | + DecimalFormat df = new DecimalFormat("#.00"); | ||
1115 | + //得分率 | ||
1116 | + String avgStr = df.format(avg / analyse.getMaxScore()); | ||
1117 | + | ||
1118 | + List<Student> students = studentService.selectBySchoolName(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName()); | ||
1119 | + int a = studentService.selectCountByScore(GetLearnDto.getAnalyseId(),null,GetLearnDto.getSchoolName(),analyse.getMaxScore()*0.85,analyse.getMaxScore()+1f); | ||
1120 | + //优秀率 | ||
1121 | + Double apercent = new Double(a) / new Double(students.size()) * 100 ; | ||
1122 | + String aStr = df.format(apercent); | ||
1123 | + String access = ""; | ||
1124 | + if(avg>=80){ | ||
1125 | + if(apercent >= 20){ | ||
1126 | + access = "良好"; | ||
1127 | + }else { | ||
1128 | + access = "相对可以"; | ||
1129 | + } | ||
1130 | + }else if(avg >= 75){ | ||
1131 | + if(apercent >= 35){ | ||
1132 | + access = "很好"; | ||
1133 | + }else if(apercent >= 20){ | ||
1134 | + access = "良好"; | ||
1135 | + }else { | ||
1136 | + access = "相对可以"; | ||
1137 | + } | ||
1138 | + }else if(avg >= 70){ | ||
1139 | + if(apercent >= 20){ | ||
1140 | + access = "良好"; | ||
1141 | + }else { | ||
1142 | + access = "相对可以"; | ||
1143 | + } | ||
1144 | + } else if (avg >= 60) { | ||
1145 | + if(apercent >= 10){ | ||
1146 | + access = "相对可以"; | ||
1147 | + }else { | ||
1148 | + access = "一般"; | ||
1149 | + } | ||
1150 | + }else { | ||
1151 | + access = "暴露出一些问题,试卷偏难,学生掌握不够理想"; | ||
1152 | + } | ||
1153 | + suggestRepVo.setAssess(access); | ||
1154 | + suggestRepVo.setDifficultyDegree(avgStr); | ||
1155 | + suggestRepVo.setExcellentRate(aStr); | ||
1156 | + suggestRepVo.setErrorList(getErrorRate(GetLearnDto.getAnalyseId(),GetLearnDto.getSchoolName(),students.size())); | ||
1157 | + Form6RepVO knowledge = initSchoolDimensional(GetLearnDto,DimensionalEnums.knowledge.getDimensionalType()); | ||
1158 | + List<String> lessKnowledgeList = new ArrayList<>(); //不足50% | ||
1159 | + List<String> midKnowledgeList = new ArrayList<>(); //50-70% | ||
1160 | + for(Form6 form6 :knowledge.getData()){ | ||
1161 | + if(form6.getSchoolRate() < 0.5d){ | ||
1162 | + lessKnowledgeList.add(form6.getDimensional()); | ||
1163 | + }else if(form6.getSchoolRate() < 0.7d){ | ||
1164 | + midKnowledgeList.add(form6.getDimensional()); | ||
1165 | + } | ||
1166 | + } | ||
1167 | + suggestRepVo.setLessKnowledgeList(lessKnowledgeList); | ||
1168 | + suggestRepVo.setMidKnowledgeList(midKnowledgeList); | ||
1169 | + Form6RepVO ability = initSchoolDimensional(GetLearnDto,DimensionalEnums.ability.getDimensionalType()); | ||
1170 | + List<String> lessAbilityList = new ArrayList<>(); //不足70% | ||
1171 | + List<String> midAbilityList = new ArrayList<>(); //70-80% | ||
1172 | + List<String> highAbilityList = new ArrayList<>(); //大于80% | ||
1173 | + for(Form6 form6 :ability.getData()){ | ||
1174 | + if(form6.getSchoolRate() < 0.7d){ | ||
1175 | + lessAbilityList.add(form6.getDimensional()); | ||
1176 | + }else if(form6.getSchoolRate() < 0.8d){ | ||
1177 | + midAbilityList.add(form6.getDimensional()); | ||
1178 | + }else if(form6.getSchoolRate() >= 0.8d){ | ||
1179 | + highAbilityList.add(form6.getDimensional()); | ||
1180 | + } | ||
1181 | + } | ||
1182 | + suggestRepVo.setLessAbilityList(lessAbilityList); | ||
1183 | + suggestRepVo.setMidAbilityList(midAbilityList); | ||
1184 | + suggestRepVo.setHighAbilityList(highAbilityList); | ||
1185 | + Form6RepVO skill = initSchoolDimensional(GetLearnDto,DimensionalEnums.skill.getDimensionalType()); | ||
1186 | + List<String> lessSkillList = new ArrayList<>(); //不足70% | ||
1187 | + List<String> midSkillList = new ArrayList<>(); //70-80% | ||
1188 | + List<String> highSkillList = new ArrayList<>(); //大于80% | ||
1189 | + for(Form6 form6 :skill.getData()){ | ||
1190 | + if(form6.getSchoolRate() < 0.7d){ | ||
1191 | + lessSkillList.add(form6.getDimensional()); | ||
1192 | + }else if(form6.getSchoolRate() < 0.8d){ | ||
1193 | + midSkillList.add(form6.getDimensional()); | ||
1194 | + }else if(form6.getSchoolRate() >= 0.8d){ | ||
1195 | + highSkillList.add(form6.getDimensional()); | ||
1196 | + } | ||
1197 | + } | ||
1198 | + suggestRepVo.setLessSkillList(lessSkillList); | ||
1199 | + suggestRepVo.setMidSkillList(midSkillList); | ||
1200 | + suggestRepVo.setHighSkillList(highSkillList); | ||
1201 | + suggest = initSuggest2(suggestRepVo); | ||
1202 | + RedisUtils.setString(GetLearnDto.getAnalyseId()+"_"+GetLearnDto.getSchoolName()+"_suggest2",suggest); | ||
1203 | + } | ||
1204 | + return suggest; | ||
1205 | + } | ||
1206 | + | ||
1207 | + private String initSuggest2(SuggestRepVo suggestRepVo){ | ||
1208 | + StringBuffer stringBuffer = new StringBuffer(); | ||
1209 | + stringBuffer.append("<p>本次检测总体情况").append(suggestRepVo.getAssess()).append(",难度系数是0") | ||
1210 | + .append(suggestRepVo.getDifficultyDegree()).append(",优秀率是").append(suggestRepVo.getExcellentRate()).append("%。") | ||
1211 | + .append("对有关知识,总体掌握情况比较好。</p><p>从考试结果分析,各知识点掌握程度较好,唯......"); | ||
1212 | + stringBuffer.append("</p><p>后续复习巩固可以从抓好基础、提高能力和注重应用上下功夫......</p>"); | ||
1213 | + return stringBuffer.toString(); | ||
1214 | + } | ||
1215 | + | ||
1216 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/controller/ScheduleController.java
0 → 100644
@@ -0,0 +1,907 @@ | @@ -0,0 +1,907 @@ | ||
1 | +package com.sincere.independence.controller; | ||
2 | + | ||
3 | +import com.sincere.common.vo.BaseVo; | ||
4 | +import com.sincere.common.vo.independence.paike.*; | ||
5 | +import com.sincere.independence.model.*; | ||
6 | +import com.sincere.independence.service.*; | ||
7 | +import io.swagger.annotations.Api; | ||
8 | +import io.swagger.annotations.ApiOperation; | ||
9 | +import org.apache.commons.lang3.StringUtils; | ||
10 | +import org.springframework.beans.factory.annotation.Autowired; | ||
11 | +import org.springframework.transaction.annotation.Transactional; | ||
12 | +import org.springframework.web.bind.annotation.RequestBody; | ||
13 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
14 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
15 | +import org.springframework.web.bind.annotation.RestController; | ||
16 | + | ||
17 | +import java.util.*; | ||
18 | + | ||
19 | +@RestController | ||
20 | +@RequestMapping(value = "/schedule") | ||
21 | +@Api(value = "排课表") | ||
22 | +public class ScheduleController { | ||
23 | + | ||
24 | + @Autowired | ||
25 | + ClassCourseService classCourseService; | ||
26 | + | ||
27 | + @Autowired | ||
28 | + ClassModelService classModelService; | ||
29 | + | ||
30 | + @Autowired | ||
31 | + TeacherCourseService teacherCourseService; | ||
32 | + | ||
33 | + @Autowired | ||
34 | + TeacherClassService teacherClassService; | ||
35 | + | ||
36 | + @Autowired | ||
37 | + CourseService courseService; | ||
38 | + | ||
39 | + @Autowired | ||
40 | + JoinClassService joinClassService; | ||
41 | + | ||
42 | + @Autowired | ||
43 | + ScheduleService scheduleService; | ||
44 | + | ||
45 | + @ApiOperation("作息安排") | ||
46 | + @RequestMapping(value = "firstChoose", method = RequestMethod.POST) | ||
47 | + public BaseVo firstChoose(@RequestBody FirstReqVo firstReqVo){ | ||
48 | + BaseVo baseVo = new BaseVo(); | ||
49 | + Schedule schedule = scheduleService.selectById(firstReqVo.getScheduleId()); | ||
50 | + if(schedule != null && schedule.getSpeed() == 0){ | ||
51 | + schedule.setMorning(firstReqVo.getMorning()); | ||
52 | + schedule.setAfternoon(firstReqVo.getAfternoon()); | ||
53 | + schedule.setNight(firstReqVo.getNight()); | ||
54 | + scheduleService.updateZuoxi(schedule); | ||
55 | + firstReqVo.setDayNumber(firstReqVo.getMorning()+firstReqVo.getAfternoon()+firstReqVo.getNight()); | ||
56 | + List<ClassCourse> classCourses = new ArrayList<>(); | ||
57 | + //暂时只有单周 | ||
58 | + for (int i = 1; i <= 7; i++) { | ||
59 | + classCourses.addAll(setClassCourse(false,i,firstReqVo)); | ||
60 | + } | ||
61 | + classCourseService.insertSchoolClass(classCourses); | ||
62 | + schedule.setSpeed(2); | ||
63 | + scheduleService.updateSpeed(schedule); | ||
64 | + }else { | ||
65 | + baseVo.setMessage("排课计划不存在或已生成作息"); | ||
66 | + baseVo.setSuccess(false); | ||
67 | + } | ||
68 | + return baseVo; | ||
69 | + } | ||
70 | + | ||
71 | + @ApiOperation("设置公共资源课,主课,副课") | ||
72 | + @RequestMapping(value = "setCourseType", method = RequestMethod.POST) | ||
73 | + public BaseVo setCourseType(@RequestBody SetTypeReqVo setTypeReqVo){ | ||
74 | + BaseVo baseVo = new BaseVo(); | ||
75 | + Schedule schedule = scheduleService.selectById(setTypeReqVo.getScheduleId()); | ||
76 | + if(schedule == null){ | ||
77 | + baseVo.setMessage("参数有误"); | ||
78 | + baseVo.setSuccess(false); | ||
79 | + return baseVo; | ||
80 | + } | ||
81 | + if(teacherClassService.selectHasSchedule(schedule.getSchoolId(),schedule.getTeam()) >0){ | ||
82 | + baseVo.setMessage("已经部分排课,不能再设置"); | ||
83 | + baseVo.setSuccess(false); | ||
84 | + return baseVo; | ||
85 | + } | ||
86 | + for(Integer courseId : setTypeReqVo.getCourseIdList()){ | ||
87 | + if(setTypeReqVo.getCourseType() !=1 && setTypeReqVo.getCourseType() != 2 &&setTypeReqVo.getCourseType() != 3){ | ||
88 | + baseVo.setMessage("课程类型错误"); | ||
89 | + baseVo.setSuccess(false); | ||
90 | + return baseVo; | ||
91 | + } | ||
92 | + courseService.updateCourseType(courseId,setTypeReqVo.getCourseType(),schedule.getSchoolId()); | ||
93 | + } | ||
94 | + return baseVo; | ||
95 | + } | ||
96 | + | ||
97 | + @ApiOperation("合班") | ||
98 | + @RequestMapping(value = "joinClass", method = RequestMethod.POST) | ||
99 | + public BaseVo joinClass(@RequestBody JoinClassReqVo joinClassReqVo){ | ||
100 | + BaseVo baseVo = new BaseVo(); | ||
101 | + Schedule schedule = scheduleService.selectById(joinClassReqVo.getScheduleId()); | ||
102 | + if(teacherClassService.selectHasSchedule(schedule.getSchoolId(),schedule.getTeam()) >0){ | ||
103 | + baseVo.setMessage("已经部分排课,不能再设置"); | ||
104 | + baseVo.setSuccess(false); | ||
105 | + return baseVo; | ||
106 | + } | ||
107 | + Course course = courseService.selectBySchoolIdAndCourseId(schedule.getSchoolId(),joinClassReqVo.getCourseId()); | ||
108 | + List<JoinClass> list = new ArrayList<>(); | ||
109 | + String grade = null ; | ||
110 | + String teacherName = null ; | ||
111 | + for(Integer classId : joinClassReqVo.getClassIdList()){ | ||
112 | + ClassModel classModel = classModelService.selectByPrimaryKey(classId); | ||
113 | + if(grade == null){ | ||
114 | + grade = classModel.getGrade(); | ||
115 | + } | ||
116 | + if(!grade.equals(classModel.getGrade())){ | ||
117 | + baseVo.setMessage("合班不能跨年段"); | ||
118 | + baseVo.setSuccess(false); | ||
119 | + return baseVo; | ||
120 | + } | ||
121 | + TeacherClass teacherClass = new TeacherClass(); | ||
122 | + teacherClass.setTeam(schedule.getTeam()); | ||
123 | + teacherClass.setSchoolId(schedule.getSchoolId()); | ||
124 | + teacherClass.setCourseName(course.getCourseName()); | ||
125 | + teacherClass.setClassId(classId); | ||
126 | + TeacherClass resultTeacherClass = teacherClassService.selectByCourseAndClass(teacherClass); | ||
127 | + if(teacherName == null){ | ||
128 | + teacherName = resultTeacherClass.getTeacherName(); | ||
129 | + } | ||
130 | + if(!teacherName.equals(resultTeacherClass.getTeacherName())){ | ||
131 | + baseVo.setMessage("合班必须同一个老师"); | ||
132 | + baseVo.setSuccess(false); | ||
133 | + return baseVo; | ||
134 | + } | ||
135 | + JoinClass joinClass = new JoinClass(); | ||
136 | + joinClass.setSchoolId(schedule.getSchoolId()); | ||
137 | + joinClass.setClassId(classId); | ||
138 | + joinClass.setTeam(schedule.getTeam()); | ||
139 | + joinClass.setCourseId(course.getCourseId()); | ||
140 | + joinClass.setCourseName(course.getCourseName()); | ||
141 | + List<JoinClass> joinClasses = joinClassService.selectByCourse(joinClass); | ||
142 | + if(joinClasses != null && joinClasses.size() > 0){ | ||
143 | + baseVo.setSuccess(false); | ||
144 | + baseVo.setMessage("不能重复合班"); | ||
145 | + return baseVo; | ||
146 | + } | ||
147 | + list.add(joinClass); | ||
148 | + } | ||
149 | + joinClassService.insertBatch(list); | ||
150 | + return baseVo; | ||
151 | + } | ||
152 | + | ||
153 | + @ApiOperation("删除某个合班信息") | ||
154 | + @RequestMapping(value = "deleteJoinClass", method = RequestMethod.POST) | ||
155 | + public BaseVo deleteJoinClass(@RequestBody CourseGroupReqVo courseGroupReqVo){ | ||
156 | + BaseVo baseVo = new BaseVo(); | ||
157 | + Schedule schedule = scheduleService.selectById(courseGroupReqVo.getScheduleId()); | ||
158 | + if(teacherClassService.selectHasSchedule(schedule.getSchoolId(),schedule.getTeam()) >0){ | ||
159 | + baseVo.setMessage("已经部分排课,不能再删除"); | ||
160 | + baseVo.setSuccess(false); | ||
161 | + return baseVo; | ||
162 | + } | ||
163 | + joinClassService.deleteCourseGroup(courseGroupReqVo.getCourseGroup()); | ||
164 | + return baseVo; | ||
165 | + } | ||
166 | + | ||
167 | + @ApiOperation("不排课") | ||
168 | + @RequestMapping(value = "noSchedule", method = RequestMethod.POST) | ||
169 | + public BaseVo noSchedule(@RequestBody NoScheduleReqVo noScheduleReqVo){ | ||
170 | + BaseVo baseVo = new BaseVo(); | ||
171 | + Schedule schedule =scheduleService.selectById(noScheduleReqVo.getScheduleId()); | ||
172 | + if(teacherClassService.selectHasSchedule(schedule.getSchoolId(),schedule.getTeam()) >0){ | ||
173 | + baseVo.setMessage("已经部分排课,不能再设置"); | ||
174 | + baseVo.setSuccess(false); | ||
175 | + return baseVo; | ||
176 | + } | ||
177 | + for(String msg : noScheduleReqVo.getList()){ | ||
178 | + try { | ||
179 | + String[] arrayMsg = msg.split("-"); | ||
180 | + ClassCourse classCourse = new ClassCourse(); | ||
181 | + classCourse.setTeam(schedule.getTeam()); | ||
182 | + classCourse.setSchoolId(schedule.getSchoolId()); | ||
183 | + classCourse.setWeek(Integer.valueOf(arrayMsg[0])); | ||
184 | + classCourse.setCourseNumber(Integer.valueOf(arrayMsg[1])); | ||
185 | + classCourse.setSingleOrDouble(1); | ||
186 | + if(noScheduleReqVo.getLevel() == 1){ | ||
187 | + classCourse.setClassId(noScheduleReqVo.getClassId()); | ||
188 | + } | ||
189 | + if(noScheduleReqVo.getLevel() == 2){ | ||
190 | + classCourse.setGrade(noScheduleReqVo.getGrade()); | ||
191 | + } | ||
192 | + List<ClassCourse> list = classCourseService.selectClassCourseByClass(classCourse); | ||
193 | + for(ClassCourse temp : list){ | ||
194 | + temp.setCourseName("不排课"); | ||
195 | + classCourseService.updateByPrimaryKey(temp); | ||
196 | + } | ||
197 | + }catch (Exception e){ | ||
198 | + System.out.println("不排课"+e.toString()); | ||
199 | + baseVo.setSuccess(false); | ||
200 | + baseVo.setMessage("格式不对"); | ||
201 | + } | ||
202 | + } | ||
203 | + return baseVo; | ||
204 | + } | ||
205 | + | ||
206 | + @ApiOperation("选择拟排科目类型,设置优先区间 提示") | ||
207 | + @RequestMapping(value = "secondChooseBefore", method = RequestMethod.POST) | ||
208 | + public BaseVo secondChooseBefore(@RequestBody ParallelClassReqVo parallelClassReqVo){ | ||
209 | + BaseVo baseVo = new BaseVo(); | ||
210 | + Schedule schedule = scheduleService.selectById(parallelClassReqVo.getScheduleId()); | ||
211 | + StringBuffer stringBuffer = new StringBuffer(); | ||
212 | + if(parallelClassReqVo.getLevel() == 1){ | ||
213 | + ClassModel classModel = classModelService.selectByPrimaryKey(parallelClassReqVo.getClassId()); | ||
214 | + stringBuffer.append("本次不排课设置,只涉及"+classModel.getClassName()); | ||
215 | + }else if(parallelClassReqVo.getLevel() == 2){ | ||
216 | + List<ClassModel> list = classModelService.selectBySchoolIdAndGrade(schedule.getSchoolId(),parallelClassReqVo.getGrade()); | ||
217 | + stringBuffer.append("本次不排课设置,共涉及"+list.size()+"个班"); | ||
218 | + }else { | ||
219 | + List<ClassModel> list = classModelService.selectBySchoolId(schedule.getSchoolId()); | ||
220 | + stringBuffer.append("本次不排课设置,共涉及"+list.size()+"个班"); | ||
221 | + } | ||
222 | + baseVo.setMessage(stringBuffer.toString()); | ||
223 | + return baseVo; | ||
224 | + } | ||
225 | + | ||
226 | + @Transactional | ||
227 | + @ApiOperation("选择拟排科目类型,设置优先区间") | ||
228 | + @RequestMapping(value = "secondChoose", method = RequestMethod.POST) | ||
229 | + public BaseVo secondChoose(@RequestBody ParallelClassReqVo parallelClassReqVo) { | ||
230 | + BaseVo baseVo = new BaseVo(); | ||
231 | + Schedule schedule = scheduleService.selectById(parallelClassReqVo.getScheduleId()); | ||
232 | + //TODO 暂时只有单周 | ||
233 | + boolean isDouble = false; | ||
234 | + //优先范围 | ||
235 | + List<ClassCourse> limitList = new ArrayList<>(); | ||
236 | + for(String msg : parallelClassReqVo.getIntervalList()){ | ||
237 | + String[] arrayMsg = msg.split("-"); | ||
238 | + ClassCourse classCourse = new ClassCourse(); | ||
239 | + classCourse.setSingleOrDouble(1); | ||
240 | + classCourse.setWeek(Integer.valueOf(arrayMsg[0])); | ||
241 | + classCourse.setCourseNumber(Integer.valueOf(arrayMsg[1])); | ||
242 | + limitList.add(classCourse); | ||
243 | + } | ||
244 | + | ||
245 | + //查询该课程类型下 所有的老师授课信息 | ||
246 | + Course course = new Course(); | ||
247 | + course.setSchoolId(schedule.getSchoolId()); | ||
248 | + course.setCourseType(parallelClassReqVo.getCourseType()); | ||
249 | + List<Course> courseList = courseService.selectByCourse(course); | ||
250 | + List<TeacherClass> teacherClasss = new ArrayList<>(); | ||
251 | + int courseCount = 0 ; | ||
252 | + for(Course course1 : courseList){ | ||
253 | + TeacherClass search = new TeacherClass(); | ||
254 | + search.setSchoolId(schedule.getSchoolId()); | ||
255 | + search.setCourseName(course1.getCourseName()); | ||
256 | + search.setTeam(schedule.getTeam()); | ||
257 | + if(parallelClassReqVo.getLevel() == 1){ | ||
258 | + search.setClassId(parallelClassReqVo.getClassId()); | ||
259 | + } | ||
260 | + if(parallelClassReqVo.getLevel() == 2){ | ||
261 | + search.setGrade(parallelClassReqVo.getGrade()); | ||
262 | + } | ||
263 | + List<TeacherClass> teacherClassList = teacherClassService.selectByCourseName(search); | ||
264 | + courseCount = courseCount + teacherClassList.get(0).getTimes(); | ||
265 | + teacherClasss.addAll(teacherClassList); | ||
266 | + } | ||
267 | + if(courseCount > limitList.size()){ | ||
268 | + baseVo.setSuccess(false); | ||
269 | + baseVo.setMessage("所要设置的公共课程数大于选择课表时段,请重新设置"); | ||
270 | + return baseVo; | ||
271 | + } | ||
272 | + //联排的优先级 | ||
273 | + List<Integer> joinList = new ArrayList<>(); | ||
274 | + for(int i = 1 ; i <= 5 ; i++) { | ||
275 | + joinList.add(i); | ||
276 | + } | ||
277 | + Set<TeacherClass> teacherClassSet = new HashSet<>(teacherClasss); | ||
278 | + for (TeacherClass temp : teacherClassSet) { | ||
279 | + TeacherCourse teacherCourse = new TeacherCourse(); | ||
280 | + teacherCourse.setSchoolId(schedule.getSchoolId()); | ||
281 | + teacherCourse.setTeacherName(temp.getTeacherName()); | ||
282 | + teacherCourse.setTeam(schedule.getTeam()); | ||
283 | + //插入教师排课表 | ||
284 | + if(teacherCourseService.isCreateCourse(teacherCourse) == 0){ | ||
285 | + //插入教师排课表 | ||
286 | + insertTeacherCourse(isDouble, teacherCourse); | ||
287 | + } | ||
288 | + TeacherClass searchTeacher = new TeacherClass(); | ||
289 | + searchTeacher.setSchoolId(temp.getSchoolId()); | ||
290 | + searchTeacher.setTeam(temp.getTeam()); | ||
291 | + searchTeacher.setClassId(temp.getClassId()); | ||
292 | + searchTeacher.setTeacherName(temp.getTeacherName()); | ||
293 | + searchTeacher.setCourseName(temp.getCourseName()); | ||
294 | + TeacherClass teacherClass = teacherClassService.selectByTeacher(searchTeacher); | ||
295 | + if(teacherClass.getStatus() == 1){ | ||
296 | + //已经排课不再排课 | ||
297 | + }else { | ||
298 | + ClassCourse classCourse = new ClassCourse(); | ||
299 | + classCourse.setClassId(temp.getClassId()); | ||
300 | + classCourse.setTeam(schedule.getTeam()); | ||
301 | + classCourse.setSchoolId(schedule.getSchoolId()); | ||
302 | + classCourse.setSingleOrDouble(1); | ||
303 | + List<ClassCourse> classCourses = classCourseService.selectByClassIdAndSingleOrDouble(classCourse); | ||
304 | + initWeekCourse(parallelClassReqVo.getCourseType(),joinList,teacherClass,classCourses,limitList,0); | ||
305 | + //排课结束,更新 | ||
306 | + //如果是合班的话,需要更新多个teacherClass | ||
307 | + teacherClassService.updateSchedule(teacherClass.gettClassId()); | ||
308 | + JoinClass joinClass = new JoinClass(); | ||
309 | + joinClass.setSchoolId(schedule.getSchoolId()); | ||
310 | + joinClass.setTeam(schedule.getTeam()); | ||
311 | + joinClass.setCourseId(courseService.selectBySchoolIdAndCourseName(schedule.getSchoolId(),teacherClass.getCourseName()).getCourseId()); | ||
312 | + joinClass.setClassId(classCourse.getClassId()); | ||
313 | + List<JoinClass> joinClasses = joinClassService.selectByCourse(joinClass); | ||
314 | + if(joinClasses != null && joinClasses.size() > 0){ | ||
315 | + List<JoinClass> resultList = joinClassService.selectByCourseGroup(joinClasses.get(0).getCourseGroup()); | ||
316 | + for(JoinClass joinClass1 :resultList){ | ||
317 | + TeacherClass searchTeacherClass = new TeacherClass(); | ||
318 | + searchTeacherClass.setSchoolId(schedule.getSchoolId()); | ||
319 | + searchTeacherClass.setTeam(schedule.getTeam()); | ||
320 | + searchTeacherClass.setCourseName(teacherClass.getCourseName()); | ||
321 | + searchTeacherClass.setClassId(joinClass1.getClassId()); | ||
322 | + TeacherClass resultTeacherClass = teacherClassService.selectByCourseAndClass(searchTeacherClass); | ||
323 | + teacherClassService.updateSchedule(resultTeacherClass.gettClassId()); | ||
324 | + } | ||
325 | + } | ||
326 | + | ||
327 | + } | ||
328 | + } | ||
329 | + return baseVo; | ||
330 | + } | ||
331 | + | ||
332 | + @ApiOperation("排课撤回") | ||
333 | + @RequestMapping(value = "recall", method = RequestMethod.POST) | ||
334 | + public BaseVo recall(@RequestBody RecallReqVo recallReqVo){ | ||
335 | + BaseVo baseVo = new BaseVo(); | ||
336 | + Schedule schedule = scheduleService.selectById(recallReqVo.getScheduleId()); | ||
337 | + switch (recallReqVo.getNumber()){ | ||
338 | + case 1: | ||
339 | + //不排课撤回 | ||
340 | + ClassCourse classCourse1 = new ClassCourse(); | ||
341 | + classCourse1.setSchoolId(schedule.getSchoolId()); | ||
342 | + classCourse1.setCourseName("不排课"); | ||
343 | + classCourseService.recallClassCourse(classCourse1); | ||
344 | + break; | ||
345 | + case 2: | ||
346 | + //公共课不排课 | ||
347 | + recall(3,schedule); | ||
348 | + break; | ||
349 | + case 3: | ||
350 | + //主课 | ||
351 | + recall(1,schedule); | ||
352 | + break; | ||
353 | + case 4: | ||
354 | + recall(2,schedule); | ||
355 | + break; | ||
356 | + } | ||
357 | + return baseVo; | ||
358 | + } | ||
359 | + | ||
360 | + private void recall(int courseType , Schedule schedule){ | ||
361 | + Course course = new Course(); | ||
362 | + course.setSchoolId(schedule.getSchoolId()); | ||
363 | + course.setCourseType(courseType); | ||
364 | + List<Course> list = courseService.selectByCourse(course); | ||
365 | + for(Course temp : list){ | ||
366 | + ClassCourse classCourse2 = new ClassCourse(); | ||
367 | + classCourse2.setSchoolId(schedule.getSchoolId()); | ||
368 | + classCourse2.setCourseName(temp.getCourseName()); | ||
369 | + classCourseService.recallClassCourse(classCourse2); | ||
370 | + TeacherClass teacherClass = new TeacherClass(); | ||
371 | + teacherClass.setSchoolId(schedule.getSchoolId()); | ||
372 | + teacherClass.setTeam(schedule.getTeam()); | ||
373 | + teacherClass.setCourseName(temp.getCourseName()); | ||
374 | + List<TeacherClass> teacherClasses = teacherClassService.selectByCourseName(teacherClass); | ||
375 | + for(TeacherClass teacherClass1 : teacherClasses){ | ||
376 | + TeacherCourse teacherCourse2 = new TeacherCourse(); | ||
377 | + teacherCourse2.setSchoolId(schedule.getSchoolId()); | ||
378 | + teacherCourse2.setTeam(schedule.getTeam()); | ||
379 | + teacherCourse2.setTeacherName(teacherClass1.getTeacherName()); | ||
380 | + teacherCourse2.setCourseName(temp.getCourseName()); | ||
381 | + teacherCourseService.recallTeacherCourse(teacherCourse2); | ||
382 | + teacherClassService.recallTeacherClass(teacherClass1.gettClassId()); | ||
383 | + } | ||
384 | + | ||
385 | + } | ||
386 | + } | ||
387 | + | ||
388 | + //设置当天课的信息 | ||
389 | + private List<ClassCourse> setClassCourse(boolean isDouble , int i , FirstReqVo firstReqVo){ | ||
390 | + List<ClassCourse> classCourses = new ArrayList<>(); | ||
391 | + Schedule schedule = scheduleService.selectById(firstReqVo.getScheduleId()); | ||
392 | + Date date = new Date(); | ||
393 | + for(int j = 1 ; j <= firstReqVo.getDayNumber() ; j++){ | ||
394 | + ClassCourse classCourse = new ClassCourse(); | ||
395 | + classCourse.setSingleOrDouble(isDouble ? 2 : 1); | ||
396 | + classCourse.setSchoolId(schedule.getSchoolId()); | ||
397 | + classCourse.setWeek(i); | ||
398 | + classCourse.setCourseNumber(j); | ||
399 | + classCourse.setCreateTime(date); | ||
400 | + classCourses.add(classCourse); | ||
401 | + classCourse.setTeam(schedule.getTeam()); | ||
402 | + } | ||
403 | + return classCourses; | ||
404 | + } | ||
405 | + | ||
406 | + /** | ||
407 | + * | ||
408 | + * @param courseType 所排课的课程类型 // 1 主课 2 副课 3 公共课 | ||
409 | + * @param joinList 联课优先级 | ||
410 | + * @param teacherClass 老师授课信息 | ||
411 | + * @param list 班级课程 | ||
412 | + * @param limitList 单课优先级 | ||
413 | + * @param functionTimes 循环次数 | ||
414 | + */ | ||
415 | + private void initWeekCourse(int courseType ,List<Integer> joinList ,TeacherClass teacherClass , | ||
416 | + List<ClassCourse> list , List<ClassCourse> limitList ,int functionTimes){ | ||
417 | + List<Integer> sort = new ArrayList<>(); | ||
418 | + String team = teacherClass.getTeam(); | ||
419 | + int singleOrDouble = list.get(0).getSingleOrDouble(); | ||
420 | + for(ClassCourse classCourse : limitList){ | ||
421 | + if(!sort.contains(classCourse.getCourseNumber())){ | ||
422 | + sort.add(classCourse.getCourseNumber()); | ||
423 | + } | ||
424 | + } | ||
425 | + int times = 0 ; //已经排课数 | ||
426 | + //先排联课 | ||
427 | + int joinTimes = 0 ; //已经排联课数 | ||
428 | + for(int w = 0 ; w <= 4 ; w++) { | ||
429 | + int week = joinList.get(w); | ||
430 | + if(joinTimes == teacherClass.getJoinTimes()){ | ||
431 | + break; | ||
432 | + } | ||
433 | + for (int i = 0; i < sort.size(); i++) { | ||
434 | + int courseNumber = sort.get(i); | ||
435 | + ClassCourse classCourse = getClassCourse(list, week, courseNumber); | ||
436 | + if(!sort.contains(courseNumber+1)){ | ||
437 | + continue; | ||
438 | + } | ||
439 | + ClassCourse classCourseNext =getClassCourse(list, week, courseNumber+1); | ||
440 | + if (StringUtils.isBlank(classCourse.getCourseName()) && StringUtils.isBlank(classCourseNext.getCourseName())) { | ||
441 | + Course course = courseService.selectBySchoolIdAndCourseName(teacherClass.getSchoolId(),teacherClass.getCourseName()); | ||
442 | + classCourse.setCourseOpenId(course.getCourseId()); | ||
443 | + classCourse.setCourseName(teacherClass.getCourseName()); | ||
444 | + classCourseNext.setCourseOpenId(course.getCourseId()); | ||
445 | + classCourseNext.setCourseName(teacherClass.getCourseName()); | ||
446 | + TeacherCourse searchTeacherCourse = new TeacherCourse(); | ||
447 | + searchTeacherCourse.setTeam(team); | ||
448 | + searchTeacherCourse.setSchoolId(teacherClass.getSchoolId()); | ||
449 | + searchTeacherCourse.setGrade(teacherClass.getGrade()); | ||
450 | + searchTeacherCourse.setTeacherName(teacherClass.getTeacherName()); | ||
451 | + searchTeacherCourse.setSingleOrDouble(singleOrDouble); | ||
452 | + searchTeacherCourse.setWeek(week); | ||
453 | + searchTeacherCourse.setCourseName(teacherClass.getCourseName()); | ||
454 | + //查询当天老师的课是否已经大于等于2 防止老师一天课程太多 | ||
455 | + int dayCourse = teacherCourseService.selectTeacherDayCourseNumber(searchTeacherCourse); | ||
456 | + if(dayCourse >= 2){ | ||
457 | + break; | ||
458 | + } | ||
459 | + searchTeacherCourse.setCourseNumber(courseNumber); | ||
460 | + TeacherCourse teacherFirst = teacherCourseService.selectTeacherCourse(searchTeacherCourse); | ||
461 | + searchTeacherCourse.setCourseNumber(courseNumber+1); | ||
462 | + TeacherCourse teacherSecond = teacherCourseService.selectTeacherCourse(searchTeacherCourse); | ||
463 | + if (StringUtils.isBlank(teacherFirst.getCourseName()) && StringUtils.isBlank(teacherSecond.getCourseName())) { | ||
464 | + classCourseService.updateByPrimaryKey(classCourse); | ||
465 | + classCourseService.updateByPrimaryKey(classCourseNext); | ||
466 | + teacherFirst.setCourseName(teacherClass.getCourseName()); | ||
467 | + teacherFirst.setClassId(classCourse.getClassId()+""); | ||
468 | + teacherSecond.setCourseName(teacherClass.getCourseName()); | ||
469 | + teacherSecond.setClassId(classCourse.getClassId()+""); | ||
470 | + teacherCourseService.updateTeacherCourse(teacherFirst); | ||
471 | + teacherCourseService.updateTeacherCourse(teacherSecond); | ||
472 | + times = times + 2; | ||
473 | + reSort(sort,courseNumber); | ||
474 | + reSort(sort,courseNumber+1); | ||
475 | + reSort(joinList,week); | ||
476 | + joinTimes++ ; | ||
477 | + break; | ||
478 | + } else { | ||
479 | + continue; | ||
480 | + } | ||
481 | + } | ||
482 | + } | ||
483 | + } | ||
484 | + //单节课 | ||
485 | + int before = 0 ; | ||
486 | + for(int week = 1 ; week <= 5 ; week++){ | ||
487 | + if(times == teacherClass.getTimes()){ | ||
488 | + break; | ||
489 | + } | ||
490 | + if(before > 0){ | ||
491 | + sort = reSort(sort,before); | ||
492 | + } | ||
493 | + for(int i = 0 ; i < sort.size() ; i++){ | ||
494 | + int courseNumber = sort.get(i); | ||
495 | + ClassCourse classCourse = getClassCourse(list,week,courseNumber); | ||
496 | + boolean flag = false ; | ||
497 | + //去判断 查出的classCourse 是否在limitList | ||
498 | + for(ClassCourse temp : limitList){ | ||
499 | + if(temp.getWeek() == classCourse.getWeek() && | ||
500 | + temp.getCourseNumber() == classCourse.getCourseNumber()){ | ||
501 | + flag = true ; | ||
502 | + break; | ||
503 | + } | ||
504 | + } | ||
505 | + if(flag){ | ||
506 | + if(StringUtils.isBlank(classCourse.getCourseName())){ | ||
507 | + Course course = courseService.selectBySchoolIdAndCourseName(teacherClass.getSchoolId(),teacherClass.getCourseName()); | ||
508 | + //约束条件判断 | ||
509 | + TeacherCourse result = checkConstraint(classCourse,teacherClass,course,singleOrDouble,week,courseNumber); | ||
510 | + if(result == null){ | ||
511 | + break; | ||
512 | + } | ||
513 | + //设置课程 | ||
514 | + if(setCourse(classCourse,teacherClass,result,course)){ | ||
515 | + times++; | ||
516 | + before = courseNumber; | ||
517 | + break; | ||
518 | + }else { | ||
519 | + continue; | ||
520 | + } | ||
521 | + } | ||
522 | + } | ||
523 | + } | ||
524 | + } | ||
525 | + if(functionTimes > 2){ | ||
526 | + //递归次数限制,防止无限循环,内存溢出,手动优化课程 | ||
527 | + optimizeCourse(teacherClass); | ||
528 | + }else{ | ||
529 | + if(times < teacherClass.getTimes()){ | ||
530 | + //优先时段中课程数 不够 | ||
531 | + teacherClass.setTimes(teacherClass.getTimes()-times); | ||
532 | + teacherClass.setJoinTimes(teacherClass.getJoinTimes()-joinTimes); | ||
533 | + //放大优先范围,上下一节,并去掉原来的优先范围 | ||
534 | + List<ClassCourse> newLimitList = new ArrayList<>(); | ||
535 | + int maxCourseNumber =classCourseService.selectMaxCourseNumber(teacherClass.getSchoolId(),team); | ||
536 | + for(ClassCourse classCourse : limitList){ | ||
537 | + if(classCourse.getCourseNumber() == 1){ | ||
538 | + ClassCourse temp = new ClassCourse(); | ||
539 | + temp.setWeek(classCourse.getWeek()); | ||
540 | + temp.setCourseNumber(2); | ||
541 | + newLimitList.add(temp); | ||
542 | + }else if(classCourse.getCourseNumber() == maxCourseNumber){ | ||
543 | + ClassCourse temp = new ClassCourse(); | ||
544 | + temp.setWeek(classCourse.getWeek()); | ||
545 | + temp.setCourseNumber(maxCourseNumber-1); | ||
546 | + newLimitList.add(temp); | ||
547 | + }else{ | ||
548 | + ClassCourse temp = new ClassCourse(); | ||
549 | + temp.setWeek(classCourse.getWeek()); | ||
550 | + temp.setCourseNumber(classCourse.getCourseNumber()-1); | ||
551 | + newLimitList.add(temp); | ||
552 | + ClassCourse temp2 = new ClassCourse(); | ||
553 | + temp2.setWeek(classCourse.getWeek()); | ||
554 | + temp2.setCourseNumber(classCourse.getCourseNumber()+1); | ||
555 | + newLimitList.add(temp2); | ||
556 | + } | ||
557 | + } | ||
558 | + List<ClassCourse> result = new ArrayList<>(); | ||
559 | + for (int i = 0; i < newLimitList.size() ; i++) { | ||
560 | + boolean isExist = false ; | ||
561 | + for(ClassCourse classCourse : limitList){ | ||
562 | + if(newLimitList.get(i).getWeek() == classCourse.getWeek() && | ||
563 | + newLimitList.get(i).getCourseNumber() == classCourse.getCourseNumber()){ | ||
564 | + isExist = true ; | ||
565 | + } | ||
566 | + } | ||
567 | + if(!isExist){ | ||
568 | + result.add(newLimitList.get(i)); | ||
569 | + } | ||
570 | + } | ||
571 | + functionTimes ++ ; | ||
572 | + initWeekCourse(courseType,joinList,teacherClass,list,result,functionTimes); | ||
573 | + } | ||
574 | + } | ||
575 | + } | ||
576 | + | ||
577 | + //设置课程 | ||
578 | + private boolean setCourse(ClassCourse classCourse ,TeacherClass teacherClass , TeacherCourse result , Course course){ | ||
579 | + //合课 多做一层判断 另一个班级这节课也为空 | ||
580 | + JoinClass joinClass = new JoinClass(); | ||
581 | + joinClass.setSchoolId(classCourse.getSchoolId()); | ||
582 | + joinClass.setTeam(classCourse.getTeam()); | ||
583 | + joinClass.setCourseId(classCourse.getCourseOpenId()); | ||
584 | + joinClass.setClassId(classCourse.getClassId()); | ||
585 | + List<JoinClass> joinClasses = joinClassService.selectByCourse(joinClass); | ||
586 | + if(joinClasses != null && joinClasses.size() > 0){ | ||
587 | + //说明是合班的课程 | ||
588 | + boolean isClash = false ; | ||
589 | + List<ClassCourse> joinClassList = new ArrayList<>(); | ||
590 | + List<JoinClass> resultList = joinClassService.selectByCourseGroup(joinClasses.get(0).getCourseGroup()); | ||
591 | + for(JoinClass temp : resultList){ | ||
592 | + ClassCourse joinClassCourse = new ClassCourse(); | ||
593 | + joinClassCourse.setTeam(classCourse.getTeam()); | ||
594 | + joinClassCourse.setClassId(temp.getClassId()); | ||
595 | + joinClassCourse.setWeek(classCourse.getWeek()); | ||
596 | + joinClassCourse.setCourseNumber(classCourse.getCourseNumber()); | ||
597 | + joinClassCourse.setSingleOrDouble(classCourse.getSingleOrDouble()); | ||
598 | + ClassCourse joinResultClassCourse = classCourseService.selectClassCourse(joinClassCourse); | ||
599 | + joinClassList.add(joinResultClassCourse); | ||
600 | + if(StringUtils.isNotBlank(joinResultClassCourse.getCourseName())){ | ||
601 | + isClash = true ; | ||
602 | + break; | ||
603 | + } | ||
604 | + } | ||
605 | + if(isClash){ | ||
606 | + //合班的班级有 该节次的课 已经有老师上了 | ||
607 | + return false; | ||
608 | + }else { | ||
609 | + String classIdString = ""; | ||
610 | + for(ClassCourse temp : joinClassList){ | ||
611 | + classIdString = course.getCourseId() + "," ; | ||
612 | + temp.setCourseOpenId(course.getCourseId()); | ||
613 | + temp.setCourseName(teacherClass.getCourseName()); | ||
614 | + classCourseService.updateByPrimaryKey(temp); | ||
615 | + } | ||
616 | + result.setGrade(classCourse.getGrade()); | ||
617 | + result.setClassId(classIdString); | ||
618 | + result.setCourseName(classCourse.getCourseName()); | ||
619 | + teacherCourseService.updateTeacherCourse(result); | ||
620 | + return true; | ||
621 | + } | ||
622 | + }else { | ||
623 | + //普通课程 | ||
624 | + if(StringUtils.isBlank(result.getCourseName())){ | ||
625 | + classCourseService.updateByPrimaryKey(classCourse); | ||
626 | + result.setGrade(classCourse.getGrade()); | ||
627 | + result.setClassId(classCourse.getClassId()+""); | ||
628 | + result.setCourseName(classCourse.getCourseName()); | ||
629 | + teacherCourseService.updateTeacherCourse(result); | ||
630 | + return true; | ||
631 | + }else { | ||
632 | + return false ; | ||
633 | + } | ||
634 | + } | ||
635 | + } | ||
636 | + | ||
637 | + //判断班级与老师的约束条件 | ||
638 | + private TeacherCourse checkConstraint(ClassCourse classCourse , TeacherClass teacherClass , | ||
639 | + Course course , int singleOrDouble , int week , int courseNumber ){ | ||
640 | + classCourse.setCourseOpenId(course.getCourseId()); | ||
641 | + classCourse.setCourseName(teacherClass.getCourseName()); | ||
642 | + //判断当天是否还能继续排课 | ||
643 | + TeacherClass searchTeacher = new TeacherClass(); | ||
644 | + searchTeacher.setSchoolId(teacherClass.getSchoolId()); | ||
645 | + searchTeacher.setTeam(teacherClass.getTeam()); | ||
646 | + searchTeacher.setClassId(teacherClass.getClassId()); | ||
647 | + searchTeacher.setTeacherName(teacherClass.getTeacherName()); | ||
648 | + searchTeacher.setCourseName(teacherClass.getCourseName()); | ||
649 | + TeacherClass resultTeacherClass = teacherClassService.selectByTeacher(searchTeacher); | ||
650 | + if(resultTeacherClass.getTimes() > 5 && classCourseService.selectCourseByClassIdAndWeek(classCourse) >= 2){ | ||
651 | + return null ; | ||
652 | + } | ||
653 | + if(resultTeacherClass.getTimes() <= 5 && classCourseService.selectCourseByClassIdAndWeek(classCourse) >= 1){ | ||
654 | + return null ; | ||
655 | + } | ||
656 | + TeacherCourse searchTeacherCourse = new TeacherCourse(); | ||
657 | + searchTeacherCourse.setTeam(teacherClass.getTeam()); | ||
658 | + searchTeacherCourse.setSchoolId(teacherClass.getSchoolId()); | ||
659 | + searchTeacherCourse.setGrade(teacherClass.getGrade()); | ||
660 | + searchTeacherCourse.setTeacherName(teacherClass.getTeacherName()); | ||
661 | + searchTeacherCourse.setSingleOrDouble(singleOrDouble); | ||
662 | + searchTeacherCourse.setWeek(week); | ||
663 | + searchTeacherCourse.setCourseNumber(courseNumber); | ||
664 | + searchTeacherCourse.setCourseName(teacherClass.getCourseName()); | ||
665 | + TeacherCourse result = teacherCourseService.selectTeacherCourse(searchTeacherCourse); | ||
666 | + //老师当天课程不能多于 该老师平均课程 | ||
667 | + if(teacherCourseService.selectTeacherDayCourseNumber(searchTeacherCourse) | ||
668 | + >= teacherClassService.selectTeacherDayClass(teacherClass.getSchoolId(),teacherClass.getTeam(),teacherClass.getTeacherName())){ | ||
669 | + return null ; | ||
670 | + } | ||
671 | + return result ; | ||
672 | + } | ||
673 | + | ||
674 | + //课程冲突 ,调优 | ||
675 | + private void optimizeCourse(TeacherClass teacherClass){ | ||
676 | + int times = teacherClass.getTimes(); | ||
677 | + int maxCourseNumber = classCourseService.selectMaxCourseNumber(teacherClass.getSchoolId(),teacherClass.getTeam()) ; | ||
678 | + while (times > 0){ | ||
679 | + boolean flag = false ; | ||
680 | + List<ClassCourse> noClassList = classCourseService.selectNoCourse(teacherClass.getClassId(),teacherClass.getTeam()); | ||
681 | + for(ClassCourse classCourse : noClassList){ | ||
682 | + for(int i = -2 ; i <= 2 ; i++){ | ||
683 | + int weekChange = classCourse.getWeek()+i ; | ||
684 | + if(weekChange > 5){ | ||
685 | + weekChange = weekChange - 5; | ||
686 | + } | ||
687 | + if(weekChange < 1){ | ||
688 | + weekChange = weekChange + 5; | ||
689 | + } | ||
690 | + List<ClassCourse> list = classCourseService.selectWeekCourse(classCourse.getClassId(),weekChange,classCourse.getSingleOrDouble(),teacherClass.getCourseName(),teacherClass.getTeam()); | ||
691 | + //查询当天的课程还能继续派排课 | ||
692 | + TeacherClass searchTeacher = new TeacherClass(); | ||
693 | + searchTeacher.setSchoolId(teacherClass.getSchoolId()); | ||
694 | + searchTeacher.setTeam(teacherClass.getTeam()); | ||
695 | + searchTeacher.setClassId(teacherClass.getClassId()); | ||
696 | + searchTeacher.setTeacherName(teacherClass.getTeacherName()); | ||
697 | + searchTeacher.setCourseName(teacherClass.getCourseName()); | ||
698 | + TeacherClass resultTeacherClass = teacherClassService.selectByTeacher(searchTeacher); | ||
699 | + if(resultTeacherClass.getTimes() > 5 && list.size() >= 2){ | ||
700 | + continue; | ||
701 | + } | ||
702 | + if(resultTeacherClass.getTimes() <= 5 && list.size() >= 1){ | ||
703 | + continue; | ||
704 | + } | ||
705 | + for(int j = -1 ; j<=1 ; j++){ | ||
706 | + int courseNumberChange = classCourse.getCourseNumber() + j ; | ||
707 | + if(courseNumberChange > maxCourseNumber){ | ||
708 | + continue; | ||
709 | + } | ||
710 | + if(courseNumberChange < 1){ | ||
711 | + continue; | ||
712 | + } | ||
713 | + if(changeClass(classCourse,teacherClass,weekChange,courseNumberChange)){ | ||
714 | + flag = true; | ||
715 | + break; | ||
716 | + } | ||
717 | + } | ||
718 | + if(flag){ | ||
719 | + break; | ||
720 | + } | ||
721 | + } | ||
722 | + if(flag){ | ||
723 | + break; | ||
724 | + } | ||
725 | + } | ||
726 | + if(flag){ | ||
727 | + times-- ; | ||
728 | + } | ||
729 | + } | ||
730 | + } | ||
731 | + | ||
732 | + private boolean changeClass(ClassCourse classCourse , TeacherClass teacherClass , int weekChange ,int courseNumberChange){ | ||
733 | + String team = classCourse.getTeam(); | ||
734 | + int week = classCourse.getWeek(); | ||
735 | + int courseNumber = classCourse.getCourseNumber(); | ||
736 | + ClassCourse searchClass = new ClassCourse(); | ||
737 | + searchClass.setSingleOrDouble(classCourse.getSingleOrDouble()); | ||
738 | + searchClass.setClassId(classCourse.getClassId()); | ||
739 | + searchClass.setWeek(weekChange); | ||
740 | + searchClass.setCourseNumber(courseNumberChange); | ||
741 | + searchClass.setTeam(team); | ||
742 | + ClassCourse nextClass = classCourseService.selectClassCourse(searchClass); | ||
743 | + if(StringUtils.isBlank(nextClass.getCourseName())){ | ||
744 | + //替换的课 本来就没课 | ||
745 | + String className =teacherClass.getCourseName(); | ||
746 | + String nextNameClass = nextClass.getCourseName(); | ||
747 | + classCourse.setCourseOpenId(courseService.selectBySchoolIdAndCourseName(classCourse.getSchoolId(),nextNameClass).getCourseId()); | ||
748 | + classCourse.setCourseName(nextNameClass); | ||
749 | + nextClass.setCourseOpenId(courseService.selectBySchoolIdAndCourseName(classCourse.getSchoolId(),className).getCourseId()); | ||
750 | + nextClass.setCourseName(className); | ||
751 | + classCourseService.updateByPrimaryKey(classCourse); | ||
752 | + classCourseService.updateByPrimaryKey(nextClass); | ||
753 | + | ||
754 | + TeacherCourse teacherCourse = new TeacherCourse(); | ||
755 | + teacherCourse.setTeam(team); | ||
756 | + teacherCourse.setSchoolId(classCourse.getSchoolId()); | ||
757 | + teacherCourse.setSingleOrDouble(classCourse.getSingleOrDouble()); | ||
758 | + teacherCourse.setGrade(classCourse.getGrade()); | ||
759 | + teacherCourse.setWeek(weekChange); | ||
760 | + teacherCourse.setCourseNumber(courseNumberChange); | ||
761 | + teacherCourse.setCourseName(className); | ||
762 | + teacherCourse.setTeacherName(teacherClass.getTeacherName()); | ||
763 | + teacherCourse.setClassId(classCourse.getClassId()+""); | ||
764 | + teacherCourseService.updateTeacherCourse(teacherCourse); | ||
765 | + return true ; | ||
766 | + }else { | ||
767 | + //增加判断 不排课的课程不能替换 合班的课程不能替换 联课的可能不能替换 | ||
768 | + if(!nextClass.getCourseName().equals("不排课")){ | ||
769 | + JoinClass joinClass = new JoinClass(); | ||
770 | + joinClass.setSchoolId(nextClass.getSchoolId()); | ||
771 | + joinClass.setTeam(nextClass.getTeam()); | ||
772 | + joinClass.setCourseId(nextClass.getCourseId()); | ||
773 | + joinClass.setClassId(nextClass.getClassId()); | ||
774 | + List<JoinClass> joinClasses = joinClassService.selectByCourse(joinClass); | ||
775 | + boolean joinClassFlag = joinClasses != null && joinClasses.size() > 0 ; | ||
776 | + TeacherClass searchTeacherClass = new TeacherClass(); | ||
777 | + searchTeacherClass.setSchoolId(nextClass.getSchoolId()); | ||
778 | + searchTeacherClass.setTeam(nextClass.getTeam()); | ||
779 | + searchTeacherClass.setCourseName(nextClass.getCourseName()); | ||
780 | + List<TeacherClass> teacherClasses = teacherClassService.selectByCourseName(searchTeacherClass); | ||
781 | + boolean joinTimesFlag = teacherClasses.get(0).getJoinTimes()>0?true:false; | ||
782 | + if(nextClass.getCourseName().equals("不排课") || joinClassFlag || joinTimesFlag){ | ||
783 | + //这些课 不能替换 | ||
784 | + }else { | ||
785 | + TeacherClass replaceClassTeacher = new TeacherClass(); | ||
786 | + replaceClassTeacher.setSchoolId(classCourse.getSchoolId()); | ||
787 | + replaceClassTeacher.setGrade(classCourse.getGrade()); | ||
788 | + replaceClassTeacher.setClassId(classCourse.getClassId()); | ||
789 | + replaceClassTeacher.setCourseName(nextClass.getCourseName()); | ||
790 | + replaceClassTeacher.setTeam(team); | ||
791 | + String nextTeacher = teacherClassService.selectByCourseAndClass(replaceClassTeacher).getTeacherName(); | ||
792 | + | ||
793 | + //原课的老师 下一节课是否有课 ;下一节课的老师 上一节是否有课 | ||
794 | + TeacherCourse searchTeacher = new TeacherCourse(); | ||
795 | + searchTeacher.setSchoolId(classCourse.getSchoolId()); | ||
796 | + searchTeacher.setSingleOrDouble(classCourse.getSingleOrDouble()); | ||
797 | + searchTeacher.setTeacherName(teacherClass.getTeacherName()); | ||
798 | + searchTeacher.setWeek(weekChange); | ||
799 | + searchTeacher.setCourseNumber(courseNumberChange); | ||
800 | + searchTeacher.setTeam(team); | ||
801 | + TeacherCourse teacherCourse = teacherCourseService.selectTeacherCourse(searchTeacher); | ||
802 | + | ||
803 | + TeacherCourse nextTeacherCourseSearch = new TeacherCourse(); | ||
804 | + nextTeacherCourseSearch.setSchoolId(classCourse.getSchoolId()); | ||
805 | + nextTeacherCourseSearch.setSingleOrDouble(classCourse.getSingleOrDouble()); | ||
806 | + nextTeacherCourseSearch.setTeacherName(nextTeacher); | ||
807 | + nextTeacherCourseSearch.setWeek(week); | ||
808 | + nextTeacherCourseSearch.setCourseNumber(courseNumber); | ||
809 | + nextTeacherCourseSearch.setTeam(team); | ||
810 | + TeacherCourse nextTeacherCourse = teacherCourseService.selectTeacherCourse(nextTeacherCourseSearch); | ||
811 | + if(StringUtils.isBlank(nextTeacherCourse.getCourseName()) && StringUtils.isBlank(teacherCourse.getCourseName())){ | ||
812 | + //则上下替换课程 班级课程上下替换,老师课程交换 | ||
813 | + String className =teacherClass.getCourseName(); | ||
814 | + String nextClassName = nextClass.getCourseName(); | ||
815 | + classCourse.setCourseName(nextClassName); | ||
816 | + nextClass.setCourseName(className); | ||
817 | + classCourseService.updateByPrimaryKey(classCourse); | ||
818 | + classCourseService.updateByPrimaryKey(nextClass); | ||
819 | + | ||
820 | + teacherCourse.setGrade(teacherClass.getGrade()); | ||
821 | + teacherCourse.setCourseName(className); | ||
822 | + teacherCourse.setClassId(teacherClass.getClassId()+""); | ||
823 | + teacherCourseService.updateTeacherCourse(teacherCourse); | ||
824 | + | ||
825 | + nextTeacherCourse.setGrade(nextClass.getGrade()); | ||
826 | + nextTeacherCourse.setCourseName(nextClassName); | ||
827 | + nextTeacherCourse.setClassId(nextClass.getClassId()+""); | ||
828 | + teacherCourseService.updateTeacherCourse(nextTeacherCourse); | ||
829 | + | ||
830 | + nextTeacherCourse.setWeek(weekChange); | ||
831 | + nextTeacherCourse.setCourseNumber(courseNumberChange); | ||
832 | + nextTeacherCourse.setCourseName(null); | ||
833 | + nextTeacherCourse.setClassId(null); | ||
834 | + teacherCourseService.updateTeacherCourse(nextTeacherCourse); | ||
835 | + return true ; | ||
836 | + } | ||
837 | + } | ||
838 | + } | ||
839 | + } | ||
840 | + return false ; | ||
841 | + } | ||
842 | + | ||
843 | + //所谓权重 节次优先级 | ||
844 | + private List<Integer> reSort(List<Integer> list , int number){ | ||
845 | + int index = -1 ; | ||
846 | + for(Integer i = 0 ; i < list.size() ;i++){ | ||
847 | + if(list.get(i) == number){ | ||
848 | + index = i ; | ||
849 | + break ; | ||
850 | + } | ||
851 | + } | ||
852 | + list.remove(index); | ||
853 | + list.add(number); | ||
854 | + return list ; | ||
855 | + } | ||
856 | + | ||
857 | + //查所在课表中 返回某天某节课 | ||
858 | + private ClassCourse getClassCourse(List<ClassCourse> list , int week , int courseNumber){ | ||
859 | + ClassCourse result = null ; | ||
860 | + for(ClassCourse classCourse : list){ | ||
861 | + if(classCourse.getWeek() == week && classCourse.getCourseNumber() == courseNumber){ | ||
862 | + result = classCourse ; | ||
863 | + break; | ||
864 | + } | ||
865 | + } | ||
866 | + return result; | ||
867 | + } | ||
868 | + | ||
869 | + //生成教师排课表 | ||
870 | + private void insertTeacherCourse(boolean isDouble , TeacherCourse teacherCourse){ | ||
871 | + List<TeacherCourse> list = new ArrayList<>(); | ||
872 | + //单周课表必生成 | ||
873 | + list.addAll(createWeekTeacherCourse(teacherCourse,false)); | ||
874 | + if(isDouble){ | ||
875 | + list.addAll(createWeekTeacherCourse(teacherCourse,true)); | ||
876 | + } | ||
877 | + teacherCourseService.insertBatch(list); | ||
878 | + } | ||
879 | + | ||
880 | + // 创建教师 周课表 单周isDouble false 双周isDouble true | ||
881 | + private List<TeacherCourse> createWeekTeacherCourse(TeacherCourse teacherCourse , boolean isDouble){ | ||
882 | + int singleOrDouble = 1 ; | ||
883 | + if(isDouble){ | ||
884 | + singleOrDouble = 2; | ||
885 | + } | ||
886 | + Date date =new Date(); | ||
887 | + List<TeacherCourse> list = new ArrayList<>(); | ||
888 | + int courseNumMax = classCourseService.selectMaxCourseNumber(teacherCourse.getSchoolId(),teacherCourse.getTeam()); | ||
889 | + for (int i = 1; i <= 7; i++) { | ||
890 | + for(int j = 1 ; j <= courseNumMax ; j++){ | ||
891 | + TeacherCourse temp = new TeacherCourse() ; | ||
892 | + temp.setTeam(teacherCourse.getTeam()); | ||
893 | + temp.setSchoolId(teacherCourse.getSchoolId()); | ||
894 | + temp.setClassId(teacherCourse.getClassId()); | ||
895 | + temp.setGrade(teacherCourse.getGrade()); | ||
896 | + temp.setTeacherName(teacherCourse.getTeacherName()); | ||
897 | + temp.setWeek(i); | ||
898 | + temp.setCourseNumber(j); | ||
899 | + temp.setCreateTime(date); | ||
900 | + temp.setSingleOrDouble(singleOrDouble); | ||
901 | + list.add(temp); | ||
902 | + } | ||
903 | + } | ||
904 | + return list ; | ||
905 | + } | ||
906 | + | ||
907 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/controller/ScheduleInitController.java
0 → 100644
@@ -0,0 +1,301 @@ | @@ -0,0 +1,301 @@ | ||
1 | +package com.sincere.independence.controller; | ||
2 | + | ||
3 | +import com.alibaba.fastjson.JSONObject; | ||
4 | +import com.sincere.common.util.HttpClientUtils; | ||
5 | +import com.sincere.common.vo.BaseVo; | ||
6 | +import com.sincere.common.vo.independence.paike.InitRepVo; | ||
7 | +import com.sincere.independence.model.*; | ||
8 | +import com.sincere.independence.service.*; | ||
9 | +import io.swagger.annotations.Api; | ||
10 | +import io.swagger.annotations.ApiOperation; | ||
11 | +import org.apache.commons.lang3.StringUtils; | ||
12 | +import org.springframework.beans.factory.annotation.Autowired; | ||
13 | +import org.springframework.beans.factory.annotation.Value; | ||
14 | +import org.springframework.transaction.annotation.Transactional; | ||
15 | +import org.springframework.web.bind.annotation.*; | ||
16 | + | ||
17 | +import java.util.ArrayList; | ||
18 | +import java.util.Date; | ||
19 | +import java.util.List; | ||
20 | + | ||
21 | +@RestController | ||
22 | +@RequestMapping(value = "/init") | ||
23 | +@Api(value = "排课表") | ||
24 | +public class ScheduleInitController { | ||
25 | + | ||
26 | + @Autowired | ||
27 | + ClassModelService classModelService; | ||
28 | + | ||
29 | + @Autowired | ||
30 | + TeacherClassService teacherClassService; | ||
31 | + | ||
32 | + @Autowired | ||
33 | + CourseService courseService ; | ||
34 | + | ||
35 | + @Autowired | ||
36 | + TeacherService teacherService; | ||
37 | + | ||
38 | + @Autowired | ||
39 | + ScheduleService scheduleService; | ||
40 | + | ||
41 | + @Autowired | ||
42 | + TeacherCourseService teacherCourseService; | ||
43 | + | ||
44 | + @Autowired | ||
45 | + JoinClassService joinClassService; | ||
46 | + | ||
47 | + @Autowired | ||
48 | + ClassCourseService classCourseService; | ||
49 | + | ||
50 | + @Value("${remoting.url}") | ||
51 | + private String url ; | ||
52 | + | ||
53 | + @ApiOperation("创建排课计划 ") | ||
54 | + @RequestMapping(value = "createSchedule", method = RequestMethod.GET) | ||
55 | + public int createSchedule(@RequestParam("team")String team , @RequestParam("scheduleName") String scheduleName , | ||
56 | + @RequestParam("schoolId") int schoolId){ | ||
57 | + Schedule schedule = new Schedule(); | ||
58 | + schedule.setTeam(team); | ||
59 | + schedule.setScheduleName(scheduleName); | ||
60 | + schedule.setSchoolId(schoolId); | ||
61 | + Schedule temp = scheduleService.selectBySchoolAndTeam(schedule); | ||
62 | + if(temp == null){ | ||
63 | + scheduleService.insert(schedule); | ||
64 | + }else { | ||
65 | + return 0 ; | ||
66 | + } | ||
67 | + temp = scheduleService.selectBySchoolAndTeam(schedule); | ||
68 | + initMessage(schedule.getSchoolId()); | ||
69 | + return temp.getId(); | ||
70 | + } | ||
71 | + | ||
72 | + @ApiOperation("更新计划") | ||
73 | + @RequestMapping(value = "updateSchedule", method = RequestMethod.GET) | ||
74 | + public BaseVo updateSchedule(@RequestParam("scheduleId") int scheduleId , @RequestParam("scheduleName")String scheduleName, | ||
75 | + @RequestParam("team")String team){ | ||
76 | + BaseVo baseVo = new BaseVo(); | ||
77 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
78 | + schedule.setScheduleName(scheduleName); | ||
79 | + schedule.setTeam(team); | ||
80 | + scheduleService.update(schedule); | ||
81 | + return baseVo; | ||
82 | + } | ||
83 | + | ||
84 | + @ApiOperation("复制") | ||
85 | + @RequestMapping(value = "copySchedule", method = RequestMethod.GET) | ||
86 | + public BaseVo copySchedule(@RequestParam("scheduleId") int scheduleId , @RequestParam("scheduleName")String scheduleName, | ||
87 | + @RequestParam("team")String team){ | ||
88 | + BaseVo baseVo = new BaseVo(); | ||
89 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
90 | + if(schedule == null){ | ||
91 | + baseVo.setMessage("原始课表不存在"); | ||
92 | + baseVo.setSuccess(false); | ||
93 | + return baseVo; | ||
94 | + } | ||
95 | + Schedule temp = new Schedule(); | ||
96 | + temp.setSchoolId(schedule.getSchoolId()); | ||
97 | + temp.setTeam(team); | ||
98 | + Schedule result = scheduleService.selectBySchoolAndTeam(temp); | ||
99 | + if(result != null){ | ||
100 | + baseVo.setMessage("该学年学期已创建课表计划"); | ||
101 | + baseVo.setSuccess(false); | ||
102 | + return baseVo; | ||
103 | + } | ||
104 | + temp.setScheduleName(scheduleName); | ||
105 | + scheduleService.insert(temp); | ||
106 | + Date date = new Date(); | ||
107 | + //复制 classCourse teacherClass teacherCourse | ||
108 | + List<ClassCourse> classCourses = classCourseService.copyClassCourse(schedule.getSchoolId(),schedule.getTeam()); | ||
109 | + for(ClassCourse classCourse :classCourses){ | ||
110 | + classCourse.setSchoolId(temp.getSchoolId()); | ||
111 | + classCourse.setTeam(temp.getTeam()); | ||
112 | + classCourse.setCreateTime(date); | ||
113 | + } | ||
114 | + classCourseService.insertBatch(classCourses); | ||
115 | + TeacherClass teacherClass = new TeacherClass(); | ||
116 | + teacherClass.setSchoolId(schedule.getSchoolId()); | ||
117 | + teacherClass.setTeam(schedule.getTeam()); | ||
118 | + List<TeacherClass> teacherClasses = teacherClassService.selectBySchoolAndTeam(teacherClass); | ||
119 | + for(TeacherClass teacherClass1 :teacherClasses){ | ||
120 | + teacherClass1.setSchoolId(temp.getSchoolId()); | ||
121 | + teacherClass1.setTeam(temp.getTeam()); | ||
122 | + teacherClass1.setCreateTime(date); | ||
123 | + } | ||
124 | + teacherClassService.insertBatch(teacherClasses); | ||
125 | + | ||
126 | + List<TeacherCourse> teacherCourses = teacherCourseService.selectBySchoolIdAndTeam(schedule.getSchoolId(),schedule.getTeam()); | ||
127 | + for(TeacherCourse teacherCourse : teacherCourses){ | ||
128 | + teacherCourse.setSchoolId(temp.getSchoolId()); | ||
129 | + teacherCourse.setTeam(temp.getTeam()); | ||
130 | + teacherCourse.setCreateTime(date); | ||
131 | + } | ||
132 | + teacherCourseService.insertBatch(teacherCourses); | ||
133 | + return baseVo; | ||
134 | + } | ||
135 | + | ||
136 | + @ApiOperation("删除排课计划") | ||
137 | + @RequestMapping(value = "deleteSchedule", method = RequestMethod.GET) | ||
138 | + public BaseVo deleteSchedule(@RequestParam("scheduleId") int scheduleId){ | ||
139 | + BaseVo baseVo = new BaseVo(); | ||
140 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
141 | + if(schedule == null){ | ||
142 | + baseVo.setSuccess(false); | ||
143 | + baseVo.setMessage("无排课计划"); | ||
144 | + return baseVo; | ||
145 | + } | ||
146 | + teacherCourseService.deleteBySchoolIdAndTeam(schedule.getSchoolId(),schedule.getTeam()); | ||
147 | + joinClassService.deleteBySchoolIdAndTeam(schedule.getSchoolId(),schedule.getTeam()); | ||
148 | + classCourseService.deleteBySchoolIdAndTeam(schedule.getSchoolId(),schedule.getTeam()); | ||
149 | + TeacherClass teacherClass = new TeacherClass(); | ||
150 | + teacherClass.setSchoolId(schedule.getSchoolId()); | ||
151 | + teacherClass.setTeam(schedule.getTeam()); | ||
152 | + teacherClassService.deleteBySchoolAndTeam(teacherClass); | ||
153 | + courseService.initSchoolId(schedule.getSchoolId()); | ||
154 | + scheduleService.deleteBySchedule(schedule.getId()); | ||
155 | + return baseVo; | ||
156 | + } | ||
157 | + | ||
158 | + @ApiOperation("获取基础信息") | ||
159 | + @RequestMapping(value = "getInitMessage", method = RequestMethod.GET) | ||
160 | + public InitRepVo getInitMessage(@RequestParam("scheduleId") int scheduleId){ | ||
161 | + InitRepVo initRepVo = new InitRepVo(); | ||
162 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
163 | + if(schedule == null){ | ||
164 | + initRepVo.setSuccess(false); | ||
165 | + initRepVo.setMessage("没有改排课计划"); | ||
166 | + return initRepVo; | ||
167 | + } | ||
168 | + List<Course> courses = courseService.selectBySchoolId2(schedule.getSchoolId()); | ||
169 | + List<Teacher> teachers = teacherService.selectBySchoolId(schedule.getSchoolId()); | ||
170 | + List<ClassModel> classModels = classModelService.selectBySchoolId(schedule.getSchoolId()); | ||
171 | + initRepVo.setClassNumber(classModels.size()); | ||
172 | + initRepVo.setCourseNumber(courses.size()); | ||
173 | + initRepVo.setTeacherNumber(teachers.size()); | ||
174 | + return initRepVo; | ||
175 | + } | ||
176 | + | ||
177 | + @Transactional | ||
178 | + @ApiOperation("教师授课信息") | ||
179 | + @RequestMapping(value = "initTeacherCourse", method = RequestMethod.POST) | ||
180 | + public boolean initTeacherCourse(@RequestBody List<TeacherClass> teacherClasses){ | ||
181 | + BaseVo baseVo = new BaseVo(); | ||
182 | + Schedule search = new Schedule(); | ||
183 | + search.setSchoolId(teacherClasses.get(0).getSchoolId()); | ||
184 | + search.setTeam(teacherClasses.get(0).getTeam()); | ||
185 | + Schedule schedule = scheduleService.selectBySchoolAndTeam(search); | ||
186 | + teacherClassService.insertBatch(teacherClasses); | ||
187 | + schedule.setSpeed(3); | ||
188 | + scheduleService.updateSpeed(schedule); | ||
189 | + return true; | ||
190 | + } | ||
191 | + | ||
192 | + private void initMessage(int schoolId){ | ||
193 | + JSONObject teacherList = HttpClientUtils.httpGet(url+"/api/EasyN/GetSchoolTeacher?SchoolId="+schoolId); | ||
194 | + List<JSONObject> openTeacherList = (List<JSONObject>)teacherList.get("data"); | ||
195 | + List<Teacher> teachers = new ArrayList<>(); | ||
196 | + for(JSONObject json :openTeacherList){ | ||
197 | + Teacher teacher = new Teacher(); | ||
198 | + teacher.setSchoolId(Integer.valueOf(json.get("school_id").toString())); | ||
199 | + teacher.setTeacherId(Integer.valueOf(json.get("teacher_id").toString())); | ||
200 | + teacher.setTeacherName(json.get("name").toString()); | ||
201 | + teachers.add(teacher); | ||
202 | + } | ||
203 | + initTeacher(teachers,schoolId); | ||
204 | + JSONObject classList = HttpClientUtils.httpGet(url+"/api/EasyN/GetSchoolClass?SchoolId="+schoolId); | ||
205 | + List<JSONObject> openClasses = (List<JSONObject>)classList.get("data"); | ||
206 | + List<ClassModel> classModels = new ArrayList<>(); | ||
207 | + for(JSONObject json :openClasses){ | ||
208 | + ClassModel classModel = new ClassModel(); | ||
209 | + classModel.setSchoolId(Integer.valueOf(json.get("school_id").toString())); | ||
210 | + classModel.setClassId(Integer.valueOf(json.get("class_id").toString())); | ||
211 | + classModel.setGrade(json.get("gardeName").toString()); | ||
212 | + classModel.setClassName(json.get("class_name").toString()); | ||
213 | + classModels.add(classModel); | ||
214 | + } | ||
215 | + initClass(classModels,schoolId); | ||
216 | + JSONObject courseList = HttpClientUtils.httpGet(url+"/api/EasyN/GetSchoolSubject?SchoolId="+schoolId); | ||
217 | + List<JSONObject> openCourses = (List<JSONObject>)courseList.get("data"); | ||
218 | + List<Course> courses = new ArrayList<>(); | ||
219 | + for(JSONObject json :openCourses){ | ||
220 | + Course course = new Course(); | ||
221 | + course.setSchoolId(Integer.valueOf(json.get("school_id").toString())); | ||
222 | + course.setCourseId(Integer.valueOf(json.get("subject_id").toString())); | ||
223 | + course.setCourseName(json.get("subject_name").toString()); | ||
224 | + course.setCourseType(0); | ||
225 | + courses.add(course); | ||
226 | + } | ||
227 | + initCourse(courses,schoolId); | ||
228 | + } | ||
229 | + | ||
230 | + public BaseVo initCourse(List<Course> courseList ,int schoolId){ | ||
231 | + BaseVo baseVo = new BaseVo(); | ||
232 | + courseService.deleteSchoolId(schoolId); | ||
233 | + for(Course course : courseList){ | ||
234 | + if(course.getCourseId() == 0 || StringUtils.isBlank(course.getCourseName())){ | ||
235 | + baseVo.setSuccess(false); | ||
236 | + baseVo.setMessage("缺少参数"); | ||
237 | + break; | ||
238 | + } | ||
239 | + } | ||
240 | + if(baseVo.isSuccess()){ | ||
241 | + courseService.insertBatch(courseList); | ||
242 | + baseVo.setSuccess(true); | ||
243 | + return baseVo; | ||
244 | + }else { | ||
245 | + return baseVo; | ||
246 | + } | ||
247 | + } | ||
248 | + | ||
249 | + public BaseVo initClass(List<ClassModel> classList , int schoolId){ | ||
250 | + BaseVo baseVo = new BaseVo(); | ||
251 | + classModelService.deleteSchool(schoolId); | ||
252 | + for(ClassModel classModel : classList){ | ||
253 | + if(classModel.getClassId() == 0 || StringUtils.isBlank(classModel.getClassName()) || | ||
254 | + StringUtils.isBlank(classModel.getGrade()) || classModel.getSchoolId() == 0){ | ||
255 | + baseVo.setSuccess(false); | ||
256 | + baseVo.setMessage("缺少参数"); | ||
257 | + break; | ||
258 | + } | ||
259 | + } | ||
260 | + if(baseVo.isSuccess()){ | ||
261 | + classModelService.insertBatch(classList); | ||
262 | + baseVo.setSuccess(true); | ||
263 | + return baseVo; | ||
264 | + }else { | ||
265 | + return baseVo; | ||
266 | + } | ||
267 | + } | ||
268 | + | ||
269 | + public BaseVo initTeacher(List<Teacher> teacherList , int schoolId){ | ||
270 | + List<Teacher> result = new ArrayList<>(); | ||
271 | + for(Teacher teacher : teacherList){ | ||
272 | + boolean isExist = false; | ||
273 | + for(Teacher t : result){ | ||
274 | + if(t.getTeacherName().equals(teacher.getTeacherName())){ | ||
275 | + isExist = true; | ||
276 | + } | ||
277 | + } | ||
278 | + if(!isExist && StringUtils.isNotBlank(teacher.getTeacherName())){ | ||
279 | + result.add(teacher); | ||
280 | + } | ||
281 | + } | ||
282 | + BaseVo baseVo = new BaseVo(); | ||
283 | + teacherService.deleteSchool(schoolId); | ||
284 | + for(Teacher teacher : result){ | ||
285 | + if(teacher.getSchoolId() == 0 || StringUtils.isBlank(teacher.getTeacherName()) || | ||
286 | + teacher.getTeacherId() == 0){ | ||
287 | + baseVo.setSuccess(false); | ||
288 | + baseVo.setMessage("缺少参数"); | ||
289 | + break; | ||
290 | + } | ||
291 | + } | ||
292 | + if(baseVo.isSuccess()){ | ||
293 | + teacherService.insertBatch(result); | ||
294 | + baseVo.setSuccess(true); | ||
295 | + return baseVo; | ||
296 | + }else { | ||
297 | + return baseVo; | ||
298 | + } | ||
299 | + } | ||
300 | + | ||
301 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/controller/ScheduleMessageController.java
0 → 100644
@@ -0,0 +1,391 @@ | @@ -0,0 +1,391 @@ | ||
1 | +package com.sincere.independence.controller; | ||
2 | + | ||
3 | +import com.sincere.common.dto.independence.*; | ||
4 | +import com.sincere.common.vo.BaseVo; | ||
5 | +import com.sincere.common.vo.independence.paike.*; | ||
6 | +import com.sincere.independence.model.*; | ||
7 | +import com.sincere.independence.service.*; | ||
8 | +import io.swagger.annotations.ApiOperation; | ||
9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
10 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
11 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
12 | +import org.springframework.web.bind.annotation.RequestParam; | ||
13 | +import org.springframework.web.bind.annotation.RestController; | ||
14 | + | ||
15 | +import java.util.ArrayList; | ||
16 | +import java.util.List; | ||
17 | + | ||
18 | +/** | ||
19 | + * @author chen | ||
20 | + * @version 1.0 | ||
21 | + * @date 2019/10/11 0011 14:00 | ||
22 | + */ | ||
23 | +@RestController | ||
24 | +public class ScheduleMessageController { | ||
25 | + | ||
26 | + @Autowired | ||
27 | + ScheduleService scheduleService; | ||
28 | + | ||
29 | + @Autowired | ||
30 | + CourseService courseService; | ||
31 | + | ||
32 | + @Autowired | ||
33 | + ClassCourseService classCourseService; | ||
34 | + | ||
35 | + @Autowired | ||
36 | + ClassModelService classModelService; | ||
37 | + | ||
38 | + @Autowired | ||
39 | + JoinClassService joinClassService; | ||
40 | + | ||
41 | + @Autowired | ||
42 | + TeacherClassService teacherClassService; | ||
43 | + | ||
44 | + @RequestMapping(value = "getScheduleList", method = RequestMethod.GET) | ||
45 | + public ScheduleListRepVo getScheduleList(@RequestParam("schoolId") int schoolId){ | ||
46 | + ScheduleListRepVo scheduleListRepVo = new ScheduleListRepVo(); | ||
47 | + List<Schedule> scheduleList = scheduleService.selectBySchool(schoolId) ; | ||
48 | + List<ScheduleDto> scheduleDtos = new ArrayList<>(); | ||
49 | + for(Schedule schedule:scheduleList){ | ||
50 | + scheduleDtos.add(initSchedule(schedule)); | ||
51 | + } | ||
52 | + scheduleListRepVo.setData(scheduleDtos); | ||
53 | + return scheduleListRepVo; | ||
54 | + } | ||
55 | + | ||
56 | + private ScheduleDto initSchedule(Schedule schedule){ | ||
57 | + ScheduleDto scheduleDto = new ScheduleDto(); | ||
58 | + scheduleDto.setId(schedule.getId()); | ||
59 | + scheduleDto.setScheduleName(schedule.getScheduleName()); | ||
60 | + scheduleDto.setSchoolId(schedule.getSchoolId()); | ||
61 | + scheduleDto.setTeam(schedule.getTeam()); | ||
62 | + scheduleDto.setCreateTime(schedule.getCreateTime()); | ||
63 | + scheduleDto.setUpdateTime(schedule.getUpdateTime()); | ||
64 | + scheduleDto.setSpeed(schedule.getSpeed()); | ||
65 | + scheduleDto.setMorning(schedule.getMorning()); | ||
66 | + scheduleDto.setAfternoon(schedule.getAfternoon()); | ||
67 | + scheduleDto.setNight(schedule.getNight()); | ||
68 | + return scheduleDto ; | ||
69 | + } | ||
70 | + | ||
71 | + @RequestMapping(value = "getClassList", method = RequestMethod.GET) | ||
72 | + public ClassRepVo getClassList(@RequestParam("schoolId") int schoolId){ | ||
73 | + ClassRepVo classRepVo = new ClassRepVo(); | ||
74 | + List<ClassModel> classModels = classModelService.selectBySchoolId(schoolId); | ||
75 | + List<ClassModelDto> list = new ArrayList<>(); | ||
76 | + for(ClassModel classModel :classModels){ | ||
77 | + list.add(initClassModel(classModel)); | ||
78 | + } | ||
79 | + classRepVo.setData(list); | ||
80 | + return classRepVo; | ||
81 | + } | ||
82 | + | ||
83 | + private ClassModelDto initClassModel(ClassModel classModel){ | ||
84 | + ClassModelDto classModelDto = new ClassModelDto(); | ||
85 | + classModelDto.setClassId(classModel.getClassId()); | ||
86 | + classModelDto.setClassName(classModel.getClassName()); | ||
87 | + classModelDto.setGrade(classModel.getGrade()); | ||
88 | + classModelDto.setSchoolId(classModel.getSchoolId()); | ||
89 | + return classModelDto; | ||
90 | + } | ||
91 | + | ||
92 | + @RequestMapping(value = "getCourseList", method = RequestMethod.GET) | ||
93 | + public CourseRepVo getCourseList(@RequestParam("scheduleId") int scheduleId){ | ||
94 | + CourseRepVo courseRepVo = new CourseRepVo(); | ||
95 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
96 | + if(schedule == null){ | ||
97 | + courseRepVo.setSuccess(false); | ||
98 | + courseRepVo.setMessage("请先创建计划"); | ||
99 | + return courseRepVo; | ||
100 | + } | ||
101 | + List<Course> list = courseService.selectBySchoolId(schedule.getSchoolId()); | ||
102 | + List<CourseDto> courseDtos = new ArrayList<>(); | ||
103 | + for(Course course : list){ | ||
104 | + courseDtos.add(initCourse(course)); | ||
105 | + } | ||
106 | + courseRepVo.setData(courseDtos); | ||
107 | + return courseRepVo; | ||
108 | + } | ||
109 | + | ||
110 | + private CourseDto initCourse(Course course){ | ||
111 | + CourseDto courseDto = new CourseDto(); | ||
112 | + courseDto.setCourseId(course.getCourseId()); | ||
113 | + courseDto.setCourseName(course.getCourseName()); | ||
114 | + courseDto.setCourseType(course.getCourseType()); | ||
115 | + courseDto.setId(course.getId()); | ||
116 | + courseDto.setSchoolId(course.getSchoolId()); | ||
117 | + return courseDto; | ||
118 | + } | ||
119 | + | ||
120 | + @RequestMapping(value = "getCourseClassList", method = RequestMethod.GET) | ||
121 | + public List<GetCourseClassListRepVo> getCourseClassList(@RequestParam("scheduleId") int scheduleId , @RequestParam("courseId") int courseId){ | ||
122 | + List<GetCourseClassListRepVo> repVos = new ArrayList<>(); | ||
123 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
124 | + if(schedule == null){ | ||
125 | + return null; | ||
126 | + } | ||
127 | + TeacherClass search = new TeacherClass(); | ||
128 | + search.setSchoolId(schedule.getSchoolId()); | ||
129 | + search.setTeam(schedule.getTeam()); | ||
130 | + String courseName =courseService.selectBySchoolIdAndCourseId(schedule.getSchoolId(),courseId).getCourseName(); | ||
131 | + search.setCourseName(courseName); | ||
132 | + List<TeacherClass> list = teacherClassService.selectByCourseName(search); | ||
133 | + for(TeacherClass teacherClass : list){ | ||
134 | + GetCourseClassListRepVo repVo = new GetCourseClassListRepVo(); | ||
135 | + repVo.setClassId(teacherClass.getClassId()); | ||
136 | + repVo.setClassName(classModelService.selectByPrimaryKey(teacherClass.getClassId()).getClassName()); | ||
137 | + repVo.setCourseId(courseId); | ||
138 | + repVo.setCourseName(courseName); | ||
139 | + repVo.setTeacherName(teacherClass.getTeacherName()); | ||
140 | + repVos.add(repVo); | ||
141 | + } | ||
142 | + return repVos; | ||
143 | + } | ||
144 | + | ||
145 | + @ApiOperation("获取班级排课课程") | ||
146 | + @RequestMapping(value = "getClassCourseList", method = RequestMethod.GET) | ||
147 | + public ClassCourseRepVo getClassCourseList(@RequestParam("scheduleId") int scheduleId , @RequestParam("classId") int classId){ | ||
148 | + ClassCourseRepVo classCourseRepVo = new ClassCourseRepVo(); | ||
149 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
150 | + if(schedule == null){ | ||
151 | + classCourseRepVo.setSuccess(false); | ||
152 | + classCourseRepVo.setMessage("请先创建计划"); | ||
153 | + return classCourseRepVo; | ||
154 | + } | ||
155 | + ClassCourse search = new ClassCourse(); | ||
156 | + search.setClassId(classId); | ||
157 | + search.setSingleOrDouble(1); | ||
158 | + search.setTeam(schedule.getTeam()); | ||
159 | + List<ClassCourse> list = classCourseService.selectByClassIdAndSingleOrDouble(search); | ||
160 | + List<ClassCourseDto> classCourseDtos = new ArrayList<>(); | ||
161 | + for(ClassCourse classCourse : list){ | ||
162 | + classCourseDtos.add(initClassCourse(classCourse)); | ||
163 | + } | ||
164 | + classCourseRepVo.setData(classCourseDtos); | ||
165 | + | ||
166 | + int max = schedule.getMorning() + schedule.getAfternoon() + schedule.getNight() ; | ||
167 | + for(int i = 1 ; i < 6 ; i++){ | ||
168 | + System.out.print("周"+i+" "); | ||
169 | + for(int j = 1 ; j < max ; j++){ | ||
170 | + System.out.print(getClassCourse(list,i,j).getCourseName() + " "); | ||
171 | + } | ||
172 | + System.out.println(); | ||
173 | + } | ||
174 | + return classCourseRepVo; | ||
175 | + } | ||
176 | + | ||
177 | + private ClassCourseDto initClassCourse(ClassCourse classCourse){ | ||
178 | + ClassCourseDto classCourseDto = new ClassCourseDto(); | ||
179 | + classCourseDto.setClassId(classCourse.getClassId()); | ||
180 | + classCourseDto.setSchoolId(classCourse.getSchoolId()); | ||
181 | + classCourseDto.setTeam(classCourse.getTeam()); | ||
182 | + classCourseDto.setGrade(classCourse.getGrade()); | ||
183 | + classCourseDto.setCourseId(classCourse.getCourseId()); | ||
184 | + classCourseDto.setSingleOrDouble(classCourse.getSingleOrDouble()); | ||
185 | + classCourseDto.setWeek(classCourse.getWeek()); | ||
186 | + classCourseDto.setCourseNumber(classCourse.getCourseNumber()); | ||
187 | + classCourseDto.setCourseName(classCourse.getCourseName()); | ||
188 | + return classCourseDto; | ||
189 | + } | ||
190 | + | ||
191 | + //查所在课表中 返回某天某节课 | ||
192 | + private ClassCourse getClassCourse(List<ClassCourse> list , int week , int courseNumber){ | ||
193 | + ClassCourse result = null ; | ||
194 | + for(ClassCourse classCourse : list){ | ||
195 | + if(classCourse.getWeek() == week && classCourse.getCourseNumber() == courseNumber){ | ||
196 | + result = classCourse ; | ||
197 | + break; | ||
198 | + } | ||
199 | + } | ||
200 | + return result; | ||
201 | + } | ||
202 | + | ||
203 | + | ||
204 | + @ApiOperation("获取合班信息") | ||
205 | + @RequestMapping(value = "getJoinList", method = RequestMethod.GET) | ||
206 | + public JoinRepVo getJoinList(@RequestParam("scheduleId") int scheduleId){ | ||
207 | + JoinRepVo joinRepVo = new JoinRepVo(); | ||
208 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
209 | + JoinClass joinClass = new JoinClass(); | ||
210 | + joinClass.setSchoolId(schedule.getSchoolId()); | ||
211 | + joinClass.setTeam(schedule.getTeam()); | ||
212 | + List<JoinClass> list = joinClassService.selectByCourse(joinClass); | ||
213 | + List<JoinDetail> joinDetails = new ArrayList<>(); | ||
214 | + for(JoinClass temp : list){ | ||
215 | + boolean flag = false ; | ||
216 | + ClassModel classModel = classModelService.selectByPrimaryKey(temp.getClassId()); | ||
217 | + for(JoinDetail joinDetail : joinDetails){ | ||
218 | + if(temp.getCourseGroup() == joinDetail.getCourseGroup()){ | ||
219 | + flag = true; | ||
220 | + if(!joinDetail.getClassName().contains(classModel.getClassName())){ | ||
221 | + joinDetail.setClassName(joinDetail.getClassName()+","+classModel.getClassName()); | ||
222 | + } | ||
223 | + } | ||
224 | + } | ||
225 | + if(!flag){ | ||
226 | + JoinDetail joinDetail = new JoinDetail(); | ||
227 | + joinDetail.setCourseGroup(temp.getCourseGroup()); | ||
228 | + joinDetail.setClassName(classModel.getClassName()); | ||
229 | + joinDetail.setCourseName(temp.getCourseName()); | ||
230 | + TeacherClass search = new TeacherClass(); | ||
231 | + search.setSchoolId(schedule.getSchoolId()); | ||
232 | + search.setTeam(schedule.getTeam()); | ||
233 | + search.setClassId(temp.getClassId()); | ||
234 | + search.setCourseName(temp.getCourseName()); | ||
235 | + joinDetail.setTeacherName(teacherClassService.selectByCourseAndClass(search).getTeacherName()); | ||
236 | + joinDetails.add(joinDetail); | ||
237 | + } | ||
238 | + } | ||
239 | + joinRepVo.setData(joinDetails); | ||
240 | + return joinRepVo; | ||
241 | + } | ||
242 | + | ||
243 | + @ApiOperation("获取导入任课信息") | ||
244 | + @RequestMapping(value = "getTeacherClassList", method = RequestMethod.GET) | ||
245 | + public TeacherCourseRepVo getTeacherClassList(@RequestParam("scheduleId") int scheduleId){ | ||
246 | + TeacherCourseRepVo teacherCourseRepVo = new TeacherCourseRepVo(); | ||
247 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
248 | + TeacherClass temp = new TeacherClass(); | ||
249 | + temp.setSchoolId(schedule.getSchoolId()); | ||
250 | + temp.setTeam(schedule.getTeam()); | ||
251 | + List<ClassCourseVO> data = new ArrayList<>(); | ||
252 | + List<String> courseNameList = new ArrayList<>(); | ||
253 | + List<TeacherClass> teacherClasses = teacherClassService.selectBySchoolAndTeam(temp); | ||
254 | + for(TeacherClass teacherClass :teacherClasses){ | ||
255 | + TeacherClassDto teacherClassDto = initTeacherClass(teacherClass); | ||
256 | + boolean isExist = false; | ||
257 | + if(!courseNameList.contains(teacherClass.getCourseName())){ | ||
258 | + courseNameList.add(teacherClass.getCourseName()); | ||
259 | + } | ||
260 | + for(ClassCourseVO classCourseVO : data){ | ||
261 | + if(classCourseVO.getClassId() == teacherClass.getClassId()){ | ||
262 | + isExist = true ; | ||
263 | + ClassCourseDetailVo classCourseDetailVo = new ClassCourseDetailVo(teacherClassDto); | ||
264 | + List<ClassCourseDetailVo> classCourseDetailVos = classCourseVO.getList(); | ||
265 | + classCourseDetailVos.add(classCourseDetailVo); | ||
266 | + classCourseVO.setAllCount(classCourseVO.getAllCount()+teacherClass.getTimes()); | ||
267 | + classCourseVO.setList(classCourseDetailVos); | ||
268 | + } | ||
269 | + } | ||
270 | + if(!isExist){ | ||
271 | + ClassCourseVO classCourseVO = new ClassCourseVO(); | ||
272 | + classCourseVO.setClassId(teacherClass.getClassId()); | ||
273 | + classCourseVO.setAllCount(teacherClass.getTimes()); | ||
274 | + classCourseVO.setClassName(classModelService.selectByPrimaryKey(teacherClass.getClassId()).getClassName()); | ||
275 | + List<ClassCourseDetailVo> classCourseDetailVos = new ArrayList<>(); | ||
276 | + classCourseDetailVos.add(new ClassCourseDetailVo(teacherClassDto)); | ||
277 | + classCourseVO.setList(classCourseDetailVos); | ||
278 | + data.add(classCourseVO); | ||
279 | + } | ||
280 | + } | ||
281 | + teacherCourseRepVo.setData(data); | ||
282 | + teacherCourseRepVo.setCourseNameList(courseNameList); | ||
283 | + return teacherCourseRepVo; | ||
284 | + } | ||
285 | + | ||
286 | + private TeacherClassDto initTeacherClass(TeacherClass teacherClass){ | ||
287 | + TeacherClassDto teacherClassDto = new TeacherClassDto(); | ||
288 | + teacherClassDto.setClassId(teacherClass.getClassId()); | ||
289 | + teacherClassDto.setCourseName(teacherClass.getCourseName()); | ||
290 | + teacherClassDto.setCreateTime(teacherClass.getCreateTime()); | ||
291 | + teacherClassDto.setGrade(teacherClass.getGrade()); | ||
292 | + teacherClassDto.setJoinTimes(teacherClass.getJoinTimes()); | ||
293 | + teacherClassDto.setTimes(teacherClass.getTimes()); | ||
294 | + teacherClassDto.settClassId(teacherClass.gettClassId()); | ||
295 | + teacherClassDto.setTeacherId(teacherClass.getTeacherId()); | ||
296 | + teacherClassDto.setTeacherName(teacherClass.getTeacherName()); | ||
297 | + teacherClassDto.setSchoolId(teacherClass.getSchoolId()); | ||
298 | + teacherClassDto.setTeam(teacherClass.getTeam()); | ||
299 | + teacherClassDto.setStatus(teacherClass.getStatus()); | ||
300 | + return teacherClassDto; | ||
301 | + } | ||
302 | + | ||
303 | + @ApiOperation("获取主课,副科,公共课列表") | ||
304 | + @RequestMapping(value = "getCourseTypeList", method = RequestMethod.GET) | ||
305 | + public GetCourseTypeListRepVo getCourseTypeList(@RequestParam("scheduleId") int scheduleId){ | ||
306 | + GetCourseTypeListRepVo getCourseTypeListRepVo = new GetCourseTypeListRepVo(); | ||
307 | + List<CourseTypeListVO> data = new ArrayList<>(); | ||
308 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
309 | + if(schedule == null){ | ||
310 | + getCourseTypeListRepVo.setSuccess(false); | ||
311 | + getCourseTypeListRepVo.setMessage("请先创建计划"); | ||
312 | + return getCourseTypeListRepVo; | ||
313 | + } | ||
314 | + for(int i = 1 ; i <=3 ; i++){ | ||
315 | + CourseTypeListVO vo = new CourseTypeListVO(); | ||
316 | + vo.setCourseType(i); | ||
317 | + switch (i){ | ||
318 | + case 1 : | ||
319 | + vo.setCourseTypeName("主课"); | ||
320 | + break; | ||
321 | + case 2: | ||
322 | + vo.setCourseTypeName("副科"); | ||
323 | + break; | ||
324 | + case 3: | ||
325 | + vo.setCourseTypeName("公共课"); | ||
326 | + break; | ||
327 | + } | ||
328 | + Course course = new Course(); | ||
329 | + course.setSchoolId(schedule.getSchoolId()); | ||
330 | + course.setCourseType(i); | ||
331 | + List<Course> courses = courseService.selectByCourse(course) ; | ||
332 | + List<CourseDto> courseDtos = new ArrayList<>(); | ||
333 | + for(Course course1 : courses){ | ||
334 | + courseDtos.add(initCourse(course1)); | ||
335 | + } | ||
336 | + vo.setList(courseDtos); | ||
337 | + data.add(vo); | ||
338 | + } | ||
339 | + getCourseTypeListRepVo.setData(data); | ||
340 | + getCourseTypeListRepVo.setScheduleId(schedule.getSchoolId()); | ||
341 | + return getCourseTypeListRepVo; | ||
342 | + } | ||
343 | + | ||
344 | + @ApiOperation("获取未设置学科类型的科目") | ||
345 | + @RequestMapping(value = "getUnCourseList", method = RequestMethod.GET) | ||
346 | + public CourseRepVo getUnCourseList(@RequestParam("scheduleId") int scheduleId){ | ||
347 | + CourseRepVo courseRepVo = new CourseRepVo(); | ||
348 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
349 | + if(schedule == null){ | ||
350 | + courseRepVo.setSuccess(false); | ||
351 | + courseRepVo.setMessage("请先创建计划"); | ||
352 | + return courseRepVo; | ||
353 | + } | ||
354 | + Course course = new Course(); | ||
355 | + course.setSchoolId(schedule.getSchoolId()); | ||
356 | + course.setCourseType(0); | ||
357 | + List<Course> courses = courseService.selectByCourse(course) ; | ||
358 | + List<CourseDto> courseDtos = new ArrayList<>(); | ||
359 | + for(Course course1 : courses){ | ||
360 | + courseDtos.add(initCourse(course1)); | ||
361 | + } | ||
362 | + courseRepVo.setData(courseDtos); | ||
363 | + return courseRepVo; | ||
364 | + } | ||
365 | + | ||
366 | + @ApiOperation("删除设置的 主课 副科 公共课") | ||
367 | + @RequestMapping(value = "deleteCourseType", method = RequestMethod.GET) | ||
368 | + public BaseVo deleteCourseType(@RequestParam("scheduleId") int scheduleId , @RequestParam("courseId") int courseId){ | ||
369 | + BaseVo baseVo = new BaseVo(); | ||
370 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
371 | + if(schedule == null){ | ||
372 | + baseVo.setSuccess(false); | ||
373 | + baseVo.setMessage("请先创建计划"); | ||
374 | + return baseVo; | ||
375 | + } | ||
376 | + if(teacherClassService.selectHasSchedule(schedule.getSchoolId(),schedule.getTeam()) > 0){ | ||
377 | + baseVo.setSuccess(false); | ||
378 | + baseVo.setMessage("已经排课,不能再删除"); | ||
379 | + return baseVo; | ||
380 | + } | ||
381 | + courseService.updateCourseType(courseId,0,schedule.getSchoolId()); | ||
382 | + return baseVo; | ||
383 | + } | ||
384 | + | ||
385 | + @RequestMapping(value = "getSchedule", method = RequestMethod.GET) | ||
386 | + public ScheduleDto getSchedule(@RequestParam("scheduleId") int scheduleId){ | ||
387 | + Schedule schedule = scheduleService.selectById(scheduleId); | ||
388 | + return initSchedule(schedule); | ||
389 | + } | ||
390 | + | ||
391 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/AnalyseDetailMapper.java
0 → 100644
@@ -0,0 +1,29 @@ | @@ -0,0 +1,29 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.AnalyseDetail; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/18 0018 11:11 | ||
11 | + */ | ||
12 | +public interface AnalyseDetailMapper { | ||
13 | + | ||
14 | + int insertBatch(List<AnalyseDetail> list); | ||
15 | + | ||
16 | + List<AnalyseDetail> selectByAnalyseId(int analyseId); | ||
17 | + | ||
18 | + Double selectDifficult(AnalyseDetail analyseDetail); | ||
19 | + | ||
20 | + Double selectSumType(AnalyseDetail analyseDetail); | ||
21 | + | ||
22 | + List<AnalyseDetail> selectDifficultDetail(AnalyseDetail analyseDetail); | ||
23 | + | ||
24 | + List<String> selectQuestionType(int analyseId); | ||
25 | + | ||
26 | + List<String> selectQuestionNumberByType(AnalyseDetail analyseDetail); | ||
27 | + | ||
28 | + List<String> selectQuestionNumberByDifficult(AnalyseDetail analyseDetail); | ||
29 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/AnalyseDimensionalMapper.java
0 → 100644
@@ -0,0 +1,17 @@ | @@ -0,0 +1,17 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.AnalyseDimensional; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/18 0018 11:12 | ||
11 | + */ | ||
12 | +public interface AnalyseDimensionalMapper { | ||
13 | + | ||
14 | + int insertBatch(List<AnalyseDimensional> list); | ||
15 | + | ||
16 | + List<AnalyseDimensional> selectByDimensional(AnalyseDimensional analyseDimensional); | ||
17 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/AnalyseMapper.java
0 → 100644
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.Analyse; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/18 0018 10:56 | ||
11 | + */ | ||
12 | +public interface AnalyseMapper { | ||
13 | + | ||
14 | + int insert(Analyse analyse); | ||
15 | + | ||
16 | + List<Analyse> select(Analyse analyse); | ||
17 | + | ||
18 | + Analyse selectById(int id); | ||
19 | + | ||
20 | + int update(Analyse analyse); | ||
21 | + | ||
22 | + int updateChapter(Analyse analyse); | ||
23 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/ChapterMapper.java
0 → 100644
@@ -0,0 +1,17 @@ | @@ -0,0 +1,17 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.Chapter; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/24 0024 9:04 | ||
11 | + */ | ||
12 | +public interface ChapterMapper { | ||
13 | + | ||
14 | + int insertBatch(List<Chapter> list); | ||
15 | + | ||
16 | + List<Chapter> selectByAnalyse(int analyseId); | ||
17 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/ClassCourseMapper.java
0 → 100644
@@ -0,0 +1,36 @@ | @@ -0,0 +1,36 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.ClassCourse; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +public interface ClassCourseMapper { | ||
8 | + | ||
9 | + int updateByPrimaryKey(ClassCourse record); | ||
10 | + | ||
11 | + int insertBatch(List<ClassCourse> list); | ||
12 | + | ||
13 | + ClassCourse selectClassCourse(ClassCourse classCourse); | ||
14 | + | ||
15 | + int selectSingleOrDouble(ClassCourse classCourse); | ||
16 | + | ||
17 | + int selectMaxCourseNumber(ClassCourse classCourse); | ||
18 | + | ||
19 | + List<ClassCourse> selectByClassIdAndSingleOrDouble(ClassCourse classCourse); | ||
20 | + | ||
21 | + List<ClassCourse> selectCourseByClassIdAndWeek(ClassCourse classCourse); | ||
22 | + | ||
23 | + int updatePublicOreElective(ClassCourse classCourse); | ||
24 | + | ||
25 | + List<ClassCourse> selectNoCourse(ClassCourse classCourse); | ||
26 | + | ||
27 | + List<ClassCourse> selectWeekCourse(ClassCourse classCourse); | ||
28 | + | ||
29 | + List<ClassCourse> selectClassCourseByClass(ClassCourse classCourse); | ||
30 | + | ||
31 | + int deleteBySchoolIdAndTeam(ClassCourse classCourse); | ||
32 | + | ||
33 | + int recallClassCourse(ClassCourse classCourse); | ||
34 | + | ||
35 | + List<ClassCourse> copyClassCourse(ClassCourse classCourse); | ||
36 | +} | ||
0 | \ No newline at end of file | 37 | \ No newline at end of file |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/ClassModelMapper.java
0 → 100644
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.ClassModel; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +public interface ClassModelMapper { | ||
8 | + | ||
9 | + ClassModel selectByPrimaryKey(Integer classId); | ||
10 | + | ||
11 | + int updateByPrimaryKey(ClassModel record); | ||
12 | + | ||
13 | + List<ClassModel> selectBySchoolId(int schoolId); | ||
14 | + | ||
15 | + int insertBatch(List<ClassModel> list); | ||
16 | + | ||
17 | + ClassModel selectBySchoolIdAndClassNameAndGrade(ClassModel classModel); | ||
18 | + | ||
19 | + List<ClassModel> selectBySchoolIdAndGrade(ClassModel classModel); | ||
20 | + | ||
21 | + int deleteSchool(int schoolId); | ||
22 | +} | ||
0 | \ No newline at end of file | 23 | \ No newline at end of file |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/CourseMapper.java
0 → 100644
@@ -0,0 +1,27 @@ | @@ -0,0 +1,27 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.Course; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/9 0009 9:40 | ||
11 | + */ | ||
12 | +public interface CourseMapper { | ||
13 | + | ||
14 | + int insertBatch(List<Course> list); | ||
15 | + | ||
16 | + List<Course> selectBySchoolId(int schoolId); | ||
17 | + | ||
18 | + List<Course> selectBySchoolId2(int schoolId); | ||
19 | + | ||
20 | + List<Course> selectByCourse(Course course); | ||
21 | + | ||
22 | + int updateCourseType(Course course); | ||
23 | + | ||
24 | + int deleteSchoolId(int schoolId); | ||
25 | + | ||
26 | + int initSchoolId(int schoolId); | ||
27 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/DimensionalMapper.java
0 → 100644
@@ -0,0 +1,19 @@ | @@ -0,0 +1,19 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.Dimensional; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/18 0018 10:11 | ||
11 | + */ | ||
12 | +public interface DimensionalMapper { | ||
13 | + | ||
14 | + int insert(Dimensional dimensional); | ||
15 | + | ||
16 | + List<Dimensional> select(Dimensional dimensional); | ||
17 | + | ||
18 | + List<Dimensional> selectByAnalyse(Dimensional dimensional); | ||
19 | +} |
cloud/search_independence/src/main/java/com/sincere/independence/mapper/JoinClassMapper.java
0 → 100644
@@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
1 | +package com.sincere.independence.mapper; | ||
2 | + | ||
3 | +import com.sincere.independence.model.JoinClass; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * @author chen | ||
9 | + * @version 1.0 | ||
10 | + * @date 2019/10/10 0010 8:29 | ||
11 | + */ | ||
12 | +public interface JoinClassMapper { | ||
13 | + | ||
14 | + int insertBatch(List<JoinClass> list); | ||
15 | + | ||
16 | + Integer selectMaxGroup(); | ||
17 | + | ||
18 | + List<JoinClass> selectByCourse(JoinClass joinClass); | ||
19 | + | ||
20 | + List<JoinClass> selectByCourseGroup(int courseGroup); | ||
21 | + | ||
22 | + int deleteCourseGroup(int courseGroup); | ||
23 | + | ||
24 | + int deleteBySchoolIdAndTeam(JoinClass joinClass); | ||
25 | +} |