@@ -120,14 +120,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult Lock(string keyValue) | public ActionResult Lock(string keyValue) | ||||
{ | { | ||||
cdMajorIBLL.Lock(keyValue); | cdMajorIBLL.Lock(keyValue); | ||||
return Success("审核成功!"); | |||||
return Success("操作成功!"); | |||||
} | } | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult UnLock(string keyValue) | public ActionResult UnLock(string keyValue) | ||||
{ | { | ||||
cdMajorIBLL.UnLock(keyValue); | cdMajorIBLL.UnLock(keyValue); | ||||
return Success("去审成功!"); | |||||
return Success("操作成功!"); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 删除实体数据 | /// 删除实体数据 | ||||
@@ -86,14 +86,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult Lock(string keyValue) | public ActionResult Lock(string keyValue) | ||||
{ | { | ||||
classroomInfoIBLL.Lock(keyValue); | classroomInfoIBLL.Lock(keyValue); | ||||
return Success("审核成功!"); | |||||
return Success("操作成功!"); | |||||
} | } | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult UnLock(string keyValue) | public ActionResult UnLock(string keyValue) | ||||
{ | { | ||||
classroomInfoIBLL.UnLock(keyValue); | classroomInfoIBLL.UnLock(keyValue); | ||||
return Success("去审成功!"); | |||||
return Success("操作成功!"); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 删除实体数据 | /// 删除实体数据 | ||||
@@ -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 | ||||
} | } | ||||
@@ -124,14 +124,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult Lock(string keyValue) | public ActionResult Lock(string keyValue) | ||||
{ | { | ||||
lessonInfoIBLL.Lock(keyValue); | lessonInfoIBLL.Lock(keyValue); | ||||
return Success("审核成功!"); | |||||
return Success("操作成功!"); | |||||
} | } | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult UnLock(string keyValue) | public ActionResult UnLock(string keyValue) | ||||
{ | { | ||||
lessonInfoIBLL.UnLock(keyValue); | lessonInfoIBLL.UnLock(keyValue); | ||||
return Success("去审成功!"); | |||||
return Success("操作成功!"); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 删除实体数据 | /// 删除实体数据 | ||||
@@ -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> | ||||
/// 报名 | /// 报名 | ||||
@@ -97,7 +97,7 @@ var bootstrap = function ($, learun) { | |||||
// learun.alert.warning("当前项目已审核无需再审!"); | // learun.alert.warning("当前项目已审核无需再审!"); | ||||
// return; | // return; | ||||
//} | //} | ||||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||||
learun.layerConfirm('是否确认启用该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/Lock', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/Lock', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | refreshGirdData(); | ||||
@@ -119,7 +119,7 @@ var bootstrap = function ($, learun) { | |||||
// learun.alert.warning("当前项目还未审核不需要去审核!"); | // learun.alert.warning("当前项目还未审核不需要去审核!"); | ||||
// return; | // return; | ||||
//} | //} | ||||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||||
learun.layerConfirm('是否确认停用该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/UnLock', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/UnLock', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | refreshGirdData(); | ||||
@@ -29,11 +29,11 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassroomInfo"> | <div class="col-xs-6 lr-form-item" data-table="ClassroomInfo"> | ||||
<div class="lr-form-item-title">容纳人数<font face="宋体">*</font></div> | <div class="lr-form-item-title">容纳人数<font face="宋体">*</font></div> | ||||
<input id="ContainStuNum" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
<input id="ContainStuNum" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="ClassroomInfo"> | <div class="col-xs-6 lr-form-item" data-table="ClassroomInfo"> | ||||
<div class="lr-form-item-title">考试人数<font face="宋体">*</font></div> | <div class="lr-form-item-title">考试人数<font face="宋体">*</font></div> | ||||
<input id="TestContainStuNum" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
<input id="TestContainStuNum" type="text" class="form-control" isvalid="yes" checkexpession="PositiveInteger" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassroomInfo/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/ClassroomInfo/Form.js") |
@@ -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) { | ||||
@@ -228,6 +228,32 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "课程类型", name: "LessonTypeId", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', | |||||
key: value, | |||||
keyId: 'ltid', | |||||
callback: function (_data) { | |||||
callback(_data['lessontypename']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 150, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
//{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, | //{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, | ||||
{ | { | ||||
label: "是否启用", name: "ELEnabled", width: 100, align: "left", | label: "是否启用", name: "ELEnabled", width: 100, align: "left", | ||||
@@ -178,6 +178,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
{ label: "学生编号", name: "StuNo", width: 100, align: "left" }, | { label: "学生编号", name: "StuNo", width: 100, align: "left" }, | ||||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | { label: "学生姓名", name: "StuName", width: 100, align: "left" }, | ||||
{ label: "年级", name: "Grade", width: 100, align: "left" }, | |||||
{ | { | ||||
label: "考试类型", name: "ESType", width: 100, align: "left", | label: "考试类型", name: "ESType", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
@@ -99,7 +99,7 @@ var bootstrap = function ($, learun) { | |||||
// learun.alert.warning("当前项目已审核无需再审!"); | // learun.alert.warning("当前项目已审核无需再审!"); | ||||
// return; | // return; | ||||
//} | //} | ||||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||||
learun.layerConfirm('是否确认启用该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfo/Lock', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfo/Lock', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | refreshGirdData(); | ||||
@@ -121,7 +121,7 @@ var bootstrap = function ($, learun) { | |||||
// learun.alert.warning("当前项目还未审核不需要去审核!"); | // learun.alert.warning("当前项目还未审核不需要去审核!"); | ||||
// return; | // return; | ||||
//} | //} | ||||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||||
learun.layerConfirm('是否确认停用该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfo/UnLock', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfo/UnLock', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | refreshGirdData(); | ||||
@@ -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,87 @@ | |||||
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) { | |||||
//报名 | |||||
$('#stuenroll').on('click', | |||||
function () { | |||||
//查询 | |||||
$.ajax({ | |||||
url: '/EducationalAdministration/StuEnrollPhone/GetEmpInfoEntityByEmpNo?empNo=' + EmpNo, | |||||
type: "GET", | |||||
dataType: "json", | |||||
async: true, | |||||
cache: false, | |||||
success: function (data) { | |||||
if (data.code == 200) { | |||||
var data = data.data.QRCodeStatus; | |||||
if (data === 1 || data === '' || data === 'undefined') { | |||||
alert('招生报名录取工作已结束!'); | |||||
return; | |||||
} else { | |||||
location.href = '/EducationalAdministration/StuEnrollPhone/Form?EmpNo=' + EmpNo; | |||||
} | |||||
} else { | |||||
alert(data.info); | |||||
//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> |
@@ -126,13 +126,13 @@ | |||||
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo" + '&where=' + "id='" + data.StuEnroll.MajorNo + "'", | url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo" + '&where=' + "id='" + data.StuEnroll.MajorNo + "'", | ||||
async: false, | async: false, | ||||
success: function (msg) { | success: function (msg) { | ||||
var majorData = $.parseJSON(msg).data.data; | |||||
majorName = majorData[0].MajorName; | |||||
}, | |||||
var majorData = $.parseJSON(msg).data.data[0]; | |||||
majorName = majorData.majorname; | |||||
} | |||||
}); | }); | ||||
if (!majorName) { | |||||
majorName = data.StuEnroll.MajorName; | |||||
} | |||||
//if (!majorName) { | |||||
// majorName = data.StuEnroll.MajorName; | |||||
//} | |||||
if (IsAdmission == 1 || IsAdmission == true) { | if (IsAdmission == 1 || IsAdmission == true) { | ||||
var major = data.StuEnroll.MajorName; | var major = data.StuEnroll.MajorName; | ||||
$('#IsAdmission').val('恭喜您,已被我校录取' + majorName + '专业'); | $('#IsAdmission').val('恭喜您,已被我校录取' + majorName + '专业'); | ||||
@@ -55,7 +55,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); | |||||
$('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); | |||||
$('#F_ProvinceId').lrDataSourceSelect({ | $('#F_ProvinceId').lrDataSourceSelect({ | ||||
code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', | code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', | ||||
select: function (item) { | select: function (item) { | ||||
@@ -169,7 +169,15 @@ var bootstrap = function ($, learun) { | |||||
learun.alert.error('请先选择系和专业'); | learun.alert.error('请先选择系和专业'); | ||||
} | } | ||||
}); | }); | ||||
$('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
$('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
//监听身份证号,绑定出生日期 | |||||
$("#IdentityCardNo").blur(function () { | |||||
var cardNo = $(this).val().trim(); | |||||
if (cardNo) { | |||||
var date = cardNo.slice(6, 10) + "-" + cardNo.slice(10, 12) + "-" + cardNo.slice(12, 14); | |||||
$("#Birthday").val(date); | |||||
} | |||||
}); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | |||||
}, 250, 400); | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | ||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | ||||
// 刷新 | // 刷新 | ||||
@@ -109,13 +109,16 @@ var bootstrap = function ($, learun) { | |||||
// 发布 | // 发布 | ||||
$('#lr-publish').on('click', function () { | $('#lr-publish').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('F_LId'); | |||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行发布!"); | |||||
return; | |||||
} | |||||
var F_State = $('#gridtable').jfGridValue('F_State'); | var F_State = $('#gridtable').jfGridValue('F_State'); | ||||
if (F_State != "0") { | if (F_State != "0") { | ||||
learun.alert.warning("当前项目已提交不能发布!"); | learun.alert.warning("当前项目已提交不能发布!"); | ||||
return; | return; | ||||
} | } | ||||
var keyValue = $('#gridtable').jfGridValue('F_LId'); | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认发布!', function (res) { | learun.layerConfirm('是否确认发布!', function (res) { | ||||
if (res) { | if (res) { | ||||
@@ -8,6 +8,8 @@ using Newtonsoft.Json; | |||||
using Newtonsoft.Json.Linq; | using Newtonsoft.Json.Linq; | ||||
using System; | using System; | ||||
using System.Linq; | using System.Linq; | ||||
using System.IO; | |||||
using Learun.Application.Base.SystemModule; | |||||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | ||||
{ | { | ||||
@@ -21,6 +23,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
public class AccommodationController : MvcControllerBase | public class AccommodationController : MvcControllerBase | ||||
{ | { | ||||
private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); | private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); | ||||
private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -218,7 +221,16 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 导入宿舍 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexImport() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -541,6 +553,57 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||||
return Success("清空成功"); | return Success("清空成功"); | ||||
} | } | ||||
/// <summary> | |||||
/// 宿舍信息导入模板 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public ActionResult DownTemplate() | |||||
{ | |||||
FileStreamResult result = null; | |||||
try | |||||
{ | |||||
var path = Server.MapPath("~/Content/excel/"); | |||||
var pathoffull = path + "AccommodationImport.xls"; | |||||
FileStream fsread = fsread = new FileStream(pathoffull, FileMode.OpenOrCreate, FileAccess.ReadWrite); | |||||
result = File(fsread, "application/ms-excel", "宿舍信息导入.xls"); | |||||
return result; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
return null; | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 宿舍信息excel文件导入 | |||||
/// </summary> | |||||
/// <param name="templateId"></param> | |||||
/// <param name="Filedata"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
public ActionResult ExecuteImportExcel(string fileGuid, int chunks) | |||||
{ | |||||
string path = annexesFileIBLL.SaveAnnexes(fileGuid, fileGuid, chunks, LoginUserInfo.Get()); | |||||
if (!string.IsNullOrEmpty(path)) | |||||
{ | |||||
DataTable dt = ExcelHelper.ExcelImport(path); | |||||
var res = accommodationIBLL.ExecuteImportExcel(dt, fileGuid); | |||||
var data = new | |||||
{ | |||||
Success = res.snum, | |||||
Fail = res.failDt.Rows.Count | |||||
}; | |||||
return Success(data); | |||||
} | |||||
else | |||||
{ | |||||
return Fail("导入数据失败!"); | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -67,7 +67,7 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
<a id="lr_dormitoryAdd" class="btn btn-default"><i class="fa fa-pencil-square"></i> 批量添加宿舍</a> | <a id="lr_dormitoryAdd" class="btn btn-default"><i class="fa fa-pencil-square"></i> 批量添加宿舍</a> | ||||
<a id="lr_bedManage" class="btn btn-default"><i class="fa fa-pencil-square"></i> 床位管理</a> | <a id="lr_bedManage" class="btn btn-default"><i class="fa fa-pencil-square"></i> 床位管理</a> | ||||
@*<a id="lr_allocation" class="btn btn-default"><i class="fa fa-pencil-square"></i> 自动分配宿舍</a> | |||||
@*<a id="lr_allocation" class="btn btn-default"><i class="fa fa-pencil-square"></i> 自动分配宿舍</a> | |||||
<a id="lr_syncdata" class="btn btn-default"><i class="fa fa-pencil-square"></i> 同步宿舍信息</a>*@ | <a id="lr_syncdata" class="btn btn-default"><i class="fa fa-pencil-square"></i> 同步宿舍信息</a>*@ | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
@@ -79,6 +79,9 @@ | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_Classify" class="btn btn-default"><i class="fa fa-tags"></i> <span class="lrlt">分类管理</span></a> | <a id="lr_Classify" class="btn btn-default"><i class="fa fa-tags"></i> <span class="lrlt">分类管理</span></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_importBed" class="btn btn-default"><i class="fa fa-sign-in"></i> <span class="lrlt">导入</span></a> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -280,6 +280,22 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
//导入 | |||||
$("#lr_importBed").on("click", function () { | |||||
learun.layerForm({ | |||||
id: 'indexImport', | |||||
title: "导入宿舍信息", | |||||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/IndexImport', | |||||
width: 600, | |||||
height: 400, | |||||
maxmin: true, | |||||
btn: null, | |||||
end: function () { | |||||
refreshGirdData(); | |||||
} | |||||
}); | |||||
}); | |||||
}, | }, | ||||
//初始化左侧树 | //初始化左侧树 | ||||
initTree: function () { | initTree: function () { | ||||
@@ -0,0 +1,26 @@ | |||||
@{ | |||||
ViewBag.Title = "Form"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<link href="~/Content/webuploader/webuploader.css" rel="stylesheet" /> | |||||
<script src="~/Content/webuploader/webuploader.nolog.min.js"></script> | |||||
@Html.AppendCssFile("/Areas/LR_SystemModule/Views/ExcelImport/ImportForm.css") | |||||
<div class="lr-form-layout lr-form-layout-top-bottom"> | |||||
<div class="lr-form-layout-header"> | |||||
<div id="lr_add_file_btn"><i class="fa fa-cloud-upload"></i><span class="lrlt">上传文件</span></div> | |||||
<div class="webuploader-pick" id="lr_down_file_btn"><i class="fa fa-download"></i><span class="lrlt">下载模板</span></div> | |||||
</div> | |||||
<div class="lr-form-layout-body"> | |||||
<div class="lr-form-file-queue-wrap" id="lr_form_file_queue"> | |||||
<div class="lr-form-file-queue" id="lr_form_file_queue_list"> | |||||
</div> | |||||
<div class="lr-form-file-queue-bg"> | |||||
<h1><span class="lrlt">试试将电脑里的文件拖拽到此上传</span></h1> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/IndexImport.js") |
@@ -0,0 +1,180 @@ | |||||
/* | |||||
* 描 述:附件上传管理 | |||||
*/ | |||||
var CLId = request('CLId'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var fileInfo = {}; | |||||
// 触发合并文件碎片 | |||||
var mergeFileChunks = function (file) { | |||||
var param = {}; | |||||
param['__RequestVerificationToken'] = $.lrToken; | |||||
//param['CLId'] = CLId; | |||||
param['fileGuid'] = fileInfo[file.id].fileGuid; | |||||
param['fileName'] = fileInfo[file.id].name; | |||||
param['chunks'] = fileInfo[file.id].chunks; | |||||
learun.httpAsyncPost(top.$.rootUrl + "/LogisticsManagement/Accommodation/ExecuteImportExcel", param, function (res) { | |||||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||||
$fileItem.find('.lr-uploader-progress').remove(); | |||||
if (res.code == learun.httpCode.success) { | |||||
if (res.data.Success != '0') { | |||||
learun.alert.success('导入成功' + res.data.Success + '条'); | |||||
} | |||||
// 文件保存成功后 | |||||
$fileItem.append('<div class="lr-msg2"><span>' + res.data.Success + '</span><span>/</span><span style="color:#b94a48;" >' + res.data.Fail + '</span></div>'); | |||||
// 如果有失败 | |||||
if (res.data.Fail != '0') | |||||
{ | |||||
learun.download({ url: top.$.rootUrl + '/LR_SystemModule/ExcelImport/DownImportErrorFile', param: { fileId: fileInfo[file.id].fileGuid, fileName: fileInfo[file.id].name, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} | |||||
// 文件保存成功后 | |||||
//$fileItem.append('<div class="lr-msg"><i class="fa fa-check-circle"></i></div>'); | |||||
//$fileItem.append('<div class="lr-tool-bar"><i class="fa fa-minus-circle" title="删除" data-value="' + file.id + '" ></i></div>'); | |||||
// $fileItem.find('.lr-tool-bar .fa-minus-circle').on('click', function () { | |||||
// var fileId = $(this).attr('data-value'); | |||||
// DeleteFile(fileId); | |||||
// }); | |||||
// learun.alert.success(res.data.info); | |||||
} | |||||
else { | |||||
learun.alert.error(res.info); | |||||
$fileItem.append('<div class="lr-msg"><i class="fa fa-exclamation-circle"></i></div>'); | |||||
} | |||||
}); | |||||
} | |||||
// 触发清楚文件碎片 | |||||
var reomveFileChunks = function (file) { | |||||
var param = {}; | |||||
param['__RequestVerificationToken'] = $.lrToken; | |||||
param['fileGuid'] = fileInfo[file.id].fileGuid; | |||||
param['chunks'] = fileInfo[file.id].chunks; | |||||
learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/MergeAnnexesFile", param, function (res) { }); | |||||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||||
$fileItem.find('.lr-uploader-progress').remove(); | |||||
$fileItem.append('<div class="lr-msg"><i class="fa fa-exclamation-circle"></i></div>'); | |||||
} | |||||
// 删除文件 | |||||
var DeleteFile = function (fileId) { | |||||
var param = {}; | |||||
param['__RequestVerificationToken'] = $.lrToken; | |||||
param['fileId'] = fileInfo[fileId].fileGuid; | |||||
learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/DeleteAnnexesFile", param, function (res) { }); | |||||
var file = page.uploader.getFile(fileId); | |||||
if (!!file) { | |||||
page.uploader.removeFile(file); | |||||
} | |||||
delete fileInfo[fileId]; | |||||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + fileId); | |||||
$fileItem.remove(); | |||||
if ($('#lr_form_file_queue_list>div').length == 0) { | |||||
$('#lr_form_file_queue .lr-form-file-queue-bg').show(); | |||||
} | |||||
} | |||||
var page = { | |||||
uploader: null, | |||||
init: function () { | |||||
if (!WebUploader.Uploader.support()) { | |||||
alert('Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器'); | |||||
throw new Error('WebUploader does not support the browser you are using.'); | |||||
} | |||||
/*模板下载*/ | |||||
$('#lr_down_file_btn').on('click', function () { | |||||
location.href = top.$.rootUrl + "/LogisticsManagement/Accommodation/DownTemplate"; | |||||
}); | |||||
page.uploader = WebUploader.create({ | |||||
auto: true, | |||||
swf: top.$.rootUrl + '/Content/webuploader/Uploader.swf', | |||||
// 文件接收服务端。 | |||||
server: top.$.rootUrl + "/LR_SystemModule/Annexes/UploadAnnexesFileChunk", | |||||
// 选择文件的按钮。可选。 | |||||
// 内部根据当前运行是创建,可能是input元素,也可能是flash. | |||||
pick: '#lr_add_file_btn', | |||||
dnd: '#lr_form_file_queue', | |||||
paste: 'document.body', | |||||
disableGlobalDnd: true, | |||||
accept: { | |||||
extensions: "xls,xlsx" | |||||
}, | |||||
multiple: false, | |||||
// 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传! | |||||
resize: false, | |||||
// 文件分片上传 | |||||
chunked: true, | |||||
chunkRetry: 3, | |||||
prepareNextFile: true, | |||||
chunkSize: '1048576', | |||||
// 上传参数 | |||||
formData: { | |||||
__RequestVerificationToken: $.lrToken | |||||
} | |||||
}); | |||||
page.uploader.on('fileQueued', page.fileQueued); | |||||
page.uploader.on('uploadStart', page.uploadStart); | |||||
page.uploader.on('uploadBeforeSend', page.uploadBeforeSend); | |||||
page.uploader.on('uploadProgress', page.uploadProgress); | |||||
page.uploader.on('uploadSuccess', page.uploadSuccess); | |||||
page.uploader.on('uploadError', page.uploadError); | |||||
page.uploader.on('uploadComplete', page.uploadComplete); | |||||
page.uploader.on('error', page.error); | |||||
$('#lr_form_file_queue').mCustomScrollbar({ // 优化滚动条 | |||||
theme: "minimal-dark" | |||||
}); | |||||
}, | |||||
fileQueued: function (file) {// 文件加载到队列 | |||||
fileInfo[file.id] = { name: file.name }; | |||||
$('#lr_form_file_queue .lr-form-file-queue-bg').hide(); | |||||
// 添加一条文件记录 | |||||
var $item = $('<div class="lr-form-file-queue-item" id="lr_filequeue_' + file.id + '" ></div>'); | |||||
$item.append('<div class="lr-file-image"><img src="' + top.$.rootUrl + '/Content/images/filetype/' + file.ext + '.png"></div>'); | |||||
$item.append('<span class="lr-file-name">' + file.name + '(' + learun.countFileSize(file.size) + ')</span>'); | |||||
$('#lr_form_file_queue_list').append($item); | |||||
}, | |||||
uploadStart: function (file) { | |||||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||||
$fileItem.append('<div class="lr-uploader-progress"><div class="lr-uploader-progress-bar" style="width:0%;"></div></div>'); | |||||
}, | |||||
uploadBeforeSend: function (object, data, headers) { | |||||
data.chunk = data.chunk || 0; | |||||
data.chunks = data.chunks || 1; | |||||
fileInfo[data.id].fileGuid = fileInfo[data.id].fileGuid || WebUploader.Base.guid(); | |||||
data.fileGuid = fileInfo[data.id].fileGuid; | |||||
fileInfo[data.id].chunks = data.chunks; | |||||
}, | |||||
uploadProgress: function (file, percentage) { | |||||
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); | |||||
$fileItem.find('.lr-uploader-progress-bar').css('width', (percentage * 100 + '%')); | |||||
}, | |||||
uploadSuccess: function (file, res) { | |||||
if (res.code == 200) {// 上传成功 | |||||
mergeFileChunks(file); | |||||
} | |||||
else {// 上传失败 | |||||
reomveFileChunks(file); | |||||
} | |||||
}, | |||||
uploadError: function (file, code) { | |||||
reomveFileChunks(file); | |||||
}, | |||||
uploadComplete: function (file) { | |||||
}, | |||||
error: function (type) { | |||||
switch (type) { | |||||
case 'Q_TYPE_DENIED': | |||||
learun.alert.error('当前文件类型不允许上传'); | |||||
break; | |||||
}; | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -1341,6 +1341,7 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexClassify.js" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexClassify.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.js" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\ClearForm.js" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\ClearForm.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexImport.js" /> | |||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Form.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\Acc_DormitoryRule\Index.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.js" /> | <Content Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.js" /> | ||||
@@ -7935,6 +7936,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\TeachIndex.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\TeachIndex.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TimeTable\SchoolLesson.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\TimeTable\SchoolLesson.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TimeTable\PrintSchedule.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\TimeTable\PrintSchedule.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexImport.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -8031,6 +8033,7 @@ | |||||
<None Include="Properties\PublishProfiles\FolderProfile6.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile6.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile7.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile7.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile8.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile8.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile9.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\learunadms6.1.pubxml" /> | <None Include="Properties\PublishProfiles\learunadms6.1.pubxml" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -98,7 +98,12 @@ namespace Learun.Application.OA | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository().Delete<LostArticleInfoEntity>(t => t.F_LId == keyValue); | |||||
//多个删除 | |||||
var keyValueArr = keyValue.Split(','); | |||||
foreach (var item in keyValueArr) | |||||
{ | |||||
this.BaseRepository().Delete<LostArticleInfoEntity>(t => t.F_LId == item); | |||||
} | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -208,7 +213,7 @@ namespace Learun.Application.OA | |||||
try | try | ||||
{ | { | ||||
//草稿0、待认领1、已认领2 | //草稿0、待认领1、已认领2 | ||||
string sql = $"update LostArticleInfo set F_State=0 where F_LId='{keyValue}'"; | |||||
string sql = $"update LostArticleInfo set F_State=0,F_User='',F_UserTime=null,F_ClaimImage='' where F_LId='{keyValue}'"; | |||||
this.BaseRepository().ExecuteBySql(sql); | this.BaseRepository().ExecuteBySql(sql); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -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 | ||||
} | } | ||||
@@ -35,16 +35,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("SEMESTER")] | [Column("SEMESTER")] | ||||
public int? Semester { get; set; } | public int? Semester { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 课程类型名称 | |||||
/// 课程名称 | |||||
/// </summary> | /// </summary> | ||||
[Column("LESSONNAME")] | [Column("LESSONNAME")] | ||||
public string LessonName { get; set; } | public string LessonName { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 课程类型编号 | |||||
/// 课程编号 | |||||
/// </summary> | /// </summary> | ||||
[Column("LESSONNO")] | [Column("LESSONNO")] | ||||
public string LessonNo { get; set; } | public string LessonNo { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 课程类型 | |||||
/// </summary> | |||||
[Column("LESSONTYPEID")] | |||||
public string LessonTypeId { get; set; } | |||||
/// <summary> | |||||
/// 年级 | /// 年级 | ||||
/// </summary> | /// </summary> | ||||
[Column("GRADE")] | [Column("GRADE")] | ||||
@@ -265,11 +265,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
,[LessonName] | ,[LessonName] | ||||
,[LessonNo] | ,[LessonNo] | ||||
,[ELOrder] | ,[ELOrder] | ||||
,[ELEnabled],ExamTime) | |||||
select NEWID(),AcademicYearNo,Semester,Grade,LessonName,[LessonNo],0,1,'{ExamTime}' from OpenLessonPlan where ExamType='1' and lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||||
and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | |||||
group by LessonNo,LessonName,AcademicYearNo,Semester,Grade | |||||
,[ELEnabled],ExamTime,LessonTypeId,DeptNo,MajorNo) | |||||
select NEWID(),AcademicYearNo,t.Semester,Grade,t.LessonName,t.[LessonNo],0,1,'{ExamTime}',a.lessontypeid,t.DeptNo,t.MajorNo from OpenLessonPlan t | |||||
left join lessoninfo a on t.lessonno=a.lessonno | |||||
where t.ExamType='1' and t.lessonsortno=1 and t.AcademicYearNo='{AcademicYearNo}' and t.Semester='{Semester}' | |||||
and t.[LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | |||||
group by t.LessonNo,t.LessonName,t.AcademicYearNo,t.Semester,Grade,a.lessontypeid,t.DeptNo,t.MajorNo | |||||
"; | "; | ||||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -346,7 +346,8 @@ where l.EPLId='{EPLId}' | |||||
//专业课添加此专业的所有班级 | //专业课添加此专业的所有班级 | ||||
var addSql = $@"insert into Exam_ExamPlanClass | var addSql = $@"insert into Exam_ExamPlanClass | ||||
SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t | SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t | ||||
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' and c.majorno='{lessoninfo.TeachMajorNo}' | |||||
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.Grade='{lesson.Grade}' | |||||
and t.ESType='{examPlan.PlanType}' and c.majorno='{lessoninfo.TeachMajorNo}' | |||||
and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') | and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') | ||||
group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; | group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; | ||||
db.ExecuteBySql(addSql); | db.ExecuteBySql(addSql); | ||||
@@ -356,7 +357,7 @@ where l.EPLId='{EPLId}' | |||||
//公共课添加所有班级 | //公共课添加所有班级 | ||||
var addSql = $@"insert into Exam_ExamPlanClass | var addSql = $@"insert into Exam_ExamPlanClass | ||||
SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t | SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t | ||||
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' | |||||
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' and t.Grade='{lesson.Grade}' | |||||
and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') | and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') | ||||
group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; | group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; | ||||
db.ExecuteBySql(addSql); | db.ExecuteBySql(addSql); | ||||
@@ -139,7 +139,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
TreeModel node = new TreeModel | TreeModel node = new TreeModel | ||||
{ | { | ||||
id = item["eplid"].ToString(), | id = item["eplid"].ToString(), | ||||
text = item["lessonname"].ToString(), | |||||
text = item["lessonname"].ToString() + "(" + item["grade"].ToString() + ")", | |||||
value = item["lessonno"].ToString(), | value = item["lessonno"].ToString(), | ||||
showcheck = false, | showcheck = false, | ||||
checkstate = 0, | checkstate = 0, | ||||
@@ -340,7 +340,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public (bool flag, string str) CheckAllPlanLesson(string EPId) | public (bool flag, string str) CheckAllPlanLesson(string EPId) | ||||
{ | { | ||||
try | try | ||||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// 日 期:2022-04-15 15:03 | /// 日 期:2022-04-15 15:03 | ||||
/// 描 述:排考安排课程 | /// 描 述:排考安排课程 | ||||
/// </summary> | /// </summary> | ||||
public class Exam_ExamPlanLessonEntity | |||||
public class Exam_ExamPlanLessonEntity | |||||
{ | { | ||||
#region 实体成员 | #region 实体成员 | ||||
/// <summary> | /// <summary> | ||||
@@ -29,7 +29,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("ELID")] | [Column("ELID")] | ||||
public string ELId { get; set; } | public string ELId { get; set; } | ||||
/// <summary> | |||||
/// 年级 | |||||
/// </summary> | |||||
[Column("GRADE")] | |||||
public int? Grade { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// LessonName | /// LessonName | ||||
/// </summary> | /// </summary> | ||||
@@ -40,6 +45,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("LESSONNO")] | [Column("LESSONNO")] | ||||
public string LessonNo { get; set; } | public string LessonNo { get; set; } | ||||
/// <summary> | |||||
/// LessonNo | |||||
/// </summary> | |||||
[Column("LESSONTYPEID")] | |||||
public string LessonTypeId { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 考试日期 | /// 考试日期 | ||||
/// </summary> | /// </summary> | ||||
@@ -229,18 +229,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var sql = $@"select distinct t.EPLId,t.LessonName,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t | |||||
join (select l.lessonno,l.LessonTypeId,lt.ltorder from [dbo].[LessonInfo] l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.checkmark=1) a | |||||
on t.LessonNo=a.lessonno | |||||
var sql = $@"select distinct t.EPLId,t.LessonName,t.Grade,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t | |||||
join CdLessonType a | |||||
on t.LessonTypeId=a.ltid | |||||
where EPId='{EPId}' order by a.ltorder, t.LessonNo"; | where EPId='{EPId}' order by a.ltorder, t.LessonNo"; | ||||
var examplan = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(EPId); | |||||
if (examplan.PlanType == "1") | |||||
{ | |||||
sql = $@"select distinct t.EPLId,t.LessonName,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t | |||||
join (select l.lessonno,l.LessonTypeId,lt.ltorder from [dbo].[LessonInfo] l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.checkmark=1) a | |||||
on SUBSTRING(t.LessonNo,0,CHARINDEX('(',t.LessonNo))=a.lessonno | |||||
where EPId='{EPId}' order by a.ltorder, t.LessonNo"; | |||||
} | |||||
// var examplan = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(EPId); | |||||
// if (examplan.PlanType == "1") | |||||
// { | |||||
// sql = $@"select distinct t.EPLId,t.LessonName,a.ltorder,t.LessonNo from Exam_ExamPlanLesson t | |||||
//join (select l.lessonno,l.LessonTypeId,lt.ltorder from [dbo].[Exam_ExamLesson] l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.ELEnabled=1) a | |||||
//on SUBSTRING(t.LessonNo,0,CHARINDEX('(',t.LessonNo))=a.lessonno | |||||
// where EPId='{EPId}' order by a.ltorder, t.LessonNo"; | |||||
// } | |||||
return this.BaseRepository("CollegeMIS").FindTable(sql); | return this.BaseRepository("CollegeMIS").FindTable(sql); | ||||
} | } | ||||
@@ -327,37 +327,41 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var exam_ExamPlan = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(x => x.EPId == EPId); | var exam_ExamPlan = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(x => x.EPId == EPId); | ||||
if (exam_ExamPlan.PlanType == "1") | if (exam_ExamPlan.PlanType == "1") | ||||
{ | { | ||||
//必修 | |||||
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) | |||||
select NEWID(),'{EPId}',LessonName+'('+grade+')',LessonNo+'('+grade+')' from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' | |||||
and LessonNo+'('+grade+')' not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') | |||||
group by LessonNo,grade,LessonName"; | |||||
//必修+'('+grade+')' | |||||
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade) | |||||
select NEWID(),'{EPId}',LessonName,LessonNo,LessonTypeId,grade from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' | |||||
and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') | |||||
group by LessonNo,grade,LessonName,LessonTypeId,grade"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | ||||
} | } | ||||
else if (exam_ExamPlan.PlanType == "2") | else if (exam_ExamPlan.PlanType == "2") | ||||
{ | { | ||||
//补考 | //补考 | ||||
string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) | |||||
select NEWID(),'{EPId}',a.lessonname,a.LessonNo | |||||
string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade) | |||||
select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId,b.Grade | |||||
from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo | from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo | ||||
join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' ) t on a.lessonno=t.lessonno | |||||
--left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno | |||||
where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) | where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) | ||||
and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) | and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) | ||||
and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' | and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' | ||||
and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') | |||||
group by LessonNo,lessonname"; | |||||
and a.LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') | |||||
group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId,b.Grade"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | ||||
} | } | ||||
else if (exam_ExamPlan.PlanType == "3") | else if (exam_ExamPlan.PlanType == "3") | ||||
{ | { | ||||
//重修 | //重修 | ||||
string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) | |||||
select NEWID(),'{EPId}',a.lessonname,a.LessonNo | |||||
string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade) | |||||
select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId,b.Grade | |||||
from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo | from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo | ||||
join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' ) t on a.lessonno=t.lessonno | |||||
--left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno | |||||
where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) | where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) | ||||
and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) | and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) | ||||
and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' | and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' | ||||
and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') | and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') | ||||
group by LessonNo,lessonname"; | |||||
group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId,b.Grade "; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | ||||
} | } | ||||
@@ -588,20 +592,19 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId | |||||
return (false, "请先安排考试记录时间!"); | return (false, "请先安排考试记录时间!"); | ||||
} | } | ||||
//考试课程数据 | //考试课程数据 | ||||
var EPLessonList = db.FindList<Exam_ExamPlanLessonEntity>($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,info.TeachMajorNo,t.* from Exam_ExamPlanLesson t | |||||
join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo | |||||
left join LessonInfo info on t.LessonNo=info.LessonNo | |||||
left join CdLessonType ltype on info.LessonTypeId=ltype.LTId | |||||
where t.EPId='{EPId}' and info.CheckMark=1 "); | |||||
if (examPlan.PlanType == "1") | |||||
{ | |||||
//必修 | |||||
EPLessonList = db.FindList<Exam_ExamPlanLessonEntity>($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,info.TeachMajorNo,t.* from Exam_ExamPlanLesson t | |||||
join Exam_ExamLesson elesson on left(t.LessonNo,charindex('(',t.LessonNo)-1)=elesson.LessonNo | |||||
left join LessonInfo info on left(t.LessonNo,charindex('(',t.LessonNo)-1)=info.LessonNo | |||||
left join CdLessonType ltype on info.LessonTypeId=ltype.LTId | |||||
where t.EPId='{EPId}' and info.CheckMark=1 "); | |||||
} | |||||
var EPLessonList = db.FindList<Exam_ExamPlanLessonEntity>($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t | |||||
join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}' | |||||
left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId | |||||
where t.EPId='{EPId}' and elesson.ELEnabled=1 "); | |||||
// if (examPlan.PlanType == "1") | |||||
// { | |||||
// //必修 | |||||
// EPLessonList = db.FindList<Exam_ExamPlanLessonEntity>($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t | |||||
//join Exam_ExamLesson elesson on left(t.LessonNo,charindex('(',t.LessonNo)-1)=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}' | |||||
//left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId | |||||
// where t.EPId='{EPId}' and elesson.ELEnabled=1 | |||||
// "); | |||||
// } | |||||
if (EPLessonList.ToList().Exists(x => x.ExamLength == null || x.ExamLength <= 0)) | if (EPLessonList.ToList().Exists(x => x.ExamLength == null || x.ExamLength <= 0)) | ||||
{ | { | ||||
@@ -615,7 +618,7 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId | |||||
{ | { | ||||
EPLesson.ExamDate = null; | EPLesson.ExamDate = null; | ||||
EPLesson.ExamTime = null; | EPLesson.ExamTime = null; | ||||
if (EPLesson.LessonTypeName.Contains("公共") || EPLesson.LessonTypeName.Contains("公开")) | |||||
if (!string.IsNullOrEmpty(EPLesson.LessonTypeName) && (EPLesson.LessonTypeName.Contains("公共") || EPLesson.LessonTypeName.Contains("公开"))) | |||||
{ | { | ||||
var EPTimes = EPTimeList.Where(x => x.ExamType == "2" && x.ExamTimeLength == EPLesson.ExamLength).ToList(); | var EPTimes = EPTimeList.Where(x => x.ExamType == "2" && x.ExamTimeLength == EPLesson.ExamLength).ToList(); | ||||
foreach (var EPTime in EPTimes) | foreach (var EPTime in EPTimes) | ||||
@@ -35,6 +35,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("SEMESTER")] | [Column("SEMESTER")] | ||||
public int? Semester { get; set; } | public int? Semester { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 年级 | |||||
/// </summary> | |||||
[Column("GRADE")] | |||||
public int? Grade { get; set; } | |||||
/// <summary> | |||||
/// 学生编码 | /// 学生编码 | ||||
/// </summary> | /// </summary> | ||||
[Column("STUNO")] | [Column("STUNO")] | ||||
@@ -33,7 +33,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" * "); | |||||
strSql.Append(@" t.* "); | |||||
strSql.Append(" FROM Exam_ExamStudent t "); | strSql.Append(" FROM Exam_ExamStudent t "); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
@@ -360,14 +360,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (ESType == "1") | if (ESType == "1") | ||||
{ | { | ||||
strSql.Append( | strSql.Append( | ||||
$@"insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled) | |||||
select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1 from StuInfoBasic a where CheckMark = '1' and stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' union | |||||
$@"insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade) | |||||
select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1,a.Grade from StuInfoBasic a where CheckMark = '1' and stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' union | |||||
select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1')"); | select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1')"); | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
strSql.Append(@" insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled) "); | |||||
strSql.Append($"select newid(),a.classno,'{AcademicYearNo}','{Semester}',a.stuno,a.stuname,'{ESType}',1 from "); | |||||
strSql.Append(@" insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade) "); | |||||
strSql.Append($"select newid(),a.classno,'{AcademicYearNo}','{Semester}',a.stuno,a.stuname,'{ESType}',1,b.Grade from "); | |||||
if (ESType == "2") | if (ESType == "2") | ||||
{ | { | ||||
strSql.Append(" StuScore "); | strSql.Append(" StuScore "); | ||||
@@ -382,7 +382,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); | strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); | ||||
strSql.Append($@" and a.stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' union | strSql.Append($@" and a.stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' union | ||||
select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1' ) "); | select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1' ) "); | ||||
strSql.Append(" group by a.stuno,a.stuname,a.classno"); | |||||
strSql.Append(" group by a.stuno,a.stuname,a.classno,b.Grade"); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").ExecuteBySql(strSql.ToString()); | return this.BaseRepository("CollegeMIS").ExecuteBySql(strSql.ToString()); | ||||
} | } | ||||
@@ -909,6 +909,28 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public (DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string fileGuid) | |||||
{ | |||||
try | |||||
{ | |||||
return accommodationService.ExecuteImportExcel(dt, fileGuid); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -108,6 +108,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
object GetBedList(string parentID); | object GetBedList(string parentID); | ||||
void ClearEntity(string Grade); | void ClearEntity(string Grade); | ||||
(DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string fileGuid); | |||||
#endregion | #endregion | ||||
@@ -1,5 +1,7 @@ | |||||
using Dapper; | using Dapper; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | using Learun.Application.TwoDevelopment.EducationalAdministration; | ||||
using Learun.Cache.Base; | |||||
using Learun.Cache.Factory; | |||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
@@ -19,6 +21,10 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
/// </summary> | /// </summary> | ||||
public class AccommodationService : RepositoryFactory | public class AccommodationService : RepositoryFactory | ||||
{ | { | ||||
#region 缓存定义 | |||||
private ICache cache = CacheFactory.CaChe(); | |||||
private string cacheKey = "Learun_adms_excelError_"; // +公司主键 | |||||
#endregion | |||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | /// <summary> | ||||
@@ -1927,6 +1933,292 @@ where ID='{ParentID}' | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 导入宿舍信息 | |||||
/// </summary> | |||||
/// <param name="dt"></param> | |||||
/// <returns></returns> | |||||
public (DataTable failDt, int snum, int fnum) ExecuteImportExcel(DataTable dt, string fileGuid) | |||||
{ | |||||
int snum = 0; | |||||
int fnum = 0; | |||||
var db = this.BaseRepository("CollegeMIS"); | |||||
var msg = ""; | |||||
try | |||||
{ | |||||
db.BeginTrans(); | |||||
var dormitoryBuildList = db.FindList<Acc_DormitoryBuildEntity>().ToList(); | |||||
//系 专业 班级 | |||||
var deptList = db.FindList<CdDeptEntity>(); | |||||
var majorList = db.FindList<CdMajorEntity>(x => x.CheckMark == true); | |||||
var classList = db.FindList<ClassInfoEntity>(x => x.CheckMark == true); | |||||
//学生 | |||||
var stuinfobasic = db.FindList<StuInfoBasicEntity>(); | |||||
// 创建一个datatable容器用于保存导入失败的数据 | |||||
DataTable failDt = new DataTable(); | |||||
foreach (DataColumn dc in dt.Columns) | |||||
{ | |||||
failDt.Columns.Add(dc.ColumnName, dc.DataType); | |||||
} | |||||
failDt.Columns.Add("导入错误", typeof(string)); | |||||
dt.Columns.Add("导入错误", typeof(string)); | |||||
//寝室Id | |||||
var dormitoryIds = new List<string>(); | |||||
var user = LoginUserInfo.Get(); | |||||
foreach (DataRow dr in dt.Rows) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(dr["宿舍楼"].ToString().Trim())) | |||||
{ | |||||
//系 专业 班级 | |||||
var DeptNo = deptList.Where(x => x.DeptName == dr["系部"].ToString().Trim()).FirstOrDefault()?.DeptNo; | |||||
var MajorNo = majorList.Where(x => x.MajorName == dr["专业"].ToString().Trim() && x.DeptNo == DeptNo) | |||||
.FirstOrDefault()?.MajorNo; | |||||
var ClassNo = classList.Where(x => x.ClassName == dr["班级"].ToString()).FirstOrDefault()?.ClassNo; | |||||
if (string.IsNullOrEmpty(DeptNo)) | |||||
{ | |||||
fnum++; | |||||
dr["导入错误"] = "系部导入错误"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (string.IsNullOrEmpty(MajorNo)) | |||||
{ | |||||
fnum++; | |||||
dr["导入错误"] = "专业导入错误"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
if (string.IsNullOrEmpty(ClassNo)) | |||||
{ | |||||
fnum++; | |||||
dr["导入错误"] = "班级导入错误"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
var leaderno = ""; | |||||
if (!string.IsNullOrEmpty(dr["舍长学号"].ToString())) | |||||
{ | |||||
leaderno = stuinfobasic.Where(x => x.StuNo == dr["舍长学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo; | |||||
if (string.IsNullOrEmpty(leaderno)) | |||||
{ | |||||
fnum++; | |||||
dr["导入错误"] = dr["舍长学号"] + "导入错误"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
} | |||||
var stuno = ""; | |||||
if (!string.IsNullOrEmpty(dr["学生学号"].ToString())) | |||||
{ | |||||
stuno = stuinfobasic.Where(x => x.StuNo == dr["学生学号"].ToString() && x.ClassNo == ClassNo).FirstOrDefault()?.StuNo; | |||||
if (string.IsNullOrEmpty(stuno)) | |||||
{ | |||||
fnum++; | |||||
dr["导入错误"] = dr["学生学号"] + "导入错误"; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
} | |||||
var parent = dormitoryBuildList.Where(x => x.Name == "数字化智慧校园").FirstOrDefault(); | |||||
if (parent == null) | |||||
{ | |||||
parent = new Acc_DormitoryBuildEntity(); | |||||
parent.Create(); | |||||
parent.DNo = ""; | |||||
parent.Name = "数字化智慧校园"; | |||||
//parent.BuildType = "1"; | |||||
parent.CreateBy = user.realName; | |||||
parent.CreateTime = DateTime.Now; | |||||
parent.Campus = user.companyId; | |||||
db.Insert(parent); | |||||
dormitoryBuildList.Add(parent); | |||||
} | |||||
//宿舍楼 | |||||
var apartmentName = dr["宿舍楼"].ToString().Trim(); | |||||
var apartmentCode = dr["宿舍楼编号"].ToString(); | |||||
var apartment = dormitoryBuildList.Where(x => x.Name == apartmentName && x.BuildType == "1") | |||||
.FirstOrDefault(); | |||||
if (apartment == null) | |||||
{ | |||||
//添加宿舍楼 | |||||
apartment = new Acc_DormitoryBuildEntity(); | |||||
apartment.Create(); | |||||
apartment.ParentID = parent.ID; | |||||
apartment.DNo = apartmentCode; | |||||
apartment.Name = apartmentName; | |||||
apartment.BuildType = "1"; | |||||
apartment.CreateBy = user.realName; | |||||
apartment.CreateTime = DateTime.Now; | |||||
apartment.Campus = user.companyId; | |||||
db.Insert(apartment); | |||||
dormitoryBuildList.Add(apartment); | |||||
} | |||||
//单元 | |||||
var unitName = dr["单元"].ToString().Trim(); | |||||
var unitCode = dr["单元编号"].ToString(); | |||||
var unit = dormitoryBuildList.Where(x => x.Name == unitName && x.BuildType == "2" && x.ParentID == apartment.ID) | |||||
.FirstOrDefault(); | |||||
if (unit == null) | |||||
{ | |||||
//添加单元 | |||||
unit = new Acc_DormitoryBuildEntity(); | |||||
unit.Create(); | |||||
unit.ParentID = apartment.ID; | |||||
unit.ApartmentId = apartment.ID; | |||||
unit.DNo = unitCode; | |||||
unit.Name = unitName; | |||||
unit.BuildType = "2"; | |||||
unit.CreateBy = user.realName; | |||||
unit.CreateTime = DateTime.Now; | |||||
unit.Campus = user.companyId; | |||||
db.Insert(unit); | |||||
dormitoryBuildList.Add(unit); | |||||
} | |||||
//楼层 | |||||
var floorName = dr["楼层"].ToString().Trim(); | |||||
var floorCode = dr["楼层编号"].ToString(); | |||||
var floor = dormitoryBuildList.Where(x => x.Name == floorName && x.DNo == floorCode && x.BuildType == "3" && x.ParentID == unit.ID) | |||||
.FirstOrDefault(); | |||||
if (floor == null) | |||||
{ | |||||
//添加楼层 | |||||
floor = new Acc_DormitoryBuildEntity(); | |||||
floor.Create(); | |||||
floor.ParentID = unit.ID; | |||||
floor.ApartmentId = apartment.ID; | |||||
floor.UnitId = unit.ID; | |||||
floor.DNo = floorCode; | |||||
floor.Name = floorName; | |||||
floor.BuildType = "3"; | |||||
floor.CreateBy = user.realName; | |||||
floor.CreateTime = DateTime.Now; | |||||
floor.Campus = user.companyId; | |||||
db.Insert(floor); | |||||
dormitoryBuildList.Add(floor); | |||||
} | |||||
//寝室 | |||||
var dormitoryName = dr["寝室名称"].ToString().Trim(); | |||||
var dormitoryCode = dr["寝室编号"].ToString().Trim(); | |||||
var dormitory = dormitoryBuildList.Where(x => x.Name == dormitoryName && x.DNo == dormitoryCode && x.BuildType == "4" && x.ParentID == floor.ID) | |||||
.FirstOrDefault(); | |||||
if (dormitory == null) | |||||
{ | |||||
//添加 | |||||
dormitory = new Acc_DormitoryBuildEntity(); | |||||
dormitory.Create(); | |||||
dormitory.Dept = DeptNo; | |||||
dormitory.Major = MajorNo; | |||||
dormitory.Class = ClassNo; | |||||
dormitory.ParentID = floor.ID; | |||||
dormitory.ApartmentId = apartment.ID; | |||||
dormitory.UnitId = unit.ID; | |||||
dormitory.FloorId = floor.ID; | |||||
dormitory.DNo = dormitoryCode; | |||||
dormitory.Name = dormitoryName; | |||||
dormitory.Sex = dr["性别"].ToString() == "女" ? "0" : "1"; | |||||
dormitory.BuildType = "4"; | |||||
dormitory.RoomType = Convert.ToInt32(dr["几人寝"].ToString()); | |||||
dormitory.Leader = leaderno; | |||||
dormitory.Starred = "3"; | |||||
dormitory.CreateBy = user.realName; | |||||
dormitory.CreateTime = DateTime.Now; | |||||
dormitory.Campus = user.companyId; | |||||
db.Insert(dormitory); | |||||
dormitoryBuildList.Add(dormitory); | |||||
} | |||||
dormitoryIds.Add(dormitory.ID); | |||||
//床位 | |||||
var bedName = dr["床位"].ToString().Trim(); | |||||
var bedCode = bedName.Replace("床", "").Replace("号", ""); | |||||
var bed = dormitoryBuildList.Where(x => x.Name == bedName && x.DNo == bedCode && x.BuildType == "5" && x.ParentID == dormitory.ID) | |||||
.FirstOrDefault(); | |||||
if (bed == null) | |||||
{ | |||||
bed = new Acc_DormitoryBuildEntity(); | |||||
bed.Create(); | |||||
bed.ParentID = dormitory.ID; | |||||
bed.ApartmentId = apartment.ID; | |||||
bed.UnitId = unit.ID; | |||||
bed.FloorId = floor.ID; | |||||
bed.DNo = bedCode; | |||||
bed.Name = bedName; | |||||
bed.Dept = DeptNo; | |||||
bed.Major = MajorNo; | |||||
bed.Class = ClassNo; | |||||
bed.StudentID = stuno; | |||||
bed.Leader = leaderno; | |||||
bed.BuildType = "5"; | |||||
bed.CreateBy = user.realName; | |||||
bed.CreateTime = DateTime.Now; | |||||
bed.Campus = user.companyId; | |||||
db.Insert(bed); | |||||
dormitoryBuildList.Add(bed); | |||||
snum++; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
break; | |||||
} | |||||
} | |||||
catch (Exception e) | |||||
{ | |||||
fnum++; | |||||
dr["导入错误"] = "出现异常:" + e.Message; | |||||
failDt.Rows.Add(dr.ItemArray); | |||||
continue; | |||||
} | |||||
} | |||||
db.Commit(); | |||||
//更新寝室入住人数字段 | |||||
var ids = string.Join("','", dormitoryIds); | |||||
var sql = $@" update a set a.CheckInStu=b.num | |||||
from Acc_DormitoryBuild a join (select parentid,count(1) as num from Acc_DormitoryBuild where buildtype='5' and studentid is not null and len(studentid)>0 and parentid in ('{ids}') group by parentid) b | |||||
on a.id=b.parentid | |||||
where a.id in ('{ids}') and a.buildtype='4'"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
// 写入缓存如果有未导入的数据 | |||||
if (failDt.Rows.Count > 0) | |||||
{ | |||||
string errordt = failDt.ToJson(); | |||||
cache.Write<string>(cacheKey + fileGuid, errordt, CacheId.excel); | |||||
} | |||||
return (failDt, snum, fnum); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion 提交数据 | #endregion 提交数据 | ||||
} | } | ||||
} | } |