修改部分显示 警告

dev
liulb@mesnac.com 1 year ago
parent d4cbdc4642
commit 2c727f8cd4

@ -97,7 +97,7 @@ namespace Admin.Core.Service
public async Task<CodeBindingRecord> FirstAsync() public async Task<CodeBindingRecord> FirstAsync()
{ {
return _codeBindingRecordRepository.FirstAsync().Result; return await _codeBindingRecordRepository.FirstAsync();
} }
/// <summary> /// <summary>

@ -48,7 +48,7 @@ namespace Admin.Core.Service
try try
{ {
List<RecordInStore> preCordList = _recordInstoreRepository.QueryAsync(d =>d.StoreCode.Equals(storeCode) && d.InStoreTime >= startTime && d.InStoreTime <= endTime).Result;// List<RecordInStore> preCordList =await _recordInstoreRepository.QueryAsync(d =>d.StoreCode.Equals(storeCode) && d.InStoreTime >= startTime && d.InStoreTime <= endTime);//
if(preCordList == null && preCordList.Count == 0) return null; if(preCordList == null && preCordList.Count == 0) return null;
return preCordList; return preCordList;
//List<EnterLibView> list = new List<EnterLibView>(); //List<EnterLibView> list = new List<EnterLibView>();

@ -123,7 +123,10 @@ namespace Admin.Core.Service
if (sm!=null) if (sm!=null)
{ {
//下传计划到PLC,同时更改计划状态 //下传计划到PLC,同时更改计划状态
} }
await Task.CompletedTask;
return null;
} }
catch (Exception ex) catch (Exception ex)
{ {

@ -125,6 +125,7 @@ namespace Admin.Core.Tasks
// await ExecuteJob(context, async () => await PassDown(context)); // await ExecuteJob(context, async () => await PassDown(context));
// 监测入库,出库完成信号 // 监测入库,出库完成信号
// await ExecuteJob(context, async () => await RealInstoreFinish(context)); // await ExecuteJob(context, async () => await RealInstoreFinish(context));
await Task.CompletedTask;
} }
public async Task RealInstoreFinish(IJobExecutionContext context) public async Task RealInstoreFinish(IJobExecutionContext context)
{ {
@ -147,6 +148,7 @@ namespace Admin.Core.Tasks
} }
} }
} }
await Task.CompletedTask;
} }

@ -57,7 +57,7 @@ namespace Admin.Core.Tasks
/// <returns></returns> /// <returns></returns>
public async Task Collect(IJobExecutionContext context) public async Task Collect(IJobExecutionContext context)
{ {
CollectLast(); await CollectLast();
// CollectMachine(); // CollectMachine();
} }
@ -113,7 +113,7 @@ namespace Admin.Core.Tasks
// 刷新页面 // 刷新页面
RefreshLastShotDataDelegateEvent?.Invoke(lastShotRecord); RefreshLastShotDataDelegateEvent?.Invoke(lastShotRecord);
//保存 //保存
_lastShotRecordServices.AddAsync(lastShotRecord); await _lastShotRecordServices.AddAsync(lastShotRecord);
tempLastRecord = lastShotRecord; tempLastRecord = lastShotRecord;
} }
} }
@ -131,7 +131,7 @@ namespace Admin.Core.Tasks
{ {
byte[] info = obj.plc.ReadBytes("DB50.896", (ushort)88); byte[] info = obj.plc.ReadBytes("DB50.896", (ushort)88);
} }
await Task.CompletedTask;
} }
} }

@ -63,6 +63,7 @@ namespace Admin.Core.Tasks
// await PlanHandle(planInfo); // await PlanHandle(planInfo);
// } // }
//} //}
await Task.CompletedTask;
} }
@ -92,6 +93,7 @@ namespace Admin.Core.Tasks
//{ //{
// //报警停线 // //报警停线
//} //}
await Task.CompletedTask;
} }
catch (Exception ex) catch (Exception ex)
{ {

@ -116,6 +116,7 @@ namespace Aucma.Core.RunPlc
} }
} }
} }
await Task.CompletedTask;
} }
private async void ExecSiemensHeartTask(object? sender, ElapsedEventArgs e) private async void ExecSiemensHeartTask(object? sender, ElapsedEventArgs e)
{ {

@ -96,7 +96,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
private async Task InitExecMethod() private async Task InitExecMethod()
{ {
string station = Appsettings.app("StoreInfo", "StationCode"); string station = Appsettings.app("StationInfo", "StationCode");
ExecutePlanInfo info = await _taskExecutionPlanInfoServices.FirstAsync(d => d.ProductLineCode.Equals(station) && d.ExecuteStatus == 2); ExecutePlanInfo info = await _taskExecutionPlanInfoServices.FirstAsync(d => d.ProductLineCode.Equals(station) && d.ExecuteStatus == 2);
if (info == null) return; if (info == null) return;
@ -302,11 +302,10 @@ namespace Aucma.Core.SheetMetal.ViewModels
[RelayCommand] [RelayCommand]
private async Task MoveUp(string Id) private async Task MoveUp(string Id)
{ {
string stationCode = Appsettings.app("StoreInfo", "StationCode"); string stationCode = Appsettings.app("StationInfo", "StationCode");
bool result = await _taskExecutionPlanInfoServices.PlanMoveUp(Id, stationCode); bool result = await _taskExecutionPlanInfoServices.PlanMoveUp(Id, stationCode);
if (result) if (result)
{ {
PlanInfoDataGrid.Clear();
await LoadData(); await LoadData();
} }
} }
@ -319,12 +318,12 @@ namespace Aucma.Core.SheetMetal.ViewModels
[RelayCommand] [RelayCommand]
private async Task MoveDown(string Id) private async Task MoveDown(string Id)
{ {
string stationCode = Appsettings.app("StoreInfo", "StationCode"); string stationCode = Appsettings.app("StationInfo", "StationCode");
bool result = await _taskExecutionPlanInfoServices.PlanMoveDown(Id, stationCode); bool result = await _taskExecutionPlanInfoServices.PlanMoveDown(Id, stationCode);
if (result) if (result)
{ {
PlanInfoDataGrid.Clear(); PlanInfoDataGrid.Clear();
LoadData(); await LoadData();
} }
} }
#endregion #endregion
@ -671,7 +670,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// <returns></returns> /// <returns></returns>
public async Task UpdatePlanSHow() public async Task UpdatePlanSHow()
{ {
string stationCode = Appsettings.app("StoreInfo", "StationCode"); string stationCode = Appsettings.app("StationInfo", "StationCode");
var info = await _taskExecutionPlanInfoServices.FirstAsync(d => d.ExecuteStatus == 3 && d.ProductLineCode == stationCode); var info = await _taskExecutionPlanInfoServices.FirstAsync(d => d.ExecuteStatus == 3 && d.ProductLineCode == stationCode);
if (info == null) return; if (info == null) return;

@ -26,9 +26,9 @@ namespace Aucma.Core.SheetMetal.ViewModels
[RelayCommand] [RelayCommand]
private async void Refresh() private async void Refresh()
{ {
string shellStoreCode = Appsettings.app("StoreInfo", "shellStoreCode"); string shellStoreCode = Appsettings.app("StationInfo", "shellStoreCode");
string linerStoreCode = Appsettings.app("StoreInfo", "linerStoreCode"); string linerStoreCode = Appsettings.app("StationInfo", "linerStoreCode");
string foamBeforeStoreCode = Appsettings.app("StoreInfo", "foamBeforeStoreCode"); string foamBeforeStoreCode = Appsettings.app("StationInfo", "foamBeforeStoreCode");
//箱壳物料库存 //箱壳物料库存
ShellMaterialStockDataGrid = new ObservableCollection<BaseSpaceInfo>(); ShellMaterialStockDataGrid = new ObservableCollection<BaseSpaceInfo>();
List<BaseSpaceInfo> shellList =await _baseSpaceInfoServices.GetSpaceInfosByStoreCode(shellStoreCode); List<BaseSpaceInfo> shellList =await _baseSpaceInfoServices.GetSpaceInfosByStoreCode(shellStoreCode);

@ -94,7 +94,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
task.ProductPlanCode = PlanInfo.PlanCode; task.ProductPlanCode = PlanInfo.PlanCode;
task.OrderCode = PlanInfo.OrderCode; task.OrderCode = PlanInfo.OrderCode;
task.ProductLineCode = stationCode;//计划工位 task.ProductLineCode = stationCode;//计划工位
task.TaskCode = DateTime.Now.ToString("yyMMddHHmmss"); task.TaskCode = productPlanInfo.PlanCode;// DateTime.Now.ToString("yyMMddHHmmss");
task.MaterialCode = PlanInfo.MaterialCode; task.MaterialCode = PlanInfo.MaterialCode;
task.MaterialName = PlanInfo.MaterialName; task.MaterialName = PlanInfo.MaterialName;
if (list.Count == 0) if (list.Count == 0)

@ -269,13 +269,11 @@ namespace Aucma.Core.SheetMetal.ViewModels
/// 重置 /// 重置
/// </summary> /// </summary>
[RelayCommand] [RelayCommand]
public void Reset() public async Task Reset()
{ {
LoadData();
Search = string.Empty; Search = string.Empty;
MaterialTypeCombox = string.Empty; MaterialTypeCombox = string.Empty;
this.LoadData(); await this.LoadData();
} }
#endregion #endregion

@ -32,7 +32,11 @@ namespace Aucma.Core.SheetMetal.ViewModels
_backPanelComplateServices = App.ServiceProvider.GetService<IRecordBackPanelComplateServices>(); _backPanelComplateServices = App.ServiceProvider.GetService<IRecordBackPanelComplateServices>();
_executePlanInfoServices = App.ServiceProvider.GetService<IExecutePlanInfoServices>(); _executePlanInfoServices = App.ServiceProvider.GetService<IExecutePlanInfoServices>();
Task.WaitAll(LoadData()); //Task.WaitAll(LoadData());
Task.Run(async ()=>{
await LoadData();
});
} }
#region 加载DataGrid数据 #region 加载DataGrid数据
@ -59,6 +63,7 @@ namespace Aucma.Core.SheetMetal.ViewModels
}); });
i++; i++;
} }
await Task.CompletedTask;
} }
private Task LoadDateData(string result) private Task LoadDateData(string result)

@ -76,7 +76,8 @@ namespace Aucma.Core.Tasks
public async Task InStoreRun() public async Task InStoreRun()
{ {
string storeCode = Appsettings.app("StoreInfo", "BeforeStoreCode");//泡前库code string storeCode = Appsettings.app("StoreInfo", "BeforeStoreCode");//泡前库code
// await InStore(storeCode, "B20231082080029650001"); // await InStore(storeCode, "B20231082080029650001");
await Task.CompletedTask;
} }
public async Task OuteRun() public async Task OuteRun()
{ {

@ -84,6 +84,7 @@ namespace Aucma.Core.Tasks
//{ //{
// //报警停线 // //报警停线
//} //}
await Task.CompletedTask;
} }
catch (Exception ex) catch (Exception ex)
{ {

Loading…
Cancel
Save