parent
bfb5eb7beb
commit
8198da6fa5
@ -0,0 +1,33 @@
|
||||
package cn.teammodel.controller.admin.controller;
|
||||
|
||||
import cn.teammodel.common.R;
|
||||
import cn.teammodel.controller.admin.service.ExamService;
|
||||
import cn.teammodel.model.dto.admin.art.ArtFindDto;
|
||||
import cn.teammodel.model.dto.admin.exam.OverViewDto;
|
||||
import cn.teammodel.model.vo.admin.ArtElementsVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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 javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("admin/exam")
|
||||
@Api(tags = "管理员端-智育分析")
|
||||
public class ExamController {
|
||||
@Resource
|
||||
private ExamService examService;
|
||||
@PostMapping("getOverView")
|
||||
@ApiOperation("获取当前学校艺术评测列表")
|
||||
public R<Map<String, Object>> getOverView(@Valid @RequestBody OverViewDto overViewDto, HttpServletRequest request) {
|
||||
Map<String, Object> res = examService.getAnalysis(overViewDto,request);
|
||||
return R.success(res);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package cn.teammodel.controller.admin.service;
|
||||
|
||||
import cn.teammodel.model.dto.admin.exam.OverViewDto;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ExamService {
|
||||
Map<String,Object> getAnalysis(OverViewDto overViewDto, HttpServletRequest request);
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package cn.teammodel.controller.admin.service.impl;
|
||||
|
||||
import cn.teammodel.common.ErrorCode;
|
||||
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.utils.GroupUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class ExamServiceImpl implements ExamService {
|
||||
|
||||
@Autowired
|
||||
private Environment env;
|
||||
@Override
|
||||
public Map<String, Object> getAnalysis(OverViewDto overViewDto, HttpServletRequest request) {
|
||||
|
||||
Map<String, Object> overView;
|
||||
String url = env.getProperty("ies.server-url-overview");
|
||||
try {
|
||||
overView = GroupUtil.getGroupId(overViewDto,new GroupUtil(env), request,url);
|
||||
//List<RMember> rMembers = new ArrayList<>();
|
||||
/*for (Map.Entry<String, Object> entry : groupId.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
if (key.equals("groups")) {
|
||||
String jsonGroups = JSON.toJSONString(value);
|
||||
rGroupList = JSON.parseObject(jsonGroups, new TypeReference<List<RGroupList>>() {});
|
||||
}
|
||||
}*/
|
||||
}catch (Exception e) {
|
||||
throw new ServiceException(ErrorCode.SYSTEM_ERROR.getCode(), "数据转换错误");
|
||||
|
||||
}
|
||||
return overView;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.teammodel.model.dto.admin.art;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DataFileCommentDto {
|
||||
private String artId;
|
||||
private String schoolId;
|
||||
private String schoolCode;
|
||||
private String headLang;
|
||||
private String studentId;
|
||||
@ApiModelProperty(value = "自定义评语,不传或者传空字符串代表清空之前的")
|
||||
private String comment;
|
||||
@ApiModelProperty(value = "自定义评语音乐,不传或者传空字符串代表清空之前的")
|
||||
private String comment_music;
|
||||
@ApiModelProperty(value = "自定义评语美术,不传或者传空字符串代表清空之前的")
|
||||
private String comment_painting;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.teammodel.model.dto.admin.art;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DataFileDto {
|
||||
private String artId;
|
||||
private String schoolId;
|
||||
private String schoolCode;
|
||||
private String opt;
|
||||
private String headLang;
|
||||
List<String> studentIds;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package cn.teammodel.model.dto.admin.exam;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OverViewDto {
|
||||
@ApiModelProperty("指定学年")
|
||||
private int studyYear;
|
||||
private String semesterId;
|
||||
private String school;
|
||||
private String studentId;
|
||||
private String periodId;
|
||||
@ApiModelProperty("学生入学年")
|
||||
private int studentYear;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package cn.teammodel.model.vo.admin;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DataFileVo {
|
||||
public String blob;
|
||||
public String blobFullUrl;
|
||||
|
||||
}
|
Loading…
Reference in new issue