Browse Source

考勤明细显示加入坐班授课

黑艺新账号
hwh2023 8 months ago
parent
commit
29796f4e7c
3 changed files with 23 additions and 2 deletions
  1. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js
  2. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordEntity.cs
  3. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs

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

@@ -84,6 +84,18 @@ var bootstrap = function ($, learun) {
});
}
},
{
label: "坐班授课", name: "CompilationCategory", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'zuobanshouke',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "日期", name: "ClockDate", width: 100, align: "left", sort: true },
{ label: "班次", name: "BanCi", width: 60, align: "left", sort: true },
{ label: "时间段", name: "TimePeriod", width: 150, align: "left", sort: true },


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

@@ -230,6 +230,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// </summary>
[NotMapped]
public string IsFitstr { get; set; }
/// <summary>
/// 坐班授课
/// </summary>
[NotMapped]
public string CompilationCategory { get; set; }
#endregion
}
}


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

@@ -276,7 +276,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
var date = datest.ToDate().AddDays(i).ToDateString();
//当天查询语句
var strSql = new StringBuilder();
strSql.Append($"select u.F_Encode as UserNo,u.F_RealName as UserName,u.F_DepartmentId as Department,t.ID,t.ADphoto,t.ADType,emp.Photo,t.img,t.IsFit,t.ADTime,t.ClockTime,t.ClockStatus,'{date}' as ClockDate ");
strSql.Append($"select u.F_Encode as UserNo,u.F_RealName as UserName,u.F_DepartmentId as Department,t.ID,t.ADphoto,t.ADType,emp.Photo,emp.CompilationCategory,t.img,t.IsFit,t.ADTime,t.ClockTime,t.ClockStatus,'{date}' as ClockDate ");
strSql.Append(" from " + basedbname + ".dbo.LR_Base_User u ");
strSql.Append(" inner join EmpInfo emp on u.F_EnCode=emp.EmpNo ");
strSql.Append(" left join ADR_Record t on u.F_EnCode=t.UserNo and t.ADYear='" + date.Substring(0, 4) + "' and t.ADMonth='" + date.Substring(5, 2) + "' and t.ADDay='" + date.Substring(8, 2) + "' ");
@@ -325,12 +325,13 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
totalSql.Append(" ) as bb where 1=1 order by bb.ClockDate");
//当天记录列表
var data = this.BaseRepository("CollegeMIS").FindList<ADR_RecordEntity>(totalSql.ToString())
.GroupBy(x => new { x.UserNo, x.UserName, x.Department, x.ClockDate }).Select(x => new
.GroupBy(x => new { x.UserNo, x.UserName, x.Department, x.ClockDate,x.CompilationCategory }).Select(x => new
{
UserNo = x.Key.UserNo,
UserName = x.Key.UserName,
Department = x.Key.Department,
ClockDate = x.Key.ClockDate,
CompilationCategory=x.Key.CompilationCategory,
Group = x.Select(y => new ADR_RecordEntity()
{
ADType = y.ADType,
@@ -363,6 +364,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
UserNo = item.UserNo,
UserName = item.UserName,
Department = item.Department,
CompilationCategory=item.CompilationCategory,
ClockDate = item.ClockDate,
BanCi = "上下班",
TimePeriodNo = 0,
@@ -413,6 +415,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
UserNo = item.UserNo,
UserName = item.UserName,
Department = item.Department,
CompilationCategory = item.CompilationCategory,
ClockDate = item.ClockDate,
BanCi = "上下班",
TimePeriodNo = 1,
@@ -436,6 +439,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
UserNo = item.UserNo,
UserName = item.UserName,
Department = item.Department,
CompilationCategory = item.CompilationCategory,
ClockDate = item.ClockDate,
BanCi = "上下班",
TimePeriodNo = 2,


Loading…
Cancel
Save