From 99cc4dc3f1fbc08787ecf44e5cc4a688dc0f928f Mon Sep 17 00:00:00 2001 From: hwh2023 <598694955@qq.com> Date: Wed, 13 Mar 2024 10:12:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8B=A4=E7=BB=9F=E8=AE=A1=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BB=A5=E5=8F=8A=E5=9D=90=E7=8F=AD=E6=8E=92=E8=AF=BE?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/EmpInfo/Form.cshtml | 2 +- .../Views/EmpInfo/Form.js | 2 +- .../Views/EmpInfo/Index.cshtml | 2 +- .../Views/EmpInfo/Index.js | 8 ++-- .../Controllers/ADR_RecordController.cs | 16 ++++++-- .../Views/ADR_Record/StatisticDetailIndex.js | 9 ++++- .../Views/ADR_Record/StatisticIndex.js | 4 +- .../ADR_Record/ADR_RecordEntity.cs | 5 +++ .../ADR_Record/ADR_RecordService.cs | 39 ++++++++++++++++++- 9 files changed, 73 insertions(+), 14 deletions(-) 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 1f8990ba3..e54202076 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 @@ -178,7 +178,7 @@ *@
-
编制类别
+
坐班授课@*编制类别*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js index ef48f7f85..d0adb738d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js @@ -147,7 +147,7 @@ var bootstrap = function ($, learun) { //$('#PositionLevel').lrDataItemSelect({ code: 'PositionLevel' }); $('#JobRank').lrDataItemSelect({ code: 'JobGrade' });//TechnicalPost $('#WorkLevel').lrDataItemSelect({ code: 'TechnicalLevelOfWorker' }); - $('#CompilationCategory').lrDataItemSelect({ code: 'CompilationCategory' }); + $('#CompilationCategory').lrDataItemSelect({ code: 'zuobanshouke' }); $('#IsInActiveStatus').lrDataItemSelect({ code: 'JobStatus' }); $('#ProfessionalTitle').lrDataItemSelect({ code: 'jszc' }); //$('#ProfessionalTitleLevel').lrDataItemSelect({ code: 'TeacherTitlePostLevel' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml index bc03b0741..e3b03255a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml @@ -55,7 +55,7 @@
-
人员身份
+
坐班授课@*人员身份*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js index fe8815f2e..6ad678e97 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js @@ -76,6 +76,7 @@ var bootstrap = function ($, learun) { //职工状态 $('#IsInActiveStatus').lrDataItemSelect({ code: 'JobStatus' }); //编制类别 + // $('#CompilationCategory').lrDataItemSelect({ code: 'CompilationCategory', select: function (item) { if (!!item && item.id == "02") {//编外 @@ -93,7 +94,8 @@ var bootstrap = function ($, learun) { }); } } - });//校区 + }); + //校区 $('#F_CompanyId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { @@ -114,7 +116,7 @@ var bootstrap = function ($, learun) { // 部门选择 $('#F_DepartmentId').lrselect(); //人员身份 - $('#CompilationCategory').lrDataItemSelect({ code: 'CompilationCategory' }); + $('#CompilationCategory').lrDataItemSelect({ code: 'zuobanshouke' });//CompilationCategory //员工状态 $('#IsInActiveStatus').lrDataItemSelect({ code: 'JobStatus' }); @@ -521,7 +523,7 @@ var bootstrap = function ($, learun) { formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, - code: 'CompilationCategory', + code: 'zuobanshouke', callback: function (_data) { callback(_data.text); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs index 53207ada9..6b039ee26 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs @@ -139,14 +139,16 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers [AjaxOnly] public ActionResult GetStatisticList(string pagination, string queryJson) { - var data = aDR_RecordIBLL.GetStatisticList(null, queryJson).GroupBy(x => new { x.UserNo, x.UserName }) + var data = aDR_RecordIBLL.GetStatisticList(null, queryJson).GroupBy(x => new { x.UserNo, x.UserName,x.Department }) .Select(x => new ADR_RecordEntity() { UserNo = x.Key.UserNo, UserName = x.Key.UserName, ZhengChangNum = x.Where(y => y.ClockStatus == "1").Count().ToString(), ChiDaoNum = x.Where(y => y.ClockStatus == "2").Count().ToString(), - ZaoTuiNum = x.Where(y => y.ClockStatus == "3").Count().ToString() + ZaoTuiNum = x.Where(y => y.ClockStatus == "3").Count().ToString(), + KuanggongNum = x.Where(y => y.ClockStatus == "6").Count().ToString(), + Department=x.Key.Department }).OrderBy(x => x.UserNo); return Success(data); @@ -163,7 +165,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { Pagination paginationobj = pagination.ToObject(); var data = aDR_RecordIBLL.GetStatisticDetailList(paginationobj, queryJson); - return Success(data); + + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js index 59868fbec..4b38c4751 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js @@ -153,8 +153,13 @@ var bootstrap = function ($, learun) { { label: "工作(分钟)", name: "WorkMinutes", width: 80, align: "left",sort: true }, { label: "休息(分钟)", name: "RestMinutes", width: 80, align: "left", sort: true }, ], - mainId: '', - isPage: false, + mainId: 'clockstatis', + sidx: 'UserName,UserNo,ClockDate', + isPage: true, + // mainId: 'EmpId', + // sidx: 'DeptOrder,F_Order', + // isPage: true, + // isMultiselect: true }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticIndex.js index 3009e0c92..44ac01dcf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticIndex.js @@ -52,7 +52,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/LogisticsManagement/ADR_Record/GetStatisticList', headData: [ { label: "姓名", name: "UserName", width: 100, align: "left" }, @@ -61,6 +61,8 @@ var bootstrap = function ($, learun) { { label: "正常次数", name: "ZhengChangNum", width: 100, align: "left" }, { label: "迟到次数", name: "ChiDaoNum", width: 100, align: "left" }, { label: "早退次数", name: "ZaoTuiNum", width: 100, align: "left" }, + { label: "旷工次数", name: "KuanggongNum", width: 100, align: "left" }, + { label: "部门", name: "Department", width: 100, align: "left" }, ], mainId: '', isPage: false, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordEntity.cs index dca53f756..e874e55cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordEntity.cs @@ -156,6 +156,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement [NotMapped] public string ZaoTuiNum { get; set; } /// + /// 旷工次数 + /// + [NotMapped] + public string KuanggongNum { get; set; } + /// /// 班次 如:上下班 /// [NotMapped] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs index e98979954..c691205cc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs @@ -197,9 +197,10 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement var basedbname = BaseRepository().getDbConnection().Database; var strSql = new StringBuilder(); - strSql.Append("select t.ID,t.UserNo,t.ClockStatus,u.F_RealName as UserName "); + strSql.Append("select t.ID,t.UserNo,t.ClockStatus,u.F_RealName as UserName,d.f_fullname as department "); strSql.Append(" from ADR_Record t "); strSql.Append(" left join " + basedbname + ".dbo.LR_Base_User u on u.F_EnCode=t.UserNo "); + strSql.Append(" left join " + basedbname + ".dbo.LR_Base_Department d on d.F_DepartmentId=u.F_DepartmentId "); strSql.Append(" where 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -468,7 +469,41 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } //totalResult.Where(x => x.ClockStatus == ClockStatus); } - return totalResult.OrderBy(x => x.ClockDate).ThenBy(x => x.UserNo).ThenBy(x => x.TimePeriodNo); + var result= totalResult; + if (pagination.sidx== "UserName") + { + if (pagination.sord=="ASC") + { + result = totalResult.OrderBy(x => x.UserName).ToList(); + } + else + { + result = totalResult.OrderByDescending(x => x.UserName).ToList(); + } + } + if (pagination.sidx == "UserNo") + { + if (pagination.sord == "ASC") + { + result = totalResult.OrderBy(x => x.UserNo).ToList(); + } + else + { + result = totalResult.OrderByDescending(x => x.UserNo).ToList(); + } + } + if (pagination.sidx == "Department") + { + if (pagination.sord == "ASC") + { + result = totalResult.OrderBy(x => x.Department).ToList(); + } + else + { + result = totalResult.OrderByDescending(x => x.Department).ToList(); + } + } + return result;// totalResult.OrderBy(x => x.ClockDate).ThenBy(x => x.UserNo).ThenBy(x => x.TimePeriodNo); } catch (Exception ex) {