diff --git a/src/main/java/cn/com/tenlion/service/examcheck/impl/ExamCheckServiceImpl.java b/src/main/java/cn/com/tenlion/service/examcheck/impl/ExamCheckServiceImpl.java index 9ac23e5..5035067 100644 --- a/src/main/java/cn/com/tenlion/service/examcheck/impl/ExamCheckServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examcheck/impl/ExamCheckServiceImpl.java @@ -113,6 +113,7 @@ public class ExamCheckServiceImpl extends DefaultBaseService implements IExamChe if(2 == examCheckVO.getCheckStatus()) { ExamApplyVO examApplyVO = new ExamApplyVO(); examApplyVO.setStatus(0); + examApplyVO.setUserStatus(0); examApplyVO.setExamId(examCheckVO.getPlanId()); examApplyService.save(examApplyVO); } diff --git a/src/main/java/cn/com/tenlion/service/examination/impl/ExaminationServiceImpl.java b/src/main/java/cn/com/tenlion/service/examination/impl/ExaminationServiceImpl.java index 2f8e5ea..44f8b1d 100644 --- a/src/main/java/cn/com/tenlion/service/examination/impl/ExaminationServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examination/impl/ExaminationServiceImpl.java @@ -1,5 +1,6 @@ package cn.com.tenlion.service.examination.impl; +import cn.com.tenlion.dao.examapply.IExamApplyDao; import cn.com.tenlion.dao.examination.IExaminationDao; import cn.com.tenlion.pojo.bos.examination.ExaminationBO; import cn.com.tenlion.pojo.dtos.distribution.DistributionDTO; @@ -11,7 +12,7 @@ import cn.com.tenlion.pojo.vos.distributionfield.DistributionFieldSaveVO; import cn.com.tenlion.pojo.vos.examination.ExaminationVO; import cn.com.tenlion.service.examination.IExaminationService; import cn.com.tenlion.service.examination.distribution.IDistributionService; -import cn.com.tenlion.service.examination.distributioncard.impl.DistributionCardServiceImpl; +import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService; import cn.com.tenlion.service.examination.distributionfield.IDistributionFieldService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SearchException; @@ -44,7 +45,9 @@ public class ExaminationServiceImpl extends DefaultBaseService implements IExami @Autowired private IDistributionService distributionService; @Autowired - private DistributionCardServiceImpl distributionCardService; + private IDistributionCardService distributionCardService; + @Autowired + private IExamApplyDao examApplyDao; @Override public void save(ExaminationVO examinationVO) { @@ -292,10 +295,7 @@ public class ExaminationServiceImpl extends DefaultBaseService implements IExami params.put("examinationId", examinationDTO.getExaminationId()); setUpdateInfo(params); examinationDao.updateExamHis(params); - DistributionFieldSaveVO distributionFieldSaveVO = new DistributionFieldSaveVO(); - distributionFieldSaveVO.setInvigilatorId(examinationDTO.getExaminationId()); - distributionFieldService.update(distributionFieldDTO.getDistributionFieldId(), distributionFieldSaveVO); - distributionCardService.saveBuildingPictures(params.get("examId").toString(), params.get("examId").toString()); + updateDistributionField(params, examinationDTO, distributionFieldDTO); return examinationDTO; } } @@ -312,12 +312,19 @@ public class ExaminationServiceImpl extends DefaultBaseService implements IExami params.put("examinationId", examinationDTO.getExaminationId()); setSaveInfo(params); examinationDao.saveExamHis(params); - DistributionFieldSaveVO distributionFieldSaveVO = new DistributionFieldSaveVO(); - distributionFieldSaveVO.setInvigilatorId(examinationDTO.getExaminationId()); - distributionFieldService.update(distributionFieldDTO.getDistributionFieldId(), distributionFieldSaveVO); - distributionCardService.saveBuildingPictures(params.get("examId").toString(), params.get("examId").toString()); + // 修改监考老师分配状态 + params.put("userStatus", "1"); + examApplyDao.update(params); + updateDistributionField(params, examinationDTO, distributionFieldDTO); return examinationDTO; } } + private void updateDistributionField(Map params, ExaminationDTO examinationDTO, DistributionFieldDTO distributionFieldDTO) throws Exception { + DistributionFieldSaveVO distributionFieldSaveVO = new DistributionFieldSaveVO(); + distributionFieldSaveVO.setInvigilatorId(examinationDTO.getExaminationId()); + distributionFieldService.update(distributionFieldDTO.getDistributionFieldId(), distributionFieldSaveVO); + distributionCardService.saveBuildingPictures(params.get("examId").toString(), params.get("examId").toString()); + } + } \ No newline at end of file