Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李丛阳
education
Commits
065db43b
Commit
065db43b
authored
Apr 18, 2018
by
YangZhaoJun1
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询近5年的年级接口
数据库变动记录
parent
c7b5a012
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
285 additions
and
33 deletions
+285
-33
edu_update.sql
sql/edu_update.sql
+17
-0
b_course_code.sql
sql/new_table/2.0.3/b_course_code.sql
+52
-0
b_edu_class.sql
sql/new_table/2.0.3/b_edu_class.sql
+83
-0
b_grade.sql
sql/new_table/2.0.3/b_grade.sql
+40
-0
BChapter.java
...n/java/org/rcisoft/business/bchapter/entity/BChapter.java
+1
-1
BCourseCodeController.java
...usiness/bcoursecode/controller/BCourseCodeController.java
+4
-4
BCourseCode.java
.../org/rcisoft/business/bcoursecode/entity/BCourseCode.java
+2
-0
BEduClassController.java
...ft/business/beduclass/controller/BEduClassController.java
+11
-11
BEduClass.java
...java/org/rcisoft/business/beduclass/entity/BEduClass.java
+1
-0
BEduClassServiceImpl.java
...business/beduclass/service/impl/BEduClassServiceImpl.java
+1
-2
BGradeController.java
.../rcisoft/business/bgrade/controller/BGradeController.java
+22
-11
BGradeRepository.java
...ava/org/rcisoft/business/bgrade/dao/BGradeRepository.java
+18
-0
BGradeService.java
...va/org/rcisoft/business/bgrade/service/BGradeService.java
+6
-2
BGradeServiceImpl.java
...isoft/business/bgrade/service/impl/BGradeServiceImpl.java
+27
-2
No files found.
sql/edu_update.sql
0 → 100644
View file @
065db43b
/*
数据库变动记录 2018-04-17 V2.0.3
*/
/*1.班级表b_class新建字段“type”,区分行政班和企业班,0行政班,1企业班*/
ALTER
TABLE
`b_class`
MODIFY
COLUMN
`type`
varchar
(
1
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
0
COMMENT
'0行政班,1企业班'
AFTER
`create_date`
;
/*
2.新建作息时间表b_course_code(商务应该只有上下午课,没有晚上课)
sql文件位置:sql>new_table>2.0.3>b_course_code.sql
3.新建组班表b_edu_class
sql文件位置:sql>new_table>2.0.3>b_edu_class.sql
4.新建年级表b_grade
sql文件位置:sql>new_table>2.0.3>b_grade.sql
*/
sql/new_table/2.0.3/b_course_code.sql
0 → 100644
View file @
065db43b
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50717
Source Host : localhost:3306
Source Database : edu_db
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-04-17 15:26:45
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for b_course_code
-- ----------------------------
DROP
TABLE
IF
EXISTS
`b_course_code`
;
CREATE
TABLE
`b_course_code`
(
`business_id`
varchar
(
64
)
NOT
NULL
,
`create_by`
varchar
(
45
)
DEFAULT
NULL
,
`update_by`
varchar
(
45
)
DEFAULT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`flag`
varchar
(
1
)
DEFAULT
NULL
,
`remarks`
varchar
(
64
)
DEFAULT
NULL
,
`seq`
int
(
10
)
DEFAULT
NULL
,
`start_date`
varchar
(
64
)
DEFAULT
NULL
,
`end_date`
varchar
(
64
)
DEFAULT
NULL
,
`del_flag`
varchar
(
1
)
DEFAULT
NULL
,
`date_desc`
varchar
(
1
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`business_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Records of b_course_code
-- ----------------------------
INSERT
INTO
`b_course_code`
VALUES
(
'1'
,
null
,
'333e421d32d9425ea99afce95b603902'
,
null
,
'2018-04-17 11:25:19'
,
'1'
,
null
,
'1'
,
'8:20'
,
'9:05'
,
'0'
,
'0'
);
INSERT
INTO
`b_course_code`
VALUES
(
'10'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'10'
,
'19:25'
,
'20:05'
,
'0'
,
'2'
);
INSERT
INTO
`b_course_code`
VALUES
(
'11'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'11'
,
'20:25'
,
'21:05'
,
'0'
,
'2'
);
INSERT
INTO
`b_course_code`
VALUES
(
'12'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'12'
,
'21:15'
,
'22:00'
,
'0'
,
'2'
);
INSERT
INTO
`b_course_code`
VALUES
(
'2'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'2'
,
'9:15'
,
'10:00'
,
'0'
,
'0'
);
INSERT
INTO
`b_course_code`
VALUES
(
'3'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'3'
,
'10:20'
,
'11:05'
,
'0'
,
'0'
);
INSERT
INTO
`b_course_code`
VALUES
(
'4'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'4'
,
'11:15'
,
'12:00'
,
'0'
,
'0'
);
INSERT
INTO
`b_course_code`
VALUES
(
'5'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'5'
,
'14:00'
,
'14:45'
,
'0'
,
'1'
);
INSERT
INTO
`b_course_code`
VALUES
(
'6'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'6'
,
'14:55'
,
'15:40'
,
'0'
,
'1'
);
INSERT
INTO
`b_course_code`
VALUES
(
'7'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'7'
,
'16:00'
,
'16:45'
,
'0'
,
'1'
);
INSERT
INTO
`b_course_code`
VALUES
(
'8'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'8'
,
'16:55'
,
'17:40'
,
'0'
,
'1'
);
INSERT
INTO
`b_course_code`
VALUES
(
'9'
,
null
,
null
,
null
,
null
,
'1'
,
null
,
'9'
,
'18:30'
,
'19:15'
,
'0'
,
'2'
);
sql/new_table/2.0.3/b_edu_class.sql
0 → 100644
View file @
065db43b
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50717
Source Host : localhost:3306
Source Database : edu_db
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-04-17 15:27:17
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for b_edu_class
-- ----------------------------
DROP
TABLE
IF
EXISTS
`b_edu_class`
;
CREATE
TABLE
`b_edu_class`
(
`business_id`
varchar
(
64
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`create_by`
varchar
(
45
)
DEFAULT
NULL
,
`update_by`
varchar
(
45
)
DEFAULT
NULL
,
`del_flag`
varchar
(
1
)
DEFAULT
NULL
,
`flag`
varchar
(
1
)
DEFAULT
NULL
,
`remarks`
varchar
(
64
)
DEFAULT
NULL
,
`code`
varchar
(
45
)
DEFAULT
NULL
,
`class_name`
varchar
(
200
)
DEFAULT
NULL
,
`agency_id`
varchar
(
64
)
DEFAULT
NULL
,
`type`
varchar
(
1
)
DEFAULT
NULL
COMMENT
'0.行政班 1.业务班 2.其他'
,
`classes_id`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'b_class_id'
,
`grade_id`
varchar
(
64
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`business_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'教学班'
;
-- ----------------------------
-- Records of b_edu_class
-- ----------------------------
INSERT
INTO
`b_edu_class`
VALUES
(
''
,
null
,
null
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
''
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'1'
,
null
,
null
,
null
,
null
,
'0'
,
'1'
,
null
,
'001'
,
'大软Java 1班'
,
'1'
,
'0'
,
'1,2'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'100'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'101'
,
'教学班100'
,
'100'
,
'0'
,
'4,5,6'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'101'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'102'
,
'教学班101'
,
'101'
,
'0'
,
'4,5,6'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'102'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'103'
,
'教学班102'
,
'102'
,
'0'
,
'4,5,6'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'103'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'104'
,
'教学班103'
,
'103'
,
'0'
,
'4,5,6'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'104'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'105'
,
'教学班104'
,
'104'
,
'0'
,
'4,5,6'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'105'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'106'
,
'教学班105'
,
'105'
,
'0'
,
'4,5,6'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'106'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'107'
,
'教学班106'
,
'106'
,
'0'
,
'4,5,6'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'107'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'108'
,
'教学班107'
,
'107'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'108'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'109'
,
'教学班108'
,
'108'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'109'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'110'
,
'教学班109'
,
'109'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'110'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'111'
,
'教学班110'
,
'110'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'111'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'112'
,
'教学班111'
,
'111'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'112'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'113'
,
'教学班112'
,
'112'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'113'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'114'
,
'教学班113'
,
'113'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'114'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'115'
,
'教学班114'
,
'114'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'115'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'116'
,
'教学班115'
,
'115'
,
'0'
,
'7,8,9'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'2'
,
null
,
null
,
null
,
null
,
'0'
,
'1'
,
null
,
'002'
,
'大软Java 2班'
,
'1'
,
'0'
,
'3,4'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'3'
,
null
,
null
,
null
,
null
,
'0'
,
'1'
,
null
,
'003'
,
'大软Java 3班'
,
'1'
,
'0'
,
'5,6'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'4'
,
null
,
null
,
null
,
null
,
'0'
,
'1'
,
null
,
'012'
,
'腾讯Oracle 2班'
,
'2'
,
'0'
,
'7,8'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'5'
,
null
,
null
,
null
,
null
,
'0'
,
'1'
,
null
,
'100'
,
'英语 1班'
,
'3'
,
'0'
,
'11,12'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'9ff09747f16040898722ef604d779070'
,
'2018-04-17 14:51:58'
,
'2018-04-17 14:51:58'
,
'333e421d32d9425ea99afce95b603902'
,
'333e421d32d9425ea99afce95b603902'
,
'0'
,
'1'
,
null
,
'kbztest'
,
'kbzTEST'
,
null
,
'0'
,
null
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a100'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w101'
,
'教学一班'
,
'100'
,
'0'
,
'b100,b101'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a101'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w102'
,
'教学二班'
,
'100'
,
'0'
,
'b102'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a102'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w103'
,
'教学三班'
,
'100'
,
'0'
,
'b103,b104'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a103'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w104'
,
'教学四班'
,
'100'
,
'0'
,
'b105,b106'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a104'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w105'
,
'教学五班'
,
'100'
,
'0'
,
'b107'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a105'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w106'
,
'教学六班'
,
'100'
,
'0'
,
'b108,b109'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a200'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w201'
,
'教学一班'
,
'200'
,
'0'
,
'b200,b201'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a201'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w202'
,
'教学二班'
,
'200'
,
'0'
,
'b202'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a202'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w203'
,
'教学三班'
,
'200'
,
'0'
,
'b203,b204'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a203'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w204'
,
'教学四班'
,
'200'
,
'0'
,
'b205,b206'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a204'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w205'
,
'教学五班'
,
'200'
,
'0'
,
'b207'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a205'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w206'
,
'教学六班'
,
'200'
,
'0'
,
'b208,b209'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a300'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w301'
,
'教学一班'
,
'300'
,
'0'
,
'b300,b301'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a301'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w302'
,
'教学二班'
,
'300'
,
'0'
,
'b302'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a302'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w303'
,
'教学三班'
,
'300'
,
'0'
,
'b303,b304'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a303'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w304'
,
'教学四班'
,
'300'
,
'0'
,
'b305,b306'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a304'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w305'
,
'教学五班'
,
'300'
,
'0'
,
'b307'
,
null
);
INSERT
INTO
`b_edu_class`
VALUES
(
'a305'
,
null
,
null
,
''
,
''
,
'0'
,
'1'
,
''
,
'w306'
,
'教学六班'
,
'300'
,
'0'
,
'b308,b309'
,
null
);
sql/new_table/2.0.3/b_grade.sql
0 → 100644
View file @
065db43b
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50717
Source Host : localhost:3306
Source Database : edu_db
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2018-04-17 15:26:51
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for b_grade
-- ----------------------------
DROP
TABLE
IF
EXISTS
`b_grade`
;
CREATE
TABLE
`b_grade`
(
`business_id`
varchar
(
64
)
NOT
NULL
,
`create_by`
varchar
(
45
)
DEFAULT
NULL
,
`update_by`
varchar
(
45
)
DEFAULT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`del_flag`
varchar
(
1
)
DEFAULT
NULL
,
`flag`
varchar
(
1
)
DEFAULT
NULL
,
`remarks`
varchar
(
64
)
DEFAULT
NULL
,
`code`
varchar
(
64
)
DEFAULT
NULL
,
`name`
varchar
(
150
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`business_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Records of b_grade
-- ----------------------------
INSERT
INTO
`b_grade`
VALUES
(
'99d1ff3a7d144842ae23f05d5a4788cc'
,
'333e421d32d9425ea99afce95b603902'
,
'333e421d32d9425ea99afce95b603902'
,
'2018-04-17 15:16:10'
,
'2018-04-17 15:17:37'
,
'1'
,
'1'
,
null
,
'A0002'
,
'假的'
);
INSERT
INTO
`b_grade`
VALUES
(
'e32105729cfb4b8db0cad297ab994403'
,
'333e421d32d9425ea99afce95b603902'
,
'333e421d32d9425ea99afce95b603902'
,
'2018-04-17 15:15:56'
,
'2018-04-17 15:15:56'
,
'0'
,
'1'
,
null
,
'A001'
,
'第一学年'
);
src/main/java/org/rcisoft/business/bchapter/entity/BChapter.java
View file @
065db43b
...
...
@@ -50,7 +50,7 @@ public class BChapter extends IdEntity<BChapter> {
private
String
mdFile
;
/*1:实验 2:视频 3:PPT*/
@Length
(
min
=
1
,
max
=
20
,
message
=
"长度最小为1,最大为15"
)
//
@Length(min = 1,max = 20,message = "长度最小为1,最大为15")
private
String
isTest
;
/*课程或开课 0:开课 1:课程*/
...
...
src/main/java/org/rcisoft/business/bcoursecode/controller/BCourseCodeController.java
View file @
065db43b
...
...
@@ -32,7 +32,7 @@ import java.util.List;
* Created by on 2018-4-17 11:12:17.
*/
@RestController
@RequestMapping
(
"/b
coursec
ode"
)
@RequestMapping
(
"/b
CourseC
ode"
)
public
class
BCourseCodeController
extends
PaginationController
<
BCourseCode
>
{
@Autowired
...
...
@@ -47,15 +47,15 @@ public class BCourseCodeController extends PaginationController<BCourseCode> {
@ApiImplicitParam
(
name
=
"end_date"
,
value
=
"结束时间 length(1~50)"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"date_desc"
,
value
=
"节点描述 length(1)"
,
required
=
false
,
dataType
=
"varchar"
)
})
@P
utMapping
(
"/update/{businessId}
"
)
@P
ostMapping
(
"/update
"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
update
(
@ApiIgnore
BCourseCode
bCourseCode
,
BindingResult
bindingResult
)
{
public
Result
update
(
@ApiIgnore
BCourseCode
bCourseCode
)
{
bCourseCode
.
setToken
(
getToken
());
PersistModel
data
=
bCourseCodeServiceImpl
.
merge
(
bCourseCode
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bCourseCode
);
bCourseCode
);
}
@ApiOperation
(
value
=
"查看集合"
,
notes
=
"查看集合"
)
...
...
src/main/java/org/rcisoft/business/bcoursecode/entity/BCourseCode.java
View file @
065db43b
...
...
@@ -23,6 +23,8 @@ import java.util.List;
public
class
BCourseCode
extends
IdEntity
<
BCourseCode
>
{
private
static
final
long
serialVersionUID
=
6659179609972376021L
;
/*节点顺序*/
@Length
(
min
=
1
,
max
=
10
,
message
=
"长度最小为1,最大为10"
)
@NotBlank
...
...
src/main/java/org/rcisoft/business/beduclass/controller/BEduClassController.java
View file @
065db43b
...
...
@@ -30,7 +30,7 @@ import java.util.List;
* Created by on 2018-4-17 14:33:36.
*/
@RestController
@RequestMapping
(
"/b
educ
lass"
)
@RequestMapping
(
"/b
EduC
lass"
)
public
class
BEduClassController
extends
PaginationController
<
BEduClass
>
{
@Autowired
...
...
@@ -45,20 +45,20 @@ public class BEduClassController extends PaginationController<BEduClass> {
@ApiImplicitParam
(
name
=
"classedId"
,
value
=
"教学班ID串"
,
required
=
false
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/add"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
add
(
@Valid
BEduClass
bEduClass
,
BindingResult
bindingResult
)
{
public
Result
add
(
BEduClass
bEduClass
)
{
bEduClass
.
setToken
(
getToken
());
PersistModel
data
=
bEduClassServiceImpl
.
save
(
bEduClass
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bEduClass
);
bEduClass
);
}
@ApiOperation
(
value
=
"逻辑删除"
,
notes
=
"逻辑删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
false
,
dataType
=
"varchar"
)})
@
DeleteMapping
(
"/delete/{id:\\w+}
"
)
@
PostMapping
(
"/delete
"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
delete
(
@PathVariable
String
id
)
{
public
Result
delete
(
String
id
)
{
BEduClass
bEduClass
=
new
BEduClass
();
bEduClass
.
setBusinessId
(
id
);
bEduClass
.
setToken
(
getToken
());
...
...
@@ -76,26 +76,26 @@ public class BEduClassController extends PaginationController<BEduClass> {
@ApiImplicitParam
(
name
=
"agencyId"
,
value
=
"企业ID"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"班级类型 length(1)"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"classedId"
,
value
=
"教学班ID串 length(1~150)"
,
required
=
false
,
dataType
=
"varchar"
)})
@P
utMapping
(
"/update/{businessId:\\w+}
"
)
@P
ostMapping
(
"/update
"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
update
(
BEduClass
bEduClass
,
BindingResult
bindingResult
)
{
public
Result
update
(
BEduClass
bEduClass
)
{
bEduClass
.
setToken
(
getToken
());
PersistModel
data
=
bEduClassServiceImpl
.
merge
(
bEduClass
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bEduClass
);
bEduClass
);
}
@ApiOperation
(
value
=
"查看单 "
,
notes
=
"查看单 "
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
false
,
dataType
=
"varchar"
)})
@GetMapping
(
"/
detail/{id:\\w+}
"
)
@GetMapping
(
"/
selectOne
"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
detail
(
@PathVariable
String
id
)
{
public
Result
detail
(
String
id
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bEduClassServiceImpl
.
findById
(
id
));
bEduClassServiceImpl
.
findById
(
id
));
}
@ApiOperation
(
value
=
"查看 集合"
,
notes
=
"查看单 集合"
)
...
...
src/main/java/org/rcisoft/business/beduclass/entity/BEduClass.java
View file @
065db43b
...
...
@@ -23,6 +23,7 @@ import java.util.List;
public
class
BEduClass
extends
IdEntity
<
BEduClass
>
{
private
static
final
long
serialVersionUID
=
1330074578479142863L
;
/*教学班编号*/
@Length
(
min
=
1
,
max
=
50
,
message
=
"长度最小为1,最大为50"
)
@NotBlank
...
...
src/main/java/org/rcisoft/business/beduclass/service/impl/BEduClassServiceImpl.java
View file @
065db43b
...
...
@@ -92,8 +92,7 @@ public class BEduClassServiceImpl implements BEduClassService {
* @param bEduClass
* @return
*/
public
List
<
BEduClass
>
findAllByPagination
(
PageUtil
<
BEduClass
>
paginationUtility
,
BEduClass
bEduClass
){
public
List
<
BEduClass
>
findAllByPagination
(
PageUtil
<
BEduClass
>
paginationUtility
,
BEduClass
bEduClass
){
bEduClass
.
setStart
();
bEduClass
.
setNotDeleted
();
return
bEduClassRepository
.
queryBEduClasss
(
bEduClass
);
...
...
src/main/java/org/rcisoft/business/bgrade/controller/BGradeController.java
View file @
065db43b
...
...
@@ -31,7 +31,7 @@ import java.util.List;
* Created by on 2018-4-17 15:09:18.
*/
@RestController
@RequestMapping
(
"/b
g
rade"
)
@RequestMapping
(
"/b
G
rade"
)
public
class
BGradeController
extends
PaginationController
<
BGrade
>
{
@Autowired
...
...
@@ -43,18 +43,18 @@ public class BGradeController extends PaginationController<BGrade> {
@ApiImplicitParam
(
name
=
"name"
,
value
=
"年级名称 length(1~150)"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/add"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
add
(
@ApiIgnore
@Valid
BGrade
bGrade
,
BindingResult
bindingResult
)
{
public
Result
add
(
@ApiIgnore
BGrade
bGrade
)
{
bGrade
.
setToken
(
getToken
());
PersistModel
data
=
bGradeServiceImpl
.
save
(
bGrade
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bGrade
);
bGrade
);
}
@ApiOperation
(
value
=
"逻辑删除"
,
notes
=
"逻辑删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
true
,
dataType
=
"varchar"
)})
@
DeleteMapping
(
"/delete/{id:\\w+}
"
)
@
PostMapping
(
"/delete
"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
delete
(
@PathVariable
String
id
)
{
BGrade
bGrade
=
new
BGrade
();
...
...
@@ -64,33 +64,33 @@ public class BGradeController extends PaginationController<BGrade> {
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
id
);
id
);
}
@ApiOperation
(
value
=
"修改"
,
notes
=
"修改"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId 拼在地址栏"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"code"
,
value
=
"年级编号 length(1~50)"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"年级名称 length(1~150)"
,
required
=
false
,
dataType
=
"varchar"
)})
@P
utMapping
(
"/update/{businessId:\\w+}
"
)
@P
ostMapping
(
"/update
"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
update
(
@ApiIgnore
BGrade
bGrade
,
BindingResult
bindingResult
)
{
public
Result
update
(
@ApiIgnore
BGrade
bGrade
)
{
bGrade
.
setToken
(
getToken
());
PersistModel
data
=
bGradeServiceImpl
.
merge
(
bGrade
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bGrade
);
bGrade
);
}
@ApiOperation
(
value
=
"查看单 "
,
notes
=
"查看单 "
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId 拼在地址栏"
,
required
=
true
,
dataType
=
"varchar"
)})
@GetMapping
(
"/
detail/{businessId:\\w+}
"
)
@GetMapping
(
"/
selectOne
"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
detail
(
@PathVariable
String
businessId
)
{
public
Result
detail
(
String
businessId
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bGradeServiceImpl
.
findById
(
businessId
));
bGradeServiceImpl
.
findById
(
businessId
));
}
@ApiOperation
(
value
=
"查看 集合"
,
notes
=
"查看单 集合"
)
...
...
@@ -104,4 +104,15 @@ public class BGradeController extends PaginationController<BGrade> {
bGradeServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
bGrade
);
return
getGridModelResponse
();
}
@ApiOperation
(
value
=
"查询近5年的年级"
,
notes
=
"查询近5年的年级"
)
@GetMapping
(
value
=
"/queryFirstFiveBGrades"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
public
Result
queryFirstFiveBGrades
(
@ApiIgnore
BGrade
bGrade
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bGradeServiceImpl
.
queryFirstFiveBGrades
(
bGrade
));
}
}
src/main/java/org/rcisoft/business/bgrade/dao/BGradeRepository.java
View file @
065db43b
...
...
@@ -25,5 +25,23 @@ public interface BGradeRepository extends BaseMapper<BGrade> {
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BGrade
>
queryBGrades
(
BGrade
bGrade
);
/**
查询是否有本年的年级
*/
@Select
(
"<script>select * from b_grade where code = #{nowYear} </script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BGrade
>
queryBGradeByNowYear
(
String
nowYear
);
/*
查询近5年的年级
*/
@Select
(
"<script>select * from b_grade where 1=1 "
+
"<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+
"<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+
"order by code desc "
+
"limit 5</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BGrade
>
queryFirstFiveBGrades
(
BGrade
bGrade
);
}
src/main/java/org/rcisoft/business/bgrade/service/BGradeService.java
View file @
065db43b
...
...
@@ -48,6 +48,10 @@ public interface BGradeService {
BGrade
bGrade
);
/**
* 查询近5年的年级
* @param bGrade
* @return
*/
List
<
BGrade
>
queryFirstFiveBGrades
(
BGrade
bGrade
);
}
src/main/java/org/rcisoft/business/bgrade/service/impl/BGradeServiceImpl.java
View file @
065db43b
...
...
@@ -15,6 +15,8 @@ import org.springframework.transaction.annotation.Propagation;
import
org.springframework.transaction.annotation.Transactional
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -92,11 +94,34 @@ public class BGradeServiceImpl implements BGradeService {
* @param bGrade
* @return
*/
public
List
<
BGrade
>
findAllByPagination
(
PageUtil
<
BGrade
>
paginationUtility
,
BGrade
bGrade
){
public
List
<
BGrade
>
findAllByPagination
(
PageUtil
<
BGrade
>
paginationUtility
,
BGrade
bGrade
){
bGrade
.
setStart
();
bGrade
.
setNotDeleted
();
return
bGradeRepository
.
queryBGrades
(
bGrade
);
}
/**
* 查询近5年的年级
* @param bGrade
* @return
*/
@Override
public
List
<
BGrade
>
queryFirstFiveBGrades
(
BGrade
bGrade
)
{
bGrade
.
setStart
();
bGrade
.
setNotDeleted
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy"
);
Date
date
=
new
Date
();
String
nowYear
=
sdf
.
format
(
date
);
//查询是否有本年的年级
List
<
BGrade
>
bGrades
=
bGradeRepository
.
queryBGradeByNowYear
(
nowYear
);
if
(
bGrades
.
size
()<
1
){
//没有就新增
BGrade
grade
=
new
BGrade
();
grade
.
setCode
(
nowYear
);
grade
.
setName
(
nowYear
+
"级"
);
UserUtil
.
setCurrentPersistOperation
(
grade
);
bGradeRepository
.
insertSelective
(
grade
);
}
return
bGradeRepository
.
queryFirstFiveBGrades
(
bGrade
);
}
}
yangzhaojun
@YZJyzj
Mentioned in commit
43a99b0e
·
May 21, 2018
Mentioned in commit
43a99b0e
Mentioned in commit 43a99b0e291111afa7459cca104204fc89b6e298
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment