diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs index 90ec0dc..2b20c4d 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs @@ -605,7 +605,7 @@ namespace ICSSoft.DataProject sql = string.Format(sql, LotNo, WorkPoint, Quantity, table, type); #endregion - } + } else { if (TransType == TransTypeEnum.MOIssueDocNegative.GetDescription()) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 387259f..8617bea 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -673,6 +673,40 @@ namespace ICSSoft.DataProject || TransType == TransTypeEnum.MOIssueDocNegativeApply.GetDescription() || TransType == TransTypeEnum.MOIssueDocNegativeIssue.GetDescription()) { + isDeliveryNotice = true; + columns = @"a.TransCode, + a.DetailID, + -- a.LotNo, + '' AS Type, + a.TransSequence, + a.IssueQuantity, + a.Quantity, + a.Amount, + a.MUSER AS [User], + a.MTIME AS [MTime],"; + + tableName = @" (SELECT + neg.ID AS ID, + neg.ApplyNegCode AS TransCode, + negDetail.ID AS DetailID, + negDetail.ExtensionID, + '' AS Type, + negDetail.Sequence AS TransSequence, + negDetail.IssueNegQuantity AS IssueQuantity, + negDetail.Quantity, + neg.MUSER , + neg.MTIME , + negDetail.InvCode, + negDetail.Amount, + neg.WorkPoint, + negDetail.SourceDetailID AS WHCode + FROM + ICSMOApplyNegDetail negDetail + INNER JOIN ICSMOApplyNeg neg ON neg.ApplyNegCode= negDetail.ApplyNegCode + ) a "; + + where = @" a.TransCode= '{0}' + AND a.WorkPoint= '{1}' "; } #endregion #region 生产入库 @@ -693,6 +727,16 @@ namespace ICSSoft.DataProject #region 销售退货 else if (TransType == TransTypeEnum.SalesShipmentDocNegative.GetDescription()) { + columns = @"a.SDNCode AS TransCode, + '' AS Type, + a.Sequence AS TransSequence, + a.Quantity, + a.Amount, + a.SDNQuantity AS IssueQuantity,"; + + tableName = @"ICSSDN a "; + + where = @" a.SDNCode='{0}' AND a.WorkPoint='{1}' AND Type='2' "; } #endregion #region 两步调入 @@ -727,6 +771,16 @@ namespace ICSSoft.DataProject #region 其他入库 else if (TransType == TransTypeEnum.OtherInDoc.GetDescription()) { + columns = @"a.InCode AS TransCode, + '' AS Type, + a.Sequence AS TransSequence, + a.Quantity, + a.Amount, + a.InQuantity AS IssueQuantity,"; + + tableName = @"ICSOtherIn a "; + + where = @" a.InCode='{0}' AND a.WorkPoint='{1}' AND Type='2' "; } #endregion #region 拆卸单