change - 修改黑粉统计班次时间

dep_nodyang
wangsr 1 year ago
parent f94f1bf911
commit 8e8d7507b2

@ -145,13 +145,13 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo
//如果大于当天8点 就展示当天的白班 否则展示上一个白班 //如果大于当天8点 就展示当天的白班 否则展示上一个白班
if (nowTime >= DateTime.Now.Date.AddHours(8)) if (nowTime >= DateTime.Now.Date.AddHours(8))
{ {
starttime = DateTime.Now.Date.AddHours(8); starttime = DateTime.Now.Date.AddHours(7).AddMinutes(30);
endtime = DateTime.Now.Date.AddHours(20); endtime = DateTime.Now.Date.AddHours(19).AddMinutes(30);
} }
else else
{ {
starttime = DateTime.Now.Date.AddHours(-16); starttime = DateTime.Now.Date.AddHours(-17).AddMinutes(30);
endtime = DateTime.Now.Date.AddHours(-4); endtime = DateTime.Now.Date.AddHours(-5).AddMinutes(30);
} }
list = FreeSqlUnit.Instance.Select<DayWhiteEmbryoEntity>().Where(x => (x.CreateTime >= starttime && x.CreateTime <= endtime)).ToList(); list = FreeSqlUnit.Instance.Select<DayWhiteEmbryoEntity>().Where(x => (x.CreateTime >= starttime && x.CreateTime <= endtime)).ToList();
@ -171,13 +171,13 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo
//如果小于当天20点 就展示当天的前一个晚班 //如果小于当天20点 就展示当天的前一个晚班
if (nowTime <= DateTime.Now.Date.AddHours(20)) if (nowTime <= DateTime.Now.Date.AddHours(20))
{ {
starttime = DateTime.Now.Date.AddHours(-4); starttime = DateTime.Now.Date.AddHours(-5).AddMinutes(30);
endtime = DateTime.Now.Date.AddHours(8); endtime = DateTime.Now.Date.AddHours(7).AddMinutes(30);
} }
else else
{ {
starttime = DateTime.Now.Date.AddHours(20); starttime = DateTime.Now.Date.AddHours(19).AddMinutes(30);
endtime = DateTime.Now.Date.AddHours(32); endtime = DateTime.Now.Date.AddHours(31).AddMinutes(30);
} }
list = FreeSqlUnit.Instance.Select<DayWhiteEmbryoEntity>().Where(x => (x.CreateTime >= starttime && x.CreateTime <= endtime)).ToList(); list = FreeSqlUnit.Instance.Select<DayWhiteEmbryoEntity>().Where(x => (x.CreateTime >= starttime && x.CreateTime <= endtime)).ToList();

@ -127,6 +127,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
MCButton LoadSetting; MCButton LoadSetting;
#endregion #endregion
DbMCControl materialGridControl; DbMCControl materialGridControl;
//keywords //keywords
@ -1159,6 +1160,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
ManualLogControl("配置已加载 "); ManualLogControl("配置已加载 ");
} }
} }
private void PlcControl(string address, short binNo) private void PlcControl(string address, short binNo)
{ {
PlcConnect.Instance.Write(address, binNo); PlcConnect.Instance.Write(address, binNo);

Loading…
Cancel
Save