Merge branch 'master' of e.coding.net:tsteam/btsaqscksfwpt/system-examination-signup
This commit is contained in:
commit
dd6746a3bd
@ -234,7 +234,7 @@ public interface IApplyService {
|
||||
|
||||
/**
|
||||
* 统计机构星期的报名信息
|
||||
* @param week
|
||||
* @param weekTime
|
||||
* @param applyInstitutionId
|
||||
* @param applyClassId
|
||||
* @return
|
||||
|
@ -59,7 +59,6 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
|
||||
|
||||
|
||||
|
||||
public SuccessResultList<List<ApplyDTO>> listPageMyApply(String token,ListPage page){
|
||||
if (StringUtils.isBlank(token)) {
|
||||
page.getParams().put("creator",securityComponent.getCurrentUser().getUserId());
|
||||
@ -85,11 +84,6 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void audit(String token,ApplyAuditVO applyAuditVO){
|
||||
ApplyDTO applyDTO = this.get(applyAuditVO.getApplyId());
|
||||
if(applyDTO == null){
|
||||
@ -172,7 +166,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
@Override
|
||||
public String saveReturnId(String token, ApplyVO applyVO) {
|
||||
//检查报名数据
|
||||
checkSaveData(applyVO.getApplyCardNumber(),applyVO.getApplyClassId());
|
||||
checkSaveData(token,applyVO.getApplyCardNumber(),applyVO.getApplyClassId());
|
||||
String applyId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(applyVO);
|
||||
params.put("applyId", applyId);
|
||||
@ -193,11 +187,16 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
return applyId;
|
||||
}
|
||||
|
||||
public void checkSaveData(String applyCardNumber,String ApplyClassId){
|
||||
if(countApplyCardNumber(applyCardNumber,ApplyClassId) != 0){
|
||||
public void checkSaveData(String token,String applyCardNumber,String ApplyClassId){
|
||||
// if(countApplyCardNumber(applyCardNumber,ApplyClassId) != 0){
|
||||
// throw new SaveException("您以报名过该项目");
|
||||
// }
|
||||
|
||||
if(countApplyCreator(token,ApplyClassId) != 0){
|
||||
throw new SaveException("您以报名过该项目");
|
||||
}
|
||||
|
||||
|
||||
ClassPlanDTO classPlanDTO = classPlanService.get(ApplyClassId);
|
||||
if(classPlanDTO == null){
|
||||
throw new ParamsException("未查询到计划信息");
|
||||
@ -349,6 +348,25 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
return new SuccessResultList<>(applyDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 统计当前登录账号 报名的培训计划的次数(不包括撤回)
|
||||
*/
|
||||
public Integer countApplyCreator(String creator,String applyClassId){
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("creator",creator);
|
||||
params.put("applyClassId",applyClassId);
|
||||
List<String> applyAuditStates = new ArrayList<>();
|
||||
applyAuditStates.add("0");
|
||||
applyAuditStates.add("2");
|
||||
applyAuditStates.add("3");
|
||||
applyAuditStates.add("-1");
|
||||
params.put("applyAuditStates",applyAuditStates);
|
||||
return count(params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 统计证件号码 报名的培训计划的次数(不包括撤回)
|
||||
*/
|
||||
|
@ -444,6 +444,8 @@
|
||||
t1.apply_class_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t1.apply_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t1.apply_card_number LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
@ -614,6 +616,9 @@
|
||||
<if test="applyInstitutionId != null and applyInstitutionId != ''">
|
||||
AND t1.apply_institution_id = #{applyInstitutionId}
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
AND t1.creator = #{creator}
|
||||
</if>
|
||||
<if test="applyAuditStates != null and applyAuditStates != ''">
|
||||
AND t1.apply_audit_state IN
|
||||
<foreach collection="applyAuditStates" index="index" open="(" separator="," close=")">
|
||||
|
@ -166,13 +166,13 @@
|
||||
return '-';
|
||||
}
|
||||
if(rowData == '0') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>';
|
||||
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审批</a>';
|
||||
}
|
||||
if(rowData == '1') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>';
|
||||
}
|
||||
if(rowData == '2') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">审批驳回</a>';
|
||||
rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审批驳回</a>';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
|
@ -166,13 +166,13 @@
|
||||
return '-';
|
||||
}
|
||||
if(rowData == '0') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>';
|
||||
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审批</a>';
|
||||
}
|
||||
if(rowData == '1') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>';
|
||||
}
|
||||
if(rowData == '2') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">审批驳回</a>';
|
||||
rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审批驳回</a>';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
@ -184,7 +184,7 @@
|
||||
return '-';
|
||||
}
|
||||
if(rowData == '0') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>';
|
||||
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">未分配</a>';
|
||||
}
|
||||
if(rowData == '1') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
|
||||
@ -199,7 +199,7 @@
|
||||
return '-';
|
||||
}
|
||||
if(rowData == '0') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>';
|
||||
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">未分配</a>';
|
||||
}
|
||||
if(rowData == '1') {
|
||||
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
|
||||
@ -437,6 +437,8 @@
|
||||
[data.examId]), {}, null, function(code, resultData) {
|
||||
if(null != resultData && resultData.length > 0) {
|
||||
top.dialog.msg('监考老师分配失败');
|
||||
}else {
|
||||
top.dialog.msg('监考老师分配成功');
|
||||
}
|
||||
reloadTable();
|
||||
}, function(code, data) {
|
||||
|
@ -220,10 +220,6 @@
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) {
|
||||
orgNameFun.getOrgName(data.orgId, function(nameData) {
|
||||
data['orgName'] = nameData.institutionName;
|
||||
var dataFormData = {};
|
||||
for (var i in data) {
|
||||
dataFormData[i] = data[i] + '';
|
||||
}
|
||||
if ('1' == data.planType) {
|
||||
data.planType = '初训';
|
||||
} else if ('2' == data.planType) {
|
||||
@ -231,6 +227,10 @@
|
||||
} else if ('3' == data.planType) {
|
||||
data.planType = '换证 ';
|
||||
}
|
||||
var dataFormData = {};
|
||||
for (var i in data) {
|
||||
dataFormData[i] = data[i] + '';
|
||||
}
|
||||
form.val('initDataForm', dataFormData);
|
||||
form.render(null, 'initDataForm');
|
||||
})
|
||||
|
@ -196,7 +196,7 @@
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||
<button type="button" class="layui-btn" id="subBtn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -297,22 +297,39 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
// 初始化理论考试开始时间时间戳
|
||||
function initTheoryExamStartTimeDateTime() {
|
||||
laydate.render({
|
||||
elem: '#theoryExamStartTime',
|
||||
type: 'datetime',
|
||||
trigger: 'click',
|
||||
done: function (value, date, endDate) {
|
||||
var startDate = new Date(value).getTime();
|
||||
var endTime = new Date($('#theoryExamEndTime').val()).getTime();
|
||||
if (endTime <= startDate) {
|
||||
layer.msg('理论考试结束时间不能早于等于开始时间');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化理论考试结束时间时间戳
|
||||
function initTheoryExamEndTimeDateTime() {
|
||||
laydate.render({
|
||||
elem: '#theoryExamEndTime',
|
||||
type: 'datetime',
|
||||
trigger: 'click',
|
||||
done: function (value, date, endDate) {
|
||||
var startDate = new Date(value).getTime();
|
||||
var endTime = new Date($('#theoryExamStartTime').val()).getTime();
|
||||
if (endTime >= startDate) {
|
||||
layer.msg('理论考试结束时间不能早于等于开始时间');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化理论考试开始时间时间戳
|
||||
// 初始化实操考试开始时间时间戳
|
||||
function initPracticeExamStartTimeDateTime() {
|
||||
laydate.render({
|
||||
elem: '#practiceExamStartTime',
|
||||
@ -328,7 +345,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化理论考试结束时间时间戳
|
||||
// 初始化实操考试结束时间时间戳
|
||||
function initPracticeExamEndTimeDateTime() {
|
||||
laydate.render({
|
||||
elem: '#practiceExamEndTime',
|
||||
@ -344,38 +361,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化实操考试开始时间时间戳
|
||||
function initTheoryExamStartTimeDateTime() {
|
||||
laydate.render({
|
||||
elem: '#theoryExamStartTime',
|
||||
type: 'datetime',
|
||||
trigger: 'click',
|
||||
done: function (value, date, endDate) {
|
||||
var startDate = new Date(value).getTime();
|
||||
var endTime = new Date($('#theoryExamEndTime').val()).getTime();
|
||||
if (endTime >= startDate) {
|
||||
layer.msg('理论考试结束时间不能早于等于开始时间');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化实操考试结束时间时间戳
|
||||
function initTheoryExamEndTimeDateTime() {
|
||||
laydate.render({
|
||||
elem: '#theoryExamEndTime',
|
||||
type: 'datetime',
|
||||
trigger: 'click',
|
||||
done: function (value, date, endDate) {
|
||||
var startDate = new Date(value).getTime();
|
||||
var endTime = new Date($('#theoryExamStartTime').val()).getTime();
|
||||
if (endTime >= startDate) {
|
||||
layer.msg('理论考试结束时间不能早于等于开始时间');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化缴费凭证图片上传
|
||||
function initPaymentVoucherUploadFile() {
|
||||
var files = $('#paymentVoucher').val();
|
||||
@ -438,6 +423,11 @@
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
if (null == data.status || '' == data.status || typeof (data.status) == 'undefined') {
|
||||
$('#subBtn').show();
|
||||
} else {
|
||||
$('#subBtn').hide();
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initPracticeExamAddressIdSelect(data['practiceExamAddressId']);
|
||||
@ -463,10 +453,6 @@
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function(code, data) {
|
||||
orgNameFun.getOrgName(data.orgId, function(nameData) {
|
||||
data['orgName'] = nameData.institutionName;
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
if ('1' == data.planType) {
|
||||
data.planType = '初训';
|
||||
} else if ('2' == data.planType) {
|
||||
@ -474,6 +460,10 @@
|
||||
} else if ('3' == data.planType) {
|
||||
data.planType = '换证 ';
|
||||
}
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
form.val('initDataForm', dataFormData);
|
||||
form.render(null, 'initDataForm');
|
||||
})
|
||||
|
@ -165,14 +165,17 @@
|
||||
{field: 'checkStatus', width: 180, title: '审核状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
if('0' == rowData) {
|
||||
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审核</a>';
|
||||
}
|
||||
if('2' == rowData) {
|
||||
rowData = '审核通过';
|
||||
rowData = '<a class="layui-btn layui-btn-xs">审核通过</a>';
|
||||
}
|
||||
if('3' == rowData) {
|
||||
rowData = '审核驳回';
|
||||
rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审核驳回</a>';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
|
@ -220,10 +220,6 @@
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/get/{classPlanId}', [classPlanId]), {}, null, function (code, data) {
|
||||
orgNameFun.getOrgName(data.orgId, function(nameData) {
|
||||
data['orgName'] = nameData.institutionName;
|
||||
var dataFormData = {};
|
||||
for (var i in data) {
|
||||
dataFormData[i] = data[i] + '';
|
||||
}
|
||||
if ('1' == data.planType) {
|
||||
data.planType = '初训';
|
||||
} else if ('2' == data.planType) {
|
||||
@ -231,6 +227,10 @@
|
||||
} else if ('3' == data.planType) {
|
||||
data.planType = '换证 ';
|
||||
}
|
||||
var dataFormData = {};
|
||||
for (var i in data) {
|
||||
dataFormData[i] = data[i] + '';
|
||||
}
|
||||
form.val('initDataForm', dataFormData);
|
||||
form.render(null, 'initDataForm');
|
||||
})
|
||||
|
@ -273,8 +273,6 @@
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
initTeacherEChart: function(){
|
||||
top.restAjax.get('api/indexcount/count-teacher-num', {}, null, function(code, data) {
|
||||
var dataList = [];
|
||||
|
Loading…
Reference in New Issue
Block a user