|
@@ -31,6 +31,8 @@ namespace CarMeterSystem
|
|
|
|
|
|
|
|
private Log l = Log.GetInstance();
|
|
private Log l = Log.GetInstance();
|
|
|
|
|
|
|
|
|
|
+ string isWriteWgt = ConfigurationManager.AppSettings["isWriteWgt"]?.ToString();
|
|
|
|
|
+
|
|
|
//内存表
|
|
//内存表
|
|
|
private MemoryTableDataSocket MemoClass = new MemoryTableDataSocket("");
|
|
private MemoryTableDataSocket MemoClass = new MemoryTableDataSocket("");
|
|
|
|
|
|
|
@@ -65,7 +67,7 @@ namespace CarMeterSystem
|
|
|
|
|
|
|
|
private LED_Control led_controler = null;
|
|
private LED_Control led_controler = null;
|
|
|
|
|
|
|
|
- //监控表操作
|
|
|
|
|
|
|
+ //实时重量写入表操作
|
|
|
private MeterMonitorWeightService monitorWeightService = new MeterMonitorWeightService();
|
|
private MeterMonitorWeightService monitorWeightService = new MeterMonitorWeightService();
|
|
|
|
|
|
|
|
private MeterWorkScheduledHelpService meterWorkScheduledHelpService = new MeterWorkScheduledHelpService();
|
|
private MeterWorkScheduledHelpService meterWorkScheduledHelpService = new MeterWorkScheduledHelpService();
|
|
@@ -677,32 +679,36 @@ namespace CarMeterSystem
|
|
|
#region 每隔1秒写入一次重量曲线
|
|
#region 每隔1秒写入一次重量曲线
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
- if (preWgt != e.weight)
|
|
|
|
|
|
|
+ if (isWriteWgt == "0")
|
|
|
{
|
|
{
|
|
|
- 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))
|
|
|
|
|
|
|
+ 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
|
|
|
{
|
|
{
|
|
|
- meterMonitorWeightEventData2.weightNo = sPreNo;
|
|
|
|
|
- meterMonitorWeightEventData2.collectEndTime = DateTime.Now;
|
|
|
|
|
- monitorWeightService.doUpdateWf(meterMonitorWeightEventData2);
|
|
|
|
|
|
|
+ if (!string.IsNullOrEmpty(sPreNo))
|
|
|
|
|
+ {
|
|
|
|
|
+ meterMonitorWeightEventData2.weightNo = sPreNo;
|
|
|
|
|
+ meterMonitorWeightEventData2.collectEndTime = DateTime.Now;
|
|
|
|
|
+ monitorWeightService.doUpdateWf(meterMonitorWeightEventData2);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
catch { }
|
|
catch { }
|
|
|
|
|
+ //*/
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
#region 停留超时
|
|
#region 停留超时
|
|
@@ -954,7 +960,7 @@ namespace CarMeterSystem
|
|
|
meterWorkMonitorEventDataI.photoCar = "";
|
|
meterWorkMonitorEventDataI.photoCar = "";
|
|
|
meterWorkMonitorEventDataI.scanCar = "";
|
|
meterWorkMonitorEventDataI.scanCar = "";
|
|
|
meterWorkMonitorEventDataI.editCar = "";
|
|
meterWorkMonitorEventDataI.editCar = "";
|
|
|
- //meterWorkMonitorEventDataI.zeroState = "0";
|
|
|
|
|
|
|
+ meterWorkMonitorEventDataI.zeroState = "0";
|
|
|
meterWorkMonitorEventDataI.carErr = "0";
|
|
meterWorkMonitorEventDataI.carErr = "0";
|
|
|
meterWorkMonitorEventDataI.ferroalloyResult = "0";
|
|
meterWorkMonitorEventDataI.ferroalloyResult = "0";
|
|
|
meterWorkMonitorEventDataI.wgtErr = "0";
|
|
meterWorkMonitorEventDataI.wgtErr = "0";
|