From 3cb5a54def670d97301f07170fcaad213bfc54f2 Mon Sep 17 00:00:00 2001
From: yypsybs <yypsybs@foxmail.com>
Date: 星期六, 09 九月 2023 15:30:46 +0800
Subject: [PATCH] 同步逻辑由MacroPlan移到MPSync
---
_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl | 178 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 89 insertions(+), 89 deletions(-)
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
index fa613b6..59960f6 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
@@ -7,94 +7,94 @@
Description: 'Get unit data from operation mapping'
TextBody:
[*
- // Administrator Aug-21-2023 (created)
- // list to deal
- listtodeal := construct( structured[MappingOperation] );
-
- if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
- listtodeal := selectset( this, MappingOperation, item, true );
- } else {
- listtodeal := selectset( this, MappingOperation, item,
- businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0
- );
- }
-
- //Set the Default values
- unitofmeasurename := "PCS";
- capacitytype := "Infinite";
-
- // Get the root data
- Unit::CreateOrUpdate( this,
- "澶╅┈闆嗗洟",
- "澶╅┈闆嗗洟",
- "",
- capacitytype,
- unitofmeasurename );
-
- // Get the sub root data
- Unit::CreateOrUpdate( this,
- "鐢熶骇",
- "鐢熶骇",
- "澶╅┈闆嗗洟",
- capacitytype,
- unitofmeasurename );
-
- Unit::CreateOrUpdate( this,
- "渚涘簲鍟�",
- "渚涘簲鍟�",
- "澶╅┈闆嗗洟",
- capacitytype,
- unitofmeasurename );
-
- Unit::CreateOrUpdate( this,
- "鏁磋溅杩愯緭",
- "鏁磋溅杩愯緭",
- "澶╅┈闆嗗洟",
- capacitytype,
- unitofmeasurename );
-
- // Get the unit list
- traverse( listtodeal, Elements, item){
- OrgName := item.OrganName();
- if( OrgName = ''){
- OrgName := item.OrganCode();
- }
- //Get the first level unit
- Unit::CreateOrUpdate( this,
- item.OrganCode(),
- OrgName,
- "鐢熶骇",
- capacitytype,
- unitofmeasurename );
-
- //Get the second level unit
- secondlevelid := item.OrganCode() + "_" + item.PlantName();
- Unit::CreateOrUpdate( this,
- secondlevelid,
- secondlevelid,
- item.OrganCode(),
- capacitytype,
- unitofmeasurename );
-
- //Get the third level unit
- thirdlevelid := secondlevelid + "_" + item.ProcessSection();
- Unit::CreateOrUpdate( this,
- thirdlevelid,
- thirdlevelid,
- secondlevelid,
- "Time",
- item.UnitOfMeasureName() );
-
- //Get the last level unit
- if( item.Line()<>"" ){
- lastlevelid := thirdlevelid + "_" + item.Line();
- Unit::CreateOrUpdate( this,
- lastlevelid,
- lastlevelid,
- thirdlevelid,
- "Time",
- item.UnitOfMeasureName() );
- }
- }
+ //// Administrator Aug-21-2023 (created)
+ //// list to deal
+ //listtodeal := construct( structured[MappingOperation] );
+ //
+ //if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
+ // listtodeal := selectset( this, MappingOperation, item, true );
+ //} else {
+ // listtodeal := selectset( this, MappingOperation, item,
+ // businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0
+ // );
+ //}
+ //
+ ////Set the Default values
+ //unitofmeasurename := "PCS";
+ //capacitytype := "Infinite";
+ //
+ //// Get the root data
+ //Unit::CreateOrUpdate( this,
+ // "澶╅┈闆嗗洟",
+ // "澶╅┈闆嗗洟",
+ // "",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ //// Get the sub root data
+ //Unit::CreateOrUpdate( this,
+ // "鐢熶骇",
+ // "鐢熶骇",
+ // "澶╅┈闆嗗洟",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ //Unit::CreateOrUpdate( this,
+ // "渚涘簲鍟�",
+ // "渚涘簲鍟�",
+ // "澶╅┈闆嗗洟",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ //Unit::CreateOrUpdate( this,
+ // "鏁磋溅杩愯緭",
+ // "鏁磋溅杩愯緭",
+ // "澶╅┈闆嗗洟",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ //// Get the unit list
+ //traverse( listtodeal, Elements, item){
+ // OrgName := item.OrganName();
+ // if( OrgName = ''){
+ // OrgName := item.OrganCode();
+ // }
+ // //Get the first level unit
+ // Unit::CreateOrUpdate( this,
+ // item.OrganCode(),
+ // OrgName,
+ // "鐢熶骇",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ // //Get the second level unit
+ // secondlevelid := item.OrganCode() + "_" + item.PlantName();
+ // Unit::CreateOrUpdate( this,
+ // secondlevelid,
+ // secondlevelid,
+ // item.OrganCode(),
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ // //Get the third level unit
+ // thirdlevelid := secondlevelid + "_" + item.ProcessSection();
+ // Unit::CreateOrUpdate( this,
+ // thirdlevelid,
+ // thirdlevelid,
+ // secondlevelid,
+ // "Time",
+ // item.UnitOfMeasureName() );
+ //
+ // //Get the last level unit
+ // if( item.Line()<>"" ){
+ // lastlevelid := thirdlevelid + "_" + item.Line();
+ // Unit::CreateOrUpdate( this,
+ // lastlevelid,
+ // lastlevelid,
+ // thirdlevelid,
+ // "Time",
+ // item.UnitOfMeasureName() );
+ // }
+ // }
*]
}
--
Gitblit v1.9.3