|
|
@@ -47,6 +47,11 @@ namespace CarMeterSystem
|
|
|
//车号修正
|
|
|
private CarNoModfiy modfiy = new CarNoModfiy();
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 这个是保存前一次采集中的车号信息
|
|
|
+ /// </summary>
|
|
|
+ private string preCarNo = "";
|
|
|
+
|
|
|
//验证对射
|
|
|
private validParkStatus valid = new validParkStatus();
|
|
|
|
|
|
@@ -55,6 +60,11 @@ namespace CarMeterSystem
|
|
|
|
|
|
private LED_Control led_controler = null;
|
|
|
|
|
|
+ //监控表操作
|
|
|
+ private MeterMonitorWeightService monitorWeightService = new MeterMonitorWeightService();
|
|
|
+
|
|
|
+ private MeterWorkScheduledHelpService meterWorkScheduledHelpService = new MeterWorkScheduledHelpService();
|
|
|
+
|
|
|
//验证校秤数据
|
|
|
private validCalibration vCalib = new validCalibration();
|
|
|
|
|
|
@@ -92,8 +102,6 @@ namespace CarMeterSystem
|
|
|
|
|
|
private SerialPortES sweepCodeClass2 = new SerialPortES();
|
|
|
|
|
|
- frmOneYardToEnd frmOneYardToEnd = new frmOneYardToEnd();
|
|
|
-
|
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
|
{
|
|
|
//*
|
|
|
@@ -107,8 +115,10 @@ namespace CarMeterSystem
|
|
|
//frmMatMsgInfo frmMatMsgInfo = new frmMatMsgInfo();
|
|
|
//frmMatMsgInfo.Show();
|
|
|
|
|
|
-
|
|
|
+ // 计量页
|
|
|
+ fcc = new frmOneYardToEnd();
|
|
|
timer1.Start();
|
|
|
+
|
|
|
//2021年6月21日 杨秀东添加
|
|
|
if (isShowFrmWelcome)
|
|
|
{
|
|
|
@@ -200,9 +210,6 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
sweepCodeClass2.StartThreadSweep(AppConfigCache._comPara2); //扫码线程
|
|
|
}
|
|
|
-
|
|
|
- // 计量页
|
|
|
- fcc = new frmOneYardToEnd();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -222,8 +229,13 @@ namespace CarMeterSystem
|
|
|
}
|
|
|
|
|
|
#region
|
|
|
-
|
|
|
//*
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 委托的方式调用控件的点击事件
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="sender"></param>
|
|
|
+ /// <param name="e"></param>
|
|
|
public void ucEvents(object sender, EventArgs e)
|
|
|
{
|
|
|
Control control = (Control)sender;
|
|
|
@@ -243,7 +255,6 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
case "001006003":
|
|
|
frmInternalTransport frm = new frmInternalTransport();
|
|
|
- frm.isTest = true;
|
|
|
frm.ShowDialog();
|
|
|
break;
|
|
|
/*
|
|
|
@@ -255,7 +266,6 @@ namespace CarMeterSystem
|
|
|
//*/
|
|
|
default:
|
|
|
frmCarSalePurchase frmCar = new frmCarSalePurchase();
|
|
|
- frmCar.isTest = true;
|
|
|
frmCar.ShowDialog();
|
|
|
break;
|
|
|
}
|
|
|
@@ -267,7 +277,7 @@ namespace CarMeterSystem
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- MessageBox.Show("操作异常:" + ex.Message);
|
|
|
+ //MessageBox.Show("操作异常:" + ex.Message);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -299,20 +309,42 @@ namespace CarMeterSystem
|
|
|
|
|
|
private int iCount = 0, iHodeTime = 0;
|
|
|
private bool flagCarMonit = false;//车号修正
|
|
|
+ private bool bEditCar = false; //手动修正车号
|
|
|
private bool isOpenMeter = false; //是否已打开计量界面,若已经打开则这里关于超量程及红外的语音将停止播报
|
|
|
private string firstCode = "";//上次扫码的信息
|
|
|
|
|
|
private string ledTxt = "";
|
|
|
- private bool isLedWrite = true;//是否写入一次LED
|
|
|
+ private bool isLedWrite = false;//是否写入一次LED
|
|
|
|
|
|
+ private string sPreNo = ""; //记录重量曲线变化
|
|
|
+ private int preWgt = 0;//前一次重量,用于重量曲线
|
|
|
private string sCarNo = "";
|
|
|
- private string editCarNo = "";
|
|
|
- private string preCarNo = "";
|
|
|
|
|
|
- public bool sss = false;
|
|
|
+ private int iCountPark = 0;
|
|
|
+ private string editCarNo = "";
|
|
|
|
|
|
+ private bool isResFlag = true;
|
|
|
+ private string RFIDCarNo = "";
|
|
|
+ private string isWriteRFID = AppConfigCache.isWriteRFID;
|
|
|
+
|
|
|
+ //EventData实例化
|
|
|
+ RESTfulResult<string> rmsEventDataLastTime = new RESTfulResult<string>();
|
|
|
+ RESTfulResult<List<MeterWorkMonitor>> rmUpdateEventDataMonitor = new RESTfulResult<List<MeterWorkMonitor>>();
|
|
|
+ MeterWorkMonitor updateEventDataMonitor = new MeterWorkMonitor();
|
|
|
+ MeterMonitorWeight meterMonitorWeightEventData1 = new MeterMonitorWeight();
|
|
|
+ MeterMonitorWeight meterMonitorWeightEventData2 = new MeterMonitorWeight();
|
|
|
+ MeterWorkMonitor mwUpdate = new MeterWorkMonitor();
|
|
|
+ PbModelDbService<List<PbModelDb>> pbpRFIDEventData = new PbModelDbService<List<PbModelDb>>();
|
|
|
+ RESTfulResult<List<PbModelDb>> rmTRFIDEventData = new RESTfulResult<List<PbModelDb>>();
|
|
|
+ RESTfulResult<string> rmsmwUpdateEventData = new RESTfulResult<string>();
|
|
|
+ MeterWorkScheduledHelp meterWorkScheduledHelp1 = new MeterWorkScheduledHelp();
|
|
|
+ MeterWorkScheduledHelp meterWorkScheduledHelpRFID = new MeterWorkScheduledHelp();
|
|
|
+ RESTfulResult<string> rmsdoUpdateWfEventData = new RESTfulResult<string>();
|
|
|
+ RESTfulResult<string> rmssEventData = new RESTfulResult<string>();
|
|
|
+ MeterWorkMonitor meterWorkMonitorEventDataI = new MeterWorkMonitor();
|
|
|
MeterWorkCarActualFirstService mwcfs = new MeterWorkCarActualFirstService();
|
|
|
RESTfulResult<string> rmsSweepCodeClass = new RESTfulResult<string>();
|
|
|
+ frmOneYardToEnd frmOneYardToEnd = new frmOneYardToEnd();
|
|
|
|
|
|
/// <summary>
|
|
|
/// 数据采集
|
|
|
@@ -321,35 +353,90 @@ namespace CarMeterSystem
|
|
|
/// <param name="e"></param>
|
|
|
private void EventData(object o, DataCollectionArgs e)
|
|
|
{
|
|
|
+ if (!timer1.Enabled)
|
|
|
+ {
|
|
|
+ timer1.Enabled = true;
|
|
|
+ l.WriteLog(32, "定时器重启(timer1_Tick:frmMain),车号:" + PbCache.resultCarNo + "||" + (PbCache.collect == null ? "" : PbCache.collect.carno));
|
|
|
+ }
|
|
|
+ #region
|
|
|
+ //num++;
|
|
|
+
|
|
|
+ //e.carno = "湘G88888";
|
|
|
+
|
|
|
+ //if (num < 20)
|
|
|
+ //{
|
|
|
+ // e.weight = 23580;
|
|
|
+ // e.weightStatus = 1;
|
|
|
+ //}
|
|
|
+ //else if (num < 26)
|
|
|
+ //{
|
|
|
+ // e.weight = 23580;
|
|
|
+ // e.weightStatus = 0;
|
|
|
+ //}
|
|
|
+ //else if (num < 39)
|
|
|
+ //{
|
|
|
+ // e.weight = 23580;
|
|
|
+ // e.weightStatus = 0;
|
|
|
+ //}
|
|
|
+ //else if (num < 45)
|
|
|
+ //{
|
|
|
+ // e.weight = 15000;
|
|
|
+ // e.weightStatus = 1;
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // e.weight = 400;
|
|
|
+ //}
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
//这里每隔0.5秒执行一次
|
|
|
try
|
|
|
{
|
|
|
- #region
|
|
|
- /*
|
|
|
- if (e.licType == PbCache.collect.licType)
|
|
|
- {
|
|
|
- iCollection++;
|
|
|
- if (iCollection > 59 && iCollection % 20 == 0) //若连续30秒采集不到数据则提示中断,并每隔10秒播放一次
|
|
|
- {
|
|
|
- //采集线程中断
|
|
|
- vicPlayClass.GetVoicePlay("实时库采集中断", "");
|
|
|
- sweepCodeClass.StrState = "";
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
+ if (e.carno == "nown")
|
|
|
{
|
|
|
- sweepCodeClass.StrState = e.weightStatus + "";
|
|
|
- iCollection = 0;
|
|
|
+ e.carno = "";
|
|
|
}
|
|
|
- //*/
|
|
|
- #endregion
|
|
|
-
|
|
|
#region 扫码信息
|
|
|
-
|
|
|
- if (!string.IsNullOrEmpty(sweepCodeClass2.StrCode))
|
|
|
- {
|
|
|
- Console.WriteLine("code:"+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
|
|
|
+ //{
|
|
|
+ // 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(sweepCodeClass2.StrCode))
|
|
|
@@ -373,7 +460,6 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
DecodeQRCode(sweepCodeClass2.StrCode);
|
|
|
}
|
|
|
-
|
|
|
#endregion
|
|
|
|
|
|
#region 秤上无车10分钟获取一次基础数据
|
|
|
@@ -383,15 +469,11 @@ namespace CarMeterSystem
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- iCount = 0;
|
|
|
try
|
|
|
{
|
|
|
//秤上没有车时,每隔10分钟获取一次基础数据
|
|
|
if (e.weight < 500)
|
|
|
{
|
|
|
-
|
|
|
- editCarNo = "";
|
|
|
- preCarNo = "";
|
|
|
if (bd.setBaseDb())
|
|
|
{
|
|
|
l.WriteLog(0, "十分钟获取基础数据成功");
|
|
|
@@ -400,11 +482,13 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
l.WriteLog(0, "十分钟获取基础数据失败");
|
|
|
}
|
|
|
+ iCount = 0;
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
l.WriteLog(0, "十分钟获取基础数据失败:" + ex.Message);
|
|
|
+ iCount = 0;
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
@@ -412,18 +496,17 @@ namespace CarMeterSystem
|
|
|
#region 每10秒写入一次当前时间
|
|
|
if (iCount % 20 == 0)
|
|
|
{
|
|
|
- RESTfulResult<string> rms = meterWorkMonitor.doUpdateWfBySpotNo(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo });
|
|
|
- if (!rms.Succeed)
|
|
|
+ //更新在线时间
|
|
|
+ rmsEventDataLastTime = meterWorkMonitor.doUpdateWfBySpotNo(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo });
|
|
|
+ if (!rmsEventDataLastTime.Succeed)
|
|
|
{
|
|
|
- l.WriteLog(0, "frmMain.EventData异常:写入时间异常");
|
|
|
+ l.WriteLog(0, "frmMain.EventData异常:写入时间异常,原因:" + rmsEventDataLastTime.ResultMessage);
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
#region
|
|
|
//一旦界面锁定则不采集数据
|
|
|
- //if (!PbCache.isLockFrm)
|
|
|
- //{
|
|
|
PbCache.collect.pointid = PbCache.sportInfo.baseSpotNo;
|
|
|
PbCache.collect.parkStatus = e.parkStatus;
|
|
|
PbCache.collect.datetime = e.datetime;
|
|
|
@@ -432,10 +515,7 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
sCarNo = testCarNo;
|
|
|
//PbCache.collect.carno = testCarNo;
|
|
|
- if (!sss)
|
|
|
- {
|
|
|
- PbCache.collect.weight = testWgt;
|
|
|
- }
|
|
|
+ PbCache.collect.weight = testWgt;
|
|
|
PbCache.collect.weightStatus = 0;
|
|
|
PbCache.monitorResult.valid_park_status = true;
|
|
|
PbCache.collect.parkStatus = 0;
|
|
|
@@ -443,7 +523,6 @@ namespace CarMeterSystem
|
|
|
e.weight = PbCache.collect.weight;
|
|
|
PbCache.strCode = testPlanNo;
|
|
|
e.carno = testCarNo;
|
|
|
- sss = true;
|
|
|
//PbCache.strQRCode = testCode;
|
|
|
}
|
|
|
else
|
|
|
@@ -451,93 +530,43 @@ namespace CarMeterSystem
|
|
|
PbCache.collect.weight = e.weight;
|
|
|
PbCache.collect.weightStatus = e.weightStatus;
|
|
|
}
|
|
|
-
|
|
|
- if (!flagCarMonit)
|
|
|
- {
|
|
|
- sCarNo = e.carno;
|
|
|
- //PbCache.collect.carno = e.carno;
|
|
|
- }
|
|
|
-
|
|
|
- #if DEBUG
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- #endif
|
|
|
-
|
|
|
- #region 摄像头当前采集的车号与上次采集的不一样且当前未勾选不验证的情况
|
|
|
- if (preCarNo != e.carno && PbCache.monitor != null && PbCache.monitor.validCarno != "0")
|
|
|
- {
|
|
|
- flagCarMonit = false;
|
|
|
- }
|
|
|
- preCarNo = e.carno;
|
|
|
- #endregion
|
|
|
|
|
|
- //*
|
|
|
- //有车号,且重量稳定的情况下,只修正一次车号
|
|
|
- if (!string.IsNullOrEmpty(e.carno) && e.weightStatus == 0 && !flagCarMonit && PbCache.monitor != null && PbCache.monitor.carMonitor == "1" && PbCache.monitor.carMonitorLvl > 0)
|
|
|
+ if (PbCache.collect != null && PbCache.collect.weightStatus == 0)
|
|
|
{
|
|
|
- flagCarMonit = true;
|
|
|
- string methods = "";
|
|
|
- for (int i = 0; i <= PbCache.monitor.carMonitorLvl; i++)
|
|
|
+ if (string.IsNullOrEmpty(PbCache.resultWgt))
|
|
|
{
|
|
|
- methods += "CarNoTrustCorrect" + i + ",";
|
|
|
+ PbCache.resultWgt = e.weight + "";
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(PbCache.resultWgt) && e.weight > Convert.ToInt32(PbCache.resultWgt))
|
|
|
+ {
|
|
|
+ PbCache.resultWgt = e.weight + "";
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(e.carno) && PbCache.resultCarNo != e.carno)
|
|
|
+ {
|
|
|
+ PbCache.resultCarNo = e.carno + "";
|
|
|
+ l.WriteLog(28, "车号賦值跟蹤:PbCache.resultCarNo" + PbCache.resultCarNo + "||e.carno" + e.carno);
|
|
|
}
|
|
|
- editCarNo = modfiy.CarNoCorrect(e.carno, methods.Substring(0, methods.Length - 1));
|
|
|
- sCarNo = editCarNo;
|
|
|
- }
|
|
|
-
|
|
|
- //勾选了不验证车号的情况
|
|
|
- if (PbCache.monitor.validCarno == "0")
|
|
|
- {
|
|
|
- flagCarMonit = true;
|
|
|
}
|
|
|
+ //*/
|
|
|
|
|
|
// 更新监控表
|
|
|
- doLive();
|
|
|
-
|
|
|
- //}
|
|
|
- //*/
|
|
|
+ //doLive();
|
|
|
|
|
|
//重量大于500的情况下
|
|
|
if (e.weight > 500)
|
|
|
{
|
|
|
+ isResFlag = true;
|
|
|
+
|
|
|
if (PbCache.dtStartTime == null)
|
|
|
PbCache.dtStartTime = DateTime.Now;
|
|
|
isLedWrite = true;
|
|
|
PbCache.strState = "0";
|
|
|
|
|
|
- #region 查一次是否校秤,若未校秤则不能计量
|
|
|
- /*
|
|
|
- if (bRelation)
|
|
|
- {
|
|
|
- string msgInfo = "";
|
|
|
- isCalibration = vCalib.ValidMethod(new MeterWorkCalibrationMain { baseSpotNo = PbCache.sportInfo.baseSpotNo, valueFlag = "2" }, out msgInfo);
|
|
|
- if (!isCalibration)
|
|
|
- {
|
|
|
- foreach (ucBusinessType uc in lu)
|
|
|
- {
|
|
|
- uc.setControlEnable(false);
|
|
|
- }
|
|
|
- ledTxt = msgInfo;
|
|
|
- l.WriteLog(1, msgInfo);
|
|
|
- }
|
|
|
- bRelation = false;
|
|
|
- }
|
|
|
-
|
|
|
- if (!isCalibration)
|
|
|
- {
|
|
|
- vicPlayClass.GetVoicePlay("未校秤", "");
|
|
|
- Thread.Sleep(2000);
|
|
|
- return;
|
|
|
- }
|
|
|
- //*/
|
|
|
- #endregion
|
|
|
-
|
|
|
#region 车上人员请下车
|
|
|
try
|
|
|
{
|
|
|
//界面未锁定的情况下,有车号,如果重量稳定了,停车线验证通过,未超量程的情况下,则按钮可用
|
|
|
- if (!string.IsNullOrEmpty(PbCache.collect.carno) && PbCache.collect.weightStatus == 0 && PbCache.monitorResult.valid_park_status && PbCache.collect.weight < PbCache.range.upperRange)
|
|
|
+ if (PbCache.collect != null && !string.IsNullOrEmpty(PbCache.collect.carno) && PbCache.collect.weightStatus == 0 && PbCache.monitorResult.valid_park_status && PbCache.collect.weight < PbCache.range.upperRange)
|
|
|
{
|
|
|
if (!isVoiceDownCar)
|
|
|
{
|
|
|
@@ -554,10 +583,109 @@ namespace CarMeterSystem
|
|
|
//每隔1秒刷一次计量实时监控表数据值
|
|
|
if (iCount % 2 == 0)
|
|
|
{
|
|
|
+ //调用该方法时已赋值
|
|
|
+ updateEventDataMonitor.validFlag = "1";
|
|
|
+ updateEventDataMonitor.pointNo = PbCache.sportInfo.baseSpotNo;
|
|
|
+ rmUpdateEventDataMonitor = meterWorkMonitor.doQueryOneWf(updateEventDataMonitor);
|
|
|
+ if (!rmUpdateEventDataMonitor.Succeed)
|
|
|
+ {
|
|
|
+ l.WriteLog(0, "frmMain.EventData异常419:" + rmUpdateEventDataMonitor.ResultMessage);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (rmUpdateEventDataMonitor.Data != null && rmUpdateEventDataMonitor.Data.Count > 0)
|
|
|
+ {
|
|
|
+ PbCache.monitor = rmUpdateEventDataMonitor.Data[0];
|
|
|
+
|
|
|
+ if (string.IsNullOrEmpty(PbCache.collect_no))
|
|
|
+ {
|
|
|
+ PbCache.collect_no = rmUpdateEventDataMonitor.Data[0].collectionCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ledTxt != rmUpdateEventDataMonitor.Data[0].ledWriter && rmUpdateEventDataMonitor.Data[0].ledWriter != "")
|
|
|
+ {
|
|
|
+ //调用LED信息写入******************************
|
|
|
+ ledTxt = rmUpdateEventDataMonitor.Data[0].ledWriter;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (string.IsNullOrEmpty(ledTxt))
|
|
|
+ {
|
|
|
+ ledTxt = "欢迎使用酒钢汽车衡智能计量系统!";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #region 2021-03-29
|
|
|
+ #region 摄像头当前采集的车号与上次采集的不一样且当前未勾选不验证,且当前车号未进行手动修正的情况下
|
|
|
+ if (preCarNo != e.carno && PbCache.monitor != null && PbCache.monitor.validCarno != "0" && !bEditCar)
|
|
|
+ {
|
|
|
+ flagCarMonit = false;
|
|
|
+ }
|
|
|
+ preCarNo = e.carno;
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ if (!flagCarMonit)
|
|
|
+ {
|
|
|
+ sCarNo = e.carno;
|
|
|
+ }
|
|
|
+
|
|
|
+ //*
|
|
|
+ //有车号,且重量稳定的情况下,只修正一次车号
|
|
|
+ if (!string.IsNullOrEmpty(e.carno) && e.weightStatus == 0 && !flagCarMonit && PbCache.monitor != null && PbCache.monitor.carMonitor == "1" && PbCache.monitor.carMonitorLvl > 0)
|
|
|
+ {
|
|
|
+ flagCarMonit = true;
|
|
|
+ string methods = "";
|
|
|
+ for (int i = 0; i <= PbCache.monitor.carMonitorLvl; i++)
|
|
|
+ {
|
|
|
+ methods += "CarNoTrustCorrect" + i + ",";
|
|
|
+ }
|
|
|
+ editCarNo = modfiy.CarNoCorrect(e.carno, methods.Substring(0, methods.Length - 1));
|
|
|
+ sCarNo = editCarNo;
|
|
|
+ //mwUpdate
|
|
|
+ }
|
|
|
+
|
|
|
+ //勾选了不验证车号的情况
|
|
|
+ if (PbCache.monitor.validCarno == "0")
|
|
|
+ {
|
|
|
+ flagCarMonit = true;
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 每隔1秒写入一次重量曲线
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (preWgt != e.weight)
|
|
|
+ {
|
|
|
+ preWgt = e.weight;
|
|
|
+ sPreNo = PbCache.sportInfo.baseSpotNo + DateTime.Now.ToString("yyyyMMddHHmmssfff");
|
|
|
+ meterMonitorWeightEventData1.weightNo = sPreNo;
|
|
|
+ meterMonitorWeightEventData1.baseSpotNo = PbCache.sportInfo.baseSpotNo;
|
|
|
+ meterMonitorWeightEventData1.baseSpotName = PbCache.sportInfo.baseSpotName;
|
|
|
+ meterMonitorWeightEventData1.collectWeight = e.weight + "";
|
|
|
+ meterMonitorWeightEventData1.collectStartTime = PbCache.dtStartTime.Value;
|
|
|
+ meterMonitorWeightEventData1.collectEndTime = DateTime.Now;
|
|
|
+ meterMonitorWeightEventData1.spotTypeNo = "001002001";
|
|
|
+ meterMonitorWeightEventData1.spotTypeName = "汽车衡";
|
|
|
+ meterMonitorWeightEventData1.actualFirstNo = PbCache.actualFirstNo;
|
|
|
+ monitorWeightService.doAddWf(meterMonitorWeightEventData1);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrEmpty(sPreNo))
|
|
|
+ {
|
|
|
+ meterMonitorWeightEventData2.weightNo = sPreNo;
|
|
|
+ meterMonitorWeightEventData2.collectEndTime = DateTime.Now;
|
|
|
+ monitorWeightService.doUpdateWf(meterMonitorWeightEventData2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch { }
|
|
|
+ #endregion
|
|
|
+
|
|
|
#region 停留超时
|
|
|
iHodeTime++;
|
|
|
- MeterWorkMonitor mwUpdate = new MeterWorkMonitor();
|
|
|
mwUpdate.pointNo = PbCache.sportInfo.baseSpotNo;
|
|
|
+ mwUpdate.editCar = editCarNo;
|
|
|
|
|
|
if (PbCache.holdTime != null && PbCache.holdTime.Count > 0)
|
|
|
{
|
|
|
@@ -565,6 +693,7 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
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; //是否超时报警
|
|
|
mwUpdate.stopOverTime = "1"; //写入一次停留超时
|
|
|
//mwUpdate.isHelp = "1";//派位
|
|
|
@@ -575,33 +704,37 @@ namespace CarMeterSystem
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- #region 车号信息
|
|
|
+ #region RFID识别车号信息
|
|
|
mwUpdate.rfidCar = "";
|
|
|
mwUpdate.photoCar = e.vdioCarNos;
|
|
|
+ mwUpdate.scanCar = "";
|
|
|
if (testFlag)
|
|
|
{
|
|
|
- mwUpdate.photoCar = PbCache.collect.carno;
|
|
|
+ mwUpdate.scanCar = PbCache.collect.carno;
|
|
|
}
|
|
|
- //e.RfidNos = "0003";
|
|
|
+ //mwUpdate.photoCar = PbCache.collect.carno;
|
|
|
if (!string.IsNullOrEmpty(e.RfidNos))
|
|
|
{
|
|
|
- string sqls = @"SELECT RFID_ID id,CAR_NO text FROM METER_BASE_RFID_INFO where RFID_CODE = '" + e.RfidNos + "' and valueFlag = '0'";
|
|
|
+ string sqls = @"SELECT RFID_ID id,CAR_NO text FROM METER_BASE_RFID_INFO where RFID_CODE = '" + e.RfidNos + "'";
|
|
|
|
|
|
- PbModelDbService<List<PbModelDb>> pbp = new PbModelDbService<List<PbModelDb>>();
|
|
|
- RESTfulResult<List<PbModelDb>> rmT = pbp.executeSqlDataWf(sqls);
|
|
|
- if (rmT.Data == null || rmT.Data.Count == 0)
|
|
|
- {}
|
|
|
+ rmTRFIDEventData = pbpRFIDEventData.executeSqlDataWf(sqls);
|
|
|
+ if (rmTRFIDEventData.Data == null || rmTRFIDEventData.Data.Count == 0)
|
|
|
+ { }
|
|
|
else
|
|
|
{
|
|
|
- mwUpdate.rfidCar = rmT.Data[0].text;
|
|
|
- sCarNo = rmT.Data[0].text;
|
|
|
+ mwUpdate.rfidCar = rmTRFIDEventData.Data[0].text;
|
|
|
+ sCarNo = rmTRFIDEventData.Data[0].text;
|
|
|
+ RFIDCarNo = rmTRFIDEventData.Data[0].text;
|
|
|
}
|
|
|
}
|
|
|
+ #endregion
|
|
|
|
|
|
+ #region 计量员修改的车号信息
|
|
|
if (PbCache.monitor != null && !string.IsNullOrEmpty(PbCache.monitor.setCar))
|
|
|
{
|
|
|
- //未锁定的情况下,若监控界面设置了车号,则车号将改为设定车号
|
|
|
sCarNo = PbCache.monitor.setCar;
|
|
|
+ bEditCar = true;
|
|
|
+ flagCarMonit = true;
|
|
|
codeFlag = false;
|
|
|
sweepCodeClass.StrCode = "";
|
|
|
sweepCodeClass2.StrCode = "";
|
|
|
@@ -620,50 +753,16 @@ namespace CarMeterSystem
|
|
|
#endregion
|
|
|
|
|
|
#region 写入一次监控表,将重量/车号停留超时等信息写入
|
|
|
- mwUpdate.weightStatus = PbCache.collect.weightStatus;
|
|
|
mwUpdate.msgInfo = PbCache.ResultMessage;
|
|
|
- if (codeFlag)
|
|
|
- {
|
|
|
- mwUpdate.scanCar = PbCache.collect.carno;
|
|
|
- }
|
|
|
+ mwUpdate.weightStatus = PbCache.collect.weightStatus;
|
|
|
//另外初始化一次监控数据
|
|
|
- RESTfulResult<string> rms = meterWorkMonitor.doUpdateWf(mwUpdate);
|
|
|
- if (!rms.Succeed)
|
|
|
+ rmsmwUpdateEventData = meterWorkMonitor.doUpdateWf(mwUpdate);
|
|
|
+ if (!rmsmwUpdateEventData.Succeed)
|
|
|
{
|
|
|
- l.WriteLog(0, "frmMain.EventData异常doUpdateWf:写入信息异常");
|
|
|
+ l.WriteLog(0, "frmMain.EventData异常583:写入信息异常" + mwUpdate);
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- //调用该方法时已赋值
|
|
|
- RESTfulResult<List<MeterWorkMonitor>> rm = meterWorkMonitor.doQueryOneWf(new MeterWorkMonitor { validFlag = "1", pointNo = PbCache.sportInfo.baseSpotNo });
|
|
|
- if (!rm.Succeed)
|
|
|
- {
|
|
|
- l.WriteLog(0, "frmMain.EventData异常doQueryWf:" + rm.ResultMessage);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (rm.Data != null && rm.Data.Count > 0)
|
|
|
- {
|
|
|
- PbCache.monitor = rm.Data[0];
|
|
|
-
|
|
|
- if (string.IsNullOrEmpty(PbCache.collect_no))
|
|
|
- {
|
|
|
- PbCache.collect_no = rm.Data[0].collectionCode;
|
|
|
- }
|
|
|
-
|
|
|
- if (ledTxt != rm.Data[0].ledWriter && rm.Data[0].ledWriter != "")
|
|
|
- {
|
|
|
- //调用LED信息写入******************************
|
|
|
- ledTxt = rm.Data[0].ledWriter;
|
|
|
- }
|
|
|
-
|
|
|
- if (string.IsNullOrEmpty(ledTxt))
|
|
|
- {
|
|
|
- ledTxt = "车号甘A12345,重量98.76吨,计量完成";
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
//验证对射
|
|
|
valid.ValidMethod();
|
|
|
|
|
|
@@ -676,11 +775,23 @@ namespace CarMeterSystem
|
|
|
vicPlayClass.GetVoicePlay("已超量程", e.carno);
|
|
|
//return;
|
|
|
}
|
|
|
- else if (e.weightStatus == 0 && !PbCache.monitorResult.valid_park_status)
|
|
|
+ else if (e.weightStatus == 0)
|
|
|
{
|
|
|
- //重量稳定,且对射验证不合格
|
|
|
- vicPlayClass.GetVoicePlay("您的车辆未停到位", e.carno);
|
|
|
- //return;
|
|
|
+ if (!PbCache.monitorResult.valid_park_status)
|
|
|
+ {
|
|
|
+ iCountPark++;
|
|
|
+ if (iCountPark > 9)
|
|
|
+ {
|
|
|
+ //重量稳定,且对射验证不合格
|
|
|
+ vicPlayClass.GetVoicePlay("您的车辆未停到位", e.carno);
|
|
|
+ //return;
|
|
|
+ iCountPark = 0; //2021年7月27日5s播一次,然后重新在播
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ iCountPark = 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -697,7 +808,9 @@ namespace CarMeterSystem
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- ////写入LED信息
|
|
|
+ PbCache.collect.carno = sCarNo;
|
|
|
+
|
|
|
+ //写入LED信息
|
|
|
//if (PbCache.sportInfo != null && PbCache.ledInfo != PbCache.OldLedInfo)
|
|
|
//{
|
|
|
// PbCache.OldLedInfo = PbCache.ledInfo;
|
|
|
@@ -709,103 +822,126 @@ namespace CarMeterSystem
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ isOpened = false; //下次上秤直接打开主界面
|
|
|
+
|
|
|
+ if (e.weight > 10 && e.weight < 500)
|
|
|
+ {
|
|
|
+ //重量小于500,大于10
|
|
|
+ MeterWorkMonitor mwUpdate = new MeterWorkMonitor();
|
|
|
+ mwUpdate.pointNo = PbCache.sportInfo.baseSpotNo;
|
|
|
+ mwUpdate.wgt = e.weight;
|
|
|
+ rmsdoUpdateWfEventData = meterWorkMonitor.doUpdateWf(mwUpdate);
|
|
|
+ }
|
|
|
if (e.weight > 0 && e.weight < 200)
|
|
|
{
|
|
|
doOperateLive();
|
|
|
}
|
|
|
- if (e.weight==0)
|
|
|
+ if (e.weight == 0)
|
|
|
{
|
|
|
PbCache.isZeroAlarm = false;
|
|
|
}
|
|
|
- //======测试 的时候注释,正式用的时候启用下面这行代码***************************************************************
|
|
|
- //PbCache.ResultMessage = "";
|
|
|
- PbCache.isOvertimeAlarm = false;
|
|
|
- isOpened = false;
|
|
|
+ editCarNo = "";
|
|
|
+ firstCode = ""; //历史的扫码枪的值
|
|
|
+ preCarNo = "";
|
|
|
+ sCarNo = "";
|
|
|
+ sPreNo = "";
|
|
|
+ preWgt = 0;
|
|
|
+
|
|
|
+ //不等于空的时候说明写过一次日志了
|
|
|
+ if (!testFlag)
|
|
|
+ {
|
|
|
+ isResFlag = false;
|
|
|
+ meterWorkScheduledHelp1.baseSpotNo = PbCache.sportInfo.baseSpotNo;
|
|
|
+ meterWorkScheduledHelp1.baseSpotName = PbCache.sportInfo.baseSpotName;
|
|
|
+ meterWorkScheduledHelp1.carNo = string.IsNullOrEmpty(PbCache.collect.carno) ? PbCache.resultCarNo : PbCache.collect.carno;
|
|
|
+ meterWorkScheduledHelp1.helpContent = "车号:" + (string.IsNullOrEmpty(PbCache.collect.carno) ? (string.IsNullOrEmpty(PbCache.resultCarNo) ? "未识别" : PbCache.resultCarNo) : PbCache.collect.carno) + ";重量:" + (PbCache.lockWgt == 0 ? PbCache.resultWgt : PbCache.lockWgt + "") + ";提示信息:" + PbCache.resultMsgAll;
|
|
|
+ meterWorkScheduledHelp1.warmType = "5";
|
|
|
+ meterWorkScheduledHelp1.warmTypeName = "计量提示跟踪";
|
|
|
+ meterWorkScheduledHelpService.add(meterWorkScheduledHelp1);
|
|
|
+ l.WriteLog(28, "车号:" + (string.IsNullOrEmpty(PbCache.collect.carno) ? (string.IsNullOrEmpty(PbCache.resultCarNo) ? "未识别" : PbCache.resultCarNo) : PbCache.collect.carno) + ";重量:" + (PbCache.lockWgt == 0 ? PbCache.resultWgt : PbCache.lockWgt + "") + ";提示信息:" + PbCache.resultMsgAll);
|
|
|
+ }
|
|
|
+ //不等于空的时候说明写过一次日志了
|
|
|
+ if (!string.IsNullOrEmpty(RFIDCarNo) && isWriteRFID == "1")
|
|
|
+ {
|
|
|
+ meterWorkScheduledHelp1.baseSpotNo = PbCache.sportInfo.baseSpotNo;
|
|
|
+ meterWorkScheduledHelp1.baseSpotName = PbCache.sportInfo.baseSpotName;
|
|
|
+ meterWorkScheduledHelp1.carNo = string.IsNullOrEmpty(PbCache.collect.carno) ? PbCache.resultCarNo : PbCache.collect.carno;
|
|
|
+ meterWorkScheduledHelp1.helpContent = RFIDCarNo;
|
|
|
+ meterWorkScheduledHelp1.warmType = "7";
|
|
|
+ meterWorkScheduledHelp1.warmTypeName = "RFID识别率";
|
|
|
+ meterWorkScheduledHelpService.add(meterWorkScheduledHelp1);
|
|
|
+ RFIDCarNo = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ PbCache.isOvertimeAlarm = false; //是否超时报警
|
|
|
+ PbCache.strCode = "";
|
|
|
+ PbCache.strState = "";
|
|
|
+ PbCache.ResultMessage = "";
|
|
|
+ PbCache.resultMsgAll = "";
|
|
|
+ PbCache.resultCarNo = "";
|
|
|
+ PbCache.resultWgt = "";
|
|
|
+ bEditCar = false;
|
|
|
isVoiceDownCar = false;
|
|
|
flagCarMonit = false;
|
|
|
iHodeTime = 0;
|
|
|
- sCarNo = "";
|
|
|
- if (!testFlag)
|
|
|
+
|
|
|
+ isOpenMeter = false;
|
|
|
+ PbCache.isLockFrm = false;
|
|
|
+ PbCache.dtStartTime = null;
|
|
|
+ PbCache.voiceOver = true;
|
|
|
+ if (PbCache.collect != null && !string.IsNullOrEmpty(PbCache.collect.carno))
|
|
|
{
|
|
|
- bRelation = true;
|
|
|
- PbCache.isLockFrm = false;
|
|
|
- PbCache.dtStartTime = null;
|
|
|
- PbCache.voiceOver = true;
|
|
|
- setWelecomeVis(true);
|
|
|
- if (lu[0].bcEnable)
|
|
|
- {
|
|
|
- foreach (ucBusinessType uc in lu)
|
|
|
- {
|
|
|
- uc.setControlEnable(false);
|
|
|
- }
|
|
|
- }
|
|
|
- //LED写入
|
|
|
- if (isLedWrite)
|
|
|
- {
|
|
|
- //if (PbCache.monitor == null || string.IsNullOrEmpty(PbCache.monitor.ledWriter))
|
|
|
- //{
|
|
|
- // PbCache.ledInfo = "车号甘A12345\n\r重量98.76吨\n\r之前存在一个未结净的毛重\n\r请联系";
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // PbCache.ledInfo = PbCache.monitor == null ? "" : PbCache.monitor.ledWriter;
|
|
|
- //}
|
|
|
-
|
|
|
- //led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.ledInfo);
|
|
|
- //led_controler.setStatic4LineMsg(PbCache.sportInfo.ledIp, PbCache.ledInfo);
|
|
|
-
|
|
|
- isLedWrite = false;
|
|
|
-
|
|
|
- //*
|
|
|
- //另外初始化一次监控数据
|
|
|
- RESTfulResult<string> rms = meterWorkMonitor.doUpdateWf(new MeterWorkMonitor
|
|
|
- {
|
|
|
- pointNo = PbCache.sportInfo.baseSpotNo,
|
|
|
- validWgt = "1",
|
|
|
- validCarno = "1",
|
|
|
- validTareTime = "1",
|
|
|
- validMatTime = "1",
|
|
|
- validTimeInterval = "1",
|
|
|
- validParkStatus = "1",
|
|
|
- validExceedWgt = "1",
|
|
|
- validPredictionDiff = "1",
|
|
|
- validLianda = "1",
|
|
|
- validMatClick = "1",
|
|
|
- setCar = "",
|
|
|
- rfidCar = "",
|
|
|
- photoCar = "",
|
|
|
- scanCar = "",
|
|
|
- editCar = "",
|
|
|
- carErr = "0",
|
|
|
- wgtErr = "0",
|
|
|
- ferroalloyResult = "0",
|
|
|
- stopOverTime = "0",
|
|
|
- msgInfo = "",
|
|
|
- ledWriter = "",
|
|
|
- isOverWgt = "",
|
|
|
- isHelp = "0",
|
|
|
- wgt = 0
|
|
|
- });
|
|
|
- if (!rms.Succeed)
|
|
|
- {
|
|
|
- l.WriteLog(0, "frmMain.EventData异常:写入信息异常");
|
|
|
- isLedWrite = true;
|
|
|
- }
|
|
|
- //*/
|
|
|
- }
|
|
|
- //*
|
|
|
+ PbCache.collect.carno = "";
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ setWelecomeVis(true);
|
|
|
+ if (lu[0].bcEnable)
|
|
|
{
|
|
|
- if (!lu[0].bcEnable)
|
|
|
+ foreach (ucBusinessType uc in lu)
|
|
|
{
|
|
|
- foreach (ucBusinessType uc in lu)
|
|
|
- {
|
|
|
- uc.setControlEnable(true);
|
|
|
- }
|
|
|
+ uc.setControlEnable(false);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ meterWorkMonitorEventDataI.pointNo = PbCache.sportInfo.baseSpotNo;
|
|
|
+ meterWorkMonitorEventDataI.validWgt = "1";
|
|
|
+ meterWorkMonitorEventDataI.validCarno = "1";
|
|
|
+ meterWorkMonitorEventDataI.validTareTime = "1";
|
|
|
+ meterWorkMonitorEventDataI.validMatTime = "1";
|
|
|
+ meterWorkMonitorEventDataI.validTimeInterval = "1";
|
|
|
+ meterWorkMonitorEventDataI.validParkStatus = "1";
|
|
|
+ meterWorkMonitorEventDataI.validExceedWgt = "1";
|
|
|
+ meterWorkMonitorEventDataI.validPredictionDiff = "1";
|
|
|
+ meterWorkMonitorEventDataI.validLianda = "1";
|
|
|
+ meterWorkMonitorEventDataI.validMatClick = "1";
|
|
|
+ meterWorkMonitorEventDataI.setCar = "";
|
|
|
+ meterWorkMonitorEventDataI.rfidCar = "";
|
|
|
+ meterWorkMonitorEventDataI.photoCar = "";
|
|
|
+ meterWorkMonitorEventDataI.scanCar = "";
|
|
|
+ meterWorkMonitorEventDataI.editCar = "";
|
|
|
+ meterWorkMonitorEventDataI.zeroState = "0";
|
|
|
+ meterWorkMonitorEventDataI.carErr = "0";
|
|
|
+ meterWorkMonitorEventDataI.ferroalloyResult = "0";
|
|
|
+ meterWorkMonitorEventDataI.wgtErr = "0";
|
|
|
+ meterWorkMonitorEventDataI.stopOverTime = "0";
|
|
|
+ meterWorkMonitorEventDataI.msgInfo = "";
|
|
|
+ meterWorkMonitorEventDataI.ledWriter = "";
|
|
|
+ meterWorkMonitorEventDataI.isOverWgt = "";
|
|
|
+ meterWorkMonitorEventDataI.isHelp = "0";
|
|
|
+ meterWorkMonitorEventDataI.wgt = e.weight;
|
|
|
+ //*
|
|
|
+ //另外初始化一次监控数据
|
|
|
+ RESTfulResult<string> rmssEventData = meterWorkMonitor.doUpdateWf(meterWorkMonitorEventDataI);
|
|
|
+ if (!rmssEventData.Succeed)
|
|
|
+ {
|
|
|
+ l.WriteLog(0, "frmMain.EventData异常754:写入信息异常");
|
|
|
+ }
|
|
|
//*/
|
|
|
+ //LED写入
|
|
|
+ if (isLedWrite)
|
|
|
+ {
|
|
|
+ isLedWrite = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
@@ -1188,20 +1324,27 @@ namespace CarMeterSystem
|
|
|
/// <param name="e"></param>
|
|
|
private void timer1_Tick(object sender, EventArgs e)
|
|
|
{
|
|
|
- if (!isOpened && PbCache.collect?.weight > 500)
|
|
|
+ //timer1.Stop();
|
|
|
+ try
|
|
|
{
|
|
|
- isOpened = true;
|
|
|
- isOpenMeter = true;
|
|
|
- PbCache.bussinessTypeName = "";
|
|
|
- PbCache.bussinessTypeCode = "";
|
|
|
-
|
|
|
- if (fcc.Visible == false)
|
|
|
+ if (!isOpened && PbCache.collect?.weight > 500)
|
|
|
{
|
|
|
- fcc.Visible = true;
|
|
|
- fcc.init();
|
|
|
+ PbCache.bussinessTypeName = "";
|
|
|
+ PbCache.bussinessTypeCode = "";
|
|
|
+ if (fcc.Visible == false)
|
|
|
+ {
|
|
|
+ fcc.Visible = true;
|
|
|
+ fcc.init();
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+ timer1.Interval = 1000;
|
|
|
}
|
|
|
+ catch (Exception ee)
|
|
|
+ {
|
|
|
+ //GlobalInstanceController.Instance.LastCallMessage = ee.Message;
|
|
|
+ timer1.Interval = 1000;
|
|
|
+ }
|
|
|
+ //timer1.Start();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -1416,7 +1559,7 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
isOpened = false;
|
|
|
testFlag = true;
|
|
|
- sss = false;
|
|
|
+
|
|
|
PbCache.isTest= true;
|
|
|
testWgt = (int)numericUpDown1.Value;
|
|
|
//CollectModel model = new CollectModel();
|