|
|
|
@ -263,25 +263,49 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
|
|
|
|
|
data.Remark = "开始";
|
|
|
|
|
|
|
|
|
|
FreeDb.FreeSqlUnit.Instance.Insert(data).ExecuteAffrows();
|
|
|
|
|
//if (no == 1)
|
|
|
|
|
//{
|
|
|
|
|
// Db2101HelperWriter.WriterLinAStart(false);
|
|
|
|
|
//}
|
|
|
|
|
//if (no == 2)
|
|
|
|
|
//{
|
|
|
|
|
// Db2101HelperWriter.WriterLinBStart(false);
|
|
|
|
|
//}
|
|
|
|
|
//if (no == 3)
|
|
|
|
|
//{
|
|
|
|
|
// Db2101HelperWriter.WriterLinCStart(false);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (a.Start == true && a.End == false)
|
|
|
|
|
{
|
|
|
|
|
SuSong su = FreeDb.FreeSqlUnit.Instance.
|
|
|
|
|
Queryable<SuSong>().Where(s => s.No == no)
|
|
|
|
|
.Where(x => x.Start == 1)
|
|
|
|
|
.Where(s => s.EndInfo == 0).OrderByDescending(s => s.CreateTime).First();
|
|
|
|
|
|
|
|
|
|
if (su != null)
|
|
|
|
|
{
|
|
|
|
|
FreeDb.FreeSqlUnit.Instance.Update<SuSong>()
|
|
|
|
|
.Set(x => x.UpdateTime, DateTime.Now)
|
|
|
|
|
.Set(x => x.Destination, a.Get())
|
|
|
|
|
.Set(x => x.Number == entity.number)
|
|
|
|
|
.Set(x => x.Remark == "运行中")
|
|
|
|
|
.Where(x => x.Id == su.Id).ExecuteUpdated();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//结束
|
|
|
|
|
|
|
|
|
|
if (a.End==true && a.Start==false)
|
|
|
|
|
if (a.End==true && a.Start==true)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (no == 1)
|
|
|
|
|
{
|
|
|
|
|
Db2101HelperWriter.WriterLinAStart(false);
|
|
|
|
|
Db2101HelperWriter.WriterLinAEnd(false);
|
|
|
|
|
}
|
|
|
|
|
if (no == 2)
|
|
|
|
|
{
|
|
|
|
|
SuSong su=FreeDb.FreeSqlUnit.Instance.
|
|
|
|
|
Db2101HelperWriter.WriterLinBStart(false);
|
|
|
|
|
Db2101HelperWriter.WriterLinBEnd(false);
|
|
|
|
|
}
|
|
|
|
|
if (no == 3)
|
|
|
|
|
{
|
|
|
|
|
Db2101HelperWriter.WriterLinCStart(false);
|
|
|
|
|
Db2101HelperWriter.WriterLinCEnd(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SuSong su =FreeDb.FreeSqlUnit.Instance.
|
|
|
|
|
Queryable<SuSong>().Where(s => s.No == no)
|
|
|
|
|
.Where(x=>x.Start==1)
|
|
|
|
|
.Where(s => s.EndInfo==0).OrderByDescending(s => s.CreateTime).First();
|
|
|
|
@ -301,23 +325,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(a.Start==true && a.End == false)
|
|
|
|
|
{
|
|
|
|
|
SuSong su = FreeDb.FreeSqlUnit.Instance.
|
|
|
|
|
Queryable<SuSong>().Where(s => s.No == no)
|
|
|
|
|
.Where(x => x.Start == 1)
|
|
|
|
|
.Where(s => s.EndInfo == 0).OrderByDescending(s => s.CreateTime).First();
|
|
|
|
|
|
|
|
|
|
if (su != null)
|
|
|
|
|
{
|
|
|
|
|
FreeDb.FreeSqlUnit.Instance.Update<SuSong>()
|
|
|
|
|
.Set(x=>x.UpdateTime,DateTime.Now)
|
|
|
|
|
.Set(x=>x.Destination, a.Get())
|
|
|
|
|
.Set(x=>x.Number==entity.number)
|
|
|
|
|
.Set(x => x.Remark == "运行中")
|
|
|
|
|
.Where(x=>x.Id==su.Id).ExecuteUpdated();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|