@@ -41,6 +41,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 修改分值 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormScore() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -146,6 +156,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ChangeStatusById(string keyValue, string processId) | |||
{ | |||
studentCertificateIBLL.ChangeStatusById(keyValue, 1, processId); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -49,14 +49,21 @@ var bootstrap = function ($, learun) { | |||
$('#SCUrl').lrUploader(); | |||
$('#StuNo').blur(function () { | |||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/GetStuData?stuno=' + $('#StuNo').val() + '&stuname=' + $('#StuName').val(), function (res) { | |||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/GetStuData?stuno=' + $('#StuNo').val(), function (res) { | |||
learun.loading(false); | |||
if (res.code == learun.httpCode.success) { | |||
var data = res.data; | |||
$('#StuName').val(data.StuName); | |||
$('#DeptNo').lrselectSet(data.DeptNo); | |||
$('#MajorNo').lrselectSet(data.MajorNo); | |||
$('#ClassNo').lrselectSet(data.ClassNo); | |||
if (!!data) { | |||
$('#StuName').val(data.StuName); | |||
$('#DeptNo').lrselectSet(data.DeptNo); | |||
$('#MajorNo').lrselectSet(data.MajorNo); | |||
$('#ClassNo').lrselectSet(data.ClassNo); | |||
} else { | |||
$('#StuName').val(); | |||
$('#DeptNo').lrselectSet(); | |||
$('#MajorNo').lrselectSet(); | |||
$('#ClassNo').lrselectSet(); | |||
} | |||
} | |||
else { | |||
learun.alert.error(res.info); | |||
@@ -64,14 +71,21 @@ var bootstrap = function ($, learun) { | |||
}); | |||
}); | |||
$('#StuName').blur(function () { | |||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/GetStuData?stuno=' + $('#StuNo').val() + '&stuname=' + $('#StuName').val(), function (res) { | |||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/GetStuData?stuname=' + $('#StuName').val(), function (res) { | |||
learun.loading(false); | |||
if (res.code == learun.httpCode.success) { | |||
var data = res.data; | |||
$('#StuNo').val(data.StuNo); | |||
$('#DeptNo').lrselectSet(data.DeptNo); | |||
$('#MajorNo').lrselectSet(data.MajorNo); | |||
$('#ClassNo').lrselectSet(data.ClassNo); | |||
if (!!data) { | |||
$('#StuNo').val(data.StuNo); | |||
$('#DeptNo').lrselectSet(data.DeptNo); | |||
$('#MajorNo').lrselectSet(data.MajorNo); | |||
$('#ClassNo').lrselectSet(data.ClassNo); | |||
} else { | |||
$('#StuName').val(); | |||
$('#DeptNo').lrselectSet(); | |||
$('#MajorNo').lrselectSet(); | |||
$('#ClassNo').lrselectSet(); | |||
} | |||
} | |||
else { | |||
learun.alert.error(res.info); | |||
@@ -0,0 +1,23 @@ | |||
@{ | |||
ViewBag.Title = "学生证书管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="StudentCertificate" > | |||
<div class="lr-form-item-title">学生学号<font face="宋体">*</font></div> | |||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StudentCertificate" > | |||
<div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | |||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StudentCertificate" > | |||
<div class="lr-form-item-title">证书名称<font face="宋体">*</font></div> | |||
<input id="SCName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StudentCertificate" > | |||
<div class="lr-form-item-title">分值<font face="宋体">*</font></div> | |||
<input id="SCScore" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentCertificate/FormScore.js") |
@@ -0,0 +1,94 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-08-30 11:05 | |||
* 描 述:学生证书管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var type = request('type'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if (id == 'StudentCertificate' && data[id]) { | |||
keyValue = data[id].Id; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.processId = processId; | |||
} | |||
if (type == 'copy') { | |||
keyValue = ''; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -51,7 +51,9 @@ | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_copy" class="btn btn-default"><i class="fa fa-plus"></i> 复制</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_updscore" class="btn btn-default"><i class="fa fa-plus"></i> 修改分值</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
@@ -17,9 +17,9 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 240, 400); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -70,6 +70,31 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//修改分值 | |||
$('#lr_updscore').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form_updscore', | |||
title: '修改分值', | |||
url: top.$.rootUrl + '/EducationalAdministration/StudentCertificate/FormScore?keyValue=' + keyValue, | |||
width: 500, | |||
height: 350, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
} | |||
}); | |||
//复制 | |||
$('#lr_copy').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
@@ -77,7 +102,7 @@ var bootstrap = function ($, learun) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/StudentCertificate/Form?keyValue=' + keyValue+'&type=copy', | |||
url: top.$.rootUrl + '/EducationalAdministration/StudentCertificate/Form?keyValue=' + keyValue + '&type=copy', | |||
width: 720, | |||
height: 550, | |||
callBack: function (id) { | |||
@@ -101,13 +126,34 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var Status = $('#gridtable').jfGridValue('Status'); | |||
if (Status != '0') { | |||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StudentCertificate/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
@@ -115,77 +161,96 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StudentCertificate/GetPageList', | |||
headData: [ | |||
{ label: "学生学号", name: "StuNo", width: 100, align: "left"}, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left"}, | |||
{ label: "专业部", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
}}, | |||
{ label: "专业", name: "MajorNo", width: 100, 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: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
}}, | |||
{ label: "证书名称", name: "SCName", width: 100, align: "left"}, | |||
{ label: "证书级别", name: "SCLevel", width: 100, align: "left"}, | |||
{ label: "证书种类", name: "SCType", width: 100, align: "left"}, | |||
{ label: "分值", name: "SCScore", width: 100, align: "left"}, | |||
{ label: "获取时间", name: "SCTime", width: 100, align: "left"}, | |||
{ label: "学生学号", name: "StuNo", width: 150, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "专业部", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, 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: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "证书名称", name: "SCName", width: 100, align: "left" }, | |||
{ label: "证书级别", name: "SCLevel", width: 100, align: "left" }, | |||
{ label: "证书种类", name: "SCType", width: 100, align: "left" }, | |||
{ label: "分值", name: "SCScore", width: 100, align: "left" }, | |||
{ | |||
label: "获取时间", name: "SCTime", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||
} | |||
}, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === 2) { | |||
return '<span class=\"label label-success\">审核通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (!!res) | |||
{ | |||
if (res.code == 200) | |||
{ | |||
// 发起流程 | |||
var postData = { | |||
schemeCode:'',// 填写流程对应模板编号 | |||
processId:processId, | |||
level:'1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { | |||
learun.loading(false); | |||
}); | |||
if (res && res.code && res.code == 200) { | |||
var postData = { | |||
schemeCode: 'LC_StudentCertificate',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -1141,6 +1141,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForStudent.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StudentCertificate\FormScore.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\Index.js" /> | |||
@@ -1232,6 +1233,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuGraduateStatistic\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StudentCertificate\FormScore.cshtml" /> | |||
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | |||
@@ -159,6 +159,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public void ChangeStatusById(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
studentCertificateService.ChangeStatusById(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -102,6 +102,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.CreateUserId = LoginUserInfo.Get().userId; | |||
this.Status = 0; | |||
@@ -50,6 +50,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, StudentCertificateEntity entity); | |||
void ChangeStatusByProcessId(string processId, int status); | |||
void ChangeStatusById(string keyValue, int status,string processId); | |||
#endregion | |||
} | |||
@@ -32,18 +32,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.StuNo, | |||
t.StuName, | |||
t.DeptNo, | |||
t.MajorNo, | |||
t.ClassNo, | |||
t.SCName, | |||
t.SCLevel, | |||
t.SCType, | |||
t.SCScore, | |||
t.SCTime, | |||
t.SCUrl | |||
t.* | |||
"); | |||
strSql.Append(" FROM StudentCertificate t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
@@ -62,17 +51,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo",queryParam["DeptNo"].ToString(), DbType.String); | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo",queryParam["MajorNo"].ToString(), DbType.String); | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo",queryParam["ClassNo"].ToString(), DbType.String); | |||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||
} | |||
if (!queryParam["SCName"].IsEmpty()) | |||
@@ -87,10 +76,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
if (!queryParam["SCTime"].IsEmpty()) | |||
{ | |||
dp.Add("SCTime",queryParam["SCTime"].ToString(), DbType.String); | |||
dp.Add("SCTime", queryParam["SCTime"].ToString(), DbType.String); | |||
strSql.Append(" AND t.SCTime = @SCTime "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<StudentCertificateEntity>(strSql.ToString(),dp, pagination); | |||
return this.BaseRepository("CollegeMIS").FindList<StudentCertificateEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -138,7 +127,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<StudentCertificateEntity>(t=>t.processId == processId); | |||
return this.BaseRepository("CollegeMIS").FindEntity<StudentCertificateEntity>(t => t.processId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -165,7 +154,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<StudentCertificateEntity>(t=>t.Id == keyValue); | |||
this.BaseRepository("CollegeMIS").Delete<StudentCertificateEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -218,7 +207,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StudentCertificate set Status='{status}' where processId='{processId}'"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public void ChangeStatusById(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update StudentCertificate set Status='{status}',processId='{processId}' where Id='{keyValue}'"); | |||
} | |||
catch (Exception ex) | |||
{ | |||