Jelajahi Sumber

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

wangliang 2 tahun lalu
induk
melakukan
adcc88db09

+ 32 - 10
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamQueryDto.java

@@ -46,10 +46,10 @@ public class TEExamQueryDto implements Serializable {
 
     @ApiModelProperty(name = "算分进度")
     private Double progress;//算分进度
-    
+
     @ApiModelProperty(name = "算分状态")
     private String scoreStatus;//算分状态
-    
+
     @ApiModelProperty(name = "更新时间")
     private Long updateTime;//更新时间
 
@@ -71,9 +71,31 @@ 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;
     }
@@ -210,13 +232,13 @@ public class TEExamQueryDto implements Serializable {
         this.updateName = updateName;
     }
 
-	public String getScoreStatus() {
-		return scoreStatus;
-	}
+    public String getScoreStatus() {
+        return scoreStatus;
+    }
+
+    public void setScoreStatus(String scoreStatus) {
+        this.scoreStatus = scoreStatus;
+    }
+
 
-	public void setScoreStatus(String scoreStatus) {
-		this.scoreStatus = scoreStatus;
-	}
-    
-    
 }

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

@@ -44,6 +44,7 @@ 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;
@@ -136,7 +137,18 @@ 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) {
-        return teExamMapper.examQuery(iPage, userId, id, code, name, mode, enable, orgId, type, 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;
     }
 
     /**