Browse Source

U8同步3

Branch_PaiNaWeiSJob
徐莉 4 months ago
parent
commit
28a86a20b1
  1. 1
      ICSSoft.FromERP/App.config
  2. 2
      ICSSoft.FromERP/ICSInventoryFromU8.cs
  3. 5
      ICSSoft.FromERP/ICSMoFromU8.cs
  4. 4
      ICSSoft.FromERP/IcsMainCategoryCodeFromU8.cs
  5. 2
      ICSSoft.FromERP/IcsSBomFromU8.cs

1
ICSSoft.FromERP/App.config

@ -2,6 +2,7 @@
<configuration>
<appSettings>
<add key="ERPDB" value="[U9Ctest]"/>
<add key="Workpoint_ERPDB" value="zhc|[MESTOU8].[UFDATA_001_2017]"/>
</appSettings>
<connectionStrings>
<add name="SysConnectionString" connectionString="Data Source=119.3.29.177;Database=ICSMESBase;Uid=gitea;Pwd=aA123456;"/>

2
ICSSoft.FromERP/ICSInventoryFromU8.cs

@ -82,7 +82,7 @@ namespace ICSSoft.FromERP
a.cEngineerFigNo ItemDrawingNo,
'' ItemDesc,
dbo.GetReplaceStr(isnull(cInvAddCode,'')+'|'+isnull(cInvStd,'')) AS ItemStd,
a.cInvAddCode INVPARSETYPE,
c.cComUnitName AS ItemUnit,
a.cInvCCode ItemMainCategoryCode,
b.cInvCName ClassName,

5
ICSSoft.FromERP/ICSMoFromU8.cs

@ -137,8 +137,9 @@ ELSE ISNULL(b.CloseTime,ISNULL(b.RelsTime,ISNULL(a.ModifyTime, a.CreateTime))) E
SELECT a.ID INTO #tableICSMO
FROM ICSMO a With(NoLock)
LEFT JOIN {1}.dbo.[mom_order] b With(NoLock) ON a.Mocode=b.MoCode AND A.MoSeq=B.SortSeq
WHERE a.TenantId='{0}' and b.MoCode IS NULL
LEFT JOIN {1}.dbo.[mom_order] b With(NoLock) ON a.Mocode=b.MoCode
left JOIN {1}.dbo.mom_orderdetail b2 ON b.MoId = b2.MoId AND A.MoSeq=B2.SortSeq
WHERE a.TenantId='{0}' and B2.SortSeq IS NULL
DELETE FROM ICSMO
WHERE TenantId='{0}' and ID IN ( SELECT ID from #tableICSMO )

4
ICSSoft.FromERP/IcsMainCategoryCodeFromU8.cs

@ -71,7 +71,7 @@ namespace ICSSoft.FromERP
#region SQL
string sql = @" select a.cInvCCode as ItemMainCategoryCode
,b.cInvCCode as ItemMainCategoryName
,a.cInvCName as ItemMainCategoryName
,'' as ItemMainCategoryDesc
,getdate() MTime
,p.parentCode
@ -85,7 +85,7 @@ namespace ICSSoft.FromERP
and cc.iInvCGrade=cc_p.iInvCGrade+1
) p ON a.cInvCCode=p.cInvCCode
where 1=1
and A.ModifiedOn>=@LastTime
-- and A.ModifiedOn>=@LastTime
ORDER BY A.cInvCCode
IF NOT EXISTS(SELECT * FROM #TempItemCategory)

2
ICSSoft.FromERP/IcsSBomFromU8.cs

@ -115,7 +115,7 @@ namespace ICSSoft.FromERP
SELECT a.ErpId INTO #tableICSSBOM
FROM ICSSBOM a With(NoLock)
left join {1}.dbo.bom_opcomponent d With(NoLock) on a.ErpId=d.OpComponentId
WHERE d.id is null
WHERE d.OpComponentId is null
and a.TenantId='{0}'

Loading…
Cancel
Save