|
|
@@ -0,0 +1,53 @@
|
|
|
+using Admin.NET.Plugin.AiDOP.Dto.S8.OrderFlow;
|
|
|
+using Admin.NET.Plugin.AiDOP.Service.S8.OrderFlow;
|
|
|
+
|
|
|
+namespace Admin.NET.Plugin.AiDOP.Controllers.S8;
|
|
|
+
|
|
|
+/// <summary>
|
|
|
+/// ORDER-FLOW-S8-INTEGRATED-DOMAIN-RESET-1 t3d:S8 订单执行链路只读 API。
|
|
|
+/// 仅 GET endpoint;调用 S8OrderFlowService 5 个方法暴露。
|
|
|
+/// 路由:api/aidop/s8/order-flow/*。
|
|
|
+/// </summary>
|
|
|
+[ApiController]
|
|
|
+[Route("api/aidop/s8/order-flow")]
|
|
|
+[NonUnify]
|
|
|
+public class AdoS8OrderFlowController : ControllerBase
|
|
|
+{
|
|
|
+ private readonly S8OrderFlowService _svc;
|
|
|
+
|
|
|
+ public AdoS8OrderFlowController(S8OrderFlowService svc)
|
|
|
+ {
|
|
|
+ _svc = svc;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>订单档案列表(不分页,当前 baseline 20 单)。</summary>
|
|
|
+ [HttpGet("orders")]
|
|
|
+ public async Task<IActionResult> OrdersAsync([FromQuery] AdoS8OrderFlowOrderQueryDto query)
|
|
|
+ => Ok(await _svc.GetOrdersAsync(query));
|
|
|
+
|
|
|
+ /// <summary>单订单详情(含 lifecycle 5 阶段,不含 substep/unit)。</summary>
|
|
|
+ [HttpGet("orders/{orderCode}")]
|
|
|
+ public async Task<IActionResult> OrderDetailAsync(
|
|
|
+ string orderCode,
|
|
|
+ [FromQuery] long tenantId = 1,
|
|
|
+ [FromQuery] long factoryId = 1)
|
|
|
+ => Ok(await _svc.GetOrderAsync(orderCode, tenantId, factoryId));
|
|
|
+
|
|
|
+ /// <summary>订单链路(含 lifecycle + L2 substeps + L3 units;ProcurementPivot 留待后续切片注入)。</summary>
|
|
|
+ [HttpGet("orders/{orderCode}/chain")]
|
|
|
+ public async Task<IActionResult> ChainAsync(
|
|
|
+ string orderCode,
|
|
|
+ [FromQuery] long tenantId = 1,
|
|
|
+ [FromQuery] long factoryId = 1)
|
|
|
+ => Ok(await _svc.GetChainAsync(orderCode, tenantId, factoryId));
|
|
|
+
|
|
|
+ /// <summary>链路聚合视图:BASELINE_PPT 走 snapshot;CURRENT_FILTERED 走实时聚合。</summary>
|
|
|
+ [HttpGet("aggregate")]
|
|
|
+ public async Task<IActionResult> AggregateAsync([FromQuery] AdoS8OrderFlowAggregateQueryDto query)
|
|
|
+ => Ok(await _svc.GetAggregateAsync(query));
|
|
|
+
|
|
|
+ /// <summary>采购透视:BASELINE_PPT 读 procurement_pivot 表 baseline 行。</summary>
|
|
|
+ [HttpGet("procurement-pivot")]
|
|
|
+ public async Task<IActionResult> ProcurementPivotAsync([FromQuery] AdoS8OrderFlowProcurementPivotQueryDto query)
|
|
|
+ => Ok(await _svc.GetProcurementPivotAsync(query));
|
|
|
+}
|