using System.Globalization;
using Admin.NET.Plugin.AiDOP.Infrastructure;
using Admin.NET.Plugin.AiDOP.Order;
namespace Admin.NET.Plugin.AiDOP.Production;
/// 工单排产动作:生成排程、优先级调整并重检。
[ApiDescriptionSettings(Order = 264, Description = "工单排产动作")]
[Route("api/Production")]
[AllowAnonymous]
[NonUnify]
public class ProductionSchedulingActionService : IDynamicApiController, ITransient
{
private readonly ISqlSugarClient _db;
private readonly UserManager _userManager;
private readonly OrderResourceCheckService _resourceCheck;
private readonly ProductionScheduleGenerationService _scheduleGen;
private readonly AidopActionRunLogWriter _runLog;
public ProductionSchedulingActionService(
ISqlSugarClient db,
UserManager userManager,
OrderResourceCheckService resourceCheck,
ProductionScheduleGenerationService scheduleGen,
AidopActionRunLogWriter runLog)
{
_db = db;
_userManager = userManager;
_resourceCheck = resourceCheck;
_scheduleGen = scheduleGen;
_runLog = runLog;
}
/// 生成生产排程计划(写入 PeriodSequenceDet)。
[DisplayName("生成生产排程")]
[HttpPost("scheduling/generate")]
public async Task