diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 7c4597f..a2bd1f7 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -32627,10 +32627,16 @@ a.ExtensionID isnull(b.InvCode,'') as InvCode, isnull(b.InvName,'') as InvName, isnull(v.VenName,'') as VenName, - isnull(a.EATTRIBUTE9,'') as MPN + isnull(a.EATTRIBUTE9,'') as MPN, + CASE WHEN (LEN(isnull(c.LotNo,'')) - LEN(REPLACE(isnull(c.LotNo,''), ',', '')))=6 THEN +isnull(b.InvCode,'')+','+isnull(a.EATTRIBUTE8,'')+','+isnull(a.EATTRIBUTE9,'')+','+isnull(a.EATTRIBUTE13,'')+','+isnull(a.EATTRIBUTE10,'')+','+CONVERT(NVARCHAR(20),(CONVERT(DECIMAL(18,0),isnull(d.Quantity,'0')))) +',' +isnull(a.EATTRIBUTE11,'') +WHEN (LEN(isnull(c.LotNo,'')) - LEN(REPLACE(isnull(c.LotNo,''), ',', '')))=7 THEN +isnull(b.InvCode,'')+','+isnull(a.EATTRIBUTE8,'')+','+isnull(a.EATTRIBUTE9,'')+','+isnull(a.EATTRIBUTE13,'')+','+isnull(a.EATTRIBUTE10,'')+',' +isnull(a.EATTRIBUTE11,'') +','+CONVERT(NVARCHAR(20),(CONVERT(DECIMAL(18,0),isnull(d.Quantity,'0')))) +','+isnull(a.EATTRIBUTE12,'') +END as NEWLotNo FROM ICSInventoryLot a INNER JOIN ICSInventory b ON a.InvCode = b.InvCode INNER JOIN ICSWareHouseLotInfo c ON c.LotNo = a.LotNo + INNER JOIN ICSWareHouseLotInfoLog d ON d.LotNo=a.LotNo LEFT JOIN ICSVendor v ON v.VenCode = a.EATTRIBUTE8 WHERE a.lotno LIKE '{0}%' --LEFT('{0}' + '-', CHARINDEX('-', '{0}' + '-') - 1) + '%'