|
|
@@ -14,6 +14,7 @@ using Stimulsoft.Report.Components; |
|
|
|
using Stimulsoft.Report.Engine; |
|
|
|
using Stimulsoft.Report.Export; |
|
|
|
using Stimulsoft.Report.Mvc; |
|
|
|
using System.Linq; |
|
|
|
|
|
|
|
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
{ |
|
|
@@ -59,7 +60,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
{ |
|
|
|
StiReport report = new StiReport(); |
|
|
|
report.Load(Server.MapPath("~/Areas/LogisticsManagement/Views/ADR_Record/Report.mrt")); |
|
|
|
|
|
|
|
|
|
|
|
var data = aDR_RecordIBLL.GetList("{}"); |
|
|
|
report.RegData(Util.DataBase.DataConvert.ToDataTable(data)); |
|
|
|
report.Compile(); |
|
|
@@ -151,15 +152,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 |
|
|
|