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
baec2605
Commit
baec2605
authored
May 25, 2018
by
YangZhaoJun1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'V2.0.3' of
http://103.249.252.28:90/lcy/education
into V2.0.3
parents
bd23d78e
7ede2349
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
6 deletions
+96
-6
edu_update.sql
sql/edu_update.sql
+7
-0
ScheduleDto.java
...ava/org/rcisoft/business/barrange/entity/ScheduleDto.java
+8
-0
BArrangeServiceImpl.java
...t/business/barrange/service/impl/BArrangeServiceImpl.java
+57
-0
BSlScheduleRepository.java
...isoft/business/bslschedule/dao/BSlScheduleRepository.java
+1
-1
ExcelUtil.java
src/main/java/org/rcisoft/core/util/ExcelUtil.java
+13
-2
BArrangeMapper.xml
...ources/mapper/business/barrange/mapper/BArrangeMapper.xml
+9
-2
BSlScheduleMapper.xml
.../mapper/business/bslschedule/mapper/BSlScheduleMapper.xml
+1
-1
No files found.
sql/edu_update.sql
View file @
baec2605
...
@@ -123,3 +123,10 @@ MODIFY COLUMN `sub_agency_seq` int(10) NULL DEFAULT NULL AFTER `status`;
...
@@ -123,3 +123,10 @@ MODIFY COLUMN `sub_agency_seq` int(10) NULL DEFAULT NULL AFTER `status`;
ALTER
TABLE
`b_subtask`
ALTER
TABLE
`b_subtask`
MODIFY
COLUMN
`subtask_seq`
int
(
10
)
NULL
DEFAULT
NULL
AFTER
`grade_code`
;
MODIFY
COLUMN
`subtask_seq`
int
(
10
)
NULL
DEFAULT
NULL
AFTER
`grade_code`
;
/*增加排课合并格提示*/
ALTER
TABLE
`b_schedule_dto`
ADD
COLUMN
`lesson_cell`
int
(
10
)
NULL
AFTER
`dto_seq`
,
ADD
COLUMN
`teacher_cell`
int
(
10
)
NULL
AFTER
`lesson_cell`
,
ADD
COLUMN
`class_cell`
int
(
10
)
NULL
AFTER
`teacher_cell`
,
ADD
COLUMN
`room_cell`
int
(
10
)
NULL
AFTER
`class_cell`
;
src/main/java/org/rcisoft/business/barrange/entity/ScheduleDto.java
View file @
baec2605
...
@@ -94,6 +94,14 @@ public class ScheduleDto extends IdEntity<ScheduleDto>{
...
@@ -94,6 +94,14 @@ public class ScheduleDto extends IdEntity<ScheduleDto>{
/*排序*/
/*排序*/
private
String
dtoSeq
;
private
String
dtoSeq
;
private
int
lessonCell
;
private
int
teacherCell
;
private
int
classCell
;
private
int
roomCell
;
@Transient
@Transient
private
String
roomName
;
private
String
roomName
;
...
...
src/main/java/org/rcisoft/business/barrange/service/impl/BArrangeServiceImpl.java
View file @
baec2605
...
@@ -282,6 +282,10 @@ public class BArrangeServiceImpl implements BArrangeService {
...
@@ -282,6 +282,10 @@ public class BArrangeServiceImpl implements BArrangeService {
List
<
String
>
classCodes
=
new
ArrayList
<>();
List
<
String
>
classCodes
=
new
ArrayList
<>();
List
<
String
>
roomCodes
=
new
ArrayList
<>();
List
<
String
>
roomCodes
=
new
ArrayList
<>();
int
index
=
0
;
int
index
=
0
;
ScheduleDto
lessonCellHead
=
null
;
ScheduleDto
teacherCellHead
=
null
;
ScheduleDto
classCellHead
=
null
;
ScheduleDto
roomCellHead
=
null
;
for
(
String
[]
value
:
values
)
{
for
(
String
[]
value
:
values
)
{
ScheduleDto
scheduleDto
=
new
ScheduleDto
();
ScheduleDto
scheduleDto
=
new
ScheduleDto
();
//判断1:根据课程编号查询是否有此门课程;
//判断1:根据课程编号查询是否有此门课程;
...
@@ -342,6 +346,59 @@ public class BArrangeServiceImpl implements BArrangeService {
...
@@ -342,6 +346,59 @@ public class BArrangeServiceImpl implements BArrangeService {
UserUtil
.
setCurrentPersistOperation
(
scheduleDto
);
UserUtil
.
setCurrentPersistOperation
(
scheduleDto
);
scheduleDtos
.
add
(
scheduleDto
);
scheduleDtos
.
add
(
scheduleDto
);
//提示合并单元格
if
(
contanSunday
){
if
(
value
[
28
].
equals
(
"false"
)){
lessonCellHead
=
scheduleDtos
.
get
(
values
.
indexOf
(
value
));
lessonCellHead
.
setLessonCell
(
1
);
}
else
{
lessonCellHead
.
setLessonCell
(
lessonCellHead
.
getClassCell
()
+
1
);
}
if
(
value
[
29
].
equals
(
"false"
)){
teacherCellHead
=
scheduleDtos
.
get
(
values
.
indexOf
(
value
));
teacherCellHead
.
setTeacherCell
(
1
);
}
else
{
teacherCellHead
.
setTeacherCell
(
teacherCellHead
.
getTeacherCell
()
+
1
);
}
if
(
value
[
30
].
equals
(
"false"
)){
classCellHead
=
scheduleDtos
.
get
(
values
.
indexOf
(
value
));
classCellHead
.
setClassCell
(
1
);
}
else
{
classCellHead
.
setClassCell
(
classCellHead
.
getClassCell
()
+
1
);
}
if
(
value
[
31
].
equals
(
"false"
)){
roomCellHead
=
scheduleDtos
.
get
(
values
.
indexOf
(
value
));
roomCellHead
.
setRoomCell
(
1
);
}
else
{
roomCellHead
.
setRoomCell
(
roomCellHead
.
getRoomCell
()
+
1
);
}
}
else
{
if
(
value
[
27
].
equals
(
"false"
)){
lessonCellHead
=
scheduleDtos
.
get
(
values
.
indexOf
(
value
));
lessonCellHead
.
setLessonCell
(
1
);
}
else
{
lessonCellHead
.
setLessonCell
(
lessonCellHead
.
getClassCell
()
+
1
);
}
if
(
value
[
28
].
equals
(
"false"
)){
teacherCellHead
=
scheduleDtos
.
get
(
values
.
indexOf
(
value
));
teacherCellHead
.
setTeacherCell
(
1
);
}
else
{
teacherCellHead
.
setTeacherCell
(
teacherCellHead
.
getTeacherCell
()
+
1
);
}
if
(
value
[
29
].
equals
(
"false"
)){
classCellHead
=
scheduleDtos
.
get
(
values
.
indexOf
(
value
));
classCellHead
.
setClassCell
(
1
);
}
else
{
classCellHead
.
setClassCell
(
classCellHead
.
getClassCell
()
+
1
);
}
if
(
value
[
30
].
equals
(
"false"
)){
roomCellHead
=
scheduleDtos
.
get
(
values
.
indexOf
(
value
));
roomCellHead
.
setRoomCell
(
1
);
}
else
{
roomCellHead
.
setRoomCell
(
roomCellHead
.
getRoomCell
()
+
1
);
}
}
//修改sub_agency表状态为保存
//修改sub_agency表状态为保存
BSubAgency
bSubAgency
=
new
BSubAgency
(
subAgencyId
,
"1"
);
BSubAgency
bSubAgency
=
new
BSubAgency
(
subAgencyId
,
"1"
);
bSubAgencyRepository
.
updateByPrimaryKeySelective
(
bSubAgency
);
bSubAgencyRepository
.
updateByPrimaryKeySelective
(
bSubAgency
);
...
...
src/main/java/org/rcisoft/business/bslschedule/dao/BSlScheduleRepository.java
View file @
baec2605
...
@@ -27,7 +27,7 @@ public interface BSlScheduleRepository extends BaseMapper<BSlSchedule> {
...
@@ -27,7 +27,7 @@ public interface BSlScheduleRepository extends BaseMapper<BSlSchedule> {
@Select
(
"<script>select *, s_user.name as teacherName,"
@Select
(
"<script>select *, s_user.name as teacherName,"
+
"b_agency.name as agencyName,b_agency.code as agencyCode,b_agency.business_id as agencyId, \n"
+
"b_agency.name as agencyName,b_agency.code as agencyCode,b_agency.business_id as agencyId, \n"
+
"b_lesson.code as lessonCode,b_direction.name as directionName,b_direction.code as directionCode, \n"
+
"b_lesson.code as lessonCode,b_direction.name as directionName,b_direction.code as directionCode, \n"
+
"b_sl.code as bslCode, \n"
+
"b_sl.code as bslCode,
s_user.name as userName,
\n"
+
"(select sum(student_num) from b_class where FIND_IN_SET(b_class.code,b_edu_class.classes_id)) AS studentNum from b_sl_schedule "
+
"(select sum(student_num) from b_class where FIND_IN_SET(b_class.code,b_edu_class.classes_id)) AS studentNum from b_sl_schedule "
+
"left join b_sl on b_sl_schedule.tea_code = b_sl.teacher_code and b_sl_schedule.term_code = b_sl.term_code and b_sl_schedule.lesson_code = b_sl.lesson_code \n"
+
"left join b_sl on b_sl_schedule.tea_code = b_sl.teacher_code and b_sl_schedule.term_code = b_sl.term_code and b_sl_schedule.lesson_code = b_sl.lesson_code \n"
+
"left join b_edu_class on b_edu_class.code = b_sl_schedule.edu_class_code \n"
+
"left join b_edu_class on b_edu_class.code = b_sl_schedule.edu_class_code \n"
...
...
src/main/java/org/rcisoft/core/util/ExcelUtil.java
View file @
baec2605
...
@@ -148,7 +148,11 @@ public class ExcelUtil {
...
@@ -148,7 +148,11 @@ public class ExcelUtil {
}
}
int
firstcolumnnum
=
hr
.
getFirstCellNum
();
int
firstcolumnnum
=
hr
.
getFirstCellNum
();
int
lastcolumnnum
=
hr
.
getLastCellNum
();
int
lastcolumnnum
=
hr
.
getLastCellNum
();
String
[]
value
=
new
String
[
lastcolumnnum
+
2
];
String
[]
value
=
new
String
[
lastcolumnnum
+
6
];
String
lessonValue
=
null
;
String
teacherValue
=
null
;
String
classValue
=
null
;
String
roomValue
=
null
;
for
(
int
k
=
0
;
k
<
lastcolumnnum
;
k
++)
{
for
(
int
k
=
0
;
k
<
lastcolumnnum
;
k
++)
{
HSSFCell
hc
=
hr
.
getCell
(
k
);
HSSFCell
hc
=
hr
.
getCell
(
k
);
//如果此单元格为空则插入""
//如果此单元格为空则插入""
...
@@ -194,6 +198,10 @@ public class ExcelUtil {
...
@@ -194,6 +198,10 @@ public class ExcelUtil {
if
((
value
[
27
]
==
null
||
value
[
27
].
equals
(
""
))
&&
value3
!=
null
){
if
((
value
[
27
]
==
null
||
value
[
27
].
equals
(
""
))
&&
value3
!=
null
){
value
[
27
]
=
parseDB
(
hs
.
getRow
(
value27
.
getFirstRow
()).
getCell
(
value27
.
getFirstColumn
()));
value
[
27
]
=
parseDB
(
hs
.
getRow
(
value27
.
getFirstRow
()).
getCell
(
value27
.
getFirstColumn
()));
}
}
value
[
28
]
=
value3
==
belongBigCell
(
cellRangeAddressList
,
j
-
1
,
3
,
hs
)
?
"true"
:
"false"
;
value
[
29
]
=
value14
==
belongBigCell
(
cellRangeAddressList
,
j
-
1
,
14
,
hs
)
?
"true"
:
"false"
;
value
[
30
]
=
value16
==
belongBigCell
(
cellRangeAddressList
,
j
-
1
,
16
,
hs
)
?
"true"
:
"false"
;
value
[
31
]
=
value27
==
belongBigCell
(
cellRangeAddressList
,
j
-
1
,
27
,
hs
)
?
"true"
:
"false"
;
}
else
{
}
else
{
CellRangeAddress
value3
=
belongBigCell
(
cellRangeAddressList
,
j
,
3
,
hs
);
CellRangeAddress
value3
=
belongBigCell
(
cellRangeAddressList
,
j
,
3
,
hs
);
CellRangeAddress
value14
=
belongBigCell
(
cellRangeAddressList
,
j
,
14
,
hs
);
CellRangeAddress
value14
=
belongBigCell
(
cellRangeAddressList
,
j
,
14
,
hs
);
...
@@ -222,8 +230,11 @@ public class ExcelUtil {
...
@@ -222,8 +230,11 @@ public class ExcelUtil {
if
((
value
[
26
]
==
null
||
value
[
26
].
equals
(
""
))
&&
value3
!=
null
){
if
((
value
[
26
]
==
null
||
value
[
26
].
equals
(
""
))
&&
value3
!=
null
){
value
[
26
]
=
parseDB
(
hs
.
getRow
(
value26
.
getFirstRow
()).
getCell
(
value26
.
getFirstColumn
()));
value
[
26
]
=
parseDB
(
hs
.
getRow
(
value26
.
getFirstRow
()).
getCell
(
value26
.
getFirstColumn
()));
}
}
value
[
27
]
=
value3
==
belongBigCell
(
cellRangeAddressList
,
j
-
1
,
3
,
hs
)
?
"true"
:
"false"
;
value
[
28
]
=
value14
==
belongBigCell
(
cellRangeAddressList
,
j
-
1
,
14
,
hs
)
?
"true"
:
"false"
;
value
[
29
]
=
value16
==
belongBigCell
(
cellRangeAddressList
,
j
-
1
,
16
,
hs
)
?
"true"
:
"false"
;
value
[
30
]
=
value26
==
belongBigCell
(
cellRangeAddressList
,
j
-
1
,
26
,
hs
)
?
"true"
:
"false"
;
}
}
values
.
add
(
value
);
values
.
add
(
value
);
}
}
}
}
...
...
src/main/resources/mapper/business/barrange/mapper/BArrangeMapper.xml
View file @
baec2605
...
@@ -87,6 +87,11 @@
...
@@ -87,6 +87,11 @@
<result
column=
"sub_agency_id"
jdbcType=
"VARCHAR"
property=
"subAgencyId"
/>
<result
column=
"sub_agency_id"
jdbcType=
"VARCHAR"
property=
"subAgencyId"
/>
<result
column=
"teacher_name"
jdbcType=
"VARCHAR"
property=
"teacherName"
/>
<result
column=
"teacher_name"
jdbcType=
"VARCHAR"
property=
"teacherName"
/>
<result
column=
"teacher_code"
jdbcType=
"VARCHAR"
property=
"teacherCode"
/>
<result
column=
"teacher_code"
jdbcType=
"VARCHAR"
property=
"teacherCode"
/>
<result
column=
"lesson_cell"
jdbcType=
"VARCHAR"
property=
"lessonCell"
/>
<result
column=
"teacher_cell"
jdbcType=
"VARCHAR"
property=
"teacherCell"
/>
<result
column=
"class_cell"
jdbcType=
"VARCHAR"
property=
"classCell"
/>
<result
column=
"room_cell"
jdbcType=
"VARCHAR"
property=
"roomCell"
/>
</resultMap>
</resultMap>
<resultMap
id=
"BaseResultMap2"
type=
"org.rcisoft.business.barrange.entity.BArrange"
>
<resultMap
id=
"BaseResultMap2"
type=
"org.rcisoft.business.barrange.entity.BArrange"
>
...
@@ -103,7 +108,8 @@
...
@@ -103,7 +108,8 @@
<insert
id=
"insertList"
>
<insert
id=
"insertList"
>
insert into b_schedule_dto(business_id,flag,del_flag,update_by,create_by,create_date,update_date,remarks,
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,
lesson_code,teacher_code,class_code,week,class_hour,
monday,tuesday,wednesday,thursday,friday,saturday,sunday,room_code,sub_agency_id,dto_seq)
monday,tuesday,wednesday,thursday,friday,saturday,sunday,room_code,sub_agency_id,dto_seq,
lesson_cell,teacher_cell,class_cell,room_cell)
values
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy},
(#{item.businessId},#{item.flag},#{item.delFlag},#{item.updateBy},#{item.createBy},
...
@@ -111,7 +117,8 @@
...
@@ -111,7 +117,8 @@
#{item.lessonCode},#{item.teacherCode},#{item.classCode},
#{item.lessonCode},#{item.teacherCode},#{item.classCode},
#{item.week},#{item.classHour},
#{item.week},#{item.classHour},
#{item.monday},#{item.tuesday},#{item.wednesday},#{item.thursday},#{item.friday},#{item.saturday},
#{item.monday},#{item.tuesday},#{item.wednesday},#{item.thursday},#{item.friday},#{item.saturday},
#{item.sunday},#{item.roomCode},#{item.subAgencyId},#{item.dtoSeq})
#{item.sunday},#{item.roomCode},#{item.subAgencyId},#{item.dtoSeq},
#{item.lessonCell},#{item.teacherCell},#{item.classCell},#{item.roomCell})
</foreach>
</foreach>
</insert>
</insert>
...
...
src/main/resources/mapper/business/bslschedule/mapper/BSlScheduleMapper.xml
View file @
baec2605
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<result
column=
"category"
jdbcType=
"VARCHAR"
property=
"bRooms.transitCategory"
/>
<result
column=
"category"
jdbcType=
"VARCHAR"
property=
"bRooms.transitCategory"
/>
<result
column=
"class_seat"
jdbcType=
"VARCHAR"
property=
"bRooms.classSeat"
/>
<result
column=
"class_seat"
jdbcType=
"VARCHAR"
property=
"bRooms.classSeat"
/>
<result
column=
"exam_seat"
jdbcType=
"VARCHAR"
property=
"bRooms.examSeat"
/>
<result
column=
"exam_seat"
jdbcType=
"VARCHAR"
property=
"bRooms.examSeat"
/>
<result
column=
"
n
ame"
jdbcType=
"VARCHAR"
property=
"sysUser.name"
/>
<result
column=
"
userN
ame"
jdbcType=
"VARCHAR"
property=
"sysUser.name"
/>
<result
column=
"email"
jdbcType=
"VARCHAR"
property=
"sysUser.email"
/>
<result
column=
"email"
jdbcType=
"VARCHAR"
property=
"sysUser.email"
/>
<result
column=
"phone"
jdbcType=
"VARCHAR"
property=
"sysUser.phone"
/>
<result
column=
"phone"
jdbcType=
"VARCHAR"
property=
"sysUser.phone"
/>
<result
column=
"sex"
jdbcType=
"VARCHAR"
property=
"sysUser.sex"
/>
<result
column=
"sex"
jdbcType=
"VARCHAR"
property=
"sysUser.sex"
/>
...
...
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