From e87c16d93c6b27702a61f182679a37b587034b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AD=A3=E4=BC=9F?= <1063165173@qq.com> Date: Wed, 28 Sep 2022 11:44:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=86=99=E9=80=BB=E8=BE=91=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSSubmitService.cs | 8 ++-- .../ICSWareHouseLotInfoService.cs | 40 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 9e23b9d..05b0f77 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -687,8 +687,8 @@ namespace ICSSoft.DataProject #region 判断是否启用匹配库位 string sqlCheckSign = @"select F_EnabledMark from Sys_SRM_Items where F_EnCode = 'OutWithLocationCode'and F_EnabledMark = '1'"; DataTable flag = DBHelper.SQlReturnData(sqlCheckSign, cmd); - //if (flag != null && flag.Rows.Count > 0) - if (true) + if (flag != null && flag.Rows.Count > 0) + //if (true) { sql = @"select * into #maintemp from (" + sql + @")a select * into #resulttemp from #maintemp @@ -807,9 +807,9 @@ namespace ICSSoft.DataProject select id,TransCode,DetailID,Type,TransSequence,IssueQuantity,Quantity, - [User],[MTime],InvCode,InvName,InvStd,InvUnit,WHCode,ToWarehouseCode,LocationCode,sum(LocationQty)as LocationQty,isMatched,AmountUnit,lotno, + [User],[MTime],InvCode,InvName,InvStd,InvUnit,WHCode,ToWarehouseCode,LocationCode,sum(LocationQty)as LocationQty,isMatched,AmountUnit,--lotno, WHName,ExtensionID,ProjectCode,BatchCode, Version,Brand,cFree1,cFree2,cFree3,cFree4,cFree5,cFree6,cFree7,cFree8,cFree9,cFree10 from #resulttemp GROUP BY id,TransCode,DetailID,Type,TransSequence,IssueQuantity,Quantity, - [User],[MTime],InvCode,InvName,InvStd,InvUnit,WHCode,ToWarehouseCode,LocationCode,isMatched,AmountUnit,lotno, + [User],[MTime],InvCode,InvName,InvStd,InvUnit,WHCode,ToWarehouseCode,LocationCode,isMatched,AmountUnit,--lotno, WHName,ExtensionID,ProjectCode,BatchCode, Version,Brand,cFree1,cFree2,cFree3,cFree4,cFree5,cFree6,cFree7,cFree8,cFree9,cFree10 ORDER BY locationcode ASC ,InvCode ASC diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index 353b5a2..999a4b4 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -1679,7 +1679,7 @@ namespace ICSSoft.DataProject WHERE c.PODetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.towarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.towarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -1699,7 +1699,7 @@ namespace ICSSoft.DataProject WHERE c.DNDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.towarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.towarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -1725,7 +1725,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.ODNDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; @@ -1753,7 +1753,7 @@ namespace ICSSoft.DataProject WHERE c.DNDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND c.DNType='2' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -1772,7 +1772,7 @@ namespace ICSSoft.DataProject WHERE x.PickID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -1794,7 +1794,7 @@ namespace ICSSoft.DataProject LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE ISNULL(m.ApplyDetailID,ISNULL(m.PickID, c.SourceDetailID))='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' --根据原条码退料-备料表 @@ -1809,7 +1809,7 @@ namespace ICSSoft.DataProject LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE x.PickID='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' --根据原条码退料-申请单 @@ -1822,7 +1822,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE z.ApplyDetailID='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' --根据原条码退料-材料出库单 @@ -1839,7 +1839,7 @@ namespace ICSSoft.DataProject LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE ISNULL(m.ApplyDetailID, m.PickID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -1857,7 +1857,7 @@ namespace ICSSoft.DataProject LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.OODetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -1872,7 +1872,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.ODNDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND c.ODNType='2' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; @@ -1889,7 +1889,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE x.PickID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -1961,7 +1961,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.SDNDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND c.Type='1' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; @@ -1977,7 +1977,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.SDNDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND c.Type='2' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -1995,7 +1995,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE d.PickID='{3}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; @@ -2049,7 +2049,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.SDNDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND c.Type='2' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -2100,7 +2100,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.ApplyDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -2117,7 +2117,7 @@ namespace ICSSoft.DataProject LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.ApplyDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -2168,7 +2168,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.BrrowDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.fromwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.fromwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; } @@ -2184,7 +2184,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSInventory inv ON a.InvCode=inv.InvCode AND a.WorkPoint=inv.WorkPoint LEFT JOIN ICSInventoryBatchEnable invBat ON a.InvCode=invBat.InvCode AND a.FromWarehouseCode=invBat.WHCode AND a.WorkPoint=invBat.WorkPoint WHERE c.ReturnDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' AND (a.BusinessCode <> '31' and a.BusinessCode <> '32') - and (ISNULL(a.tohwarehousecode, '') + (ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + ISNULL(ext.Version, '') + ISNULL(ext.Brand, '') + + and (ISNULL(a.tohwarehousecode, '') + ISNULL(ext.ProjectCode, '') + CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END + 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, ''))='{6}' "; }