From b8cd7b6801d288653f1b07c9611998b0b4b82def Mon Sep 17 00:00:00 2001 From: lilili Date: Wed, 20 Sep 2023 16:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=94=B6=E6=96=99=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSManufactureService.cs | 53 +++++++++++-------- .../ICSSoft.DataProject/ICSSubmitService.cs | 2 +- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs index 8b69ff1..78b4ee3 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs @@ -200,37 +200,46 @@ namespace ICSSoft.DataProject /// /// /// - public static void MOApply(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language) + public static void MOApply(string TransCode, string TransSequence, string Quantity, string WorkPoint,string userCode, SqlCommand cmd, Dictionary language) { try { - string sql = @"DECLARE @Status VARCHAR(10) - SELECT @Status=a.Status FROM ICSMOApply a - WHERE a.ApplyCode='{0}' AND a.Sequence='{3}' AND a.WorkPoint='{1}' + //string sql = @"DECLARE @Status VARCHAR(10) + // SELECT @Status=a.Status FROM ICSMOApply a + // WHERE a.ApplyCode='{0}' AND a.Sequence='{3}' AND a.WorkPoint='{1}' - IF (@Status IS NULL) - BEGIN - RAISERROR('" + language.GetNameByCode("WMSAPIInfo128") + @"',16,1); - RETURN - END - ELSE IF (@Status!='2') - BEGIN - RAISERROR('" + language.GetNameByCode("WMSAPIInfo129") + @"',16,1); - RETURN - END - UPDATE a SET IssueQuantity=ISNULL(IssueQuantity,0)+'{2}' - FROM ICSMOApply a - WHERE a.ApplyCode='{0}' AND a.Sequence='{3}' AND a.WorkPoint='{1}' + // IF (@Status IS NULL) + // BEGIN + // RAISERROR('" + language.GetNameByCode("WMSAPIInfo128") + @"',16,1); + // RETURN + // END + // ELSE IF (@Status!='2') + // BEGIN + // RAISERROR('" + language.GetNameByCode("WMSAPIInfo129") + @"',16,1); + // RETURN + // END + // UPDATE a SET IssueQuantity=ISNULL(IssueQuantity,0)+'{2}' + // FROM ICSMOApply a + // WHERE a.ApplyCode='{0}' AND a.Sequence='{3}' AND a.WorkPoint='{1}' + + // IF EXISTS(SELECT a.ID FROM ICSMOApply a + // WHERE a.ApplyCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity(); //更新源头单据数量 - ICSManufactureService.MOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); + ICSManufactureService.MOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint,item.User, cmd, language); foreach (var itemInfo in item.detail) {