From b8cd7b6801d288653f1b07c9611998b0b4b82def Mon Sep 17 00:00:00 2001 From: lilili Date: Wed, 20 Sep 2023 16:03:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=94=B6=E6=96=99?= =?UTF-8?q?=E4=BA=BA=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) { From 6607e57bae8d06d1ad42e6491159338b5a32a3f2 Mon Sep 17 00:00:00 2001 From: lilili Date: Wed, 20 Sep 2023 16:47:56 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Revert=20"=E8=B0=83=E6=95=B4=E6=94=B6?= =?UTF-8?q?=E6=96=99=E4=BA=BA=E4=BF=A1=E6=81=AF"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b8cd7b6801d288653f1b07c9611998b0b4b82def. --- .../ICSManufactureService.cs | 53 ++++++++----------- .../ICSSoft.DataProject/ICSSubmitService.cs | 2 +- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs index 78b4ee3..8b69ff1 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs @@ -200,46 +200,37 @@ namespace ICSSoft.DataProject /// /// /// - public static void MOApply(string TransCode, string TransSequence, string Quantity, string WorkPoint,string userCode, SqlCommand cmd, Dictionary language) + public static void MOApply(string TransCode, string TransSequence, string Quantity, string WorkPoint, 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}' - - // 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,item.User, cmd, language); + ICSManufactureService.MOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { From 61d596a2f8106cdfbd947fdef764d323ffd08da3 Mon Sep 17 00:00:00 2001 From: lilili Date: Thu, 21 Sep 2023 09:47:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8B=A3=E6=96=99?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WMS-BS/NFine.Application/WMS/PickMaterialApp.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index ec8f6e7..118e3af 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -121,7 +121,7 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'"; a.ApplyCode as Code,CONVERT(varchar(100),a.CreateDateTime,23) as MTIME,a.createperson as MUSER,a.WHCode,detail.LocationCode AS Area, a.EATTRIBUTE,a.Sets,a.OrderInvCode,a.OrderInvDescribe,a.BillType,a.Remarks,a.Desks,a.DispatchNumber,a.DispatcherName, - a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.Unit,a.StockIndicator, + a.ReceiverNumber,case when a.MUSERName = 'JOB' then a.ReceiverName else n.F_RealName end as ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.Unit,a.StockIndicator, case when max(e.SourceID) is null then '未合并' else '已合并' end as IsNew,f.Colspan , g.Status, ISNULL(p.PrintCount, 0) as PrintCount, case when max(k.TransCode) is null then '未占料' else '已占料' end as IsOccupy, @@ -135,6 +135,7 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'"; LEFT JOIN ICSPrintCount p ON a.APPlyCode=p.TransCode LEFT JOIN ICSInventoryDetail detail ON b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint + left join Sys_SRM_User n ON n.F_Account=a.MUSERName left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint left join (SELECT ApplyCode, case when sum(Quantity) =sum(IssueQuantity) and MUSERName != 'JOB' then '已过账' @@ -186,7 +187,7 @@ left join Sys_SRM_ItemsDetail j on j.F_Define3='HGAreaConfig' AND j.F_Define1=a f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,g.Status, a.WHCode,detail.LocationCode,a.EATTRIBUTE,a.Sets,a.OrderInvCode,a.OrderInvDescribe,a.BillType,a.Remarks,a.Desks,a.DispatchNumber,a.DispatcherName, - a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.Unit,a.StockIndicator,a.MUSERName,a.MUSER,p.PrintCount) as t where t.row=1"); + a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.Unit,a.StockIndicator,a.MUSERName,a.MUSER,p.PrintCount,n.F_RealName) as t where t.row=1"); if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString())) {