清理无用代码

This commit is contained in:
a88359121
2025-07-31 11:18:43 +08:00
parent 03087c0483
commit 2c4be8993c
107 changed files with 1119 additions and 1477 deletions
+1 -9
View File
@@ -1,9 +1,7 @@
using JinYuan.CommunicationLib.Enum; using JinYuan.CommunicationLib.Enum;
using JinYuan.CommunicationLib.Helper;
using JinYuan.DataConvertLib; using JinYuan.DataConvertLib;
using JinYuan.Helper; using JinYuan.Helper;
using JinYuan.MES.Enums;
using JinYuan.MES.Models; using JinYuan.MES.Models;
using JinYuan.Models; using JinYuan.Models;
using JinYuan.VirtualDataLibrary; using JinYuan.VirtualDataLibrary;
@@ -11,20 +9,14 @@ using Newtonsoft.Json;
using PLCCommunication; using PLCCommunication;
using SqlSugar; using SqlSugar;
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Data.SqlTypes;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using static System.Runtime.CompilerServices.RuntimeHelpers;
namespace JinYuan.ControlCenters namespace JinYuan.ControlCenters
@@ -270,7 +262,7 @@ namespace JinYuan.ControlCenters
if (resByte == null) if (resByte == null)
{ {
CommonMethods.AddDataMonitorLog(0, $"上料工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组"); 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 else
{ {
+179 -113
View File
@@ -3,23 +3,14 @@ using JinYuan.CommunicationLib.Enum;
using JinYuan.DataConvertLib; using JinYuan.DataConvertLib;
using JinYuan.Helper; using JinYuan.Helper;
using JinYuan.MES.Enums; using JinYuan.MES.Enums;
using JinYuan.MES.Models;
using JinYuan.Models; using JinYuan.Models;
using JinYuan.VirtualDataLibrary; using JinYuan.VirtualDataLibrary;
using PLCCommunication; using PLCCommunication;
using SqlSugar;
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.Eventing.Reader;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
namespace JinYuan.ControlCenters namespace JinYuan.ControlCenters
{ {
@@ -157,37 +148,112 @@ namespace JinYuan.ControlCenters
// return Result; // return Result;
//} //}
/// <summary> /// <summary>
/// 判断总结果 Code_NG /// 判断总结果
/// </summary> /// </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; int Result = 0;
OK_NG = "OK"; OK_NG = "OK";
//是否有条码NG 1 = OK 2 = NG if (A == 2 || B == 2 || C == 2 || D == 2 || H == 2 || J == 2)
if (Code_NG == 2) {
//ed
Result = 2;
OK_NG = "NG";
}
else if (A == 1 && B == 1 && C == 1 && D == 1 && H == 1 && J == 1)
{
Result = 1;
OK_NG = "OK";
}
else
{
Result = 1;
OK_NG = "OK";
}
if (A == 2)
{ {
NG_Type += "无条码_"; NG_Type += "无条码_";
OK_NG = "NG";
Result = 2; Result = 2;
} }
//CCD 判定 if (B == 2)
for (int i = 0; i < 27; i++)
{ {
//CCD 0 = OK 1 = NG 2 缺图NG NG_Type += "芯包重量1NG_";
if (CCD_Data[codeIndex, i] == 1) //return 2;
{ Result = 2;
NG_Type += $"CCD{i}NG_"; }
OK_NG = "NG"; if (C == 2)
Result = 2; {
} NG_Type += "芯包侧厚NG_";
if (CCD_Data[codeIndex, i] == 2) //return 2;
{ Result = 2;
NG_Type += $"CCD{i}缺图NG_"; }
OK_NG = "NG"; if (D == 2)
Result = 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; return Result;
} }
#region 上料工位(数据处理) #region 上料工位(数据处理)
@@ -209,7 +275,7 @@ namespace JinYuan.ControlCenters
} }
if (bArrays.IsSuccess && bArrays.Content != null) if (bArrays.IsSuccess && bArrays.Content != null)
{ {
sw2.Restart(); sw2.Restart();
//解析数据 //解析数据
@@ -233,7 +299,7 @@ namespace JinYuan.ControlCenters
listBarCode[0] = StringLib.GetStringFromByteArrayByEncoding(bytes, 0, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim(); listBarCode[0] = StringLib.GetStringFromByteArrayByEncoding(bytes, 0, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
listBarCode[1] = StringLib.GetStringFromByteArrayByEncoding(bytes, 40, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim(); listBarCode[1] = StringLib.GetStringFromByteArrayByEncoding(bytes, 40, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
listBarCode[2] = StringLib.GetStringFromByteArrayByEncoding(bytes, 80, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim(); listBarCode[2] = StringLib.GetStringFromByteArrayByEncoding(bytes, 80, 40, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
//listBarCode[0] = "TEST"; //listBarCode[0] = "TEST";
//listBarCode[1] = "TEST"; //listBarCode[1] = "TEST";
//listBarCode[2] = "TEST"; //listBarCode[2] = "TEST";
@@ -284,7 +350,7 @@ namespace JinYuan.ControlCenters
MesResType mesResType1 = MesResType.A; MesResType mesResType1 = MesResType.A;
bool Res = CommonMethods.hbgMes.SingleCellInStation(url, siteCode, lineCode, equipNum, materialCode, userName, listBarCode[i], ref MesMessage1, ref mesResType1); bool Res = CommonMethods.hbgMes.SingleCellInStation(url, siteCode, lineCode, equipNum, materialCode, userName, listBarCode[i], ref MesMessage1, ref mesResType1);
if (MesMessage1.Contains("发生一个或多个错误")) if (MesMessage1.Contains("发生一个或多个错误"))
{ {
MesMessage1 = "上传失败"; MesMessage1 = "上传失败";
@@ -857,7 +923,7 @@ namespace JinYuan.ControlCenters
// m.Flag = 1; // m.Flag = 1;
// } // }
// //m.UpState = "已上传"; // //m.UpState = "已上传";
// if (Res) // if (Res)
// { // {
@@ -900,7 +966,7 @@ namespace JinYuan.ControlCenters
// bool Res1 = CommonMethods.hbgMes.ProducResultParam(ur2, siteCode1, lineCode1, equipNum1, materialCode1, userName1, m, unloadType, ref Mesage); // bool Res1 = CommonMethods.hbgMes.ProducResultParam(ur2, siteCode1, lineCode1, equipNum1, materialCode1, userName1, m, unloadType, ref Mesage);
// if (m.Flag == 1) // if (m.Flag == 1)
// m.UpState = "已上传"; // m.UpState = "已上传";
// else // else
@@ -1674,22 +1740,17 @@ namespace JinYuan.ControlCenters
AGearEntity TT = new AGearEntity(); AGearEntity TT = new AGearEntity();
//极限件标志 //极限件标志
int ChallengeFlag = 0; int ChallengeFlag = 0;
//芯包信息1 D3300~D3327 //芯包信息1 D3300~D3326
//芯包信息2 D3330~D3357 //芯包信息2 D3330~D3356
//芯包信息3 D3360~D3387 //芯包信息3 D3360~D3386
for (int j = 0; j < 28; j++) 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 for (int j = 0; j < 3; j++)
//电芯2缺陷代码 D3430~D3457
//电芯3缺陷代码 D3460~D3487
for (int j = 0; j < 28; 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"); //m.ScanTime[i] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
@@ -1740,56 +1801,67 @@ namespace JinYuan.ControlCenters
//不良代码判定 //不良代码判定
List<string> NGcodeList = new List<string>(); List<string> NGcodeList = new List<string>();
NGcodeList = NGWGcode(m.list_Data1,i); 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]
// 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]);
//, 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判定结果 //电芯CCD判定结果
#region //电芯CCD判定结果 #region //电芯CCD判定结果
m.CCDResult1 = m.CCD_Data[i, 0] == 1 ? "OK" : (m.CCD_Data[i, 0] == 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] == 1 ? "OK" : (m.CCD_Data[i, 1] == 0 ? "NG" : "缺图"); m.CCDResult2 = m.CCD_Data[i, 1] == 0 ? "OK" : (m.CCD_Data[i, 1] == 1 ? "NG" : "缺图");
m.CCDResult3 = m.CCD_Data[i, 2] == 1 ? "OK" : (m.CCD_Data[i, 2] == 0 ? "NG" : "缺图"); m.CCDResult3 = m.CCD_Data[i, 2] == 0 ? "OK" : (m.CCD_Data[i, 2] == 1 ? "NG" : "缺图");
m.CCDResult4 = m.CCD_Data[i, 3] == 1 ? "OK" : (m.CCD_Data[i, 3] == 0 ? "NG" : "缺图"); m.CCDResult4 = m.CCD_Data[i, 3] == 0 ? "OK" : (m.CCD_Data[i, 3] == 1 ? "NG" : "缺图");
m.CCDResult5 = m.CCD_Data[i, 4] == 1 ? "OK" : (m.CCD_Data[i, 4] == 0 ? "NG" : "缺图"); m.CCDResult5 = m.CCD_Data[i, 4] == 0 ? "OK" : (m.CCD_Data[i, 4] == 1 ? "NG" : "缺图");
m.CCDResult6 = m.CCD_Data[i, 5] == 1 ? "OK" : (m.CCD_Data[i, 5] == 0 ? "NG" : "缺图"); m.CCDResult6 = m.CCD_Data[i, 5] == 0 ? "OK" : (m.CCD_Data[i, 5] == 1 ? "NG" : "缺图");
m.CCDResult7 = m.CCD_Data[i, 6] == 1 ? "OK" : (m.CCD_Data[i, 6] == 0 ? "NG" : "缺图"); m.CCDResult7 = m.CCD_Data[i, 6] == 0 ? "OK" : (m.CCD_Data[i, 6] == 1 ? "NG" : "缺图");
m.CCDResult8 = m.CCD_Data[i, 7] == 1 ? "OK" : (m.CCD_Data[i, 7] == 0 ? "NG" : "缺图"); m.CCDResult8 = m.CCD_Data[i, 7] == 0 ? "OK" : (m.CCD_Data[i, 7] == 1 ? "NG" : "缺图");
m.CCDResult9 = m.CCD_Data[i, 8] == 1 ? "OK" : (m.CCD_Data[i, 8] == 0 ? "NG" : "缺图"); m.CCDResult9 = m.CCD_Data[i, 8] == 0 ? "OK" : (m.CCD_Data[i, 8] == 1 ? "NG" : "缺图");
m.CCDResult10 = m.CCD_Data[i, 9] == 1 ? "OK" : (m.CCD_Data[i, 9] == 0 ? "NG" : "缺图"); m.CCDResult10 = m.CCD_Data[i, 9] == 0 ? "OK" : (m.CCD_Data[i, 9] == 1 ? "NG" : "缺图");
m.CCDResult11 = m.CCD_Data[i, 10] == 1 ? "OK" : (m.CCD_Data[i, 10] == 0 ? "NG" : "缺图"); m.CCDResult11 = m.CCD_Data[i, 10] == 0 ? "OK" : (m.CCD_Data[i, 10] == 1 ? "NG" : "缺图");
m.CCDResult12 = m.CCD_Data[i, 11] == 1 ? "OK" : (m.CCD_Data[i, 11] == 0 ? "NG" : "缺图"); m.CCDResult12 = m.CCD_Data[i, 11] == 0 ? "OK" : (m.CCD_Data[i, 11] == 1 ? "NG" : "缺图");
m.CCDResult13 = m.CCD_Data[i, 12] == 1 ? "OK" : (m.CCD_Data[i, 12] == 0 ? "NG" : "缺图"); m.CCDResult13 = m.CCD_Data[i, 12] == 0 ? "OK" : (m.CCD_Data[i, 12] == 1 ? "NG" : "缺图");
m.CCDResult14 = m.CCD_Data[i, 13] == 1 ? "OK" : (m.CCD_Data[i, 13] == 0 ? "NG" : "缺图"); m.CCDResult14 = m.CCD_Data[i, 13] == 0 ? "OK" : (m.CCD_Data[i, 13] == 1 ? "NG" : "缺图");
m.CCDResult15 = m.CCD_Data[i, 14] == 1 ? "OK" : (m.CCD_Data[i, 14] == 0 ? "NG" : "缺图"); m.CCDResult15 = m.CCD_Data[i, 14] == 0 ? "OK" : (m.CCD_Data[i, 14] == 1 ? "NG" : "缺图");
m.CCDResult16 = m.CCD_Data[i, 15] == 1 ? "OK" : (m.CCD_Data[i, 15] == 0 ? "NG" : "缺图"); m.CCDResult16 = m.CCD_Data[i, 15] == 0 ? "OK" : (m.CCD_Data[i, 15] == 1 ? "NG" : "缺图");
m.CCDResult17 = m.CCD_Data[i, 16] == 1 ? "OK" : (m.CCD_Data[i, 16] == 0 ? "NG" : "缺图"); m.CCDResult17 = m.CCD_Data[i, 16] == 0 ? "OK" : (m.CCD_Data[i, 16] == 1 ? "NG" : "缺图");
m.CCDResult18 = m.CCD_Data[i, 17] == 1 ? "OK" : (m.CCD_Data[i, 17] == 0 ? "NG" : "缺图"); m.CCDResult18 = m.CCD_Data[i, 17] == 0 ? "OK" : (m.CCD_Data[i, 17] == 1 ? "NG" : "缺图");
m.CCDResult19 = m.CCD_Data[i, 18] == 1 ? "OK" : (m.CCD_Data[i, 18] == 0 ? "NG" : "缺图"); m.CCDResult19 = m.CCD_Data[i, 18] == 0 ? "OK" : (m.CCD_Data[i, 18] == 1 ? "NG" : "缺图");
m.CCDResult20 = m.CCD_Data[i, 19] == 1 ? "OK" : (m.CCD_Data[i, 19] == 0 ? "NG" : "缺图"); m.CCDResult20 = m.CCD_Data[i, 19] == 0 ? "OK" : (m.CCD_Data[i, 19] == 1 ? "NG" : "缺图");
m.CCDResult21 = m.CCD_Data[i, 20] == 1 ? "OK" : (m.CCD_Data[i, 20] == 0 ? "NG" : "缺图"); m.CCDResult21 = m.CCD_Data[i, 20] == 0 ? "OK" : (m.CCD_Data[i, 20] == 1 ? "NG" : "缺图");
m.CCDResult22 = m.CCD_Data[i, 21] == 1 ? "OK" : (m.CCD_Data[i, 21] == 0 ? "NG" : "缺图"); m.CCDResult22 = m.CCD_Data[i, 21] == 0 ? "OK" : (m.CCD_Data[i, 21] == 1 ? "NG" : "缺图");
m.CCDResult23 = m.CCD_Data[i, 22] == 1 ? "OK" : (m.CCD_Data[i, 22] == 0 ? "NG" : "缺图"); m.CCDResult23 = m.CCD_Data[i, 22] == 0 ? "OK" : (m.CCD_Data[i, 22] == 1 ? "NG" : "缺图");
m.CCDResult24 = m.CCD_Data[i, 23] == 1 ? "OK" : (m.CCD_Data[i, 23] == 0 ? "NG" : "缺图"); m.CCDResult24 = m.CCD_Data[i, 23] == 0 ? "OK" : (m.CCD_Data[i, 23] == 1 ? "NG" : "缺图");
m.CCDResult25 = m.CCD_Data[i, 24] == 1 ? "OK" : (m.CCD_Data[i, 24] == 0 ? "NG" : "缺图"); m.CCDResult25 = m.CCD_Data[i, 24] == 0 ? "OK" : (m.CCD_Data[i, 24] == 1 ? "NG" : "缺图");
m.CCDResult26 = m.CCD_Data[i, 25] == 1 ? "OK" : (m.CCD_Data[i, 25] == 0 ? "NG" : "缺图"); m.CCDResult26 = m.CCD_Data[i, 25] == 0 ? "OK" : (m.CCD_Data[i, 25] == 1 ? "NG" : "缺图");
m.CCDResult27 = m.CCD_Data[i, 26] == 1 ? "OK" : (m.CCD_Data[i, 26] == 0 ? "NG" : "缺图"); m.CCDResult27 = m.CCD_Data[i, 26] == 0 ? "OK" : (m.CCD_Data[i, 26] == 1 ? "NG" : "缺图");
m.CCDResult28 = m.CCD_Data[i, 27] == 1 ? "OK" : (m.CCD_Data[i, 27] == 0 ? "NG" : "缺图");
#endregion #endregion
m.CSBYHASCANNINGTIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); m.CSBYHASCANNINGTIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
m.CSBYHPROCESSNAME = "外观检测"; m.CSBYHPROCESSNAME = "外观检测";
m.CSBYHSCHEDULE = CommonMethods.strClass; m.CSBYHSCHEDULE = CommonMethods.strClass;
m.CSBYHINSTATIONTIME = m.ScanTime[0]; m.CSBYHINSTATIONTIME = m.ScanTime[0];
m.CSBYHOUTSTATIONTIME = m.ScanTime[1]; m.CSBYHOUTSTATIONTIME = m.ScanTime[1];
//电芯1厚度数据1,2,3 改为 电芯1厚度 ;3字段只需1字段 m.Thickness1 = SaveTwoNum(m.Thickness_Data[i, 0]);
m.Thickness1 = SaveTwoNum(m.Thickness_Data[i]); m.Thickness2 = SaveTwoNum(m.Thickness_Data[i, 1]);
m.Thickness2 = SaveTwoNum(m.Thickness_Data[i]); m.Thickness3 = SaveTwoNum(m.Thickness_Data[i, 2]);
m.Thickness3 = SaveTwoNum(m.Thickness_Data[i]);
//条码,芯包重量,芯包侧厚,芯包CCD极性检测,电芯裁切粘连,电芯裁切毛刺,芯包焊印位置,
//芯包OKNG结果值判定 //芯包正面极耳撕裂,芯包背面极耳撕裂,芯包正面极耳翻折,芯包背面极耳翻折
MyRes[i] = JudgmentResult(Code_NG, m.CCD_Data,i); 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;
}
}
}
else
MyRes[i] = 1;
//MyRes[i] = JudgmentResult(Code_NG, m.CCD_Data);
m.Result = MyRes[i]; m.Result = MyRes[i];
@@ -1841,7 +1913,12 @@ namespace JinYuan.ControlCenters
{ {
//MES出站判定结果 //MES出站判定结果
m.Result = MyRes[i]; 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; m.Remark += MesMessage;
} }
else else
@@ -1867,7 +1944,12 @@ namespace JinYuan.ControlCenters
m.Result = MyRes[i] = 2; m.Result = MyRes[i] = 2;
break; 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; m.Remark += MesMessage;
} }
//发送产品结果参数给MES //发送产品结果参数给MES
@@ -1895,7 +1977,13 @@ namespace JinYuan.ControlCenters
else else
{ {
m.Result = MyRes[i] = 2; m.Result = MyRes[i] = 2;
m.Remark += "本地存储"; 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 = "未上传"; m.UpState = "未上传";
} }
//极限件发3给PLC //极限件发3给PLC
@@ -2124,31 +2212,9 @@ namespace JinYuan.ControlCenters
return NGcodelist; 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 #endregion
#region NG下料不良代码 #region NG下料不良代码
public List<string> NGCarcode(int a, int b, int c) public List<string> NGCarcode(int a, int b, int c)
{ {
//芯包重量、测厚位移、极性 //芯包重量、测厚位移、极性
+16 -20
View File
@@ -1,19 +1,15 @@
using JinYuan.CommunicationLib.Enum; using HslCommunication.ModBus;
using JinYuan.CommunicationLib.Enum;
using JinYuan.DataConvertLib; using JinYuan.DataConvertLib;
using JinYuan.Helper; using JinYuan.Helper;
using JinYuan.MES.Enums;
using JinYuan.MES.Models; using JinYuan.MES.Models;
using JinYuan.Models; using JinYuan.Models;
using JinYuan.VirtualDataLibrary; using JinYuan.VirtualDataLibrary;
using PLCCommunication; using PLCCommunication;
using PLCCommunication.Language;
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using HslCommunication.ModBus;
namespace JinYuan.ControlCenters namespace JinYuan.ControlCenters
{ {
@@ -195,10 +191,10 @@ namespace JinYuan.ControlCenters
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "称重不良", DataCount = 0 }); //CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "称重不良", DataCount = 0 });
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "铜极耳剪切不良", DataCount = 0 }); //CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "铜极耳剪切不良", DataCount = 0 });
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "铝极耳剪切不良", DataCount = 0 }); //CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "铝极耳剪切不良", DataCount = 0 });
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "扫码不良", DataCount = 0 }); 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 = "MES不良", DataCount = 0 });
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "其他不良" , DataCount = 0 }); CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "其他不良", DataCount = 0 });
} }
else //读取PLC数据 else //读取PLC数据
@@ -423,14 +419,14 @@ namespace JinYuan.ControlCenters
string _anemometerAddress = "D15000";//风速仪起始地址 string _anemometerAddress = "D15000";//风速仪起始地址
if (CommonMethods.mesConfig.isUpMes) 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<float> _anemograph = GetList<float>(_anemometerNumber, 0);//初始化列表
List<string> _anemometerName=new List<string>(); List<string> _anemometerName = new List<string>();
string _mesage = ""; 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(); string _name = "风速仪" + _temple.ToString();
_anemometerName.Add(_name); _anemometerName.Add(_name);
@@ -440,22 +436,22 @@ namespace JinYuan.ControlCenters
// //
// 写csv文件 // 写csv文件
string productName = string.Empty; string productName = string.Empty;
string fileName=string.Empty; string fileName = string.Empty;
string filePath=string.Empty; string filePath = string.Empty;
DateTime nowDate = DateTime.Now; DateTime nowDate = DateTime.Now;
string fileTitle= "工序名称,生产机台编号,拉线,型号,物料编号,操作人员,班次,采集时间,"; 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 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}"; filePath = $@"{CommonMethods.strAnemographpath}\{nowDate.Year}\{nowDate.Month}";
fileName = $@"{nowDate.Day}.csv"; fileName = $@"{nowDate.Day}.csv";
for (int j = 0; j < _anemometerNumber; j++) for (int j = 0; j < _anemometerNumber; j++)
{ {
fileTitle = fileTitle +","+ _anemometerName[j]; fileTitle = fileTitle + "," + _anemometerName[j];
fileContent = fileContent + "," + _anemograph[j]; fileContent = fileContent + "," + _anemograph[j];
} }
CSVHelper<object>.WriterCSV(filePath, fileName, fileTitle, fileContent); CSVHelper<object>.WriterCSV(filePath, fileName, fileTitle, fileContent);
if (false)//待确认接口 if (false)//待确认接口
{ {
+6 -9
View File
@@ -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;
using Newtonsoft.Json.Linq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; 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 namespace JinYuan.ControlCenters
{ {
@@ -54,7 +51,7 @@ namespace JinYuan.ControlCenters
alarmParam.alarmLineList = alarmLineList; alarmParam.alarmLineList = alarmLineList;
string SendJosn = JsonConvert.SerializeObject(alarmParam); string SendJosn = JsonConvert.SerializeObject(alarmParam);
var sw = new Stopwatch(); var sw = new Stopwatch();
sw.Start(); sw.Start();
resJson = MESApiHelper.HttpPostJsonAPI(CommonMethods.mesConfig.AlarmCurrencyMesUrl, SendJosn); resJson = MESApiHelper.HttpPostJsonAPI(CommonMethods.mesConfig.AlarmCurrencyMesUrl, SendJosn);
sw.Stop(); sw.Stop();
josnTxtMsg = $"{nowTime.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用MES设备报警接口:{CommonMethods.mesConfig.AlarmCurrencyMesUrl},请求数据为:{SendJosn},\n{nowTime.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resJson}"; josnTxtMsg = $"{nowTime.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用MES设备报警接口:{CommonMethods.mesConfig.AlarmCurrencyMesUrl},请求数据为:{SendJosn},\n{nowTime.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resJson}";
@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.DAL.Enums
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.DAL.Enums
{ {
/// <summary> /// <summary>
/// 查询条件枚举 /// 查询条件枚举
+2 -4
View File
@@ -3,14 +3,12 @@ using SqlSugar;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace JinYuan.DAL namespace JinYuan.DAL
{ {
public interface ISugarHepler: IDisposable public interface ISugarHepler : IDisposable
{ {
/// <summary> /// <summary>
/// 初始化数据库连接 /// 初始化数据库连接
@@ -177,7 +175,7 @@ namespace JinYuan.DAL
#region 查询 #region 查询
/// <summary> /// <summary>
/// 查询所有 /// 查询所有
/// </summary> /// </summary>
-5
View File
@@ -1,9 +1,4 @@
using JinYuan.DAL.Enums; using JinYuan.DAL.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.DAL.Models namespace JinYuan.DAL.Models
{ {
-5
View File
@@ -1,9 +1,4 @@
using JinYuan.DAL.Enums; using JinYuan.DAL.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.DAL.Models namespace JinYuan.DAL.Models
{ {
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.DAL.Models namespace JinYuan.DAL.Models
{ {
-1
View File
@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
-4
View File
@@ -3,11 +3,7 @@ using JinYuan.Helper;
using SqlSugar; using SqlSugar;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration;
using System.Linq; using System.Linq;
using System.Runtime.Remoting.Contexts;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.DAL namespace JinYuan.DAL
{ {
+6 -11
View File
@@ -1,8 +1,5 @@
using JinYuan.DAL; using JinYuan.DAL.Enums;
using JinYuan.DAL.Enums;
using JinYuan.DAL.Models; using JinYuan.DAL.Models;
using NLog;
using Org.BouncyCastle.Asn1;
using SqlSugar; using SqlSugar;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@@ -10,18 +7,16 @@ using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Runtime.Remoting.Contexts;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace JinYuan.DAL namespace JinYuan.DAL
{ {
public class SQLSugarService : ISugarHepler public class SQLSugarService : ISugarHepler
{ {
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; SQLSugarHelper.connString = connectionStr;
SqlSugarDb = SQLSugarHelper.SqlSugarClient; SqlSugarDb = SQLSugarHelper.SqlSugarClient;
@@ -891,7 +886,7 @@ namespace JinYuan.DAL
#endregion #endregion
#region 修改 #region 修改
/// <summary> /// <summary>
/// 修改(主键是更新条件) /// 修改(主键是更新条件)
/// </summary> /// </summary>
@@ -1629,6 +1624,6 @@ namespace JinYuan.DAL
} }
} }
} }
-1
View File
@@ -2,7 +2,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
-1
View File
@@ -6,7 +6,6 @@ using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
-4
View File
@@ -1,10 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Drawing.Text; using System.Drawing.Text;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms.DataVisualization.Charting; using System.Windows.Forms.DataVisualization.Charting;
namespace JinYuan.Helper namespace JinYuan.Helper
+2 -6
View File
@@ -1,12 +1,8 @@
using System; using System.Linq;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
public static class ConvertHelper public static class ConvertHelper
{ {
/// <summary> /// <summary>
/// 字节数组高低位转换 /// 字节数组高低位转换
+5 -9
View File
@@ -1,10 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace JinYuan.Helper namespace JinYuan.Helper
@@ -41,7 +37,7 @@ namespace JinYuan.Helper
/// </summary> /// </summary>
/// <param name="dgv"></param> /// <param name="dgv"></param>
/// <param name="e"></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) if (e.RowIndex >= dgv.Rows.Count - 1)
@@ -50,7 +46,7 @@ namespace JinYuan.Helper
try try
{ {
if(dr.Cells[Column].Value != null) if (dr.Cells[Column].Value != null)
{ {
if (dr.Cells[Column].Value.Equals("OK")) if (dr.Cells[Column].Value.Equals("OK"))
{ {
@@ -66,7 +62,7 @@ namespace JinYuan.Helper
dr.Cells[Column].Style.ForeColor = Color.Red; dr.Cells[Column].Style.ForeColor = Color.Red;
} }
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -117,7 +113,7 @@ namespace JinYuan.Helper
public static void DoubleBufferedDataGirdView(this DataGridView dgv, bool flag) public static void DoubleBufferedDataGirdView(this DataGridView dgv, bool flag)
{ {
Type dgvType = dgv.GetType(); Type dgvType = dgv.GetType();
PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic); PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
pi.SetValue(dgv, flag, null); pi.SetValue(dgv, flag, null);
} }
@@ -130,7 +126,7 @@ namespace JinYuan.Helper
public static void DoubleBufferedListView(this ListView lv, bool flag) public static void DoubleBufferedListView(this ListView lv, bool flag)
{ {
Type lvType = lv.GetType(); Type lvType = lv.GetType();
PropertyInfo pi = lvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic); PropertyInfo pi = lvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
pi.SetValue(lv, flag, null); pi.SetValue(lv, flag, null);
} }
-3
View File
@@ -1,10 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
-3
View File
@@ -1,9 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
+6 -6
View File
@@ -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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@@ -8,11 +13,6 @@ using System.Reflection;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; 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 namespace JinYuan.Helper
{ {
+1 -5
View File
@@ -1,11 +1,7 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Text; using System.Runtime.Serialization.Formatters.Binary;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
-2
View File
@@ -1,10 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
+61 -65
View File
@@ -1,79 +1,75 @@
using System; using System.IO;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
public class IniFileHelper public class IniFileHelper
{ {
private static string iniFilePath = "Configure.ini"; private static string iniFilePath = "Configure.ini";
[DllImport("kernel32")] [DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
[DllImport("kernel32")] [DllImport("kernel32")]
private static extern long GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); private static extern long GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
public static string ReadIniData(string Section, string Key) public static string ReadIniData(string Section, string Key)
{ {
try try
{ {
if (File.Exists(iniFilePath)) if (File.Exists(iniFilePath))
{ {
StringBuilder temp = new StringBuilder(1024); StringBuilder temp = new StringBuilder(1024);
GetPrivateProfileString(Section, Key, "", temp, 1024, iniFilePath); GetPrivateProfileString(Section, Key, "", temp, 1024, iniFilePath);
return temp.ToString(); return temp.ToString();
} }
MessageBox.Show("节点:" + Section + ",键名:" + Key + ":读取配置文件错误!"); MessageBox.Show("节点:" + Section + ",键名:" + Key + ":读取配置文件错误!");
return null; return null;
} }
catch catch
{ {
throw; throw;
} }
} }
public static bool WriteIniData(string Section, string Key, string Value) public static bool WriteIniData(string Section, string Key, string Value)
{ {
try try
{ {
if (File.Exists(iniFilePath)) if (File.Exists(iniFilePath))
{ {
if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L) if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L)
{ {
return false; return false;
} }
return true; return true;
} }
File.Create(iniFilePath).Close(); File.Create(iniFilePath).Close();
if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L) if (WritePrivateProfileString(Section, Key, Value, iniFilePath) == 0L)
{ {
return false; return false;
} }
return true; return true;
} }
catch catch
{ {
throw; throw;
} }
} }
public static void CreateIniFile(string StartupPath, string AppName) public static void CreateIniFile(string StartupPath, string AppName)
{ {
iniFilePath = StartupPath + AppName; iniFilePath = StartupPath + AppName;
if (!Directory.Exists(StartupPath)) if (!Directory.Exists(StartupPath))
{ {
Directory.CreateDirectory(StartupPath); Directory.CreateDirectory(StartupPath);
} }
if (!File.Exists(iniFilePath)) if (!File.Exists(iniFilePath))
{ {
File.Create(iniFilePath).Close(); File.Create(iniFilePath).Close();
} }
} }
} }
} }
-3
View File
@@ -1,11 +1,8 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Runtime.Serialization.Json; using System.Runtime.Serialization.Json;
using System.Text; using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
-2
View File
@@ -1,7 +1,5 @@
using NLog; using NLog;
using System; using System;
using System.IO;
using System.Linq;
public class LoggerHelp public class LoggerHelp
{ {
-2
View File
@@ -2,8 +2,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
-2
View File
@@ -1,10 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
+10 -14
View File
@@ -1,15 +1,11 @@
using HslCommunication.MQTT; using HslCommunication;
using HslCommunication; using HslCommunication.MQTT;
using JinYuan.Models;
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Text;
using System.Security.Policy;
using JinYuan.Models;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
@@ -86,9 +82,9 @@ namespace JinYuan.Helper
public string Device_name = "602VIW01"; public string Device_name = "602VIW01";
public string Action_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); public string Action_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
/// <summary> /// <summary>
/// 发送进出站数据 /// 发送进出站数据
/// </summary> /// </summary>
@@ -96,7 +92,7 @@ namespace JinYuan.Helper
/// <param name="IP"></param> /// <param name="IP"></param>
/// <param name="Port"></param> /// <param name="Port"></param>
/// <param name="cPQCPTDate"></param> /// <param name="cPQCPTDate"></param>
public void EnterandExitSendMessge(int Station = 3) public void EnterandExitSendMessge(int Station = 3)
{ {
try try
{ {
@@ -113,7 +109,7 @@ namespace JinYuan.Helper
PublishMessage(Topic, EnterandExitMessge("0")); PublishMessage(Topic, EnterandExitMessge("0"));
} }
//出站 //出站
else if (Station == 1) else if (Station == 1)
{ {
PublishMessage(Topic, EnterandExitMessge("1")); PublishMessage(Topic, EnterandExitMessge("1"));
@@ -121,7 +117,7 @@ namespace JinYuan.Helper
} }
catch (Exception err) catch (Exception err)
{ {
LoggerHelp.WriteError($"发送进出站数据错误,{err.Message}",err); LoggerHelp.WriteError($"发送进出站数据错误,{err.Message}", err);
} }
} }
/// <summary> /// <summary>
@@ -144,7 +140,7 @@ namespace JinYuan.Helper
} }
catch (Exception err) catch (Exception err)
{ {
LoggerHelp.WriteError($"发送采集项数据错误,{err.Message}",err); LoggerHelp.WriteError($"发送采集项数据错误,{err.Message}", err);
} }
} }
-4
View File
@@ -1,9 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
-3
View File
@@ -1,10 +1,7 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
-4
View File
@@ -1,9 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
-3
View File
@@ -1,10 +1,7 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
+2 -6
View File
@@ -1,13 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; 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;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml.Serialization;
namespace JinYuan.Helper namespace JinYuan.Helper
{ {
+1 -6
View File
@@ -1,9 +1,4 @@
using System; using System.ComponentModel;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Enums namespace JinYuan.MES.Enums
{ {
+2 -7
View File
@@ -1,9 +1,4 @@
using System; using System.ComponentModel;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Enums namespace JinYuan.MES.Enums
{ {
@@ -27,7 +22,7 @@ namespace JinYuan.MES.Enums
/// </summary> /// </summary>
[Description("DD")] [Description("DD")]
DD = 3, DD = 3,
} }
} }
+2 -6
View File
@@ -1,11 +1,7 @@
using JinYuan.MES.Enums; using JinYuan.MES.Enums;
using JinYuan.MES.Models; using JinYuan.MES.Models;
using JinYuan.Models; using JinYuan.Models;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES namespace JinYuan.MES
{ {
@@ -25,7 +21,7 @@ namespace JinYuan.MES
/// <param name="passWord"></param> /// <param name="passWord"></param>
/// <param name="msg"></param> /// <param name="msg"></param>
/// <returns></returns> /// <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>
/// 设备参数设定值请求接口 /// 设备参数设定值请求接口
/// </summary> /// </summary>
@@ -69,7 +65,7 @@ namespace JinYuan.MES
bool SingleCellInStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, string BarCode, ref string MesMessage, ref MesResType mesResType); bool SingleCellInStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, string BarCode, ref string MesMessage, ref MesResType mesResType);
/// <summary> /// <summary>
/// 复投单个上传(只上传条码,不上传卷芯码) /// 复投单个上传(只上传条码,不上传卷芯码)
/// </summary> /// </summary>
+6 -9
View File
@@ -1,13 +1,10 @@
using Newtonsoft.Json; using JinYuan.MES.Models;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Net; using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text; using System.Text;
using System.Threading.Tasks;
using JinYuan.MES.Models;
namespace JinYuan.MES namespace JinYuan.MES
{ {
@@ -32,7 +29,7 @@ namespace JinYuan.MES
try try
{ {
StringContent stringContent = new StringContent(strJosnData, Encoding.UTF8, "application/json"); StringContent stringContent = new StringContent(strJosnData, Encoding.UTF8, "application/json");
string ResponseMessage= new HttpClient() string ResponseMessage = new HttpClient()
{ {
Timeout = TimeSpan.FromSeconds(3.0) Timeout = TimeSpan.FromSeconds(3.0)
}.PostAsync(url, (HttpContent)stringContent).Result.Content.ReadAsStringAsync().Result; }.PostAsync(url, (HttpContent)stringContent).Result.Content.ReadAsStringAsync().Result;
@@ -97,7 +94,7 @@ namespace JinYuan.MES
/// <param name="url"></param> /// <param name="url"></param>
/// <param name="json"></param> /// <param name="json"></param>
/// <returns></returns> /// <returns></returns>
public static string WebApiPostTranafer(string url,string json) public static string WebApiPostTranafer(string url, string json)
{ {
try try
{ {
+2 -7
View File
@@ -7,11 +7,6 @@ using Newtonsoft.Json.Linq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; 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 namespace JinYuan.MES
{ {
@@ -45,7 +40,7 @@ namespace JinYuan.MES
equipNum = equipNum, equipNum = equipNum,
userName = userName, userName = userName,
passWord = passWord, passWord = passWord,
userCardID =null// UserCardID userCardID = null// UserCardID
}; };
var nowDate = DateTime.Now; var nowDate = DateTime.Now;
@@ -149,7 +144,7 @@ namespace JinYuan.MES
resJson = $"设备参数设定值请求接口发生异常:{ex.Message}"; resJson = $"设备参数设定值请求接口发生异常:{ex.Message}";
LoggerHelp.WriteEX("设备参数设定值请求接口", ex); LoggerHelp.WriteEX("设备参数设定值请求接口", ex);
} }
return null; return null;
} }
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.MES.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models
{ {
/// <summary> /// <summary>
/// 登录 /// 登录
+2 -6
View File
@@ -1,12 +1,8 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
/// <summary> /// <summary>
/// 多个电池进站 /// 多个电池进站
/// </summary> /// </summary>
+4 -8
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
@@ -49,7 +45,7 @@ namespace JinYuan.MES.Models
/// </summary> /// </summary>
public int type { get; set; } public int type { get; set; }
// public List<identiftyList> identiftyList { get; set; } // public List<identiftyList> identiftyList { get; set; }
public List<assembleLineList> assembleLineList { get; set; } public List<assembleLineList> assembleLineList { get; set; }
} }
@@ -93,7 +89,7 @@ namespace JinYuan.MES.Models
} }
public class identiftyList public class identiftyList
{ {
/// <summary> /// <summary>
/// 产品条码 /// 产品条码
/// </summary> /// </summary>
@@ -101,7 +97,7 @@ namespace JinYuan.MES.Models
/// <summary> /// <summary>
/// 原材料信息 /// 原材料信息
/// </summary> /// </summary>
public List<string> materialLotList=new List<string>(); public List<string> materialLotList = new List<string>();
/// <summary> /// <summary>
/// 原材料条码 /// 原材料条码
/// </summary> /// </summary>
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.MES.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models
{ {
/// <summary> /// <summary>
/// 产品过程加工参数 /// 产品过程加工参数
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
@@ -22,7 +18,7 @@ namespace JinYuan.MES.Models
/// <summary> /// <summary>
/// 设备数据 /// 设备数据
/// </summary> /// </summary>
public string payload { get; set; } public string payload { get; set; }
} }
/// <summary> /// <summary>
@@ -30,8 +26,8 @@ namespace JinYuan.MES.Models
/// </summary> /// </summary>
public class Payload1 public class Payload1
{ {
/// <summary> /// <summary>
/// 工厂代码 /// 工厂代码
/// </summary> /// </summary>
@@ -71,7 +67,7 @@ namespace JinYuan.MES.Models
/// <summary> /// <summary>
/// 条码数组 /// 条码数组
/// </summary> /// </summary>
public IdentificationListItem identification { get; set; } public IdentificationListItem identification { get; set; }
public List<TagDataVOListItem> tagDataVOList { get; set; } public List<TagDataVOListItem> tagDataVOList { get; set; }
} }
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.MES.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models
{ {
/// <summary> /// <summary>
/// 单个电池进站 /// 单个电池进站
+2 -6
View File
@@ -1,12 +1,8 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
public class MaterialLotListItem public class MaterialLotListItem
{ {
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models namespace JinYuan.MES.Models
{ {
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.MES.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.MES.Models
{ {
public class WattrMeter public class WattrMeter
{ {
-1
View File
@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
+1 -7
View File
@@ -1,10 +1,4 @@
using PLCCommunication; using SqlSugar;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
-5
View File
@@ -1,9 +1,4 @@
using CsvHelper.Configuration.Attributes; using CsvHelper.Configuration.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
public class AlarmStatus public class AlarmStatus
{ {
-4
View File
@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
-5
View File
@@ -1,9 +1,4 @@
using CsvHelper.Configuration.Attributes; using CsvHelper.Configuration.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
File diff suppressed because it is too large Load Diff
+1 -11
View File
@@ -1,14 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
//子组大小:这个与计算内的CPK值又非常打的关系,即是分组的样本个数,数据的分组在此处需要说明的是,必须 //子组大小:这个与计算内的CPK值又非常打的关系,即是分组的样本个数,数据的分组在此处需要说明的是,必须
//是根据实际情况来填写,比如每次抽样为5个,那么子组大小为5个,我们不能随心所欲的任意填写这个值,否则 //是根据实际情况来填写,比如每次抽样为5个,那么子组大小为5个,我们不能随心所欲的任意填写这个值,否则
+20 -24
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
@@ -14,19 +10,19 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 注液前重量 /// 注液前重量
/// </summary> /// </summary>
public string CTP_PreWeighing_Value { get; set; } public string CTP_PreWeighing_Value { get; set; }
/// <summary> /// <summary>
/// 保液量 /// 保液量
/// </summary> /// </summary>
public string CTP_Liquid_Retention_Value { get; set; } public string CTP_Liquid_Retention_Value { get; set; }
/// <summary> /// <summary>
/// 注液量 /// 注液量
/// </summary> /// </summary>
public string CTP_Filling_Value { get; set; } public string CTP_Filling_Value { get; set; }
/// <summary> /// <summary>
/// 失液量 /// 失液量
/// </summary> /// </summary>
public string CTP_Liquid_Loss_Value { get; set; } public string CTP_Liquid_Loss_Value { get; set; }
/// <summary> /// <summary>
/// 充氦值 /// 充氦值
/// </summary> /// </summary>
@@ -34,19 +30,19 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 钟罩真空值 /// 钟罩真空值
/// </summary> /// </summary>
public string CTP_Belljar_Vacuum_Value { get; set; } public string CTP_Belljar_Vacuum_Value { get; set; }
/// <summary> /// <summary>
/// 钟罩真空时间 /// 钟罩真空时间
/// </summary> /// </summary>
public string CTP_Belljar_Vacuum_Time { get; set; } public string CTP_Belljar_Vacuum_Time { get; set; }
/// <summary> /// <summary>
/// 钟罩高压值 /// 钟罩高压值
/// </summary> /// </summary>
public string CTP_Belljar_HighPressure_Value { get; set; } public string CTP_Belljar_HighPressure_Value { get; set; }
/// <summary> /// <summary>
/// 钟罩高压时间 /// 钟罩高压时间
/// </summary> /// </summary>
public string CTP_Belljar_HighPressure_Time { get; set; } public string CTP_Belljar_HighPressure_Time { get; set; }
/// <summary> /// <summary>
/// 钟罩循环次数 /// 钟罩循环次数
/// </summary> /// </summary>
@@ -54,7 +50,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 回氦前真空值 /// 回氦前真空值
/// </summary> /// </summary>
public string CTP_Pre_Helium_Value { get; set; } public string CTP_Pre_Helium_Value { get; set; }
/// <summary> /// <summary>
/// 回氦后真空值 /// 回氦后真空值
/// </summary> /// </summary>
@@ -62,23 +58,23 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 平压压力 /// 平压压力
/// </summary> /// </summary>
public string CTP_Flat_Pressure { get; set; } public string CTP_Flat_Pressure { get; set; }
/// <summary> /// <summary>
/// 电芯测厚压力 /// 电芯测厚压力
/// </summary> /// </summary>
public string CTP_Cell_Thickness_Pressure { get; set; } public string CTP_Cell_Thickness_Pressure { get; set; }
/// <summary> /// <summary>
/// 注液后重量 /// 注液后重量
/// </summary> /// </summary>
public string CTQ_PostWeighing_Value { get; set; } public string CTQ_PostWeighing_Value { get; set; }
/// <summary> /// <summary>
/// 电芯厚度 /// 电芯厚度
/// </summary> /// </summary>
public string CTQ_Cell_Thickness { get; set; } public string CTQ_Cell_Thickness { get; set; }
/// <summary> /// <summary>
/// 终压胶粒高度 /// 终压胶粒高度
/// </summary> /// </summary>
public string CTQ_Finalpress_Rubber_Height { get; set; } public string CTQ_Finalpress_Rubber_Height { get; set; }
/// <summary> /// <summary>
/// 注液前负压压力 /// 注液前负压压力
/// </summary> /// </summary>
@@ -104,9 +100,9 @@ namespace JinYuan.Models
/// </summary> /// </summary>
public string CTQ_Finalpress_Rubber_Thickness { get; set; } public string CTQ_Finalpress_Rubber_Thickness { get; set; }
} }
/// <summary> /// <summary>
/// 进出站上传数据 /// 进出站上传数据
/// </summary> /// </summary>
public class EnterandExit public class EnterandExit
{ {
/// <summary> /// <summary>
@@ -188,7 +184,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 采集项数据列表 /// 采集项数据列表
/// </summary> /// </summary>
public List<Collection> taglist { get; set; } public List<Collection> taglist { get; set; }
} }
@@ -197,7 +193,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 时间 /// 时间
/// </summary> /// </summary>
public string device_time { get; set; } public string device_time { get; set; }
/// <summary> /// <summary>
/// 采集项键值对 /// 采集项键值对
/// </summary> /// </summary>
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
/// <summary> /// <summary>
/// 24小时统计表数据 /// 24小时统计表数据
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
/// <summary> /// <summary>
/// 不良統計 /// 不良統計
-5
View File
@@ -1,9 +1,4 @@
using SqlSugar; using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
/// <summary> /// <summary>
/// 智能电表 /// 智能电表
-5
View File
@@ -1,9 +1,4 @@
using SqlSugar; using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
+1 -6
View File
@@ -1,9 +1,4 @@
using SqlSugar; using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
+9 -13
View File
@@ -2,11 +2,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
@@ -27,7 +23,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// PLC类型 /// PLC类型
/// </summary> /// </summary>
public string PLCType { get; set; } public string PLCType { get; set; }
/// <summary> /// <summary>
/// 当前设备的连接状态 /// 当前设备的连接状态
/// </summary> /// </summary>
@@ -37,19 +33,19 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 是否是首次连接 /// 是否是首次连接
/// </summary> /// </summary>
public bool IsFirstConnect { get; set; } = true; public bool IsFirstConnect { get; set; } = true;
/// <summary> /// <summary>
/// 重连周期 /// 重连周期
/// </summary> /// </summary>
public int ReConnectTime { get; set; } = 2000; public int ReConnectTime { get; set; } = 2000;
/// <summary> /// <summary>
/// 休眠时间 /// 休眠时间
/// </summary> /// </summary>
public int SleepTime { get; set; } = 10; public int SleepTime { get; set; } = 10;
/// <summary> /// <summary>
@@ -75,19 +71,19 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 计时器 /// 计时器
/// </summary> /// </summary>
public Stopwatch Stopwatch { get; set; } public Stopwatch Stopwatch { get; set; }
/// <summary> /// <summary>
/// 所有归档变量的集合 /// 所有归档变量的集合
/// </summary> /// </summary>
public List<Variable> StoreVarList { get; set; } = new List<Variable>(); public List<Variable> StoreVarList { get; set; } = new List<Variable>();
/// <summary> /// <summary>
/// 按工位读取 /// 按工位读取
/// </summary> /// </summary>
public List<Group> WorkVarList { get; set; } = new List<Group>(); public List<Group> WorkVarList { get; set; } = new List<Group>();
/// <summary> /// <summary>
/// 通信组集合 /// 通信组集合
@@ -106,7 +102,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 定义报警触发和消除事件 /// 定义报警触发和消除事件
/// </summary> /// </summary>
public event Action<bool,Variable> AlarmTrigEvent; public event Action<bool, Variable> AlarmTrigEvent;
/// <summary> /// <summary>
/// 变量初始化 /// 变量初始化
@@ -142,7 +138,7 @@ namespace JinYuan.Models
} }
/// <summary> /// <summary>
/// 索引器,通过键名获取到数据 /// 索引器,通过键名获取到数据
+2 -8
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
/// <summary> /// <summary>
/// 所有窗体枚举,小于临界窗体的为固定窗体,不执行关闭 /// 所有窗体枚举,小于临界窗体的为固定窗体,不执行关闭
@@ -19,6 +13,6 @@ namespace JinYuan.Models
数据追溯, 数据追溯,
参数设置, 参数设置,
系统设置, 系统设置,
用户管理 用户管理
} }
} }
+2 -6
View File
@@ -1,9 +1,5 @@
using MiniExcelLibs.Attributes; using MiniExcelLibs.Attributes;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
@@ -19,7 +15,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 起始地址 /// 起始地址
/// </summary> /// </summary>
public string Start { get; set; } public string Start { get; set; }
/// <summary> /// <summary>
/// 长度 /// 长度
/// </summary> /// </summary>
@@ -33,7 +29,7 @@ namespace JinYuan.Models
/// 是否需要反馈结果到PLC /// 是否需要反馈结果到PLC
/// </summary> /// </summary>
public bool IsFeedbackPlc { get; set; } public bool IsFeedbackPlc { get; set; }
/// <summary> /// <summary>
/// 是否启用 /// 是否启用
/// </summary> /// </summary>
-5
View File
@@ -1,9 +1,4 @@
using SqlSugar; using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
-5
View File
@@ -1,9 +1,4 @@
using SqlSugar; using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
-5
View File
@@ -1,9 +1,4 @@
using SqlSugar; using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
@@ -1,10 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
/// <summary> /// <summary>
/// 产品型号参数范围 /// 产品型号参数范围
+1 -6
View File
@@ -1,9 +1,4 @@
using SqlSugar; using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models namespace JinYuan.Models
{ {
@@ -12,7 +7,7 @@ namespace JinYuan.Models
/// </summary> /// </summary>
public class SysAdmin public class SysAdmin
{ {
[SugarColumn(IsPrimaryKey = true,IsIgnore =true)] [SugarColumn(IsPrimaryKey = true, IsIgnore = true)]
public int LoginId { get; set; } public int LoginId { get; set; }
public string LoginName { get; set; } public string LoginName { get; set; }
public string LoginPwd { get; set; } public string LoginPwd { get; set; }
+3 -9
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
public class SysConfig public class SysConfig
{ {
@@ -46,7 +40,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// MES/非MES模式切换 /// MES/非MES模式切换
/// </summary> /// </summary>
public bool MesModeSwitching { get; set;} public bool MesModeSwitching { get; set; }
/// <summary> /// <summary>
/// 切屏 /// 切屏
/// </summary> /// </summary>
@@ -64,6 +58,6 @@ namespace JinYuan.Models
/// </summary> /// </summary>
public bool SaveThreadTime { get; set; } public bool SaveThreadTime { get; set; }
} }
} }
+1 -7
View File
@@ -1,10 +1,4 @@
using System; namespace JinYuan.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.Models
{ {
public class SysLog public class SysLog
{ {
+5 -11
View File
@@ -1,10 +1,4 @@
using MiniExcelLibs.Attributes; 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 namespace JinYuan.Models
{ {
@@ -17,7 +11,7 @@ namespace JinYuan.Models
/// 变量名称 /// 变量名称
/// </summary> /// </summary>
public string VarName { get; set; } public string VarName { get; set; }
/// <summary> /// <summary>
/// 变量地址 /// 变量地址
/// </summary> /// </summary>
@@ -29,7 +23,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 数据类型 /// 数据类型
/// </summary> /// </summary>
public string DataType { get; set; } public string DataType { get; set; }
/// <summary> /// <summary>
/// 偏移或长度 /// 偏移或长度
/// </summary> /// </summary>
@@ -37,7 +31,7 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 所属通信组名称 /// 所属通信组名称
/// </summary> /// </summary>
public string GroupName { get; set; } public string GroupName { get; set; }
/// <summary> /// <summary>
/// 备注说明 /// 备注说明
/// </summary> /// </summary>
@@ -45,11 +39,11 @@ namespace JinYuan.Models
/// <summary> /// <summary>
/// 是否上升沿报警 /// 是否上升沿报警
/// </summary> /// </summary>
public bool PosAlarm { get; set; } public bool PosAlarm { get; set; }
/// <summary> /// <summary>
/// 是否下降沿报警 /// 是否下降沿报警
/// </summary> /// </summary>
public bool NegAlarm { get; set;} public bool NegAlarm { get; set; }
/// <summary> /// <summary>
/// 转换系数 /// 转换系数
/// </summary> /// </summary>
+12 -15
View File
@@ -1,18 +1,15 @@
using JinYuan.DAL; using JinYuan.CommunicationLib;
using JinYuan.CommunicationLib.Library; using JinYuan.CommunicationLib.Base;
using JinYuan.DataConvertLib; using JinYuan.CommunicationLib.Enum;
using JinYuan.DAL;
using JinYuan.Helper;
using JinYuan.MES;
using JinYuan.Models; using JinYuan.Models;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using JinYuan.Helper; using System.Windows.Forms;
using JinYuan.MES;
using JinYuan.CommunicationLib.Enum;
using JinYuan.CommunicationLib;
using JinYuan.CommunicationLib.Base;
namespace JinYuan.VirtualDataLibrary namespace JinYuan.VirtualDataLibrary
{ {
@@ -71,7 +68,7 @@ namespace JinYuan.VirtualDataLibrary
public static SysConfig sysConfig = new SysConfig(); public static SysConfig sysConfig = new SysConfig();
public static int InvadTime; public static int InvadTime;
@@ -83,7 +80,7 @@ namespace JinYuan.VirtualDataLibrary
/// <summary> /// <summary>
///是否开启刷新 ///是否开启刷新
/// </summary> /// </summary>
public static bool isRefreshTimerWeeding=false; public static bool isRefreshTimerWeeding = false;
/// <summary> /// <summary>
/// SQL语句 /// SQL语句
@@ -230,7 +227,7 @@ namespace JinYuan.VirtualDataLibrary
/// <summary> /// <summary>
/// PLC开机/运行时间地址 /// PLC开机/运行时间地址
/// </summary> /// </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 ProdDRFIDNgQty = 0;//低托杯
public static int ProdDXNgQty = 0;//卷心码 public static int ProdDXNgQty = 0;//卷心码
public static int ProdGRFIDNgQty = 0;//高托杯 public static int ProdGRFIDNgQty = 0;//高托杯
@@ -435,7 +432,7 @@ namespace JinYuan.VirtualDataLibrary
sysConfig.GetMesParam = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "获取MES参数", "false")); sysConfig.GetMesParam = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "获取MES参数", "false"));
sysConfig.OKSwitching = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "强制OK/正常NG模式切换", "false")); sysConfig.OKSwitching = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "强制OK/正常NG模式切换", "false"));
sysConfig.SaveThreadTime = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "线程耗时日志保存", "false")); sysConfig.SaveThreadTime = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "线程耗时日志保存", "false"));
} }
catch (Exception) catch (Exception)
{ {
@@ -600,7 +597,7 @@ namespace JinYuan.VirtualDataLibrary
/// 显示下料数据 /// 显示下料数据
/// </summary> /// </summary>
public static Action<List<BGearEntity>> ShowBlankingDelegate; public static Action<List<BGearEntity>> ShowBlankingDelegate;
/// <summary> /// <summary>
/// 数据监视委托 /// 数据监视委托
/// </summary> /// </summary>
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.VirtualDataLibrary namespace JinYuan.VirtualDataLibrary
{ {
@@ -166,7 +162,7 @@ namespace JinYuan.VirtualDataLibrary
{ {
CommonMethods.AddLog(true, ex.Message); CommonMethods.AddLog(true, ex.Message);
} }
return strSql; return strSql;
} }
+3 -8
View File
@@ -1,15 +1,10 @@
using JinYuan.DataConvertLib; using JinYuan.Models;
using JinYuan.Models;
using PLCCommunication; using PLCCommunication;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.VirtualDataLibrary namespace JinYuan.VirtualDataLibrary
{ {
public delegate void dgStationFunction(JYResult<byte[]> bArrays, object plcModel); public delegate void dgStationFunction(JYResult<byte[]> bArrays, object plcModel);
/// <summary> /// <summary>
@@ -43,5 +38,5 @@ namespace JinYuan.VirtualDataLibrary
/// <param name="DataList"></param> /// <param name="DataList"></param>
public delegate void DGShowWeldingPowerData(List<double> DataList); public delegate void DGShowWeldingPowerData(List<double> DataList);
} }
+1 -5
View File
@@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JinYuan.VirtualDataLibrary namespace JinYuan.VirtualDataLibrary
{ {
@@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
+3 -3
View File
@@ -9,11 +9,11 @@ namespace LargeSquareOne
{ {
DataTable dataTable = new DataTable(); DataTable dataTable = new DataTable();
string strLblMessage = ""; string strLblMessage = "";
public CustomMessageBox(DataTable _dataTable, string _strLblMessage) public CustomMessageBox(DataTable _dataTable, string _strLblMessage)
{ {
InitializeComponent(); InitializeComponent();
dataTable = _dataTable; dataTable = _dataTable;
strLblMessage = _strLblMessage; strLblMessage = _strLblMessage;
@@ -34,7 +34,7 @@ namespace LargeSquareOne
private void btnOK_Click(object sender, EventArgs e) private void btnOK_Click(object sender, EventArgs e)
{ {
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
} }
private void btnNo_Click(object sender, EventArgs e) private void btnNo_Click(object sender, EventArgs e)
{ {
+1 -1
View File
@@ -49,7 +49,7 @@ namespace LargeSquareOne
Operater = CommonMethods.currentAdmin.LoginName Operater = CommonMethods.currentAdmin.LoginName
}; };
//存储到数据库 //存储到数据库
var b = CommonMethods.db.AddReturnBool(model); var b = CommonMethods.db.AddReturnBool(model);
if (!b) if (!b)
{ {
LoggerHelp.WriteError($"数据库记录失败. 表:SysLog,内容:{model.ToJsonString()}"); LoggerHelp.WriteError($"数据库记录失败. 表:SysLog,内容:{model.ToJsonString()}");
+6 -14
View File
@@ -1,16 +1,8 @@
using JinYuan.Models; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting; using System.Windows.Forms.DataVisualization.Charting;
using System.Windows.Markup;
namespace LargeSquareOne namespace LargeSquareOne
{ {
@@ -42,7 +34,7 @@ namespace LargeSquareOne
private void btn_Add_Click(object sender, EventArgs e) private void btn_Add_Click(object sender, EventArgs e)
{ {
List<double> data= GetSPCData(); List<double> data = GetSPCData();
// 计算Xbar和R // 计算Xbar和R
double xbar = CalculateXbar(data); double xbar = CalculateXbar(data);
double r = CalculateR(data); double r = CalculateR(data);
@@ -53,7 +45,7 @@ namespace LargeSquareOne
double uclR = CalculateUCLR(data.Count); double uclR = CalculateUCLR(data.Count);
double lclR = CalculateLCLR(data.Count); double lclR = CalculateLCLR(data.Count);
// 清空图表 // 清空图表
chartControl.Series.Clear(); chartControl.Series.Clear();
double xmaxValue = Math.Max(xbar, Math.Max(uclXbar, uclR)); double xmaxValue = Math.Max(xbar, Math.Max(uclXbar, uclR));
@@ -89,7 +81,7 @@ namespace LargeSquareOne
seriesR.Points.AddXY(i + 1, r); seriesR.Points.AddXY(i + 1, r);
} }
} }
@@ -98,7 +90,7 @@ namespace LargeSquareOne
{ {
// 返回样本数据的List<double> // 返回样本数据的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> /// <summary>
@@ -414,7 +406,7 @@ namespace LargeSquareOne
double D3 = 0; // 控制系数 double D3 = 0; // 控制系数
// 根据样本大小确定控制系数D3 // 根据样本大小确定控制系数D3
D3=GetD3(sampleSize); D3 = GetD3(sampleSize);
//对样本进行分组 //对样本进行分组
List<double> data = GetSPCData(); List<double> data = GetSPCData();
+7 -9
View File
@@ -11,9 +11,7 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.Runtime.CompilerServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Documents;
using System.Windows.Forms; using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
@@ -120,12 +118,12 @@ namespace LargeSquareOne
CommonMethods.mesConfig.ModelName = gg.Text.ToString(); CommonMethods.mesConfig.ModelName = gg.Text.ToString();
CommonMethods.mesConfig.MaterialCode = gg.Tag.ToString(); CommonMethods.mesConfig.MaterialCode = gg.Tag.ToString();
txtMaterialCode.Text = CommonMethods.mesConfig.MaterialCode; txtMaterialCode.Text = CommonMethods.mesConfig.MaterialCode;
} }
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
//LogHelper.Instance.WriteEx("获取数据库型号异常", ex); //LogHelper.Instance.WriteEx("获取数据库型号异常", ex);
@@ -135,7 +133,7 @@ namespace LargeSquareOne
public bool IsNoOrg = false; public bool IsNoOrg = false;
public bool IsSetParam = false; public bool IsSetParam = false;
private void cmbModelType_SelectedItemsChanged(object sender, EventArgs e) private void cmbModelType_SelectedItemsChanged(object sender, EventArgs e)
{ {
@@ -370,7 +368,7 @@ namespace LargeSquareOne
{ {
listTA.Add(m); listTA.Add(m);
} }
if (listTA.Count >=500) if (listTA.Count >= 500)
{ {
listTA.Clear(); listTA.Clear();
GC.Collect(); GC.Collect();
@@ -566,7 +564,7 @@ namespace LargeSquareOne
btSatrt.Enabled = !b; btSatrt.Enabled = !b;
btStop.Enabled = b; btStop.Enabled = b;
cmbModelType.Enabled =true; cmbModelType.Enabled = true;
txtMaterialCode.Enabled = !b; txtMaterialCode.Enabled = !b;
} }
@@ -615,7 +613,7 @@ namespace LargeSquareOne
StringFormat sf = new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center };//字体水平位置居左,垂直居中 StringFormat sf = new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center };//字体水平位置居左,垂直居中
private void lVConfigRange_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e) private void lVConfigRange_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
{ {
e.Graphics.FillRectangle(Brushes.RoyalBlue, e.Bounds); //设置背景颜色 e.Graphics.FillRectangle(Brushes.RoyalBlue, e.Bounds); //设置背景颜色
Font font = new Font("微软雅黑", 12, FontStyle.Bold); //设置字体大小 Font font = new Font("微软雅黑", 12, FontStyle.Bold); //设置字体大小
e.Graphics.DrawString(e.Header.Text, font, Brushes.White, e.Bounds, sf); //设置字体颜色 e.Graphics.DrawString(e.Header.Text, font, Brushes.White, e.Bounds, sf); //设置字体颜色
+24 -29
View File
@@ -3,15 +3,9 @@ using JinYuan.Models;
using MiniExcelLibs; using MiniExcelLibs;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml.Schema;
namespace LargeSquareOne namespace LargeSquareOne
{ {
@@ -62,7 +56,7 @@ namespace LargeSquareOne
return new List<Group>(); return new List<Group>();
} }
} }
/// <summary> /// <summary>
@@ -112,10 +106,10 @@ namespace LargeSquareOne
/// <param name="e"></param> /// <param name="e"></param>
private void btn_Add_Click(object sender, EventArgs e) private void btn_Add_Click(object sender, EventArgs e)
{ {
string groupName =this.txt_GroupName.Text.Trim(); string groupName = this.txt_GroupName.Text.Trim();
if (groupName.Length==0) if (groupName.Length == 0)
{ {
new FrmMsgBoxOutWithAck(2,"通信组名称不能为空!", "添加通信组").Show(); new FrmMsgBoxOutWithAck(2, "通信组名称不能为空!", "添加通信组").Show();
return; return;
} }
@@ -127,28 +121,28 @@ namespace LargeSquareOne
TotalGroups.Add(new Group() TotalGroups.Add(new Group()
{ {
GroupName=this.txt_GroupName.Text, GroupName = this.txt_GroupName.Text,
Start=this.txtStart.Text, Start = this.txtStart.Text,
Length = Convert.ToUInt16(this.num_Length.Value), Length = Convert.ToUInt16(this.num_Length.Value),
IsTiggerRead = this.ckb_IsTiggerRead.Checked ?true : false, IsTiggerRead = this.ckb_IsTiggerRead.Checked ? true : false,
IsFeedbackPlc= this.chk_IsFeedbackPlc.Checked ? true : false, IsFeedbackPlc = this.chk_IsFeedbackPlc.Checked ? true : false,
IsActive = this.ckb_IsEnable.Checked ? true : false, IsActive = this.ckb_IsEnable.Checked ? true : false,
Remark =this.txt_Remark.Text.Trim() Remark = this.txt_Remark.Text.Trim()
}); });
try try
{ {
MiniExcel.SaveAs(groupPath, TotalGroups, overwriteFile: true); MiniExcel.SaveAs(groupPath, TotalGroups, overwriteFile: true);
new FrmMsgBoxOutWithAck(1,"添加通信组成功", "添加通信组").Show(); new FrmMsgBoxOutWithAck(1, "添加通信组成功", "添加通信组").Show();
//刷新数据 //刷新数据
RefreshGroup(); RefreshGroup();
} }
catch (Exception ex) catch (Exception ex)
{ {
new FrmMsgBoxOutWithAck(3,"添加通信组失败:"+ex.Message, "添加通信组").Show(); new FrmMsgBoxOutWithAck(3, "添加通信组失败:" + ex.Message, "添加通信组").Show();
} }
} }
/// <summary> /// <summary>
@@ -159,7 +153,7 @@ namespace LargeSquareOne
private void btn_Delete_Click(object sender, EventArgs e) private void btn_Delete_Click(object sender, EventArgs e)
{ {
string groupName = this.txt_GroupName.Text.Trim(); string groupName = this.txt_GroupName.Text.Trim();
if (IsGroupNameExits(groupName)) if (IsGroupNameExits(groupName))
{ {
new FrmMsgBoxOutWithAck(2, "通信组名称不存在!", "删除通信组").Show(); new FrmMsgBoxOutWithAck(2, "通信组名称不存在!", "删除通信组").Show();
@@ -196,11 +190,11 @@ namespace LargeSquareOne
return; return;
} }
var group =TotalGroups.Find(c=>c.GroupName == groupName); var group = TotalGroups.Find(c => c.GroupName == groupName);
group.Start = this.txtStart.Text; group.Start = this.txtStart.Text;
group.Length = Convert.ToUInt16(this.num_Length.Value); 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.IsFeedbackPlc = this.chk_IsFeedbackPlc.Checked ? true : false;
group.IsActive = this.ckb_IsEnable.Checked ? true : false; group.IsActive = this.ckb_IsEnable.Checked ? true : false;
group.Remark = this.txt_Remark.Text.Trim(); group.Remark = this.txt_Remark.Text.Trim();
@@ -247,14 +241,15 @@ namespace LargeSquareOne
/// <param name="e"></param> /// <param name="e"></param>
private void dgv_Main_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) 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; 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 = "---"; e.Value = "---";
}; }
;
} }
} }
@@ -266,7 +261,7 @@ namespace LargeSquareOne
/// <param name="e"></param> /// <param name="e"></param>
private void dgv_Main_CellClick(object sender, DataGridViewCellEventArgs e) private void dgv_Main_CellClick(object sender, DataGridViewCellEventArgs e)
{ {
if (e.RowIndex>=0) if (e.RowIndex >= 0)
{ {
UpdateGroup(TotalGroups[e.RowIndex]); UpdateGroup(TotalGroups[e.RowIndex]);
} }
@@ -274,7 +269,7 @@ namespace LargeSquareOne
private void UpdateGroup(Group group) private void UpdateGroup(Group group)
{ {
if (group!=null) if (group != null)
{ {
this.txt_GroupName.Text = group.GroupName; this.txt_GroupName.Text = group.GroupName;
this.txtStart.Text = group.Start; this.txtStart.Text = group.Start;
@@ -282,7 +277,7 @@ namespace LargeSquareOne
this.ckb_IsTiggerRead.Checked = group.IsTiggerRead; this.ckb_IsTiggerRead.Checked = group.IsTiggerRead;
this.chk_IsFeedbackPlc.Checked = group.IsFeedbackPlc; this.chk_IsFeedbackPlc.Checked = group.IsFeedbackPlc;
this.ckb_IsEnable.Checked = group.IsActive; this.ckb_IsEnable.Checked = group.IsActive;
this.txt_Remark.Text = group.Remark; this.txt_Remark.Text = group.Remark;
} }
} }
} }
-7
View File
@@ -1,11 +1,4 @@
using System; 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; using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
+6 -12
View File
@@ -2,14 +2,8 @@
using JinYuan.Models; using JinYuan.Models;
using JinYuan.VirtualDataLibrary; using JinYuan.VirtualDataLibrary;
using System; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
@@ -21,7 +15,7 @@ namespace LargeSquareOne
InitializeComponent(); InitializeComponent();
this.Load += FrmLogin_Load; this.Load += FrmLogin_Load;
} }
private void FrmLogin_Load(object sender, EventArgs e) private void FrmLogin_Load(object sender, EventArgs e)
{ {
CommonMethods.GetSysConfig(); CommonMethods.GetSysConfig();
@@ -44,13 +38,13 @@ namespace LargeSquareOne
//数据验证 //数据验证
if (this.txt_LoginName.Text.Trim().Length == 0) if (this.txt_LoginName.Text.Trim().Length == 0)
{ {
new FrmMsgBoxOutWithAck(2,"请填写登录用户名", "登录提示").ShowDialog(); new FrmMsgBoxOutWithAck(2, "请填写登录用户名", "登录提示").ShowDialog();
this.txt_LoginName.Focus(); this.txt_LoginName.Focus();
return; return;
} }
if (this.txt_LoginPwd.Text.Trim().Length == 0) if (this.txt_LoginPwd.Text.Trim().Length == 0)
{ {
new FrmMsgBoxOutWithAck(2,"请填写登录用密码", "登录提示").ShowDialog(); new FrmMsgBoxOutWithAck(2, "请填写登录用密码", "登录提示").ShowDialog();
this.txt_LoginPwd.Focus(); this.txt_LoginPwd.Focus();
return; return;
} }
@@ -66,7 +60,7 @@ namespace LargeSquareOne
sysAdmin = CommonMethods.db.Query<SysAdmin>(it => it.LoginName == sysAdmin.LoginName && it.LoginPwd == sysAdmin.LoginPwd); sysAdmin = CommonMethods.db.Query<SysAdmin>(it => it.LoginName == sysAdmin.LoginName && it.LoginPwd == sysAdmin.LoginPwd);
if (sysAdmin == null) if (sysAdmin == null)
{ {
new FrmMsgBoxOutWithAck(3,"登录用户或密码错误!!!", "登录提示").ShowDialog(); new FrmMsgBoxOutWithAck(3, "登录用户或密码错误!!!", "登录提示").ShowDialog();
return; return;
} }
else else
@@ -75,7 +69,7 @@ namespace LargeSquareOne
CommonMethods.LoginOut = false; CommonMethods.LoginOut = false;
//存储用户对象 //存储用户对象
CommonMethods.currentAdmin = sysAdmin; CommonMethods.currentAdmin = sysAdmin;
CommonMethods.IsLoginOk = true; CommonMethods.IsLoginOk = true;
} }
} }
@@ -244,6 +238,6 @@ namespace LargeSquareOne
#endregion #endregion
} }
} }
+3 -10
View File
@@ -1,14 +1,7 @@
using JinYuan.Models; using JinYuan.VirtualDataLibrary;
using JinYuan.VirtualDataLibrary;
using System; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
@@ -57,7 +50,7 @@ namespace LargeSquareOne
CommonMethods.mesConfig.mesPwd = this.txt_LoginMesPwd.Text.Trim(); CommonMethods.mesConfig.mesPwd = this.txt_LoginMesPwd.Text.Trim();
string Mesage = ""; string Mesage = "";
string UserCardID = CommonMethods.currentAdmin.LoginUid; string UserCardID = CommonMethods.currentAdmin.LoginUid;
bool Res = CommonMethods.hbgMes.LoginEnyity(CommonMethods.mesConfig.LoginMesUrl, CommonMethods.mesConfig.siteCode, CommonMethods.mesConfig.lineCode, CommonMethods.mesConfig.equipNum, CommonMethods.mesConfig.mesUserName, CommonMethods.mesConfig.mesPwd, UserCardID, ref Mesage); bool Res = CommonMethods.hbgMes.LoginEnyity(CommonMethods.mesConfig.LoginMesUrl, CommonMethods.mesConfig.siteCode, CommonMethods.mesConfig.lineCode, CommonMethods.mesConfig.equipNum, CommonMethods.mesConfig.mesUserName, CommonMethods.mesConfig.mesPwd, UserCardID, ref Mesage);
if (!Res) if (!Res)
{ {
new FrmMsgBoxOutWithAck(3, Mesage, "登录提示").ShowDialog(); new FrmMsgBoxOutWithAck(3, Mesage, "登录提示").ShowDialog();
@@ -73,7 +66,7 @@ namespace LargeSquareOne
} }
} }
private void txt_LoginMesName_KeyDown(object sender, KeyEventArgs e) private void txt_LoginMesName_KeyDown(object sender, KeyEventArgs e)
{ {
+16 -16
View File
@@ -1,17 +1,17 @@
using JinYuan.ControlLib; using JinYuan.ControlCenters;
using JinYuan.ControlLib;
using JinYuan.Helper;
using JinYuan.Models; using JinYuan.Models;
using JinYuan.VirtualDataLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Drawing.Text; using System.Drawing.Text;
using System.Linq; 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.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
{ {
@@ -68,7 +68,7 @@ namespace LargeSquareOne
CommonMethods.listener.ScanerEvent += Listener_ScanerEvent; CommonMethods.listener.ScanerEvent += Listener_ScanerEvent;
CommonMethods.listener.Start(); CommonMethods.listener.Start();
this.Load += FrmMain_Load; this.Load += FrmMain_Load;
this.FormClosing += FrmMain_FormClosing; this.FormClosing += FrmMain_FormClosing;
@@ -99,10 +99,10 @@ namespace LargeSquareOne
private void FrmMain_Load(object sender, EventArgs e) private void FrmMain_Load(object sender, EventArgs e)
{ {
InitReadInI(); InitReadInI();
UserTimeOut(30); UserTimeOut(30);
ControlCenter controlCenter = ControlCenter.Instance; ControlCenter controlCenter = ControlCenter.Instance;
//1.设置登录用户 //1.设置登录用户
@@ -169,7 +169,7 @@ namespace LargeSquareOne
{ {
CommonMethods.mesConfig.electricMeterNum.Add(strArray[i]); CommonMethods.mesConfig.electricMeterNum.Add(strArray[i]);
} }
} }
CommonMethods.mesConfig.listAntiDustAirSpeedNum.Clear(); CommonMethods.mesConfig.listAntiDustAirSpeedNum.Clear();
@@ -208,7 +208,7 @@ namespace LargeSquareOne
//CommonMethods.ProdDXNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdDXNgQty", "0")); //CommonMethods.ProdDXNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdDXNgQty", "0"));
//CommonMethods.ProdGRFIDNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdGRFIDNgQty", "0")); //CommonMethods.ProdGRFIDNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdGRFIDNgQty", "0"));
//CommonMethods.ProdYLZNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdYLZNgQty", "0")); //CommonMethods.ProdYLZNgQty = Convert.ToInt32(IniConfigHelper.ReadIniData("统计计数", "ProdYLZNgQty", "0"));
} }
#endregion #endregion
@@ -222,7 +222,7 @@ namespace LargeSquareOne
CommonMethods.tickCount++; CommonMethods.tickCount++;
if (CommonMethods.tickCount == CommonMethods.sysConfig.LockPeriod * 60 * 1000 / this.updateTimer.Interval) if (CommonMethods.tickCount == CommonMethods.sysConfig.LockPeriod * 60 * 1000 / this.updateTimer.Interval)
{ {
//锁屏 //锁屏
LockWorkStation(); LockWorkStation();
} }
@@ -236,7 +236,7 @@ namespace LargeSquareOne
CommonNaviButton_Click(this.nav_Monitor, null); CommonNaviButton_Click(this.nav_Monitor, null);
} }
} }
} }
@@ -261,7 +261,7 @@ namespace LargeSquareOne
sysAdmin = CommonMethods.db.Query<SysAdmin>(it => it.LoginUid == sysAdmin.LoginUid); sysAdmin = CommonMethods.db.Query<SysAdmin>(it => it.LoginUid == sysAdmin.LoginUid);
if (sysAdmin == null) if (sysAdmin == null)
{ {
new FrmMsgBoxOutWithAck(3, "登录用户或密码错误!!!", "登录提示").ShowDialog(); new FrmMsgBoxOutWithAck(3, "登录用户或密码错误!!!", "登录提示").ShowDialog();
return; return;
} }
@@ -280,7 +280,7 @@ namespace LargeSquareOne
} }
private void StoreTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) private void StoreTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
@@ -336,7 +336,7 @@ namespace LargeSquareOne
CommonNaviButton_Click(this.nav_DataMonitor, null); CommonNaviButton_Click(this.nav_DataMonitor, null);
CommonMethods.sysConfig.ScreenCutting = false; CommonMethods.sysConfig.ScreenCutting = false;
} }
if (CommonMethods.Statues != null && CommonMethods.Statues.Count > 0) if (CommonMethods.Statues != null && CommonMethods.Statues.Count > 0)
{ {
+2 -7
View File
@@ -1,11 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
@@ -47,14 +42,14 @@ namespace LargeSquareOne
private Point mPoint; private Point mPoint;
private void Panel_MouseDown(object sender, MouseEventArgs e) 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) private void Panel_MouseMove(object sender, MouseEventArgs e)
{ {
if (e.Button == MouseButtons.Left) 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 #endregion
+5 -11
View File
@@ -1,18 +1,12 @@
using System; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
{ {
public partial class FrmMsgBoxOutWithAck : Form public partial class FrmMsgBoxOutWithAck : Form
{ {
public FrmMsgBoxOutWithAck(int type,string content, string title) public FrmMsgBoxOutWithAck(int type, string content, string title)
{ {
InitializeComponent(); InitializeComponent();
@@ -21,7 +15,7 @@ namespace LargeSquareOne
this.lbl_Content.Text = content; this.lbl_Content.Text = content;
this.lbl_Title.Text = title; this.lbl_Title.Text = title;
switch(type) switch (type)
{ {
case 1: case 1:
this.pic_TitleImage.Image = LargeSquareOne.Properties.Resources.info; this.pic_TitleImage.Image = LargeSquareOne.Properties.Resources.info;
@@ -33,7 +27,7 @@ namespace LargeSquareOne
this.pic_TitleImage.Image = LargeSquareOne.Properties.Resources.error; this.pic_TitleImage.Image = LargeSquareOne.Properties.Resources.error;
break; break;
} }
} }
@@ -42,14 +36,14 @@ namespace LargeSquareOne
private Point mPoint; private Point mPoint;
private void Panel_MouseDown(object sender, MouseEventArgs e) 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) private void Panel_MouseMove(object sender, MouseEventArgs e)
{ {
if (e.Button == MouseButtons.Left) 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 #endregion
+2 -8
View File
@@ -1,11 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
@@ -41,14 +35,14 @@ namespace LargeSquareOne
private Point mPoint; private Point mPoint;
private void Panel_MouseDown(object sender, MouseEventArgs e) 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) private void Panel_MouseMove(object sender, MouseEventArgs e)
{ {
if (e.Button == MouseButtons.Left) 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 #endregion
+1 -2
View File
@@ -4,7 +4,6 @@ using JinYuan.VirtualDataLibrary;
using Microsoft.Win32; using Microsoft.Win32;
using System; using System;
using System.IO; using System.IO;
using System.Management.Instrumentation;
using System.Windows.Forms; using System.Windows.Forms;
namespace LargeSquareOne namespace LargeSquareOne
@@ -364,7 +363,7 @@ namespace LargeSquareOne
private void tog_OKSwitching_CheckedChanged(object sender, EventArgs e) private void tog_OKSwitching_CheckedChanged(object sender, EventArgs e)
{ {
if (CommonMethods.plcDevice.IsConnected && CommonMethods.sysConfig.OKSwitching) if (CommonMethods.plcDevice.IsConnected && CommonMethods.sysConfig.OKSwitching)
{ {
CommonMethods.sysConfig.OKSwitching = true; CommonMethods.sysConfig.OKSwitching = true;

Some files were not shown because too many files have changed in this diff Show More