123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using AutoMapper;
- using OASystem.Domain;
- using OASystem.Domain.Entities.Groups;
- using OASystem.Domain.ViewModels.Financial;
- using OASystem.Domain.ViewModels.Groups;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OASystem.Infrastructure.Repositories.Financial
- {
- /// <summary>
- /// 财务 - 付款信息类
- /// 雷怡 2023.08.16 16:19
- /// </summary>
- public class CreditCardPaymentRepository : BaseRepository<Grp_CreditCardPayment, Grp_Fin_CreditCardPaymentView>
- {
- private readonly IMapper _mapper;
- public CreditCardPaymentRepository(SqlSugarClient sqlSugar, IMapper mapper)
- : base(sqlSugar)
- {
- _mapper = mapper;
- }
- /// <summary>
- /// 根据diid查询团组付款信息
- /// </summary>
- /// <param name="diid"></param>
- /// <param name="isPay">false 未支付 true 已支付</param>
- /// <returns></returns>
- public async Task<Result> GetGroupPaymentInfoByDiid(int diid,bool isPay)
- {
- Result result = new() { Code = -2 };
- int _isPay = 0;
- if (isPay) { _isPay = 1; }
- string sql = string.Format(@"Select * From Grp_CreditCardPayment Where IsDel=0 And Diid={0} And IsPay={1}", diid, _isPay);
- var groupReceivablesList = await _sqlSugar.SqlQueryable<Fin_ProceedsReceivedView>(sql).ToListAsync();
- result.Code = 0;
- result.Msg = "查询成功!";
- result.Data = groupReceivablesList;
- return result;
- }
- /// <summary>
- /// 团组 其他款项/退款
- /// </summary>
- /// <param name="diid">团组Id</param>
- /// <param name="isPay"></param>
- /// <returns></returns>
- public async Task<Result> GetGroupRefundByDiid(int diid, bool isPay)
- {
- Result result = new() { Code = -2 };
- int _isPay = 0;
- if (isPay) { _isPay = 1; }
- string sql = string.Format(@"Select * From Grp_CreditCardPayment Where IsDel=0 And Diid={0} And IsPay={1}", diid, _isPay);
- var groupReceivablesList = await _sqlSugar.SqlQueryable<Fin_ProceedsReceivedView>(sql).ToListAsync();
- result.Code = 0;
- result.Msg = "查询成功!";
- result.Data = groupReceivablesList;
- return result;
- }
- }
- }
|