91 lines
4.4 KiB
C#
91 lines
4.4 KiB
C#
namespace NTP.Application.Refinery.WageClaims;
|
|
|
|
// ------------------------------------------------------------------ wage claim list / view (REFINERY_WAGE_CLAIM_VIEW)
|
|
|
|
public sealed class WageClaimRowDto
|
|
{
|
|
public long Id { get; set; }
|
|
public long? WageClaimNo { get; set; }
|
|
public DateTime? WageClaimDate { get; set; }
|
|
public long TripCnt { get; set; }
|
|
public long? CommissionClaimId { get; set; }
|
|
public long? CommissionClaimNo { get; set; }
|
|
/// <summary>NEW / CLOSE / COMPLETE.</summary>
|
|
public string StatusCode { get; set; } = "";
|
|
}
|
|
|
|
/// <summary>Filters of the legacy grid (WAGE_CLAIM_NO, WAGE_CLAIM_DATE, STATUS_CODE, COMMISSION_CLAIM_NO, HAS_COMMISSION_CLAIM).</summary>
|
|
public sealed record WageClaimQuery(
|
|
string? WageClaimNo, DateOnly? WageClaimDate, IReadOnlyList<string> StatusCodes, string? CommissionClaimNo, bool? HasCommissionClaim);
|
|
|
|
/// <summary>A trip as shown inside a claim (legacy searchClaimTrips columns) and in the create preview.</summary>
|
|
public sealed class ClaimTripRowDto
|
|
{
|
|
public long Id { get; set; }
|
|
public string? Pn { get; set; }
|
|
public DateTime? PaymentedDate { get; set; }
|
|
public long? LoadingNo { get; set; }
|
|
public string? DischargeAuthoriztionNo { get; set; }
|
|
public DateTime? DischargeEntryDate { get; set; }
|
|
public string? Tn { get; set; }
|
|
public string? Trn { get; set; }
|
|
public string? Nnpn { get; set; }
|
|
public string StatusCode { get; set; } = "";
|
|
}
|
|
|
|
/// <summary>One row of the log popup (REFINERY_WAGE_CLAIM_LOG_VIEW / REFINERY_COMMISSION_LOG_VIEW).</summary>
|
|
public sealed class ClaimLogRowDto
|
|
{
|
|
public long Id { get; set; }
|
|
public string MethodName { get; set; } = "";
|
|
public DateTime? LogDate { get; set; }
|
|
public string? Login { get; set; }
|
|
public string? OldData { get; set; }
|
|
public string? NewData { get; set; }
|
|
}
|
|
|
|
/// <summary>Body of POST wage-claims (legacy create: STATUS_CODE list + LOADING_DATE_FROM / TO).</summary>
|
|
public sealed record CreateWageClaimRequest(IReadOnlyList<string>? StatusCodes, DateOnly? LoadingDateFrom, DateOnly? LoadingDateTo);
|
|
|
|
/// <summary>Answer of the write endpoints: the (Arabic) message to toast and the id of the created record.</summary>
|
|
public sealed record ClaimResult(string Message, long? Id = null);
|
|
|
|
// ------------------------------------------------------------------ export
|
|
|
|
/// <summary>Raw values of one trip of the claim report (legacy REFINERY_CLAIMS_REPORT_VIEW).</summary>
|
|
public sealed class WageClaimReportRaw
|
|
{
|
|
public long Id { get; set; }
|
|
public string? Drvr { get; set; }
|
|
public string? Tn { get; set; }
|
|
public string? DischargeAuthoriztionNo { get; set; }
|
|
public long? DischargeAuthoriztionYear { get; set; }
|
|
public DateTime? DischargeEntryDate { get; set; }
|
|
public string? ClientNo { get; set; }
|
|
public long? LoadingNo { get; set; }
|
|
public DateTime? ActualLoadingDate { get; set; }
|
|
public decimal? NetLoadingWeight { get; set; }
|
|
public decimal? WaterAmount { get; set; }
|
|
public decimal? NetDischargeWeight { get; set; }
|
|
public decimal? CalculatedQuantityTon { get; set; }
|
|
public decimal? ToleranceQuantity { get; set; }
|
|
public decimal? PenaltyQuantity { get; set; }
|
|
public decimal? TonPrice { get; set; }
|
|
public decimal? PenaltyAmount { get; set; }
|
|
public decimal? DriverTip { get; set; }
|
|
public decimal? PermitDispatch { get; set; }
|
|
public decimal? WaybillFee { get; set; }
|
|
public decimal? DieselLiterPrice { get; set; }
|
|
/// <summary>sum(REFINERY_CARDS_LOG.AMOUNT) of the trip.</summary>
|
|
public decimal? AdvancePaymentForDiesel { get; set; }
|
|
public decimal? Commission { get; set; }
|
|
public decimal? NetWage { get; set; }
|
|
}
|
|
|
|
/// <summary>Values of one report line after the legacy sign changes (deductions are shown negative).</summary>
|
|
public sealed record WageClaimReportLine(
|
|
string? Drvr, string? Tn, string? DischargeAuthoriztionNo, long? DischargeAuthoriztionYear, DateTime? DischargeEntryDate, string? ClientNo,
|
|
long? LoadingNo, DateTime? ActualLoadingDate, decimal NetLoadingWeight, decimal WaterAmount, decimal NetDischargeWeight, decimal WeightDifference,
|
|
decimal CalculatedQuantityTon, decimal ToleranceQuantity, bool WaterExist, decimal PenaltyQuantity, decimal TonPrice, decimal PenaltyAmount,
|
|
decimal DriverTip, decimal PermitDispatch, decimal WaybillFee, decimal DieselLiterPrice, decimal AdvancePaymentForDiesel, decimal Commission, decimal NetWage);
|