|
@@ -14,7 +14,6 @@ import com.keao.edu.im.api.client.ImFeignService;
|
|
|
import com.keao.edu.im.api.entity.MemberChangedMessage;
|
|
|
import com.keao.edu.im.api.entity.PublishMessageDto;
|
|
|
import com.keao.edu.im.api.entity.ReqUserData;
|
|
|
-import com.keao.edu.thirdparty.message.MessageSenderPlugin;
|
|
|
import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
|
|
|
import com.keao.edu.user.api.entity.ExamRoom;
|
|
|
import com.keao.edu.user.api.entity.ExamRoomStudentRelation;
|
|
@@ -26,7 +25,10 @@ import com.keao.edu.user.dto.RoomStudentListDto;
|
|
|
import com.keao.edu.user.dto.StuRecordDetailDto;
|
|
|
import com.keao.edu.user.entity.*;
|
|
|
import com.keao.edu.user.page.ExamRoomStudentRelationQueryInfo;
|
|
|
-import com.keao.edu.user.service.*;
|
|
|
+import com.keao.edu.user.service.ExamCertificationService;
|
|
|
+import com.keao.edu.user.service.ExamRoomStudentRelationService;
|
|
|
+import com.keao.edu.user.service.ExamTeacherSalaryService;
|
|
|
+import com.keao.edu.user.service.OrganizationService;
|
|
|
import com.keao.edu.util.collection.MapUtil;
|
|
|
import com.keao.edu.util.date.DateUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -308,6 +310,17 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
nextStudent(roomStudentListDto1.getExamRoomStudentRelationId(),false,sysUser.getId());
|
|
|
}
|
|
|
}
|
|
|
+ //当等待人数到指定数值时,推送准备考试消息
|
|
|
+ int actionExamPush = Integer.parseInt(sysConfigDao.findConfigValue("action_exam_push"));
|
|
|
+ if(actionExamPush != 0 && roomStudentListDtos.size() > actionExamPush){
|
|
|
+ RoomStudentListDto studentListDto = roomStudentListDtos.get(actionExamPush - 1);
|
|
|
+ if(studentListDto.getFinishedExam() == 3){
|
|
|
+ HashMap<Integer, String> map = new HashMap<>();
|
|
|
+ map.put(studentListDto.getStudentId(),studentListDto.getStudentId().toString());
|
|
|
+ String url = "3?examRegistrationId=" + studentListDto.getExamRegistrationId();
|
|
|
+ sysMessageService.batchSendMessage(MessageTypeEnum.EXAM_WILL_START_PUSH,map,null,null,url, JiguangPushPlugin.PLUGIN_NAME);
|
|
|
+ }
|
|
|
+ }
|
|
|
//将当前学员退踢出教室
|
|
|
// imFeignService.kickRoom(new ReqUserData(examRoomStudentRelation.getExamRegistrationId(),roomStudentListDto.getStudentId().toString()));
|
|
|
}
|
|
@@ -452,12 +465,14 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
}
|
|
|
//当等待人数到指定数值时,推送准备考试消息
|
|
|
int actionExamPush = Integer.parseInt(sysConfigDao.findConfigValue("action_exam_push"));
|
|
|
- if(roomStudentListDtos.size() > actionExamPush){
|
|
|
+ if(actionExamPush != 0 && roomStudentListDtos.size() > actionExamPush){
|
|
|
RoomStudentListDto studentListDto = roomStudentListDtos.get(actionExamPush - 1);
|
|
|
- HashMap<Integer, String> map = new HashMap<>();
|
|
|
- map.put(studentListDto.getStudentId(),studentListDto.getStudentId().toString());
|
|
|
- String url = "3?examRegistrationId=" + studentListDto.getExamRegistrationId();
|
|
|
- sysMessageService.batchSendMessage(MessageTypeEnum.EXAM_WILL_START_PUSH,map,null,null,url, JiguangPushPlugin.PLUGIN_NAME);
|
|
|
+ if(studentListDto.getFinishedExam() == 3){
|
|
|
+ HashMap<Integer, String> map = new HashMap<>();
|
|
|
+ map.put(studentListDto.getStudentId(),studentListDto.getStudentId().toString());
|
|
|
+ String url = "3?examRegistrationId=" + studentListDto.getExamRegistrationId();
|
|
|
+ sysMessageService.batchSendMessage(MessageTypeEnum.EXAM_WILL_START_PUSH,map,null,null,url, JiguangPushPlugin.PLUGIN_NAME);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -488,6 +503,10 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
//开启学员房间入口
|
|
|
examRoomStudentRelation.setClassroomSwitch(1);
|
|
|
examRoomStudentRelationDao.update(examRoomStudentRelation);
|
|
|
+ HashMap<Integer, String> map = new HashMap<>(1);
|
|
|
+ map.put(examRoomStudentRelation.getStudentId(),examRoomStudentRelation.getStudentId().toString());
|
|
|
+ String url = "3?examRegistrationId" + nextExamRoomStudentRelationId;
|
|
|
+ sysMessageService.batchSendMessage(MessageTypeEnum.EXAM_STARTED_PUSH,map,null,null,url,JiguangPushPlugin.PLUGIN_NAME);
|
|
|
|
|
|
//状态变更为呼叫中
|
|
|
studentExamResultDao.updateFinishedExam(examRoomStudentRelation.getExamRegistrationId(),1);
|
|
@@ -547,18 +566,13 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<RoomStudentListDto> queryStudentList(Long roomId) {
|
|
|
- return examRoomStudentRelationDao.queryStudentList(roomId);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
public Map<String, Object> queryNeedCheckingList(Long roomId) {
|
|
|
List<RoomStudentListDto> roomStudentListDtos = examRoomStudentRelationDao.queryStudentList(roomId);
|
|
|
- Map<String,Object> resultMap = new HashMap<>(4);
|
|
|
+ Map<String,Object> resultMap = new HashMap<>(3);
|
|
|
resultMap.put("studentList",roomStudentListDtos);
|
|
|
resultMap.put("signTotalNum",examRoomStudentRelationDao.querySignTotalNum(roomId));
|
|
|
resultMap.put("noSignTotalNum",examRoomStudentRelationDao.queryNoSignTotalNum(roomId));
|
|
|
- resultMap.put("surplusNum",examRoomStudentRelationDao.querySurplusNum(roomId));
|
|
|
+// resultMap.put("surplusNum",examRoomStudentRelationDao.querySurplusNum(roomId));
|
|
|
return resultMap;
|
|
|
}
|
|
|
|