From 57a7a9a82a47719db82f874a41169bc78b93317b Mon Sep 17 00:00:00 2001 From: xuli Date: Tue, 6 Aug 2024 16:04:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=90=8C=E6=AD=A5=EF=BC=88U9?= =?UTF-8?q?=EF=BC=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.FromERP/ICSMo.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ICSSoft.FromERP/ICSMo.cs b/ICSSoft.FromERP/ICSMo.cs index 7b55e68..3b87e61 100644 --- a/ICSSoft.FromERP/ICSMo.cs +++ b/ICSSoft.FromERP/ICSMo.cs @@ -71,7 +71,9 @@ namespace ICSSoft.FromERP A.ID as MOID, A.ID as MODetailID, ISNULL(A.ModifiedOn,A.BusinessCreatedOn) as MTIME, - isnull(A11.Code,'') ProjectCode,isnull(A19.LotCode,'') cBatch,'' version ,'' brand, + isnull(A11.Code,'') ProjectCode, + --isnull(A19.LotCode,'') cBatch, + '' version ,'' brand, '' as cFree1, '' as cFree2, '' as cFree3, @@ -102,7 +104,7 @@ else Convert(varchar(10),a.ActualCompleteDate,120 ) end as ActualCompleteDate left join {1}.dbo.[MO_MOMemo_Trl] as A2 With(NoLock) on (A2.SysMlFlag = 'zh-CN') and (A1.[ID] = A2.[ID]) left join {1}.dbo.[MO_MODocType] as A3 With(NoLock) on (A.[MODocType] = A3.[ID]) left join {1}.dbo.[MO_MODocType_Trl] as A4 With(NoLock) on (A4.SysMlFlag = 'zh-CN') and (A3.[ID] = A4.[ID]) - left join {1}.dbo.[MO_MOTaskPlan] as A5 With(NoLock) on (A.[ID] = A5.[MO]) + left join {1}.dbo.[Base_User] as A6 With(NoLock) on (A.ModifiedBy = A6.Code) left join {1}.dbo.[CBO_ItemMaster] as A7 With(NoLock) on (A.[ItemMaster] = A7.[ID]) left join {1}.dbo.[MO_MO_Trl] as A8 With(NoLock) on (A8.SysMlFlag = 'zh-CN') and (A.[ID] = A8.[ID]) @@ -112,13 +114,7 @@ else Convert(varchar(10),a.ActualCompleteDate,120 ) end as ActualCompleteDate left join {1}.dbo.[Base_Organization] as A12 With(NoLock) on (A.[Org] = A12.[ID]) left join {1}.dbo.[CBO_Department] as A13 With(NoLock) on (A.[Department] = A13.[ID]) left join {1}.dbo.[CBO_Department_Trl] as A14 With(NoLock) on (A14.SysMlFlag = 'zh-CN') and (A13.[ID] = A14.[ID]) - left join {1}.dbo. MO_MO As A16 With(NoLock) on A16.[MODocType]=1001603110990023 and A.[Project]=A16.Project and A.ItemMaster=A16.ItemMaster - left join {1}.dbo.[CBO_ItemMaster] as A17 With(NoLock) on (A16.[ItemMaster] = A17.[ID]) - left join {1}.dbo.[CBO_ItemMaster_Trl] as A18 With(NoLock) on (A18.SysMlFlag = 'zh-CN') and (A17.[ID] = A16.[ID]) - left join {1}.dbo.[MO_MOLot] as A19 With(NoLock) on (A16.[ID] = A19.[MO]) - left join (select * from (select ROW_NUMBER() over( partition by dept order by code desc ) row,* from {1}.dbo.CBO_Operators with(nolock) ) bb - where bb.row='1' )as A20 on A20.dept=A.Department and a20.Org=a.Org - left join {1}.dbo.[MO_IssueDoc] as A21 With(NoLock) on A21.[SourceDoc_SrcDocNo]=A.DocNo + LEFT JOIN {1}.dbo.[CBO_Wh] AS A22 With(NoLock) ON A22.ID=A.CompleteWh where (A.DocState=2 OR A.DocState=3) and A.[BusinessType] != 50 and (A.[BusinessType] != 52) and (A.[BusinessType] != 2417) and (A.[IsMultiRouting] != 1) and A.[ItemMaster] is not null --and (A.[IsStartMO] != 1)