@@ -396,6 +396,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
empInfoIBLL.SaveEntity(keyValue, entity); | empInfoIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 修改二维码状态 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult UpdateQRCodeStatus(string keyValue,int QRCodeStatus) | |||||
{ | |||||
empInfoIBLL.UpdateQRCodeStatus(keyValue, QRCodeStatus); | |||||
return Success("操作成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -13,6 +13,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
public class StuEnrollPhoneController : Controller | public class StuEnrollPhoneController : Controller | ||||
{ | { | ||||
private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); | |||||
private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL(); | private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL(); | ||||
#region 视图 | #region 视图 | ||||
@@ -57,6 +58,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
#endregion | #endregion | ||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetEmpInfoEntityByEmpNo(string empNo) | |||||
{ | |||||
var EmpInfoData = empInfoIBLL.GetEmpInfoEntityByEmpNo(empNo); | |||||
EmpInfoData.resume = WebHelper.HtmlDecode(EmpInfoData.resume); | |||||
return Success(EmpInfoData); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 报名 | /// 报名 | ||||
@@ -83,6 +83,8 @@ | |||||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | <a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | ||||
<a id="checkall" class="btn btn-default"><i class="fa fa-print"></i> 审核全部</a> | <a id="checkall" class="btn btn-default"><i class="fa fa-print"></i> 审核全部</a> | ||||
<a id="lr_qrcode" class="btn btn-default"><i class="fa fa-linode"></i> 生成二维码</a> | <a id="lr_qrcode" class="btn btn-default"><i class="fa fa-linode"></i> 生成二维码</a> | ||||
<a id="lr_qrcode_normal" class="btn btn-default"><i class="fa fa-linode"></i> 报名正常</a> | |||||
<a id="lr_qrcode_end" class="btn btn-default"><i class="fa fa-linode"></i> 报名结束</a> | |||||
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | <a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | ||||
<i class="fa fa-reorder"></i> <span class="lrlt">更多</span><span class="caret"></span> | <i class="fa fa-reorder"></i> <span class="lrlt">更多</span><span class="caret"></span> | ||||
</a> | </a> | ||||
@@ -291,7 +291,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
//生成二维码 | //生成二维码 | ||||
$("#lr_qrcode").on('click', | $("#lr_qrcode").on('click', | ||||
function() { | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('EmpNo'); | var keyValue = $('#gridtable').jfGridValue('EmpNo'); | ||||
var EmpName = $('#gridtable').jfGridValue('EmpName'); | var EmpName = $('#gridtable').jfGridValue('EmpName'); | ||||
//console.log(keyValue, EmpName); | //console.log(keyValue, EmpName); | ||||
@@ -311,7 +311,7 @@ var bootstrap = function ($, learun) { | |||||
width: 700, | width: 700, | ||||
height: 300, | height: 300, | ||||
btn: null, | btn: null, | ||||
end: function() { refreshGirdData(); } | |||||
end: function () { refreshGirdData(); } | |||||
}); | }); | ||||
} | } | ||||
@@ -363,6 +363,35 @@ var bootstrap = function ($, learun) { | |||||
}) | }) | ||||
}); | }); | ||||
//报名正常 | |||||
$("#lr_qrcode_normal").on("click", function () { | |||||
var keyValue = $('#gridtable').jfGridValue('EmpId'); | |||||
learun.layerConfirm('是否确认更新二维码状态为正常!', | |||||
function(res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/EmpInfo/UpdateQRCodeStatus', | |||||
{ keyValue: keyValue, QRCodeStatus: 0 }, | |||||
function() { | |||||
refreshGirdData(); | |||||
}); | |||||
}; | |||||
});; | |||||
}); | |||||
//报名结束 | |||||
$("#lr_qrcode_end").on("click", function () { | |||||
var keyValue = $('#gridtable').jfGridValue('EmpId'); | |||||
learun.layerConfirm('是否确认更新二维码状态为结束!', | |||||
function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/EmpInfo/UpdateQRCodeStatus', | |||||
{ keyValue: keyValue, QRCodeStatus: 1 }, | |||||
function () { | |||||
refreshGirdData(); | |||||
}); | |||||
}; | |||||
});; | |||||
}); | |||||
$("#lr_switch").on("click", function () { | $("#lr_switch").on("click", function () { | ||||
$.get("/EducationalAdministration/TeachSwitch/GetFirstEntity", function (data) { | $.get("/EducationalAdministration/TeachSwitch/GetFirstEntity", function (data) { | ||||
if (data.code == "200") { | if (data.code == "200") { | ||||
@@ -406,7 +435,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ | { | ||||
@@ -417,6 +446,14 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "二维码状态", name: "QRCodeStatus", width: 80, align: "center", | |||||
formatter: function (cellvalue) { | |||||
//return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
return cellvalue == '1' ? "<span class=\"label label-danger\">结束</span>" : "<span class=\"label label-success\">正常</span>"; | |||||
} | |||||
}, | |||||
{ label: "职工编号", name: "EmpNo", width: 100, align: "left" }, | { label: "职工编号", name: "EmpNo", width: 100, align: "left" }, | ||||
{ label: "姓名", name: "EmpName", width: 100, align: "left" }, | { label: "姓名", name: "EmpName", width: 100, align: "left" }, | ||||
@@ -478,7 +515,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "员工状态时间", name: "IsInActiveTime", width: 100, align: "left"}, | |||||
{ label: "员工状态时间", name: "IsInActiveTime", width: 100, align: "left" }, | |||||
{ | { | ||||
label: "人员身份", name: "CompilationCategory", width: 100, align: "left", | label: "人员身份", name: "CompilationCategory", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
@@ -10,7 +10,7 @@ | |||||
<meta name="viewport" content="width=device-width" /> | <meta name="viewport" content="width=device-width" /> | ||||
<title>数字化校园-查询报名</title> | <title>数字化校园-查询报名</title> | ||||
<style> | <style> | ||||
.box{ | |||||
.box { | |||||
width: 70%; | width: 70%; | ||||
height: 36px; | height: 36px; | ||||
text-align: center; | text-align: center; | ||||
@@ -19,43 +19,86 @@ | |||||
border-radius: 4px; | border-radius: 4px; | ||||
margin: 20px auto; | margin: 20px auto; | ||||
} | } | ||||
.box a{ | |||||
color: #fff; | |||||
font-size: 14px; | |||||
.box a { | |||||
color: #fff; | |||||
font-size: 14px; | |||||
} | |||||
.notclick { | |||||
pointer-events: none; | |||||
background-color: #778899; | |||||
} | } | ||||
</style> | </style> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
<div> | |||||
<div class="box"> | |||||
<a href="" id="stuenroll">报名</a> | |||||
<div> | |||||
<div class="box"> | |||||
<a href="" id="stuenroll">报名</a> | |||||
</div> | |||||
<div class="box"><a href="" id="loc">查询考试地点及时间</a></div> | |||||
<div class="box"><a href="" id="res">查询录取结果</a></div> | |||||
<div class="box" style=""><a href="" id="stuRecruitmentBrochure">招生简章</a></div> | |||||
<div class="box major"><a id="majorIntroduce">专业介绍</a></div> | |||||
</div> | </div> | ||||
<div class="box"><a href="" id="loc">查询考试地点及时间</a></div> | |||||
<div class="box"><a href="" id="res">查询录取结果</a></div> | |||||
<div class="box"><a href="" id="stuRecruitmentBrochure">招生简章</a></div> | |||||
<div class="box major"><a id="majorIntroduce">专业介绍</a></div> | |||||
</div> | |||||
<script src="/Content/jquery/jquery-1.10.2.min.js"></script> | <script src="/Content/jquery/jquery-1.10.2.min.js"></script> | ||||
<script src="~/PhonePage/server.js"></script> | |||||
<script> | |||||
$(function() { | |||||
var EmpNo = request('EmpNo'); | |||||
//报名 | |||||
$('#stuenroll').attr('href', '/EducationalAdministration/StuEnrollPhone/Form?EmpNo=' + EmpNo); | |||||
//查询考试地点及时间 | |||||
$('#loc').attr('href', '/EducationalAdministration/StuEnrollPhone/Search?type=1'); | |||||
//查询录取结果 | |||||
$('#res').attr('href', '/EducationalAdministration/StuEnrollPhone/Search?type=2'); | |||||
//招生简章 | |||||
$('#stuRecruitmentBrochure').attr('href', '/EducationalAdministration/StuEnrollPhone/StuRecruitmentBrochure'); | |||||
$('.major').find('a').on('click', | |||||
function () { | |||||
location.href = "/EducationalAdministration/StuEnrollPhone/FileDownLoad?name=" + '2022年各专业介绍'+'&pathName='+'各专业介绍.pdf'; | |||||
}); | |||||
}); | |||||
</script> | |||||
<script src="~/PhonePage/server.js"></script> | |||||
<script> | |||||
$(function () { | |||||
var EmpNo = request('EmpNo'); | |||||
if (!!EmpNo) { | |||||
//查询 | |||||
$.ajax({ | |||||
url: '/EducationalAdministration/StuEnrollPhone/GetEmpInfoEntityByEmpNo?empNo=' + EmpNo, | |||||
//data: { StuName: decodeURI(StuName), IDCard: IDCard, StuMobile: "" }, | |||||
type: "GET", | |||||
dataType: "json", | |||||
async: true, | |||||
cache: false, | |||||
success: function (data) { | |||||
if (data.code == 200) { | |||||
var data = data.data.QRCodeStatus; | |||||
if (data != 0) { | |||||
btnEnabled(); | |||||
alert('招生报名录取工作已结束!'); | |||||
} else { | |||||
} | |||||
} else { | |||||
alert(data.info); | |||||
btnEnabled(); | |||||
//location.href = '/EducationalAdministration/StuEnrollPhone/Search?type=' + type; | |||||
} | |||||
}, | |||||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||||
}, | |||||
beforeSend: function () { | |||||
}, | |||||
complete: function () { | |||||
} | |||||
}); | |||||
//报名 | |||||
$('#stuenroll').attr('href', '/EducationalAdministration/StuEnrollPhone/Form?EmpNo=' + EmpNo); | |||||
//查询考试地点及时间 | |||||
$('#loc').attr('href', '/EducationalAdministration/StuEnrollPhone/Search?type=1'); | |||||
//查询录取结果 | |||||
$('#res').attr('href', '/EducationalAdministration/StuEnrollPhone/Search?type=2'); | |||||
//招生简章 | |||||
$('#stuRecruitmentBrochure').attr('href', '/EducationalAdministration/StuEnrollPhone/StuRecruitmentBrochure'); | |||||
$('.major').find('a').on('click', | |||||
function () { | |||||
location.href = "/EducationalAdministration/StuEnrollPhone/FileDownLoad?name=" + '2022年各专业介绍' + '&pathName=' + '各专业介绍.pdf'; | |||||
}); | |||||
} | |||||
//禁用按钮 | |||||
function btnEnabled() { | |||||
$('.box').addClass('notclick'); | |||||
} | |||||
}); | |||||
</script> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -436,7 +436,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
public void UpdateQRCodeStatus(string keyValue, int QRCodeStatus) | |||||
{ | |||||
try | |||||
{ | |||||
empInfoService.UpdateQRCodeStatus(keyValue, QRCodeStatus); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存部门、系部 | /// 保存部门、系部 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("EMPID")] | [Column("EMPID")] | ||||
public string EmpId { get; set; } | public string EmpId { get; set; } | ||||
/// <summary> | |||||
/// 二维码状态 | |||||
/// </summary> | |||||
[Column("QRCODESTATUS")] | |||||
public int? QRCodeStatus { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 职工号 | /// 职工号 | ||||
/// </summary> | /// </summary> | ||||
@@ -71,6 +71,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
void SaveEntity(UserInfo userInfo, string keyValue, EmpInfoEntity entity); | void SaveEntity(UserInfo userInfo, string keyValue, EmpInfoEntity entity); | ||||
void UpdatePhoto(string id, string photo); | void UpdatePhoto(string id, string photo); | ||||
void UpdateQRCodeStatus(string keyValue, int QRCodeStatus); | |||||
#endregion | #endregion | ||||
void CheckAll(); | void CheckAll(); | ||||
@@ -38,7 +38,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT t.*,b.F_Order as DeptOrder "); | strSql.Append("SELECT t.*,b.F_Order as DeptOrder "); | ||||
strSql.Append(" FROM EmpInfo t left join "+BaseRepository().getDbConnection().Database+".dbo.LR_Base_Department b on t.F_DepartmentId=b.F_DepartmentId "); | |||||
strSql.Append(" FROM EmpInfo t left join " + BaseRepository().getDbConnection().Database + ".dbo.LR_Base_Department b on t.F_DepartmentId=b.F_DepartmentId "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
@@ -859,6 +859,33 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 修改二维码状态 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="QRCodeStatus"></param> | |||||
public void UpdateQRCodeStatus(string keyValue, int QRCodeStatus) | |||||
{ | |||||
try | |||||
{ | |||||
if (keyValue.Contains(",")) | |||||
{ | |||||
keyValue = string.Join("','", keyValue.Split(',')); | |||||
} | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update EmpInfo set QRCodeStatus='{QRCodeStatus}' where EmpId in ('{keyValue}')"); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||