From fd58c70e0631bdd09806ead43a573ced43f704f1 Mon Sep 17 00:00:00 2001 From: limj <limj@taizhitech.com> Date: 星期日, 08 十月 2023 19:57:43 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lmj --- _Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl index 9a458dd..219bbfc 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl @@ -10,24 +10,22 @@ [* // Administrator Aug-21-2023 (created) // list to deal - listtodeal := construct( structured[MappingOperation] ); + listtodeal := construct( structured[Global_MappingOperation] ); if( isnull( businesstypes ) or businesstypes.Size() = 0 ) { - listtodeal := selectset( this, MappingOperation, item, true ); + listtodeal := selectset( globalOTDTable, Global_MappingOperation, item, true ); } else { organcodelist := selectvalues( globalOTDTable, BusinessType.OrganCode, organ, businesstypes.Find( organ.BusinessType().BusinessTypeName() ) <> -1, organ.OrganCodeName() ); - listtodeal := selectset( this, - MappingOperation, + listtodeal := selectset( globalOTDTable, Global_MappingOperation, item, ( businesstypes.Find( item.BusinessType() ) <> -1 ) and ( organcodelist.Find( item.OrganCode() ) >= 0 ) ); } // Get the list to deal with max sequence number - listtodealwithmaxsn := construct( structured[MappingOperation] ); + listtodealwithmaxsn := construct( structured[Global_MappingOperation] ); traverse( listtodeal, Elements, item ){ - maxsn := maxselect( this, - MappingOperation, + maxsn := maxselect( globalOTDTable, Global_MappingOperation, moperation, moperation.OrganCode() = item.OrganCode(), moperation.ProductID() = item.ProductID(), @@ -47,7 +45,7 @@ if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){ info( "Now is dealing with the " + count.AsQUILL() + "OperationCost " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" ); } - id := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection(); + id := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection()+"_" + [String]item.SequenceNumber(); if( guard( item.Line(), "" ).Length() > 0 ) { id := id + "_" + item.Line(); } @@ -56,8 +54,8 @@ isfromdb := false; existoperationcost := OperationCost::FindOperationCostTypeIndex( id ); if( isnull( existoperationcost ) ){ - connecteditem := select( this, - MappingOperationCost, + connecteditem := select( globalOTDTable, + Global_MappingOperationCost, moperationcost, moperationcost.OrgCode() = item.OrganCode(), moperationcost.ProductID() = item.ProductID() ); -- Gitblit v1.9.3