From f54f88db00546424adba7f073aeacab79c2c2667 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 20 Sep 2022 11:07:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=88=90=E7=BB=A9?= =?UTF-8?q?=E8=80=83=E6=A0=B8=E8=AE=B0=E8=BD=BD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ScoreCheckInfoController.cs | 164 +++++++++ .../Views/ScoreCheckInfo/Form.cshtml | 23 ++ .../Views/ScoreCheckInfo/Form.js | 128 +++++++ .../Views/ScoreCheckInfo/FormGene.cshtml | 15 + .../Views/ScoreCheckInfo/FormGene.js | 66 ++++ .../Views/ScoreCheckInfo/FormTeach.cshtml | 42 +++ .../Views/ScoreCheckInfo/FormTeach.js | 69 ++++ .../Views/ScoreCheckInfo/Index.cshtml | 68 ++++ .../Views/ScoreCheckInfo/Index.js | 331 ++++++++++++++++++ .../Learun.Application.Web.csproj | 9 + .../ScoreCheckInfoMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../ScoreCheckInfo/ScoreCheckInfoBLL.cs | 190 ++++++++++ .../ScoreCheckInfo/ScoreCheckInfoEntity.cs | 155 ++++++++ .../ScoreCheckInfo/ScoreCheckInfoIBLL.cs | 62 ++++ .../ScoreCheckInfo/ScoreCheckInfoService.cs | 261 ++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 17 files changed, 1617 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScoreCheckInfoMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs new file mode 100644 index 000000000..343bfac5a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs @@ -0,0 +1,164 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-09-19 14:37 + /// 描 述:学业成绩考核记录表 + /// + public class ScoreCheckInfoController : MvcControllerBase + { + private ScoreCheckInfoIBLL scoreCheckInfoIBLL = new ScoreCheckInfoBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 一键生成表单页 + /// + /// + [HttpGet] + public ActionResult FormGene() + { + return View(); + } + /// + /// 教师评价 + /// + /// + [HttpGet] + public ActionResult FormTeach() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = scoreCheckInfoIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var ScoreCheckInfoData = scoreCheckInfoIBLL.GetScoreCheckInfoEntity(keyValue); + var jsonData = new + { + ScoreCheckInfo = ScoreCheckInfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + scoreCheckInfoIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ScoreCheckInfoEntity entity = strEntity.ToObject(); + var model = scoreCheckInfoIBLL.GetStuNoEntity(entity.StuNo, entity.AcademicYearNo, entity.Semester); + if (string.IsNullOrEmpty(keyValue)) + { + if (model != null) + { + return Fail("学生编号已存在!"); + } + } + else + { + if (model != null && model.ID != keyValue) + { + return Fail("学生编号已存在!"); + } + } + scoreCheckInfoIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + [HttpPost] + [AjaxOnly] + public ActionResult SaveGeneForm(string AcademicYearNo, string Semester) + { + int res = scoreCheckInfoIBLL.SaveGeneEntity(AcademicYearNo, Semester); + return Success("本次生成" + res + "条数据!"); + } + + [HttpPost] + [AjaxOnly] + public ActionResult SubmitFrom(string keyValue) + { + scoreCheckInfoIBLL.SubmitEntity(keyValue); + return Success("提交成功!"); + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml new file mode 100644 index 000000000..70f12d569 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "学业成绩考核记录表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
姓名*
+
+ + + + +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js new file mode 100644 index 000000000..b8098fbb9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Form.js @@ -0,0 +1,128 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-09-19 14:37 + * 描 述:学业成绩考核记录表 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorno' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#StuNo').lrGirdSelect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', + selectWord: 'stuname', + value: 'stuno', + text: 'stuname', + headData: + [ + { label: "学号", name: "stuno", width: 100, align: "left" }, + { label: "姓名", name: "stuname", width: 100, align: "left" }, + { + 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: "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: "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']); + } + }); + } + } + ], + select: function (item) { + $("#StuNo").val(item.stuno); + $("#StuName").val(item.stuname); + $("#MajorNo").val(item.majorno); + $("#DeptNo").val(item.deptno); + $("#ClassNo").val(item.classno); + } + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/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]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + console.log(postData,"postData") + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.cshtml new file mode 100644 index 000000000..5b1812e4b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "学业成绩考核记录表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.js new file mode 100644 index 000000000..de595743c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormGene.js @@ -0,0 +1,66 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-09-19 14:37 + * 描 述:学业成绩考核记录表 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/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]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + AcademicYearNo: $('#AcademicYearNo').lrselectGet(), + Semester: $('#Semester').lrselectGet(), + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SaveGeneForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.cshtml new file mode 100644 index 000000000..78f1fa403 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.cshtml @@ -0,0 +1,42 @@ +@{ + ViewBag.Title = "学业成绩考核记录表"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
学号*
+ +
+
+
姓名*
+ +
+
+
专业部*
+
+
+
+
专业*
+
+
+
+
班级*
+
+
+
+
操作等级*
+
+
+
+
班主任评语*
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.js new file mode 100644 index 000000000..0d427dbe0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/FormTeach.js @@ -0,0 +1,69 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-09-19 14:37 + * 描 述:学业成绩考核记录表 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorno' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#OperatingLevel').lrDataItemSelect({ code: 'OperatingLevel' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/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]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml new file mode 100644 index 000000000..2fb2091b1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.cshtml @@ -0,0 +1,68 @@ +@{ + ViewBag.Title = "学业成绩考核记录表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
学号
+ +
+
+
姓名
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js new file mode 100644 index 000000000..cdbe936f9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/Index.js @@ -0,0 +1,331 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-09-19 14:37 + * 描 述:学业成绩考核记录表 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 250, 400); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrselect({ + allowSearch: true, + value: "deptno", + text: "deptname", + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', + select: function (item) { + if (item) { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } + }); + } else { + $('#MajorNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + + } + }); + $('#MajorNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', + value: "majorno", + text: "majorname", + param: { strWhere: "1=1 AND CheckMark=1" }, + select: function (item) { + if (item) { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" } + }); + } else { + $('#ClassNo').lrselectRefresh({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" } + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 AND CheckMark=1" }, + value: "classno", + text: "classname" + }); + + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } + var CheckMark = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckMark === "1") { + learun.alert.warning("当前项目已审核不能编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/Form?keyValue=' + keyValue, + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckMark.indexOf('1') != -1) { + learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //  审核 + $('#lr_lock').on('click', function () { + }); + //  去审核 + $('#lr_unlock').on('click', function () { + }); + //  教师评语 + $('#lr_Coordinator').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } + var CheckMark = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckMark === "1") { + learun.alert.warning("当前项目已审核不能编辑!"); + return; + } + learun.layerForm({ + id: 'formTeach', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/FormTeach?keyValue=' + keyValue, + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + //  一键生成 + $('#lr_generate').on('click', function () { + learun.layerForm({ + id: 'form_import', + title: '生成信息', + url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/FormGene', + width: 400, + height: 300, + btn: ['一键生成', '关闭'], + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + //  提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckMark.indexOf('1') != -1) { + learun.alert.warning("选中记录中包含已提交项目,不可重复提交!"); + return; + } + learun.layerConfirm('是否确认提交选择项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/SubmitFrom', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/ScoreCheckInfo/GetPageList', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 60, align: "left" }, + { label: "学期", name: "Semester", width: 50, align: "left" }, + { label: "学号", name: "StuNo", width: 140, align: "left" }, + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { + label: "专业部", name: "DeptNo", width: 130, 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: 130, 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: 130, 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: "OperatingLevel", width: 60, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'OperatingLevel', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "评语填写人", name: "Signed", 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: "TeacherDemo", width: 200, align: "left" }, + { + label: "评价时间", name: "TDate", width: 100, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { label: "学校教务部门审核意见", name: "CheckOpinion", width: 200, align: "left" }, + { + label: "审核时间", name: "CheckTime", width: 100, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: "审核状态", name: "CheckStatus", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 1) { + return '审核中'; + } else if (cellvalue == 2) { + return '审核通过'; + } else { + return '草稿'; + } + } + }, + ], + mainId: 'ID', + isPage: true, + sidx: 'CreateTime desc', + isMultiselect: true, + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + 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 9bb76a158..b94cad249 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 @@ -872,6 +872,7 @@ + @@ -1131,6 +1132,8 @@ + + @@ -1240,6 +1243,8 @@ + + @@ -6899,6 +6904,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScoreCheckInfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScoreCheckInfoMap.cs new file mode 100644 index 000000000..1f2ca53d6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/ScoreCheckInfoMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-09-19 14:37 + /// 描 述:学业成绩考核记录表 + /// + public class ScoreCheckInfoMap : EntityTypeConfiguration + { + public ScoreCheckInfoMap() + { + #region 表、主键 + //表 + this.ToTable("SCORECHECKINFO"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index cdc7b7936..915eb6e3a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -629,6 +629,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs new file mode 100644 index 000000000..068a37369 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoBLL.cs @@ -0,0 +1,190 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-09-19 14:37 + /// 描 述:学业成绩考核记录表 + /// + public class ScoreCheckInfoBLL : ScoreCheckInfoIBLL + { + private ScoreCheckInfoService scoreCheckInfoService = new ScoreCheckInfoService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return scoreCheckInfoService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取ScoreCheckInfo表实体数据 + /// + /// 主键 + /// + public ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue) + { + try + { + return scoreCheckInfoService.GetScoreCheckInfoEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + public ScoreCheckInfoEntity GetStuNoEntity(string keyValue, string AcademicYearNo, string Semester) + { + try + { + return scoreCheckInfoService.GetStuNoEntity(keyValue, AcademicYearNo, Semester); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + scoreCheckInfoService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, ScoreCheckInfoEntity entity) + { + try + { + scoreCheckInfoService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 一键生成 + /// + /// 学年 + /// 学期 + public int SaveGeneEntity(string AcademicYearNo, string Semester) + { + try + { + return scoreCheckInfoService.SaveGeneEntity(AcademicYearNo, Semester); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 提交选中项 + /// + /// + public void SubmitEntity(string keyValue) + { + try + { + scoreCheckInfoService.SubmitEntity(keyValue); + } + 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/ScoreCheckInfo/ScoreCheckInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoEntity.cs new file mode 100644 index 000000000..559514e03 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoEntity.cs @@ -0,0 +1,155 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-09-19 14:37 + /// 描 述:学业成绩考核记录表 + /// + public class ScoreCheckInfoEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 学年 + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// StuNo + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// StuName + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// DeptNo + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// MajorNo + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// ClassNo + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// EmpNo + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// 班主任评语 + /// + [Column("TEACHERDEMO")] + public string TeacherDemo { get; set; } + /// + /// 评语日期 + /// + [Column("TDATE")] + public DateTime? TDate { get; set; } + /// + /// 评语填写人 + /// + [Column("SIGNED")] + public string Signed { get; set; } + /// + /// 操作等级 + /// + [Column("OPERATINGLEVEL")] + public string OperatingLevel { get; set; } + /// + /// 意见盖章 + /// + [Column("FILEPATH")] + public string FilePath { get; set; } + /// + /// 审核意见 + /// + [Column("CHECKOPINION")] + public string CheckOpinion { get; set; } + /// + /// 审核日期 + /// + [Column("CHECKTIME")] + public DateTime? CheckTime { get; set; } + /// + /// 审核用户 + /// + [Column("CHECKUSER")] + public string CheckUser { get; set; } + /// + /// 审核状态 + /// + [Column("CHECKSTATUS")] + public string CheckStatus { get; set; } + /// + /// CreateUser + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// UpdateUser + /// + [Column("UPDATEUSER")] + public string UpdateUser { get; set; } + /// + /// UpdateTime + /// + [Column("UPDATETIME")] + public DateTime? UpdateTime { get; set; } + /// + /// Demo + /// + [Column("DEMO")] + public string Demo { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs new file mode 100644 index 000000000..30890e2a6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoIBLL.cs @@ -0,0 +1,62 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-09-19 14:37 + /// 描 述:学业成绩考核记录表 + /// + public interface ScoreCheckInfoIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取ScoreCheckInfo表实体数据 + /// + /// 主键 + /// + ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue); + ScoreCheckInfoEntity GetStuNoEntity(string keyValue,string AcademicYearNo,string Semester); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ScoreCheckInfoEntity entity); + /// + /// 一键生成 + /// + /// + /// + /// + int SaveGeneEntity(string AcademicYearNo, string Semester); + /// + /// 提交 + /// + /// + void SubmitEntity(string keyValue); + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs new file mode 100644 index 000000000..ece9fb8a9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs @@ -0,0 +1,261 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-09-19 14:37 + /// 描 述:学业成绩考核记录表 + /// + public class ScoreCheckInfoService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" * "); + strSql.Append(" FROM ScoreCheckInfo t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + 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); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + 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); + strSql.Append(" AND t.MajorNo=@MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", "" + queryParam["ClassNo"].ToString() + "", DbType.String); + strSql.Append(" AND t.ClassNo=@ClassNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取ScoreCheckInfo表实体数据 + /// + /// 主键 + /// + public ScoreCheckInfoEntity GetScoreCheckInfoEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public ScoreCheckInfoEntity GetStuNoEntity(string keyValue, string AcademicYearNo, string Semester) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.StuName == keyValue && x.Semester == Semester && x.AcademicYearNo == AcademicYearNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + //多个删除 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + db.Delete(t => t.ID == item); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, ScoreCheckInfoEntity entity) + { + try + { + var userlogin = LoginUserInfo.Get(); + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + entity.UpdateTime = DateTime.Now; + entity.UpdateUser = userlogin.userId; + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + entity.CreateTime = DateTime.Now; + entity.UpdateUser = userlogin.userId; + entity.UpdateTime = DateTime.Now; + entity.UpdateUser = userlogin.userId; + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public int SaveGeneEntity(string AcademicYearNo, string Semester) + { + try + { + var userlogin = LoginUserInfo.Get(); + var sql = $" insert into ScoreCheckInfo (ID, AcademicYearNo, Semester, StuNo, StuName, DeptNo, MajorNo,ClassNo,CheckStatus,CreateUser,CreateTime,UpdateUser,UpdateTime) " + + $" select newid(),'{AcademicYearNo}','{Semester}',stuno,stuname,DeptNo, MajorNo,ClassNo,0,'{userlogin.userId}','{DateTime.Now}','{userlogin.userId}','{DateTime.Now}' from StuinfoBasic " + + $" where CheckMark =1 and StuNo not in(select StuNo from ScoreCheckInfo where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}') "; + return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public void SubmitEntity(string keyValue) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + //多个提交 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var entity = db.FindEntity(x => x.ID == item); + entity.CheckStatus = "1"; + db.Update(entity); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 02316ccb0..38123e9b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1942,6 +1942,10 @@ + + + + From 8d8c01f21aafe8900a1680f16f54c256d7380c1c Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 20 Sep 2022 11:26:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=92=8C=E6=AD=A3=E5=BC=8F=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/config.js | 12 ++++++------ .../LearunApp-2.2.0/manifest.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index d84f34b6f..f3f6ba6fe 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -21,13 +21,13 @@ export default { // "http://192.168.2.98:8088/" // ], "apiHost": [ - //"http://cyzjzx.gnway.cc:29615/" - // "http://cyzjzx.gnway.cc:30626/" - "http://192.168.10.31:8088/" + "http://cyzjzx.gnway.cc:30626/"//测试地址 + // "http://cyzjzx.gnway.cc:29615/"//正式地址 + // "http://192.168.10.31:8088/" ], - // "webHost":"http://cyzjzx.gnway.cc:29618/", - //"webHost":"http://wxd3f.cyzjzx.com/", - "webHost":"http://192.168.10.31:8087/", + "webHost":"http://cyzjzx.gnway.cc:29618/",//测试地址 + //"webHost":"http://wxd3f.cyzjzx.com/",//正式地址 + // "webHost":"http://192.168.10.31:8087/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json index bff0c2bc1..2a1860b43 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json @@ -1,6 +1,6 @@ { "name" : "智慧校园", - "appid" : "__UNI__0CE0195", + "appid" : "__UNI__3039520", "description" : "智慧校园移动端", "versionName" : "2.1.0", "versionCode" : 20100, From b644b20506b9767eceb15fdd27705ff96b3cfa50 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 20 Sep 2022 15:29:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E9=97=BB=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=85=AC=E5=91=8A=20=E6=B7=BB=E5=8A=A0=E6=92=A4=E9=94=80?= =?UTF-8?q?=E5=92=8C=E6=A0=B9=E6=8D=AE=E6=9D=A1=E4=BB=B6=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NodeMethod/OA_NewsMethod.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/OA_NewsMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/OA_NewsMethod.cs index e71203542..5eab69f31 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/OA_NewsMethod.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/OA_NewsMethod.cs @@ -30,7 +30,8 @@ namespace Learun.Application.WorkFlow private MessageRindIBLL messageRindIBLL = new MessageRindBLL(); public void Execute(WfMethodParameter parameter) { - if (parameter.code == "agree") + //撤销code=1 发起直接通过是 create + if (parameter.code == "agree" || parameter.code == "create") { newsIBLL.ChangeStatusByProcessId(parameter.processId, 2); var entity = noticeIBLL.GetEntityByProcessId(parameter.processId); @@ -57,7 +58,14 @@ namespace Learun.Application.WorkFlow } else { - newsIBLL.ChangeStatusByProcessId(parameter.processId, 0); + if (parameter.code == "disagree") + { + newsIBLL.ChangeStatusByProcessId(parameter.processId, 0); + } + if (parameter.code == "1") + { + newsIBLL.ChangeStatusByProcessId(parameter.processId, 0); + } } }