Browse Source

盘点,拒收单

master
冒林杰 2 years ago
parent
commit
aa0437fa0a
  1. 8
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs
  2. 2
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs
  3. 2
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs

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

@ -1219,8 +1219,8 @@ namespace ICSSoft.DataProject
try
{
#region ERP
string sql = @"SELECT a.VenCode+a.DepCode+a.DNCode+a.MUSER AS Costre,a.VenCode,a.DepCode,a.ODNCode AS DNCode,a.MUSER,a.MTIME,
a.Sequence,a.InvCode,Sum(x.Quantity) AS Quantity,a.Amount,ISNULL(a.UnitPrice,0) AS UnitPrice,a.Currency,a.ODNDetailID AS DNDetailID
string sql = @"SELECT a.VenCode+a.DepCode+a.ODNCode+a.MUSER AS Costre,a.VenCode,a.DepCode,a.ODNCode,a.MUSER,a.MTIME,
a.Sequence,a.InvCode,Sum(x.Quantity) AS Quantity,a.Amount,ISNULL(a.UnitPrice,0) AS UnitPrice,a.Currency,a.ODNDetailID
,a.WorkPoint,ISNULL(ext.ProjectCode, '') AS ProjectCode,CASE WHEN ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END AS BatchCode,ISNULL(ext.Version, '') AS Version,ISNULL(ext.Brand, '') AS Brand,
ISNULL(ext.cFree1, '') AS cFree1,ISNULL(ext.cFree2, '') AS cFree2,ISNULL(ext.cFree3, '') AS cFree3,ISNULL(ext.cFree4, '') AS cFree4,ISNULL(ext.cFree5, '') AS cFree5,ISNULL(ext.cFree6, '') AS cFree6,ISNULL(ext.cFree7, '') AS cFree7,ISNULL(ext.cFree8, '') AS cFree8,ISNULL(ext.cFree9, '') AS cFree9,ISNULL(ext.cFree10, '') AS cFree10
INTO #TempERP
@ -1233,8 +1233,8 @@ namespace ICSSoft.DataProject
a.WorkPoint,ISNULL(ext.ProjectCode, ''),ISNULL(invBat.BatchEnable, ''),ISNULL(ext.BatchCode, ''),ISNULL(ext.Version, ''),ISNULL(ext.Brand, ''),
ISNULL(ext.cFree1, ''),ISNULL(ext.cFree2, ''),ISNULL(ext.cFree3, ''),ISNULL(ext.cFree4, ''),ISNULL(ext.cFree5, ''),ISNULL(ext.cFree6, ''),ISNULL(ext.cFree7, ''),ISNULL(ext.cFree8, ''),ISNULL(ext.cFree9, ''),ISNULL(ext.cFree10, '')
SELECT DISTINCT Costre,WorkPoint,VenCode,DepCode,DNCode,MUSER AS [User],SYSDATETIME() AS MTime FROM #TempERP
SELECT Costre,Sequence,InvCode,Quantity,Amount,UnitPrice,Currency,DNDetailID,ProjectCode,BatchCode,Version,Brand,cFree1,cFree2,cFree3,cFree4,cFree5,cFree6,cFree7,cFree8,cFree9,cFree10
SELECT DISTINCT Costre,WorkPoint,VenCode,DepCode,ODNCode,MUSER AS [User],SYSDATETIME() AS MTime FROM #TempERP
SELECT Costre,Sequence,InvCode,Quantity,Amount,UnitPrice,Currency,ODNDetailID,ProjectCode,BatchCode,Version,Brand,cFree1,cFree2,cFree3,cFree4,cFree5,cFree6,cFree7,cFree8,cFree9,cFree10
FROM #TempERP
DROP TABLE #TempERP";

2
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs

@ -503,7 +503,7 @@ namespace ICSSoft.DataProject
FROM ICSDeliveryNotice a
INNER JOIN ICSExtension ext ON a.ExtensionID=ext.ID AND a.WorkPoint=ext.WorkPoint
INNER JOIN ICSInventory invBat ON a.InvCode=invBat.InvCode AND a.WorkPoint=invBat.WorkPoint
INNER JOIN ICSDeliveryNotice x ON a.DNDetailID=x.PODetailID AND a.Sequence=x.Sequence AND a.WorkPoint=x.WorkPoint
INNER JOIN ICSDeliveryNotice x ON a.DNDetailID=x.PODetailID AND a.WorkPoint=x.WorkPoint
WHERE a.DNCode='{0}' AND a.WorkPoint='{1}'
GROUP BY a.VenCode,a.DepCode,a.DNCode,a.MUSER,a.MTIME,a.Sequence,a.InvCode,a.Amount,a.Quantity,a.UnitPrice,a.Currency,a.DNDetailID,
a.WorkPoint,ISNULL(ext.ProjectCode, ''),ISNULL(invBat.BatchEnable, ''),ISNULL(ext.BatchCode, ''),ISNULL(ext.Version, ''),ISNULL(ext.Brand, ''),

2
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs

@ -4945,7 +4945,7 @@ namespace ICSSoft.DataProject
INSERT INTO ICSCheck (ID,CheckCode,SelectLevel,Status,Quantity,Amount,MUSER,MUSERName,MTIME,WorkPoint)
SELECT NEWID(),'{0}','{1}','2',SUM(a.Quantity),0,b.F_Account,b.F_RealName,GETDATE(),b.F_Location
FROM ICSWareHouseLotInfo a
INNER JOIN Sys_SRM_User b ON b.F_Account='{2}' AND b.F_Location='{3}'
INNER JOIN Sys_SRM_User b ON b.F_Account='{2}' AND b.F_Location='{3}'
WHERE SUBSTRING(a.LocationCode,1,{4}) = '{1}'
GROUP BY b.F_Account,b.F_RealName,b.F_Location";
sql = string.Format(sql, Code, itemInfo.SelectLevel, item.User, item.WorkPoint, len);

Loading…
Cancel
Save