using Admin.NET.Plugin.AiDOP.DataPlatform;
namespace Admin.NET.Plugin.AiDOP.Controllers;
public partial class AidopKanbanController
{
///
/// T8 基表双模式入站:T8_KC_TZ_HEAD/LIST、T8_KC_DD_HEAD/LIST、T8_KC_ZJ_LIST、T8_SYS_PELIST
/// → mdp_stg_t8_* → mdp_std_t8_*。S5/S6/S7 迁移后的 7 个 KPI 读标准层前须先跑本入站。
/// 服务经 App.GetRequiredService 解析,避免改动共享控制器构造函数。
///
[HttpPost("t8-base-mdp/inbound")]
public async Task InboundT8BaseMdp(
[FromQuery] long? tenantId,
[FromQuery] bool fullRefresh = true,
[FromQuery] string? entityCode = null,
CancellationToken cancellationToken = default)
{
var svc = App.GetRequiredService();
var result = await svc.RunInboundAsync(tenantId ?? 0, fullRefresh, entityCode, cancellationToken);
return Ok(new
{
ok = true,
result.BatchId,
tables = result.Tables.Select(t => new { t.EntityCode, t.StgRows, t.StdRows })
});
}
}