Merge branch 'dep_yangw' of http://175.27.215.92:3000/yangw/ProductionSystem into dep_yangw

dep_yangw
frankiecao 11 months ago
commit 1cee34ecf5

@ -1575,7 +1575,7 @@ namespace ProductionSystem.Forms
string plcTiaoMa=readM248.val.ToString().Replace("\r", "").Replace("\n", ""); string plcTiaoMa=readM248.val.ToString().Replace("\r", "").Replace("\n", "");
string tiaoma = txtProductCode.Text.Replace("\r", "").Replace("\n", ""); string tiaoma = txtProductCode.Text.Replace("\r", "").Replace("\n", "");
//彻底解决页面闪烁的问题 //彻底解决页面闪烁的问题
if (string.IsNullOrEmpty(plcTiaoMa) || tiaoma.Contains("暂无条码") || tiaoma == "" || tiaoma.Contains("暂")) if (string.IsNullOrEmpty(plcTiaoMa) || tiaoma.Contains("暂无条码") || tiaoma.Contains("暂"))
{ {
for (int i = 1; i < 9; i++) for (int i = 1; i < 9; i++)
{ {
@ -1635,11 +1635,9 @@ namespace ProductionSystem.Forms
if (entity != null) if (entity != null)
{ {
string productBarCode = GetCode(); string productBarCode = GetCode();
var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address); var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address);
if (value.Item2.ToDouble().ToInt()==1) if (value.Item2.ToDouble().ToInt() == 1)
{ {
T_Result2 t = new T_Result2 T_Result2 t = new T_Result2
{ {
@ -1658,50 +1656,76 @@ namespace ProductionSystem.Forms
{ {
t.Electricity = GetPlcValue("D1202"); t.Electricity = GetPlcValue("D1202");
t.Voltage = GetPlcValue("D1200"); t.Voltage = GetPlcValue("D1200");
_result2Service.AddTResult2(t); if (t.Electricity != "0.000" || t.Voltage != "0.0000")
{
_result2Service.AddTResult2(t);
}
} }
if (par == "BZ2") if (par == "BZ2")
{ {
t.Electricity = GetPlcValue("D1206"); t.Electricity = GetPlcValue("D1206");
t.Voltage = GetPlcValue("D1204"); t.Voltage = GetPlcValue("D1204");
_result2Service.AddTResult2(t); if (t.Electricity != "0.000" || t.Voltage != "0.0000")
{
_result2Service.AddTResult2(t);
}
} }
if (par == "BZ3") if (par == "BZ3")
{ {
t.Electricity = GetPlcValue("D1210"); t.Electricity = GetPlcValue("D1210");
t.Voltage = GetPlcValue("D1208"); t.Voltage = GetPlcValue("D1208");
_result2Service.AddTResult2(t); if (t.Electricity != "0.000" || t.Voltage != "0.0000")
{
_result2Service.AddTResult2(t);
}
} }
//高压 //高压
if (par == "BZ4") if (par == "BZ4")
{ {
t.Xll = GetPlcValue("D1224"); t.Xll = GetPlcValue("D1224");
t.Xllzt = GetPlcValue("D1226"); t.Xllzt = GetPlcValue("D1226");
_result2Service.AddTResult2(t); if (t.Xll != "0.000" || t.Xllzt != "0.0000")
{
_result2Service.AddTResult2(t);
}
} }
//内1 //内1
if (par == "BZ5") if (par == "BZ5")
{ {
t.Xll = GetPlcValue("D1212");
t.Xllzt = GetPlcValue("D1112"); t.Xll = GetPlcValue("D1214");
_result2Service.AddTResult2(t); t.Xllzt = GetPlcValue("D1114");
if (t.Xll != "0.000" || t.Xllzt != "0.0000")
{
_result2Service.AddTResult2(t);
}
} }
//内2 //内2
if (par == "BZ6") if (par == "BZ6")
{ {
t.Xll = GetPlcValue("D1214"); t.Xll = GetPlcValue("D1216");
t.Xllzt = GetPlcValue("D1114"); t.Xllzt = GetPlcValue("D1116");
_result2Service.AddTResult2(t); if (t.Xll != "0.000" || t.Xllzt != "0.0000")
{
_result2Service.AddTResult2(t);
}
} }
//外漏 //外漏
if (par == "BZ7") if (par == "BZ7")
{ {
t.Xll = GetPlcValue("D1216"); t.Xll = GetPlcValue("D1212");
t.Xllzt = GetPlcValue("D1116"); t.Xllzt = GetPlcValue("D1112");
_result2Service.AddTResult2(t); if (t.Xll != "0.000" || t.Xllzt != "0.0000")
{
_result2Service.AddTResult2(t);
}
} }

Loading…
Cancel
Save