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
505078a0
Commit
505078a0
authored
Aug 24, 2023
by
xuwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改测试bug
parent
2197d2cd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
923 additions
and
143 deletions
+923
-143
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
+7
-0
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+46
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/SchoolStudentIntegral/SchoolStudentIntegralController.java
+20
-3
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/educationalStatistics/StatisticsController.java
+6
-6
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/message/SchoolMessageParentsPushsController.java
+3
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/ministerial/MinisterialController.java
+6
-4
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/purchase/SchoolPurchaseController.java
+17
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolClass/SchoolClassController.java
+35
-12
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolDcwj/SchoolDcwjController.java
+7
-3
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolDcwj/SchoolDcwjNrController.java
+4
-2
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolbudget/SchoolBudgetController.java
+13
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/student/SchoolStudentController.java
+135
-28
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/student/SchoolStudentLeaveController.java
+26
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/curricula/StudentScoreMapper.java
+6
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/student/SchoolStudentClassRelationMapper.java
+13
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/student/SchoolStudentMapper.java
+13
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/student/SchoolStudentParentMapper.java
+8
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/educationStatistics/IEducationStatisticsService.java
+1
-1
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/curricula/StudentScoreServiceImpl.java
+72
-56
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/educationStatistics/EducationStatisticsServiceImpl.java
+2
-2
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolClass/SchoolClassImpl.java
+0
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/student/SchoolStudentServiceImpl.java
+0
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/time/SchoolTimeTableServiceImpl.java
+119
-8
smart-campus/src/main/java/yangtz/cs/liu/campus/service/schoolClass/ISchoolClassService.java
+11
-7
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/auditorium/SchoolAuditoriumVo.java
+5
-5
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/purchase/PurchaseVo.java
+1
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/schoolClass/SchoolClassDrVo.java
+0
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/student/SchoolStudentVO.java
+2
-2
smart-campus/src/main/resources/mapper/SchoolStudentIntegral/SchoolStudentIntegralMapper.xml
+1
-1
smart-campus/src/main/resources/mapper/curricula/StudentScoreMapper.xml
+137
-0
smart-campus/src/main/resources/mapper/student/SchoolStudentClassRelationMapper.xml
+37
-0
smart-campus/src/main/resources/mapper/student/SchoolStudentMapper.xml
+89
-0
smart-campus/src/main/resources/mapper/student/SchoolStudentParentMapper.xml
+81
-0
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
View file @
505078a0
...
...
@@ -211,4 +211,11 @@ public interface SysUserMapper {
int
updateUserNameByUserId
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"userId"
)
Long
userId
);
/**
* 更新用户表
* @param updateUserList
*/
void
updateUserList
(
@Param
(
"list"
)
List
<
SysUser
>
updateUserList
);
// 新增用户表
void
addUserList
(
@Param
(
"list"
)
List
<
SysUser
>
addUserList
);
}
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
505078a0
...
...
@@ -342,4 +342,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</select>
<update
id=
"updateUserList"
parameterType=
"com.ruoyi.common.core.domain.entity.SysUser"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
update sys_user
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"data.userName != null and data.userName != ''"
>
user_name = #{data.userName},
</if>
</trim>
where user_id = #{data.userId}
</foreach>
</update>
<insert
id=
"addUserList"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
insert into sys_user
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.userLoginType != null and data.userLoginType != ''"
>
user_login_type,
</if>
<if
test=
"data.userName != null and data.userName != ''"
>
user_name,
</if>
<if
test=
"data.phonenumber != null and data.phonenumber != ''"
>
phonenumber,
</if>
<if
test=
"data.studentId != null"
>
student_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.userLoginType != null and data.userLoginType != ''"
>
#{data.userLoginType},
</if>
<if
test=
"data.userName != null and data.userName != ''"
>
#{data.userName},
</if>
<if
test=
"data.phonenumber != null and data.phonenumber != ''"
>
#{data.phonenumber},
</if>
<if
test=
"data.studentId != null"
>
#{data.studentId},
</if>
</trim>
</foreach>
</insert>
</mapper>
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/SchoolStudentIntegral/SchoolStudentIntegralController.java
View file @
505078a0
...
...
@@ -23,6 +23,7 @@ import yangtz.cs.liu.campus.service.impl.student.SchoolStudentServiceImpl;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Scanner
;
...
...
@@ -52,7 +53,8 @@ public class SchoolStudentIntegralController extends BaseController
//获取所在学期
int
term
=
isNewTerm
();
schoolStudentIntegral
.
setStudentId
(
studentId
);
schoolStudentIntegral
.
setTerm
(
term
);
schoolStudentIntegral
.
setSchoolYear
(
null
);
// schoolStudentIntegral.setTerm(term);
startPage
();
List
<
SchoolStudentIntegral
>
list
=
schoolStudentIntegralService
.
selectSchoolStudentIntegralList
(
schoolStudentIntegral
);
return
getDataTable
(
list
);
...
...
@@ -71,6 +73,20 @@ public class SchoolStudentIntegralController extends BaseController
return
term
;
}
private
Integer
isNewTermY
(
Date
date
)
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
date
);
//获取当前年月
int
month
=
cal
.
get
(
Calendar
.
MONTH
)
+
1
;
//设置当前学期为上学期
int
term
=
0
;
//2-7为下学期,8-1为上学期
if
(
month
>=
2
&&
month
<
8
)
{
term
=
1
;
}
return
term
;
}
/**
* 查询改名学生总积分????
* @param schoolStudentIntegral
...
...
@@ -98,7 +114,7 @@ public class SchoolStudentIntegralController extends BaseController
public
void
export
(
HttpServletResponse
response
,
@PathVariable
Long
studentId
,
SchoolStudentIntegral
schoolStudentIntegral
)
{
schoolStudentIntegral
.
setStudentId
(
studentId
);
schoolStudentIntegral
.
setTerm
(
isNewTerm
());
//
schoolStudentIntegral.setTerm(isNewTerm());
List
<
SchoolStudentIntegral
>
list
=
schoolStudentIntegralService
.
selectSchoolStudentIntegralList
(
schoolStudentIntegral
);
ExcelUtil
<
SchoolStudentIntegral
>
util
=
new
ExcelUtil
<
SchoolStudentIntegral
>(
SchoolStudentIntegral
.
class
);
util
.
exportExcel
(
response
,
list
,
"学生积分数据"
);
...
...
@@ -127,7 +143,8 @@ public class SchoolStudentIntegralController extends BaseController
}
//根据日期判断所添加的这个积分应属于哪学年哪学期
int
schoolYear
=
DateUtils
.
getSchoolYear
(
schoolStudentIntegral
.
getDay
());
int
term
=
isNewTerm
();
int
term
=
isNewTermY
(
schoolStudentIntegral
.
getDay
());
schoolStudentIntegral
.
setSchoolYear
(
schoolYear
);
schoolStudentIntegral
.
setTerm
(
term
);
//schoolStudentIntegral.setCreateTime(DateTime.now());
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/educationalStatistics/StatisticsController.java
View file @
505078a0
...
...
@@ -86,17 +86,17 @@ public class StatisticsController extends BaseController {
/**
* 教务-统计-年龄统计
*/
@GetMapping
(
"/age"
)
public
TableDataInfo
age
()
@GetMapping
(
"/age
/{schoolYear}
"
)
public
TableDataInfo
age
(
@PathVariable
(
"schoolYear"
)
int
schoolYear
)
{
return
getDataTable
(
statisticsService
.
getAgeNum
());
return
getDataTable
(
statisticsService
.
getAgeNum
(
schoolYear
));
}
/**年龄导出*/
@PostMapping
(
"/exportAge"
)
public
void
exportAge
(
HttpServletResponse
response
)
@PostMapping
(
"/exportAge
/{schoolYear}
"
)
public
void
exportAge
(
@PathVariable
(
"schoolYear"
)
int
schoolYear
,
HttpServletResponse
response
)
{
List
<
StatisticsAgeVo
>
list
=
statisticsService
.
getAgeNum
();
List
<
StatisticsAgeVo
>
list
=
statisticsService
.
getAgeNum
(
schoolYear
);
try
{
TemplateExportParams
params
=
new
TemplateExportParams
(
TemplateExcelUtils
.
convertTemplatePath
(
"template/countAge.xlsx"
));
Map
<
String
,
Object
>
finalMap
=
new
HashMap
<
String
,
Object
>();
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/message/SchoolMessageParentsPushsController.java
View file @
505078a0
...
...
@@ -140,7 +140,9 @@ public class SchoolMessageParentsPushsController extends BaseController
boolean
flag
=
parentsPushsService
.
save
(
parentsPushs
);
if
(
flag
){
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
// int schoolYear = HolidayDateUtil.getSchoolYear();
// TODO 修改最新学年
int
schoolYear
=
gradeService
.
isNewSchoolYear
();
//获取当前级部(存在当前登录人在多个级部工作)
//List<SchoolGrade> gradeIds = gradeMentorService.selectGrades(getUserId(),schoolYear);
List
<
SchoolGrade
>
gradeIds
=
gradeMentorService
.
selectGradeList
(
getUserId
());
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/ministerial/MinisterialController.java
View file @
505078a0
...
...
@@ -63,7 +63,7 @@ public class MinisterialController extends BaseController {
@GetMapping
(
"/getClassTreeForGrade"
)
public
AjaxResult
getClassTreeList
(
SchoolClass
schoolClass
)
{
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
//
int schoolYear = HolidayDateUtil.getSchoolYear();
//List<SchoolGrade> gradeIds = gradeMentorService.selectGrades(getUserId(),schoolYear);
List
<
SchoolGrade
>
gradeIds
=
gradeMentorService
.
selectGradeList
(
getUserId
());
if
(
StringUtils
.
isNull
(
gradeIds
)
||
gradeIds
.
size
()
==
0
){
...
...
@@ -100,7 +100,7 @@ public class MinisterialController extends BaseController {
@GetMapping
(
"/getClassForGrade"
)
public
TableDataInfo
getClassForGrade
(
SchoolClass
schoolClass
)
{
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
//
int schoolYear = HolidayDateUtil.getSchoolYear();
//List<SchoolGrade> gradeIds = gradeMentorService.selectGrades(getUserId(),schoolYear);
List
<
SchoolGrade
>
gradeIds
=
gradeMentorService
.
selectGradeList
(
getUserId
());
if
(
StringUtils
.
isNull
(
gradeIds
)
||
gradeIds
.
size
()
==
0
){
...
...
@@ -134,7 +134,7 @@ public class MinisterialController extends BaseController {
@GetMapping
(
"/list"
)
public
TableDataInfo
studentList
(
SchoolStudentVO
schoolStudent
)
{
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
//
int schoolYear = HolidayDateUtil.getSchoolYear();
//List<SchoolGrade> gradeIds = gradeMentorService.selectGrades(getUserId(),schoolYear);
List
<
SchoolGrade
>
gradeIds
=
gradeMentorService
.
selectGradeList
(
getUserId
());
if
(
StringUtils
.
isNull
(
gradeIds
)
||
gradeIds
.
size
()
==
0
){
...
...
@@ -207,7 +207,9 @@ public class MinisterialController extends BaseController {
@GetMapping
(
"/parentList"
)
public
TableDataInfo
allParentList
(
SchoolStudentParentVO
schoolStudentParentVO
)
{
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
// int schoolYear = HolidayDateUtil.getSchoolYear();
// TODO 修改最新学年
int
schoolYear
=
gradeService
.
isNewSchoolYear
();
//List<SchoolGrade> gradeIds = gradeMentorService.selectGrades(getUserId(),schoolYear);
List
<
SchoolGrade
>
gradeIds
=
gradeMentorService
.
selectGradeList
(
getUserId
());
if
(
StringUtils
.
isNull
(
gradeIds
)
||
gradeIds
.
size
()
==
0
){
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/purchase/SchoolPurchaseController.java
View file @
505078a0
...
...
@@ -309,7 +309,23 @@ public class SchoolPurchaseController extends BaseController {
*/
@GetMapping
(
"/selectRegisterById/{id}"
)
public
AjaxResult
selectRegisterById
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
schoolPurchaseService
.
getById
(
id
));
// return AjaxResult.success(schoolPurchaseService.getById(id));
// TODO 修改采购信息详情
SchoolPurchase
schoolPurchase
=
schoolPurchaseService
.
getById
(
id
);
PurchaseVo
purchaseVo
=
new
PurchaseVo
();
BeanUtils
.
copyProperties
(
schoolPurchase
,
purchaseVo
);
LambdaQueryWrapper
<
SchoolPurchaseDetails
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SchoolPurchaseDetails:
:
getPurchaseId
,
id
);
List
<
SchoolPurchaseDetails
>
list
=
schoolPurchaseDetailService
.
list
(
wrapper
);
List
<
SchoolPurchaseDetailsVo
>
voList
=
new
ArrayList
<>();
list
.
forEach
(
schoolPurchaseDetails
->
{
SchoolPurchaseDetailsVo
schoolPurchaseDetailsVo
=
new
SchoolPurchaseDetailsVo
();
BeanUtils
.
copyProperties
(
schoolPurchaseDetails
,
schoolPurchaseDetailsVo
);
voList
.
add
(
schoolPurchaseDetailsVo
);
});
purchaseVo
.
setList
(
voList
);
return
AjaxResult
.
success
(
purchaseVo
);
}
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolClass/SchoolClassController.java
View file @
505078a0
...
...
@@ -7,7 +7,6 @@ import com.core.utils.HolidayDateUtil;
import
com.ruoyi.common.config.RuoYiConfig
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.entity.SchoolTeacher
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.exception.base.BaseException
;
...
...
@@ -22,25 +21,20 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
yangtz.cs.liu.campus.controller.patrol.SchoolPatrolController
;
import
yangtz.cs.liu.campus.domain.SchoolStudentIntegral.SchoolStudentIntegral
;
import
yangtz.cs.liu.campus.domain.schoolClass.SchoolClass
;
import
yangtz.cs.liu.campus.domain.schoolClass.SchoolClassHeadmaster
;
import
yangtz.cs.liu.campus.domain.schoolClass.SchoolClassMentor
;
import
yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade
;
import
yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor
;
import
yangtz.cs.liu.campus.domain.student.SchoolStudent
;
import
yangtz.cs.liu.campus.service.ISchoolStudentIntegra.ISchoolStudentIntegralService
;
import
yangtz.cs.liu.campus.service.schoolClass.ISchoolClassHeadmasterService
;
import
yangtz.cs.liu.campus.service.schoolClass.ISchoolClassMentorService
;
import
yangtz.cs.liu.campus.service.schoolClass.ISchoolClassService
;
import
yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeMentorService
;
import
yangtz.cs.liu.campus.service.schoolgrade.ISchoolGradeService
;
import
yangtz.cs.liu.campus.service.student.ISchoolStudentService
;
import
yangtz.cs.liu.campus.service.teacher.ISchoolTeacherService
;
import
yangtz.cs.liu.campus.vo.schoolClass.ClassBatchVo
;
import
yangtz.cs.liu.campus.vo.schoolClass.ClassTreeSelect
;
import
yangtz.cs.liu.campus.vo.school
grade.GradeTreeSelect
;
import
yangtz.cs.liu.campus.vo.school
Class.SchoolClassDrVo
;
import
yangtz.cs.liu.campus.vo.student.SchoolStudentVO
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -282,26 +276,26 @@ public class SchoolClassController extends BaseController {
/**
* 下载模板
*
*
TODO 修改班级管理导入
* @return
*/
@PostMapping
(
"/importTemplate"
)
public
void
importTemplate
(
HttpServletResponse
response
)
{
ExcelUtil
<
SchoolClass
>
util
=
new
ExcelUtil
<>(
SchoolClass
.
class
);
ExcelUtil
<
SchoolClass
DrVo
>
util
=
new
ExcelUtil
<>(
SchoolClassDrVo
.
class
);
util
.
importTemplateExcel
(
response
,
"班级表"
);
}
/**
* 导入
*
*
TODO 修改班级管理导入
* @param file
* @return
* @throws Exception
*/
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
)
throws
Exception
{
ExcelUtil
<
SchoolClass
>
util
=
new
ExcelUtil
<
SchoolClass
>(
SchoolClass
.
class
);
List
<
SchoolClass
>
list
=
util
.
importExcel
(
file
.
getInputStream
());
ExcelUtil
<
SchoolClass
DrVo
>
util
=
new
ExcelUtil
<
SchoolClassDrVo
>(
SchoolClassDrVo
.
class
);
List
<
SchoolClass
DrVo
>
list
=
util
.
importExcel
(
file
.
getInputStream
());
//校验
schoolClassService
.
checkImport
(
list
);
//导入
...
...
@@ -309,6 +303,35 @@ public class SchoolClassController extends BaseController {
return
AjaxResult
.
success
(
message
);
}
// /**
// * 下载模板
// *
// * @return
// */
// @PostMapping("/importTemplate")
// public void importTemplate(HttpServletResponse response) {
// ExcelUtil<SchoolClass> util = new ExcelUtil<>(SchoolClass.class);
// util.importTemplateExcel(response, "班级表");
// }
//
// /**
// * 导入
// *
// * @param file
// * @return
// * @throws Exception
// */
// @PostMapping("/importData")
// public AjaxResult importData(MultipartFile file) throws Exception {
// ExcelUtil<SchoolClass> util = new ExcelUtil<SchoolClass>(SchoolClass.class);
// List<SchoolClass> list = util.importExcel(file.getInputStream());
// //校验
// schoolClassService.checkImport(list);
// //导入
// String message = schoolClassService.importExamDetail(list);
// return AjaxResult.success(message);
// }
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolDcwj/SchoolDcwjController.java
View file @
505078a0
...
...
@@ -98,7 +98,7 @@ public class SchoolDcwjController extends BaseController {
public
TableDataInfo
list
(
SchoolDcwj
schoolDcwj
)
{
//获取当前登录人当前学年所在级部
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
//
int schoolYear = HolidayDateUtil.getSchoolYear();
//获取当前用户所在级部
/* List<SchoolGrade> gradeIds = gradeMentorService.selectGrades(getUserId(), schoolYear);
if (StringUtils.isNull(gradeIds) || gradeIds.size() == 0) {
...
...
@@ -132,7 +132,9 @@ public class SchoolDcwjController extends BaseController {
public
TableDataInfo
headerList
(
SchoolDcwj
schoolDcwj
)
{
//获取当前登录人当前学年所任班主任的班级ids
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
// int schoolYear = HolidayDateUtil.getSchoolYear();
// TODO 修改最新学年
int
schoolYear
=
gradeService
.
isNewSchoolYear
();
LambdaQueryWrapper
<
SchoolClass
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
SchoolClass:
:
getSchoolYear
,
schoolYear
)
...
...
@@ -422,7 +424,9 @@ public class SchoolDcwjController extends BaseController {
public
List
<
Long
>
getStudentIds
()
{
//获取班主任所在班级的学生
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
// int schoolYear = HolidayDateUtil.getSchoolYear();
// TODO 修改最新学年
int
schoolYear
=
gradeService
.
isNewSchoolYear
();
LambdaQueryWrapper
<
SchoolClass
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
SchoolClass:
:
getSchoolYear
,
schoolYear
)
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolDcwj/SchoolDcwjNrController.java
View file @
505078a0
...
...
@@ -541,8 +541,10 @@ public class SchoolDcwjNrController extends BaseController
.
set
(
SchoolDcwjNr:
:
getNrN
,
null
)
.
set
(
SchoolDcwjNr:
:
getNrO
,
null
);
//判断是否有页面逻辑,如果没有,则要将表里的值(如果之前有)去掉
if
(
StringUtils
.
isNull
(
schoolDcwjNr
.
getNrId
())
||
""
.
equals
(
schoolDcwjNr
.
getNrId
())
)
{
if
(
StringUtils
.
isNull
(
schoolDcwjNr
.
getNrId
()))
{
luw
.
set
(
SchoolDcwjNr:
:
getNrId
,
null
).
set
(
SchoolDcwjNr:
:
getNrSelect
,
null
);
}
else
{
luw
.
set
(
SchoolDcwjNr:
:
getNrId
,
schoolDcwjNr
.
getNrId
()).
set
(
SchoolDcwjNr:
:
getNrSelect
,
schoolDcwjNr
.
getNrSelect
());
}
return
toAjax
(
schoolDcwjNrService
.
update
(
luw
));
}
...
...
@@ -550,7 +552,7 @@ public class SchoolDcwjNrController extends BaseController
}
public
void
judgePx
(
SchoolDcwjNr
schoolDcwjNr
){
if
(
StringUtils
.
isNull
(
schoolDcwjNr
.
getDcwjId
())
||
""
.
equals
(
schoolDcwjNr
.
getDcwjId
())
){
if
(
StringUtils
.
isNull
(
schoolDcwjNr
.
getDcwjId
())){
throw
new
ServiceException
(
"主表id为空,请检查"
);
}
LambdaQueryWrapper
<
SchoolDcwjNr
>
lqw
=
new
LambdaQueryWrapper
<>();
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolbudget/SchoolBudgetController.java
View file @
505078a0
...
...
@@ -26,8 +26,10 @@ import com.ruoyi.common.enums.BusinessType;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
org.springframework.web.multipart.MultipartFile
;
import
yangtz.cs.liu.campus.domain.purchase.SchoolPurchase
;
import
yangtz.cs.liu.campus.domain.schoolbudget.SchoolBudget
;
import
yangtz.cs.liu.campus.domain.schoolbudget.SchoolBudgetDetails
;
import
yangtz.cs.liu.campus.service.purchase.ISchoolPurchaseService
;
import
yangtz.cs.liu.campus.service.schoolbudget.ISchoolBudgetDetailsService
;
import
yangtz.cs.liu.campus.service.schoolbudget.ISchoolBudgetService
;
import
yangtz.cs.liu.campus.vo.schoolbudget.SchoolBudgetVo
;
...
...
@@ -48,6 +50,9 @@ public class SchoolBudgetController extends BaseController
@Autowired
private
ISchoolBudgetDetailsService
schoolBudgetDetailsService
;
@Autowired
private
ISchoolPurchaseService
purchaseService
;
/**
* 按科室过滤查询预算项目列表
*/
...
...
@@ -165,6 +170,14 @@ public class SchoolBudgetController extends BaseController
@DeleteMapping
(
"/delete/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
List
<
Integer
>
ids
)
{
// TODO 修改
//判断该预算项目是否已经采购过
LambdaQueryWrapper
<
SchoolPurchase
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
SchoolPurchase:
:
getBudgetId
,
ids
);
List
<
SchoolPurchase
>
list
=
purchaseService
.
list
(
wrapper
);
if
(
StringUtils
.
isNotNull
(
list
)
&&
list
.
size
()
>
0
){
throw
new
ServiceException
(
"该预算项目已采购,不可删除"
);
}
//删除子表
LambdaQueryWrapper
<
SchoolBudgetDetails
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
in
(
SchoolBudgetDetails:
:
getBudgetId
,
ids
);
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/student/SchoolStudentController.java
View file @
505078a0
...
...
@@ -82,7 +82,7 @@ public class SchoolStudentController extends BaseController {
*/
@PostMapping
(
"/add"
)
public
AjaxResult
add
(
@RequestBody
@Validated
SchoolStudent
schoolStudent
)
{
checkStudentUnique
(
schoolStudent
);
checkStudentUnique
Xz
(
schoolStudent
);
boolean
flag
=
schoolStudentService
.
save
(
schoolStudent
);
//添加关系到学生班级表
if
(
StringUtils
.
isNotNull
(
schoolStudent
.
getClassId
())){
...
...
@@ -114,50 +114,157 @@ public class SchoolStudentController extends BaseController {
relationService
.
remove
(
lqw
);
addRelation
(
schoolStudent
);
}
}
return
toAjax
(
flag
);
}
private
void
checkStudentUniqueXz
(
SchoolStudent
schoolStudent
)
{
// TODO 修改
LambdaQueryWrapper
<
SchoolStudent
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
SchoolStudent:
:
getIdCard
,
schoolStudent
.
getIdCard
());
SchoolStudent
student
=
schoolStudentService
.
getOne
(
lqw
);
if
(
StringUtils
.
isNotNull
(
student
)){
if
(
schoolStudent
.
getIdCard
().
equals
(
student
.
getIdCard
())){
throw
new
ServiceException
(
"身份证号已存在"
);
}
}
LambdaQueryWrapper
<
SchoolStudent
>
lqw1
=
new
LambdaQueryWrapper
<>();
lqw1
.
eq
(
SchoolStudent:
:
getSchoolNo
,
schoolStudent
.
getSchoolNo
());
SchoolStudent
student1
=
schoolStudentService
.
getOne
(
lqw1
);
if
(
StringUtils
.
isNotNull
(
student1
)){
if
(
schoolStudent
.
getSchoolNo
().
equals
(
student1
.
getSchoolNo
())){
throw
new
ServiceException
(
"注册序号已存在"
);
}
}
LambdaQueryWrapper
<
SchoolStudent
>
lqw2
=
new
LambdaQueryWrapper
<>();
lqw2
.
eq
(
SchoolStudent:
:
getProvincialNumber
,
schoolStudent
.
getProvincialNumber
());
SchoolStudent
student2
=
schoolStudentService
.
getOne
(
lqw2
);
if
(
StringUtils
.
isNotNull
(
student2
)){
if
(
schoolStudent
.
getProvincialNumber
().
equals
(
student2
.
getProvincialNumber
())){
throw
new
ServiceException
(
"省学籍辅号已存在"
);
}
}
LambdaQueryWrapper
<
SchoolStudent
>
lqw3
=
new
LambdaQueryWrapper
<>();
lqw3
.
eq
(
SchoolStudent:
:
getNationalNumber
,
schoolStudent
.
getNationalNumber
());
SchoolStudent
student3
=
schoolStudentService
.
getOne
(
lqw3
);
if
(
StringUtils
.
isNotNull
(
student3
)){
if
(
schoolStudent
.
getNationalNumber
().
equals
(
student3
.
getNationalNumber
())){
throw
new
ServiceException
(
"全国学籍号已存在"
);
}
}
LambdaQueryWrapper
<
SchoolStudent
>
lqw4
=
new
LambdaQueryWrapper
<>();
lqw4
.
eq
(
SchoolStudent:
:
getOneCard
,
schoolStudent
.
getOneCard
());
SchoolStudent
student4
=
schoolStudentService
.
getOne
(
lqw4
);
if
(
StringUtils
.
isNotNull
(
student4
)){
if
(
schoolStudent
.
getOneCard
().
equals
(
student4
.
getOneCard
())){
throw
new
ServiceException
(
"校园一卡通已存在"
);
}
}
}
private
void
checkStudentUnique
(
SchoolStudent
schoolStudent
)
{
// TODO 原代码
// LambdaQueryWrapper<SchoolStudent> lqw = new LambdaQueryWrapper<>();
// lqw
// .eq(SchoolStudent::getIdCard, schoolStudent.getIdCard())
// .or()
// .eq(SchoolStudent::getSchoolNo, schoolStudent.getSchoolNo())
// .or()
// .eq(isNotBlank(schoolStudent.getProvincialNumber()),SchoolStudent::getProvincialNumber,schoolStudent.getProvincialNumber())
// .or()
// .eq(isNotBlank(schoolStudent.getNationalNumber()),SchoolStudent::getNationalNumber,schoolStudent.getNationalNumber())
// .or()
// .eq(isNotBlank(schoolStudent.getOneCard()), SchoolStudent::getOneCard, schoolStudent.getOneCard());
// SchoolStudent student = schoolStudentService.getOne(lqw);
// if (StringUtils.isNotNull(student)) {
// if (StringUtils.isNotNull(schoolStudent.getId()) && schoolStudent.getId().equals(student.getId())) {
// return;
// }
// if (schoolStudent.getIdCard().equals(student.getIdCard())) {
// throw new ServiceException("身份证号已存在");
// }
// if (schoolStudent.getSchoolNo().equals(student.getSchoolNo())) {
// throw new ServiceException("注册序号已存在");
// }
// if(StringUtils.isNotBlank(schoolStudent.getProvincialNumber())){
// if (schoolStudent.getProvincialNumber().equals(student.getProvincialNumber())) {
// throw new ServiceException("省学籍辅号已存在");
// }
// }
// if(StringUtils.isNotBlank(schoolStudent.getNationalNumber())){
// if (schoolStudent.getNationalNumber().equals(student.getNationalNumber())) {
// throw new ServiceException("全国学籍号已存在");
// }
// }
// if (StringUtils.isNotBlank(schoolStudent.getOneCard())) {
// if (schoolStudent.getOneCard().equals(student.getOneCard())) {
// throw new ServiceException("校园一卡通已存在");
// }
// }
// }
// TODO 修改
LambdaQueryWrapper
<
SchoolStudent
>
lqw
=
new
LambdaQueryWrapper
<>();
lqw
.
eq
(
SchoolStudent:
:
getIdCard
,
schoolStudent
.
getIdCard
())
.
or
()
.
eq
(
SchoolStudent:
:
getSchoolNo
,
schoolStudent
.
getSchoolNo
())
.
or
()
.
eq
(
isNotBlank
(
schoolStudent
.
getProvincialNumber
()),
SchoolStudent:
:
getProvincialNumber
,
schoolStudent
.
getProvincialNumber
())
.
or
()
.
eq
(
isNotBlank
(
schoolStudent
.
getNationalNumber
()),
SchoolStudent:
:
getNationalNumber
,
schoolStudent
.
getNationalNumber
())
.
or
()
.
eq
(
isNotBlank
(
schoolStudent
.
getOneCard
()),
SchoolStudent:
:
getOneCard
,
schoolStudent
.
getOneCard
());
.
notIn
(
SchoolStudent:
:
getId
,
schoolStudent
.
getId
());
SchoolStudent
student
=
schoolStudentService
.
getOne
(
lqw
);
if
(
StringUtils
.
isNotNull
(
student
))
{
if
(
StringUtils
.
isNotNull
(
schoolStudent
.
getId
())
&&
schoolStudent
.
getId
().
equals
(
student
.
getId
()))
{
return
;
}
if
(
schoolStudent
.
getIdCard
().
equals
(
student
.
getIdCard
()))
{
if
(
StringUtils
.
isNotNull
(
student
)){
if
(
schoolStudent
.
getIdCard
().
equals
(
student
.
getIdCard
())){
throw
new
ServiceException
(
"身份证号已存在"
);
}
if
(
schoolStudent
.
getSchoolNo
().
equals
(
student
.
getSchoolNo
()))
{
}
LambdaQueryWrapper
<
SchoolStudent
>
lqw1
=
new
LambdaQueryWrapper
<>();
lqw1
.
eq
(
SchoolStudent:
:
getSchoolNo
,
schoolStudent
.
getSchoolNo
())
.
notIn
(
SchoolStudent:
:
getId
,
schoolStudent
.
getId
());
SchoolStudent
student1
=
schoolStudentService
.
getOne
(
lqw1
);
if
(
StringUtils
.
isNotNull
(
student1
)){
if
(
schoolStudent
.
getSchoolNo
().
equals
(
student1
.
getSchoolNo
())){
throw
new
ServiceException
(
"注册序号已存在"
);
}
if
(
StringUtils
.
isNotBlank
(
schoolStudent
.
getProvincialNumber
())){
if
(
schoolStudent
.
getProvincialNumber
().
equals
(
student
.
getProvincialNumber
()))
{
throw
new
ServiceException
(
"省学籍辅号已存在"
);
}
}
LambdaQueryWrapper
<
SchoolStudent
>
lqw2
=
new
LambdaQueryWrapper
<>();
lqw2
.
eq
(
SchoolStudent:
:
getProvincialNumber
,
schoolStudent
.
getProvincialNumber
())
.
notIn
(
SchoolStudent:
:
getId
,
schoolStudent
.
getId
());
SchoolStudent
student2
=
schoolStudentService
.
getOne
(
lqw2
);
if
(
StringUtils
.
isNotNull
(
student2
)){
if
(
schoolStudent
.
getProvincialNumber
().
equals
(
student2
.
getProvincialNumber
())){
throw
new
ServiceException
(
"省学籍辅号已存在"
);
}
if
(
StringUtils
.
isNotBlank
(
schoolStudent
.
getNationalNumber
())){
if
(
schoolStudent
.
getNationalNumber
().
equals
(
student
.
getNationalNumber
()))
{
throw
new
ServiceException
(
"全国学籍号已存在"
);
}
}
LambdaQueryWrapper
<
SchoolStudent
>
lqw3
=
new
LambdaQueryWrapper
<>();
lqw3
.
eq
(
SchoolStudent:
:
getNationalNumber
,
schoolStudent
.
getNationalNumber
())
.
notIn
(
SchoolStudent:
:
getId
,
schoolStudent
.
getId
());
SchoolStudent
student3
=
schoolStudentService
.
getOne
(
lqw3
);
if
(
StringUtils
.
isNotNull
(
student3
)){
if
(
schoolStudent
.
getNationalNumber
().
equals
(
student3
.
getNationalNumber
())){
throw
new
ServiceException
(
"全国学籍号已存在"
);
}
if
(
StringUtils
.
isNotBlank
(
schoolStudent
.
getOneCard
()))
{
if
(
schoolStudent
.
getOneCard
().
equals
(
student
.
getOneCard
()))
{
throw
new
ServiceException
(
"校园一卡通已存在"
);
}
}
LambdaQueryWrapper
<
SchoolStudent
>
lqw4
=
new
LambdaQueryWrapper
<>();
lqw4
.
eq
(
SchoolStudent:
:
getOneCard
,
schoolStudent
.
getOneCard
())
.
notIn
(
SchoolStudent:
:
getId
,
schoolStudent
.
getId
());
SchoolStudent
student4
=
schoolStudentService
.
getOne
(
lqw4
);
if
(
StringUtils
.
isNotNull
(
student4
)){
if
(
schoolStudent
.
getOneCard
().
equals
(
student4
.
getOneCard
())){
throw
new
ServiceException
(
"校园一卡通已存在"
);
}
}
}
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/student/SchoolStudentLeaveController.java
View file @
505078a0
...
...
@@ -18,6 +18,7 @@ import org.activiti.engine.runtime.ProcessInstance;
import
org.activiti.engine.task.Task
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -153,7 +154,31 @@ public class SchoolStudentLeaveController extends BaseController {
*/
@GetMapping
(
"/queryOne/{id}"
)
public
AjaxResult
queryOne
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
schoolStudentLeaveService
.
getById
(
id
));
SchoolStudentLeave
studentLeave
=
schoolStudentLeaveService
.
getById
(
id
);
StudentLeaveVO
leaveVo
=
new
StudentLeaveVO
();
BeanUtils
.
copyProperties
(
studentLeave
,
leaveVo
);
if
(
StringUtils
.
isNotBlank
(
studentLeave
.
getInstanceId
()))
{
List
<
Task
>
taskList
=
taskService
.
createTaskQuery
()
.
processInstanceId
(
studentLeave
.
getInstanceId
())
.
list
();
// 例如请假会签,会同时拥有多个任务
if
(!
CollectionUtils
.
isEmpty
(
taskList
))
{
TaskEntityImpl
task
=
(
TaskEntityImpl
)
taskList
.
get
(
0
);
leaveVo
.
setTaskId
(
task
.
getId
());
if
(
task
.
getSuspensionState
()
==
2
)
{
leaveVo
.
setTaskName
(
"已挂起"
);
leaveVo
.
setSuspendState
(
"2"
);
}
else
{
leaveVo
.
setTaskName
(
task
.
getName
());
leaveVo
.
setSuspendState
(
"1"
);
}
}
else
{
// 已办结或者已撤销
leaveVo
.
setTaskName
(
"已结束"
);
}
}
else
{
leaveVo
.
setTaskName
(
"未启动"
);
}
return
AjaxResult
.
success
(
leaveVo
);
}
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/curricula/StudentScoreMapper.java
View file @
505078a0
...
...
@@ -36,4 +36,10 @@ public interface StudentScoreMapper extends BaseMapper<SchoolStudentScore> {
* @return
*/
int
deleteStudentScore
(
Long
[]
ids
);
//批量修改学生考试成绩
void
updateScoreList
(
@Param
(
"list"
)
List
<
SchoolStudentScore
>
updateScoreList
);
//批量新增学生考试成绩
void
insertScoreList
(
@Param
(
"list"
)
List
<
SchoolStudentScore
>
addScoreList
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/student/SchoolStudentClassRelationMapper.java
View file @
505078a0
...
...
@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.mapper.student;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
yangtz.cs.liu.campus.domain.student.SchoolStudentClassRelation
;
import
yangtz.cs.liu.campus.vo.schoolClass.StudentClassRelationVo
;
...
...
@@ -11,4 +12,16 @@ import java.util.List;
public
interface
SchoolStudentClassRelationMapper
extends
BaseMapper
<
SchoolStudentClassRelation
>
{
//查询学生班级关系列表
List
<
StudentClassRelationVo
>
queryListByStudentId
(
Long
studentId
);
/**
* 修改学生与班级关系
* @param updateRelationList
*/
void
updateRelationList
(
@Param
(
"list"
)
List
<
SchoolStudentClassRelation
>
updateRelationList
);
/**
* 新增学生与班级关系
* @param addRelationList
*/
void
addRelationList
(
@Param
(
"list"
)
List
<
SchoolStudentClassRelation
>
addRelationList
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/student/SchoolStudentMapper.java
View file @
505078a0
...
...
@@ -79,4 +79,17 @@ public interface SchoolStudentMapper extends BaseMapper<SchoolStudent> {
* @return
*/
SchoolStudentVO
getInfoByidCard
(
String
idCard
);
/**
* 批量插入学生
* @param addList
* @return
*/
int
inserStudentList
(
@Param
(
"list"
)
List
<
SchoolStudent
>
addList
);
/**
* 批量更新学生信息
* @param updateList
*/
int
updateStudentList
(
@Param
(
"list"
)
List
<
SchoolStudent
>
updateList
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/mapper/student/SchoolStudentParentMapper.java
View file @
505078a0
...
...
@@ -72,4 +72,12 @@ public interface SchoolStudentParentMapper extends BaseMapper<SchoolStudentParen
* 根据id 查询 openId
*/
String
getOpenIdById
(
Long
id
);
/**
* 更新学生家长信息
* @param updateParentList
*/
void
updateParentList
(
@Param
(
"list"
)
List
<
SchoolStudentParent
>
updateParentList
);
// 新增学生家长信息
void
addParentList
(
@Param
(
"list"
)
List
<
SchoolStudentParent
>
addParentList
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/educationStatistics/IEducationStatisticsService.java
View file @
505078a0
...
...
@@ -15,5 +15,5 @@ public interface IEducationStatisticsService {
List
<
StatisticsVariationVo
>
getVariationNum
(
String
data
,
String
data1
);
//年龄统计
List
<
StatisticsAgeVo
>
getAgeNum
();
List
<
StatisticsAgeVo
>
getAgeNum
(
int
schoolYear
);
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/curricula/StudentScoreServiceImpl.java
View file @
505078a0
...
...
@@ -80,51 +80,49 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
// 准备记录日志数据
int
successNum
=
0
;
StringBuilder
successMsg
=
new
StringBuilder
();
//查询全部学生考试成绩
LambdaQueryWrapper
<
SchoolStudentScore
>
lqw
=
new
LambdaQueryWrapper
<>();
List
<
SchoolStudentScore
>
schoolStudentScores
=
studentScoreMapper
.
selectList
(
lqw
);
List
<
SchoolStudentScore
>
updateScoreList
=
new
ArrayList
<>();
List
<
SchoolStudentScore
>
addScoreList
=
new
ArrayList
<>();
for
(
SchoolStudentScoreVo
schoolStudentScoreVo
:
list
)
{
LambdaQueryWrapper
<
SchoolStudent
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SchoolStudent:
:
getIdCard
,
schoolStudentScoreVo
.
getIdCard
());
SchoolStudent
schoolStudent
=
schoolStudentMapper
.
selectOne
(
wrapper
);
if
(
StringUtils
.
isNotNull
(
schoolStudent
)){
//赋值
SchoolStudentScore
schoolStudentScore
=
new
SchoolStudentScore
();
schoolStudentScore
.
setStudentId
(
schoolStudent
.
getId
());
schoolStudentScore
.
setCurriculaId
(
curriculaId
);
schoolStudentScore
.
setClassId
(
schoolStudent
.
getClassId
());
schoolStudentScore
.
setExamType
(
schoolStudentScoreVo
.
getExamType
());
schoolStudentScore
.
setLanguage
(
schoolStudentScoreVo
.
getLanguage
());
schoolStudentScore
.
setMath
(
schoolStudentScoreVo
.
getMath
());
schoolStudentScore
.
setEnglish
(
schoolStudentScoreVo
.
getEnglish
());
schoolStudentScore
.
setPolitics
(
schoolStudentScoreVo
.
getPolitics
());
schoolStudentScore
.
setGeography
(
schoolStudentScoreVo
.
getGeography
());
schoolStudentScore
.
setHistory
(
schoolStudentScoreVo
.
getHistory
());
schoolStudentScore
.
setPhysics
(
schoolStudentScoreVo
.
getPhysics
());
schoolStudentScore
.
setChemistry
(
schoolStudentScoreVo
.
getChemistry
());
schoolStudentScore
.
setBiology
(
schoolStudentScoreVo
.
getBiology
());
schoolStudentScore
.
setCreateBy
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserName
());
schoolStudentScore
.
setCreateTime
(
DateUtils
.
getNowDate
());
LambdaQueryWrapper
<
SchoolStudentScore
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
SchoolStudentScore:
:
getExamType
,
schoolStudentScore
.
getExamType
())
.
eq
(
SchoolStudentScore:
:
getStudentId
,
schoolStudentScore
.
getStudentId
())
.
eq
(
SchoolStudentScore:
:
getDelFlag
,
"0"
);
List
<
SchoolStudentScore
>
schoolStudentScores
=
studentScoreMapper
.
selectList
(
wrapper1
);
String
examType
=
schoolStudentScoreVo
.
getExamType
();
switch
(
examType
){
case
"1"
:
examType
=
"一次"
;
break
;
case
"2"
:
examType
=
"二次"
;
break
;
case
"3"
:
examType
=
"三次"
;
break
;
}
if
(
schoolStudentScores
.
size
()
>
0
){
throw
new
ServiceException
(
"已存在"
+
schoolStudentScoreVo
.
getStudentName
()
+
"学生"
+
examType
+
"考试成绩"
);
SchoolStudentScore
score
=
new
SchoolStudentScore
();
for
(
SchoolStudentScore
schoolStudentScore
:
schoolStudentScores
)
{
if
(
schoolStudentScoreVo
.
getExamType
().
equals
(
schoolStudentScore
.
getExamType
())
&&
schoolStudentScoreVo
.
getStudentId
().
equals
(
schoolStudentScore
.
getStudentId
())
&&
schoolStudentScore
.
getCurriculaId
().
equals
(
curriculaId
)){
BeanUtils
.
copyProperties
(
schoolStudentScore
,
score
);
}
studentScoreMapper
.
insert
(
schoolStudentScore
);
successNum
++;
}
//判断学生是否存在此次考试成绩
if
(
StringUtils
.
isNotNull
(
score
.
getStudentId
())){
//存在,更新学生此次考试成绩
score
.
setLanguage
(
schoolStudentScoreVo
.
getLanguage
());
score
.
setMath
(
schoolStudentScoreVo
.
getMath
());
score
.
setEnglish
(
schoolStudentScoreVo
.
getEnglish
());
score
.
setPolitics
(
schoolStudentScoreVo
.
getPolitics
());
score
.
setGeography
(
schoolStudentScoreVo
.
getGeography
());
score
.
setHistory
(
schoolStudentScoreVo
.
getHistory
());
score
.
setPhysics
(
schoolStudentScoreVo
.
getPhysics
());
score
.
setChemistry
(
schoolStudentScoreVo
.
getChemistry
());
score
.
setBiology
(
schoolStudentScoreVo
.
getBiology
());
updateScoreList
.
add
(
score
);
}
else
{
//不存在,新增学生此次考试成绩
SchoolStudentScore
schoolStudentScore
=
new
SchoolStudentScore
();
BeanUtils
.
copyProperties
(
schoolStudentScoreVo
,
schoolStudentScore
);
addScoreList
.
add
(
schoolStudentScore
);
}
successNum
++;
}
if
(
updateScoreList
.
size
()
>
0
){
studentScoreMapper
.
updateScoreList
(
updateScoreList
);
}
if
(
addScoreList
.
size
()
>
0
){
studentScoreMapper
.
insertScoreList
(
addScoreList
);
}
successMsg
.
insert
(
0
,
"恭喜您,数据已导入成功!共有 "
+
successNum
+
" 条,数据如下:"
);
return
successMsg
.
toString
();
...
...
@@ -153,10 +151,7 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
}
else
if
(
StringUtils
.
isEmpty
(
schoolStudentScoreVo
.
getStudentNumber
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、学号为空,请您重新输入!"
);
}
/*else if (StringUtils.isEmpty(schoolStudentScoreVo.getClassName())) {
failureNum++;
failureMsg.append("<br/>" + failureNum + "、班级为空,请您重新输入!");
}*/
else
if
(
StringUtils
.
isNull
(
schoolStudentScoreVo
.
getExamType
()))
{
}
else
if
(
StringUtils
.
isNull
(
schoolStudentScoreVo
.
getExamType
()))
{
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、考试类型为空,请您重新输入!"
);
}
else
{
...
...
@@ -167,17 +162,10 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
if
(
StringUtils
.
isNull
(
schoolStudents
)
||
schoolStudents
.
size
()
==
0
){
failureNum
++;
failureMsg
.
append
(
"<br/>"
+
failureNum
+
"、"
+
schoolStudentScoreVo
.
getStudentName
()
+
"同学不存在,请您重新输入! "
);
}
/*
else {
}
else
{
SchoolStudent
schoolStudent
=
schoolStudents
.
get
(
0
);
LambdaQueryWrapper<SchoolClass> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SchoolClass::getId,schoolStudent.getClassId())
.eq(SchoolClass::getClassName,schoolStudentScoreVo.getClassName());
List<SchoolClass> schoolClasses = schoolClassMapper.selectList(queryWrapper);
if (StringUtils.isNull(schoolClasses) || schoolClasses.size() == 0){
failureNum++;
failureMsg.append("<br/>" + failureNum + "、" + schoolStudentScoreVo.getClassName() + "班级" + schoolStudentScoreVo.getStudentName() + "同学不存在,请您重新输入! ");
}
}*/
schoolStudentScoreVo
.
setStudentId
(
schoolStudent
.
getId
());
}
}
}
if
(
failureNum
>
0
)
{
...
...
@@ -217,6 +205,34 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreMapper, Sch
if
(
schoolStudentScores
.
size
()
>
0
){
throw
new
ServiceException
(
"已存在该学生此次考试成绩"
);
}
if
(
schoolStudentScore
.
getLanguage
()
>
150
||
schoolStudentScore
.
getLanguage
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
if
(
schoolStudentScore
.
getMath
()
>
150
||
schoolStudentScore
.
getMath
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
if
(
schoolStudentScore
.
getEnglish
()
>
150
||
schoolStudentScore
.
getEnglish
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
if
(
schoolStudentScore
.
getPolitics
()
>
150
||
schoolStudentScore
.
getPolitics
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
if
(
schoolStudentScore
.
getGeography
()
>
150
||
schoolStudentScore
.
getGeography
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
if
(
schoolStudentScore
.
getHistory
()
>
150
||
schoolStudentScore
.
getHistory
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
if
(
schoolStudentScore
.
getPhysics
()
>
150
||
schoolStudentScore
.
getPhysics
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
if
(
schoolStudentScore
.
getChemistry
()
>
150
||
schoolStudentScore
.
getChemistry
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
if
(
schoolStudentScore
.
getBiology
()
>
150
||
schoolStudentScore
.
getBiology
()
<
0
){
throw
new
ServiceException
(
"请输入正确分数"
);
}
schoolStudentScore
.
setCreateBy
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserName
());
schoolStudentScore
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
studentScoreMapper
.
insert
(
schoolStudentScore
);
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/educationStatistics/EducationStatisticsServiceImpl.java
View file @
505078a0
...
...
@@ -201,10 +201,10 @@ public class EducationStatisticsServiceImpl implements IEducationStatisticsServi
//年龄统计
@Override
public
List
<
StatisticsAgeVo
>
getAgeNum
()
{
public
List
<
StatisticsAgeVo
>
getAgeNum
(
int
schoolYear
)
{
List
<
StatisticsAgeVo
>
list
=
new
ArrayList
<>();
//获取当前学年
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
//
int schoolYear = HolidayDateUtil.getSchoolYear();
//int schoolYear = 2021;
//统计每个级部的班级里的学生的年龄个数
for
(
int
i
=
1
;
i
<
4
;
i
++)
{
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolClass/SchoolClassImpl.java
View file @
505078a0
This diff is collapsed.
Click to expand it.
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/student/SchoolStudentServiceImpl.java
View file @
505078a0
This diff is collapsed.
Click to expand it.
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/time/SchoolTimeTableServiceImpl.java
View file @
505078a0
...
...
@@ -30,6 +30,7 @@ import yangtz.cs.liu.campus.domain.time.*;
import
yangtz.cs.liu.campus.mapper.course.SchoolCourseMapper
;
import
yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMapper
;
import
yangtz.cs.liu.campus.mapper.schoolClass.SchoolClassMentorMapper
;
import
yangtz.cs.liu.campus.mapper.schoolgrade.SchoolGradeMapper
;
import
yangtz.cs.liu.campus.mapper.student.SchoolStudentMapper
;
import
yangtz.cs.liu.campus.mapper.student.SchoolStudentParentMapper
;
import
yangtz.cs.liu.campus.mapper.time.SchoolTimeDetailMapper
;
...
...
@@ -86,6 +87,9 @@ public class SchoolTimeTableServiceImpl extends ServiceImpl<SchoolTimeTableMappe
private
SchoolClassMentorMapper
classMentorMapper
;
@Autowired
private
SchoolGradeMapper
gradeMapper
;
@Autowired
private
ISchoolCurriculumService
schoolCurriculumService
;
public
static
final
String
USE
=
"1"
;
...
...
@@ -278,7 +282,9 @@ public class SchoolTimeTableServiceImpl extends ServiceImpl<SchoolTimeTableMappe
@Override
public
List
<
TableVO
>
getTeacherTable
(
Long
teacherId
){
//获取当前教师所授课班级(当前学年)
int
schoolYear
=
HolidayDateUtil
.
getSchoolYear
();
// int schoolYear = HolidayDateUtil.getSchoolYear();
// TODO 修改最新学年
int
schoolYear
=
gradeMapper
.
isNewSchoolYear
();
List
<
SchoolClassMentor
>
mentorList
=
classMentorMapper
.
getMentorByTeacherId
(
teacherId
,
schoolYear
);
if
(
isNull
(
mentorList
)){
return
new
ArrayList
<>();
...
...
@@ -331,6 +337,13 @@ public class SchoolTimeTableServiceImpl extends ServiceImpl<SchoolTimeTableMappe
//设置本节次星期一到星期日的课程
public
TableVO
setCourse
(
Long
teacherId
,
TableVO
vo
,
List
<
SchoolTimeTable
>
tableList
){
List
<
SchoolCourseVO
>
listMonday
=
new
ArrayList
<>();
List
<
SchoolCourseVO
>
listTuesday
=
new
ArrayList
<>();
List
<
SchoolCourseVO
>
listWednesday
=
new
ArrayList
<>();
List
<
SchoolCourseVO
>
listThursday
=
new
ArrayList
<>();
List
<
SchoolCourseVO
>
listFriday
=
new
ArrayList
<>();
List
<
SchoolCourseVO
>
listSaturday
=
new
ArrayList
<>();
List
<
SchoolCourseVO
>
listSunday
=
new
ArrayList
<>();
for
(
SchoolTimeTable
table
:
tableList
){
SchoolCourseVO
courseVO
=
new
SchoolCourseVO
();
courseVO
.
setId
(
table
.
getCourseId
());
...
...
@@ -345,20 +358,118 @@ public class SchoolTimeTableServiceImpl extends ServiceImpl<SchoolTimeTableMappe
switch
(
table
.
getWeekValue
()){
case
1
:
vo
.
setMonday
(
courseVO
);
break
;
// vo.setMonday(courseVO);break;
listMonday
.
add
(
courseVO
);
break
;
case
2
:
vo
.
setTuesday
(
courseVO
);
break
;
// vo.setTuesday(courseVO);break;
listTuesday
.
add
(
courseVO
);
break
;
case
3
:
vo
.
setWednesday
(
courseVO
);
break
;
// vo.setWednesday(courseVO);break;
listWednesday
.
add
(
courseVO
);
break
;
case
4
:
vo
.
setThursday
(
courseVO
);
break
;
// vo.setThursday(courseVO);break;
listThursday
.
add
(
courseVO
);
break
;
case
5
:
vo
.
setFriday
(
courseVO
);
break
;
// vo.setFriday(courseVO);break;
listFriday
.
add
(
courseVO
);
break
;
case
6
:
vo
.
setSaturday
(
courseVO
);
break
;
// vo.setSaturday(courseVO);break;
listSaturday
.
add
(
courseVO
);
break
;
case
7
:
vo
.
setSunday
(
courseVO
);
break
;
// vo.setSunday(courseVO);break;
listSunday
.
add
(
courseVO
);
break
;
}
}
if
(
listMonday
.
size
()
>
0
){
SchoolCourseVO
courseVO
=
new
SchoolCourseVO
();
String
courseName
=
""
;
for
(
int
i
=
0
;
i
<
listMonday
.
size
();
i
++)
{
if
(
i
==
listMonday
.
size
()
-
1
){
courseName
+=
listMonday
.
get
(
i
).
getCourseName
();
}
else
{
courseName
+=
listMonday
.
get
(
i
).
getCourseName
()
+
"、"
;
}
}
courseVO
.
setCourseName
(
courseName
);
vo
.
setMonday
(
courseVO
);
}
if
(
listTuesday
.
size
()
>
0
){
SchoolCourseVO
courseVO
=
new
SchoolCourseVO
();
String
courseName
=
""
;
for
(
int
i
=
0
;
i
<
listTuesday
.
size
();
i
++)
{
if
(
i
==
listTuesday
.
size
()
-
1
){
courseName
+=
listTuesday
.
get
(
i
).
getCourseName
();
}
else
{
courseName
+=
listTuesday
.
get
(
i
).
getCourseName
()
+
"、"
;
}
}
courseVO
.
setCourseName
(
courseName
);
vo
.
setTuesday
(
courseVO
);
}
if
(
listWednesday
.
size
()
>
0
){
SchoolCourseVO
courseVO
=
new
SchoolCourseVO
();
String
courseName
=
""
;
for
(
int
i
=
0
;
i
<
listWednesday
.
size
();
i
++)
{
if
(
i
==
listWednesday
.
size
()
-
1
){
courseName
+=
listWednesday
.
get
(
i
).
getCourseName
();
}
else
{
courseName
+=
listWednesday
.
get
(
i
).
getCourseName
()
+
"、"
;
}
}
courseVO
.
setCourseName
(
courseName
);
vo
.
setWednesday
(
courseVO
);
}
if
(
listThursday
.
size
()
>
0
){
SchoolCourseVO
courseVO
=
new
SchoolCourseVO
();
String
courseName
=
""
;
for
(
int
i
=
0
;
i
<
listThursday
.
size
();
i
++)
{
if
(
i
==
listThursday
.
size
()
-
1
){
courseName
+=
listThursday
.
get
(
i
).
getCourseName
();
}
else
{
courseName
+=
listThursday
.
get
(
i
).
getCourseName
()
+
"、"
;
}
}
courseVO
.
setCourseName
(
courseName
);
vo
.
setThursday
(
courseVO
);
}
if
(
listFriday
.
size
()
>
0
){
SchoolCourseVO
courseVO
=
new
SchoolCourseVO
();
String
courseName
=
""
;
for
(
int
i
=
0
;
i
<
listFriday
.
size
();
i
++)
{
if
(
i
==
listFriday
.
size
()
-
1
){
courseName
+=
listFriday
.
get
(
i
).
getCourseName
();
}
else
{
courseName
+=
listFriday
.
get
(
i
).
getCourseName
()
+
"、"
;
}
}
courseVO
.
setCourseName
(
courseName
);
vo
.
setFriday
(
courseVO
);
}
if
(
listSaturday
.
size
()
>
0
){
SchoolCourseVO
courseVO
=
new
SchoolCourseVO
();
String
courseName
=
""
;
for
(
int
i
=
0
;
i
<
listSaturday
.
size
();
i
++)
{
if
(
i
==
listSaturday
.
size
()
-
1
){
courseName
+=
listSaturday
.
get
(
i
).
getCourseName
();
}
else
{
courseName
+=
listSaturday
.
get
(
i
).
getCourseName
()
+
"、"
;
}
}
courseVO
.
setCourseName
(
courseName
);
vo
.
setSaturday
(
courseVO
);
}
if
(
listSunday
.
size
()
>
0
){
SchoolCourseVO
courseVO
=
new
SchoolCourseVO
();
String
courseName
=
""
;
for
(
int
i
=
0
;
i
<
listSunday
.
size
();
i
++)
{
if
(
i
==
listSunday
.
size
()
-
1
){
courseName
+=
listSunday
.
get
(
i
).
getCourseName
();
}
else
{
courseName
+=
listSunday
.
get
(
i
).
getCourseName
()
+
"、"
;
}
}
courseVO
.
setCourseName
(
courseName
);
vo
.
setSunday
(
courseVO
);
}
return
vo
;
}
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/schoolClass/ISchoolClassService.java
View file @
505078a0
...
...
@@ -3,15 +3,11 @@ package yangtz.cs.liu.campus.service.schoolClass;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
yangtz.cs.liu.campus.domain.schoolClass.SchoolClass
;
import
yangtz.cs.liu.campus.domain.schoolClass.SchoolClassMentor
;
import
yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade
;
import
yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor
;
import
yangtz.cs.liu.campus.vo.schoolClass.ClassBatchVo
;
import
yangtz.cs.liu.campus.vo.schoolClass.ClassTreeSelect
;
import
yangtz.cs.liu.campus.vo.schoolClass.SchoolClassDrVo
;
import
yangtz.cs.liu.campus.vo.schoolClass.SchoolClassMentorVo
;
import
yangtz.cs.liu.campus.vo.schoolgrade.GradeTreeSelect
;
import
yangtz.cs.liu.campus.vo.schoolgrade.SchoolGradeMentorVo
;
import
yangtz.cs.liu.wechat.vo.schoolClass.SchoolClassVo
;
import
yangtz.cs.liu.wechat.vo.schoolGrade.SchoolGradeVo
;
import
java.util.List
;
...
...
@@ -43,13 +39,21 @@ public interface ISchoolClassService extends IService<SchoolClass> {
List
<
SchoolClassVo
>
getTeacherClass
(
Long
teacherId
);
// /**
// * 校验
// * @param list
// */
// void checkImport(List<SchoolClass> list);
//
// String importExamDetail(List<SchoolClass> list);
/**
* 校验
* @param list
*/
void
checkImport
(
List
<
SchoolClass
>
list
);
void
checkImport
(
List
<
SchoolClass
DrVo
>
list
);
String
importExamDetail
(
List
<
SchoolClass
>
list
);
String
importExamDetail
(
List
<
SchoolClass
DrVo
>
list
);
/**
*
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/auditorium/SchoolAuditoriumVo.java
View file @
505078a0
...
...
@@ -51,19 +51,19 @@ public class SchoolAuditoriumVo extends ProcessBaseEntity {
private
String
duration
;
/** 是否彩排(1-是,0-否) */
@Excel
(
name
=
"是否彩排"
,
readConverterExp
=
"1=-是,0-
否"
)
@Excel
(
name
=
"是否彩排"
,
combo
=
{
"是"
,
"否"
},
readConverterExp
=
"1=是,0=
否"
)
private
String
isRehearsal
;
/** 是否录像(1-是,0-否) */
@Excel
(
name
=
"是否录像"
,
readConverterExp
=
"1=-是,0-
否"
)
@Excel
(
name
=
"是否录像"
,
combo
=
{
"是"
,
"否"
},
readConverterExp
=
"1=是,0=
否"
)
private
String
isVideo
;
/** 是否直播(1-是,0-否) */
@Excel
(
name
=
"是否直播"
,
readConverterExp
=
"1=-是,0-
否"
)
@Excel
(
name
=
"是否直播"
,
combo
=
{
"是"
,
"否"
},
readConverterExp
=
"1=是,0=
否"
)
private
String
isLive
;
/** 是否需要大屏(1-是,0-否) */
@Excel
(
name
=
"是否需要大屏"
,
readConverterExp
=
"1=-是,0-
否"
)
@Excel
(
name
=
"是否需要大屏"
,
combo
=
{
"是"
,
"否"
},
readConverterExp
=
"1=是,0=
否"
)
private
String
isBigScreen
;
/** 其他要求 */
...
...
@@ -79,7 +79,7 @@ public class SchoolAuditoriumVo extends ProcessBaseEntity {
private
String
leadershipName
;
/** 审核状态(0-未提交,1-审核中,2-审核通过,3-审核不通过) */
@Excel
(
name
=
"审核状态"
,
readConverterExp
=
"0=-未提交,1-审核中,2-审核通过,3-
审核不通过"
)
@Excel
(
name
=
"审核状态"
,
combo
=
{
"未提交"
,
"审核中"
,
"审核通过"
,
"审核不通过"
},
readConverterExp
=
"0=未提交,1=审核中,2=审核通过,3=
审核不通过"
)
private
String
state
;
/** 审批意见 */
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/purchase/PurchaseVo.java
View file @
505078a0
...
...
@@ -94,6 +94,7 @@ public class PurchaseVo extends OurBaseEntity {
/**
* 申请时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
applyTime
;
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/schoolClass/SchoolClassDrVo.java
0 → 100644
View file @
505078a0
This diff is collapsed.
Click to expand it.
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/student/SchoolStudentVO.java
View file @
505078a0
...
...
@@ -29,7 +29,7 @@ public class SchoolStudentVO {
private
String
idCard
;
/**性别**/
@Excel
(
name
=
"
*
学生性别"
,
combo
=
{
"男"
,
"女"
},
readConverterExp
=
"0=男,1=女"
)
@Excel
(
name
=
"学生性别"
,
combo
=
{
"男"
,
"女"
},
readConverterExp
=
"0=男,1=女"
)
@NotBlank
(
message
=
"学生性别不能为空"
)
private
String
sex
;
...
...
@@ -52,7 +52,7 @@ public class SchoolStudentVO {
/**出生日期**/
@NotNull
(
message
=
"出生日期不能为空"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"
*
出生日期"
,
dateFormat
=
"yyyy-MM-dd"
,
width
=
25
)
@Excel
(
name
=
"出生日期"
,
dateFormat
=
"yyyy-MM-dd"
,
width
=
25
)
private
Date
birthday
;
/**学生状态**/
...
...
smart-campus/src/main/resources/mapper/SchoolStudentIntegral/SchoolStudentIntegralMapper.xml
View file @
505078a0
...
...
@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"term != null "
>
and term = #{term}
</if>
<if
test=
"studentId != null "
>
and student_id = #{studentId}
</if>
</where>
order by
create_time
desc
order by
day
desc
</select>
<select
id=
"selectSchoolStudentIntegralById"
parameterType=
"Long"
resultMap=
"SchoolStudentIntegralResult"
>
...
...
smart-campus/src/main/resources/mapper/curricula/StudentScoreMapper.xml
View file @
505078a0
...
...
@@ -120,4 +120,140 @@
</foreach>
</update>
<update
id=
"updateScoreList"
parameterType=
"SchoolStudentScore"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
update school_student_score
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"data.studentId != null"
>
student_id = #{data.studentId},
</if>
<if
test=
"data.curriculaId != null"
>
curricula_id = #{data.curriculaId},
</if>
<if
test=
"data.classId != null"
>
class_id = #{data.classId},
</if>
<if
test=
"data.examType != null"
>
exam_type = #{data.examType},
</if>
<if
test=
"data.language != null"
>
`language` = #{data.language},
</if>
<if
test=
"data.math != null"
>
math = #{data.math},
</if>
<if
test=
"data.english != null"
>
english = #{data.english},
</if>
<if
test=
"data.politics != null"
>
politics = #{data.politics},
</if>
<if
test=
"data.geography != null"
>
geography = #{data.geography},
</if>
<if
test=
"data.history != null"
>
history = #{data.history},
</if>
<if
test=
"data.physics != null"
>
physics = #{data.physics},
</if>
<if
test=
"data.chemistry != null"
>
chemistry = #{data.chemistry},
</if>
<if
test=
"data.biology != null"
>
biology = #{data.biology},
</if>
</trim>
where id = #{data.id}
</foreach>
</update>
<insert
id=
"insertScoreList"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
insert into school_student_score
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.studentId != null"
>
student_id,
</if>
<if
test=
"data.curriculaId != null"
>
curricula_id,
</if>
<if
test=
"data.classId != null"
>
class_id,
</if>
<if
test=
"data.examType != null"
>
exam_type,
</if>
<if
test=
"data.language != null"
>
`language`,
</if>
<if
test=
"data.math != null"
>
math,
</if>
<if
test=
"data.english != null"
>
english,
</if>
<if
test=
"data.politics != null"
>
politics,
</if>
<if
test=
"data.geography != null"
>
geography,
</if>
<if
test=
"data.history != null"
>
history,
</if>
<if
test=
"data.physics != null"
>
physics,
</if>
<if
test=
"data.chemistry != null"
>
chemistry,
</if>
<if
test=
"data.biology != null"
>
biology,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.studentId != null"
>
#{data.studentId},
</if>
<if
test=
"data.curriculaId != null"
>
#{data.curriculaId},
</if>
<if
test=
"data.classId != null"
>
#{data.classId},
</if>
<if
test=
"data.examType != null"
>
#{data.examType},
</if>
<if
test=
"data.language != null"
>
#{data.language},
</if>
<if
test=
"data.math != null"
>
#{data.math},
</if>
<if
test=
"data.english != null"
>
#{data.english},
</if>
<if
test=
"data.politics != null"
>
#{data.politics},
</if>
<if
test=
"data.geography != null"
>
#{data.geography},
</if>
<if
test=
"data.history != null"
>
#{data.history},
</if>
<if
test=
"data.physics != null"
>
#{data.physics},
</if>
<if
test=
"data.chemistry != null"
>
#{data.chemistry},
</if>
<if
test=
"data.biology != null"
>
#{data.biology},
</if>
</trim>
</foreach>
</insert>
</mapper>
\ No newline at end of file
smart-campus/src/main/resources/mapper/student/SchoolStudentClassRelationMapper.xml
View file @
505078a0
...
...
@@ -9,4 +9,41 @@
left join school_class sc on cr.class_id = sc.id
where cr.student_id = #{studentId}
</select>
<update
id=
"updateRelationList"
parameterType=
"yangtz.cs.liu.campus.domain.student.SchoolStudentClassRelation"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
update school_student_class_relation
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"data.classId != null"
>
class_id = #{data.classId},
</if>
<if
test=
"data.studentId != null"
>
student_id = #{data.studentId},
</if>
</trim>
where id = #{data.id}
</foreach>
</update>
<insert
id=
"addRelationList"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
insert into school_student_class_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.classId != null"
>
class_id,
</if>
<if
test=
"data.studentId != null"
>
student_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.classId != null"
>
#{data.classId},
</if>
<if
test=
"data.studentId != null"
>
#{data.studentId},
</if>
</trim>
</foreach>
</insert>
</mapper>
smart-campus/src/main/resources/mapper/student/SchoolStudentMapper.xml
View file @
505078a0
...
...
@@ -296,4 +296,93 @@
</where>
</select>
<insert
id=
"inserStudentList"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
insert into school_student
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.classId != null"
>
class_id,
</if>
<if
test=
"data.studentName != null and data.studentName != ''"
>
student_name,
</if>
<if
test=
"data.sex != null and data.sex != ''"
>
sex,
</if>
<if
test=
"data.birthday != null"
>
birthday,
</if>
<if
test=
"data.nation != null and data.nation != ''"
>
nation,
</if>
<if
test=
"data.homeAddress != null and data.homeAddress != ''"
>
home_address,
</if>
<if
test=
"data.nativePlace != null and data.nativePlace != ''"
>
native_place,
</if>
<if
test=
"data.enrollmentTime != null"
>
enrollment_time,
</if>
<if
test=
"data.avatar != null and data.avatar != ''"
>
avatar,
</if>
<if
test=
"data.idCard != null and data.idCard != ''"
>
id_card,
</if>
<if
test=
"data.schoolNo != null and data.schoolNo != ''"
>
school_no,
</if>
<if
test=
"data.studentStatus != null and data.studentStatus != ''"
>
student_status,
</if>
<if
test=
"data.studentType != null and data.studentType != ''"
>
student_type,
</if>
<if
test=
"data.oneCard != null and data.oneCard != ''"
>
one_card,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.classId != null"
>
#{data.classId},
</if>
<if
test=
"data.studentName != null and data.studentName != ''"
>
#{data.studentName},
</if>
<if
test=
"data.sex != null and data.sex != ''"
>
#{data.sex},
</if>
<if
test=
"data.birthday != null"
>
#{data.birthday},
</if>
<if
test=
"data.nation != null and data.nation != ''"
>
#{data.nation},
</if>
<if
test=
"data.homeAddress != null and data.homeAddress != ''"
>
#{data.homeAddress},
</if>
<if
test=
"data.nativePlace != null and data.nativePlace != ''"
>
#{data.nativePlace},
</if>
<if
test=
"data.enrollmentTime != null"
>
#{data.enrollmentTime},
</if>
<if
test=
"data.avatar != null and data.avatar != ''"
>
#{data.avatar},
</if>
<if
test=
"data.idCard != null and data.idCard != ''"
>
#{data.idCard},
</if>
<if
test=
"data.schoolNo != null and data.schoolNo != ''"
>
#{data.schoolNo},
</if>
<if
test=
"data.studentStatus != null and data.studentStatus != ''"
>
#{data.studentStatus},
</if>
<if
test=
"data.studentType != null and data.studentType != ''"
>
#{data.studentType},
</if>
<if
test=
"data.oneCard != null and data.oneCard != ''"
>
#{data.oneCard},
</if>
</trim>
</foreach>
</insert>
<update
id=
"updateStudentList"
parameterType=
"yangtz.cs.liu.campus.domain.student.SchoolStudent"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
update school_student
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"data.classId != null"
>
class_id = #{data.classId},
</if>
<if
test=
"data.studentName != null and data.studentName != ''"
>
student_name = #{data.studentName},
</if>
<if
test=
"data.sex != null and data.sex != ''"
>
sex = #{data.sex},
</if>
<if
test=
"data.birthday != null"
>
birthday = #{data.birthday},
</if>
<if
test=
"data.nation != null and data.nation != ''"
>
nation = #{data.nation},
</if>
<if
test=
"data.homeAddress != null and data.homeAddress != ''"
>
home_address = #{data.homeAddress},
</if>
<if
test=
"data.nativePlace != null and data.nativePlace != ''"
>
native_place = #{data.nativePlace},
</if>
<if
test=
"data.enrollmentTime != null"
>
enrollment_time = #{data.enrollmentTime},
</if>
<if
test=
"data.avatar != null and data.avatar != ''"
>
avatar = #{data.avatar},
</if>
<if
test=
"data.idCard != null and data.idCard != ''"
>
id_card = #{data.idCard},
</if>
<if
test=
"data.schoolNo != null and data.schoolNo != ''"
>
school_no = #{data.schoolNo},
</if>
<if
test=
"data.studentStatus != null and data.studentStatus != ''"
>
student_status = #{data.studentStatus},
</if>
<if
test=
"data.studentType != null and data.studentType != ''"
>
student_type = #{data.studentType},
</if>
<if
test=
"data.oneCard != null and data.oneCard != ''"
>
one_card = #{data.oneCard},
</if>
</trim>
where id = #{data.id}
</foreach>
</update>
</mapper>
smart-campus/src/main/resources/mapper/student/SchoolStudentParentMapper.xml
View file @
505078a0
...
...
@@ -190,4 +190,85 @@
select open_id from school_student_parent where id = #{id} and del_flag = '0'
</select>
<update
id=
"updateParentList"
parameterType=
"yangtz.cs.liu.campus.domain.student.SchoolStudentParent"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
update school_student_parent
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"data.parentName != null and data.parentName != ''"
>
parent_name = #{data.parentName},
</if>
<if
test=
"data.relationship != null and data.relationship != ''"
>
relationship = #{data.relationship},
</if>
<if
test=
"data.workAddress != null and data.workAddress != ''"
>
work_address = #{data.workAddress},
</if>
<if
test=
"data.contactAddress != null and data.contactAddress != ''"
>
contact_address = #{data.contactAddress},
</if>
<if
test=
"data.postalCode != null and data.postalCode != ''"
>
postal_code = #{data.postalCode},
</if>
</trim>
where id = #{data.id}
</foreach>
</update>
<insert
id=
"addParentList"
useGeneratedKeys=
"true"
keyColumn=
"id"
keyProperty=
"id"
>
<foreach
collection=
"list"
item=
"data"
separator=
";"
>
insert into school_student_parent
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.studentId != null"
>
student_id,
</if>
<if
test=
"data.userId != null"
>
user_id,
</if>
<if
test=
"data.parentName != null and data.parentName != ''"
>
parent_name,
</if>
<if
test=
"data.telephone != null and data.telephone != ''"
>
postal_code,
</if>
<if
test=
"data.relationship != null and data.relationship != ''"
>
relationship,
</if>
<if
test=
"data.workAddress != null and data.workAddress != ''"
>
work_address,
</if>
<if
test=
"data.contactAddress != null and data.contactAddress != ''"
>
contact_address,
</if>
<if
test=
"data.postalCode != null and data.postalCode != ''"
>
postal_code,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"data.studentId != null"
>
#{data.studentId},
</if>
<if
test=
"data.userId != null"
>
#{data.userId},
</if>
<if
test=
"data.parentName != null and data.parentName != ''"
>
#{data.parentName},
</if>
<if
test=
"data.telephone != null and data.telephone != ''"
>
#{data.telephone},
</if>
<if
test=
"data.relationship != null and data.relationship != ''"
>
#{data.relationship},
</if>
<if
test=
"data.workAddress != null and data.workAddress != ''"
>
#{data.workAddress},
</if>
<if
test=
"data.contactAddress != null and data.contactAddress != ''"
>
#{data.contactAddress},
</if>
<if
test=
"data.postalCode != null and data.postalCode != ''"
>
#{data.postalCode},
</if>
</trim>
</foreach>
</insert>
</mapper>
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