renhao
2023-09-18 5ac4d4f977b27ee53ec4bc544cc2a6b4019c8fbd
_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
@@ -8,8 +8,9 @@
  TextBody:
  [*
    // renhao Aug-14-2023 (created)
    listtodeal := selectset( this,MappingExternalSupply,externalSupply, externalSupply.UserQuantity()>0 );
    queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date();
    queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() );
    listtodeal := selectset( this,MappingExternalSupply,externalSupply, externalSupply.UserQuantity()>0 and externalSupply.Date() >= queryStartDate and externalSupply.Date() <= queryEndDate);
    totalcount := listtodeal.Size();
    description := "在途在制";
    info( "ExternalSupply has " + totalcount.AsQUILL() + " rows in total" );
@@ -19,7 +20,7 @@
      count := count + 1;
      if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){
        info( "Now is dealing with the " + count.AsQUILL() + "ExternalSupply " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
        }
       }
      product := select( this,MappingProduct,product,product.ID() = externalSupply.ProductID(),true);