diff --git a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java index 9e9d7a0..a304d3e 100644 --- a/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/apply/impl/ApplyServiceImpl.java @@ -240,7 +240,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic if(checkApplyIsFirst(appTokenUser.getId(),workTypeId,row.getInstitutionId()) != 0){ trainingInstitutionWorkTypeDTO.setApplyStatus(false); }else{ - trainingInstitutionWorkTypeDTO.setApplyStatus(examCheckService.getExamCheck(workTypeId,row.getInstitutionId())); + trainingInstitutionWorkTypeDTO.setApplyStatus(examCheckService.getExamCheckFailOrBack(workTypeId,row.getInstitutionId())); } trainingInstitutionWorkTypeDTO.setQrCode(createQrCode(row.getInstitutionId())); diff --git a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java index 8122229..8d93291 100644 --- a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java @@ -363,6 +363,8 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl @Override public List list(Map params) { + String[] classPlanIdListIds = params.get("classPlanIdListIds") == null ? null : params.get("classPlanIdListIds").toString().split(","); + params.put("classPlanIdList", classPlanIdListIds); return classPlanDao.list(params); } diff --git a/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java b/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java index 87c4dcf..5ea390a 100644 --- a/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java @@ -29,6 +29,8 @@ import cn.com.tenlion.service.examination.stationuser.IStationUserService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.UpdateException; +import ink.wgink.module.dictionary.pojo.dtos.DataDTO; +import ink.wgink.module.dictionary.service.IDataService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.map.HashMapUtil; @@ -64,11 +66,13 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist @Autowired private IApplyService iApplyService; @Autowired - private IClassPlanService iClassPlanService; - @Autowired private IDistributionCardService iDistributionCardService; @Autowired private IApplyStudentsService applyStudentsService; + @Autowired + private IClassPlanService iClassPlanService; + @Autowired + private IDataService dataDictionaryServiceImpl; @Override public void save(DistributionSaveVO dstributionSaveVO) { @@ -242,19 +246,15 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist if(userTotalNumber > fieldTotalNumber ) { throw new UpdateException("当前分配的考场无法容纳考试人数"); } - /** - * 遍历保存所有的考试申请分配信息 - */ - Map params = HashMapUtil.beanToMap(distributionVO); - if (StringUtils.isBlank(token)) { - setUpdateInfo(params); - } else { - setAppUpdateInfo(token, params); - } int index = 0; int subNumber = 0; + int currentNumber = 0; String currentFieldId = ""; for(String classPlanId : distributionIdArray) { + DistributionDTO distributionDTO = get(classPlanId); + if(distributionDTO != null) { + throw new UpdateException("非法操作."); + } // 共分配的多个考场ID ArrayList fieldList = new ArrayList(); // 是否存在跨考点, 做记录 @@ -291,6 +291,7 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist if(distributionDTOS != null && distributionDTOS.size() > 0) { throw new UpdateException(organizationDTO.getOrganizationName() + "该时段已被(" + distributionDTOS.get(0).getPlanName() + ")占用"); } + currentNumber = 0; } /** * 保存card表 @@ -298,12 +299,13 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist DistributionCardVO distributionCardVO = new DistributionCardVO(); distributionCardVO.setDistributionCardUserId(userList.get(i).getCreator()); distributionCardVO.setDistributionCardUserName(userList.get(i).getApplyName()); - distributionCardVO.setDistributionCardNumber(subNumber+""); + distributionCardVO.setDistributionCardNumber( (++currentNumber ) + "" ); distributionCardVO.setDistributionFieldId(currentFieldId); distributionCardVO.setClassPlanId(classPlanId); distributionCardVO.setDistributionId(classPlanId); distributionCardVO.setDistributionCardPictures(""); - distributionCardVO.setDistributionCardUserSex(userList.get(i).getApplySex()); + DataDTO dataDTO = dataDictionaryServiceImpl.get(userList.get(i).getApplySex()); + distributionCardVO.setDistributionCardUserSex(dataDTO.getDataName()); distributionCardVO.setDistributionCardUserIdentity(userList.get(i).getApplyCardNumber()); distributionCardVO.setDistributionCardUserResult(""); distributionCardVO.setDistributionCardUserStatus("0"); @@ -325,6 +327,12 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist /** * 保存考试申请 */ + Map params = HashMapUtil.beanToMap(distributionVO); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } params.put("stationId", stationId.length() > 0 ? stationId.substring(1, stationId.length()) : ""); params.put("planId", classPlanId); params.put("planName", classPlanDTO.getPlanName()); @@ -341,6 +349,7 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist ExamApplyVO vo = new ExamApplyVO(); vo.setExamId(distributionId); vo.setStatus(1); + vo.setCheckStatus(1); vo.setPracticeExamStartTime(distributionVO.getDistributionAllotTime()); vo.setPracticeExamEndTime(distributionVO.getDistributionAllotEndTime()); iExamApplyService.updateStatus(distributionId, vo); diff --git a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml index 1099e4e..06ee5e7 100644 --- a/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml +++ b/src/main/resources/mybatis/mapper/classplan/class-plan-mapper.xml @@ -323,6 +323,13 @@ #{classPlanIds[${index}]} + + AND + t1.class_plan_id IN + + #{classPlanIdList[${index}]} + + diff --git a/src/main/resources/static/route/examapply/list-check.html b/src/main/resources/static/route/examapply/list-check.html index 61849a8..aeb9cf1 100644 --- a/src/main/resources/static/route/examapply/list-check.html +++ b/src/main/resources/static/route/examapply/list-check.html @@ -461,7 +461,6 @@ var ids = ''; var planIds = ''; for(var i = 0, item; item = checkDatas[i++];) { - debugger if(item.checkStatus === 0) { if (i > 1) { ids += '_'; diff --git a/src/main/resources/static/route/examination/distribution/show.html b/src/main/resources/static/route/examination/distribution/show.html index e7430fb..efa470a 100644 --- a/src/main/resources/static/route/examination/distribution/show.html +++ b/src/main/resources/static/route/examination/distribution/show.html @@ -26,13 +26,14 @@
考试计划申请
+