|
|
@@ -406,7 +406,7 @@ public class S8MonitoringService : ITransient
|
|
|
}
|
|
|
|
|
|
var deliveryModules = new[] { "S1", "S7" };
|
|
|
- var deliveryTypes = new[] { "ORDER_DUE_DATE_DELAY", "PRODUCT_DESIGN_DELAY", "DELIVERY_DELAY_WARNING" };
|
|
|
+ var deliveryTypes = new[] { "ORDER_DUE_DATE_DELAY", "PRODUCT_DESIGN_DELAY", "DELIVERY_DELAY_WARNING", "SHIPMENT_ABNORMAL" };
|
|
|
|
|
|
var rows = await _rep.AsQueryable()
|
|
|
.Where(e => e.TenantId == tenantId && e.FactoryId == factoryId && !e.IsDeleted)
|
|
|
@@ -428,6 +428,7 @@ public class S8MonitoringService : ITransient
|
|
|
var orderDueDateDelay = bucket.Count(r => r.ExceptionTypeCode == "ORDER_DUE_DATE_DELAY");
|
|
|
var productDesignDelay = bucket.Count(r => r.ExceptionTypeCode == "PRODUCT_DESIGN_DELAY");
|
|
|
var deliveryDelayWarning = bucket.Count(r => r.ExceptionTypeCode == "DELIVERY_DELAY_WARNING");
|
|
|
+ var shipmentAbnormal = bucket.Count(r => r.ExceptionTypeCode == "SHIPMENT_ABNORMAL");
|
|
|
dayList.Add(new AdoS8DeliveryTrendDayDto
|
|
|
{
|
|
|
Date = d.ToString("MM/dd"),
|
|
|
@@ -435,7 +436,8 @@ public class S8MonitoringService : ITransient
|
|
|
OrderDueDateDelay = orderDueDateDelay,
|
|
|
ProductDesignDelay = productDesignDelay,
|
|
|
DeliveryDelayWarning = deliveryDelayWarning,
|
|
|
- Total = orderDueDateDelay + productDesignDelay + deliveryDelayWarning,
|
|
|
+ ShipmentAbnormal = shipmentAbnormal,
|
|
|
+ Total = orderDueDateDelay + productDesignDelay + deliveryDelayWarning + shipmentAbnormal,
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -489,7 +491,7 @@ public class S8MonitoringService : ITransient
|
|
|
var prodTypes = new[]
|
|
|
{
|
|
|
"EQUIP_FAULT", "MFG_MATERIAL_ABNORMAL", "MFG_QUALITY_ABNORMAL",
|
|
|
- "BODY_PRODUCTION_DELAY_WARNING"
|
|
|
+ "BODY_PRODUCTION_DELAY_WARNING", "PRODUCTION_WORK_ORDER_COMPLETION_DELAY"
|
|
|
};
|
|
|
|
|
|
var rows = await _rep.AsQueryable()
|
|
|
@@ -511,15 +513,17 @@ public class S8MonitoringService : ITransient
|
|
|
var mf = bucket.Count(r => r.ExceptionTypeCode == "MFG_MATERIAL_ABNORMAL");
|
|
|
var qf = bucket.Count(r => r.ExceptionTypeCode == "MFG_QUALITY_ABNORMAL");
|
|
|
var bpd = bucket.Count(r => r.ExceptionTypeCode == "BODY_PRODUCTION_DELAY_WARNING");
|
|
|
+ var pwo = bucket.Count(r => r.ExceptionTypeCode == "PRODUCTION_WORK_ORDER_COMPLETION_DELAY");
|
|
|
dayList.Add(new AdoS8ProductionTrendDayDto
|
|
|
{
|
|
|
- Date = d.ToString("MM/dd"),
|
|
|
- RawDate = d.ToString("yyyy-MM-dd"),
|
|
|
- EquipmentFault = ef,
|
|
|
- MaterialFault = mf,
|
|
|
- QualityFault = qf,
|
|
|
- BodyProductionDelay = bpd,
|
|
|
- Total = ef + mf + qf + bpd,
|
|
|
+ Date = d.ToString("MM/dd"),
|
|
|
+ RawDate = d.ToString("yyyy-MM-dd"),
|
|
|
+ EquipmentFault = ef,
|
|
|
+ MaterialFault = mf,
|
|
|
+ QualityFault = qf,
|
|
|
+ BodyProductionDelay = bpd,
|
|
|
+ ProductionWorkOrderCompletionDelay = pwo,
|
|
|
+ Total = ef + mf + qf + bpd + pwo,
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -578,7 +582,8 @@ public class S8MonitoringService : ITransient
|
|
|
"SUPPLIER_ETA_ISSUE", "SUPPLIER_SHIP_ISSUE", "SUPPLIER_DELIVERY_DELAY_WARNING",
|
|
|
"WAREHOUSE_RECEIPT_ABNORMAL", "IQC_ISSUE", "WH_PUTAWAY_ISSUE",
|
|
|
"WORK_ORDER_KITTING_ABNORMAL", "WORK_ORDER_ISSUE_ABNORMAL",
|
|
|
- "PURCHASE_EXECUTION_DELAY", "MATERIAL_STOCK_ABNORMAL", "INVENTORY_TURNOVER_ABNORMAL"
|
|
|
+ "PURCHASE_EXECUTION_DELAY", "MATERIAL_STOCK_ABNORMAL", "INVENTORY_TURNOVER_ABNORMAL",
|
|
|
+ "PURCHASE_DELIVERY_ABNORMAL"
|
|
|
};
|
|
|
|
|
|
var rows = await _rep.AsQueryable()
|
|
|
@@ -607,6 +612,7 @@ public class S8MonitoringService : ITransient
|
|
|
var ped = bucket.Count(r => r.ExceptionTypeCode == "PURCHASE_EXECUTION_DELAY");
|
|
|
var msa = bucket.Count(r => r.ExceptionTypeCode == "MATERIAL_STOCK_ABNORMAL");
|
|
|
var ita = bucket.Count(r => r.ExceptionTypeCode == "INVENTORY_TURNOVER_ABNORMAL");
|
|
|
+ var pda = bucket.Count(r => r.ExceptionTypeCode == "PURCHASE_DELIVERY_ABNORMAL");
|
|
|
dayList.Add(new AdoS8SupplyTrendDayDto
|
|
|
{
|
|
|
Date = d.ToString("MM/dd"),
|
|
|
@@ -622,7 +628,8 @@ public class S8MonitoringService : ITransient
|
|
|
PurchaseExecutionDelay = ped,
|
|
|
MaterialStockAbnormal = msa,
|
|
|
InventoryTurnoverAbnormal = ita,
|
|
|
- Total = sEta + sShip + sDdw + whR + iqc + whP + woK + woI + ped + msa + ita,
|
|
|
+ PurchaseDeliveryAbnormal = pda,
|
|
|
+ Total = sEta + sShip + sDdw + whR + iqc + whP + woK + woI + ped + msa + ita + pda,
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -667,15 +674,17 @@ public class S8MonitoringService : ITransient
|
|
|
("order-due-date-delay", "订单交期延期", "ORDER_DUE_DATE_DELAY"),
|
|
|
("product-design-delay", "产品设计延期", "PRODUCT_DESIGN_DELAY"),
|
|
|
("delivery-delay-warning", "总装发货延期", "DELIVERY_DELAY_WARNING"),
|
|
|
+ ("shipment-abnormal", "发运异常", "SHIPMENT_ABNORMAL"),
|
|
|
},
|
|
|
"PRODUCTION" => new (string, string, string)[]
|
|
|
{
|
|
|
- ("equipment-fault", "设备异常", "EQUIP_FAULT"),
|
|
|
- ("material-fault", "物料异常", "MFG_MATERIAL_ABNORMAL"),
|
|
|
- ("quality-fault", "质量异常", "MFG_QUALITY_ABNORMAL"),
|
|
|
+ ("equipment-fault", "设备异常", "EQUIP_FAULT"),
|
|
|
+ ("material-fault", "物料异常", "MFG_MATERIAL_ABNORMAL"),
|
|
|
+ ("quality-fault", "质量异常", "MFG_QUALITY_ABNORMAL"),
|
|
|
// S8-PRODUCTION-PAGE-TYPE-TITLE-AND-TREND-ALIGN-1:大屏显示「本体生产延期」(去预警),
|
|
|
// typeCode 保持 BODY_PRODUCTION_DELAY_WARNING,不改 ado_s8_exception_type.type_name。
|
|
|
- ("body-production-delay-warning", "本体生产延期", "BODY_PRODUCTION_DELAY_WARNING"),
|
|
|
+ ("body-production-delay-warning", "本体生产延期", "BODY_PRODUCTION_DELAY_WARNING"),
|
|
|
+ ("production-work-order-completion-delay", "工单完工延期", "PRODUCTION_WORK_ORDER_COMPLETION_DELAY"),
|
|
|
},
|
|
|
"SUPPLY" => new (string, string, string)[]
|
|
|
{
|
|
|
@@ -693,6 +702,7 @@ public class S8MonitoringService : ITransient
|
|
|
("purchase-execution-delay", "采购执行延期", "PURCHASE_EXECUTION_DELAY"),
|
|
|
("material-stock-abnormal", "物料库存异常", "MATERIAL_STOCK_ABNORMAL"),
|
|
|
("inventory-turnover-abnormal", "库存周转异常", "INVENTORY_TURNOVER_ABNORMAL"),
|
|
|
+ ("purchase-delivery-abnormal", "采购到货异常", "PURCHASE_DELIVERY_ABNORMAL"),
|
|
|
},
|
|
|
_ => Array.Empty<(string, string, string)>(),
|
|
|
};
|