diff --git a/src/main/java/cn/com/tenlion/controller/app/api/applystudentsnew/ApplyStudentsNewAppController.java b/src/main/java/cn/com/tenlion/controller/app/api/applystudentsnew/ApplyStudentsNewAppController.java index ab9edc7..d9ab8f0 100644 --- a/src/main/java/cn/com/tenlion/controller/app/api/applystudentsnew/ApplyStudentsNewAppController.java +++ b/src/main/java/cn/com/tenlion/controller/app/api/applystudentsnew/ApplyStudentsNewAppController.java @@ -118,4 +118,16 @@ public class ApplyStudentsNewAppController extends DefaultBaseController { return new SuccessResultData<>(applyStudentsNewService.count(params)); } + @ApiOperation(value = "分页列表", notes = "分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get-grade") + public List getGrade(@RequestHeader("token") String token) { + Map params = requestParams(); + params.put("token", token); + return applyStudentsNewService.getGrade(params); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/dao/applystudentsnew/IApplyStudentsNewDao.java b/src/main/java/cn/com/tenlion/dao/applystudentsnew/IApplyStudentsNewDao.java index 5253503..235a9a8 100644 --- a/src/main/java/cn/com/tenlion/dao/applystudentsnew/IApplyStudentsNewDao.java +++ b/src/main/java/cn/com/tenlion/dao/applystudentsnew/IApplyStudentsNewDao.java @@ -117,4 +117,11 @@ public interface IApplyStudentsNewDao { */ Integer count(Map params) throws SearchException; + /** + * 查询成绩 + * @param params + * @return + */ + List getGrade(Map params); + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/dao/classplan/IClassPlanDao.java b/src/main/java/cn/com/tenlion/dao/classplan/IClassPlanDao.java index 98b844e..078fb9d 100644 --- a/src/main/java/cn/com/tenlion/dao/classplan/IClassPlanDao.java +++ b/src/main/java/cn/com/tenlion/dao/classplan/IClassPlanDao.java @@ -1,5 +1,6 @@ package cn.com.tenlion.dao.classplan; +import cn.com.tenlion.pojo.dtos.applystudentsnew.ApplyStudentsNewDTO; import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; @@ -167,4 +168,5 @@ public interface IClassPlanDao { * @param params */ void updateExamFile(Map params); + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java b/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java index ec52aa7..0f24a9a 100644 --- a/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java @@ -88,6 +88,32 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp Map params = HashMapUtil.beanToMap(po); applyStudentsDao.save(params); deleteIdList.add(applyPO.getApplyId()); + + ApplyStudentsNewVO applyStudentsNewVO = new ApplyStudentsNewVO(); + applyStudentsNewVO.setOrgId(po.getApplyInstitutionId()); + ClassPlanDTO classPlanDTO = classPlanService.get(po.getApplyClassId()); + if(null != classPlanDTO) { + applyStudentsNewVO.setOrgName(classPlanDTO.getOrgName()); + } + applyStudentsNewVO.setClassPlanId(po.getApplyClassId()); + applyStudentsNewVO.setUserId(params.get("creator").toString()); + applyStudentsNewVO.setName(po.getApplyName()); + DataDTO dataDTO = dataService.get(po.getApplySex()); + if(null != dataDTO) { + applyStudentsNewVO.setSex(dataDTO.getDataName()); + } + applyStudentsNewVO.setCardType(po.getApplyCardType()); + dataDTO = dataService.get(po.getApplyCardType()); + if(null != dataDTO) { + applyStudentsNewVO.setCardTypeName(dataDTO.getDataName()); + } + applyStudentsNewVO.setCardNumber(po.getApplyCardNumber()); + applyStudentsNewVO.setWorkUnit(po.getApplyUnitName()); + // applyStudentsNewVO.setWorkDept(applyStudentsVO); + applyStudentsNewVO.setWorkTitle(po.getApplyPosition()); + applyStudentsNewVO.setPhone(po.getApplyPhone()); + // applyStudentsNewVO.setExamOrgId(applyStudentsVO); + applyStudentsNewService.save(applyStudentsNewVO); } applyService.delete(deleteIdList); } @@ -129,6 +155,7 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp setAppSaveInfo(token, params); } applyStudentsDao.save(params); + ApplyStudentsNewVO applyStudentsNewVO = new ApplyStudentsNewVO(); applyStudentsNewVO.setOrgId(applyStudentsVO.getApplyInstitutionId()); ClassPlanDTO classPlanDTO = classPlanService.get(applyStudentsVO.getApplyClassId()); diff --git a/src/main/java/cn/com/tenlion/service/applystudentsnew/IApplyStudentsNewService.java b/src/main/java/cn/com/tenlion/service/applystudentsnew/IApplyStudentsNewService.java index d30581b..597aa37 100644 --- a/src/main/java/cn/com/tenlion/service/applystudentsnew/IApplyStudentsNewService.java +++ b/src/main/java/cn/com/tenlion/service/applystudentsnew/IApplyStudentsNewService.java @@ -6,6 +6,7 @@ import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; import cn.com.tenlion.pojo.pos.applystudentsnew.ApplyStudentsNewPO; import cn.com.tenlion.pojo.vos.applystudentsnew.ApplyStudentsNewVO; import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultData; import ink.wgink.pojo.result.SuccessResultList; import java.util.List; @@ -193,4 +194,11 @@ public interface IApplyStudentsNewService { * @return */ SuccessResultList> listPageClassPlan(ListPage page); + + /** + * 获取考试成绩 + * @param params + * @return + */ + List getGrade(Map params); } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/applystudentsnew/impl/ApplyStudentsNewServiceImpl.java b/src/main/java/cn/com/tenlion/service/applystudentsnew/impl/ApplyStudentsNewServiceImpl.java index 983e52c..6eefe0d 100644 --- a/src/main/java/cn/com/tenlion/service/applystudentsnew/impl/ApplyStudentsNewServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/applystudentsnew/impl/ApplyStudentsNewServiceImpl.java @@ -24,6 +24,8 @@ import ink.wgink.common.base.DefaultBaseService; import ink.wgink.module.dictionary.pojo.dtos.DataDTO; import ink.wgink.module.dictionary.service.IDataService; import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.app.AppTokenUser; +import ink.wgink.pojo.result.SuccessResultData; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.map.HashMapUtil; import ink.wgink.util.UUIDUtil; @@ -283,6 +285,35 @@ public class ApplyStudentsNewServiceImpl extends DefaultBaseService implements I return new SuccessResultList<>(classPlanDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } + @Override + public List getGrade(Map params) { + String token = params.get("token").toString(); + AppTokenUser appTokenUser = this.getAppTokenUser(token); + params.put("userId", appTokenUser.getId()); + List list = applyStudentsNewDao.getGrade(params); + if(null != list && list.size() > 0) { + Iterator applyStudentsNewDTOIterator = list.iterator(); + while (applyStudentsNewDTOIterator.hasNext()) { + ApplyStudentsNewDTO applyStudentsNewDTO = applyStudentsNewDTOIterator.next(); + ClassPlanDTO classPlanDTO = classPlanService.get(applyStudentsNewDTO.getClassPlanId()); + applyStudentsNewDTO.setClassPlanDTO(classPlanDTO); + /*WorkTypeDTO workTypeDTO = workTypeService.get(applyStudentsNewDTO.getApplyWorkTypeId()); + if(null != workTypeDTO) { + applyStudentsNewDTO.setApplyWorkTypeName(workTypeDTO.getWorkTypeName()); + }*/ + params.put("examId", applyStudentsNewDTO.getClassPlanId()); + ExamApplyDTO examApplyDTO = examApplyService.get(params); + if(null != examApplyDTO) { + applyStudentsNewDTO.setExamStartTime(examApplyDTO.getPracticeExamStartTime()); + applyStudentsNewDTO.setExamEndTime(examApplyDTO.getPracticeExamEndTime()); + } + } + }else { + list = new ArrayList<>(); + } + return list; + } + public List listClassPlan(Map params) { String[] classPlanIdListIds = params.get("classPlanIdListIds") == null ? null : params.get("classPlanIdListIds").toString().split(","); params.put("classPlanIdList", classPlanIdListIds); diff --git a/src/main/resources/mybatis/mapper/applystudentsnew/apply-students-new-mapper.xml b/src/main/resources/mybatis/mapper/applystudentsnew/apply-students-new-mapper.xml index 43f3771..a9eeaa6 100644 --- a/src/main/resources/mybatis/mapper/applystudentsnew/apply-students-new-mapper.xml +++ b/src/main/resources/mybatis/mapper/applystudentsnew/apply-students-new-mapper.xml @@ -587,4 +587,34 @@ t1.is_delete = 0 + + \ No newline at end of file