dep_deliver
杨威 5 months ago
parent ad3149a954
commit 9b2b574c64

@ -247,26 +247,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
private void Sss(Db2101LinEntity entity,int no)
{
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)
{
SuSong su = FreeDb.FreeSqlUnit.Instance.
@ -283,6 +265,22 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
.Set(x => x.Remark == "运行中")
.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.
Queryable<SuSong>().Where(s => s.No == no)
Queryable<SuSong>().
Where(s => s.No == no)
.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)
{

Loading…
Cancel
Save