|
|
|
@ -263,23 +263,11 @@ 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.End==true && a.Start==false)
|
|
|
|
|
if (a.Start == true && a.End == false)
|
|
|
|
|
{
|
|
|
|
|
SuSong su = FreeDb.FreeSqlUnit.Instance.
|
|
|
|
|
Queryable<SuSong>().Where(s => s.No == no)
|
|
|
|
@ -290,19 +278,33 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
|
|
|
|
|
{
|
|
|
|
|
FreeDb.FreeSqlUnit.Instance.Update<SuSong>()
|
|
|
|
|
.Set(x => x.UpdateTime, DateTime.Now)
|
|
|
|
|
.Set(x=>x.EndInfo==1)
|
|
|
|
|
.Set(x=>x.Start,0)
|
|
|
|
|
.Set(x=>x.Number==entity.number)
|
|
|
|
|
.Set(x => x.Destination, a.Get())
|
|
|
|
|
.Set(x=>x.Remark=="结束")
|
|
|
|
|
.Set(x => x.Number == entity.number)
|
|
|
|
|
.Set(x => x.Remark == "运行中")
|
|
|
|
|
.Where(x => x.Id == su.Id).ExecuteUpdated();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//结束
|
|
|
|
|
|
|
|
|
|
if (a.End==true && a.Start==true)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (no == 1)
|
|
|
|
|
{
|
|
|
|
|
Db2101HelperWriter.WriterLinAStart(false);
|
|
|
|
|
Db2101HelperWriter.WriterLinAEnd(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(a.Start==true && a.End == false)
|
|
|
|
|
if (no == 2)
|
|
|
|
|
{
|
|
|
|
|
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)
|
|
|
|
@ -312,13 +314,19 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
|
|
|
|
|
{
|
|
|
|
|
FreeDb.FreeSqlUnit.Instance.Update<SuSong>()
|
|
|
|
|
.Set(x=>x.UpdateTime,DateTime.Now)
|
|
|
|
|
.Set(x=>x.Destination, a.Get())
|
|
|
|
|
.Set(x=>x.EndInfo==1)
|
|
|
|
|
.Set(x=>x.Start,0)
|
|
|
|
|
.Set(x=>x.Number==entity.number)
|
|
|
|
|
.Set(x => x.Remark == "运行中")
|
|
|
|
|
.Set(x=>x.Destination,a.Get())
|
|
|
|
|
.Set(x=>x.Remark=="结束")
|
|
|
|
|
.Where(x=>x.Id==su.Id).ExecuteUpdated();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|