|
|
|
@ -29,6 +29,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
public partial class IndexPageViewModel : ObservableObject
|
|
|
|
|
{
|
|
|
|
|
protected readonly IExecutePlanInfoServices? _taskExecutionPlanInfoServices;
|
|
|
|
|
|
|
|
|
|
private AppConfigHelper appConfig = new AppConfigHelper();
|
|
|
|
|
List<SelectModel> list = new List<SelectModel>() { new SelectModel()
|
|
|
|
|
{
|
|
|
|
@ -48,7 +49,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
_taskExecutionPlanInfoServices = App.ServiceProvider.GetService<IExecutePlanInfoServices>();
|
|
|
|
|
StationName = Appsettings.app("StoreInfo", "StationName");
|
|
|
|
|
//Job_SheetMetalTask_Quartz.SmEverDayDelegateEvent += InitEveryDayMethod;
|
|
|
|
|
//Job_SheetMetalTask_Quartz.SmShowDelegateEvent += UpdatePlanSHow;//计划内容展示
|
|
|
|
|
Job_SheetMetalTask_Quartz.SmTaskDelegateEvent += UpdatePlanSHow;//计划内容展示
|
|
|
|
|
WeakReferenceMessenger.Default.Register<string>(this, Recive);
|
|
|
|
|
|
|
|
|
|
Task.WaitAll(LoadData(), InitExecMethod());
|
|
|
|
@ -66,7 +67,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
|
|
|
|
|
private async Task InitExecMethod()
|
|
|
|
|
{
|
|
|
|
|
string station = "1001";
|
|
|
|
|
string station = Appsettings.app("StoreInfo", "StationCode");
|
|
|
|
|
ExecutePlanInfo info = await _taskExecutionPlanInfoServices.FirstAsync(d => d.ProductLineCode.Equals(station) && d.ExecuteStatus == 2);
|
|
|
|
|
if (info == null) return;
|
|
|
|
|
|
|
|
|
@ -224,7 +225,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
if (result)
|
|
|
|
|
{
|
|
|
|
|
PlanInfoDataGrid.Clear();
|
|
|
|
|
LoadData();
|
|
|
|
|
await LoadData();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
@ -572,9 +573,11 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public Task UpdatePlanSHow(ExecutePlanInfo info)
|
|
|
|
|
public async Task UpdatePlanSHow()
|
|
|
|
|
{
|
|
|
|
|
if (info == null) return Task.CompletedTask;
|
|
|
|
|
string stationCode = Appsettings.app("StoreInfo", "StationCode");
|
|
|
|
|
var info =await _taskExecutionPlanInfoServices.FirstAsync(d=>d.ExecuteStatus==3&& d.ProductLineCode == stationCode);
|
|
|
|
|
if (info == null) return;
|
|
|
|
|
|
|
|
|
|
System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
|
|
|
|
|
{
|
|
|
|
@ -584,7 +587,6 @@ namespace Aucma.Core.SheetMetal.ViewModels
|
|
|
|
|
ProductModel = info.MaterialName;
|
|
|
|
|
BeginTime = info.BeginTime.ToString();
|
|
|
|
|
}));
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|