diff --git a/src/main/java/cn/teammodel/controller/admin/controller/ArtController.java b/src/main/java/cn/teammodel/controller/admin/controller/ArtController.java index 0703623..76ba5a2 100644 --- a/src/main/java/cn/teammodel/controller/admin/controller/ArtController.java +++ b/src/main/java/cn/teammodel/controller/admin/controller/ArtController.java @@ -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 res = ArtService.updateComment(dataFileCommentDto,request); return R.success(res); } + @PostMapping("artAnalysis") + @ApiOperation("艺术评测校级看板分析") + public R> getArtAnalysis(@Valid @RequestBody ArtAnalysisDto artAnalysisDto, HttpServletRequest request) { + Map res = ArtService.getArtAnalytics(artAnalysisDto,request); + return R.success(res); + } } diff --git a/src/main/java/cn/teammodel/controller/admin/service/ArtService.java b/src/main/java/cn/teammodel/controller/admin/service/ArtService.java index 8385a08..b8315c4 100644 --- a/src/main/java/cn/teammodel/controller/admin/service/ArtService.java +++ b/src/main/java/cn/teammodel/controller/admin/service/ArtService.java @@ -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 getArtList(ArtFindDto artFindDto, HttpServletRequest request); List getGroupList(GroupDto groupDto, HttpServletRequest request); List getPdfData(DataFileDto dataFileDto,HttpServletRequest request); List updateComment(DataFileCommentDto dataFileCommentDto, HttpServletRequest request); + Map getArtAnalytics(ArtAnalysisDto artAnalysisDto, HttpServletRequest request); } diff --git a/src/main/java/cn/teammodel/controller/admin/service/impl/ArtServiceImpl.java b/src/main/java/cn/teammodel/controller/admin/service/impl/ArtServiceImpl.java index a0af0e2..d31dd58 100644 --- a/src/main/java/cn/teammodel/controller/admin/service/impl/ArtServiceImpl.java +++ b/src/main/java/cn/teammodel/controller/admin/service/impl/ArtServiceImpl.java @@ -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 getArtAnalytics(ArtAnalysisDto artAnalysisDto, HttpServletRequest request) { + Map 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; + } } diff --git a/src/main/java/cn/teammodel/model/dto/admin/art/ArtAnalysisDto.java b/src/main/java/cn/teammodel/model/dto/admin/art/ArtAnalysisDto.java new file mode 100644 index 0000000..a6d5105 --- /dev/null +++ b/src/main/java/cn/teammodel/model/dto/admin/art/ArtAnalysisDto.java @@ -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 classIds; + + +} diff --git a/src/main/java/cn/teammodel/model/vo/admin/ArtElementsVo.java b/src/main/java/cn/teammodel/model/vo/admin/ArtElementsVo.java index d7cf3e8..db23b17 100644 --- a/src/main/java/cn/teammodel/model/vo/admin/ArtElementsVo.java +++ b/src/main/java/cn/teammodel/model/vo/admin/ArtElementsVo.java @@ -21,6 +21,7 @@ public class ArtElementsVo { public List classesInfos = new ArrayList<>(); public int count; public String progress; + public List 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 path ; + public List 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 ; + + } } diff --git a/src/main/java/cn/teammodel/repository/ArtRepository.java b/src/main/java/cn/teammodel/repository/ArtRepository.java index 018ac01..072f9af 100644 --- a/src/main/java/cn/teammodel/repository/ArtRepository.java +++ b/src/main/java/cn/teammodel/repository/ArtRepository.java @@ -14,7 +14,7 @@ public interface ArtRepository extends CosmosRepository { /** * 动态投影, 查询还是要将所有的值查出来,类的动态查询不能嵌套 */ - @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 findPeriodById(@Param("periodId")String periodId, @Param("code")String code); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index fd0b32c..7a4f9db 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -73,4 +73,5 @@ ies: server-url-pdf-data: /school/art/get-pdf-data 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 \ No newline at end of file + server-url-exam-rate: /common/exam/get-exam-point + server-url-art-analysis: /analysis/art/statistics \ No newline at end of file