清理无用代码
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.CommunicationLib.Helper;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
@@ -11,20 +9,14 @@ using Newtonsoft.Json;
|
||||
using PLCCommunication;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static System.Runtime.CompilerServices.RuntimeHelpers;
|
||||
|
||||
|
||||
namespace JinYuan.ControlCenters
|
||||
@@ -270,7 +262,7 @@ namespace JinYuan.ControlCenters
|
||||
if (resByte == null)
|
||||
{
|
||||
CommonMethods.AddDataMonitorLog(0, $"上料工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组");
|
||||
LoggerHelp.WriteLog("循环读取PLC上料工位"+$"读取工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组");
|
||||
LoggerHelp.WriteLog("循环读取PLC上料工位" + $"读取工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -3,23 +3,14 @@ using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using PLCCommunication;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
|
||||
|
||||
namespace JinYuan.ControlCenters
|
||||
{
|
||||
@@ -157,37 +148,112 @@ namespace JinYuan.ControlCenters
|
||||
// return Result;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 判断总结果 Code_NG
|
||||
/// 判断总结果
|
||||
/// </summary>
|
||||
private int JudgmentResult(int Code_NG, int[,] CCD_Data,int codeIndex)
|
||||
private int JudgmentResult(int A, int B, int C, int D, int E, int F, int G, int H, int I, int J, int K, int L, int M, int N)
|
||||
{
|
||||
//条码,芯包重量,芯包侧厚,芯包CCD极性检测,电芯裁切粘连,电芯裁切毛刺,芯包铜焊印位置,
|
||||
//芯包正面极耳撕裂H,芯包背面极耳撕裂,芯包正面极耳翻折J,芯包背面极耳翻折,测厚压力结果,
|
||||
//焊前CCD检测结果,铝焊印位置判定结果
|
||||
|
||||
//目前先判断条码,芯包重量,芯包侧厚,芯包CCD极性检测,芯包正面极耳撕裂,芯包正面极耳翻折
|
||||
int Result = 0;
|
||||
OK_NG = "OK";
|
||||
//是否有条码NG 1 = OK 2 = NG
|
||||
if (Code_NG == 2)
|
||||
if (A == 2 || B == 2 || C == 2 || D == 2 || H == 2 || J == 2)
|
||||
{
|
||||
NG_Type += "无条码_";
|
||||
OK_NG = "NG";
|
||||
//ed
|
||||
Result = 2;
|
||||
}
|
||||
//CCD 判定
|
||||
for (int i = 0; i < 27; i++)
|
||||
{
|
||||
//CCD 0 = OK 1 = NG 2 缺图NG
|
||||
if (CCD_Data[codeIndex, i] == 1)
|
||||
{
|
||||
NG_Type += $"CCD{i}NG_";
|
||||
OK_NG = "NG";
|
||||
Result = 2;
|
||||
}
|
||||
if (CCD_Data[codeIndex, i] == 2)
|
||||
else if (A == 1 && B == 1 && C == 1 && D == 1 && H == 1 && J == 1)
|
||||
{
|
||||
NG_Type += $"CCD{i}缺图NG_";
|
||||
OK_NG = "NG";
|
||||
Result = 2;
|
||||
Result = 1;
|
||||
OK_NG = "OK";
|
||||
}
|
||||
else
|
||||
{
|
||||
Result = 1;
|
||||
OK_NG = "OK";
|
||||
}
|
||||
|
||||
if (A == 2)
|
||||
{
|
||||
NG_Type += "无条码_";
|
||||
Result = 2;
|
||||
}
|
||||
if (B == 2)
|
||||
{
|
||||
NG_Type += "芯包重量1NG_";
|
||||
//return 2;
|
||||
Result = 2;
|
||||
}
|
||||
if (C == 2)
|
||||
{
|
||||
NG_Type += "芯包侧厚NG_";
|
||||
//return 2;
|
||||
Result = 2;
|
||||
}
|
||||
if (D == 2)
|
||||
{
|
||||
NG_Type += "芯包CCD极性检测NG_";
|
||||
//return 2;
|
||||
Result = 2;
|
||||
}
|
||||
|
||||
//if (E == 2)
|
||||
//{
|
||||
// NG_Type += "电芯裁切粘连NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
//if (F == 2)
|
||||
//{
|
||||
// NG_Type += "电芯裁切毛刺NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
//if (G == 2)
|
||||
//{
|
||||
// NG_Type += "芯包铜焊印位置判定NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
if (H == 2)
|
||||
{
|
||||
NG_Type += "芯包正面极耳撕裂NG_";
|
||||
//return 2;
|
||||
}
|
||||
//if (I == 2)
|
||||
//{
|
||||
// NG_Type += "芯包背面极耳撕裂NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
if (J == 2)
|
||||
{
|
||||
NG_Type += "芯包正面极耳翻折NG_";
|
||||
//return 2;
|
||||
}
|
||||
//if (K == 2)
|
||||
//{
|
||||
// NG_Type += "芯包背面极耳翻折NG_";
|
||||
// //return 2;
|
||||
//}
|
||||
if (L == 2)
|
||||
{
|
||||
NG_Type += "测厚压力NG_";
|
||||
//return 2;
|
||||
}
|
||||
if (M == 2)
|
||||
{
|
||||
NG_Type += "焊前CCD检测NG_";
|
||||
//return 2;
|
||||
}
|
||||
if (N == 2)
|
||||
{
|
||||
NG_Type += "铝焊印位置判定NG_";
|
||||
//return 2;
|
||||
}
|
||||
if (Result == 1)
|
||||
{
|
||||
NG_Type += "OK_";
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
#region 上料工位(数据处理)
|
||||
@@ -1674,22 +1740,17 @@ namespace JinYuan.ControlCenters
|
||||
AGearEntity TT = new AGearEntity();
|
||||
//极限件标志
|
||||
int ChallengeFlag = 0;
|
||||
//芯包信息1 D3300~D3327
|
||||
//芯包信息2 D3330~D3357
|
||||
//芯包信息3 D3360~D3387
|
||||
for (int j = 0; j < 28; j++)
|
||||
//芯包信息1 D3300~D3326
|
||||
//芯包信息2 D3330~D3356
|
||||
//芯包信息3 D3360~D3386
|
||||
for (int j = 0; j < 27; j++)
|
||||
{
|
||||
m.CCD_Data[i,j] = ShortLib.GetShortFromByteArray(bArrays.Content, 200 + i * 30 * 2 + j * 2, DataFormat.CDAB);
|
||||
m.CCD_Data[i, j] = ShortLib.GetShortFromByteArray(bArrays.Content, 200 + i * 30 * 2 + j * 2, DataFormat.CDAB);
|
||||
}
|
||||
//电芯1缺陷代码 D3400~D3427
|
||||
//电芯2缺陷代码 D3430~D3457
|
||||
//电芯3缺陷代码 D3460~D3487
|
||||
for (int j = 0; j < 28; j++)
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
m.list_Data1[i, j] = ShortLib.GetShortFromByteArray(bArrays.Content, 400 + i * 30 * 2 + j * 2, DataFormat.CDAB);
|
||||
m.Thickness_Data[i, j] = FloatLib.GetFloatFromByteArray(bArrays.Content, 400 + i * 30 * 2 + j * 4, DataFormat.CDAB);
|
||||
}
|
||||
//电池厚度 D3500 D3502 D3504
|
||||
m.Thickness_Data[i] = FloatLib.GetFloatFromByteArray(bArrays.Content, 600 + i * 4, DataFormat.CDAB);
|
||||
|
||||
//芯包扫码时间
|
||||
//m.ScanTime[i] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
@@ -1740,40 +1801,38 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
//不良代码判定
|
||||
List<string> NGcodeList = new List<string>();
|
||||
NGcodeList = NGWGcode(m.list_Data1,i);
|
||||
// NGcode(m.list_Data1[i, 10], m.list_Data1[i, 11], m.list_Data1[i, 12], m.list_Data1[i, 15], m.list_Data1[i, 26], m.list_Data1[i, 16]
|
||||
//, m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19], m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25], m.list_Data1[i, 27]);
|
||||
NGcodeList = NGcode(m.list_Data1[i, 10], m.list_Data1[i, 11], m.list_Data1[i, 12], m.list_Data1[i, 15], m.list_Data1[i, 26], m.list_Data1[i, 16]
|
||||
, m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19], m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25], m.list_Data1[i, 27]);
|
||||
|
||||
//电芯CCD判定结果
|
||||
#region //电芯CCD判定结果
|
||||
m.CCDResult1 = m.CCD_Data[i, 0] == 1 ? "OK" : (m.CCD_Data[i, 0] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult2 = m.CCD_Data[i, 1] == 1 ? "OK" : (m.CCD_Data[i, 1] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult3 = m.CCD_Data[i, 2] == 1 ? "OK" : (m.CCD_Data[i, 2] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult4 = m.CCD_Data[i, 3] == 1 ? "OK" : (m.CCD_Data[i, 3] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult5 = m.CCD_Data[i, 4] == 1 ? "OK" : (m.CCD_Data[i, 4] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult6 = m.CCD_Data[i, 5] == 1 ? "OK" : (m.CCD_Data[i, 5] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult7 = m.CCD_Data[i, 6] == 1 ? "OK" : (m.CCD_Data[i, 6] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult8 = m.CCD_Data[i, 7] == 1 ? "OK" : (m.CCD_Data[i, 7] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult9 = m.CCD_Data[i, 8] == 1 ? "OK" : (m.CCD_Data[i, 8] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult10 = m.CCD_Data[i, 9] == 1 ? "OK" : (m.CCD_Data[i, 9] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult11 = m.CCD_Data[i, 10] == 1 ? "OK" : (m.CCD_Data[i, 10] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult12 = m.CCD_Data[i, 11] == 1 ? "OK" : (m.CCD_Data[i, 11] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult13 = m.CCD_Data[i, 12] == 1 ? "OK" : (m.CCD_Data[i, 12] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult14 = m.CCD_Data[i, 13] == 1 ? "OK" : (m.CCD_Data[i, 13] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult15 = m.CCD_Data[i, 14] == 1 ? "OK" : (m.CCD_Data[i, 14] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult16 = m.CCD_Data[i, 15] == 1 ? "OK" : (m.CCD_Data[i, 15] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult17 = m.CCD_Data[i, 16] == 1 ? "OK" : (m.CCD_Data[i, 16] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult18 = m.CCD_Data[i, 17] == 1 ? "OK" : (m.CCD_Data[i, 17] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult19 = m.CCD_Data[i, 18] == 1 ? "OK" : (m.CCD_Data[i, 18] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult20 = m.CCD_Data[i, 19] == 1 ? "OK" : (m.CCD_Data[i, 19] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult21 = m.CCD_Data[i, 20] == 1 ? "OK" : (m.CCD_Data[i, 20] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult22 = m.CCD_Data[i, 21] == 1 ? "OK" : (m.CCD_Data[i, 21] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult23 = m.CCD_Data[i, 22] == 1 ? "OK" : (m.CCD_Data[i, 22] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult24 = m.CCD_Data[i, 23] == 1 ? "OK" : (m.CCD_Data[i, 23] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult25 = m.CCD_Data[i, 24] == 1 ? "OK" : (m.CCD_Data[i, 24] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult26 = m.CCD_Data[i, 25] == 1 ? "OK" : (m.CCD_Data[i, 25] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult27 = m.CCD_Data[i, 26] == 1 ? "OK" : (m.CCD_Data[i, 26] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult28 = m.CCD_Data[i, 27] == 1 ? "OK" : (m.CCD_Data[i, 27] == 0 ? "NG" : "缺图");
|
||||
m.CCDResult1 = m.CCD_Data[i, 0] == 0 ? "OK" : (m.CCD_Data[i, 0] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult2 = m.CCD_Data[i, 1] == 0 ? "OK" : (m.CCD_Data[i, 1] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult3 = m.CCD_Data[i, 2] == 0 ? "OK" : (m.CCD_Data[i, 2] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult4 = m.CCD_Data[i, 3] == 0 ? "OK" : (m.CCD_Data[i, 3] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult5 = m.CCD_Data[i, 4] == 0 ? "OK" : (m.CCD_Data[i, 4] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult6 = m.CCD_Data[i, 5] == 0 ? "OK" : (m.CCD_Data[i, 5] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult7 = m.CCD_Data[i, 6] == 0 ? "OK" : (m.CCD_Data[i, 6] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult8 = m.CCD_Data[i, 7] == 0 ? "OK" : (m.CCD_Data[i, 7] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult9 = m.CCD_Data[i, 8] == 0 ? "OK" : (m.CCD_Data[i, 8] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult10 = m.CCD_Data[i, 9] == 0 ? "OK" : (m.CCD_Data[i, 9] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult11 = m.CCD_Data[i, 10] == 0 ? "OK" : (m.CCD_Data[i, 10] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult12 = m.CCD_Data[i, 11] == 0 ? "OK" : (m.CCD_Data[i, 11] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult13 = m.CCD_Data[i, 12] == 0 ? "OK" : (m.CCD_Data[i, 12] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult14 = m.CCD_Data[i, 13] == 0 ? "OK" : (m.CCD_Data[i, 13] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult15 = m.CCD_Data[i, 14] == 0 ? "OK" : (m.CCD_Data[i, 14] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult16 = m.CCD_Data[i, 15] == 0 ? "OK" : (m.CCD_Data[i, 15] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult17 = m.CCD_Data[i, 16] == 0 ? "OK" : (m.CCD_Data[i, 16] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult18 = m.CCD_Data[i, 17] == 0 ? "OK" : (m.CCD_Data[i, 17] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult19 = m.CCD_Data[i, 18] == 0 ? "OK" : (m.CCD_Data[i, 18] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult20 = m.CCD_Data[i, 19] == 0 ? "OK" : (m.CCD_Data[i, 19] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult21 = m.CCD_Data[i, 20] == 0 ? "OK" : (m.CCD_Data[i, 20] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult22 = m.CCD_Data[i, 21] == 0 ? "OK" : (m.CCD_Data[i, 21] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult23 = m.CCD_Data[i, 22] == 0 ? "OK" : (m.CCD_Data[i, 22] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult24 = m.CCD_Data[i, 23] == 0 ? "OK" : (m.CCD_Data[i, 23] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult25 = m.CCD_Data[i, 24] == 0 ? "OK" : (m.CCD_Data[i, 24] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult26 = m.CCD_Data[i, 25] == 0 ? "OK" : (m.CCD_Data[i, 25] == 1 ? "NG" : "缺图");
|
||||
m.CCDResult27 = m.CCD_Data[i, 26] == 0 ? "OK" : (m.CCD_Data[i, 26] == 1 ? "NG" : "缺图");
|
||||
#endregion
|
||||
|
||||
m.CSBYHASCANNINGTIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
@@ -1782,14 +1841,27 @@ namespace JinYuan.ControlCenters
|
||||
m.CSBYHINSTATIONTIME = m.ScanTime[0];
|
||||
m.CSBYHOUTSTATIONTIME = m.ScanTime[1];
|
||||
|
||||
//电芯1厚度数据1,2,3 改为 电芯1厚度 ;3字段只需1字段
|
||||
m.Thickness1 = SaveTwoNum(m.Thickness_Data[i]);
|
||||
m.Thickness2 = SaveTwoNum(m.Thickness_Data[i]);
|
||||
m.Thickness3 = SaveTwoNum(m.Thickness_Data[i]);
|
||||
m.Thickness1 = SaveTwoNum(m.Thickness_Data[i, 0]);
|
||||
m.Thickness2 = SaveTwoNum(m.Thickness_Data[i, 1]);
|
||||
m.Thickness3 = SaveTwoNum(m.Thickness_Data[i, 2]);
|
||||
|
||||
//条码,芯包重量,芯包侧厚,芯包CCD极性检测,电芯裁切粘连,电芯裁切毛刺,芯包焊印位置,
|
||||
//芯包正面极耳撕裂,芯包背面极耳撕裂,芯包正面极耳翻折,芯包背面极耳翻折
|
||||
if (Code_NG == 1)
|
||||
{
|
||||
for (int ii = 0; ii < 27; ii++)
|
||||
{
|
||||
if (m.CCD_Data[i, ii] != 0)
|
||||
{
|
||||
MyRes[i] = m.CCD_Data[i, ii];
|
||||
break;
|
||||
}
|
||||
|
||||
//芯包OKNG结果值判定
|
||||
MyRes[i] = JudgmentResult(Code_NG, m.CCD_Data,i);
|
||||
}
|
||||
}
|
||||
else
|
||||
MyRes[i] = 1;
|
||||
//MyRes[i] = JudgmentResult(Code_NG, m.CCD_Data);
|
||||
|
||||
m.Result = MyRes[i];
|
||||
|
||||
@@ -1841,7 +1913,12 @@ namespace JinYuan.ControlCenters
|
||||
{
|
||||
//MES出站判定结果
|
||||
m.Result = MyRes[i];
|
||||
|
||||
////芯包重量1判定结果
|
||||
//if (m.list_Data1[i, 10] == 2) { m.Remark += "芯包重量NG,"; }
|
||||
////芯包侧厚判定结果
|
||||
//if (m.list_Data1[i, 11] == 2) { m.Remark += "芯包侧厚NG,"; }
|
||||
////芯包CCD极性检测结果
|
||||
//if (m.list_Data1[i, 12] == 2) { m.Remark += "芯包CCD极性检测NG,"; }
|
||||
m.Remark += MesMessage;
|
||||
}
|
||||
else
|
||||
@@ -1867,7 +1944,12 @@ namespace JinYuan.ControlCenters
|
||||
m.Result = MyRes[i] = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
////芯包重量1判定结果
|
||||
//if (m.list_Data1[i, 10] == 2) { m.Remark += "芯包重量NG,"; }
|
||||
////芯包侧厚判定结果
|
||||
//if (m.list_Data1[i, 11] == 2) { m.Remark += "芯包侧厚NG,"; }
|
||||
////芯包CCD极性检测结果
|
||||
//if (m.list_Data1[i, 12] == 2) { m.Remark += "芯包CCD极性检测NG,"; }
|
||||
m.Remark += MesMessage;
|
||||
}
|
||||
//发送产品结果参数给MES
|
||||
@@ -1896,6 +1978,12 @@ namespace JinYuan.ControlCenters
|
||||
{
|
||||
m.Result = MyRes[i] = 2;
|
||||
m.Remark += "本地存储";
|
||||
//芯包重量1判定结果
|
||||
if (m.list_Data1[i, 10] == 2) { m.Remark += ",芯包重量NG"; }
|
||||
//芯包侧厚判定结果
|
||||
if (m.list_Data1[i, 11] == 2) { m.Remark += ",芯包侧厚NG"; }
|
||||
//芯包CCD极性检测结果
|
||||
if (m.list_Data1[i, 12] == 2) { m.Remark += ",芯包CCD极性检测NG"; }
|
||||
m.UpState = "未上传";
|
||||
}
|
||||
//极限件发3给PLC
|
||||
@@ -2124,28 +2212,6 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
return NGcodelist;
|
||||
}
|
||||
/// <summary>
|
||||
/// 下料外观检不良代码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<string> NGWGcode(short[,] serialNum,int index)
|
||||
{
|
||||
|
||||
List<string> NGcodelist = new List<string>();
|
||||
var ngType = "A";
|
||||
for (int i = 0; i < 28; i++)
|
||||
{
|
||||
if (serialNum[index,i] == 4 || serialNum[index,i] == 150 || serialNum[index, i] == 151)
|
||||
ngType = "P";
|
||||
if (serialNum[index, i] > 0)
|
||||
{
|
||||
var strserialNum = serialNum[index, i].ToString().PadLeft(3, '0');
|
||||
NGcodelist.Add($"PFV{ngType}{strserialNum}");
|
||||
}
|
||||
}
|
||||
|
||||
return NGcodelist;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region NG下料不良代码
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using HslCommunication.ModBus;
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using PLCCommunication;
|
||||
using PLCCommunication.Language;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using HslCommunication.ModBus;
|
||||
|
||||
namespace JinYuan.ControlCenters
|
||||
{
|
||||
@@ -198,7 +194,7 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "扫码不良", DataCount = 0 });
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "MES不良", DataCount = 0 });
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "其他不良" , DataCount = 0 });
|
||||
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "其他不良", DataCount = 0 });
|
||||
|
||||
}
|
||||
else //读取PLC数据
|
||||
@@ -423,14 +419,14 @@ namespace JinYuan.ControlCenters
|
||||
string _anemometerAddress = "D15000";//风速仪起始地址
|
||||
if (CommonMethods.mesConfig.isUpMes)
|
||||
{
|
||||
JYResult<byte[]> jYResult = CommonMethods.PlcLink.ReadValue<JYResult<byte[]>>(_anemometerAddress, Data_Type.ArrByte,150);
|
||||
JYResult<byte[]> jYResult = CommonMethods.PlcLink.ReadValue<JYResult<byte[]>>(_anemometerAddress, Data_Type.ArrByte, 150);
|
||||
List<float> _anemograph = GetList<float>(_anemometerNumber, 0);//初始化列表
|
||||
List<string> _anemometerName=new List<string>();
|
||||
List<string> _anemometerName = new List<string>();
|
||||
string _mesage = "";
|
||||
for (int i=0;i< _anemometerNumber;i++)
|
||||
for (int i = 0; i < _anemometerNumber; i++)
|
||||
{
|
||||
//初始化风速仪名称
|
||||
int _temple = i+1;
|
||||
int _temple = i + 1;
|
||||
string _name = "风速仪" + _temple.ToString();
|
||||
_anemometerName.Add(_name);
|
||||
|
||||
@@ -440,17 +436,17 @@ namespace JinYuan.ControlCenters
|
||||
//
|
||||
// 写csv文件
|
||||
string productName = string.Empty;
|
||||
string fileName=string.Empty;
|
||||
string filePath=string.Empty;
|
||||
string fileName = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
DateTime nowDate = DateTime.Now;
|
||||
string fileTitle= "工序名称,生产机台编号,拉线,型号,物料编号,操作人员,班次,采集时间,";
|
||||
string fileContent= $"预焊工序,{CommonMethods.mesConfig.equipNum},{CommonMethods.mesConfig.lineCode},{productName},{CommonMethods.mesConfig.MaterialCode},{CommonMethods.mesConfig.mesUserName},{CommonMethods.strClass},{nowDate.ToString("yyyy-MM-dd HH:mm:ss")},";
|
||||
string fileTitle = "工序名称,生产机台编号,拉线,型号,物料编号,操作人员,班次,采集时间,";
|
||||
string fileContent = $"预焊工序,{CommonMethods.mesConfig.equipNum},{CommonMethods.mesConfig.lineCode},{productName},{CommonMethods.mesConfig.MaterialCode},{CommonMethods.mesConfig.mesUserName},{CommonMethods.strClass},{nowDate.ToString("yyyy-MM-dd HH:mm:ss")},";
|
||||
filePath = $@"{CommonMethods.strAnemographpath}\{nowDate.Year}\{nowDate.Month}";
|
||||
fileName = $@"{nowDate.Day}.csv";
|
||||
|
||||
for (int j = 0; j < _anemometerNumber; j++)
|
||||
{
|
||||
fileTitle = fileTitle +","+ _anemometerName[j];
|
||||
fileTitle = fileTitle + "," + _anemometerName[j];
|
||||
fileContent = fileContent + "," + _anemograph[j];
|
||||
}
|
||||
CSVHelper<object>.WriterCSV(filePath, fileName, fileTitle, fileContent);
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.Models;
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.ControlCenters
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL.Enums
|
||||
namespace JinYuan.DAL.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询条件枚举
|
||||
|
||||
@@ -3,14 +3,12 @@ using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL
|
||||
{
|
||||
public interface ISugarHepler: IDisposable
|
||||
public interface ISugarHepler : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// 初始化数据库连接
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using JinYuan.DAL.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using JinYuan.DAL.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.DAL.Models
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -3,11 +3,7 @@ using JinYuan.Helper;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL
|
||||
{
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using JinYuan.DAL;
|
||||
using JinYuan.DAL.Enums;
|
||||
using JinYuan.DAL.Enums;
|
||||
using JinYuan.DAL.Models;
|
||||
using NLog;
|
||||
using Org.BouncyCastle.Asn1;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -10,8 +7,6 @@ using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Runtime.Remoting.Contexts;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL
|
||||
@@ -21,7 +16,7 @@ namespace JinYuan.DAL
|
||||
{
|
||||
|
||||
|
||||
public void SetConnectionStr(string connectionStr, SqlSugar.DbType dbType= SqlSugar.DbType.SqlServer)
|
||||
public void SetConnectionStr(string connectionStr, SqlSugar.DbType dbType = SqlSugar.DbType.SqlServer)
|
||||
{
|
||||
SQLSugarHelper.connString = connectionStr;
|
||||
SqlSugarDb = SQLSugarHelper.SqlSugarClient;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Text;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
@@ -41,7 +37,7 @@ namespace JinYuan.Helper
|
||||
/// </summary>
|
||||
/// <param name="dgv"></param>
|
||||
/// <param name="e"></param>
|
||||
public static void DgvRowPrePaint(DataGridView dgv,string Column, object sender, DataGridViewRowPrePaintEventArgs e)
|
||||
public static void DgvRowPrePaint(DataGridView dgv, string Column, object sender, DataGridViewRowPrePaintEventArgs e)
|
||||
{
|
||||
|
||||
if (e.RowIndex >= dgv.Rows.Count - 1)
|
||||
@@ -50,7 +46,7 @@ namespace JinYuan.Helper
|
||||
|
||||
try
|
||||
{
|
||||
if(dr.Cells[Column].Value != null)
|
||||
if (dr.Cells[Column].Value != null)
|
||||
{
|
||||
if (dr.Cells[Column].Value.Equals("OK"))
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
using System;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.Formula.Eval;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.SS.Util;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -8,11 +13,6 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.Formula.Eval;
|
||||
using NPOI.SS.Util;
|
||||
using NPOI.XSSF.UserModel;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization.Json;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using NLog;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
public class LoggerHelp
|
||||
{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
using HslCommunication.MQTT;
|
||||
using HslCommunication;
|
||||
using HslCommunication;
|
||||
using HslCommunication.MQTT;
|
||||
using JinYuan.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Policy;
|
||||
using JinYuan.Models;
|
||||
using System.Text;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
@@ -121,7 +117,7 @@ namespace JinYuan.Helper
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LoggerHelp.WriteError($"发送进出站数据错误,{err.Message}",err);
|
||||
LoggerHelp.WriteError($"发送进出站数据错误,{err.Message}", err);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -144,7 +140,7 @@ namespace JinYuan.Helper
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LoggerHelp.WriteError($"发送采集项数据错误,{err.Message}",err);
|
||||
LoggerHelp.WriteError($"发送采集项数据错误,{err.Message}", err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace JinYuan.Helper
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace JinYuan.MES.Enums
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace JinYuan.MES.Enums
|
||||
{
|
||||
|
||||
+1
-5
@@ -1,11 +1,7 @@
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
using JinYuan.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES
|
||||
{
|
||||
@@ -25,7 +21,7 @@ namespace JinYuan.MES
|
||||
/// <param name="passWord"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <returns></returns>
|
||||
bool LoginEnyity(string url, string siteCode, string lineCode, string equipNum, string userName, string passWord,string UserCardID, ref string resJson);
|
||||
bool LoginEnyity(string url, string siteCode, string lineCode, string equipNum, string userName, string passWord, string UserCardID, ref string resJson);
|
||||
/// <summary>
|
||||
/// 设备参数设定值请求接口
|
||||
/// </summary>
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
using Newtonsoft.Json;
|
||||
using JinYuan.MES.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using JinYuan.MES.Models;
|
||||
|
||||
namespace JinYuan.MES
|
||||
{
|
||||
@@ -32,7 +29,7 @@ namespace JinYuan.MES
|
||||
try
|
||||
{
|
||||
StringContent stringContent = new StringContent(strJosnData, Encoding.UTF8, "application/json");
|
||||
string ResponseMessage= new HttpClient()
|
||||
string ResponseMessage = new HttpClient()
|
||||
{
|
||||
Timeout = TimeSpan.FromSeconds(3.0)
|
||||
}.PostAsync(url, (HttpContent)stringContent).Result.Content.ReadAsStringAsync().Result;
|
||||
@@ -97,7 +94,7 @@ namespace JinYuan.MES
|
||||
/// <param name="url"></param>
|
||||
/// <param name="json"></param>
|
||||
/// <returns></returns>
|
||||
public static string WebApiPostTranafer(string url,string json)
|
||||
public static string WebApiPostTranafer(string url, string json)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -7,11 +7,6 @@ using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES
|
||||
{
|
||||
@@ -45,7 +40,7 @@ namespace JinYuan.MES
|
||||
equipNum = equipNum,
|
||||
userName = userName,
|
||||
passWord = passWord,
|
||||
userCardID =null// UserCardID
|
||||
userCardID = null// UserCardID
|
||||
};
|
||||
|
||||
var nowDate = DateTime.Now;
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
@@ -101,7 +97,7 @@ namespace JinYuan.MES.Models
|
||||
/// <summary>
|
||||
/// 原材料信息
|
||||
/// </summary>
|
||||
public List<string> materialLotList=new List<string>();
|
||||
public List<string> materialLotList = new List<string>();
|
||||
/// <summary>
|
||||
/// 原材料条码
|
||||
/// </summary>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品过程加工参数
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 单个电池进站
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.MES.Models
|
||||
namespace JinYuan.MES.Models
|
||||
{
|
||||
public class WattrMeter
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using PLCCommunication;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using CsvHelper.Configuration.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class AlarmStatus
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using CsvHelper.Configuration.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -21,8 +20,8 @@ namespace JinYuan.Models
|
||||
|
||||
public short[,] list_pan = new short[3, 1];//物流线托盘码
|
||||
//
|
||||
public int[,] CCD_Data = new int[3,28];//芯包CCD信息1,2,3
|
||||
public float[] Thickness_Data = new float[3];//电芯3_厚度数据信息1,2,3
|
||||
public int[,] CCD_Data = new int[3, 27];//芯包CCD信息1,2,3
|
||||
public float[,] Thickness_Data = new float[3, 3];//电芯3_厚度数据信息1,2,3
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
@@ -76,7 +75,6 @@ namespace JinYuan.Models
|
||||
public int CCD25 { get; set; }
|
||||
public int CCD26 { get; set; }
|
||||
public int CCD27 { get; set; }
|
||||
public int CCD28 { get; set; }
|
||||
/// <summary>
|
||||
/// 电芯1_厚度数据1
|
||||
/// </summary>
|
||||
@@ -113,7 +111,6 @@ namespace JinYuan.Models
|
||||
public string CCDResult25 { get; set; }
|
||||
public string CCDResult26 { get; set; }
|
||||
public string CCDResult27 { get; set; }
|
||||
public string CCDResult28 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 芯包条码
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
//子组大小:这个与计算内的CPK值又非常打的关系,即是分组的样本个数,数据的分组在此处需要说明的是,必须
|
||||
//是根据实际情况来填写,比如每次抽样为5个,那么子组大小为5个,我们不能随心所欲的任意填写这个值,否则
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 24小时统计表数据
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 不良統計
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 智能电表
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -106,7 +102,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 定义报警触发和消除事件
|
||||
/// </summary>
|
||||
public event Action<bool,Variable> AlarmTrigEvent;
|
||||
public event Action<bool, Variable> AlarmTrigEvent;
|
||||
|
||||
/// <summary>
|
||||
/// 变量初始化
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 所有窗体枚举,小于临界窗体的为固定窗体,不执行关闭
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品型号参数范围
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -12,7 +7,7 @@ namespace JinYuan.Models
|
||||
/// </summary>
|
||||
public class SysAdmin
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true,IsIgnore =true)]
|
||||
[SugarColumn(IsPrimaryKey = true, IsIgnore = true)]
|
||||
public int LoginId { get; set; }
|
||||
public string LoginName { get; set; }
|
||||
public string LoginPwd { get; set; }
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class SysConfig
|
||||
{
|
||||
@@ -46,7 +40,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// MES/非MES模式切换
|
||||
/// </summary>
|
||||
public bool MesModeSwitching { get; set;}
|
||||
public bool MesModeSwitching { get; set; }
|
||||
/// <summary>
|
||||
/// 切屏
|
||||
/// </summary>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class SysLog
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
@@ -49,7 +43,7 @@ namespace JinYuan.Models
|
||||
/// <summary>
|
||||
/// 是否下降沿报警
|
||||
/// </summary>
|
||||
public bool NegAlarm { get; set;}
|
||||
public bool NegAlarm { get; set; }
|
||||
/// <summary>
|
||||
/// 转换系数
|
||||
/// </summary>
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
using JinYuan.DAL;
|
||||
using JinYuan.CommunicationLib.Library;
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.CommunicationLib;
|
||||
using JinYuan.CommunicationLib.Base;
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.DAL;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES;
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.CommunicationLib;
|
||||
using JinYuan.CommunicationLib.Base;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
@@ -83,7 +80,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
/// <summary>
|
||||
///是否开启刷新
|
||||
/// </summary>
|
||||
public static bool isRefreshTimerWeeding=false;
|
||||
public static bool isRefreshTimerWeeding = false;
|
||||
|
||||
/// <summary>
|
||||
/// SQL语句
|
||||
@@ -230,7 +227,7 @@ namespace JinYuan.VirtualDataLibrary
|
||||
/// <summary>
|
||||
/// PLC开机/运行时间地址
|
||||
/// </summary>
|
||||
public static List<string> PlcOpenAndRunTimeAdress = new List<string> { "D50", "D52" , "D54" , "D56" , "D58" , "D60"};
|
||||
public static List<string> PlcOpenAndRunTimeAdress = new List<string> { "D50", "D52", "D54", "D56", "D58", "D60" };
|
||||
public static int ProdDRFIDNgQty = 0;//低托杯
|
||||
public static int ProdDXNgQty = 0;//卷心码
|
||||
public static int ProdGRFIDNgQty = 0;//高托杯
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
using JinYuan.DataConvertLib;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.Models;
|
||||
using PLCCommunication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.VirtualDataLibrary
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
using JinYuan.Models;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace LargeSquareOne
|
||||
{
|
||||
@@ -42,7 +34,7 @@ namespace LargeSquareOne
|
||||
private void btn_Add_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
List<double> data= GetSPCData();
|
||||
List<double> data = GetSPCData();
|
||||
// 计算Xbar和R
|
||||
double xbar = CalculateXbar(data);
|
||||
double r = CalculateR(data);
|
||||
@@ -98,7 +90,7 @@ namespace LargeSquareOne
|
||||
{
|
||||
// 返回样本数据的List<double>
|
||||
// 根据需要修改为实际的获取方法
|
||||
return new List<double>{1.2, 1.3, 1.0, 2.5, 2.2, 2.8, 0.8, 0.9, 1.1};
|
||||
return new List<double> { 1.2, 1.3, 1.0, 2.5, 2.2, 2.8, 0.8, 0.9, 1.1 };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -414,7 +406,7 @@ namespace LargeSquareOne
|
||||
double D3 = 0; // 控制系数
|
||||
|
||||
// 根据样本大小确定控制系数D3
|
||||
D3=GetD3(sampleSize);
|
||||
D3 = GetD3(sampleSize);
|
||||
|
||||
//对样本进行分组
|
||||
List<double> data = GetSPCData();
|
||||
|
||||
@@ -11,9 +11,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -370,7 +368,7 @@ namespace LargeSquareOne
|
||||
{
|
||||
listTA.Add(m);
|
||||
}
|
||||
if (listTA.Count >=500)
|
||||
if (listTA.Count >= 500)
|
||||
{
|
||||
listTA.Clear();
|
||||
GC.Collect();
|
||||
@@ -566,7 +564,7 @@ namespace LargeSquareOne
|
||||
|
||||
btSatrt.Enabled = !b;
|
||||
btStop.Enabled = b;
|
||||
cmbModelType.Enabled =true;
|
||||
cmbModelType.Enabled = true;
|
||||
txtMaterialCode.Enabled = !b;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,15 +3,9 @@ using JinYuan.Models;
|
||||
using MiniExcelLibs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Schema;
|
||||
|
||||
namespace LargeSquareOne
|
||||
{
|
||||
@@ -112,10 +106,10 @@ namespace LargeSquareOne
|
||||
/// <param name="e"></param>
|
||||
private void btn_Add_Click(object sender, EventArgs e)
|
||||
{
|
||||
string groupName =this.txt_GroupName.Text.Trim();
|
||||
if (groupName.Length==0)
|
||||
string groupName = this.txt_GroupName.Text.Trim();
|
||||
if (groupName.Length == 0)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(2,"通信组名称不能为空!", "添加通信组").Show();
|
||||
new FrmMsgBoxOutWithAck(2, "通信组名称不能为空!", "添加通信组").Show();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -127,26 +121,26 @@ namespace LargeSquareOne
|
||||
|
||||
TotalGroups.Add(new Group()
|
||||
{
|
||||
GroupName=this.txt_GroupName.Text,
|
||||
Start=this.txtStart.Text,
|
||||
GroupName = this.txt_GroupName.Text,
|
||||
Start = this.txtStart.Text,
|
||||
Length = Convert.ToUInt16(this.num_Length.Value),
|
||||
IsTiggerRead = this.ckb_IsTiggerRead.Checked ?true : false,
|
||||
IsFeedbackPlc= this.chk_IsFeedbackPlc.Checked ? true : false,
|
||||
IsTiggerRead = this.ckb_IsTiggerRead.Checked ? true : false,
|
||||
IsFeedbackPlc = this.chk_IsFeedbackPlc.Checked ? true : false,
|
||||
IsActive = this.ckb_IsEnable.Checked ? true : false,
|
||||
Remark =this.txt_Remark.Text.Trim()
|
||||
Remark = this.txt_Remark.Text.Trim()
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
MiniExcel.SaveAs(groupPath, TotalGroups, overwriteFile: true);
|
||||
new FrmMsgBoxOutWithAck(1,"添加通信组成功", "添加通信组").Show();
|
||||
new FrmMsgBoxOutWithAck(1, "添加通信组成功", "添加通信组").Show();
|
||||
|
||||
//刷新数据
|
||||
RefreshGroup();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(3,"添加通信组失败:"+ex.Message, "添加通信组").Show();
|
||||
new FrmMsgBoxOutWithAck(3, "添加通信组失败:" + ex.Message, "添加通信组").Show();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -196,11 +190,11 @@ namespace LargeSquareOne
|
||||
return;
|
||||
}
|
||||
|
||||
var group =TotalGroups.Find(c=>c.GroupName == groupName);
|
||||
var group = TotalGroups.Find(c => c.GroupName == groupName);
|
||||
|
||||
group.Start = this.txtStart.Text;
|
||||
group.Length = Convert.ToUInt16(this.num_Length.Value);
|
||||
group.IsTiggerRead = this.ckb_IsTiggerRead.Checked ? true: false;
|
||||
group.IsTiggerRead = this.ckb_IsTiggerRead.Checked ? true : false;
|
||||
group.IsFeedbackPlc = this.chk_IsFeedbackPlc.Checked ? true : false;
|
||||
group.IsActive = this.ckb_IsEnable.Checked ? true : false;
|
||||
group.Remark = this.txt_Remark.Text.Trim();
|
||||
@@ -247,14 +241,15 @@ namespace LargeSquareOne
|
||||
/// <param name="e"></param>
|
||||
private void dgv_Main_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex >= 0&&e.RowIndex>=0)
|
||||
if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
|
||||
{
|
||||
object value = this.dgv_Main.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
|
||||
|
||||
if (value == null||value.ToString().Length==0)
|
||||
if (value == null || value.ToString().Length == 0)
|
||||
{
|
||||
e.Value = "---";
|
||||
};
|
||||
}
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +261,7 @@ namespace LargeSquareOne
|
||||
/// <param name="e"></param>
|
||||
private void dgv_Main_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.RowIndex>=0)
|
||||
if (e.RowIndex >= 0)
|
||||
{
|
||||
UpdateGroup(TotalGroups[e.RowIndex]);
|
||||
}
|
||||
@@ -274,7 +269,7 @@ namespace LargeSquareOne
|
||||
|
||||
private void UpdateGroup(Group group)
|
||||
{
|
||||
if (group!=null)
|
||||
if (group != null)
|
||||
{
|
||||
this.txt_GroupName.Text = group.GroupName;
|
||||
this.txtStart.Text = group.Start;
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
|
||||
@@ -2,14 +2,8 @@
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -44,13 +38,13 @@ namespace LargeSquareOne
|
||||
//数据验证
|
||||
if (this.txt_LoginName.Text.Trim().Length == 0)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(2,"请填写登录用户名", "登录提示").ShowDialog();
|
||||
new FrmMsgBoxOutWithAck(2, "请填写登录用户名", "登录提示").ShowDialog();
|
||||
this.txt_LoginName.Focus();
|
||||
return;
|
||||
}
|
||||
if (this.txt_LoginPwd.Text.Trim().Length == 0)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(2,"请填写登录用密码", "登录提示").ShowDialog();
|
||||
new FrmMsgBoxOutWithAck(2, "请填写登录用密码", "登录提示").ShowDialog();
|
||||
this.txt_LoginPwd.Focus();
|
||||
return;
|
||||
}
|
||||
@@ -66,7 +60,7 @@ namespace LargeSquareOne
|
||||
sysAdmin = CommonMethods.db.Query<SysAdmin>(it => it.LoginName == sysAdmin.LoginName && it.LoginPwd == sysAdmin.LoginPwd);
|
||||
if (sysAdmin == null)
|
||||
{
|
||||
new FrmMsgBoxOutWithAck(3,"登录用户或密码错误!!!", "登录提示").ShowDialog();
|
||||
new FrmMsgBoxOutWithAck(3, "登录用户或密码错误!!!", "登录提示").ShowDialog();
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using JinYuan.ControlLib;
|
||||
using JinYuan.ControlCenters;
|
||||
using JinYuan.ControlLib;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Text;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using JinYuan.ControlCenters;
|
||||
using JinYuan.Helper;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
{
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -47,14 +42,14 @@ namespace LargeSquareOne
|
||||
private Point mPoint;
|
||||
private void Panel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
mPoint=new Point(e.X, e.Y);
|
||||
mPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
|
||||
private void Panel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
this.Location=new Point(this.Location.X+e.X-mPoint.X,this.Location.Y+e.Y-mPoint.Y);
|
||||
this.Location = new Point(this.Location.X + e.X - mPoint.X, this.Location.Y + e.Y - mPoint.Y);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
{
|
||||
public partial class FrmMsgBoxOutWithAck : Form
|
||||
{
|
||||
public FrmMsgBoxOutWithAck(int type,string content, string title)
|
||||
public FrmMsgBoxOutWithAck(int type, string content, string title)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -21,7 +15,7 @@ namespace LargeSquareOne
|
||||
this.lbl_Content.Text = content;
|
||||
this.lbl_Title.Text = title;
|
||||
|
||||
switch(type)
|
||||
switch (type)
|
||||
{
|
||||
case 1:
|
||||
this.pic_TitleImage.Image = LargeSquareOne.Properties.Resources.info;
|
||||
@@ -42,14 +36,14 @@ namespace LargeSquareOne
|
||||
private Point mPoint;
|
||||
private void Panel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
mPoint=new Point(e.X, e.Y);
|
||||
mPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
|
||||
private void Panel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
this.Location=new Point(this.Location.X+e.X-mPoint.X,this.Location.Y+e.Y-mPoint.Y);
|
||||
this.Location = new Point(this.Location.X + e.X - mPoint.X, this.Location.Y + e.Y - mPoint.Y);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
@@ -41,14 +35,14 @@ namespace LargeSquareOne
|
||||
private Point mPoint;
|
||||
private void Panel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
mPoint=new Point(e.X, e.Y);
|
||||
mPoint = new Point(e.X, e.Y);
|
||||
}
|
||||
|
||||
private void Panel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
this.Location=new Point(this.Location.X+e.X-mPoint.X,this.Location.Y+e.Y-mPoint.Y);
|
||||
this.Location = new Point(this.Location.X + e.X - mPoint.X, this.Location.Y + e.Y - mPoint.Y);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -4,7 +4,6 @@ using JinYuan.VirtualDataLibrary;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Management.Instrumentation;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using JinYuan.CommunicationLib.Enum;
|
||||
using JinYuan.CommunicationLib.Interface;
|
||||
using PLCCommunication;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.Models;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using SqlSugar;
|
||||
using PLCCommunication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.VirtualDataLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LargeSquareOne
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user