调整参数

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

@ -5,6 +5,8 @@ import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.controller.admin.service.ExamService;
import cn.teammodel.model.dto.admin.common.RGroupList;
import cn.teammodel.model.dto.admin.exam.OverViewDto;
import cn.teammodel.model.entity.common.Exam;
import cn.teammodel.repository.ExamRepository;
import cn.teammodel.utils.GroupUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
@ -12,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
@ -20,6 +23,8 @@ public class ExamServiceImpl implements ExamService {
@Autowired
private Environment env;
@Resource
private ExamRepository examRepository;
@Override
public Map<String, Object> getAnalysis(OverViewDto overViewDto, HttpServletRequest request) {
@ -27,6 +32,9 @@ public class ExamServiceImpl implements ExamService {
String url = env.getProperty("ies.server-url-overview");
try {
overView = GroupUtil.getGroupId(overViewDto,new GroupUtil(env), request,url);
//获取所有考试数据
//List<Exam> exams = examRepository.findExamByClassId("Exam-"+overViewDto.getSchool(),overViewDto.getClassId(),overViewDto.getPeriodId());
//List<RMember> rMembers = new ArrayList<>();
/*for (Map.Entry<String, Object> entry : groupId.entrySet()) {
String key = entry.getKey();

@ -3,6 +3,8 @@ package cn.teammodel.model.dto.admin.exam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class OverViewDto {
@ApiModelProperty("指定学年")
@ -13,4 +15,7 @@ public class OverViewDto {
private String periodId;
@ApiModelProperty("学生入学年")
private int studentYear;
private List<String> classIds;
private Long startTime;
private Long endTime;
}

@ -0,0 +1,197 @@
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 lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Container(containerName = "Common")
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Exam extends BaseItem {
public String owner;
public String name;
public String school;
public String creatorId;
public int stuCount;
/* //实际考试人数
public int realCount;
//平均分
public double piont;*/
//指标
//public double index;
public long createTime;
public long updateTime;
//public String examCode;
/// <summary>
/// 施测起始时间
/// </summary>
public long startTime;
/// <summary>
/// 施测结束时间
/// </summary>
public long endTime;
/// <summary>
/// 施测对象
/// </summary>
// public List<String> target;
/// <summary>
/// 发布
/// </summary>
//public String publish;
public int year;
//public String range;
/// <summary>
/// 评测类型
/// </summary>
public String source;
/// <summary>
/// 書面問答類型 0:書面問答 1:紙本測驗 2:艺术评测3:多分同步活动
/// </summary>
public int qamode;
/// <summary>
///class行政班/teach教学班
/// </summary>
//public String classType;
public List<String> classes;
public List<String> stuLists;
public List<PaperSimple> papers;
///考试类型 段考 stage 联考 union 平常考 normal 其他 other
/// </summary>
public String type;
public PeriodSimple period;
public List<Grade> grades;
public List<ExamSubject> subjects;
//public Condition conditions;
//public List<String> blobUrl;
public String progress;
public String scope;
public Custom examType;
/// <summary>
/// 所有试卷阅卷状态
/// </summary>
//public List<int> marks;
/// <summary>
/// TTL删除改变状态使用
/// </summary>
public int status;
public double average;
//得分率
public double sRate;
//缺考率
public double qRate;
//缺考人数
public List<String> lostStu;
public double standard;
//记录该评测内容下blob大小
public long size;
//进线比列
public int income;
//踩线比列
public int touch;
public int publish;
//评分状态0未评分1已评分
public int sStatus;
public int isCompletion;
//结束后账户统计
public List<FMember> staffIds;
//是否啟動cloudas計算 true:啟動
public boolean cloudas;
//統測ID [測試中]
public String jointExamId;
public String moofenCode;
//不可重複作答
public boolean overwriteDisable;
@Data
public static class Custom {
public String id ;
public String name ;
}
@Data
public static class ExamSubject
{
public String id ;
public String name ;
public int classCount ;
}
@Data
public static class PaperSimple {
public String id ;
public String subjectId ;
public String code ;
//标记试卷来源学段
public String periodId ;
public String name ;
public String blob ;
public String scope ;
public int multipleRule ;
//该试卷配分情况
public List<Double> point ;
public List<List<String>> answers ;
public List<List<String>> knowledge ;
//题目类型
public List<String> type ;
public List<Integer> field ;
public String sheet ;
public String sheetNo ;
public String mode ;
//记录试卷作答时间
public int time ;
}
@Data
public static class PeriodSimple
{
public String id ;
public String name ;
}
@Data
public static class Grade
{
public String id ;
public String name ;
}
@Data
public static class FMember
{
/// <summary>
/// 账号id
/// </summary>
public String id ;
/// <summary>
/// 所在学校的学校id
/// </summary>
public String code ;
/// <summary>
/// 账户类型
/// </summary>
public int type ;
/// <summary>
/// 分组id
/// </summary>
public String groupId ;
/// <summary>
/// 分组名称
/// </summary>
public String groupName ;
}
}

@ -9,10 +9,6 @@ import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author winter
* @create 2023-11-28 17:39
*/
@Repository
public interface ArtRepository extends CosmosRepository<Art, String> {
/**

@ -0,0 +1,17 @@
package cn.teammodel.repository;
import cn.teammodel.model.entity.common.Exam;
import cn.teammodel.model.vo.admin.ArtElementsVo;
import com.azure.spring.data.cosmos.repository.CosmosRepository;
import com.azure.spring.data.cosmos.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface ExamRepository extends CosmosRepository<Exam, String> {
@Query("select * from Exam as s where s.code = @code and array_contains(s.classes,@classId) and s.period.id = @periodId and s.progress = 'finish' order by s.createTime ")
List<Exam> findExamByClassId(@Param("code")String code, @Param("classId")String classId, @Param("periodId")String periodId);
}
Loading…
Cancel
Save