Explorar o código

Merge branch 'dev_v1.2.2' into release_v1.2.2
merge

wangliang %!s(int64=2) %!d(string=hai) anos
pai
achega
4a992b713f

+ 0 - 22
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamQueryDto.java

@@ -71,31 +71,9 @@ public class TEExamQueryDto implements Serializable {
     @ApiModelProperty(name = "考场名称")
     private String roomName;
 
-    @ApiModelProperty(name = "考场代码数组")
-    private List<String> roomCodeList;
-
-    @ApiModelProperty(name = "考场名称数组")
-    private List<String> roomNameList;
-
     @ApiModelProperty(name = "监考状态,NOT_START:未开始,START:监考中,FINISHED:已结束")
     private String monitorStatus;
 
-    public List<String> getRoomCodeList() {
-        return roomCodeList;
-    }
-
-    public void setRoomCodeList(List<String> roomCodeList) {
-        this.roomCodeList = roomCodeList;
-    }
-
-    public List<String> getRoomNameList() {
-        return roomNameList;
-    }
-
-    public void setRoomNameList(List<String> roomNameList) {
-        this.roomNameList = roomNameList;
-    }
-
     public String getMonitorRecord() {
         return monitorRecord;
     }

+ 1 - 13
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamServiceImpl.java

@@ -44,7 +44,6 @@ import org.springframework.cache.annotation.CachePut;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
@@ -137,18 +136,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
     @Override
     public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long userId, Long id, String code, String name,
                                            String mode, Integer enable, Long orgId, String type, Boolean finished) {
-        IPage<TEExamQueryDto> teExamQueryDtoIPage = teExamMapper.examQuery(iPage, userId, id, code, name, mode, enable, orgId, type, finished);
-        if (Objects.nonNull(teExamQueryDtoIPage) && !CollectionUtils.isEmpty(teExamQueryDtoIPage.getRecords())) {
-            for (TEExamQueryDto t : teExamQueryDtoIPage.getRecords()) {
-                if (Objects.nonNull(t.getRoomCode())) {
-                    t.setRoomCodeList(Arrays.asList(t.getRoomCode().split(",")));
-                }
-                if (Objects.nonNull(t.getRoomName())) {
-                    t.setRoomNameList(Arrays.asList(t.getRoomName().split(",")));
-                }
-            }
-        }
-        return teExamQueryDtoIPage;
+        return teExamMapper.examQuery(iPage, userId, id, code, name, mode, enable, orgId, type, finished);
     }
 
     /**

+ 3 - 3
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -48,8 +48,8 @@
         t.monitorRecord,
         t.monitorStatus
         <if test="type != null and type != '' and type == 'monitor'">
-            ,group_concat(distinct tbeiu.room_code) as roomCode,
-            group_concat(distinct tbeiu.room_name) as roomName
+            ,group_concat(distinct tees.room_code) as roomCode,
+            group_concat(distinct tees.room_name) as roomName
         </if>
         from
         (select t.id,
@@ -124,7 +124,7 @@
         </where>
         ) t
         <if test="type != null and type != '' and type == 'monitor'">
-            left join t_b_exam_invigilate_user tbeiu on tbeiu.exam_id = t.id and tbeiu.user_id = #{userId} and tbeiu.org_id = #{orgId}
+            left join t_e_exam_student tees on tees.exam_id = t.id
         </if>
         group by t.id,
         t.code,