缩短报表的时间

dep
我叫锄头 11 months ago
parent b34227e2dd
commit 0a51acac3a

@ -55,8 +55,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
Dictionary<int, int> WetStatus = new Dictionary<int, int>(); Dictionary<int, int> WetStatus = new Dictionary<int, int>();
//读取报表
ushort ReadFlag = 0;
//DataTable ParametersWithPCTable = new DataTable(); //DataTable ParametersWithPCTable = new DataTable();
@ -236,8 +235,6 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
if (conCurrentCache.Count == 0) if (conCurrentCache.Count == 0)
{ {
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
conCurrentCache.TryAdd("plc", DateTime.Now); conCurrentCache.TryAdd("plc", DateTime.Now);
@ -260,8 +257,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
conCurrentCache.Clear(); conCurrentCache.Clear();
stopwatch.Stop();
var send = stopwatch.ElapsedMilliseconds;
} }
} }
@ -283,7 +279,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
} }
no += 1; no += 1;
if (no > 5) if (no > 2)
{ {
no = 0; no = 0;
Timer1_Tick(); Timer1_Tick();
@ -292,9 +288,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
if (UserJudge.IsNormalUser()) if (UserJudge.IsNormalUser())
{ {
ReportReadDb.ReadFeededDry();
ReportReadDb.ReadReport(); ReportReadDb.ReadReport();
} }
} }
catch (Exception) catch (Exception)
{ {
@ -317,20 +316,8 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
ControlsHelper.SetMCLabel(LabelE.LineKind7, dict[7]); ControlsHelper.SetMCLabel(LabelE.LineKind7, dict[7]);
ControlsHelper.SetMCLabel(LabelE.LineKind8, dict[8]); ControlsHelper.SetMCLabel(LabelE.LineKind8, dict[8]);
} }
ReadFlag += 1;
if (ReadFlag >= 20)
{
ReadFlag = 0;
if (UserJudge.IsNormalUser())
{
ReportReadDb.ReadFeededDry();
}
}
var reachSingle = RgvPlcUtil.GetRGVAllError(); var reachSingle = RgvPlcUtil.GetRGVAllError();
var mixSingle = Db3000Helper.ReadDb(); var mixSingle = Db3000Helper.ReadDb();

Loading…
Cancel
Save