xusc 2 months ago
parent
commit
07e9aac884
  1. BIN
      .vs/ICSSoft.FromERP/v16/.suo
  2. 2
      ICSSoft.FromERP/App.config
  3. 12
      ICSSoft.FromERP/SyncItem_WeiMas.cs
  4. 10
      ICSSoft.FromERP/SyncMoHour_Rhyton.cs
  5. 2
      ICSSoft.Test/Program.cs

BIN
.vs/ICSSoft.FromERP/v16/.suo

Binary file not shown.

2
ICSSoft.FromERP/App.config

@ -19,8 +19,8 @@
</appSettings>
<connectionStrings>
<!--<add name="SysConnectionString" connectionString="Data Source=119.3.29.177;Database=ICSMESBase;Uid=gitea;Pwd=aA123456;"/>-->
<!--<add name="SysConnectionString" connectionString="server=192.168.93.135; Database=ICSMESBase_RuiTeng; User ID=sa; Password=rhyt0n***;MultipleActiveResultSets=True;Connect Timeout=300;"/>-->
<add name="SysConnectionString" connectionString="server=192.168.93.135; Database=ICSMESBase_RuiTeng; User ID=sa; Password=rhyt0n***;MultipleActiveResultSets=True;Connect Timeout=300;"/>
<!--<add name="SysConnectionString" connectionString="server=192.168.93.135; Database=ICSMESBase_RuiTeng; User ID=sa; Password=rhyt0n***;MultipleActiveResultSets=True;Connect Timeout=300;"/>-->
<!--<add name="SysConnectionString" connectionString="server=192.168.1.155; Database=ICSMESBase_WeiMas; User ID=sa; Password=aA123456;MultipleActiveResultSets=True;Connect Timeout=300;"/>-->
<!--<add name="SysConnectionString" connectionString="server=172.16.12.201; Database=ICSJYMES; User ID=sa; Password=aA123456;MultipleActiveResultSets=True;Connect Timeout=300;"/>-->
<add name="APIAddStdWorkHour" connectionString="http://192.168.1.110:9097/api/APIAddStdWorkHour"/>

12
ICSSoft.FromERP/SyncItem_WeiMas.cs

@ -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

10
ICSSoft.FromERP/SyncMoHour_Rhyton.cs

@ -130,12 +130,15 @@ group by t.MoCode,t.OpCode
) g on a.MoCode=g.MoCode and e.OpCode=g.OpCode
where 1=1
and a.TenantId='{0}'
and a.CreationTime>@LastTime
--and a.CreationTime>@LastTime
) a
where 1=1
order by a.MoCode, a.OpSeq asc
delete from IcsMoHourData
where Status='No'
insert into IcsMoHourData (
MoCode
@ -151,7 +154,10 @@ order by a.MoCode, a.OpSeq asc
,CreatorUserId
,CreatorUserName
)
select * from #tempSyncMoHour_Rhyton ";
select a.* from #tempSyncMoHour_Rhyton a
left join IcsMoHourData b with(nolock) on a.MoCode=b.MoCode and a.OpCode=b.OpCode
where b.MoCode is null and b.OpCode is null
";
sql = string.Format(sql, TenantId);
sql = ICSHelper.Time(Namespace, Class, TenantId, sql, "#tempSyncMoHour_Rhyton");

2
ICSSoft.Test/Program.cs

@ -13,7 +13,7 @@ namespace ICSSoft.Test
//ICSVendor test = new ICSVendor();
//test.Execute();
IcsMo_Rhtyon test = new IcsMo_Rhtyon();
SyncMoHour_Rhyton test = new SyncMoHour_Rhyton();
test.Execute();
// var ss= ICSHelper.ApiSign("sj_w_id", "70FF7F01C5899A5ACAAD4ECB7FA5B3C5", 1724650261);

Loading…
Cancel
Save