|
@@ -56,9 +56,12 @@ namespace CarMeterSystem
|
|
|
//语音播报
|
|
//语音播报
|
|
|
private VoicePlay vicPlayClass = new VoicePlay();
|
|
private VoicePlay vicPlayClass = new VoicePlay();
|
|
|
|
|
|
|
|
- //扫码枪
|
|
|
|
|
|
|
+ //扫码枪1
|
|
|
private SweepCode sweepCodeClass = new SweepCode();
|
|
private SweepCode sweepCodeClass = new SweepCode();
|
|
|
|
|
|
|
|
|
|
+ //扫码枪2
|
|
|
|
|
+ private SweepCodeCpoy sweepCodeCpoyClass = new SweepCodeCpoy();
|
|
|
|
|
+
|
|
|
private LED_Control led_controler = null;
|
|
private LED_Control led_controler = null;
|
|
|
|
|
|
|
|
//监控表操作
|
|
//监控表操作
|
|
@@ -405,37 +408,111 @@ namespace CarMeterSystem
|
|
|
{
|
|
{
|
|
|
e.carno = "";
|
|
e.carno = "";
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
#region 扫码信息
|
|
#region 扫码信息
|
|
|
sweepCodeClass.StrState = e.weightStatus + ""; //重量状态信息;当StrState= 0时,获取扫码信息,StrState= 2时将扫码信息置位“”空;其他状态不处理
|
|
sweepCodeClass.StrState = e.weightStatus + ""; //重量状态信息;当StrState= 0时,获取扫码信息,StrState= 2时将扫码信息置位“”空;其他状态不处理
|
|
|
-
|
|
|
|
|
- if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
|
|
|
|
|
|
|
+ sweepCodeCpoyClass.StrState = e.weightStatus + ""; //重量状态信息;当StrState= 0时,获取扫码信息,StrState= 2时将扫码信息置位“”空;其他状态不处理
|
|
|
|
|
+ l.WriteLog(12, sweepCodeClass.ToString());
|
|
|
|
|
+ l.WriteLog(12, sweepCodeCpoyClass.ToString());
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
|
|
|
|
|
+ //{
|
|
|
|
|
+ // if (string.IsNullOrEmpty(PbCache.strCode))
|
|
|
|
|
+ // {
|
|
|
|
|
+ // codeFlag = false;
|
|
|
|
|
+ // firstCode = "";
|
|
|
|
|
+ // PbCache.strCode = "";
|
|
|
|
|
+ // l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
|
|
|
|
|
+ // }
|
|
|
|
|
+ //}
|
|
|
|
|
+ //else
|
|
|
|
|
+ //{
|
|
|
|
|
+ // codeFlag = true;
|
|
|
|
|
+ // frmOneYardToEnd frmOneYardToEnd = new frmOneYardToEnd();
|
|
|
|
|
+ // Hashtable hashTable = new Hashtable();
|
|
|
|
|
+ // hashTable.Add("message", sweepCodeClass.StrCode);
|
|
|
|
|
+ // rmsSweepCodeClass = mwcfs.DecryptionForWfTest(hashTable);
|
|
|
|
|
+ // if (rmsSweepCodeClass.Code == "0")
|
|
|
|
|
+ // {
|
|
|
|
|
+ // PbCache.collect.carno = rmsSweepCodeClass.Data;
|
|
|
|
|
+ // PbCache.strCode = rmsSweepCodeClass.Data;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (rmsSweepCodeClass.Code == "1")
|
|
|
|
|
+ // {
|
|
|
|
|
+ // vicPlayClass.GetVoicePlay("车号二维码已过期", PbCache.collect.carno);
|
|
|
|
|
+ // frmOneYardToEnd.setMsgInfo("车号二维码已过期");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (rmsSweepCodeClass.Code == "2")
|
|
|
|
|
+ // {
|
|
|
|
|
+ // vicPlayClass.GetVoicePlay("不是有效车号二维码", PbCache.collect.carno);
|
|
|
|
|
+ // frmOneYardToEnd.setMsgInfo("不是有效车号二维码");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (rmsSweepCodeClass.Code == "9")
|
|
|
|
|
+ // {
|
|
|
|
|
+ // vicPlayClass.GetVoicePlay("不是有效车号二维码", PbCache.collect.carno);
|
|
|
|
|
+ // frmOneYardToEnd.setMsgInfo("不是有效车号二维码");
|
|
|
|
|
+ // }
|
|
|
|
|
+ // l.WriteLog(12, "测试扫码值" + rmsSweepCodeClass.Data);
|
|
|
|
|
+ //}
|
|
|
|
|
+
|
|
|
|
|
+ if (string.IsNullOrEmpty(sweepCodeCpoyClass.StrCode))
|
|
|
{
|
|
{
|
|
|
if (string.IsNullOrEmpty(PbCache.strCode))
|
|
if (string.IsNullOrEmpty(PbCache.strCode))
|
|
|
{
|
|
{
|
|
|
codeFlag = false;
|
|
codeFlag = false;
|
|
|
firstCode = "";
|
|
firstCode = "";
|
|
|
PbCache.strCode = "";
|
|
PbCache.strCode = "";
|
|
|
- l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
|
|
|
|
|
|
|
+ l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeCpoyClass.StrCode值为" + sweepCodeCpoyClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
|
|
|
|
|
+ {
|
|
|
|
|
+ if (string.IsNullOrEmpty(PbCache.strCode))
|
|
|
|
|
+ {
|
|
|
|
|
+ codeFlag = false;
|
|
|
|
|
+ firstCode = "";
|
|
|
|
|
+ PbCache.strCode = "";
|
|
|
|
|
+ l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ codeFlag = true;
|
|
|
|
|
+ frmOneYardToEnd frmOneYardToEnd = new frmOneYardToEnd();
|
|
|
|
|
+ Hashtable hashTable = new Hashtable();
|
|
|
|
|
+ hashTable.Add("message", sweepCodeClass.StrCode);
|
|
|
|
|
+ rmsSweepCodeClass = mwcfs.DecryptionForWfTest(hashTable);
|
|
|
|
|
+ if (rmsSweepCodeClass.Code == "0")
|
|
|
|
|
+ {
|
|
|
|
|
+ PbCache.collect.carno = rmsSweepCodeClass.Data;
|
|
|
|
|
+ PbCache.strCode = rmsSweepCodeClass.Data;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (rmsSweepCodeClass.Code == "1")
|
|
|
|
|
+ {
|
|
|
|
|
+ vicPlayClass.GetVoicePlay("车号二维码已过期", PbCache.collect.carno);
|
|
|
|
|
+ frmOneYardToEnd.setMsgInfo("车号二维码已过期");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (rmsSweepCodeClass.Code == "2")
|
|
|
|
|
+ {
|
|
|
|
|
+ vicPlayClass.GetVoicePlay("不是有效车号二维码", PbCache.collect.carno);
|
|
|
|
|
+ frmOneYardToEnd.setMsgInfo("不是有效车号二维码");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (rmsSweepCodeClass.Code == "9")
|
|
|
|
|
+ {
|
|
|
|
|
+ vicPlayClass.GetVoicePlay("不是有效车号二维码", PbCache.collect.carno);
|
|
|
|
|
+ frmOneYardToEnd.setMsgInfo("不是有效车号二维码");
|
|
|
|
|
+ }
|
|
|
|
|
+ l.WriteLog(12, "测试扫码值" + rmsSweepCodeClass.Data);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- ////日期2021年12月22日:重复扫码,取前面12位
|
|
|
|
|
- //if (sweepCodeClass.StrCode.Length > 15)
|
|
|
|
|
- //{
|
|
|
|
|
- // // todo: 加入车号截取逻辑
|
|
|
|
|
- // sweepCodeClass.StrCode = sweepCodeClass.StrCode.Substring(0,12);
|
|
|
|
|
- //}
|
|
|
|
|
- //if (firstCode != sweepCodeClass.StrCode || string.IsNullOrEmpty(PbCache.strCode))
|
|
|
|
|
- //{
|
|
|
|
|
- // l.WriteLog(12, "主线程扫码值赋值;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode前值为:" + PbCache.strCode);
|
|
|
|
|
- // PbCache.strCode = sweepCodeClass.StrCode;
|
|
|
|
|
- // firstCode = PbCache.strCode;
|
|
|
|
|
- //}
|
|
|
|
|
codeFlag = true;
|
|
codeFlag = true;
|
|
|
|
|
+ frmOneYardToEnd frmOneYardToEnd = new frmOneYardToEnd();
|
|
|
Hashtable hashTable = new Hashtable();
|
|
Hashtable hashTable = new Hashtable();
|
|
|
- hashTable.Add("message", sweepCodeClass.StrCode);
|
|
|
|
|
|
|
+ hashTable.Add("message", sweepCodeCpoyClass.StrCode);
|
|
|
rmsSweepCodeClass = mwcfs.DecryptionForWfTest(hashTable);
|
|
rmsSweepCodeClass = mwcfs.DecryptionForWfTest(hashTable);
|
|
|
if (rmsSweepCodeClass.Code == "0")
|
|
if (rmsSweepCodeClass.Code == "0")
|
|
|
{
|
|
{
|
|
@@ -457,10 +534,9 @@ namespace CarMeterSystem
|
|
|
vicPlayClass.GetVoicePlay("不是有效车号二维码", PbCache.collect.carno);
|
|
vicPlayClass.GetVoicePlay("不是有效车号二维码", PbCache.collect.carno);
|
|
|
frmOneYardToEnd.setMsgInfo("不是有效车号二维码");
|
|
frmOneYardToEnd.setMsgInfo("不是有效车号二维码");
|
|
|
}
|
|
}
|
|
|
- l.WriteLog(12, "测试扫码值" + PbCache.strCode);
|
|
|
|
|
|
|
+ l.WriteLog(12, "测试扫码值" + rmsSweepCodeClass.Data);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- #endregion 扫码信息
|
|
|
|
|
|
|
+ #endregion
|
|
|
|
|
|
|
|
#region 秤上无车10分钟获取一次基础数据
|
|
#region 秤上无车10分钟获取一次基础数据
|
|
|
if (iCount < 1200)
|
|
if (iCount < 1200)
|
|
@@ -678,6 +754,7 @@ namespace CarMeterSystem
|
|
|
{
|
|
{
|
|
|
if (PbCache.holdTime[0].retentionTime.Value < iHodeTime)
|
|
if (PbCache.holdTime[0].retentionTime.Value < iHodeTime)
|
|
|
{
|
|
{
|
|
|
|
|
+ l.WriteLog(33, "iHodeTime:"+ iHodeTime + ",PbCache.holdTime[0].retentionTime.Value:"+ PbCache.holdTime[0].retentionTime.Value + ",mwUpdate.stopOverTime:"+ mwUpdate.stopOverTime);
|
|
|
PbCache.isOvertimeAlarm = true; //是否超时报警
|
|
PbCache.isOvertimeAlarm = true; //是否超时报警
|
|
|
mwUpdate.stopOverTime = "1"; //写入一次停留超时
|
|
mwUpdate.stopOverTime = "1"; //写入一次停留超时
|
|
|
//mwUpdate.isHelp = "1";//派位
|
|
//mwUpdate.isHelp = "1";//派位
|