开班计划审核和考试申请审核新增讲师信息查看。

考试成绩查询新增接口。
bug修改。
This commit is contained in:
Renpc-kilig 2021-05-17 15:21:27 +08:00
parent 248074e6ae
commit bf9abf1f83
9 changed files with 447 additions and 5 deletions

View File

@ -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<TeacherLessonsTimeDTO> teacherMsg() {
Map<String, Object> params = requestParams();
return teacherService.listTeacherLessonsTime(params);
}
}

View File

@ -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<ApplyStudentsDTO> 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<ApplyStudentsDTO> list() {
Map<String, Object> 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<List<ApplyStudentsDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return applyStudentsService.listPage(page);
}
@ApiOperation(value = "班级学生表统计", notes = "班级学生表统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {
Map<String, Object> params = requestParams();
return new SuccessResultData<>(applyStudentsService.count(params));
}
}

View File

@ -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;
}
}

View File

@ -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<ApplyStudentsDTO> list(Map<String, Object> params) {
return applyStudentsDao.list(params);
List<ApplyStudentsDTO> 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

View File

@ -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;

View File

@ -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());

View File

@ -9,6 +9,9 @@
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<style>
.search-item .layui-form-select .layui-input{width: 200px;}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
@ -26,6 +29,16 @@
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
</div>
<div class="layui-inline" >
<div class="layui-inline layui-form search-item">
<select id="checkStatus" name="checkStatus" lay-filter="checkStatus" style="width: 200px;">
<option value="">请选择审核状态</option>
<option value="0">待审核</option>
<option value="1">审核通过</option>
<option value="2">审核退回</option>
</select>
</div>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
@ -295,6 +308,13 @@
return rowData;
}
},
{field: 'teacher', fixed: 'right', width: 180, title: '查看讲师信息', align:'center',
templet: function(row) {
var rowData;
rowData = '<a class="layui-btn layui-btn-xs" lay-event="teacher">查看讲师信息</a>';
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)
}
});
});

View File

@ -0,0 +1,175 @@
<!doctype html>
<html lang="en">
<head>
<base href="/signup/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/examapply/teacher-msg?classPlanId={classPlanId}';
var classPlanId = top.restAjax.params(window.location.href).classPlanId;
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [classPlanId]),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [
[
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'teacherName', width: 180, title: '讲师名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'teacherIdCard', width: 180, title: '讲师证件号码', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'startTime', width: 180, title: '上课开始时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'startEnd', width: 180, title: '上课结束时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'orgName', width: 250, title: '机构名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'lessonName', width: 250, title: '课程名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'projectCatalogName', width: 180, title: '培训项目名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'workerCatalogName', width: 180, title: '工种类别', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
}
]
],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data
};
}
});
}
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
},
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
initTable();
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
});
</script>
</body>
</html>

View File

@ -294,7 +294,14 @@
}
return rowData;
}
}
},
{field: 'teacher', fixed: 'right', width: 180, title: '查看讲师信息', align:'center',
templet: function(row) {
var rowData;
rowData = '<a class="layui-btn layui-btn-xs" lay-event="teacher">查看讲师信息</a>';
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)
}
});
});
</script>
</body>