|
|
@ -147,13 +147,7 @@ from |
|
|
|
dics.Add("ItemUnit", item.ItemUnit); |
|
|
|
dics.Add("Itemmodel", item.Itemmodel); |
|
|
|
dics.Add("GR", item.GR); |
|
|
|
dics.Add("SGFS", item.SGFS); |
|
|
|
dics.Add("TGFS", item.TGFS); |
|
|
|
dics.Add("WG", item.WG); |
|
|
|
dics.Add("NI", item.NI); |
|
|
|
dics.Add("MA", item.MA); |
|
|
|
dics.Add("Mtime", item.Mtime.ToString("yyyy-MM-dd HH:mm:ss")); |
|
|
|
dics.Add("Other", item.Other); |
|
|
|
dics.Add("Free1", item.Free1); |
|
|
|
dics.Add("Free2", item.Free2); |
|
|
|
dics.Add("Free3", item.Free3); |
|
|
@ -182,11 +176,11 @@ from |
|
|
|
insertSql += @"
|
|
|
|
insert into IcsInventory |
|
|
|
(ItemCode,ItemName,ItemDesc,ItemStd,ItemType,ItemControlType,ItemContype |
|
|
|
,ItemAttribute,ItemUnit,ItemMainCategoryCode,ItemModel,ItemCasNo,ItemMolecularFormula,GR,SGFS,TGFS,WG,NI,MA,Other,Default1,Default2,Default3,Default4 |
|
|
|
,ItemAttribute,ItemUnit,ItemMainCategoryCode,ItemModel,ItemCasNo,ItemMolecularFormula,GR,Default1,Default2,Default3,Default4 |
|
|
|
,CreationTime,CreatorUserId,CreatorUserName,TenantId) |
|
|
|
|
|
|
|
select a.ItemCode,a.ItemName,a.ItemDesc,a.ItemStd,'itemtype_finishedproduct','item_control_lot','item_control_nocontrol' |
|
|
|
,a.ItemAttribute,a.ITEMUnit,a.ItemMainCategoryCode,a.ITEMMODEL,a.ItemCasNo,a.ItemMolecularFormula,a.GR,a.SGFS,a.TGFS,a.WG,a.NI,a.MA,a.Other,a.Free1,a.Free2,a.Free3,a.Free4 |
|
|
|
,left( a.ItemAttribute,1),a.ITEMUnit,a.ItemMainCategoryCode,a.ITEMMODEL,a.ItemCasNo,a.ItemMolecularFormula,a.GR,a.Free1,a.Free2,a.Free3,a.Free4 |
|
|
|
,Mtime,'job','job','{0}' |
|
|
|
from #tempFromErp4ItemCode a |
|
|
|
left join IcsInventory b with(nolock) on a.itemcode=b.itemcode |
|
|
@ -198,7 +192,7 @@ and b.id is null |
|
|
|
|
|
|
|
update IcsInventory |
|
|
|
set |
|
|
|
ItemName=a.ItemName,ItemDesc=a.ItemDesc,ItemStd=a.ItemStd,ItemAttribute=a.ItemAttribute ,ITEMUnit=a.ITEMUnit,ItemMainCategoryCode=a.ItemMainCategoryCode,ITEMMODEL=a.ITEMMODEL |
|
|
|
ItemName=a.ItemName,ItemDesc=a.ItemDesc,ItemStd=a.ItemStd,ItemAttribute=left( a.ItemAttribute,1) ,ITEMUnit=a.ITEMUnit,ItemMainCategoryCode=a.ItemMainCategoryCode,ITEMMODEL=a.ITEMMODEL |
|
|
|
,ItemCasNo=a.ItemCasNo,ItemMolecularFormula=a.ItemMolecularFormula,Default1=a.Free1,Default2=a.Free2,Default3=a.Free3,Default4=a.Free4 |
|
|
|
,LastModificationTime=a.Mtime,LastModifierUserId='job',LastModifierUserName='job' |
|
|
|
from #tempFromErp4ItemCode a |
|
|
|