diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentCertificateController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentCertificateController.cs index 65897e9e2..03529aad6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentCertificateController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StudentCertificateController.cs @@ -41,6 +41,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 修改分值 + /// + /// + [HttpGet] + public ActionResult FormScore() + { + return View(); + } + #endregion #region 获取数据 @@ -146,6 +156,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } return Success("保存成功!"); } + + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, string processId) + { + studentCertificateIBLL.ChangeStatusById(keyValue, 1, processId); + return Success("操作成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.js index 00a67ea72..b9084206b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.js @@ -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); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/FormScore.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/FormScore.cshtml new file mode 100644 index 000000000..79c317810 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/FormScore.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "学生证书管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学生学号*
+ +
+
+
学生姓名*
+ +
+
+
证书名称*
+ +
+
+
分值*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentCertificate/FormScore.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/FormScore.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/FormScore.js new file mode 100644 index 000000000..e61825a1d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.cshtml index d89dcfa3d..4b65b764f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.cshtml @@ -51,7 +51,9 @@  新增  复制  编辑 +  修改分值  删除 +  提交  打印 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.js index 9deeabdab..820478021 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.js @@ -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 '审批中'; + } else if (cellvalue === 2) { + return '审核通过'; + } else { + return '草稿'; + } + } + }, ], - 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(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index a19acc0b6..ceb38abf2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1141,6 +1141,7 @@ + @@ -1232,6 +1233,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateBLL.cs index f3a5798bd..ccebd9597 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateBLL.cs @@ -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 } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateEntity.cs index 3d65fef96..0ccdc6e68 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateEntity.cs @@ -102,6 +102,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
public void Create() { + this.Id = Guid.NewGuid().ToString(); this.CreateTime = DateTime.Now; this.CreateUserId = LoginUserInfo.Get().userId; this.Status = 0; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateIBLL.cs index f19680db5..df0f17d7e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateIBLL.cs @@ -50,6 +50,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 实体 void SaveEntity(string keyValue, StudentCertificateEntity entity); void ChangeStatusByProcessId(string processId, int status); + void ChangeStatusById(string keyValue, int status,string processId); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateService.cs index 81016af3a..6c39ee105 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateService.cs @@ -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(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -138,7 +127,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return this.BaseRepository("CollegeMIS").FindEntity(t=>t.processId == processId); + return this.BaseRepository("CollegeMIS").FindEntity(t => t.processId == processId); } catch (Exception ex) { @@ -165,7 +154,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + this.BaseRepository("CollegeMIS").Delete(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) {