106 lines
3.4 KiB
C#
106 lines
3.4 KiB
C#
using System;
|
||
using _0_Framework.Application;
|
||
using CompanyManagment.App.Contracts.FinancilTransaction;
|
||
using Microsoft.AspNetCore.Mvc;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace CompanyManagment.App.Contracts.FinancialStatment;
|
||
|
||
public interface IFinancialStatmentApplication
|
||
{
|
||
/// <summary>
|
||
/// ایجاد سند مالی از طریق درگاه بانکی
|
||
/// </summary>
|
||
/// <param name="command"></param>
|
||
/// <returns></returns>
|
||
OperationResult CreateFromBankGateway(CreateFinancialStatment command);
|
||
OperationResult Create(CreateFinancialStatment command);
|
||
|
||
List<FinancialStatmentViewModel> Search(FinancialStatmentSearchModel searchModel);
|
||
[Obsolete("این متد منسوخ شده است. لطفاً از متد GetDetailsByContractingParty استفاده کنید.")]
|
||
FinancialStatmentViewModel GetDetailsByContractingPartyId(long contractingPartyId);
|
||
|
||
/// <summary>
|
||
/// نمایش اطلاعات صورت حساب مالی کلاینت
|
||
/// </summary>
|
||
/// <param name="searchModel"></param>
|
||
/// <param name="accountId"></param>
|
||
/// <returns>مدل صورت حساب مالی کلاینت</returns>
|
||
Task<ClientFinancialStatementViewModel> GetClientFinancialStatement(FinancialStatementSearchModel searchModel,
|
||
long accountId);
|
||
|
||
|
||
/// <summary>
|
||
/// نمایش اطلاعات صورت حساب مالی کلاینت بر اساس کد هش
|
||
/// </summary>
|
||
/// <param name="hashCode"></param>
|
||
/// <returns></returns>
|
||
Task<OperationResult<ClientFinancialStatementViewModel>> GetDetailsByPublicId(string publicId);
|
||
|
||
/// <summary>
|
||
/// مقدار مانده صورت حساب مالی را برمی گرداند
|
||
/// </summary>
|
||
/// <param name="id"></param>
|
||
/// <returns></returns>
|
||
Task<GetFinancialStatementBalanceAmount> GetBalanceAmount(long id);
|
||
|
||
/// <summary>
|
||
/// مقدار بدهی کلاینت را برمی گرداند
|
||
/// </summary>
|
||
/// <param name="accountId"></param>
|
||
/// <returns></returns>
|
||
Task<double> GetClientDebtAmount(long accountId);
|
||
|
||
/// <summary>
|
||
/// جزئیات بر اساس
|
||
/// </summary>
|
||
/// <param name="contractingPartyId"></param>
|
||
/// <param name="searchModel"></param>
|
||
/// <returns></returns>
|
||
Task<FinancialStatmentDetailsByContractingPartyViewModel> GetDetailsByContractingParty(long contractingPartyId,
|
||
FinancialStatementSearchModel searchModel);
|
||
}
|
||
|
||
public class FinancialStatmentDetailsByContractingPartyViewModel
|
||
{
|
||
/// <summary>
|
||
/// آیدی FinancialStatement
|
||
/// </summary>
|
||
public long Id { get; set; }
|
||
|
||
/// <summary>
|
||
/// نام طرف حساب
|
||
/// </summary>
|
||
public string ContractingPartyName { get; set; }
|
||
|
||
/// <summary>
|
||
/// جمع بدهکاری
|
||
/// </summary>
|
||
public double TotalDebt { get; set; }
|
||
/// <summary>
|
||
/// جمع بستانکاری
|
||
/// </summary>
|
||
public double TotalCredit { get; set; }
|
||
/// <summary>
|
||
/// مبلغ قابل پرداخت
|
||
/// </summary>
|
||
public double TotalAmountPayable { get; set; }
|
||
|
||
/// <summary>
|
||
/// تراکنش ها
|
||
/// </summary>
|
||
public List<FinancialTransactionDetailViewModel> List { get; set; }
|
||
}
|
||
|
||
public class GetFinancialStatementBalanceAmount
|
||
{
|
||
/// <summary>
|
||
/// مبلغ
|
||
/// </summary>
|
||
public double Amount { get; set; }
|
||
public long ContractingPartyId { get; set; }
|
||
}
|