change - 新发泡机最后一枪添加工位号

dev
wenjy 1 year ago
parent 967f0f1a74
commit f1d7dc027b

@ -91,7 +91,7 @@ namespace Aucma.Core.BoxFoam.Business
if (record == null) if (record == null)
{ {
kvPair.Value.ProductLineCode = "CX_02"; kvPair.Value.ProductLineCode = "CX_02";
kvPair.Value.StationNumber = "1004"; kvPair.Value.StationNumber = "1005";
// 数据库也没数据 // 数据库也没数据
int a = _lastShotRecordServices.AddAsync(kvPair.Value).Result; int a = _lastShotRecordServices.AddAsync(kvPair.Value).Result;
RefreshLastShotDataDelegateEvent?.Invoke(kvPair.Value); RefreshLastShotDataDelegateEvent?.Invoke(kvPair.Value);
@ -102,7 +102,7 @@ namespace Aucma.Core.BoxFoam.Business
if (!kvPair.Value.MixpistOff.Equals(tempKeys[kvPair.Key].MixpistOff)) if (!kvPair.Value.MixpistOff.Equals(tempKeys[kvPair.Key].MixpistOff))
{ {
kvPair.Value.ProductLineCode = "CX_02"; kvPair.Value.ProductLineCode = "CX_02";
kvPair.Value.StationNumber = "1004"; kvPair.Value.StationNumber = "1005";
int b = _lastShotRecordServices.AddAsync(kvPair.Value).Result; int b = _lastShotRecordServices.AddAsync(kvPair.Value).Result;
RefreshLastShotDataDelegateEvent?.Invoke(kvPair.Value); RefreshLastShotDataDelegateEvent?.Invoke(kvPair.Value);

@ -223,7 +223,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
LastShotRecordDataGrid.Clear(); LastShotRecordDataGrid.Clear();
int i = 1; int i = 1;
var list = _boxLastShotRecordServices.QueryAsync().Result.OrderBy(d => d.CreateTime).Take(10); var list = _boxLastShotRecordServices.QueryAsync(x=>x.StationNumber == "1005").Result.OrderByDescending(d => d.CreateTime).Take(10);
if (list == null) return; if (list == null) return;
//list.OrderByDescending(d => d.CreateTime); //list.OrderByDescending(d => d.CreateTime);
foreach (var item in list) foreach (var item in list)

@ -40,6 +40,8 @@ namespace Aucma.Core.BoxFoam.ViewModels
} }
public void InitData() public void InitData()
{
try
{ {
MaterialCode.Clear(); MaterialCode.Clear();
MaterialName.Clear(); MaterialName.Clear();
@ -47,9 +49,9 @@ namespace Aucma.Core.BoxFoam.ViewModels
ComplateAmount.Clear(); ComplateAmount.Clear();
DifferenceAmount.Clear(); DifferenceAmount.Clear();
var task = _boxFoamPlanServices.QueryAsync(x=>x.ProductLineCode == "CX_02" && x.StationCode == "1005" && x.ShiftType == 1).Result; var task = _boxFoamPlanServices.QueryAsync(x => x.ProductLineCode == "CX_02" && x.StationCode == "1005" && x.ShiftType == 1).Result;
if (task == null) return; if (task == null) return;
task.OrderBy(d=>d.ObjId); task.OrderBy(d => d.ObjId);
foreach (var item in task) foreach (var item in task)
{ {
Id.Add(item.ObjId); Id.Add(item.ObjId);
@ -59,6 +61,10 @@ namespace Aucma.Core.BoxFoam.ViewModels
ComplateAmount.Add(item.CompleteAmount); ComplateAmount.Add(item.CompleteAmount);
DifferenceAmount.Add(item.PlanAmount - item.CompleteAmount); DifferenceAmount.Add(item.PlanAmount - item.CompleteAmount);
} }
}catch(Exception ex)
{
Console.WriteLine($"刷新计划列表异常:{ex.Message}");
}
} }
#region MyRegion #region MyRegion

@ -226,9 +226,9 @@
"EquipName": "foamMachinePlc", "EquipName": "foamMachinePlc",
"PlcType": "Siemens", "PlcType": "Siemens",
"Enabled": true, "Enabled": true,
//"IP": "10.10.93.180", "IP": "10.10.93.180",
"IP": "127.0.0.1", //"IP": "127.0.0.1",
"Port": 105 "Port": 102
} }
], ],
"StoreInfo": { "StoreInfo": {

Loading…
Cancel
Save