44 lines
1.4 KiB
C#
44 lines
1.4 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 FlowReceive: RoadFlowRepository<RoadFlow.Model.rf_flowreceive>, IFlowReceive, ITransient
|
|
{
|
|
|
|
/// <summary>
|
|
/// 查询一个流程一个步骤的上一次处理人
|
|
/// </summary>
|
|
/// <param name="flowId">流程id</param>
|
|
/// <param name="stepId">步骤id</param>
|
|
/// <param name="SenderId">发送人</param>
|
|
/// <returns></returns>
|
|
public string GetPrevMembers(string flowId, string stepId, string SenderId)
|
|
{
|
|
//SELECT Members FROM RF_FlowReceive WHERE FlowId = @FlowId AND StepId = @StepId AND SenderId = @SenderId ORDER BY SendTime DESC LIMIT 1
|
|
return GetListBy(x => x.FlowId == flowId && x.StepId == stepId && x.SenderId == SenderId)
|
|
.OrderByDescending(x => x.SendTime).Take(1).ToList()[0].Members;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 批量添加
|
|
/// </summary>
|
|
/// <param name="flowReceive">实体类</param>
|
|
/// <returns></returns>
|
|
public int AddRange(List<Model.rf_flowreceive> flowReceives)
|
|
{
|
|
return AddRangeList(flowReceives);
|
|
}
|
|
|
|
|
|
}
|
|
}
|