From 95e277b84cb9e90e6a375c0354efe69aceb9ad82 Mon Sep 17 00:00:00 2001
From: yanyuan <yuan.yan@capgemini.com>
Date: 星期一, 09 十月 2023 09:14:21 +0800
Subject: [PATCH] Merge branch 'dev_lhj' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lhj
---
_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl | 50 +++++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl
index a2967ba..e6907cc 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(),
@@ -52,24 +50,26 @@
id := id + "_" + item.Line();
}
operation := Operation::FindOperationTypeIndex( id );
- account := Account_MP::FindByName( this, "Operating cost" );
- isfromdb := false;
- existoperationcost := OperationCost::FindOperationCostTypeIndex( id );
- if( isnull( existoperationcost ) ){
- connecteditem := select( this,
- MappingOperationCost,
- moperationcost,
- moperationcost.OrgCode() = item.OrganCode(),
- moperationcost.ProductID() = item.ProductID() );
- if( not isnull( connecteditem)){
- cost := connecteditem.Cost();
- lengthoftime := connecteditem.LengthOfTime();
- start := connecteditem.Start();
- timeunit := connecteditem.TimeUnit();
- OperationCost::Create( id, operation, account, "Volume", start, timeunit, lengthoftime, cost, isfromdb );
- }
-
- }
+ if(not isnull(operation)){
+ account := Account_MP::FindByName( this, "Operating cost" );
+ isfromdb := false;
+ existoperationcost := OperationCost::FindOperationCostTypeIndex( id );
+ if( isnull( existoperationcost ) ){
+ connecteditem := select( globalOTDTable,
+ Global_MappingOperationCost,
+ moperationcost,
+ moperationcost.OrgCode() = item.OrganCode(),
+ moperationcost.ProductID() = item.ProductID() );
+ if( not isnull( connecteditem)){
+ cost := connecteditem.Cost();
+ lengthoftime := connecteditem.LengthOfTime();
+ start := connecteditem.Start();
+ timeunit := connecteditem.TimeUnit();
+ OperationCost::Create( id, operation, account, "Volume", start, timeunit, lengthoftime, cost, isfromdb );
+ }
+
+ }
}
+ }
*]
}
--
Gitblit v1.9.3