yunchai
2023-09-25 85fb8fdf8bdef29cbe8a1f64bc27e049454e7142
_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
@@ -15,20 +15,22 @@
        listtodeal := selectset( this, MappingOperation, item, true );
    } else {
        listtodeal := selectset( this, MappingOperation, item, 
                                 businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0
                                  );
    //                             businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0
                                 businesstypes.Find( item.BusinessType() ) >= 0
                                );
    }
    
    //Set the Default values
    unitofmeasurename := "PCS";
    capacitytype := "Infinite";
    infinite := "Infinite";
    capacitytype := "Transport quantity";
    
    // Get the root data
    Unit::CreateOrUpdate( this, 
                          "天马集团", 
                          "天马集团", 
                          "", 
                          capacitytype,
                          infinite,
                          unitofmeasurename );
    
    // Get the sub root data
@@ -36,14 +38,14 @@
                          "生产", 
                          "生产", 
                          "天马集团", 
                          capacitytype,
                          infinite,
                          unitofmeasurename );
    
    Unit::CreateOrUpdate( this, 
                          "供应商", 
                          "供应商", 
                          "天马集团", 
                          capacitytype,
                          infinite,
                          unitofmeasurename );
    
    Unit::CreateOrUpdate( this, 
@@ -64,7 +66,7 @@
                            item.OrganCode(), 
                            OrgName, 
                            "生产", 
                            capacitytype,
                            infinite,
                            unitofmeasurename );
                           
      //Get the second level unit
@@ -73,7 +75,7 @@
                            secondlevelid, 
                            secondlevelid, 
                            item.OrganCode(), 
                            capacitytype,
                            infinite,
                            unitofmeasurename );
        
      //Get the third level unit