diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EATalentTrainController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EATalentTrainController.cs index 5039cdcf7..ba29b92d5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EATalentTrainController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EATalentTrainController.cs @@ -111,6 +111,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } return Success("保存成功!"); } + /// + /// 修改状态 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult UpdateStatus(string keyValue,int Status) + { + eATalentTrainIBLL.UpdateStatus(keyValue, Status); + return Success("操作成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.cshtml index 73fd5de16..f135ab19b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.cshtml @@ -3,33 +3,61 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
+
方案名称*
+ +
+
学年*
-
+
-
+
学期*
-
+
-
+
专业*
-
+
-
+
入学要求
- +
-
+
修业年限
- +
-
+
培训方案
-
+
+
+
+
计划招生人数
+ +
+
+
计划教学课程
+
+
+
+
就业领域
+ +
+
+
教学条件
+ +
+
+
教学资源
+ +
+
+
培养目标
+
-
+
备注
- +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/EATalentTrain/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.js index 4f6922d21..a3a51f7d0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Form.js @@ -31,7 +31,9 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#PlannedCourse').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', type: 'multiple' }); + $('#ProgramFile').lrUploader(); }, initData: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.cshtml index 6bc88f443..262981454 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.cshtml @@ -31,9 +31,12 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js index 29b3cccc8..f3e352ba6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EATalentTrain/Index.js @@ -79,12 +79,80 @@ var bootstrap = function ($, learun) { }); } }); + + //提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + return learun.alert.warning('只有草稿状态才可提交!'); + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 1 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //审核通过 + $('#lr_check').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == 0) { + return learun.alert.warning('请先提交!'); + } + learun.layerConfirm('是否确认审核通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 2 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //审核不通过 + $('#lr_nocheck').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == 0) { + return learun.alert.warning('请先提交!'); + } + learun.layerConfirm('是否确认审核不通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/UpdateStatus', { keyValue: keyValue, Status: 3 }, function () { + refreshGirdData(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/EATalentTrain/GetPageList', headData: [ + { label: "方案名称", name: "Name", width: 150, align: "left" }, + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return '草稿'; + } else if (cellvalue == 1) { + return "待审核"; + } else if (cellvalue == 2) { + return "审核通过"; + } else { + return "未通过"; + } + + } + }, { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, { label: "学期", name: "Semester", width: 100, align: "left" }, { @@ -102,6 +170,24 @@ var bootstrap = function ($, learun) { }, { label: "入学要求", name: "EntranceRequire", width: 150, align: "left" }, { label: "修业年限", name: "YearLimit", width: 100, align: "left" }, + { label: "计划招生人数", name: "PlannedNum", width: 100, align: "left" }, + { + label: "计划教学课程", name: "PlannedCourse", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', + key: value, + keyId: 'lessonid', + callback: function (_data) { + callback(_data['lessonname']); + } + }); + } + }, + { label: "就业领域", name: "EmploymentField", width: 100, align: "left" }, + { label: "教学条件", name: "TeachingCondition", width: 100, align: "left" }, + { label: "教学资源", name: "TeachingResource", width: 100, align: "left" }, + { label: "培养目标", name: "TrainingObjectives", width: 100, align: "left" }, ], mainId: 'Id', isPage: true diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs index 19865e458..00a2a4c2f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainBLL.cs @@ -93,7 +93,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - + /// + /// 修改状态 + /// + /// 主键 + public void UpdateStatus(string keyValue, int Status) + { + try + { + eATalentTrainService.UpdateStatus(keyValue, Status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 保存实体数据(新增、修改) /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs index 9115d5275..9c61b788b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainEntity.cs @@ -20,6 +20,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("ID")] public string Id { get; set; } /// + /// 方案名称 + /// + [Column("NAME")] + public string Name { get; set; } + /// /// 学年 /// [Column("ACADEMICYEARNO")] @@ -54,6 +59,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("REMARK")] public string Remark { get; set; } + + /// + /// 计划招生人数 + /// + [Column("PLANNEDNUM")] + public int? PlannedNum { get; set; } + /// + /// 计划教学课程 + /// + [Column("PLANNEDCOURSE")] + public string PlannedCourse { get; set; } + /// + /// 就业领域 + /// + [Column("EMPLOYMENTFIELD")] + public string EmploymentField { get; set; } + /// + /// 教学条件 + /// + [Column("TEACHINGCONDITION")] + public string TeachingCondition { get; set; } + /// + /// 教学资源 + /// + [Column("TEACHINGRESOURCE")] + public string TeachingResource { get; set; } + /// + /// 培养目标 + /// + [Column("TRAININGOBJECTIVES")] + public string TrainingObjectives { get; set; } + + /// + /// 状态 + /// + [Column("STATUS")] + public int? Status { get; set; } + #endregion #region 扩展操作 @@ -63,6 +106,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public void Create() { this.Id = Guid.NewGuid().ToString(); + this.Status = 0; } /// /// 编辑调用 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs index df57227cc..ddff805fb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainIBLL.cs @@ -36,6 +36,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 主键 void DeleteEntity(string keyValue); + void UpdateStatus(string keyValue, int Status); /// /// 保存实体数据(新增、修改) /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs index 5821ff074..678c2df73 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EATalentTrain/EATalentTrainService.cs @@ -38,20 +38,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var dp = new DynamicParameters(new { }); if (!queryParam["AcademicYearNo"].IsEmpty()) { - dp.Add("AcademicYearNo",queryParam["AcademicYearNo"].ToString(), DbType.String); + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); } if (!queryParam["Semester"].IsEmpty()) { - dp.Add("Semester",queryParam["Semester"].ToString(), DbType.String); + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); strSql.Append(" AND t.Semester = @Semester "); } 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 "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -102,7 +102,27 @@ 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) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public void UpdateStatus(string keyValue, int Status) + { + try + { + string sql = $"update EATalentTrain set Status={Status} where Id='{keyValue}'"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } catch (Exception ex) {