From 9b2b574c642095dc86289094270172c68307a7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=84=E5=A4=B4?= Date: Wed, 19 Jun 2024 12:24:30 +0800 Subject: [PATCH] xfg --- .../LjDeliver/DeliverInitAction.cs | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs index 73f565c..199eb01 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs @@ -247,25 +247,7 @@ 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) { @@ -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().Where(s => s.No == no) + Queryable(). + 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) {