dep_deliver
杨威 5 months ago
parent d5315db455
commit 239c2fe4b7

@ -228,7 +228,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
if (a.Start) if (a.Start)
{ {
SuSong data = new SuSong(); SuSong data = new SuSong();
data.Start = no; data.Start = 1;
data.No = no; data.No = no;
data.EndInfo = 0; data.EndInfo = 0;
data.UpdateTime = DateTime.Now; data.UpdateTime = DateTime.Now;
@ -260,11 +260,13 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
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)
{ {
FreeDb.FreeSqlUnit.Instance.Update<SuSong>() FreeDb.FreeSqlUnit.Instance.Update<SuSong>()
.Set(x=>x.UpdateTime,DateTime.Now) .Set(x=>x.UpdateTime,DateTime.Now)
.Set(x=>x.EndInfo==1) .Set(x=>x.EndInfo==1)
.Set(x=>x.Number==entity.number)
.Where(x=>x.Id==su.Id).ExecuteUpdated(); .Where(x=>x.Id==su.Id).ExecuteUpdated();
} }

@ -81,9 +81,15 @@ namespace Mesnac.Action.ChemicalWeighing.Su
private void SelectButton_Click(object sender, EventArgs e) private void SelectButton_Click(object sender, EventArgs e)
{ {
throw new NotImplementedException(); Sel();
} }
string[] destinations = new string[] {
"大仓A", "大仓B", "大仓C", "大仓D", "大仓E", "大仓F", "大仓G", "大仓H",
"大仓I", "大仓J", "大仓K", "大仓L", "大仓M", "大仓N", "大仓O", "大仓P",
"大仓Q", "大仓R", "大仓S", "大仓T", "大仓U", "大仓V", "大仓W", "大仓X",
"大仓Y", "大仓Z"
};
private void Sel() private void Sel()
{ {
var a = Convert.ToDateTime(GetA()); var a = Convert.ToDateTime(GetA());
@ -105,11 +111,18 @@ namespace Mesnac.Action.ChemicalWeighing.Su
dt.Columns.Add("目标仓", typeof(string)); dt.Columns.Add("目标仓", typeof(string));
dt.Columns.Add("数量", typeof(string)); dt.Columns.Add("数量", typeof(string));
dt.Columns.Add("时间", typeof(string)); dt.Columns.Add("时间", typeof(string));
dt.Columns.Add("状态", typeof(string));
foreach (var x in list) foreach (var x in list)
{ {
var dr = dt.NewRow(); var dr = dt.NewRow();
dr[0] = x.No;
String aa = "";
if (x.No == 1) aa = "A";
if (x.No == 2) aa = "B";
if (x.No == 3) aa = "C";
dr[0] = "输送线路"+aa;
dr[1] = x.Soure; dr[1] = x.Soure;
dr[2] = x.Model; dr[2] = x.Model;
string shu = ""; string shu = "";
@ -128,9 +141,25 @@ namespace Mesnac.Action.ChemicalWeighing.Su
dr[2] = shu; dr[2] = shu;
dr[3] = x.Destination; dr[3] = x.Destination;
if (x.Destination > 0)
{
string info = destinations[x.Destination - 1];
dr[3] = info;
}
dr[4] = x.Number; dr[4] = x.Number;
dr[5] = Convert.ToDateTime(x.CreateTime).ToString("yyyy-MM-dd hh:mm:ss"); dr[5] = Convert.ToDateTime(x.CreateTime).ToString("yyyy-MM-dd hh:mm:ss");
string state = "结束";
if (x.EndInfo == 0)
{
state = "运行中";
}
dr[6] = state;
dt.Rows.Add(dr); dt.Rows.Add(dr);
} }

Loading…
Cancel
Save