From f58efac12a7d35553c934f8316745de8eb00325d Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Wed, 5 May 2021 17:26:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E7=94=B3=E8=AF=B7=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../examcheck/impl/ExamCheckServiceImpl.java | 1 + .../impl/ExaminationServiceImpl.java | 27 ++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) 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