diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs index 943fbfb..f85edaf 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs @@ -517,9 +517,11 @@ namespace ICSSoft.DataProject #endregion #region 领料后料架解绑或搬运至空料架区 - string chksql = @" select A.ContainerCode,A.EATTRIBUTE5,B.Desks from ICSContainerReceiptsNumber A + string chksql = @" select A.ContainerCode,A.EATTRIBUTE5,C.Desks from ICSContainerReceiptsNumber A INNER JOIN ICSMOApply B ON B.ApplyCode=A.TransCode - where ContainerCode=( + INNER JOIN (SELECT TOP 1 EATTRIBUTE3 AS Desks,ContainerCode from ICSAGVTaskLog WHERE EATTRIBUTE2='已完成' Order By MTIME DESC) C ON + C.ContainerCode=A.ContainerCode + where A.ContainerCode=( select top 1 ContainerCode from ICSContainerReceiptsNumber where TransCode='{0}')"; chksql = string.Format(chksql, TransCode); diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index eb7a5cf..e78deb1 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -7593,9 +7593,9 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer { if (JsonData.taskCode.Contains("CK")) { - logsql = @"update ICSAGVTaskLog set MTIME=GETDATE(),EATTRIBUTE2='已完成' + logsql = @"update ICSAGVTaskLog set MTIME=GETDATE(),EATTRIBUTE2='已完成',EATTRIBUTE3='{1}' WHERE TaskCode='{0}'"; - logsql = string.Format(logsql, JsonData.taskCode); + logsql = string.Format(logsql, JsonData.taskCode, JsonData.taskCode); DBHelper.ExecuteNonQuery(connString, CommandType.Text, logsql); } else