init commit
This commit is contained in:
31
20220330_Vote/Ewide.RoadFlow/Data/FlowArchive/FlowArchive.cs
Normal file
31
20220330_Vote/Ewide.RoadFlow/Data/FlowArchive/FlowArchive.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RoadFlow.Data
|
||||
{
|
||||
public interface IFlowArchive: IRoadFlowRepository<RoadFlow.Model.rf_flowarchive>
|
||||
{
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user