Browse Source

生产、委外退料

master
lixh 3 years ago
parent
commit
2d8c736a14
  1. 6
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs

6
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs

@ -438,7 +438,7 @@ namespace ICSSoft.DataProject
{ {
#region ERP #region ERP
string sql = string.Empty; string sql = string.Empty;
if (TransType == TransTypeEnum.MOIssueDocNegative.GetDescription())
if (TransType == TransTypeEnum.ICSOutsourcingIssueDoNegative.GetDescription())
{ {
sql = @"SELECT y.DepCode+a.ToWarehouseCode+y.OOCode+a.MUSER AS Costre,y.DepCode,a.ToWarehouseCode AS WarehouseCode,y.OOCode,a.MUSER,ROW_NUMBER() OVER (ORDER BY y.DepCode,a.ToWarehouseCode,y.OOCode,c.SourceDetailID,a.InvCode) AS Sequence, sql = @"SELECT y.DepCode+a.ToWarehouseCode+y.OOCode+a.MUSER AS Costre,y.DepCode,a.ToWarehouseCode AS WarehouseCode,y.OOCode,a.MUSER,ROW_NUMBER() OVER (ORDER BY y.DepCode,a.ToWarehouseCode,y.OOCode,c.SourceDetailID,a.InvCode) AS Sequence,
a.InvCode,SUM(a.Quantity) AS Quantity,0 AS Amount,c.SourceDetailID,Enable AS UpdateTodoQuantity a.InvCode,SUM(a.Quantity) AS Quantity,0 AS Amount,c.SourceDetailID,Enable AS UpdateTodoQuantity
@ -457,7 +457,7 @@ namespace ICSSoft.DataProject
DROP TABLE #TempERP"; DROP TABLE #TempERP";
} }
else if (TransType == TransTypeEnum.MOIssueDocNegativeApply.GetDescription())
else if (TransType == TransTypeEnum.ICSOutsourcingIssueDoNegativeApply.GetDescription())
{ {
sql = @"SELECT a.ToWarehouseCode+z.ApplyCode+a.MUSER AS Costre,'' AS DepCode,a.ToWarehouseCode AS WarehouseCode,z.ApplyCode,a.MUSER,ROW_NUMBER() OVER (ORDER BY a.ToWarehouseCode,z.ApplyCode,c.SourceDetailID,a.InvCode) AS Sequence, sql = @"SELECT a.ToWarehouseCode+z.ApplyCode+a.MUSER AS Costre,'' AS DepCode,a.ToWarehouseCode AS WarehouseCode,z.ApplyCode,a.MUSER,ROW_NUMBER() OVER (ORDER BY a.ToWarehouseCode,z.ApplyCode,c.SourceDetailID,a.InvCode) AS Sequence,
a.InvCode,SUM(a.Quantity) AS Quantity,0 AS Amount,c.SourceDetailID,Enable AS UpdateTodoQuantity a.InvCode,SUM(a.Quantity) AS Quantity,0 AS Amount,c.SourceDetailID,Enable AS UpdateTodoQuantity
@ -475,7 +475,7 @@ namespace ICSSoft.DataProject
DROP TABLE #TempERP"; DROP TABLE #TempERP";
} }
else if (TransType == TransTypeEnum.MOIssueDocNegativeIssue.GetDescription())
else if (TransType == TransTypeEnum.ICSOutsourcingIssueDoNegativeIssue.GetDescription())
{ {
sql = @"SELECT ISNULL(y.DepCode, '')+a.ToWarehouseCode+ISNULL(y.OOCode, z.ApplyCode)+a.MUSER AS Costre,ISNULL(y.DepCode, '') AS DepCode,a.ToWarehouseCode AS WarehouseCode,CASE WHEN m.PickID IS NOT NULL THEN '生产订单' WHEN m.ApplyDetailID IS NOT NULL THEN '领料申请单' ELSE '' END AS SourceType,ISNULL(y.OOCode, z.ApplyCode) AS OOCode,a.MUSER,ROW_NUMBER() OVER (ORDER BY ISNULL(y.DepCode, ''),a.ToWarehouseCode,ISNULL(y.OOCode, z.ApplyCode),a.InvCode) AS Sequence, sql = @"SELECT ISNULL(y.DepCode, '')+a.ToWarehouseCode+ISNULL(y.OOCode, z.ApplyCode)+a.MUSER AS Costre,ISNULL(y.DepCode, '') AS DepCode,a.ToWarehouseCode AS WarehouseCode,CASE WHEN m.PickID IS NOT NULL THEN '生产订单' WHEN m.ApplyDetailID IS NOT NULL THEN '领料申请单' ELSE '' END AS SourceType,ISNULL(y.OOCode, z.ApplyCode) AS OOCode,a.MUSER,ROW_NUMBER() OVER (ORDER BY ISNULL(y.DepCode, ''),a.ToWarehouseCode,ISNULL(y.OOCode, z.ApplyCode),a.InvCode) AS Sequence,
a.InvCode,SUM(a.Quantity) AS Quantity,0 AS Amount,ISNULL(x.PickID, z.ApplyDetailID) AS SourceDetailID,Enable AS UpdateTodoQuantity a.InvCode,SUM(a.Quantity) AS Quantity,0 AS Amount,ISNULL(x.PickID, z.ApplyDetailID) AS SourceDetailID,Enable AS UpdateTodoQuantity

Loading…
Cancel
Save