liuwf 1 year ago
commit 77fa41eba6

@ -60,6 +60,8 @@ namespace Admin.Core.Repository
{
if (_db.CopyNew().Ado.IsValidConnection())
{
_db.Close();
_db.Open();
return true;
}
else

@ -21,6 +21,12 @@ namespace Aucma.Core.BoxFoam.ViewModels
private IndexPageView firstPage = new IndexPageView();//首页
CollectionFoamLine line=new CollectionFoamLine();
CollectionFoamMachine machine = new CollectionFoamMachine();
RealTimeInventoryPageView realTimeInventoryPage = new RealTimeInventoryPageView();
EnterWarehouseStatisticsPageView enterWarehouseStatisticsPage = new EnterWarehouseStatisticsPageView();
FoamPlanPageView foamPlanPageView = new FoamPlanPageView();
FoamMonitorPageView foamMonitorPageView = new FoamMonitorPageView();
MonitorPageView monitorPage = new MonitorPageView();//任务监控
FoamMachinesPageView foamMachinesPageView = new FoamMachinesPageView();
public MainWindowViewModel()
{
@ -199,27 +205,27 @@ namespace Aucma.Core.BoxFoam.ViewModels
UserContent = firstPage;
break;
case "RealTimeInventoryPage":
RealTimeInventoryPageView realTimeInventoryPage = new RealTimeInventoryPageView();
UserContent = realTimeInventoryPage;
break;
case "StatisticsPage":
EnterWarehouseStatisticsPageView enterWarehouseStatisticsPage = new EnterWarehouseStatisticsPageView();
UserContent = enterWarehouseStatisticsPage;
break;
case "MonitorPage":
MonitorPageView monitorPage = new MonitorPageView();//任务监控
UserContent = monitorPage;
break;
case "FoamPlanPage":
FoamPlanPageView foamPlanPageView = new FoamPlanPageView();
UserContent = foamPlanPageView;
break;
case "FoamMonitorPage":
FoamMonitorPageView foamMonitorPageView = new FoamMonitorPageView();
UserContent = foamMonitorPageView;
break;
case "FoamMachinesPage":
FoamMachinesPageView foamMachinesPageView = new FoamMachinesPageView();
UserContent = foamMachinesPageView;
break;
default:

@ -33,6 +33,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
protected readonly IRecordSidePanelComplateServices _recordSidePanelComplateServices;
protected readonly IBaseBomInfoServices _baseBomInfoServices;
private readonly ISysUserInfoServices _sysUserInfoServices;
private readonly IRecordInStoreServices _recordInstoreServices;
private AppConfigHelper appConfig = new AppConfigHelper();
List<SelectModel> list = new List<SelectModel>() { new SelectModel()
{
@ -55,6 +56,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
_recordSidePanelComplateServices = App.ServiceProvider.GetService<IRecordSidePanelComplateServices>();
_baseBomInfoServices = App.ServiceProvider.GetService<IBaseBomInfoServices>();
_sysUserInfoServices = App.ServiceProvider.GetService<ISysUserInfoServices>();
_recordInstoreServices = App.ServiceProvider.GetService<IRecordInStoreServices>();
//Job_SheetMetalTask_Quartz.SmEverDayDelegateEvent += InitEveryDayMethod;
//Job_SheetMetalTask_Quartz.SmTaskDelegateEvent += UpdatePlanSHow;//计划内容展示
//WeakReferenceMessenger.Default.Register<string>(this, Recive);
@ -63,7 +65,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
RefreshHourAmount();//小时产量
RefreshMaterialStats();//型号产量
SheetMetalPlanTaskHandle.RefreshCurrentPlanInfoEvent += RefreshCurrentPlanInfo;
QuantityIssuedViewModel.RefreshCretaePlanInfoEvent += LoadData;
}
#endregion
@ -195,12 +197,15 @@ namespace Aucma.Core.SheetMetal.ViewModels
private Task LoadData()
{
string stationCode = Appsettings.app("StationInfo", "StationCode");
CurrentTeamTimeView view = GetTeamHour();
var list = _taskExecutionPlanInfoServices.QueryAsync(x => x.ProductLineCode == stationCode).Result;
var list = _taskExecutionPlanInfoServices.QueryAsync(x => x.ProductLineCode == stationCode&& x.CreatedTime> view.StartTime && x.CreatedTime <view.EndTime).Result;
if (list == null) return Task.CompletedTask;
var execList = list.OrderByDescending(d => d.ExecuteOrder);
int i = 1;
string planType = string.Empty;
PlanInfoDataGrid.Clear();
foreach (var item in execList)
{
TaskExecModel task = new TaskExecModel();

@ -23,6 +23,14 @@ namespace Aucma.Core.SheetMetal.ViewModels
{
public partial class QuantityIssuedViewModel : ObservableObject
{
#region 刷新创建计划
/// <summary>
/// 刷新创建计划
/// </summary>
public delegate Task RefreshCretaePlanInfo();
public static event RefreshCretaePlanInfo RefreshCretaePlanInfoEvent;
#endregion
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(QuantityIssuedViewModel));
private IBaseBomInfoServices _bomInfoServices;
private IBaseSpaceDetailServices _spaceDetailServices;
@ -94,7 +102,8 @@ namespace Aucma.Core.SheetMetal.ViewModels
if (result > 0)
{
MessageBox.Show("计划拆分成功!", "系统提醒");
WeakReferenceMessenger.Default.Send<string>("Refresh");//刷新窗口
//WeakReferenceMessenger.Default.Send<string>("Refresh");//刷新窗口
RefreshCretaePlanInfoEvent?.Invoke();
}
else
{

@ -26,7 +26,10 @@ namespace Aucma.Core.SheetMetal.ViewModels
{
public partial class SplitPlanViewModel : ObservableObject
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(SplitPlanViewModel));
protected readonly IProductPlanInfoServices? _productPlanInfoServices;
//protected readonly ISmTaskExecutionServices? _smTaskExecutionServices;
protected readonly IExecutePlanInfoServices? _executePlanInfoServices;
@ -137,7 +140,8 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// <summary>
/// 创建任务
/// </summary>
[RelayCommand]
private async Task CreateTask(string obj)
{
if (string.IsNullOrEmpty(obj))
@ -176,8 +180,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
if (result>0)
{
MessageBox.Show("计划拆分成功!","系统提醒");
WeakReferenceMessenger.Default.Send<string>("Refresh");//刷新窗口
CloseWindow();
//WeakReferenceMessenger.Default.Send<string>("Refresh");//刷新窗口
}
else
{

Loading…
Cancel
Save