using AutoMapper; using OASystem.Domain; using OASystem.Domain.Entities.Financial; using OASystem.Domain.ViewModels.Financial; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OASystem.Infrastructure.Repositories.Financial { /// /// 财务 - 团组已收款项 /// 雷怡 2023.08.16 15:24 /// public class ProceedsReceivedRepository:BaseRepository { private readonly IMapper _mapper; /// /// /// /// /// public ProceedsReceivedRepository(SqlSugarClient sqlSugar, IMapper mapper) : base(sqlSugar) { _mapper = mapper; } /// /// 根据diid查询团组已收款项 /// /// /// public async Task GetGroupReceivedByDiid(int diid) { Result result = new() { Code = -2 }; string sql = string.Format(@"Select * From ProceedsReceived Where IsDel=0 And Diid={0}", diid); var groupReceivablesList = await _sqlSugar.SqlQueryable(sql).ToListAsync(); result.Code = 0; result.Msg = "查询成功!"; result.Data = groupReceivablesList; return result; } /// /// 根据diid 数组 查询团组已收款项 /// /// /// public async Task GetGroupReceivedByDiids(int[] diids) { Result result = new() { Code = -2 }; var groupReceivablesList = await _sqlSugar.Queryable() .Where(fr => fr.IsDel == 0 && diids.Contains(fr.Diid)) .ToListAsync(); result.Code = 0; result.Msg = "查询成功!"; result.Data = groupReceivablesList; return result; } } }