|
@@ -1313,6 +1313,22 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
};
|
|
|
#endregion
|
|
|
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
+ if (allnumbers == null)
|
|
|
+ {
|
|
|
+ var al = new AllNumber()
|
|
|
+ {
|
|
|
+ Id = Guid.NewGuid(),
|
|
|
+ DateA = DateTime.Today,
|
|
|
+ PlanA = 0,
|
|
|
+ RealityA = 0,
|
|
|
+ OkA = 0,
|
|
|
+ NgA = 0,
|
|
|
+ ErrA = 0
|
|
|
+ };
|
|
|
+ _repository.Add(al);
|
|
|
+ }
|
|
|
+
|
|
|
SignalMapper = new Dictionary<int, string>
|
|
|
{
|
|
|
{1, "1025.0" },
|
|
@@ -1358,22 +1374,6 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
|
|
|
myBackUpThread = new Thread(_timer_Elapsed1) { IsBackground = true };
|
|
|
myBackUpThread.Start();
|
|
|
-
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
- if (allnumbers == null)
|
|
|
- {
|
|
|
- var al = new AllNumber()
|
|
|
- {
|
|
|
- Id = Guid.NewGuid(),
|
|
|
- DateA = DateTime.Today,
|
|
|
- PlanA = 0,
|
|
|
- RealityA = 0,
|
|
|
- OkA = 0,
|
|
|
- NgA = 0,
|
|
|
- ErrA = 0
|
|
|
- };
|
|
|
- _repository.Add(al);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
public void Bind(string procode)
|
|
@@ -1684,29 +1684,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //public void ReadOrder()
|
|
|
- //{
|
|
|
- // var customRepo = new CustomRepository();
|
|
|
- // try
|
|
|
- // {
|
|
|
- // DateTime max = DateTime.Today.AddDays(1);
|
|
|
- // DateTime min = DateTime.Today.AddDays(-1);
|
|
|
- // //var list = customRepo.GetAllQuery<ICMO>(c => c.FDate == DateTime.Today);
|
|
|
- // var list = customRepo.GetAllQuery<ICMO>(c => c.FDate < max && c.FDate > min);
|
|
|
- // if (list != null)
|
|
|
- // {
|
|
|
- // OrderNames = new ObservableCollection<string>();
|
|
|
- // for (int i = 0; i < list.Count; i++)
|
|
|
- // {
|
|
|
- // OrderNames.Add(list[i].FBillNo);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // catch (Exception ex)
|
|
|
- // {
|
|
|
- // WriteLog("ReadOrder:" + ex.Message, LogType.Error);
|
|
|
- // }
|
|
|
- //}
|
|
|
+
|
|
|
private void UploadOutWork()
|
|
|
{
|
|
|
var list = _repository.GetFirstDefault<OutofWork>(c => c.DateOutWork == DateTime.Today);
|
|
@@ -1761,34 +1739,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //void SwitchProduct()
|
|
|
- //{
|
|
|
- // SendToClient("Num1");
|
|
|
- //}
|
|
|
- //public void SendToClient(string id)
|
|
|
- //{
|
|
|
- // //tcpService.SocketClients.GetIds() 向所有id发送
|
|
|
- // //foreach (var item in tcpService.SocketClients.GetIds())
|
|
|
- // //{
|
|
|
- // // if (string.IsNullOrWhiteSpace(SelectedConfigName))
|
|
|
- // // {
|
|
|
- // // tcpService.Send(item, "None");
|
|
|
- // // WriteLog("发送:None");
|
|
|
- // // return;
|
|
|
- // // }
|
|
|
- // // tcpService.Send(item, SelectedConfigName);
|
|
|
- // // WriteLog("发送:" + SelectedConfigName);
|
|
|
- // //}
|
|
|
- // if (string.IsNullOrWhiteSpace(SelectedConfigName))
|
|
|
- // {
|
|
|
- // tcpService.Send(id, "None");
|
|
|
- // WriteLog("发送:None");
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // tcpService.Send(id, SelectedConfigName);
|
|
|
- // WriteLog("发送:" + SelectedConfigName);
|
|
|
-
|
|
|
- //}
|
|
|
+
|
|
|
public void SendPro(string id, string name)
|
|
|
{
|
|
|
try
|
|
@@ -1804,8 +1755,6 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- //tcpService.Send(id, "Type:" + name + ":" + id);
|
|
|
- //WriteLog("发送:" + name);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -1880,10 +1829,8 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
p1 = d1.ToString() + d2.ToString() + d3.ToString();
|
|
|
Thread.Sleep(200);
|
|
|
tcpNet.Write("1025.0", false);
|
|
|
- _logger.Information("{@Message}", $"工位1_writefalse2");
|
|
|
}
|
|
|
tcpNet.Write("1025.0", false);
|
|
|
- _logger.Information("{@Message}", $"工位1_writefalse3");
|
|
|
}));
|
|
|
}
|
|
|
public void RecordOneMessage2(object sender, StateEventArgs e)//2
|