|
@@ -13,6 +13,8 @@ import com.keao.edu.common.service.SysMessageService;
|
|
|
import com.keao.edu.common.service.impl.BaseServiceImpl;
|
|
|
import com.keao.edu.common.tenant.TenantContextHolder;
|
|
|
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.thirdparty.message.provider.JiguangPushPlugin;
|
|
|
import com.keao.edu.thirdparty.message.provider.YimeiSmsPlugin;
|
|
|
import com.keao.edu.user.api.entity.ExamRoom;
|
|
@@ -29,10 +31,7 @@ import com.keao.edu.user.entity.ExamRegistration;
|
|
|
import com.keao.edu.user.entity.ExaminationBasic;
|
|
|
import com.keao.edu.user.page.ExamRoomListQueryInfo;
|
|
|
import com.keao.edu.user.page.ExamRoomQueryInfo;
|
|
|
-import com.keao.edu.user.service.ExamRoomService;
|
|
|
-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.user.service.*;
|
|
|
import com.keao.edu.util.collection.MapUtil;
|
|
|
import com.keao.edu.util.date.DateUtil;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
@@ -66,7 +65,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
@Autowired
|
|
|
private ExamTeacherSalaryService examTeacherSalaryService;
|
|
|
@Autowired
|
|
|
- private ExamCertificationDao examCertificationDao;
|
|
|
+ private ExamCertificationService examCertificationService;
|
|
|
@Autowired
|
|
|
private StudentExamResultDao studentExamResultDao;
|
|
|
@Autowired
|
|
@@ -361,7 +360,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
examRoomStudentRelationService.deleteWithExamRooms(examRoomIds);
|
|
|
|
|
|
if(!CollectionUtils.isEmpty(registIds)){
|
|
|
- examCertificationDao.deleteWithRegist(registIds);
|
|
|
+ examCertificationService.deleteWithRegist(registIds);
|
|
|
studentExamResultDao.deleteWithRegists(registIds);
|
|
|
}
|
|
|
|
|
@@ -685,6 +684,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
examRoom.setId(examRoomId);
|
|
|
examRoom.setOpenFlag(openFlag);
|
|
|
examRoomDao.update(examRoom);
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
//加群退群
|
|
|
if(openFlag == 1){
|
|
|
String studentIds = examRoomStudentRelationService.getStudentIds(examRoomId);
|
|
@@ -693,7 +693,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
if(StringUtils.isNotEmpty(studentIds)){
|
|
|
stringBuffer.append(",").append(studentIds);
|
|
|
//推送消息
|
|
|
- String[] split = studentIds.split(",");
|
|
|
+ /*String[] split = studentIds.split(",");
|
|
|
Map<Integer, String> userPhoneMap = new HashMap<>(split.length);
|
|
|
// Map<Integer, String> map = MapUtil.convertMybatisMap(examRoomStudentRelationService.getStuRegistrationMap(examRoomId), Integer.class, String.class);
|
|
|
|
|
@@ -703,16 +703,27 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
// String notifyUrl = "?examRegistrationId=" + studentExtraExercise.getId() + "&studentCourseHomeworkId=" + studentExtraExercise.getId() + "&extra=1";
|
|
|
// String extra = "dayaedu" + notifyUrl + "&userId=" + studentId;
|
|
|
sysMessageService.batchSendMessage(MessageTypeEnum.ACTION_EXAM_SIGN_PUSH,
|
|
|
- userPhoneMap, null, 0, null, JiguangPushPlugin.PLUGIN_NAME);
|
|
|
+ userPhoneMap, null, 0, null, JiguangPushPlugin.PLUGIN_NAME);*/
|
|
|
}
|
|
|
if(StringUtils.isNotEmpty(examRoom.getAssistantTeacherUserIdList())){
|
|
|
stringBuffer.append(",").append(examRoom.getAssistantTeacherUserIdList());
|
|
|
}
|
|
|
imFeignService.joinGroup(stringBuffer.toString(),examRoomId.toString(),examRoomId.toString());
|
|
|
|
|
|
+ PublishMessageDto publishMessageDto = new PublishMessageDto();
|
|
|
+ publishMessageDto.setUserId(sysUser.getId().toString());
|
|
|
+ publishMessageDto.setRoomId(examRoomId.toString());
|
|
|
+ MemberChangedMessage msg = new MemberChangedMessage(5, sysUser.getId().toString(),3);
|
|
|
+ msg.setWaitNum(0);
|
|
|
+ msg.setClassroomSwitch(1);
|
|
|
+ Map<String,Object> paramMap = new HashMap<>(1);
|
|
|
+ paramMap.put("studentQueue",examRoomStudentRelationService.queryNeedCheckingList(examRoomId));
|
|
|
+ msg.setWebParamJson(JSONObject.toJSONString(paramMap));
|
|
|
+ publishMessageDto.setMemberChangedMessage(msg);
|
|
|
+ imFeignService.publishMessage(publishMessageDto);
|
|
|
}else {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
imFeignService.dismissGroup(sysUser.getId().toString(),examRoomId.toString());
|
|
|
+ imFeignService.destroyRoom(examRoomId);
|
|
|
}
|
|
|
}
|
|
|
}
|