|
|
@@ -4,6 +4,7 @@ using Common;
|
|
|
using MeterConditionLibrary;
|
|
|
using MeterPlugInLibrary;
|
|
|
using MeterSceneLibrary;
|
|
|
+using MeterSceneLibrary.JISCO;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Configuration;
|
|
|
@@ -59,7 +60,10 @@ namespace CarMeterSystem
|
|
|
private string TrackCarNo = "";//预报车号
|
|
|
private string sPreCarNo = "";//摄像头识别车号
|
|
|
private string limsMsg = "";
|
|
|
-
|
|
|
+ private double wgt = 0;
|
|
|
+ private string temporaryResult = "";
|
|
|
+ private string temporaryCarNo = "";
|
|
|
+ private SaveMethod saveMethod = new SaveMethod();
|
|
|
|
|
|
private LED_Control led_controler;
|
|
|
|
|
|
@@ -79,6 +83,9 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ wgt = 0;
|
|
|
+ temporaryResult = "";
|
|
|
+ temporaryCarNo = "";
|
|
|
if (!string.IsNullOrEmpty(PbCache.sportInfo.ledIp))
|
|
|
{
|
|
|
led_controler = new LED_Control(PbCache.sportInfo.ledIp);
|
|
|
@@ -117,16 +124,16 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
bool isCompare = false;
|
|
|
|
|
|
- RESTfulResult<List<MeterWorkCompareSpotSacle>> reSacle = meterWorkCompareSpotScaleService.doQuery(new MeterWorkCompareSpotSacle { carNo = PbCache.lockCarNo,valueFlag = "1" });
|
|
|
- if (reSacle.Succeed)
|
|
|
- {
|
|
|
- if (reSacle.Data == null || reSacle.Data.Count == 0)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- isCompare = true;
|
|
|
- }
|
|
|
- }
|
|
|
+ //RESTfulResult<List<MeterWorkCompareSpotSacle>> reSacle = meterWorkCompareSpotScaleService.doQuery(new MeterWorkCompareSpotSacle { carNo = PbCache.lockCarNo,valueFlag = "1" });
|
|
|
+ //if (reSacle.Succeed)
|
|
|
+ //{
|
|
|
+ // if (reSacle.Data == null || reSacle.Data.Count == 0)
|
|
|
+ // { }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // isCompare = true;
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
if (PbCache.collect == null) return;
|
|
|
PbCache.isLockFrm = true;
|
|
|
@@ -153,9 +160,9 @@ namespace CarMeterSystem
|
|
|
else if (PbCache.collect.weightStatus == 0 && !PbCache.monitorResult.valid_park_status)
|
|
|
{
|
|
|
//重量稳定,且对射验证不合格
|
|
|
- vicPlayClass.GetVoicePlay("您的车辆未停到位", PbCache.collect.carno);
|
|
|
- PbCache.ResultMessage = "您的车辆未停到位,请调整车辆位置,不要遮挡激光检测设备,不允许进行自助计量操作!"; //btnSave_Click
|
|
|
- led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "您的车辆未停到位,请调整车辆位置,不要遮挡激光检测设备,不允许进行自助计量操作!");
|
|
|
+ vicPlayClass.GetVoicePlay("车辆超出秤台,请调整车位", PbCache.collect.carno);
|
|
|
+ PbCache.ResultMessage = "车辆超出秤台,请调整车位"; //btnSave_Click
|
|
|
+ led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车辆超出秤台,请调整车位");
|
|
|
PbCache.isLockFrm = false;
|
|
|
btnSave.Enabled = true;
|
|
|
setMsg(PbCache.ResultMessage);
|
|
|
@@ -216,10 +223,24 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
PbCache.isLockFrm = false;
|
|
|
btnSave.Enabled = true;
|
|
|
- setMsg("秤体存在零点,禁止进行计量操作!请点[语音求助],联系计量大厅处理!");
|
|
|
+ setMsg("仪表未归零,无法计量,请联系大厅");
|
|
|
+ vicPlayClass.GetVoicePlay("仪表未归零,无法计量,请联系大厅", PbCache.collect.carno);
|
|
|
+ PbCache.ResultMessage = "仪表未归零,无法计量,请联系大厅"; //btnSave_Click
|
|
|
+ led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "仪表未归零,无法计量,请联系大厅");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ RESTfulResult<List<MeterBaseCar>> resCarList1 = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.lockCarNo, validFlag = "0" });
|
|
|
+ if (!resCarList1.Succeed || resCarList1.Data == null || resCarList1.Data.Count != 1)
|
|
|
+ {
|
|
|
+ PbCache.isLockFrm = false;
|
|
|
+ btnSave.Enabled = true;
|
|
|
+ setMsg("车号未注册,请联系处理" + "");
|
|
|
+ vicPlayClass.GetVoicePlay("车号未注册,请联系处理", PbCache.lockCarNo);
|
|
|
+ led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车号未注册,请联系处理");
|
|
|
+ lg.WriteLog(29, "车号未注册,请联系处理,车号:" + PbCache.lockCarNo + ",数量:" + ((resCarList1.Succeed && resCarList1.Data != null) ? resCarList1.Data.Count + "" : "失败"));
|
|
|
+ return;
|
|
|
+ }
|
|
|
//本次的提单量+历史已经运输的总量,若大于提单总量,则不允许继续计量了
|
|
|
//BourneCao暂时屏蔽
|
|
|
//if (!vShipWeight.ValidMethod(preTrack))
|
|
|
@@ -230,7 +251,8 @@ namespace CarMeterSystem
|
|
|
// return;
|
|
|
//}
|
|
|
|
|
|
- txtMsgInfo.Text = "称重保存中......";
|
|
|
+ //txtMsgInfo.Text = "称重保存中......";
|
|
|
+ setMsg("称重保存中......");
|
|
|
//FrmMessage frmMessage = FrmMess("是否确认保存当前计量数据!", "继续保存");
|
|
|
|
|
|
|
|
|
@@ -341,21 +363,21 @@ namespace CarMeterSystem
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- //拿到车辆
|
|
|
- RESTfulResult<List<MeterBaseCar>> resCarLists = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.lockCarNo,carTypeNo = "001004003" });
|
|
|
- if (resCarLists.Data == null || resCarLists.Data.Count == 0)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- RESTfulResult<List<MeterBaseSpecialUnit>> sunitList = meterBaseSpecialUnitService.doQueryCarList(new MeterBaseSpecialUnit { unitNo = resCarLists.Data[0].usetDepartmentNo });
|
|
|
-
|
|
|
- if (sunitList.Data == null || sunitList.Data.Count != 1)
|
|
|
- { }
|
|
|
- else
|
|
|
- {
|
|
|
- led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "请通过APP确认本次重量,重量为" + Math.Round((PbCache.lockWgt / 1000), 2) + "T");
|
|
|
- }
|
|
|
- }
|
|
|
+ ////拿到车辆
|
|
|
+ //RESTfulResult<List<MeterBaseCar>> resCarLists = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.lockCarNo,carTypeNo = "001004003" });
|
|
|
+ //if (resCarLists.Data == null || resCarLists.Data.Count == 0)
|
|
|
+ //{ }
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // RESTfulResult<List<MeterBaseSpecialUnit>> sunitList = meterBaseSpecialUnitService.doQueryCarList(new MeterBaseSpecialUnit { unitNo = resCarLists.Data[0].usetDepartmentNo });
|
|
|
+
|
|
|
+ // if (sunitList.Data == null || sunitList.Data.Count != 1)
|
|
|
+ // { }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "请通过APP确认本次重量,重量为" + Math.Round((PbCache.lockWgt / 1000), 2) + "T");
|
|
|
+ // }
|
|
|
+ //}
|
|
|
// 把车号加上-
|
|
|
string tempCarNo = PbCache.lockCarNo;
|
|
|
RESTfulResult<List<MeterBaseCar>> resCarList = carService.doQueryCarList(new MeterBaseCar { carNo = tempCarNo, validFlag = "0" });
|
|
|
@@ -597,6 +619,10 @@ namespace CarMeterSystem
|
|
|
//flag =true表示称重成功
|
|
|
readVoicd();
|
|
|
|
|
|
+ wgt = PbCache.lockWgt;
|
|
|
+ temporaryResult = PbCache.ResultMessage;
|
|
|
+ temporaryCarNo = PbCache.collect.carno;
|
|
|
+
|
|
|
isMeasureSuccess = true;
|
|
|
//提示信息,
|
|
|
//txtMsgInfo.Text = PbCache.ResultMessage;
|
|
|
@@ -633,26 +659,20 @@ namespace CarMeterSystem
|
|
|
meterWorkScheduledHelp.baseSpotName = PbCache.sportInfo.baseSpotName;
|
|
|
meterWorkScheduledHelp.carNo = PbCache.collect.carno;
|
|
|
meterWorkScheduledHelp.helpContent = PbCache.monitorResultMessage;
|
|
|
- meterWorkScheduledHelp.warnType = "2";
|
|
|
- meterWorkScheduledHelp.warnTypeName = "智能终端报警";
|
|
|
+ meterWorkScheduledHelp.warmType = "2";
|
|
|
+ meterWorkScheduledHelp.warmTypeName = "智能终端报警";
|
|
|
meterWorkScheduledHelpService.add(meterWorkScheduledHelp);
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region LED写入
|
|
|
- PbCache.ledInfo = string.Format("计量完成,车号:{0},车重:{1},物资:{2}", PbCache.lockCarNo, PbCache.lockWgt, preTrack != null ? preTrack.matterName : "");
|
|
|
+ //PbCache.ledInfo = string.Format("计量完成,车号:{0},车重:{1},物资:{2}", PbCache.lockCarNo, PbCache.lockWgt, preTrack != null ? preTrack.matterName : "");
|
|
|
#endregion LED写入
|
|
|
|
|
|
#region 智能料场LED显示
|
|
|
- if (PbCache.sportInfo.baseSpotNo == "")
|
|
|
- {
|
|
|
- LimisResponse ls = myTest.sendDataToZn(PbCache.weightInfoBeta);
|
|
|
- if (ls.Success)
|
|
|
- {
|
|
|
- led_controler.setOneLineMsg(PbCache.sportInfo.ledIp, ls.Msg);
|
|
|
- }
|
|
|
- }
|
|
|
+ saveMethod.sendToZnlc();
|
|
|
+ led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
|
|
|
#endregion
|
|
|
|
|
|
//计量完成后,显示毛重或者皮重
|
|
|
@@ -794,6 +814,8 @@ namespace CarMeterSystem
|
|
|
//计量完成标识
|
|
|
private bool isMeasureSuccess = false;
|
|
|
|
|
|
+ private bool registerCar = false;
|
|
|
+
|
|
|
|
|
|
private void timer1_Tick(object sender, EventArgs e)
|
|
|
{
|
|
|
@@ -824,8 +846,8 @@ namespace CarMeterSystem
|
|
|
meterWorkScheduledHelp.baseSpotName = PbCache.sportInfo.baseSpotName;
|
|
|
meterWorkScheduledHelp.carNo = PbCache.collect.carno;
|
|
|
meterWorkScheduledHelp.helpContent = "疑似跟车,请核查";
|
|
|
- meterWorkScheduledHelp.warnType = "3";
|
|
|
- meterWorkScheduledHelp.warnTypeName = "智能终端报警";
|
|
|
+ meterWorkScheduledHelp.warmType = "3";
|
|
|
+ meterWorkScheduledHelp.warmTypeName = "智能终端报警";
|
|
|
meterWorkScheduledHelpService.add(meterWorkScheduledHelp);
|
|
|
}
|
|
|
|
|
|
@@ -891,7 +913,8 @@ namespace CarMeterSystem
|
|
|
if (!string.IsNullOrEmpty(PbCache.monitor.isOverWgt) && PbCache.monitor.isTakeOver == "2" && !isOverSound) //&& !PbCache.isLockFrm)
|
|
|
{
|
|
|
ucWeightCarTJXJG1.setWgtBackColor(true);//称重完成后,显示颜色;
|
|
|
- txtMsgInfo.Text = "计量完成";
|
|
|
+ //txtMsgInfo.Text = "计量完成";
|
|
|
+ setMsg("计量完成");
|
|
|
vicPlayClass.GetVoicePlay("计量完成,请离开秤台", PbCache.collect.carno);
|
|
|
isOverSound = true;
|
|
|
Print1(PbCache.monitor.isOverWgt);
|
|
|
@@ -905,11 +928,13 @@ namespace CarMeterSystem
|
|
|
lg.WriteLog(14, "车号:" + PbCache.collect.carno + ";远程计量完成后,保存按钮隐藏!");
|
|
|
if (!txtMsgInfo.Text.Contains("计量完成") && PbCache.monitor.isTakeOver == "2")
|
|
|
{
|
|
|
- txtMsgInfo.Text = "正在远程计量,请等待处理!!";
|
|
|
+ //txtMsgInfo.Text = "正在远程计量,请等待处理!!";
|
|
|
+ setMsg("正在远程计量,请等待处理!!");
|
|
|
}
|
|
|
if (!txtMsgInfo.Text.Contains("计量完成") && !string.IsNullOrEmpty(PbCache.monitor.isOverWgt))
|
|
|
{
|
|
|
- txtMsgInfo.Text = "本次计量称重已经完成,车辆请下秤!!";
|
|
|
+ //txtMsgInfo.Text = "本次计量称重已经完成,车辆请下秤!!";
|
|
|
+ setMsg("本次计量称重已经完成,车辆请下秤!!");
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
@@ -948,12 +973,14 @@ namespace CarMeterSystem
|
|
|
// 2021年5月11日 未识别到车牌号,进行提示,避免出现重新扫码点保存的情况
|
|
|
if (string.IsNullOrEmpty(PbCache.collect.carno))
|
|
|
{
|
|
|
- txtMsgInfo.Text = string.Format("摄像头未识别到车牌号,不允许进行【保存】操作,请点击语音求助!");
|
|
|
+ //txtMsgInfo.Text = string.Format("摄像头未识别到车牌号,不允许进行【保存】操作,请点击语音求助!");
|
|
|
+ setMsg(string.Format("摄像头未识别到车牌号,不允许进行【保存】操作,请点击语音求助!"));
|
|
|
lg.WriteLog(14, "摄像头未识别到车牌号,不允许进行【保存】操作,请点击语音求助!");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- txtMsgInfo.Text = string.Format("预报车号【{0}】与摄像头识别车号【{1}】不一致,请点击语音求助", TrackCarNo, PbCache.collect.carno);
|
|
|
+ //txtMsgInfo.Text = string.Format("预报车号【{0}】与摄像头识别车号【{1}】不一致,请点击语音求助", TrackCarNo, PbCache.collect.carno);
|
|
|
+ setMsg(string.Format("预报车号【{0}】与摄像头识别车号【{1}】不一致,请点击语音求助", TrackCarNo, PbCache.collect.carno));
|
|
|
lg.WriteLog(14, "车号:" + PbCache.collect.carno + ";预报车号" + TrackCarNo + "与摄像头识别车号" + PbCache.collect.carno + "不一致!");
|
|
|
}
|
|
|
btnSave.Visible = false;
|
|
|
@@ -964,6 +991,7 @@ namespace CarMeterSystem
|
|
|
if (txtMsgInfo.Text.Contains("摄像头"))
|
|
|
{
|
|
|
txtMsgInfo.Text = ""; //将原来的不允许计量的提示给去掉
|
|
|
+ setMsg("");
|
|
|
}
|
|
|
PbCache.collect.carno = TrackCarNo;
|
|
|
|
|
|
@@ -983,7 +1011,8 @@ namespace CarMeterSystem
|
|
|
if (!isPlayRangeVoice)
|
|
|
{
|
|
|
vicPlayClass.GetVoicePlay("已超量程", PbCache.collect.carno);
|
|
|
- txtMsgInfo.Text = "当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!";
|
|
|
+ //txtMsgInfo.Text = "当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!";
|
|
|
+ setMsg("当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!");
|
|
|
isPlayRangeVoice = true;
|
|
|
}
|
|
|
}
|
|
|
@@ -992,22 +1021,26 @@ namespace CarMeterSystem
|
|
|
//重量稳定,且对射验证不合格
|
|
|
if (!isPlayCalibVoice)
|
|
|
{
|
|
|
- vicPlayClass.GetVoicePlay("您的车辆未停到位", PbCache.collect.carno);
|
|
|
- txtMsgInfo.Text = "您的车辆未停到位,请调整车辆位置,不要遮挡激光检测设备,不允许进行自助计量操作!";//timer1_Tick
|
|
|
+ vicPlayClass.GetVoicePlay("车辆超出秤台,请调整车位", PbCache.collect.carno);
|
|
|
+ //txtMsgInfo.Text = "车辆超出秤台,请调整车位";//timer1_Tick
|
|
|
+ setMsg("车辆超出秤台,请调整车位");
|
|
|
+ PbCache.ResultMessage = "车辆超出秤台,请调整车位"; //btnSave_Click
|
|
|
+ led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车辆超出秤台,请调整车位");
|
|
|
isPlayCalibVoice = true;
|
|
|
}
|
|
|
}
|
|
|
if (PbCache.isOvertimeAlarm)
|
|
|
{
|
|
|
//停留超时提醒,不作为计量卡控的条件
|
|
|
- if (!isPlayOvertimeVoice && !PbCache.isLockFrm)
|
|
|
- {
|
|
|
- vicPlayClass.GetVoicePlay("停留超时", PbCache.collect.carno);
|
|
|
- led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "停留超时");
|
|
|
- //txtMsgInfo.Text = "您的车辆已停留超过三分钟,遇到操作问题请点击【语音求助】联系司秤工处理或继续进行自助计量!";
|
|
|
- isPlayOvertimeVoice = true;
|
|
|
- return;
|
|
|
- }
|
|
|
+ //if (!isPlayOvertimeVoice && !PbCache.isLockFrm)
|
|
|
+ //{
|
|
|
+ // vicPlayClass.GetVoicePlay("停留超时", PbCache.collect.carno);
|
|
|
+ // led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "停留超时");
|
|
|
+ // txtMsgInfo.Text = "停留超时";
|
|
|
+ // PbCache.ResultMessage = "停留超时";
|
|
|
+ // isPlayOvertimeVoice = true;
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
#region 模拟APP
|
|
|
@@ -1046,7 +1079,8 @@ namespace CarMeterSystem
|
|
|
vicPlayClass.GetVoicePlay("未校秤", "");
|
|
|
bXCStart = true;
|
|
|
}
|
|
|
- txtMsgInfo.Text = "未校秤无法计量";
|
|
|
+ //txtMsgInfo.Text = "未校秤无法计量";
|
|
|
+ setMsg("未校秤无法计量");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -1087,6 +1121,20 @@ namespace CarMeterSystem
|
|
|
//}
|
|
|
#endregion 判断是否需要复磅
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(PbCache.collect.carno))
|
|
|
+ {
|
|
|
+ RESTfulResult<List<MeterBaseCar>> resCarList = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.collect.carno, validFlag = "0" });
|
|
|
+ if (resCarList.Data == null || resCarList.Data.Count == 0 || resCarList.Data.Count != 1)
|
|
|
+ {
|
|
|
+ if (!registerCar)
|
|
|
+ {
|
|
|
+ RESTfulResult<MeterBaseCar> res = carService.addCar(new MeterBaseCar { carNo = PbCache.collect.carno, carTypeNo = AppConfigCache.carTypeNo, carTypeName = AppConfigCache.carTypeName });
|
|
|
+ registerCar = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
#region 第一次查询,有车号,重量稳定,红外验证通过的情况只查一次
|
|
|
|
|
|
//如果没有查过一次,且扫描到车号信息,且重量稳定
|
|
|
@@ -1095,7 +1143,18 @@ namespace CarMeterSystem
|
|
|
firstWgt = 0;
|
|
|
sPreCarNo = TrackCarNo;
|
|
|
//判断车辆是厂内车还是厂外车
|
|
|
- RESTfulResult<List<MeterBaseCar>> resCarList = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.collect.carno, validFlag = "0" });
|
|
|
+ if (string.IsNullOrEmpty(PbCache.collect.carno))
|
|
|
+ {
|
|
|
+ lg.WriteLog(28, "sss2" + "" + PbCache.collect.carno);
|
|
|
+ //txtMsgInfo.Text = "车号未识别,请联系处理";
|
|
|
+ setMsg("车号未识别,请联系处理");
|
|
|
+ PbCache.monitorResultMessage = "车号未识别,请联系处理";
|
|
|
+ PbCache.ResultMessage = "车号未识别,请联系处理";
|
|
|
+ vicPlayClass.GetVoicePlay("车号为空,请联系处理", PbCache.collect.carno);
|
|
|
+ led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车号未识别,请联系处理");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ RESTfulResult<List<MeterBaseCar>> resCarList = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.collect.carno, validFlag = "0" });
|
|
|
if (resCarList.Succeed)
|
|
|
{
|
|
|
if (resCarList.Data != null && resCarList.Data.Count == 1)
|
|
|
@@ -1193,7 +1252,8 @@ namespace CarMeterSystem
|
|
|
isStop = true;
|
|
|
if (string.IsNullOrEmpty(PbCache.collect.carno))
|
|
|
{
|
|
|
- txtMsgInfo.Text = "车号未识别,请联系处理";
|
|
|
+ //txtMsgInfo.Text = "车号未识别,请联系处理";
|
|
|
+ setMsg("车号未识别,请联系处理");
|
|
|
PbCache.monitorResultMessage = "车号未识别,请联系处理";
|
|
|
PbCache.ResultMessage = "车号未识别,请联系处理";
|
|
|
ledinfo = "车号未识别,请联系处理";
|
|
|
@@ -1201,7 +1261,8 @@ namespace CarMeterSystem
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- txtMsgInfo.Text = "车号未注册,请联系处理";
|
|
|
+ //txtMsgInfo.Text = "车号未注册,请联系处理";
|
|
|
+ setMsg("车号未注册,请联系处理");
|
|
|
PbCache.monitorResultMessage = "车号未注册,请联系处理";
|
|
|
PbCache.ResultMessage = "车号未注册,请联系处理";
|
|
|
ledinfo = "车号未注册,请联系处理";
|
|
|
@@ -1218,14 +1279,15 @@ namespace CarMeterSystem
|
|
|
|
|
|
if (!string.IsNullOrEmpty(PbCache.collect.carno))
|
|
|
{
|
|
|
- carService.addCar(new MeterBaseCar { carNo = PbCache.collect.carno, carTypeNo = AppConfigCache.carTypeNo, carTypeName = AppConfigCache.carTypeName });
|
|
|
+ lg.WriteLog(30, string.Format("车号注册参数-车号:{0},车辆类型编号:{1},车辆类型名称:{2}", PbCache.collect.carno, AppConfigCache.carTypeNo, AppConfigCache.carTypeName));
|
|
|
+ RESTfulResult<MeterBaseCar> res = carService.addCar(new MeterBaseCar { carNo = PbCache.collect.carno, carTypeNo = AppConfigCache.carTypeNo, carTypeName = AppConfigCache.carTypeName });
|
|
|
+ lg.WriteLog(30, res.Succeed ? "注册成功" : "注册失败,原因:" + res.ResultMessage);
|
|
|
}
|
|
|
led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, ledinfo);
|
|
|
bRailwayActual = false;
|
|
|
isStop = false;
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
#region 查一次是否可留期限皮,可以则显示按钮
|
|
|
@@ -1284,14 +1346,18 @@ namespace CarMeterSystem
|
|
|
if (!isVoiceDownCar)
|
|
|
{
|
|
|
isVoiceDownCar = true;
|
|
|
+ lg.WriteLog(25, PbCache.lockCarNo + "GetVoicePlay前");
|
|
|
vicPlayClass.GetVoicePlay("车上人员请下车", PbCache.collect.carno);
|
|
|
//txtMsgInfo.Text = "请核对车号后,扫描您手机中的二维码";
|
|
|
}
|
|
|
// 如果计量点配置中,设置了秤点计量类型为智能计量(下秤),验证扫码信息是否与识别车号一致。
|
|
|
// 如果为是,自动保存
|
|
|
//3秒后自动执行保存方法
|
|
|
+ lg.WriteLog(25, PbCache.lockCarNo + "Sleep前点击保存按钮");
|
|
|
Thread.Sleep(3000);
|
|
|
+ lg.WriteLog(25, PbCache.lockCarNo + "Sleep后点击保存按钮");
|
|
|
this.btnSave.PerformClick();
|
|
|
+ lg.WriteLog(25, PbCache.lockCarNo + "PerformClick后保存按钮");
|
|
|
}
|
|
|
else if (PbCache.monitor.validMatClick == "0")
|
|
|
{
|
|
|
@@ -1403,11 +1469,15 @@ namespace CarMeterSystem
|
|
|
else
|
|
|
{
|
|
|
txtMsgInfo.Text = _lbLog;
|
|
|
+ if (!string.IsNullOrEmpty(PbCache.ResultMessage) && _lbLog != PbCache.ResultMessage)
|
|
|
+ {
|
|
|
+ PbCache.ResultMessage = _lbLog;
|
|
|
+ }
|
|
|
}
|
|
|
//2021年3月13日;不管是哪一种方式调用界面控件的值,均记录现场日志
|
|
|
if (!string.IsNullOrEmpty(lblog) && PbCache.collect != null)
|
|
|
{
|
|
|
- lg.WriteLog(9, "[" + PbCache.collect.carno + "]" + lblog);
|
|
|
+ lg.WriteLog(9, "[" + PbCache.collect.carno + "||" + PbCache.lockCarNo + "]" + lblog);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1913,7 +1983,8 @@ namespace CarMeterSystem
|
|
|
//仪表重量验证
|
|
|
if (!dataValidity.ValidMethod(PbCache.lockWgt))
|
|
|
{
|
|
|
- txtMsgInfo.Text = PbCache.ResultMessage;
|
|
|
+ //txtMsgInfo.Text = PbCache.ResultMessage;
|
|
|
+ setMsg(PbCache.ResultMessage);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1928,13 +1999,15 @@ namespace CarMeterSystem
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- txtMsgInfo.Text = "复磅保存中......";
|
|
|
+ //txtMsgInfo.Text = "复磅保存中......";
|
|
|
+ setMsg("复磅保存中......");
|
|
|
FrmMessage frmMessage = FrmMess("是否确认保存当前复磅重量数据!", "继续保存");
|
|
|
if (frmMessage.ShowDialog(this) == DialogResult.Cancel)
|
|
|
{
|
|
|
PbCache.isLockFrm = false;
|
|
|
btnRecover.Enabled = true;
|
|
|
- txtMsgInfo.Text = "";
|
|
|
+ //txtMsgInfo.Text = "";
|
|
|
+ setMsg("");
|
|
|
lg.WriteLog(15, PbCache.lockCarNo + "【复磅】按钮选择否");
|
|
|
return;
|
|
|
}
|
|
|
@@ -1981,10 +2054,14 @@ namespace CarMeterSystem
|
|
|
else
|
|
|
{
|
|
|
txtMsgInfo.Text = ResultMessage;
|
|
|
+ if (!string.IsNullOrEmpty(PbCache.ResultMessage) && ResultMessage != PbCache.ResultMessage)
|
|
|
+ {
|
|
|
+ PbCache.ResultMessage = ResultMessage;
|
|
|
+ }
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(ResultMessage) && PbCache.collect != null)
|
|
|
{
|
|
|
- lg.WriteLog(9, "[" + PbCache.collect.carno + "]" + ResultMessage);
|
|
|
+ lg.WriteLog(9, "[" + PbCache.collect.carno + "||"+PbCache.lockCarNo+"]" + ResultMessage);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2009,6 +2086,15 @@ namespace CarMeterSystem
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ lg.WriteLog(27, ("车号:" + (string.IsNullOrEmpty(temporaryCarNo) ? "未识别" : temporaryCarNo)) + ";重量:" + wgt + ";提示信息:" + temporaryResult);
|
|
|
+ MeterWorkScheduledHelp meterWorkScheduledHelp1 = new MeterWorkScheduledHelp();
|
|
|
+ meterWorkScheduledHelp1.baseSpotNo = PbCache.sportInfo.baseSpotNo;
|
|
|
+ meterWorkScheduledHelp1.baseSpotName = PbCache.sportInfo.baseSpotName;
|
|
|
+ meterWorkScheduledHelp1.carNo = string.IsNullOrEmpty(PbCache.collect.carno) ? temporaryCarNo : PbCache.collect.carno;
|
|
|
+ meterWorkScheduledHelp1.helpContent = "车号:" + (string.IsNullOrEmpty(temporaryCarNo) ? "未识别" : temporaryCarNo) +";重量:" + wgt + ";提示信息:" + temporaryResult;
|
|
|
+ meterWorkScheduledHelp1.warmType = "4";
|
|
|
+ meterWorkScheduledHelp1.warmTypeName = "计量数据统计";
|
|
|
+ meterWorkScheduledHelpService.add(meterWorkScheduledHelp1);
|
|
|
//初始化一些线程及数据,并关闭该界面
|
|
|
if (PbCache.collect != null && !string.IsNullOrEmpty(PbCache.collect.carno))
|
|
|
{
|
|
|
@@ -2024,19 +2110,6 @@ namespace CarMeterSystem
|
|
|
timer1.Stop();
|
|
|
timer1.Dispose();
|
|
|
|
|
|
- //
|
|
|
- if (!isMeasureSuccess)
|
|
|
- {
|
|
|
- MeterWorkScheduledHelp meterWorkScheduledHelp = new MeterWorkScheduledHelp();
|
|
|
- meterWorkScheduledHelp.baseSpotNo = PbCache.sportInfo.baseSpotNo;
|
|
|
- meterWorkScheduledHelp.baseSpotName = PbCache.sportInfo.baseSpotName;
|
|
|
- meterWorkScheduledHelp.carNo = PbCache.collect.carno;
|
|
|
- meterWorkScheduledHelp.helpContent = string.Format("车辆未保存重量,重量为{0}t", Math.Round((PbCache.lockWgt / 1000), 2));
|
|
|
- meterWorkScheduledHelp.warnType = "2";
|
|
|
- meterWorkScheduledHelp.warnTypeName = "智能终端报警";
|
|
|
- meterWorkScheduledHelpService.add(meterWorkScheduledHelp);
|
|
|
- }
|
|
|
-
|
|
|
#region 清理一次监控表的几个数值,防止上车速度过快导致提示称重完成
|
|
|
|
|
|
//RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo, isOverWgt = "" });
|
|
|
@@ -2062,6 +2135,7 @@ namespace CarMeterSystem
|
|
|
photoCar = "",
|
|
|
scanCar = "",
|
|
|
editCar = "",
|
|
|
+ zeroState = "0",
|
|
|
carErr = "0",
|
|
|
wgtErr = "0",
|
|
|
stopOverTime = "0",
|
|
|
@@ -2197,7 +2271,10 @@ namespace CarMeterSystem
|
|
|
voiceContent = "车辆在黑名单中";//未选择称重类型,请选择后开始计量
|
|
|
break;
|
|
|
case 23:
|
|
|
- voiceContent = "毛重接近历史皮重";//未选择称重类型,请选择后开始计量
|
|
|
+ voiceContent = "毛重接近历史皮重";//未选择称重类型,请选择后开始计量计量成功,存在多条未结净一次数据,请联系计量大厅
|
|
|
+ break;
|
|
|
+ case 24:
|
|
|
+ voiceContent = "计量成功,存在多条未结净一次数据,请联系计量大厅";//计量成功,存在多条未结净一次数据,请联系计量大厅
|
|
|
break;
|
|
|
}
|
|
|
|