Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jgjy
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
jgjy
Commits
1b1f0140
提交
1b1f0140
authored
6月 16, 2020
作者:
zhouzhigang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
195b7cea
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
42 行增加
和
19 行删除
+42
-19
FgClassManagementServiceImpl.java
...service/classmanagement/FgClassManagementServiceImpl.java
+1
-0
FgPublicLessonServiceImpl.java
...suser/service/publiclesson/FgPublicLessonServiceImpl.java
+41
-19
没有找到文件。
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/service/classmanagement/FgClassManagementServiceImpl.java
浏览文件 @
1b1f0140
...
...
@@ -125,6 +125,7 @@ public class FgClassManagementServiceImpl extends BaseModelServiceImpl<ClassMana
}
ClassManagement
s
=
new
ClassManagement
();
s
.
setName
(
form
.
getName
());
s
.
setAcademicLevel
(
form
.
getAcademicLevel
());
s
.
setRelationId
(
redis
.
getMember
().
getRelationId
());
s
.
setType
(
redis
.
getMember
().
getType
());
Integer
count
=
fgClassManagementMapper
.
selectCount
(
s
);
...
...
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/service/publiclesson/FgPublicLessonServiceImpl.java
浏览文件 @
1b1f0140
...
...
@@ -538,7 +538,7 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
for
(
ImportLessonExcelVo
v
:
importExcelVos
){
LessonErrVo
vo
=
BeanUtils
.
copy
(
v
,
LessonErrVo
.
class
);
if
(
StringUtils
.
isEmpty
(
v
.
getCourseDesign
())
||
StringUtils
.
isEmpty
(
v
.
getType
())
||
v
.
getNum
()
==
null
||
v
.
get
TheoryClassHour
()
==
null
||
v
.
getTrainingHours
()
==
null
||
v
.
get
WeeklyHours
()
==
null
||
v
.
getNum
()
==
null
||
v
.
getWeeklyHours
()
==
null
||
v
.
getSemester
()
==
null
){
vo
.
setMsg
(
"所导入字段都为必填字段,请补全后继续导入"
);
list
.
add
(
vo
);
...
...
@@ -565,6 +565,7 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
}
//系统校验ISBN是否有效
if
(
StringUtils
.
isNotEmpty
(
v
.
getISBN
()))
{
if
(
PublicLessonTypeEnum
.
SYSTEM
.
getName
().
equals
(
vo
.
getType
())){
CallBack
<
PhyResource
>
data
=
fgResouceClient
.
getByIsbn
(
vo
.
getISBN
());
if
(
data
==
null
||
data
.
getData
()
==
null
){
...
...
@@ -590,6 +591,7 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
continue
;
}
}
}
newList
.
add
(
v
);
}
//根据课程名称对导入的excel集合进行分组
...
...
@@ -600,12 +602,8 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
List
<
ImportLessonExcelVo
>
errList
=
new
ArrayList
<
ImportLessonExcelVo
>();
List
<
ImportLessonExcelVo
>
vList
=
map
.
get
(
key
);
Integer
num
=
null
;
Integer
theoryClassHour
=
null
;
Integer
trainingHours
=
null
;
for
(
int
i
=
0
;
i
<
vList
.
size
();
i
++){
num
=
vList
.
get
(
0
).
getNum
();
theoryClassHour
=
vList
.
get
(
0
).
getTheoryClassHour
();
trainingHours
=
vList
.
get
(
0
).
getTrainingHours
();
for
(
int
j
=
vList
.
size
()-
1
;
j
>
i
;
j
--){
if
(
vList
.
get
(
j
).
getSemester
().
equals
(
vList
.
get
(
i
).
getSemester
())){
LessonErrVo
vo
=
BeanUtils
.
copy
(
vList
.
get
(
i
),
LessonErrVo
.
class
);
...
...
@@ -628,20 +626,23 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
voList
.
addAll
(
vList
);
}
FgSavePublicLeesonForm
form
=
new
FgSavePublicLeesonForm
();
form
.
setTheoryClassHour
(
theoryClassHour
);
form
.
setTrainingHours
(
trainingHours
);
//理论课时
Integer
theoryHour
=
this
.
sumHour
(
school
,
voList
);
// FgSavePublicLeesonForm form = new FgSavePublicLeesonForm();
// form.setTheoryClassHour(theoryClassHour);
// form.setTrainingHours(0);
//校验理论课时与实际课时之和是否和课时安排的课时相等
String
msg
=
this
.
exportCheck
(
form
,
school
,
voList
);
if
(
StringUtils
.
isNotEmpty
(
msg
)){
voList
.
forEach
(
arg0
->{
LessonErrVo
vo
=
BeanUtils
.
copy
(
arg0
,
LessonErrVo
.
class
);
vo
.
setMsg
(
msg
);
list
.
add
(
vo
);
});
continue
;
}
//
String msg = this.exportCheck(form, school, voList);
//
if(StringUtils.isNotEmpty(msg)){
//
voList.forEach(arg0 ->{
//
LessonErrVo vo = BeanUtils.copy(arg0, LessonErrVo.class);
//
vo.setMsg(msg);
//
list.add(vo);
//
});
//
continue;
//
}
if
(
list
!=
null
&&
list
.
size
()
>
0
){
continue
;
}
...
...
@@ -655,8 +656,8 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
pl
.
setNum
(
num
);
pl
.
setRelationId
(
redis
.
getMember
().
getRelationId
());
pl
.
setType
(
redis
.
getMember
().
getType
());
pl
.
setTheoryClassHour
(
theory
Class
Hour
);
pl
.
setTrainingHours
(
trainingHours
);
pl
.
setTheoryClassHour
(
theoryHour
);
pl
.
setTrainingHours
(
0
);
Integer
maxSort
=
fgPublicLessonMapper
.
getMaxSort
(
redis
.
getMember
().
getRelationId
(),
redis
.
getMember
().
getType
());
if
(
maxSort
==
null
){
pl
.
setSort
(
1
);
...
...
@@ -703,6 +704,27 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
return
null
;
}
public
Integer
sumHour
(
School
school
,
List
<
ImportLessonExcelVo
>
list
){
//课时安排总课时
int
sum
=
0
;
int
num
=
0
;
if
(
school
.
getSpringWeek
()
==
null
||
school
.
getAutumnWeek
()
==
null
){
throw
new
BusinessValidateException
(
"请前往学校信息管理页面补全学校信息"
);
}
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
if
(
list
.
get
(
i
).
getSemester
().
intValue
()%
2
==
0
){
num
=
list
.
get
(
i
).
getWeeklyHours
().
intValue
()
*
school
.
getSpringWeek
();
}
if
(
list
.
get
(
i
).
getSemester
().
intValue
()%
2
==
1
){
num
=
list
.
get
(
i
).
getWeeklyHours
().
intValue
()
*
school
.
getAutumnWeek
();
}
sum
=
sum
+
num
;
}
return
sum
;
}
@Override
public
boolean
isExsitName
(
PublicLesson
form
,
PublicLesson
oldEntity
)
{
if
(
StringUtils
.
isBlank
(
form
.
getCourseDesign
()))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论