Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jgjy
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
jgjy
Commits
8e25b9fb
提交
8e25b9fb
authored
7月 31, 2019
作者:
zhouzhigang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
c6971194
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
45 行增加
和
15 行删除
+45
-15
ImportLessonExcelVo.java
...vo/schoolsysuser/fg/publiclesson/ImportLessonExcelVo.java
+1
-1
FgResouceClient.java
.../java/com/zrqx/school/sysuser/client/FgResouceClient.java
+4
-3
FgResourceHystric.java
...ava/com/zrqx/school/sysuser/client/FgResourceHystric.java
+1
-1
FgPublicBasicRelationServiceImpl.java
...ervice/publiclesson/FgPublicBasicRelationServiceImpl.java
+7
-4
FgPublicLessonServiceImpl.java
...suser/service/publiclesson/FgPublicLessonServiceImpl.java
+32
-6
没有找到文件。
com.zrqx.core/src/main/java/com/zrqx/core/vo/schoolsysuser/fg/publiclesson/ImportLessonExcelVo.java
浏览文件 @
8e25b9fb
...
...
@@ -29,7 +29,7 @@ public class ImportLessonExcelVo {
@ExcelResources
(
title
=
"教材名称"
)
private
String
resourceName
;
@ExcelResources
(
title
=
"
isbn
"
)
@ExcelResources
(
title
=
"
ISBN
"
)
private
String
ISBN
;
@ExcelResources
(
title
=
"教材类型"
)
...
...
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/client/FgResouceClient.java
浏览文件 @
8e25b9fb
package
com
.
zrqx
.
school
.
sysuser
.
client
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
com.zrqx.core.constant.resource.ResourceRequestPath
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.vo.member.department.DepartmentMemberVo
;
import
com.zrqx.core.vo.resource.fg.goods.phy.ResourceSearchVo
;
import
io.swagger.annotations.ApiOperation
;
@FeignClient
(
value
=
"fg-resource"
,
fallback
=
FgResourceHystric
.
class
)
...
...
@@ -14,6 +15,6 @@ public interface FgResouceClient {
@ApiOperation
(
value
=
"根据ISBN查询资源以及资源绑定的教参和习题册"
)
@GetMapping
(
ResourceRequestPath
.
FG
+
ResourceRequestPath
.
RESOURCE
+
ResourceRequestPath
.
GET
+
ResourceRequestPath
.
RESOURCE
)
public
CallBack
<
ResourceSearchVo
>
get
(
String
isbn
);
public
CallBack
<
ResourceSearchVo
>
get
Resource
(
@RequestParam
(
"isbn"
)
String
isbn
);
}
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/client/FgResourceHystric.java
浏览文件 @
8e25b9fb
...
...
@@ -14,7 +14,7 @@ public class FgResourceHystric implements FgResouceClient{
Logger
Logger
=
LoggerFactory
.
getLogger
(
FgResourceHystric
.
class
);
@Override
public
CallBack
<
ResourceSearchVo
>
get
(
String
isbn
)
{
public
CallBack
<
ResourceSearchVo
>
get
Resource
(
String
isbn
)
{
Logger
.
debug
(
"远程调用失败"
);
return
null
;
}
...
...
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/service/publiclesson/FgPublicBasicRelationServiceImpl.java
浏览文件 @
8e25b9fb
...
...
@@ -143,8 +143,9 @@ public class FgPublicBasicRelationServiceImpl extends BaseServiceImpl<PublicBasi
public
Integer
exportSave
(
ImportLessonExcelVo
vo
,
Integer
id
,
String
type
)
{
PublicBasicRelation
entity
=
new
PublicBasicRelation
();
//系统教材
if
(
PublicLessonTypeEnum
.
SYSTEM
.
getCode
().
equals
(
vo
.
getType
())){
CallBack
<
ResourceSearchVo
>
data
=
fgResouceClient
.
get
(
vo
.
getISBN
());
if
(
PublicLessonTypeEnum
.
SYSTEM
.
getName
().
equals
(
vo
.
getType
())){
CallBack
<
ResourceSearchVo
>
data
=
fgResouceClient
.
getResource
(
vo
.
getISBN
());
if
(
data
!=
null
&&
data
.
getData
()
!=
null
){
ResourceSearchVo
resource
=
data
.
getData
();
entity
.
setExerciseBookId
(
resource
.
getExerciseBookId
());
...
...
@@ -153,10 +154,11 @@ public class FgPublicBasicRelationServiceImpl extends BaseServiceImpl<PublicBasi
entity
.
setGuidebooksType
(
"1-3"
);
entity
.
setResourceId
(
resource
.
getId
());
entity
.
setResourceType
(
resource
.
getType
());
entity
.
setType
(
PublicLessonTypeEnum
.
SYSTEM
.
getCode
());
}
}
//校本库
if
(
PublicLessonTypeEnum
.
SCHOOL_BASED_LIBRARY
.
get
Cod
e
().
equals
(
vo
.
getType
())){
if
(
PublicLessonTypeEnum
.
SCHOOL_BASED_LIBRARY
.
get
Nam
e
().
equals
(
vo
.
getType
())){
SchoolAsedLibrary
form
=
new
SchoolAsedLibrary
();
form
.
setRelationId
(
redis
.
getMember
().
getRelationId
());
form
.
setType
(
redis
.
getMember
().
getType
());
...
...
@@ -164,10 +166,11 @@ public class FgPublicBasicRelationServiceImpl extends BaseServiceImpl<PublicBasi
SchoolAsedLibrary
library
=
fgSchoolAsedLibraryService
.
selectOne
(
form
);
if
(
library
!=
null
){
entity
.
setResourceId
(
library
.
getId
());
entity
.
setType
(
PublicLessonTypeEnum
.
SCHOOL_BASED_LIBRARY
.
getCode
());
}
}
entity
.
setLessonId
(
id
);
entity
.
setType
(
type
);
entity
.
set
Lesson
Type
(
type
);
super
.
insert
(
entity
);
return
entity
.
getId
();
}
...
...
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/service/publiclesson/FgPublicLessonServiceImpl.java
浏览文件 @
8e25b9fb
...
...
@@ -503,12 +503,16 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
form
.
setTheoryClassHour
(
theoryClassHour
);
form
.
setTrainingHours
(
trainingHours
);
List
<
PublicLessonClassArrangeRealtion
>
vvList
=
new
ArrayList
<
PublicLessonClassArrangeRealtion
>();
BeanUtils
.
copyList
(
voList
,
PublicLessonClassArrangeRealtion
.
class
);
//校验理论课时与实际课时之和是否和课时安排的课时相等
this
.
check
(
form
,
school
,
vvList
);
String
msg
=
this
.
exportCheck
(
form
,
school
,
voList
);
if
(
msg
!=
null
){
voList
.
forEach
(
arg0
->{
LessonErrVo
vo
=
BeanUtils
.
copy
(
arg0
,
LessonErrVo
.
class
);
vo
.
setMsg
(
msg
);
list
.
add
(
vo
);
});
continue
;
}
//向数据库中插入正确的数据
PublicLesson
pl
=
new
PublicLesson
();
pl
.
setCourseDesign
(
key
);
...
...
@@ -539,7 +543,29 @@ public class FgPublicLessonServiceImpl extends BaseModelServiceImpl<PublicLesson
return
planVo
;
}
public
String
exportCheck
(
FgSavePublicLeesonForm
form
,
School
school
,
List
<
ImportLessonExcelVo
>
list
){
//理论课时和实训课时之和
int
count
=
form
.
getTheoryClassHour
().
intValue
()
+
form
.
getTrainingHours
().
intValue
();
//课时安排总课时
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
;
}
if
(
sum
!=
count
){
return
"理论课时与实际课时之和不等于课时安排的课时"
;
}
return
null
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论