فهرست منبع

1、修复评价结果查询被评对象为空bug
2、修复教师获奖统计导出bug

dzx 1 هفته پیش
والد
کامیت
dfc3e6eb78

+ 5 - 5
src/main/java/com/xjrsoft/module/teacher/controller/TeacherAwardController.java

@@ -101,13 +101,11 @@ public class TeacherAwardController {
         return RT.ok(pageOutput);
     }
 
-    @PostMapping(value = "/export-query")
+    @GetMapping(value = "/export-query")
     @ApiOperation(value="导出")
     @SaCheckPermission("teacheraward:detail")
-    public ResponseEntity<byte[]> exportQuery(@Valid @RequestBody TeacherAwardStatisticsPageDto dto){
+    public ResponseEntity<byte[]> exportQuery(TeacherAwardStatisticsPageDto dto){
         List<TeacherAwardStatisticsPageVo> list = teacherAwardItemService.getStatisticsList(dto);
-        Map<Long, String> userMap = list.stream().collect(Collectors.toMap(TeacherAwardStatisticsPageVo::getId, TeacherAwardStatisticsPageVo::getName));
-
 
         List<Long> userIds = list.stream().map(TeacherAwardStatisticsPageVo::getId).collect(Collectors.toList());
         TeacherAwardFileListDto listDto = new TeacherAwardFileListDto();
@@ -120,7 +118,9 @@ public class TeacherAwardController {
 
         for (TeacherAwardStatisticsPageVo el : list) {
             List<TeacherAwardFileListVo> fileList = filesMap.get(el.getId());
-
+            if(fileList == null){
+                continue;
+            }
             for (int i = 0; i < fileList.size(); i++) {
                 try {
                     URL url = new URL(fileList.get(i).getFileUrl());

+ 1 - 1
src/main/resources/mapper/teacher/TeacherAwardItemMapper.xml

@@ -55,7 +55,7 @@
     </select>
 
     <select id="getAwardFileList" parameterType="com.xjrsoft.module.teacher.dto.TeacherAwardFileListDto" resultType="com.xjrsoft.module.teacher.vo.TeacherAwardFileListVo">
-        SELECT t1.applicant_user_id,t3.file_name,t3.filt_type,t3.file_url FROM teacher_award t1
+        SELECT t1.applicant_user_id,t3.file_name,t3.file_type,t3.file_url FROM teacher_award t1
         INNER JOIN xjr_workflow_form_relation t2 ON t1.id = t2.form_key_value
         INNER JOIN xjr_file t3 ON t1.file_id = t3.folder_id
         WHERE t1.delete_mark = 0 AND t2.current_state = 'COMPLETED'