namespace MMDAL.DTO.Production { // One row = one (WorkOrder x RoutingStage) occurrence, read from TPOSTEDINDENTDETAIL — // the GB5-maintained (stored-proc/trigger posted) per-stage status table. ProductionBLL // groups these flat rows by IndentId into the nested WO->Stages[] shape the Production // Entry screen's FE mapWOResponse() expects. public class ProductionEntryQueueRowDTO { public int IndentId { get; set; } // The true parent-WO grouping key — a single WO's routing stages each get their OWN // TINDENT/INDENTID (confirmed live on GB5DEMO, e.g. WOP-000001/1, /2, /3 all have distinct // IndentId but share one CombineIndentId). Group by THIS, not IndentId, when assembling // the nested WO->Stages[] shape. public int CombineIndentId { get; set; } public string WoNo { get; set; } = string.Empty; public string SoNo { get; set; } = string.Empty; public int ItemId { get; set; } public string ItemCode { get; set; } = string.Empty; public string ItemName { get; set; } = string.Empty; public int SkuId { get; set; } public string SkuCode { get; set; } = string.Empty; public int UomId { get; set; } = -1; public int IndentDetailId { get; set; } // TINDENTDETAIL.NESTINGPLANID — -1 when this WO line isn't nesting-sourced. Confirmed // live-verified sentinel: MENTITY.NESTINGPLAN = -1399999842 is the LinkTypeId a saved // TPRODUCTIONDETAIL row should carry when produced against a nesting plan (matches the // legacy GB4 NESTING_PRODUCTION_PICKLIST filter exactly — same numeric sentinel, carried // forward unchanged). public int NestingPlanId { get; set; } = -1; public int RoutingDetailId { get; set; } public int RoutingId { get; set; } public string RoutingCode { get; set; } = string.Empty; public string RoutingName { get; set; } = string.Empty; public short StageSlNo { get; set; } public string Stage { get; set; } = string.Empty; public string Step { get; set; } = string.Empty; public int ProcessId { get; set; } public string ProcessCode { get; set; } = string.Empty; public string ProcessName { get; set; } = string.Empty; // MROUTINGVERSIONDETAIL.EXECUTIONMODE: 1 = Subcontract (see SchedulingEngine.cs) public byte ExecutionMode { get; set; } public int WorkCenterId { get; set; } = -1; public string WorkCenterCode { get; set; } = string.Empty; public string WorkCenterName { get; set; } = string.Empty; public decimal Planned { get; set; } public decimal Produced { get; set; } public decimal GoodQuantity { get; set; } public decimal RejectedQuantity { get; set; } public decimal ReworkQuantity { get; set; } public decimal OtherQuantity { get; set; } public decimal AvailableToWork { get; set; } public decimal MmSent { get; set; } public decimal MmReceived { get; set; } public decimal WipStock { get; set; } // TPOSTEDINDENTDETAIL.RELEASESTATUS: 0 Planned,1 FirmPlanned,2 ReadyToRelease,3 Released, // 4 Completed,5 Closed,6 Processing,7 Settlement,8 Hold public byte ReleaseStatus { get; set; } public byte IsLastProcess { get; set; } public int ProductionDetailId { get; set; } public int StoppageCount { get; set; } } }