init commit

This commit is contained in:
路 范
2022-03-30 17:54:33 +08:00
parent df01841625
commit 904bdd16cd
500 changed files with 217251 additions and 0 deletions

View 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;
}
}
}

View File

@@ -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);
}
}