OtherPriceRepository.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using AutoMapper;
  2. using OASystem.Domain;
  3. using OASystem.Domain.Entities.Financial;
  4. using OASystem.Domain.ViewModels.Financial;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace OASystem.Infrastructure.Repositories.Financial
  11. {
  12. /// <summary>
  13. /// 财务 - 其他款项
  14. /// </summary>
  15. public class OtherPriceRepository:BaseRepository<Fin_OtherPrice,Fin_OtherPriceView>
  16. {
  17. private readonly IMapper _mapper;
  18. public OtherPriceRepository(SqlSugarClient sqlSugar, IMapper mapper)
  19. : base(sqlSugar)
  20. {
  21. _mapper = mapper;
  22. }
  23. /// <summary>
  24. /// 根据diid查询团组其他款项
  25. /// </summary>
  26. /// <param name="diid"></param>
  27. /// <returns></returns>
  28. public async Task<Result> GetGroupOtherPriceByDiid(int diid)
  29. {
  30. Result result = new() { Code = -2 };
  31. string sql = string.Format(@"Select * From Fin_OtherPrice Where IsDel=0 And Diid={0}", diid);
  32. var groupReceivablesList = await _sqlSugar.SqlQueryable<Fin_ProceedsReceivedView>(sql).ToListAsync();
  33. result.Code = 0;
  34. result.Msg = "查询成功!";
  35. result.Data = groupReceivablesList;
  36. return result;
  37. }
  38. }
  39. }