艺术看板相关内容

develop
zhouj1203@hotmail.com 4 months ago
parent aeb6b5d17e
commit 4f2ea3d672

@ -2,6 +2,7 @@ package cn.teammodel.controller.admin.controller;
import cn.teammodel.common.R;
import cn.teammodel.controller.admin.service.ArtService;
import cn.teammodel.model.dto.admin.art.ArtAnalysisDto;
import cn.teammodel.model.dto.admin.art.ArtFindDto;
import cn.teammodel.model.dto.admin.art.DataFileCommentDto;
import cn.teammodel.model.dto.admin.art.DataFileDto;
@ -17,6 +18,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("admin/art")
@ -50,5 +52,11 @@ public class ArtController {
List<DataFileVo> res = ArtService.updateComment(dataFileCommentDto,request);
return R.success(res);
}
@PostMapping("artAnalysis")
@ApiOperation("艺术评测校级看板分析")
public R<Map<String,Object>> getArtAnalysis(@Valid @RequestBody ArtAnalysisDto artAnalysisDto, HttpServletRequest request) {
Map<String, Object> res = ArtService.getArtAnalytics(artAnalysisDto,request);
return R.success(res);
}
}

@ -1,5 +1,6 @@
package cn.teammodel.controller.admin.service;
import cn.teammodel.model.dto.admin.art.ArtAnalysisDto;
import cn.teammodel.model.dto.admin.art.ArtFindDto;
import cn.teammodel.model.dto.admin.art.DataFileCommentDto;
import cn.teammodel.model.dto.admin.art.DataFileDto;
@ -10,10 +11,12 @@ import cn.teammodel.model.vo.admin.DataFileVo;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
public interface ArtService {
List<ArtElementsVo> getArtList(ArtFindDto artFindDto, HttpServletRequest request);
List<RGroupList> getGroupList(GroupDto groupDto, HttpServletRequest request);
List<DataFileVo> getPdfData(DataFileDto dataFileDto,HttpServletRequest request);
List<DataFileVo> updateComment(DataFileCommentDto dataFileCommentDto, HttpServletRequest request);
Map<String,Object> getArtAnalytics(ArtAnalysisDto artAnalysisDto, HttpServletRequest request);
}

@ -3,6 +3,7 @@ package cn.teammodel.controller.admin.service.impl;
import cn.teammodel.common.ErrorCode;
import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.controller.admin.service.ArtService;
import cn.teammodel.model.dto.admin.art.ArtAnalysisDto;
import cn.teammodel.model.dto.admin.art.ArtFindDto;
import cn.teammodel.model.dto.admin.art.DataFileCommentDto;
import cn.teammodel.model.dto.admin.art.DataFileDto;
@ -151,4 +152,17 @@ public class ArtServiceImpl implements ArtService {
}
return dataFile;
}
@Override
public Map<String, Object> getArtAnalytics(ArtAnalysisDto artAnalysisDto, HttpServletRequest request) {
Map<String, Object> analysis;
String url = env.getProperty("ies.server-url-art-analysis");
try {
analysis = GroupUtil.getGroupId(artAnalysisDto,new GroupUtil(env), request,url);
}catch (Exception e) {
throw new ServiceException(ErrorCode.SYSTEM_ERROR.getCode(), "数据转换错误");
}
return analysis;
}
}

@ -0,0 +1,26 @@
package cn.teammodel.model.dto.admin.art;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class ArtAnalysisDto {
@ApiModelProperty("艺术活动唯一ID")
public String id;
@ApiModelProperty("科目ID 针对艺术评测 ID如下 subject_music 为音乐 subject_painting为美术")
public String subjectId;
@ApiModelProperty("学校编码")
public String code;
@ApiModelProperty("学段ID")
public String periodId;
@ApiModelProperty("区域ID 为了获取当前学校所在区域 配置内容")
public String areaId;
@ApiModelProperty("艺术评测下的评测id 可根据回传的settings里面指标quota_21获取子对象的acId")
public String examId;
@ApiModelProperty("班级ID集合为了查询效率减少数据回传过大的问题目前设计了几种方式查询年级 则传该年级所有班级ID集合此方式下不会返回学生数据查指定班级则传对应班级ID即可")
List<String> classIds;
}

@ -21,6 +21,7 @@ public class ArtElementsVo {
public List<ClassInfos> classesInfos = new ArrayList<>();
public int count;
public String progress;
public List<Tasks> settings;
public void addClassesInfos(ClassInfos classInfos) {
this.classesInfos.add(classInfos);
@ -31,4 +32,23 @@ public class ArtElementsVo {
public String id;
public String name;
}
@Data
public static class Tasks {
public String id ;
public String quotaname ;
public List<String> path ;
public List<Acs> task;
}
@Data
public static class Acs {
public String infoId ;
public String acId ;
public String name ;
public String subject ;
public int isOrder = 0;
public int type = 0;
public String workDesc ;
public long workEnd ;
}
}

@ -14,7 +14,7 @@ public interface ArtRepository extends CosmosRepository<Art, String> {
/**
* , ,
*/
@Query("select s.id,s.name,s.classes,s.startTime,s.endTime,s.subjects,s.progress from Art as s where s.period.id = @periodId and s.code = @code")
@Query("select s.id,s.name,s.classes,s.startTime,s.endTime,s.subjects,s.progress,s.settings from Art as s where s.period.id = @periodId and s.code = @code")
List<ArtElementsVo> findPeriodById(@Param("periodId")String periodId, @Param("code")String code);

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