智慧教育模块结算,实体架构评论

develop
zhouj1203@hotmail.com 4 months ago
parent af0a9eb205
commit fd9909a5c4

@ -60,14 +60,33 @@ public class CommonServiceImpl implements CommonService {
} }
List<String> grades = period.get(0).getGrades(); List<String> grades = period.get(0).getGrades();
int index = 0; int index = 0;
//根据当前时间去判定各个年级的入学年
int time = 0;
if(period.get(0).getId().equalsIgnoreCase(gcDto.getPeriodId())) {
for (School.Semester semester : period.get(0).getSemesters()) {
if(semester.getStart() == 1) {
if (mon == semester.getMonth())
{
time = day >= semester.getDay() ? 0 : 1;
}
else
{
time = mon > semester.getMonth() ? 0 : 1;
}
}
}
}
for (String grade : grades) { for (String grade : grades) {
GradeAndClassVo gradeAndClassVo = new GradeAndClassVo(); GradeAndClassVo gradeAndClassVo = new GradeAndClassVo();
gradeAndClassVo.setGradeId(index); gradeAndClassVo.setGradeId(index);
gradeAndClassVo.setYear(year - time - index);
gradeAndClassVo.setGradeName(grade); gradeAndClassVo.setGradeName(grade);
classes.stream().filter(classInfo -> classInfo.getGrade() == gradeAndClassVo.getGradeId()).forEach(classInfo -> { classes.stream().filter(classInfo -> classInfo.getGrade() == gradeAndClassVo.getGradeId()).forEach(classInfo -> {
GradeAndClassVo.CI ci = new GradeAndClassVo.CI(); GradeAndClassVo.CI ci = new GradeAndClassVo.CI();
ci.setClassId(classInfo.getId()); ci.setClassId(classInfo.getId());
ci.setClassName(classInfo.getName()); ci.setClassName(classInfo.getName());
ci.setYear(classInfo.getYear());
gradeAndClassVo.AddClass(ci); gradeAndClassVo.AddClass(ci);
}); });
index ++; index ++;

@ -29,9 +29,13 @@ public class ExamServiceImpl implements ExamService {
public Map<String, Object> getAnalysis(OverViewDto overViewDto, HttpServletRequest request) { public Map<String, Object> getAnalysis(OverViewDto overViewDto, HttpServletRequest request) {
Map<String, Object> overView; Map<String, Object> overView;
Map<String, Object> examRate;
String url = env.getProperty("ies.server-url-overview"); String url = env.getProperty("ies.server-url-overview");
String url_exam = env.getProperty("ies.server-url-exam-rate");
try { try {
overView = GroupUtil.getGroupId(overViewDto,new GroupUtil(env), request,url); overView = GroupUtil.getGroupId(overViewDto,new GroupUtil(env), request,url);
examRate = GroupUtil.getGroupId(overViewDto,new GroupUtil(env), request,url_exam);
overView.putAll(examRate);
//获取所有考试数据 //获取所有考试数据
//List<Exam> exams = examRepository.findExamByClassId("Exam-"+overViewDto.getSchool(),overViewDto.getClassId(),overViewDto.getPeriodId()); //List<Exam> exams = examRepository.findExamByClassId("Exam-"+overViewDto.getSchool(),overViewDto.getClassId(),overViewDto.getPeriodId());

@ -0,0 +1,30 @@
package cn.teammodel.model.entity.common;
import cn.teammodel.model.entity.BaseItem;
import com.azure.spring.data.cosmos.core.mapping.Container;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Container(containerName = "Common")
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Comment extends BaseItem {
private String content;
private String creatorId;
private String creatorName;
private String school;
private String studentId;
private String activityId;
@ApiModelProperty("活动类型")
private String activityType;
@ApiModelProperty("评论类型")
private String contentType;
private String pk = "comment";
//private int ttl = -1;
private Long createTime;
private Long updateTime;
}

@ -7,6 +7,7 @@ import java.util.List;
@Data @Data
public class GradeAndClassVo { public class GradeAndClassVo {
private int year;
private int gradeId; private int gradeId;
private String gradeName; private String gradeName;
private List<CI> classes = new ArrayList<>(); private List<CI> classes = new ArrayList<>();
@ -19,5 +20,6 @@ public class GradeAndClassVo {
public static class CI { public static class CI {
private String classId; private String classId;
private String className; private String className;
private int year;
} }
} }

@ -73,3 +73,4 @@ ies:
server-url-pdf-data: /school/art/get-pdf-data server-url-pdf-data: /school/art/get-pdf-data
server-url-update-custom-comment: /school/art/update-custom-comment server-url-update-custom-comment: /school/art/update-custom-comment
server-url-overview: /overall-education/overview server-url-overview: /overall-education/overview
server-url-exam-rate: /common/exam/get-exam-point
Loading…
Cancel
Save