|
@@ -845,7 +845,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
string sp = mes.Split(":")[1];
|
|
|
string result = mes.Split(":")[2];
|
|
|
string opname = Operator17;
|
|
|
- TestRes(sp, result, opname);
|
|
|
+ TestRes(sp, result, opname);
|
|
|
WriteCSV_Test(opname, sp, result);
|
|
|
client.Send("TeR:检测结果上传成功");
|
|
|
WriteLog("检测3#检测结果上传成功");
|
|
@@ -1136,14 +1136,13 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
WriteLog("维修1#维修信息上传成功");
|
|
|
try
|
|
|
{
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
var list = _repository.GetFirstDefault<ProStatus>(c => c.OrdNoS == Order);//查一个值
|
|
|
if (list != null)
|
|
|
{
|
|
|
list.ErrS++;
|
|
|
_repository.Update(list);
|
|
|
}
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
if (allnumbers != null)
|
|
|
{
|
|
|
allnumbers.ErrA++;
|
|
@@ -1210,14 +1209,13 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
WriteLog("维修2#维修信息上传成功");
|
|
|
try
|
|
|
{
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
var list = _repository.GetFirstDefault<ProStatus>(c => c.OrdNoS == Order);//查一个值
|
|
|
if (list != null)
|
|
|
{
|
|
|
list.ErrS++;
|
|
|
_repository.Update(list);
|
|
|
}
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
if (allnumbers != null)
|
|
|
{
|
|
|
allnumbers.ErrA++;
|
|
@@ -1284,14 +1282,13 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
WriteLog("维修3#维修信息上传成功");
|
|
|
try
|
|
|
{
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
var list = _repository.GetFirstDefault<ProStatus>(c => c.OrdNoS == Order);//查一个值
|
|
|
if (list != null)
|
|
|
{
|
|
|
list.ErrS++;
|
|
|
_repository.Update(list);
|
|
|
}
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
if (allnumbers != null)
|
|
|
{
|
|
|
allnumbers.ErrA++;
|
|
@@ -1421,14 +1418,13 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
var list = _repository.GetFirstDefault<ProStatus>(c => c.OrdNoS == Order);//查一个值
|
|
|
if (list != null)
|
|
|
{
|
|
|
list.OkS++;
|
|
|
_repository.Update(list);
|
|
|
}
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
if (allnumbers != null)
|
|
|
{
|
|
|
allnumbers.OkA++;
|
|
@@ -1444,14 +1440,13 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
var list = _repository.GetFirstDefault<ProStatus>(c => c.OrdNoS == Order);//查一个值
|
|
|
if (list != null)
|
|
|
{
|
|
|
list.NgS++;
|
|
|
_repository.Update(list);
|
|
|
}
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
if (allnumbers != null)
|
|
|
{
|
|
|
allnumbers.NgA++;
|
|
@@ -1476,7 +1471,6 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
var list = _repository.GetFirstDefault<ProStatus>(c => c.OrdNoS == Order);//查一个值
|
|
|
if (list != null)
|
|
|
{
|
|
@@ -1484,7 +1478,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
list.NgS--;
|
|
|
_repository.Update(list);
|
|
|
}
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
if (allnumbers != null)
|
|
|
{
|
|
|
allnumbers.OkA++;
|
|
@@ -1507,7 +1501,6 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
var list = _repository.GetFirstDefault<ProStatus>(c => c.OrdNoS == Order);//查一个值
|
|
|
if (list != null)
|
|
|
{
|
|
@@ -1515,7 +1508,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
list.OkS--;
|
|
|
_repository.Update(list);
|
|
|
}
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
if (allnumbers != null)
|
|
|
{
|
|
|
allnumbers.NgA++;
|
|
@@ -1550,19 +1543,6 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
{
|
|
|
tcpNet.WriteInt(1500, 0);
|
|
|
}
|
|
|
-
|
|
|
- //if (!mybool)
|
|
|
- //{
|
|
|
- // mybool = true;
|
|
|
- // inovanceTcp.WriteDate("D1500", 0);
|
|
|
- // //_logger.Information("{@Message}", "Timer:D1500_0");//后台log,会添加到数据中,不会显示到界面上
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // mybool = false;
|
|
|
- // inovanceTcp.WriteDate("D1500", 1);
|
|
|
- // //_logger.Information("{@Message}", "Timer:D1500_1");
|
|
|
- //}
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -1576,19 +1556,18 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
var list = _repository.GetFirstDefault<ProStatus>(c => c.OrdNoS == Order);//查一个值
|
|
|
if (list != null)
|
|
|
{
|
|
|
list.RealityS++;
|
|
|
_repository.Update(list);
|
|
|
}
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
- if (allnumbers != null)
|
|
|
- {
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
+ //if (allnumbers != null)
|
|
|
+ //{
|
|
|
allnumbers.RealityA++;
|
|
|
_repository.Update(allnumbers);
|
|
|
- }
|
|
|
+ //}
|
|
|
|
|
|
var d1 = tcpNet.ReadInt(1090);
|
|
|
var d2 = tcpNet.ReadInt(1091);
|
|
@@ -1649,8 +1628,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
- DateTime dt = DateTime.Today;
|
|
|
- var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == dt);
|
|
|
+ var allnumbers = _repository.GetFirstDefault<AllNumber>(c => c.DateA == DateTime.Today);
|
|
|
if (allnumbers != null)
|
|
|
{
|
|
|
allnumbers.PlanA = allnumbers.PlanA + plan;
|
|
@@ -1682,13 +1660,13 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
WriteLog("订单错误", LogType.Error);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
WriteLog("OrderEnter1:" + ex.Message, LogType.Error);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -3022,7 +3000,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
|
|
|
#region WriteCSV
|
|
|
//生产信息
|
|
|
- public void WriteCSV_Pro(string idPeople,string proNo,string proType,string order,string Wu)
|
|
|
+ public void WriteCSV_Pro(string idPeople, string proNo, string proType, string order, string Wu)
|
|
|
{
|
|
|
string s1, s2, s3, s4,
|
|
|
s11, s12, s13, s14, s15, s16,
|
|
@@ -3044,9 +3022,9 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
s21 = DateTime.Now.ToString("HH:mm:ss");
|
|
|
s22 = idPeople;
|
|
|
s23 = proNo;
|
|
|
- s24 =proType;
|
|
|
- s25 =order;
|
|
|
- s26 =Wu;
|
|
|
+ s24 = proType;
|
|
|
+ s25 = order;
|
|
|
+ s26 = Wu;
|
|
|
//=========================
|
|
|
s1 = path;
|
|
|
s2 = DateTime.Now.ToString("yyyyMMdd"); //表格命名以天记录
|
|
@@ -3060,7 +3038,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
public void WriteCSV_Bind(string proCode, string proNo, string proType, string order)
|
|
|
{
|
|
|
string s1, s2, s3, s4,
|
|
|
- s11, s12, s13, s14, s15,
|
|
|
+ s11, s12, s13, s14, s15,
|
|
|
s21, s22, s23, s24, s25;
|
|
|
//
|
|
|
string path = "D:\\Result\\绑定信息\\";
|
|
@@ -3093,7 +3071,7 @@ namespace LogoForceTestApp.Modules.MainModule.ViewModels
|
|
|
public void WriteCSV_Test(string idPeople, string proCode, string res)
|
|
|
{
|
|
|
string s1, s2, s3, s4,
|
|
|
- s11, s12, s13, s14,
|
|
|
+ s11, s12, s13, s14,
|
|
|
s21, s22, s23, s24;
|
|
|
//
|
|
|
string path = "D:\\Result\\检测信息\\";
|