|
|
@@ -2,6 +2,7 @@ package com.xjrsoft.module.student.service.impl;
|
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
import com.alibaba.excel.ExcelWriter;
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum;
|
|
|
@@ -139,11 +140,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
result.setClassList(baseStudentAssessmentClassListVos);
|
|
|
|
|
|
// 获取学生信息
|
|
|
- List<BaseStudentAssessmentStudentRelation> baseStudentAssessmentStudentRelations = assessmentStudentRelationMapper.selectList(
|
|
|
- Wrappers.<BaseStudentAssessmentStudentRelation>query().lambda()
|
|
|
- .eq(BaseStudentAssessmentStudentRelation::getBaseStudentAssessmentInspectionId, result.getId())
|
|
|
- );
|
|
|
- result.setStudentList(baseStudentAssessmentStudentRelations);
|
|
|
+ result.setStudentList(assessmentInspectionMapper.getStudentListByInspectionId(id));
|
|
|
|
|
|
// 获取文件列表
|
|
|
result.setFileInfos(fileService.list(Wrappers.<File>query().lambda().eq(File::getFolderId, result.getFileId())));
|
|
|
@@ -496,14 +493,11 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
//获取考核记录
|
|
|
BaseStudentAssessmentInspection baseStudentAssessmentInspection = this.getById(id);
|
|
|
if(baseStudentAssessmentInspection != null){
|
|
|
- //同步数据到考核关联班级表
|
|
|
- if(baseStudentAssessmentInspection.getAssessmentType() != null
|
|
|
- && baseStudentAssessmentInspection.getAssessmentType().equals("class")
|
|
|
- && baseStudentAssessmentInspection.getClassIds() != null
|
|
|
- && !baseStudentAssessmentInspection.getClassIds().equals("")){
|
|
|
+ if(StrUtil.isNotEmpty(baseStudentAssessmentInspection.getClassIds())) {
|
|
|
+ //同步数据到考核关联班级表
|
|
|
String[] classIds = baseStudentAssessmentInspection.getClassIds().split(",");
|
|
|
- for (String classId: classIds) {
|
|
|
- assessmentClassRelationMapper.insert(new BaseStudentAssessmentClassRelation(){{
|
|
|
+ for (String classId : classIds) {
|
|
|
+ assessmentClassRelationMapper.insert(new BaseStudentAssessmentClassRelation() {{
|
|
|
setClassId(Long.parseLong(classId));
|
|
|
setBaseStudentAssessmentInspectionId(baseStudentAssessmentInspection.getId());
|
|
|
QueryWrapper<BaseStudentAssessmentClassRelation> queryWrapperSortcode = new QueryWrapper<>();
|
|
|
@@ -514,11 +508,8 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
}
|
|
|
}
|
|
|
//同步数据到考核关联学生表
|
|
|
- if(baseStudentAssessmentInspection.getAssessmentType() != null
|
|
|
- && baseStudentAssessmentInspection.getAssessmentType().equals("personal")
|
|
|
- && baseStudentAssessmentInspection.getStudentUserIds() != null
|
|
|
- && !baseStudentAssessmentInspection.getStudentUserIds().equals("")){
|
|
|
- String[] studentIds = baseStudentAssessmentInspection.getStudentUserIds().split(",");
|
|
|
+ if(StrUtil.isNotEmpty(baseStudentAssessmentInspection.getPersonalStudentUserIds())){
|
|
|
+ String[] studentIds = baseStudentAssessmentInspection.getPersonalStudentUserIds().split(",");
|
|
|
for (String studentId: studentIds) {
|
|
|
assessmentStudentRelationMapper.insert(new BaseStudentAssessmentStudentRelation(){{
|
|
|
MPJLambdaWrapper<BaseStudentSchoolRoll> baseStudentSchoolRollMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
@@ -571,7 +562,7 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
data.put("const3", new JSONObject() {{
|
|
|
put("value", AssessmentTypeEnum.PERSONAL.getValue());
|
|
|
}});
|
|
|
- String[] studentUsers = inspection.getStudentUserIds().split(",");
|
|
|
+ String[] studentUsers = inspection.getPersonalStudentUserIds().split(",");
|
|
|
List<String> studentIds = new ArrayList<>();
|
|
|
for (String studentUser : studentUsers) {
|
|
|
studentIds.add(studentUser.trim());
|