Browse Source

【修改】考勤记录统计

中职版本
dyy 4 years ago
parent
commit
0796e9c1d9
1 changed files with 13 additions and 9 deletions
  1. +13
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ADR_RecordController.cs

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

@@ -6,6 +6,7 @@ using System.Web.Mvc;
using Learun.Application.Base.SystemModule;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
@@ -123,15 +124,18 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
public ActionResult GetStatisticList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = aDR_RecordIBLL.GetStatisticList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
var data = aDR_RecordIBLL.GetStatisticList(null, queryJson).GroupBy(x => new { x.UserNo, x.UserName })
.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()
}).OrderBy(x => x.UserNo);


return Success(data);
}

#endregion


Loading…
Cancel
Save