AidopKanbanController.T8BaseInbound.cs 1.1 KB

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