Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
c7994ca1
Commit
c7994ca1
authored
Aug 08, 2023
by
baochunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#G:公众号选课学生选课信息上传
parent
f93abba3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
9 deletions
+87
-9
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/curricula/CurriclaStudentVo.java
+43
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/curricula/CurriculaStudent.java
+1
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolClass/SchoolClassEducational.java
+8
-6
smart-campus/src/main/java/yangtz/cs/liu/wechat/controller/courseSelection/WxCouresSelection.java
+34
-1
smart-campus/src/main/resources/mapper/curricula/CurriculaStudentMapper.xml
+1
-1
No files found.
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/curricula/CurriclaStudentVo.java
0 → 100644
View file @
c7994ca1
package
yangtz
.
cs
.
liu
.
campus
.
domain
.
curricula
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 公众号选课返回信息
*/
@Data
public
class
CurriclaStudentVo
{
/** 主键id */
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/** 学生主键id */
private
Long
studentId
;
/** 选课任务主键id */
private
Long
curriculaId
;
/** 课程类型(1-春季选课,2-夏季选课,3-艺体) */
private
String
courseType
;
/** 选课时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
curriculaTime
;
/** 选课状态(1-未选课,2-已选课) */
private
String
curriculaState
;
/** 已选课程 */
private
String
selectedCourse
;
/** 已选专业 */
private
String
selectedMajor
;
/** 所选科目 */
private
String
selectedSubject
;
/** 任务名称 */
private
String
taskName
;
/** 开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
startTime
;
/** 结束时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endTime
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/curricula/CurriculaStudent.java
View file @
c7994ca1
...
...
@@ -31,5 +31,5 @@ public class CurriculaStudent {
/** 所选科目 */
private
String
selectedSubject
;
/** 是否删除 */
private
String
delF
al
g
;
private
String
delF
la
g
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolClass/SchoolClassEducational.java
View file @
c7994ca1
...
...
@@ -241,15 +241,17 @@ public class SchoolClassEducational extends BaseEntity
{
return
teacherWord
;
}
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
public
String
getDelFlag
()
{
@Override
public
String
getDelFlag
()
{
return
delFlag
;
}
@Override
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
public
void
setGradeId
(
Long
gradeId
)
{
this
.
gradeId
=
gradeId
;
...
...
smart-campus/src/main/java/yangtz/cs/liu/wechat/controller/courseSelection/WxCouresSelection.java
View file @
c7994ca1
package
yangtz
.
cs
.
liu
.
wechat
.
controller
.
courseSelection
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -9,9 +13,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
yangtz.cs.liu.campus.domain.curricula.CurriclaStudentVo
;
import
yangtz.cs.liu.campus.domain.curricula.CurriculaStudent
;
import
yangtz.cs.liu.campus.domain.curricula.CurriculaVariable
;
import
yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade
;
import
yangtz.cs.liu.campus.service.curricula.ICurriculaStudentService
;
import
yangtz.cs.liu.campus.service.curricula.ICurriculaVariableService
;
import
yangtz.cs.liu.campus.service.curricula.IStudentScoreService
;
import
yangtz.cs.liu.campus.vo.curricula.CurriculaStudentVo
;
import
yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo
;
/**
...
...
@@ -27,6 +36,30 @@ public class WxCouresSelection {
@Autowired
ICurriculaStudentService
iCurriculaStudentService
;
@Autowired
ICurriculaVariableService
iCurriculaVariableService
;
/**
* 学生选号信息查询
*/
@GetMapping
(
"/getCourseInfo/{studentId}"
)
private
AjaxResult
getCourseInfo
(
@PathVariable
(
"studentId"
)
Long
studentId
){
//查询学生个人选课信息
LambdaQueryWrapper
<
CurriculaStudent
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
CurriculaStudent:
:
getStudentId
,
studentId
);
wrapper
.
eq
(
CurriculaStudent:
:
getDelFlag
,
"0"
);
//查询出学生任务信息
CurriculaStudent
one
=
iCurriculaStudentService
.
getOne
(
wrapper
);
//查询选课信息
CurriculaVariable
byId
=
iCurriculaVariableService
.
getById
(
one
.
getCurriculaId
());
CurriclaStudentVo
data
=
new
CurriclaStudentVo
();
//拼接返回对象
BeanUtils
.
copyProperties
(
one
,
data
);
BeanUtils
.
copyProperties
(
byId
,
data
);
return
AjaxResult
.
success
(
data
);
}
/**
* 学生成绩查询
*/
...
...
@@ -55,7 +88,7 @@ public class WxCouresSelection {
private
AjaxResult
saveStudentcourse
(
@RequestBody
CurriculaStudent
curriculaStudent
){
//保存专业信息
try
{
iCurriculaStudentService
.
save
(
curriculaStudent
);
iCurriculaStudentService
.
updateById
(
curriculaStudent
);
return
AjaxResult
.
success
(
"选课成功"
);
}
catch
(
Exception
e
){
return
AjaxResult
.
error
(
"选课失败"
);
...
...
smart-campus/src/main/resources/mapper/curricula/CurriculaStudentMapper.xml
View file @
c7994ca1
...
...
@@ -19,7 +19,7 @@
<result
property=
"selectedMajor"
column=
"selected_major"
/>
<result
property=
"selectedSubject"
column=
"selected_subject"
/>
<result
property=
"divisionClassesName"
column=
"division_classes_name"
/>
<result
property=
"delF
la
g"
column=
"del_flag"
/>
<result
property=
"delF
al
g"
column=
"del_flag"
/>
</resultMap>
<select
id=
"countNum"
parameterType=
"Long"
resultType=
"Map"
>
...
...
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