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