From ee0b92f184d9946451dd940471954cf3ca4942a8 Mon Sep 17 00:00:00 2001 From: hwh2023 <598694955@qq.com> Date: Mon, 30 Oct 2023 08:51:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E6=97=B6=E8=B4=B9=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeLessonTermController.cs | 30 +++- .../ArrangeLessonTerm/coursestatictis.cshtml | 38 +++++ .../ArrangeLessonTerm/coursestatictis.js | 134 ++++++++++++++++++ .../Views/EmpInfo/Form.cshtml | 20 ++- .../Learun.Application.Web.csproj | 2 + .../ArrangeLessonTerm/ArrangeLessonTermBLL.cs | 23 +++ .../ArrangeLessonTermIBLL.cs | 6 + .../ArrangeLessonTermService.cs | 35 +++++ .../LessonStatictisEntity.cs | 55 +++++++ .../EmpInfo/EmpInfoEntity.cs | 10 ++ .../Learun.Application.TwoDevelopment.csproj | 1 + 11 files changed, 347 insertions(+), 7 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/LessonStatictisEntity.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs index cf57f41e4..7abc771c5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs @@ -74,6 +74,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 课时统计 + /// + /// + [HttpGet] + public ActionResult coursestatictis() + { + return View(); + } #endregion #region 获取数据 @@ -169,6 +178,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } #endregion + + #region MyRegion /// /// 当前学期排课数据同步 /// @@ -312,7 +323,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } } } + #endregion - + #region 课时统计 + [HttpGet] + [AjaxOnly] + public ActionResult GetcoursestatictisList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = arrangeLessonTermIBLL.GetcoursestatictisList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.cshtml new file mode 100644 index 000000000..7ae17aae2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.cshtml @@ -0,0 +1,38 @@ +@{ + ViewBag.Title = "排课"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.js new file mode 100644 index 000000000..b7ac7336d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.js @@ -0,0 +1,134 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-02-27 11:05 + * 描 述:排课 + */ +var selectedRow; +var refreshGirdData; +var startTime; +var endTime; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '3', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + //page.search(); + } + }); + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 按条件清空 + $('#emptyByCondition').on('click', function () { + learun.layerForm({ + id: 'EmptyByConditionForm', + title: '按条件清空排课数据', + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/EmptyByConditionForm', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 按条件同步 + $('#syncByCondition').on('click', function () { + learun.layerForm({ + id: 'SyncByConditionForm', + title: '按条件同步排课数据', + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/SyncByConditionForm', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + }, + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetcoursestatictisList', + headData: [ + //{ label: '序号', name: 'ALTId', width: 200, align: "left" }, + { label: '姓名', name: 'empname', width: 200, align: "left" }, + { + label: '教师职务', name: 'zhiwu', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'JobGrade', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: '部门', name: 'dept', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } }, + { label: '周任务课时', name: 'weekcourses', width: 200, align: "left" }, + { label: '实际月课时量', name: 'monthactcourses', width: 200, align: "left" }, + { label: '折算后月课时量', name: 'zhesuan_monthactcourses', width: 200, align: "left" }, + { label: '课时费标准', name: 'feestandard', width: 200, align: "left" }, + { label: '实发课时费', name: 'actfeestandard', width: 200, align: "left" }, + ], + mainId: 'ALTId', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml index 50c4c36ff..1f8990ba3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml @@ -154,9 +154,9 @@
@*
-
系部
-
-
*@ +
系部
+
+ *@ @*
岗位类别
@@ -253,6 +253,14 @@
职称获得时间
+
+
课时费标准*
+ +
+
+
周任务课时*
+ +
学历学位信息
@@ -364,9 +372,9 @@
@*
-
教师简介
- -
*@ +
教师简介
+ + *@
教师简介
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 340f6a5ca..c459b8d21 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 @@ -1012,6 +1012,7 @@ + @@ -8313,6 +8314,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs index 0bd240547..39419d9e0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs @@ -84,6 +84,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 获取列表分页数据 + /// 分页参数 + /// + /// + public IEnumerable GetcoursestatictisList(Pagination pagination, string queryJson) + { + try + { + return arrangeLessonTermService.GetcoursestatictisList(pagination, queryJson); + } + 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/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs index caa1deec0..40dd5b26d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs @@ -71,6 +71,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetPageList(Pagination pagination, string queryJson); /// + /// 获取列表分页数据 + /// 分页参数 + /// + /// + IEnumerable GetcoursestatictisList(Pagination pagination, string queryJson); + /// /// 获取实体数据 /// 主键 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs index 62375cefc..12ba481ed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs @@ -365,7 +365,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + #region MyRegion + #endregion /// /// 获取相关课程考勤的学生信息 /// @@ -2208,6 +2210,39 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les } return result; } + /// + /// 获取列表分页数据 + /// 分页参数 + /// + /// + public IEnumerable GetcoursestatictisList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + + var queryParam = queryJson.ToJObject(); + strSql.Append("select a.*,b.jobrank as zhiwu,b.F_DepartmentId as dept,b.feestandard,b.Weekcourses,ta.actcourses as monthactcourses,ta.actcourses-(b.Weekcourses*4) as zhesuan_monthactcourses, "); + strSql.Append("case when b.jobrank in('5','6') then (ta.actcourses-4*b.Weekcourses)*b.feestandard "); + strSql.Append("when b.jobrank in(1,2,3,4) then (case when ta.actcourses<=(4*b.weekcourses)/2 then ta.actcourses*b.feestandard else 4*b.weekcourses*b.feestandard/2 end) end as actfeestandard "); + strSql.Append("from "); + strSql.Append("(select count(*) as courses,a.empno,a.empname from ArrangeLessonTerm a where lessondate between '"+ queryParam["StartTime"] + "' and '" + queryParam["EndTime"] + "' group by a.empno,a.empname ) a "); + strSql.Append("left join (select count(*) as actcourses,empno from Teach_attendance where clocktime between '" + queryParam["StartTime"] + "' and '" + queryParam["EndTime"] + "' group by empno) ta on ta.empno=a.empno "); + strSql.Append("left join empinfo b on a.empno=b.empno "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/LessonStatictisEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/LessonStatictisEntity.cs new file mode 100644 index 000000000..5692a0483 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/LessonStatictisEntity.cs @@ -0,0 +1,55 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-02-27 11:05 + /// 描 述:排课 + /// + public class LessonStatictisEntity + { + + #region 实体成员 + //b.classroomname,b.classroombuildingname,usecount + /// + /// 姓名 + /// + public string empname { get; set; } + /// + /// 教师职务 + /// + public string zhiwu { get; set; } + /// + /// 部门 + /// + public string dept { get; set; } + /// + /// 周任务课时 + /// + public string weekcourses { get; set; } + /// + /// 实际月课时量 + /// + public string monthactcourses { get; set; } + /// + /// 折算后月课时量 + /// + public string zhesuan_monthactcourses { get; set; } + /// + /// 课时费标准 + /// + public string feestandard { get; set; } + /// + /// 实发课时费 + /// + public string actfeestandard { get; set; } + #endregion + + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs index 9ef22d4ad..075193cbd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoEntity.cs @@ -598,6 +598,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public int? F_Order { get; set; } + /// + /// 课时费标准 + /// + [Column("FEESTANDARD")] + public double? Feestandard { get; set; } + /// + /// 周任务课时 + /// + [Column("WEEKCOURSES")] + public double? Weekcourses { get; set; } #endregion #region 扩展操作 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 b66a01b3d..3a8de3669 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 @@ -91,6 +91,7 @@ +