产品结果MES

This commit is contained in:
ldw
2025-08-15 21:09:35 +08:00
parent 467fd3a0d4
commit 65bdf3d210
3 changed files with 354 additions and 1830 deletions
+25 -13
View File
@@ -259,18 +259,24 @@ namespace JinYuan.ControlCenters
private int JudgmentWGJResult(int A, int[,] B, int C) private int JudgmentWGJResult(int A, int[,] B, int C)
{ {
int Result = 1; int Result = 1;
OK_NG = "OK"; OK_NG = "OK";
for (int i = 0; i < 28; i++) for (int i = 0; i < 27; i++)
{ {
if (B[C,i] ==1) if (B[C,i] !=1)
{ {
//1OK,2扫码NG,3MES反馈NG,4其他NG //1OK,2扫码NG,3MES反馈NG,4其他NG
Result = 4; Result = 4;
OK_NG = "NG"; OK_NG = "NG";
NG_Type += $"外观检测NG{i + 1}"; NG_Type += $"外观检测NG{i + 1},";
} }
} }
if (A == 2)
{
NG_Type += "无条码,";
Result = 2;
OK_NG = "NG";
}
return Result; return Result;
} }
#region 上料工位(数据处理) #region 上料工位(数据处理)
@@ -1821,7 +1827,7 @@ namespace JinYuan.ControlCenters
List<string> NGcodeList = new List<string>(); List<string> NGcodeList = new List<string>();
//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] //NGcodeList = NGcode(m.list_Data1[i, 10], m.list_Data1[i, 11], m.list_Data1[i, 12], m.list_Data1[i, 15], m.list_Data1[i, 26], m.list_Data1[i, 16]
// , m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19], m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25], m.list_Data1[i, 27]); // , m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19], m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25], m.list_Data1[i, 27]);
NGcodeList = NGWGJcode(m.list_Data1,i); NGcodeList = NGWGJcode(m.CCD_Data, i);
//电芯CCD判定结果 //电芯CCD判定结果
#region //电芯CCD判定结果 1 0K 0NG 2缺图 #region //电芯CCD判定结果 1 0K 0NG 2缺图
@@ -1880,7 +1886,7 @@ namespace JinYuan.ControlCenters
} }
} }
else else
MyRes[i] = 1; MyRes[i] = 2;//扫码NG
MyRes[i] = JudgmentWGJResult(Code_NG, m.CCD_Data,i); MyRes[i] = JudgmentWGJResult(Code_NG, m.CCD_Data,i);
m.Result = MyRes[i]; m.Result = MyRes[i];
@@ -1957,11 +1963,17 @@ namespace JinYuan.ControlCenters
m.Result = MyRes[i] = 3; m.Result = MyRes[i] = 3;
m.Remark += "MES NG"; m.Remark += "MES NG";
break; break;
case MesResType.C://可忽略 case MesResType.C://可忽略
//m.listRes[i] = 1; //m.listRes[i] = 1;
// m.Result = MyRes[i] = 2; // m.Result = MyRes[i] = 2;
m.Result = MyRes[i] = 3; m.Result = MyRes[i] = 1;
m.Remark += "MES NG"; m.Remark += "MES Alerm OK";
break;
case MesResType.D://可忽略
//m.listRes[i] = 1;
// m.Result = MyRes[i] = 2;
m.Result = MyRes[i] = 1;
m.Remark += "MES OK";
break; break;
default: default:
m.Remark += "MES NG"; m.Remark += "MES NG";
@@ -2238,12 +2250,12 @@ namespace JinYuan.ControlCenters
return NGcodelist; return NGcodelist;
} }
//下料不良代码 外观检 //下料不良代码 外观检
public List<string> NGWGJcode(short[ ,] lstResult,int index) public List<string> NGWGJcode(int[ ,] lstResult,int index)
{ {
List<string> NGcodelist = new List<string>(); List<string> NGcodelist = new List<string>();
for (int i = 0; i < 28; i++) for (int i = 0; i < 27; i++)
{ {
if(lstResult[index,i] == 2) if(lstResult[index,i] !=1)
{ {
NGcodelist.Add("WGJA00"+(i+1)); NGcodelist.Add("WGJA00"+(i+1));
} }
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -29,7 +29,7 @@ MES
产品进站=http://10.22.160.141/core/api/public/formation/section/arrival/bz 产品进站=http://10.22.160.141/core/api/public/formation/section/arrival/bz
产品过程加工参数=http://10.22.160.141/core/api/public/product/process/param/new/process 产品过程加工参数=http://10.22.160.141/core/api/public/product/process/param/new/process
产品结果加工参数=http://10.22.160.141/core/api/public/product/process/param/new/result 产品结果加工参数=http://10.22.160.141/core/api/public/product/process/param/new/result
产品出站=http://10.22.160.141/core/api/public/eve/pm/formation-section/bz 产品出站=http://10.22.160.141/core/api/public/eve/pm/formation-section
设备报警=http://10.22.160.141/core/api/public/equipment/alarm/currency 设备报警=http://10.22.160.141/core/api/public/equipment/alarm/currency
设备状态=http://10.22.160.141/core/api/public/eve/pm/eqm/run/status/operation 设备状态=http://10.22.160.141/core/api/public/eve/pm/eqm/run/status/operation
能耗=http://10.22.160.141/core/api/public/eve/pm/energy/consumption/collection/submit 能耗=http://10.22.160.141/core/api/public/eve/pm/energy/consumption/collection/submit