xusc 3 weeks ago
parent
commit
56e9cab16e
  1. BIN
      .vs/ICSSoft.FromERP/v16/.suo
  2. 8
      ICSSoft.FromERP/App.config
  3. 6
      ICSSoft.FromERP/IcsMo_Rhtyon.cs
  4. 4
      ICSSoft.FromERP/SyncMoHour_Rhyton.cs

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

Binary file not shown.

8
ICSSoft.FromERP/App.config

@ -2,8 +2,8 @@
<configuration>
<appSettings>
<!--<add key="ERPDB" value="[U9Ctest]"/>-->
<add key="ERPDB" value="[192.168.93.132].[U9TEST0628]"/>
<!--<add key="ERPDB" value="[192.168.93.133].[U9RTDB]"/>-->
<!--<add key="ERPDB" value="[192.168.93.132].[U9TEST0628]"/>-->
<add key="ERPDB" value="[192.168.93.133].[U9RTDB]"/>
<add key="Workpoint_ERPDB" value="zhc|[MESTOU8].[UFDATA_001_2017]"/>
<!--token 地址-->
<!--<add key="WeiMasTokenUrl" value="https://test.zhangsanfeng.vip/identity/connect/token"/>-->
@ -37,9 +37,9 @@
</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=172.66.9.13; Database=ICSWMS_KBS; User ID=sa; Password=Drcoffee201609;MultipleActiveResultSets=True;Connect Timeout=300;"/>-->
<!--<add name="SysConnectionString" connectionString="server=192.168.93.135; Database=ICSMESBase_RuiTengZS; User ID=sa; Password=rhyt0n***;MultipleActiveResultSets=True;Connect Timeout=300;"/>-->
<add name="SysConnectionString" connectionString="server=192.168.93.135; Database=ICSMESBase_RuiTengZS; 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"/>

6
ICSSoft.FromERP/IcsMo_Rhtyon.cs

@ -66,6 +66,7 @@ namespace ICSSoft.FromERP
case when A.DocState=2 then 'mostatus_initial'
when A.DocState=3 then 'mostatus_close'
else 'mostatus_initial' end as MOStatus,
case when A.DocState=2 then '' when A.DocState=3 then '' else '' end as DocState,
A2.Description as MOMemo,
'2' as ERPStatus,
A.StartDate as StartDate,
@ -101,6 +102,7 @@ and b1.code not like 'K10%'
,A4.Name as MoDocType
,case when a.ActualCompleteDate is null then ''
else Convert(varchar(10),a.ActualCompleteDate,120 ) end as ActualCompleteDate
,a.IsFIClose
INTO #TempMO
from {1}.dbo.MO_MO as A With(NoLock)
left join {1}.dbo.[MO_MOMemo] as A1 With(NoLock) on (A.[ID] = A1.[MO])
@ -168,7 +170,9 @@ else Convert(varchar(10),a.ActualCompleteDate,120 ) end as ActualCompleteDate
values.Add("CusItemCode", "a.EATTRIBUTE2");
values.Add("CusName", "a.EATTRIBUTE3");
values.Add("DocType", "a.MoDocType");
// values.Add("Default3", "a.ActualCompleteDate");
values.Add("Default3", "a.ActualCompleteDate");
values.Add("Default5", "a.DocState");
values.Add("Default6", "a.IsFIClose");
//更新存在数据
sql += ICSHelper.UpdateSQL("b", values)

4
ICSSoft.FromERP/SyncMoHour_Rhyton.cs

@ -127,6 +127,8 @@ left join IcsItem2Route h with(nolock) on b.ItemCode=h.ItemCode and d.RouteCod
left join IcsItemRoute2Op h1 with(nolock) on h.ItemCode=h1.ItemCode and h.RouteCode=h1.RouteCode and e.OpCode=h1.OpCode and h.TenantId=h1.TenantId
left join IcsMoHourData h2 with(nolock) on a.mocode=h2.mocode and e.OpCode=h2.OpCode
where 1=1
and a.MoStatus='mostatus_close'
and a.Default6='0'
and a.TenantId='{0}'
and e.OpControl='10000000'
and (h2.id is null)
@ -149,6 +151,7 @@ order by a.MoCode, a.OpSeq asc
,ManualTime
,MachiningTotalTime
,ResQty
,HourDiff
,Status
,TenantId
,CreationTime
@ -167,6 +170,7 @@ a.MoCode
,a.ManualTime
,(a.PTime+cast( a.ManualTime as decimal(18,6) ))
,a.ResQty
,(a.PTime+cast( a.ManualTime as decimal(18,6) )-a.TotalTime)
,a.Status
,a.TenantId
,a.MTIME

Loading…
Cancel
Save