From 8e8d7507b2c894900e0cb9b4f236d16e6934589c Mon Sep 17 00:00:00 2001 From: wangsr Date: Sat, 14 Oct 2023 22:43:05 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E4=BF=AE=E6=94=B9=E9=BB=91?= =?UTF-8?q?=E7=B2=89=E7=BB=9F=E8=AE=A1=E7=8F=AD=E6=AC=A1=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs | 16 ++++++++-------- .../ManualControl/ManualControlAction.cs | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs index 085fffb..72acc1f 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs @@ -145,13 +145,13 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo //如果大于当天8点 就展示当天的白班 否则展示上一个白班 if (nowTime >= DateTime.Now.Date.AddHours(8)) { - starttime = DateTime.Now.Date.AddHours(8); - endtime = DateTime.Now.Date.AddHours(20); + starttime = DateTime.Now.Date.AddHours(7).AddMinutes(30); + endtime = DateTime.Now.Date.AddHours(19).AddMinutes(30); } else { - starttime = DateTime.Now.Date.AddHours(-16); - endtime = DateTime.Now.Date.AddHours(-4); + starttime = DateTime.Now.Date.AddHours(-17).AddMinutes(30); + endtime = DateTime.Now.Date.AddHours(-5).AddMinutes(30); } list = FreeSqlUnit.Instance.Select().Where(x => (x.CreateTime >= starttime && x.CreateTime <= endtime)).ToList(); @@ -171,13 +171,13 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo //如果小于当天20点 就展示当天的前一个晚班 if (nowTime <= DateTime.Now.Date.AddHours(20)) { - starttime = DateTime.Now.Date.AddHours(-4); - endtime = DateTime.Now.Date.AddHours(8); + starttime = DateTime.Now.Date.AddHours(-5).AddMinutes(30); + endtime = DateTime.Now.Date.AddHours(7).AddMinutes(30); } else { - starttime = DateTime.Now.Date.AddHours(20); - endtime = DateTime.Now.Date.AddHours(32); + starttime = DateTime.Now.Date.AddHours(19).AddMinutes(30); + endtime = DateTime.Now.Date.AddHours(31).AddMinutes(30); } list = FreeSqlUnit.Instance.Select().Where(x => (x.CreateTime >= starttime && x.CreateTime <= endtime)).ToList(); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs index b92b592..3147da8 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs @@ -127,6 +127,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl MCButton LoadSetting; #endregion + DbMCControl materialGridControl; //keywords @@ -1159,6 +1160,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl ManualLogControl("配置已加载 "); } } + private void PlcControl(string address, short binNo) { PlcConnect.Instance.Write(address, binNo);