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
4fe8da80
Commit
4fe8da80
authored
Apr 25, 2018
by
刘子正
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'V2.0.3' of
http://103.249.252.28:90/lcy/education
parents
5e6ecba7
179a2237
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
176 additions
and
23 deletions
+176
-23
b_schedule_dto.sql
sql/new_table/2.0.3/b_schedule_dto.sql
+52
-0
BArrangeRepository.java
...org/rcisoft/business/barrange/dao/BArrangeRepository.java
+2
-1
BArrange.java
...n/java/org/rcisoft/business/barrange/entity/BArrange.java
+16
-0
ScheduleDto.java
...ava/org/rcisoft/business/barrange/entity/ScheduleDto.java
+45
-1
BArrangeServiceImpl.java
...t/business/barrange/service/impl/BArrangeServiceImpl.java
+20
-19
application-dev.yml
src/main/resources/application-dev.yml
+3
-2
BArrangeMapper.xml
...ources/mapper/business/barrange/mapper/BArrangeMapper.xml
+38
-0
No files found.
sql/new_table/2.0.3/b_schedule_dto.sql
0 → 100644
View file @
4fe8da80
/*
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-25 11:07:45
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for b_schedule_dto
-- ----------------------------
DROP
TABLE
IF
EXISTS
`b_schedule_dto`
;
CREATE
TABLE
`b_schedule_dto`
(
`business_id`
varchar
(
64
)
NOT
NULL
,
`create_by`
varchar
(
64
)
DEFAULT
NULL
,
`update_by`
varchar
(
64
)
DEFAULT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`flag`
varchar
(
1
)
DEFAULT
NULL
,
`del_flag`
varchar
(
1
)
DEFAULT
NULL
,
`remarks`
varchar
(
64
)
DEFAULT
NULL
,
`lesson_code`
varchar
(
64
)
DEFAULT
NULL
,
`teacher_code`
varchar
(
64
)
DEFAULT
NULL
,
`class_code`
varchar
(
64
)
DEFAULT
NULL
,
`week`
varchar
(
64
)
DEFAULT
NULL
,
`class_hour`
varchar
(
64
)
DEFAULT
NULL
,
`monday`
varchar
(
64
)
DEFAULT
NULL
,
`tuesday`
varchar
(
64
)
DEFAULT
NULL
,
`wednesday`
varchar
(
64
)
DEFAULT
NULL
,
`thursday`
varchar
(
64
)
DEFAULT
NULL
,
`friday`
varchar
(
64
)
DEFAULT
NULL
,
`saturday`
varchar
(
64
)
DEFAULT
NULL
,
`room_code`
varchar
(
64
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`business_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Records of b_schedule_dto
-- ----------------------------
INSERT
INTO
`b_schedule_dto`
VALUES
(
'3687ac45b9094dd1856eb6debf36345e'
,
'333e421d32d9425ea99afce95b603902'
,
'333e421d32d9425ea99afce95b603902'
,
'2018-04-25 11:07:15'
,
'2018-04-25 11:07:15'
,
'1'
,
'0'
,
null
,
'20111111'
,
'20111111'
,
'20111111'
,
'4-5'
,
'10'
,
''
,
'5-6'
,
''
,
'5-6'
,
'1-2'
,
''
,
'20111111'
);
INSERT
INTO
`b_schedule_dto`
VALUES
(
'87df53594328469e87392cec83209496'
,
'333e421d32d9425ea99afce95b603902'
,
'333e421d32d9425ea99afce95b603902'
,
'2018-04-25 11:07:15'
,
'2018-04-25 11:07:15'
,
'1'
,
'0'
,
null
,
'20222222'
,
'20222222'
,
'20222222'
,
'1-3'
,
'8'
,
'1-4'
,
''
,
'1-4'
,
''
,
''
,
''
,
'20222222'
);
INSERT
INTO
`b_schedule_dto`
VALUES
(
'9f5c8ee184d841078dcd8115901c2d6c'
,
'333e421d32d9425ea99afce95b603902'
,
'333e421d32d9425ea99afce95b603902'
,
'2018-04-25 11:07:15'
,
'2018-04-25 11:07:15'
,
'1'
,
'0'
,
null
,
'20111111'
,
'20111111'
,
'20111111'
,
'1-3'
,
'8'
,
'1-4'
,
''
,
'1-4'
,
''
,
''
,
''
,
'20111111'
);
INSERT
INTO
`b_schedule_dto`
VALUES
(
'ece506521e034441b4400a457cecfdd1'
,
'333e421d32d9425ea99afce95b603902'
,
'333e421d32d9425ea99afce95b603902'
,
'2018-04-25 11:07:15'
,
'2018-04-25 11:07:15'
,
'1'
,
'0'
,
null
,
'20222222'
,
'20222222'
,
'20222222'
,
'4-5'
,
'10'
,
''
,
'5-6'
,
''
,
'5-6'
,
'1-2'
,
''
,
'20222222'
);
src/main/java/org/rcisoft/business/barrange/dao/BArrangeRepository.java
View file @
4fe8da80
...
...
@@ -42,6 +42,7 @@ public interface BArrangeRepository extends BaseMapper<BArrange> {
@ResultMap
(
value
=
"BaseResultMap4"
)
List
<
BArrange
>
queryBArranges2
(
String
gradeCode
);
int
insertList
(
ArrayList
<
ScheduleDto
>
scheduleDtos
);
int
insertList
(
ArrayList
<
ScheduleDto
>
list
);
}
src/main/java/org/rcisoft/business/barrange/entity/BArrange.java
View file @
4fe8da80
...
...
@@ -2,6 +2,8 @@ package org.rcisoft.business.barrange.entity;
import
lombok.*
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.NotBlank
;
import
org.rcisoft.core.entity.IdEntity
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
...
...
@@ -21,14 +23,28 @@ import java.util.List;
public
class
BArrange
extends
IdEntity
<
BArrange
>
{
private
static
final
long
serialVersionUID
=
-
5524520301999990921L
;
/*学期编号*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
termCode
;
/*描述*/
private
String
desc
;
/*年级编号*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
gradeCode
;
/*企业编号*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
agencyCode
;
/*状态*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度为1"
)
@NotBlank
private
String
status
;
@Transient
...
...
src/main/java/org/rcisoft/business/barrange/entity/ScheduleDto.java
View file @
4fe8da80
package
org
.
rcisoft
.
business
.
barrange
.
entity
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.NotBlank
;
import
org.rcisoft.core.entity.IdEntity
;
import
javax.persistence.Transient
;
/**
* Created by Administrator on 2018/4/23.
*/
@Data
public
class
ScheduleDto
{
@NoArgsConstructor
@AllArgsConstructor
public
class
ScheduleDto
extends
IdEntity
<
ScheduleDto
>{
/*课程编号*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
lessonCode
;
@Transient
private
String
lessonName
;
/*教师编号*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
teacherCode
;
@Transient
private
String
teacherName
;
/*班级编号*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
classCode
;
@Transient
private
String
className
;
/*持续周*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
week
;
/*课时*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
classHour
;
/*周一 以此类推*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
monday
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
tuesday
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
wednesday
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
thursday
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
friday
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
saturday
;
/*教室编号*/
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为64"
)
@NotBlank
private
String
roomCode
;
@Transient
private
String
roomName
;
...
...
src/main/java/org/rcisoft/business/barrange/service/impl/BArrangeServiceImpl.java
View file @
4fe8da80
...
...
@@ -120,10 +120,10 @@ public class BArrangeServiceImpl implements BArrangeService {
if
(
value
[
0
].
equals
(
""
)){
value
[
0
]
=
wholeValue
[
0
];
}
if
(
bLessonRepository
.
selectOne
(
new
BLesson
(
value
[
0
]))==
null
){
lessonCodes
.
add
(
value
[
0
]);
continue
;
}
//
if(bLessonRepository.selectOne(new BLesson(value[0]))==null){
//
lessonCodes.add(value[0]);
//
continue;
//
}
//判断2:根据教师编号查询是否有此教师;
if
(
value
[
1
].
equals
(
""
)){
...
...
@@ -133,30 +133,30 @@ public class BArrangeServiceImpl implements BArrangeService {
user1
.
setLoginName
(
value
[
1
]);
user1
.
setDelFlag
(
"0"
);
user1
.
setFlag
(
"1"
);
if
(
sysUserMapper
.
selectOne
(
user1
)
==
null
)
{
teacherCodes
.
add
(
value
[
1
]);
continue
;
}
//
if (sysUserMapper.selectOne(user1) == null) {
//
teacherCodes.add(value[1]);
//
continue;
//
}
//判断3:根据班级编号查询是否有此班级;
if
(
value
[
2
].
equals
(
""
)){
value
[
2
]
=
wholeValue
[
2
];
}
for
(
String
classCode
:
value
[
2
].
split
(
","
)){
if
(
bClassRepository
.
selectOne
(
new
BClass
(
classCode
))==
null
){
classCodes
.
add
(
classCode
);
continue
;
}
}
//
for(String classCode : value[2].split(",")){
//
if(bClassRepository.selectOne(new BClass(classCode))==null){
//
classCodes.add(classCode);
//
continue;
//
}
//
}
//判断4:根据教室编号查询是否有此教室;
if
(
value
[
3
].
equals
(
""
)){
value
[
3
]
=
wholeValue
[
3
];
}
if
(
bRoomsRepository
.
selectOne
(
new
BRooms
(
value
[
3
]))==
null
){
roomCodes
.
add
(
value
[
3
]);
continue
;
}
//
if(bRoomsRepository.selectOne(new BRooms(value[3]))==null){
//
roomCodes.add(value[3]);
//
continue;
//
}
//合法:通过了四次判断,证明可建立该排课
scheduleDto
.
setLessonCode
(
value
[
0
]);
...
...
@@ -171,7 +171,8 @@ public class BArrangeServiceImpl implements BArrangeService {
scheduleDto
.
setThursday
(
value
[
9
]);
scheduleDto
.
setFriday
(
value
[
10
]);
scheduleDto
.
setSaturday
(
value
[
11
]);
scheduleDto
.
setCommonBusinessId
();
UserUtil
.
setCurrentPersistOperation
(
scheduleDto
);
scheduleDtos
.
add
(
scheduleDto
);
}
...
...
src/main/resources/application-dev.yml
View file @
4fe8da80
...
...
@@ -110,6 +110,7 @@ global:
licPath
:
/lk/license.lic
pubPath
:
/lk/publicCerts.store
password
:
default
:
123456
min_password
:
6
max_password
:
16
path
:
...
...
src/main/resources/mapper/business/barrange/mapper/BArrangeMapper.xml
View file @
4fe8da80
...
...
@@ -15,6 +15,30 @@
<result
column=
"grade_code"
jdbcType=
"VARCHAR"
property=
"gradeCode"
/>
<result
column=
"agency_code"
jdbcType=
"VARCHAR"
property=
"agencyCode"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
</resultMap>
<resultMap
id=
"scheduleDtoResultMap"
type=
"org.rcisoft.business.barrange.entity.ScheduleDto"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"lesson_code"
jdbcType=
"VARCHAR"
property=
"lessonCode"
/>
<result
column=
"lesson_name"
jdbcType=
"VARCHAR"
property=
"lessonName"
/>
<result
column=
"class_code"
jdbcType=
"VARCHAR"
property=
"classCode"
/>
<result
column=
"class_name"
jdbcType=
"VARCHAR"
property=
"className"
/>
<result
column=
"week"
jdbcType=
"VARCHAR"
property=
"week"
/>
<result
column=
"class_hour"
jdbcType=
"VARCHAR"
property=
"classHour"
/>
<result
column=
"monday"
jdbcType=
"VARCHAR"
property=
"monday"
/>
<result
column=
"tuesday"
jdbcType=
"VARCHAR"
property=
"tuesday"
/>
<result
column=
"wednesday"
jdbcType=
"VARCHAR"
property=
"wednesday"
/>
<result
column=
"thursday"
jdbcType=
"VARCHAR"
property=
"thursday"
/>
<result
column=
"friday"
jdbcType=
"VARCHAR"
property=
"friday"
/>
<result
column=
"saturday"
jdbcType=
"VARCHAR"
property=
"saturday"
/>
<result
column=
"room_code"
jdbcType=
"VARCHAR"
property=
"roomCode"
/>
<result
column=
"room_name"
jdbcType=
"VARCHAR"
property=
"roomName"
/>
</resultMap>
<resultMap
id=
"BaseResultMap2"
type=
"org.rcisoft.business.barrange.entity.BArrange"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
...
...
@@ -47,5 +71,19 @@
</resultMap>
<insert
id=
"insertList"
>
insert into b_schedule_dto(business_id,flag,del_flag,update_by,create_by,create_date,update_date,remarks,
lesson_code,teacher_code,class_code,week,class_hour,
monday,tuesday,wednesday,thursday,friday,saturday,room_code)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy},
#{item.createDate},#{item.updateDate},#{item.remarks},
#{item.lessonCode},#{item.teacherCode},#{item.classCode},
#{item.week},#{item.classHour},
#{item.monday},#{item.tuesday},#{item.wednesday},#{item.thursday},#{item.friday},#{item.saturday},#{item.roomCode})
</foreach>
</insert>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
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