|
@@ -398,6 +398,8 @@ namespace CarMeterSystem
|
|
|
private int iCountPark = 0;
|
|
private int iCountPark = 0;
|
|
|
private string editCarNo = "";
|
|
private string editCarNo = "";
|
|
|
|
|
|
|
|
|
|
+ private bool isCarSource = false;
|
|
|
|
|
+
|
|
|
private bool isResFlag = true;
|
|
private bool isResFlag = true;
|
|
|
private string RFIDCarNo = "";
|
|
private string RFIDCarNo = "";
|
|
|
private string isWriteRFID = AppConfigCache.isWriteRFID;
|
|
private string isWriteRFID = AppConfigCache.isWriteRFID;
|
|
@@ -468,6 +470,10 @@ namespace CarMeterSystem
|
|
|
//这里每隔0.5秒执行一次
|
|
//这里每隔0.5秒执行一次
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
|
|
+ if (PbCache.carNoSource == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ PbCache.carNoSource = 1;
|
|
|
|
|
+ }
|
|
|
if (e.carno == "nown")
|
|
if (e.carno == "nown")
|
|
|
{
|
|
{
|
|
|
e.carno = "";
|
|
e.carno = "";
|
|
@@ -514,41 +520,86 @@ namespace CarMeterSystem
|
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
// 司机扫码为空,取工控机二维码
|
|
// 司机扫码为空,取工控机二维码
|
|
|
- if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
|
|
|
|
|
|
|
+ if (PbCache.sportInfo.scanRequireValid == "1")
|
|
|
{
|
|
{
|
|
|
- if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
|
|
|
|
|
|
|
+ if (PbCache.monitor.isValidScan == "0")
|
|
|
{
|
|
{
|
|
|
- if (string.IsNullOrEmpty(PbCache.strCode))
|
|
|
|
|
|
|
+ if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
|
|
|
{
|
|
{
|
|
|
- codeFlag = false;
|
|
|
|
|
- firstCode = "";
|
|
|
|
|
- PbCache.strCode = "";
|
|
|
|
|
- //l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- if (sweepCodeClass.StrCode.Substring(0,3) == "TWB")
|
|
|
|
|
- {
|
|
|
|
|
- DecodeQRCodeYMT(sweepCodeClass.StrCode);
|
|
|
|
|
|
|
+ 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
|
|
|
|
|
+ {
|
|
|
|
|
+ if (sweepCodeClass.StrCode.Substring(0, 3) == "TWB")
|
|
|
|
|
+ {
|
|
|
|
|
+ DecodeQRCodeYMT(sweepCodeClass.StrCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ DecodeQRCode(sweepCodeClass.StrCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- DecodeQRCode(sweepCodeClass.StrCode);
|
|
|
|
|
|
|
+ if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
|
|
|
|
|
+ {
|
|
|
|
|
+ DecodeQRCodeYMT(sweepCodeClass2.StrCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ DecodeQRCode(sweepCodeClass2.StrCode);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
|
|
|
|
|
|
|
+ if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
|
|
|
{
|
|
{
|
|
|
- DecodeQRCodeYMT(sweepCodeClass2.StrCode);
|
|
|
|
|
|
|
+ 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
|
|
|
|
|
+ {
|
|
|
|
|
+ if (sweepCodeClass.StrCode.Substring(0, 3) == "TWB")
|
|
|
|
|
+ {
|
|
|
|
|
+ DecodeQRCodeYMT(sweepCodeClass.StrCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ DecodeQRCode(sweepCodeClass.StrCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- DecodeQRCode(sweepCodeClass2.StrCode);
|
|
|
|
|
|
|
+ if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
|
|
|
|
|
+ {
|
|
|
|
|
+ DecodeQRCodeYMT(sweepCodeClass2.StrCode);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ DecodeQRCode(sweepCodeClass2.StrCode);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
@@ -605,6 +656,7 @@ namespace CarMeterSystem
|
|
|
PbCache.collect.parkStatus = e.parkStatus;
|
|
PbCache.collect.parkStatus = e.parkStatus;
|
|
|
PbCache.collect.datetime = e.datetime;
|
|
PbCache.collect.datetime = e.datetime;
|
|
|
PbCache.collect.licType = e.licType;
|
|
PbCache.collect.licType = e.licType;
|
|
|
|
|
+ PbCache.collect.carno = e.carno;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (PbCache.collect != null && PbCache.collect.weightStatus == 0)
|
|
if (PbCache.collect != null && PbCache.collect.weightStatus == 0)
|
|
@@ -632,7 +684,7 @@ namespace CarMeterSystem
|
|
|
if (e.weight > 500)
|
|
if (e.weight > 500)
|
|
|
{
|
|
{
|
|
|
isResFlag = true;
|
|
isResFlag = true;
|
|
|
-
|
|
|
|
|
|
|
+ isCarSource = true;
|
|
|
if (PbCache.dtStartTime == null)
|
|
if (PbCache.dtStartTime == null)
|
|
|
PbCache.dtStartTime = DateTime.Now;
|
|
PbCache.dtStartTime = DateTime.Now;
|
|
|
isLedWrite = true;
|
|
isLedWrite = true;
|
|
@@ -798,6 +850,10 @@ namespace CarMeterSystem
|
|
|
{ }
|
|
{ }
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
|
|
+ if (PbCache.carNoSource == 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ PbCache.carNoSource = 2;
|
|
|
|
|
+ }
|
|
|
mwUpdate.rfidCar = rmTRFIDEventData.Data[0].text;
|
|
mwUpdate.rfidCar = rmTRFIDEventData.Data[0].text;
|
|
|
sCarNo = rmTRFIDEventData.Data[0].text;
|
|
sCarNo = rmTRFIDEventData.Data[0].text;
|
|
|
RFIDCarNo = rmTRFIDEventData.Data[0].text;
|
|
RFIDCarNo = rmTRFIDEventData.Data[0].text;
|
|
@@ -808,6 +864,7 @@ namespace CarMeterSystem
|
|
|
#region 计量员修改的车号信息
|
|
#region 计量员修改的车号信息
|
|
|
if (PbCache.monitor != null && !string.IsNullOrEmpty(PbCache.monitor.setCar))
|
|
if (PbCache.monitor != null && !string.IsNullOrEmpty(PbCache.monitor.setCar))
|
|
|
{
|
|
{
|
|
|
|
|
+ PbCache.carNoSource = 4;
|
|
|
sCarNo = PbCache.monitor.setCar;
|
|
sCarNo = PbCache.monitor.setCar;
|
|
|
bEditCar = true;
|
|
bEditCar = true;
|
|
|
flagCarMonit = true;
|
|
flagCarMonit = true;
|
|
@@ -962,6 +1019,20 @@ namespace CarMeterSystem
|
|
|
RFIDCarNo = "";
|
|
RFIDCarNo = "";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //车号来源记录
|
|
|
|
|
+ if (isCarSource)
|
|
|
|
|
+ {
|
|
|
|
|
+ meterWorkScheduledHelp1.baseSpotNo = PbCache.sportInfo.baseSpotNo;
|
|
|
|
|
+ meterWorkScheduledHelp1.baseSpotName = PbCache.sportInfo.baseSpotName;
|
|
|
|
|
+ meterWorkScheduledHelp1.carNo = string.IsNullOrEmpty(PbCache.collect.carno) ? PbCache.resultCarNo : PbCache.collect.carno;
|
|
|
|
|
+ meterWorkScheduledHelp1.helpContent = PbCache.carNoSource.ToString();
|
|
|
|
|
+ meterWorkScheduledHelp1.warmType = "8";
|
|
|
|
|
+ meterWorkScheduledHelp1.warmTypeName = "车号来源记录";
|
|
|
|
|
+ meterWorkScheduledHelpService.add(meterWorkScheduledHelp1);
|
|
|
|
|
+ isCarSource = false;
|
|
|
|
|
+ PbCache.carNoSource = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
PbCache.isOvertimeAlarm = false; //是否超时报警
|
|
PbCache.isOvertimeAlarm = false; //是否超时报警
|
|
|
PbCache.strCode = "";
|
|
PbCache.strCode = "";
|
|
|
PbCache.strState = "";
|
|
PbCache.strState = "";
|
|
@@ -1008,6 +1079,7 @@ namespace CarMeterSystem
|
|
|
meterWorkMonitorEventDataI.validLianda = "1";
|
|
meterWorkMonitorEventDataI.validLianda = "1";
|
|
|
meterWorkMonitorEventDataI.validMatClick = "1";
|
|
meterWorkMonitorEventDataI.validMatClick = "1";
|
|
|
meterWorkMonitorEventDataI.setCar = "";
|
|
meterWorkMonitorEventDataI.setCar = "";
|
|
|
|
|
+ meterWorkMonitorEventDataI.isValidScan = "1";
|
|
|
meterWorkMonitorEventDataI.rfidCar = "";
|
|
meterWorkMonitorEventDataI.rfidCar = "";
|
|
|
meterWorkMonitorEventDataI.photoCar = "";
|
|
meterWorkMonitorEventDataI.photoCar = "";
|
|
|
meterWorkMonitorEventDataI.scanCar = "";
|
|
meterWorkMonitorEventDataI.scanCar = "";
|
|
@@ -1319,6 +1391,11 @@ namespace CarMeterSystem
|
|
|
{
|
|
{
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
|
|
+ //进行扫码,判断
|
|
|
|
|
+ if (PbCache.carNoSource == 1 || PbCache.carNoSource == 2)
|
|
|
|
|
+ {
|
|
|
|
|
+ PbCache.carNoSource = 3;
|
|
|
|
|
+ }
|
|
|
codeFlag = true;
|
|
codeFlag = true;
|
|
|
string token = httpRequest.GetToken();
|
|
string token = httpRequest.GetToken();
|
|
|
string carNo = httpRequest.getCarNo(strCode, token);
|
|
string carNo = httpRequest.getCarNo(strCode, token);
|
|
@@ -1333,7 +1410,10 @@ namespace CarMeterSystem
|
|
|
|
|
|
|
|
private void DecodeQRCode(string strCode)
|
|
private void DecodeQRCode(string strCode)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+ if (PbCache.carNoSource == 1 || PbCache.carNoSource == 2)
|
|
|
|
|
+ {
|
|
|
|
|
+ PbCache.carNoSource = 3;
|
|
|
|
|
+ }
|
|
|
codeFlag = true;
|
|
codeFlag = true;
|
|
|
//frmOneYardToEnd frmOneYardToEnd = new frmOneYardToEnd();
|
|
//frmOneYardToEnd frmOneYardToEnd = new frmOneYardToEnd();
|
|
|
Hashtable hashTable = new Hashtable();
|
|
Hashtable hashTable = new Hashtable();
|