Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jgjy
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
jgjy
Commits
1f662fd3
提交
1f662fd3
authored
6月 23, 2020
作者:
zhouzhigang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
e517349f
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
30 行增加
和
10 行删除
+30
-10
FgBasicTeachingPlanMapper.java
...r/mapper/basicteachingplan/FgBasicTeachingPlanMapper.java
+8
-3
FgPublicBasicRelationServiceImpl.java
...ervice/publiclesson/FgPublicBasicRelationServiceImpl.java
+22
-7
没有找到文件。
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/mapper/basicteachingplan/FgBasicTeachingPlanMapper.java
浏览文件 @
1f662fd3
...
...
@@ -161,7 +161,7 @@ public interface FgBasicTeachingPlanMapper extends BaseMapper<BasicTeachingPlan>
@Select
(
" <script> "
+
" SELECT "
+
" p.courseDesign,p.num,p.lessonType,p.theoryClassHour,p.trainingHours,p.relationId,p.type,p.id AS lessonId,p.basicPlanId as basicPlanId, "
+
" t.majorId "
+
" t.majorId
,pcr.semester,t.academicLevel
"
+
" FROM "
+
" me_public_lessons p "
+
" LEFT JOIN me_basic_teaching_plan t ON p.basicPlanId = t.id "
...
...
@@ -179,7 +179,7 @@ public interface FgBasicTeachingPlanMapper extends BaseMapper<BasicTeachingPlan>
+
" SELECT "
+
" p.courseDesign,p.num,p.lessonType,p.theoryClassHour,p.trainingHours,p.relationId,p.type, p.id AS lessonId,"
+
" CONCAT(case when p.basicPlanId is null then s.basicPlanId else p.basicPlanId end) as basicPlanId, "
+
" t.majorId "
+
" t.majorId
,pcr.semester,t.academicLevel
"
+
" FROM "
+
" me_public_lessons_plan_relation s "
+
" LEFT JOIN me_public_lessons p ON s.publicLessonId = p.id "
...
...
@@ -205,7 +205,7 @@ public interface FgBasicTeachingPlanMapper extends BaseMapper<BasicTeachingPlan>
@Select
(
" <script> "
+
" SELECT "
+
" p.courseDesign,p.num,p.lessonType,p.theoryClassHour,p.trainingHours,p.relationId,p.type,p.id AS lessonId,p.basicPlanId as basicPlanId, "
+
" t.majorId "
+
" t.majorId
,t.academicLevel,pcr.semester
"
+
" FROM "
+
" me_public_lessons p "
+
" LEFT JOIN me_basic_teaching_plan t ON p.basicPlanId = t.id "
...
...
@@ -373,5 +373,10 @@ public interface FgBasicTeachingPlanMapper extends BaseMapper<BasicTeachingPlan>
Integer
getMaxSort
(
@Param
(
"relationId"
)
Integer
relationId
,
@Param
(
"type"
)
String
type
);
@Select
(
" SELECT academicLevel FROM me_basic_teaching_plan WHERE relationId = #{relationId} AND TYPE = #{type} GROUP BY academicLevel having academicLevel is not null "
)
List
<
IdAndNameVo
>
getBasicList
(
@Param
(
"relationId"
)
Integer
relationId
,
@Param
(
"type"
)
String
type
);
}
com.zrqx.school.sysuser/src/main/java/com/zrqx/school/sysuser/service/publiclesson/FgPublicBasicRelationServiceImpl.java
浏览文件 @
1f662fd3
...
...
@@ -21,6 +21,7 @@ import com.zrqx.core.util.bean.BeanUtils;
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
com.zrqx.core.vo.schoolsysuser.fg.IdAndNameVo
;
import
com.zrqx.core.vo.schoolsysuser.fg.biddingflow.CycleStatusAndFlowCodeVo
;
import
com.zrqx.core.vo.schoolsysuser.fg.book.RecommendDepartVo
;
import
com.zrqx.core.vo.schoolsysuser.fg.book.RecommendMajorVo
;
...
...
@@ -108,6 +109,13 @@ public class FgPublicBasicRelationServiceImpl extends BaseServiceImpl<PublicBasi
@Override
public
List
<
FgPublicBasicRelationVo
>
list
(
BiddingCycle
biddingCycle
)
throws
Exception
{
List
<
IdAndNameVo
>
basicList
=
fgBasicTeachingPlanMapper
.
getBasicList
(
redis
.
getMember
().
getRelationId
(),
redis
.
getMember
().
getType
());
if
(
basicList
!=
null
&&
basicList
.
size
()
>
0
)
{
for
(
IdAndNameVo
idAndNameVo
:
basicList
)
{
Integer
semester
=
this
.
getSemester
(
idAndNameVo
.
getAcademicLevel
(),
biddingCycle
);
idAndNameVo
.
setSemester
(
semester
);
}
}
QueryTypeAndRelationIdForm
form
=
new
QueryTypeAndRelationIdForm
();
form
.
setRelationId
(
redis
.
getMember
().
getRelationId
());
form
.
setType
(
"0"
);
...
...
@@ -122,25 +130,33 @@ public class FgPublicBasicRelationServiceImpl extends BaseServiceImpl<PublicBasi
CallBack
<
DepartmentMember
>
query
=
fgMemberClient
.
query
(
redis
.
getMember
().
getRelationId
());
if
(
query
.
hasEntity
()){
voList
=
fgBasicTeachingPlanMapper
.
queryList
(
time
,
form
);
voList
.
forEach
(
vo
->{
this
.
queryVo
(
vo
,
biddingCycle
,
query
.
getData
().
getId
());
voList
.
stream
().
filter
(
a
->
a
.
getSemester
().
equals
(
this
.
getAcr
(
a
.
getAcademicLevel
(),
basicList
))).
forEach
(
vo
->{
this
.
queryVo
(
vo
,
biddingCycle
,
query
.
getData
().
getId
()
,
vo
.
getSemester
()
);
});
}
}
else
{
voList
=
fgBasicTeachingPlanMapper
.
getList
(
time
,
form
);
voList
.
forEach
(
vo
->{
this
.
queryVo
(
vo
,
biddingCycle
,
null
);
voList
.
stream
().
filter
(
a
->
a
.
getSemester
().
equals
(
this
.
getAcr
(
a
.
getAcademicLevel
(),
basicList
))).
forEach
(
vo
->{
this
.
queryVo
(
vo
,
biddingCycle
,
null
,
vo
.
getSemester
()
);
});
}
}
return
voList
.
stream
().
filter
(
vo
->
vo
!=
null
).
collect
(
Collectors
.
toList
())
;
return
voList
;
}
private
Integer
getAcr
(
Integer
acr
,
List
<
IdAndNameVo
>
basicList
)
{
return
basicList
.
stream
()
.
filter
(
a
->
acr
.
equals
(
a
.
getAcademicLevel
()))
.
findFirst
()
.
map
(
a
->
a
.
getSemester
())
.
orElse
(
null
);
}
public
FgPublicBasicRelationVo
queryVo
(
FgPublicBasicRelationVo
vo
,
BiddingCycle
biddingCycle
,
Integer
departmentId
){
public
FgPublicBasicRelationVo
queryVo
(
FgPublicBasicRelationVo
vo
,
BiddingCycle
biddingCycle
,
Integer
departmentId
,
Integer
semester
){
vo
.
setCycleId
(
biddingCycle
.
getId
());
BasicTeachingPlan
plan
=
fgBasicTeachingPlanMapper
.
selectByPrimaryKey
(
vo
.
getBasicPlanId
());
vo
.
setAcademicLevel
(
plan
.
getAcademicLevel
());
...
...
@@ -157,7 +173,6 @@ public class FgPublicBasicRelationServiceImpl extends BaseServiceImpl<PublicBasi
}
vo
.
setStudentResource
(
plan
.
getStudentResource
());
//获取学期
Integer
semester
=
this
.
getSemester
(
plan
.
getAcademicLevel
(),
biddingCycle
);
vo
.
setSemester
(
semester
);
//获取学期对应的教材(每门课程一个学期只能对应一本教材)
PublicBasicRelation
entity
=
fgPublicBasicRelationMapper
.
query
(
vo
.
getLessonId
(),
semester
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论