32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using Furion.DependencyInjection;
|
|
using Microsoft.Extensions.Caching.Memory;
|
|
using Microsoft.Extensions.Localization;
|
|
using RoadFlow.Utility;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace RoadFlow.Data
|
|
{
|
|
public class FlowArchive: RoadFlowRepository<RoadFlow.Model.rf_flowarchive>, IFlowArchive, ITransient
|
|
{
|
|
public List<Model.rf_flowarchive> GetPagerData(out int count, int size, int number, string flowId, string stepName, string title, string date1, string date2, string order)
|
|
{
|
|
|
|
int total=0;
|
|
var rtn = db.Queryable<Model.rf_flowarchive>()
|
|
.WhereIF(flowId.IsGuid(), x => x.FlowId == flowId)
|
|
.WhereIF(!stepName.IsNullOrWhiteSpace(), x => x.StepName.Contains(stepName))
|
|
.WhereIF(!title.IsNullOrWhiteSpace(), x => x.Title.Contains(title))
|
|
.WhereIF(date1.IsDateTime(out DateTime dt1), x => x.WriteTime >= dt1)
|
|
.WhereIF(date2.IsDateTime(out DateTime dt2), x => x.WriteTime >= dt2)
|
|
.OrderByIF(!order.IsNullOrWhiteSpace(), order.FilterSelectSql())
|
|
.ToPageList(number, size, ref total).ToList();
|
|
count = total;
|
|
return rtn;
|
|
}
|
|
}
|
|
}
|