using System; namespace MMDAL.DTO.Production { // GB4 Production.svc ProductionSummaryRegister migration — flat typed replacement for GB4's // generic CriteriaDTO (FieldName/FieldValue/Operator/JoinType list). GB4's ApplyCriteria // supports arbitrary operators (Equal/In/NotIn/GreaterThan(OrEqual)/LessThan(OrEqual)/Like) and // OR joins, but this report's actual GB4 usage is simple equality/date-range filtering, so this // follows the AccountReportCriteria convention (AccountsDAL\DTO\AccountsReports\AccountReportCriteria.cs): // 0 is the "not set" sentinel for surrogate-key ids. public class ProductionSummaryRegisterCriteria { public DateTime? PeriodFrom { get; set; } public DateTime? PeriodTo { get; set; } // 0 = with SKU only (SKUID <> -1), 1 = without SKU (SKUID = -1), anything else (default -1) // = no filter — matches GB4's SKUType semantics verbatim. public int SKUType { get; set; } = -1; // 0 = default sort (indent/production date), 1 = allocation-name sort — Type=1 (Register) only. public int OrderBy { get; set; } // Type=1 (Register) only — selects which criteria mapping applies: "0" = production-date based // (SummaryCriteria), "2" = same + RowFilter=1 dedup, anything else = resource-date based // (ApplyProductionResource, uses rr.STARTDATE/ENDDATE instead of a.PRODUCTIONDATE for period). public string ReportType { get; set; } = "0"; public int OUId { get; set; } // Type=1 (Register) only — "0" = require an assigned production resource (IS NOT NULL), // "1" = require no assigned resource (IS NULL), anything else = no filter. public string ResourceReq { get; set; } public int ProcessId { get; set; } public int WorkCenterId { get; set; } public int InchargeId { get; set; } public int AllocationId { get; set; } public int ShiftId { get; set; } public int ProductionId { get; set; } public int ItemId { get; set; } public int IndentId { get; set; } public int CombineIndentId { get; set; } public int MachineId { get; set; } public int StoreId { get; set; } public int BizTransactionTypeId { get; set; } public int ReaderId { get; set; } public int DeviceId { get; set; } public int CodeCategoryId { get; set; } // Resource-criteria only (Type=1, ReportType not "0"/"2"). public int EmployeeId { get; set; } // Scale-reading stock-transfer criteria only (Type=3, second half of the UNION ALL). public int DocumentId { get; set; } } }