From bf9abf1f837addec649b629dbda32bdbb21bb94d Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Mon, 17 May 2021 15:21:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E7=8F=AD=E8=AE=A1=E5=88=92=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E5=92=8C=E8=80=83=E8=AF=95=E7=94=B3=E8=AF=B7=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E6=96=B0=E5=A2=9E=E8=AE=B2=E5=B8=88=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E3=80=82=20=E8=80=83=E8=AF=95=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E6=9F=A5=E8=AF=A2=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E3=80=82=20bug=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/examapply/ExamApplyController.java | 12 ++ .../ApplyStudentsAppController.java | 120 ++++++++++++ .../dtos/applystudents/ApplyStudentsDTO.java | 39 ++++ .../impl/ApplyStudentsServiceImpl.java | 34 +++- .../examapply/impl/ExamApplyServiceImpl.java | 1 + .../examcheck/impl/ExamCheckServiceImpl.java | 2 - .../static/route/examapply/list-check.html | 39 +++- .../static/route/examapply/list-teacher.html | 175 ++++++++++++++++++ .../static/route/examcheck/list.html | 30 ++- 9 files changed, 447 insertions(+), 5 deletions(-) create mode 100644 src/main/java/cn/com/tenlion/controller/app/api/applystudents/ApplyStudentsAppController.java create mode 100644 src/main/resources/static/route/examapply/list-teacher.html diff --git a/src/main/java/cn/com/tenlion/controller/api/examapply/ExamApplyController.java b/src/main/java/cn/com/tenlion/controller/api/examapply/ExamApplyController.java index d6ef059..01408f0 100644 --- a/src/main/java/cn/com/tenlion/controller/api/examapply/ExamApplyController.java +++ b/src/main/java/cn/com/tenlion/controller/api/examapply/ExamApplyController.java @@ -1,8 +1,10 @@ package cn.com.tenlion.controller.api.examapply; import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO; +import cn.com.tenlion.pojo.dtos.teacher.TeacherLessonsTimeDTO; import cn.com.tenlion.pojo.vos.examapply.ExamApplyVO; import cn.com.tenlion.service.examapply.IExamApplyService; +import cn.com.tenlion.service.teacher.ITeacherService; import ink.wgink.annotation.CheckRequestBodyAnnotation; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.interfaces.consts.ISystemConstant; @@ -33,6 +35,8 @@ public class ExamApplyController extends DefaultBaseController { @Autowired private IExamApplyService examApplyService; + @Autowired + private ITeacherService teacherService; @ApiOperation(value = "新增应急管理局-考试申请表-renpc", notes = "新增应急管理局-考试申请表-renpc接口") @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @@ -137,4 +141,12 @@ public class ExamApplyController extends DefaultBaseController { return new SuccessResult(); } + @ApiOperation(value = "教师信息", notes = "教师信息接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("teacher-msg") + public List teacherMsg() { + Map params = requestParams(); + return teacherService.listTeacherLessonsTime(params); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/controller/app/api/applystudents/ApplyStudentsAppController.java b/src/main/java/cn/com/tenlion/controller/app/api/applystudents/ApplyStudentsAppController.java new file mode 100644 index 0000000..13cc0da --- /dev/null +++ b/src/main/java/cn/com/tenlion/controller/app/api/applystudents/ApplyStudentsAppController.java @@ -0,0 +1,120 @@ +package cn.com.tenlion.controller.app.api.applystudents; + +import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO; +import cn.com.tenlion.pojo.vos.applystudents.ApplyStudentsVO; +import cn.com.tenlion.service.applystudents.IApplyStudentsService; +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: ApplyStudentsController + * @Description: 班级学生表 + * @Author: CodeFactory + * @Date: 2021-05-14 23:01:54 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "班级学生表接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/applystudents") +public class ApplyStudentsAppController extends DefaultBaseController { + + @Autowired + private IApplyStudentsService applyStudentsService; + + @ApiOperation(value = "获取班级学生列表", notes = "获取班级学生列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-by-classid/{clssId}") + public List listByClssId(@PathVariable("clssId") String clssId) { + return applyStudentsService.listByClssId(clssId); + } + + + + @ApiOperation(value = "新增班级学生表", notes = "新增班级学生表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestBody ApplyStudentsVO applyStudentsVO) { + applyStudentsService.save(applyStudentsVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除班级学生表", notes = "删除班级学生表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@PathVariable("ids") String ids) { + applyStudentsService.remove(Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改班级学生表", notes = "修改班级学生表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "applyStudentsId", value = "班级学生表ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("update/{applyStudentsId}") + @CheckRequestBodyAnnotation + public SuccessResult update(@PathVariable("applyStudentsId") String applyStudentsId, @RequestBody ApplyStudentsVO applyStudentsVO) { + applyStudentsService.update(applyStudentsId, applyStudentsVO); + return new SuccessResult(); + } + + @ApiOperation(value = "班级学生表详情", notes = "班级学生表详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "applyStudentsId", value = "班级学生表ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{applyStudentsId}") + public ApplyStudentsDTO get(@PathVariable("applyStudentsId") String applyStudentsId) { + return applyStudentsService.get(applyStudentsId); + } + + @ApiOperation(value = "班级学生表列表", notes = "班级学生表列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list() { + Map params = requestParams(); + return applyStudentsService.list(params); + } + + @ApiOperation(value = "班级学生表分页列表", notes = "班级学生表分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + page.setParams(params); + return applyStudentsService.listPage(page); + } + + @ApiOperation(value = "班级学生表统计", notes = "班级学生表统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(applyStudentsService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/applystudents/ApplyStudentsDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/applystudents/ApplyStudentsDTO.java index 0dc18f4..b653afc 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/applystudents/ApplyStudentsDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/applystudents/ApplyStudentsDTO.java @@ -1,5 +1,6 @@ package cn.com.tenlion.pojo.dtos.applystudents; +import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -24,6 +25,8 @@ public class ApplyStudentsDTO { private String applyClassName; @ApiModelProperty(name = "applyWorkTypeId", value = "报名工种ID") private String applyWorkTypeId; + @ApiModelProperty(name = "applyWorkTypeName", value = "报名工种名称") + private String applyWorkTypeName; @ApiModelProperty(name = "applyName", value = "报名人姓名") private String applyName; @ApiModelProperty(name = "applySex", value = "报名人性别 1男 2女【数据字典】") @@ -72,6 +75,12 @@ public class ApplyStudentsDTO { private String gmtModified; @ApiModelProperty(name = "isDelete", value = "删除状态") private Integer isDelete; + @ApiModelProperty(name = "classPlanDTO", value = "考试相关信息") + private ClassPlanDTO classPlanDTO; + @ApiModelProperty(name = "examStartTime", value = "考试开始时间") + private String examStartTime; + @ApiModelProperty(name = "examEndTime", value = "考试结束时间") + private String examEndTime; public String getApplyId() { return applyId == null ? "" : applyId.trim(); @@ -113,6 +122,14 @@ public class ApplyStudentsDTO { this.applyWorkTypeId = applyWorkTypeId; } + public String getApplyWorkTypeName() { + return applyWorkTypeName; + } + + public void setApplyWorkTypeName(String applyWorkTypeName) { + this.applyWorkTypeName = applyWorkTypeName; + } + public String getApplyName() { return applyName == null ? "" : applyName.trim(); } @@ -305,5 +322,27 @@ public class ApplyStudentsDTO { this.isDelete = isDelete; } + public ClassPlanDTO getClassPlanDTO() { + return classPlanDTO; + } + public void setClassPlanDTO(ClassPlanDTO classPlanDTO) { + this.classPlanDTO = classPlanDTO; + } + + public String getExamStartTime() { + return examStartTime; + } + + public void setExamStartTime(String examStartTime) { + this.examStartTime = examStartTime; + } + + public String getExamEndTime() { + return examEndTime; + } + + public void setExamEndTime(String examEndTime) { + this.examEndTime = examEndTime; + } } 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 76b98ce..9c0828d 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 @@ -1,13 +1,19 @@ package cn.com.tenlion.service.applystudents.impl; import cn.com.tenlion.dao.applystudents.IApplyStudentsDao; +import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; +import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService; import cn.com.tenlion.pojo.bos.applystudents.ApplyStudentsBO; import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO; +import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; +import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO; import cn.com.tenlion.pojo.pos.apply.ApplyPO; import cn.com.tenlion.pojo.pos.applystudents.ApplyStudentsPO; import cn.com.tenlion.pojo.vos.applystudents.ApplyStudentsVO; import cn.com.tenlion.service.apply.IApplyService; import cn.com.tenlion.service.applystudents.IApplyStudentsService; +import cn.com.tenlion.service.classplan.IClassPlanService; +import cn.com.tenlion.service.examapply.IExamApplyService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import ink.wgink.common.base.DefaultBaseService; @@ -40,6 +46,13 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp private IApplyStudentsDao applyStudentsDao; @Autowired private IApplyService applyService; + @Autowired + private IClassPlanService classPlanService; + @Autowired + private IInstitutionService iInstitutionService; + @Autowired + private IExamApplyService examApplyService; + public String saveRelationReturnId(ApplyStudentsVO applyStudentsVO){ String applyId = UUIDUtil.getUUID(); @@ -194,7 +207,26 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp @Override public List list(Map params) { - return applyStudentsDao.list(params); + List list = applyStudentsDao.list(params); + if(null != list && list.size() > 0) { + for(ApplyStudentsDTO applyStudentsDTO: list) { + ClassPlanDTO classPlanDTO = classPlanService.get(applyStudentsDTO.getApplyClassId()); + applyStudentsDTO.setClassPlanDTO(classPlanDTO); + if(null != classPlanDTO) { + InstitutionDTO institutionDTO = iInstitutionService.get(classPlanDTO.getOrgId()); + if(null != institutionDTO) { + applyStudentsDTO.setApplyWorkTypeName(institutionDTO.getInstitutionName()); + } + } + params.put("examId", applyStudentsDTO.getApplyClassId()); + ExamApplyDTO examApplyDTO = examApplyService.get(params); + if(null != examApplyDTO) { + applyStudentsDTO.setExamStartTime(examApplyDTO.getPracticeExamStartTime()); + applyStudentsDTO.setExamEndTime(examApplyDTO.getPracticeExamEndTime()); + } + } + } + return list; } @Override diff --git a/src/main/java/cn/com/tenlion/service/examapply/impl/ExamApplyServiceImpl.java b/src/main/java/cn/com/tenlion/service/examapply/impl/ExamApplyServiceImpl.java index 956018f..fac37a8 100644 --- a/src/main/java/cn/com/tenlion/service/examapply/impl/ExamApplyServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examapply/impl/ExamApplyServiceImpl.java @@ -12,6 +12,7 @@ import cn.com.tenlion.pojo.vos.examapply.ExamApplyVO; import cn.com.tenlion.service.classplan.IClassPlanService; import cn.com.tenlion.service.examapply.IExamApplyService; import cn.com.tenlion.service.examination.distribution.IDistributionService; +import cn.com.tenlion.service.teacher.ITeacherService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultList; 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 7e11d6c..f86f804 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 @@ -192,8 +192,6 @@ public class ExamCheckServiceImpl extends DefaultBaseService implements IExamChe ClassPlanDTO classPlanDTO = classPlanService.get(examCheckDTO.getPlanId()); examCheckDTO.setClassPlanDTO(classPlanDTO); if(null != classPlanDTO) { - System.out.println(classPlanDTO.getClassPlanId()); - System.out.println(classPlanDTO.getOrgId()); InstitutionDTO institutionDTO = iInstitutionService.get(classPlanDTO.getOrgId()); if(null != institutionDTO) { classPlanDTO.setOrgId(institutionDTO.getInstitutionName()); diff --git a/src/main/resources/static/route/examapply/list-check.html b/src/main/resources/static/route/examapply/list-check.html index 95faf4b..db95121 100644 --- a/src/main/resources/static/route/examapply/list-check.html +++ b/src/main/resources/static/route/examapply/list-check.html @@ -9,6 +9,9 @@ +
@@ -26,6 +29,16 @@
+
+
+ +
+
@@ -295,6 +308,13 @@ return rowData; } }, + {field: 'teacher', fixed: 'right', width: 180, title: '查看讲师信息', align:'center', + templet: function(row) { + var rowData; + rowData = '查看讲师信息'; + return rowData; + } + }, {field: 'status', fixed: 'right', width: 180, title: '查看考场信息', align:'center', templet: function(row) { var rowData = row[this.field]; @@ -324,12 +344,14 @@ } // 重载表格 function reloadTable(currentPage) { + var options=$("#checkStatus option:selected"); table.reload('dataTable', { url: top.restAjax.path(tableUrl, []), where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), - endTime: $('#endTime').val() + endTime: $('#endTime').val(), + checkStatus: options.val() }, page: { curr: currentPage @@ -527,6 +549,19 @@ }); } + // 查看讲师信息 + function teacher(data) { + top.dialog.open({ + url: top.restAjax.path('route/examapply/list-teacher.html?classPlanId={classPlanId}', [data.examId]), + title: "讲师信息", + width: '92%', + height: '92%', + onClose: function() { + reloadTable(); + } + }); + } + //监听行单击事件 table.on('tool(dataTable)', function(obj){ var data = obj.data; @@ -538,6 +573,8 @@ selOther(data); }else if('addressShow' == obj.event) { addressShow(data) + }else if('teacher' == obj.event) { + teacher(data) } }); }); diff --git a/src/main/resources/static/route/examapply/list-teacher.html b/src/main/resources/static/route/examapply/list-teacher.html new file mode 100644 index 0000000..67f6a5f --- /dev/null +++ b/src/main/resources/static/route/examapply/list-teacher.html @@ -0,0 +1,175 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/examcheck/list.html b/src/main/resources/static/route/examcheck/list.html index 104483d..6341f97 100644 --- a/src/main/resources/static/route/examcheck/list.html +++ b/src/main/resources/static/route/examcheck/list.html @@ -294,7 +294,14 @@ } return rowData; } - } + }, + {field: 'teacher', fixed: 'right', width: 180, title: '查看讲师信息', align:'center', + templet: function(row) { + var rowData; + rowData = '查看讲师信息'; + return rowData; + } + }, ] ], page: true, @@ -443,6 +450,27 @@ } } }); + + // 查看讲师信息 + function teacher(data) { + top.dialog.open({ + url: top.restAjax.path('route/examapply/list-teacher.html?classPlanId={classPlanId}', [data.planId]), + title: "讲师信息", + width: '92%', + height: '92%', + onClose: function() { + reloadTable(); + } + }); + } + + //监听行单击事件 + table.on('tool(dataTable)', function(obj){ + var data = obj.data; + if('teacher' == obj.event) { + teacher(data) + } + }); });