Browse Source

考勤统计相关以及坐班排课字段新增

黑艺新账号
hwh2023 11 months ago
parent
commit
99cc4dc3f1
9 changed files with 73 additions and 14 deletions
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml
  4. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js
  5. +13
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs
  6. +7
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js
  7. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticIndex.js
  8. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordEntity.cs
  9. +37
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml View File

@@ -178,7 +178,7 @@
<input id="InSchoolDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#InSchoolDate').trigger('change'); } })" />
</div>*@
<div class="col-xs-4 lr-form-item" data-table="EmpInfo">
<div class="lr-form-item-title">编制类别</div>
<div class="lr-form-item-title">坐班授课@*编制类别*@</div>
<div id="CompilationCategory"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="EmpInfo">


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js View File

@@ -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' });


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml View File

@@ -55,7 +55,7 @@
<div id="PartyFaceNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">人员身份</div>
<div class="lr-form-item-title">坐班授课@*人员身份*@</div>
<div id="CompilationCategory"></div>
</div>
<div class="col-xs-6 lr-form-item">


+ 5
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js View File

@@ -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);
}


+ 13
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs View File

@@ -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<Pagination>();
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);
}

/// <summary>


+ 7
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js View File

@@ -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();
},


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticIndex.js View File

@@ -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,


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordEntity.cs View File

@@ -156,6 +156,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
[NotMapped]
public string ZaoTuiNum { get; set; }
/// <summary>
/// 旷工次数
/// </summary>
[NotMapped]
public string KuanggongNum { get; set; }
/// <summary>
/// 班次 如:上下班
/// </summary>
[NotMapped]


+ 37
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs View File

@@ -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)
{


Loading…
Cancel
Save