|
|
@ -247,26 +247,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
|
|
|
|
private void Sss(Db2101LinEntity entity,int no)
|
|
|
|
private void Sss(Db2101LinEntity entity,int no)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var a = entity;
|
|
|
|
var a = entity;
|
|
|
|
//开始中
|
|
|
|
|
|
|
|
if (a.Start=true && a.End==false)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SuSong data = new SuSong();
|
|
|
|
|
|
|
|
data.Start = 1;
|
|
|
|
|
|
|
|
data.No = no;
|
|
|
|
|
|
|
|
data.EndInfo = 0;
|
|
|
|
|
|
|
|
data.UpdateTime = DateTime.Now;
|
|
|
|
|
|
|
|
data.CreateTime = DateTime.Now;
|
|
|
|
|
|
|
|
data.Soure = a.Soure;
|
|
|
|
|
|
|
|
data.Model = a.model;
|
|
|
|
|
|
|
|
data.Destination = a.Get();
|
|
|
|
|
|
|
|
data.Number = a.number;
|
|
|
|
|
|
|
|
data.Remark = "开始";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FreeDb.FreeSqlUnit.Instance.Insert(data).ExecuteAffrows();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (a.Start == true && a.End == false)
|
|
|
|
if (a.Start == true && a.End == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SuSong su = FreeDb.FreeSqlUnit.Instance.
|
|
|
|
SuSong su = FreeDb.FreeSqlUnit.Instance.
|
|
|
@ -283,6 +265,22 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
|
|
|
|
.Set(x => x.Remark == "运行中")
|
|
|
|
.Set(x => x.Remark == "运行中")
|
|
|
|
.Where(x => x.Id == su.Id).ExecuteUpdated();
|
|
|
|
.Where(x => x.Id == su.Id).ExecuteUpdated();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SuSong data = new SuSong();
|
|
|
|
|
|
|
|
data.Start = 1;
|
|
|
|
|
|
|
|
data.No = no;
|
|
|
|
|
|
|
|
data.EndInfo = 0;
|
|
|
|
|
|
|
|
data.UpdateTime = DateTime.Now;
|
|
|
|
|
|
|
|
data.CreateTime = DateTime.Now;
|
|
|
|
|
|
|
|
data.Soure = a.Soure;
|
|
|
|
|
|
|
|
data.Model = a.model;
|
|
|
|
|
|
|
|
data.Destination = a.Get();
|
|
|
|
|
|
|
|
data.Number = a.number;
|
|
|
|
|
|
|
|
data.Remark = "开始";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FreeDb.FreeSqlUnit.Instance.Insert(data).ExecuteAffrows();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//结束
|
|
|
|
//结束
|
|
|
|
|
|
|
|
|
|
|
@ -306,9 +304,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SuSong su =FreeDb.FreeSqlUnit.Instance.
|
|
|
|
SuSong su =FreeDb.FreeSqlUnit.Instance.
|
|
|
|
Queryable<SuSong>().Where(s => s.No == no)
|
|
|
|
Queryable<SuSong>().
|
|
|
|
|
|
|
|
Where(s => s.No == no)
|
|
|
|
.Where(x=>x.Start==1)
|
|
|
|
.Where(x=>x.Start==1)
|
|
|
|
.Where(s => s.EndInfo==0).OrderByDescending(s => s.CreateTime).First();
|
|
|
|
.Where(s => s.EndInfo==0).
|
|
|
|
|
|
|
|
OrderByDescending(s => s.CreateTime).First();
|
|
|
|
|
|
|
|
|
|
|
|
if (su != null)
|
|
|
|
if (su != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|