dep_deliver
杨威 5 months ago
parent ad3149a954
commit 9b2b574c64

@ -247,25 +247,7 @@ 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)
{ {
@ -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)
{ {

Loading…
Cancel
Save