lazhen
2024-08-01 d8f056609cbecb8851fdaf5b8f74131ee2ebb2c0
日历不可用事件日期列补充
已修改5个文件
已添加15个文件
211 ■■■■■ 文件已修改
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_Event/StaticMethod_ValidDate.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MaxDayDate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MaxMonthDate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MaxWeekDate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MinDayDate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MinMonthDate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MinWeekDate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMaxDayDate.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMaxMonthDate.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMaxWeekDate.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMinDayDate.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMinMonthDate.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMinWeekDate.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_GetColumnByTimeUnit.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_ProcessColumnDay.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_ProcessColumnMonth#1.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_ProcessColumnWeek.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -25,7 +25,7 @@
    
    table.GenerateColumn( owner );
    
    traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){
    traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.Product_MP().IsLeaf() and not isnull( pisp.StockingPoint_MP() ) and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){
      unit := pisp.StockingPoint_MP().UnitID();
      info( unit, pisp.ProductID() );
      ccrow := null( FinancialProductionRow );
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
@@ -27,7 +27,7 @@
    table.GenerateColumn( owner, 'All', startofyear, startofnextyear );
    //info( '-----------------------------------', table.InventorySummaryColumn( relsize ) );
    //库存数量为Actual inventories里面的点Planned inventories字段库存量加总
    traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){
    traverse( owner, Product_MP.ProductInStockingPoint_MP, pisp, pisp.IsLeaf() and not pisp.IsSystem() and not isnull( pisp.StockingPoint_MP() ) and ( pisp.StockingPoint_MP().UnitID() = ccunit or pisp.StockingPoint_MP().UnitID() = dlunit ) ){
      unit := pisp.StockingPoint_MP().UnitID();
      product := pisp.Product_MP();
    //  info( '-----------------------------------', unit, product.ID() );
_Main/BL/Type_LibCal_Event/StaticMethod_ValidDate.qbl
@@ -22,5 +22,6 @@
      feedback_o := Translations::MP_LibCal_Event_ValidDate();
    }
    return feedback_o = '';
    //return true;
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MaxDayDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute MaxDayDate
{
  #keys: '3[415136.0.960591378][415136.0.960591377][415136.0.960591379]'
  Description: '最大日期-天'
  ValueType: Date
}
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MaxMonthDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute MaxMonthDate
{
  #keys: '3[415136.0.960591412][415136.0.960591411][415136.0.960591413]'
  Description: '最大日期-月'
  ValueType: Date
}
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MaxWeekDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute MaxWeekDate
{
  #keys: '3[415136.0.960591398][415136.0.960591397][415136.0.960591399]'
  Description: '最大日期-周'
  ValueType: Date
}
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MinDayDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute MinDayDate
{
  #keys: '3[415136.0.960591388][415136.0.960591387][415136.0.960591389]'
  Description: '最小日期-天'
  ValueType: Date
}
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MinMonthDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute MinMonthDate
{
  #keys: '3[415136.0.960591419][415136.0.960591418][415136.0.960591420]'
  Description: '最小日期-月'
  ValueType: Date
}
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_MinWeekDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute MinWeekDate
{
  #keys: '3[415136.0.960591405][415136.0.960591404][415136.0.960591406]'
  Description: '最小日期-周'
  ValueType: Date
}
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMaxDayDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcMaxDayDate
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day(), column.Period() );
    this.MaxDayDate( value.Period() );
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMaxMonthDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcMaxMonthDate
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Month(), column.Period() );
    this.MaxMonthDate( value.Period() );
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMaxWeekDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcMaxWeekDate
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    value := maxobject( this,LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Week(), column.Period() );
    this.MaxWeekDate( value.Period() );
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMinDayDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcMinDayDate
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day(), column.Period() );
    this.MinDayDate( value.Period() );
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMinMonthDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcMinMonthDate
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Month(), column.Period() );
    this.MinMonthDate( value.Period() );
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Function_CalcMinWeekDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcMinWeekDate
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    value := minobject( this, LibCal_SubscriberEventColumn, column, column.TimeUnit() = Translations::MP_GlobalParameters_Week(), column.Period() );
    this.MinWeekDate( value.Period() );
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_GetColumnByTimeUnit.qbl
@@ -9,7 +9,7 @@
  TextBody:
  [*
    // ç”„兰鸽 Jul-26-2024 (created)
    column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ) );
    column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ), column.TimeUnit() = timeunit );
    if( isnull( column ) ){
      column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time, TimeUnit := timeunit );
    }
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
@@ -33,14 +33,27 @@
    
      }
    }
    //info( '----------------------1------------------------', this.LibCal_SubscriberEventColumn( relsize ) );
    //traverse( this, LibCal_SubscriberEventColumn, column ){
    //  traverse( this, LibCal_SubscriberEventRow, row ){
    //    if( not exists( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow() = row ) ) {
    //      cell := column.LibCal_SubscriberEventCell( relnew, Value := '' );
    //      row.LibCal_SubscriberEventCell( relinsert, cell );
    //  info( '------------------------', column.Name(), column.Period(), column.TimeUnit() );
    //    }
    //  }
    //}
    Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxDayDate ) );
    Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxWeekDate ) );
    Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MaxMonthDate ) );
    Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinDayDate ) );
    Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinWeekDate ) );
    Transaction::Transaction().Propagate( attribute( LibCal_SubscriberEventTable, MinMonthDate ) );
    this.ProcessColumnDay();
    this.ProcessColumnWeek();
    this.ProcessColumnMonth();
    traverse( this, LibCal_SubscriberEventColumn, column ){
      traverse( this, LibCal_SubscriberEventRow, row ){
        if( not exists( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow() = row ) ) {
          cell := column.LibCal_SubscriberEventCell( relnew, Value := '' );
          row.LibCal_SubscriberEventCell( relinsert, cell );
        }
      }
    }
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_ProcessColumnDay.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method ProcessColumnDay
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    day      := ( this.MinDayDate() + Duration::Days( 1 ) ).Date();
    while( day < this.MaxDayDate() ){
      if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Day() ) ){
        this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Day() );
      }
      day      := ( day + Duration::Days( 1 ) ).Date();
    }
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_ProcessColumnMonth#1.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method ProcessColumnMonth
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    day      := this.MinDayDate().StartOfNextMonth();
    while( day < this.MaxDayDate() ){
      if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Day() ) ){
        this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Month() );
      }
      day      := this.MinDayDate().StartOfNextMonth();
    }
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_ProcessColumnWeek.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method ProcessColumnWeek
{
  TextBody:
  [*
    // ç”„兰鸽 Aug-1-2024 (created)
    day      := this.MinDayDate().StartOfNextWeek();
    while( day < this.MaxDayDate() ){
      if( not exists( this, LibCal_SubscriberEventColumn, column, column.Period() = day and column.TimeUnit() = Translations::MP_GlobalParameters_Day() ) ){
        this.LibCal_SubscriberEventColumn( relnew, Name := day.Format( 'M/D/Y' ), Period := day, TimeUnit := Translations::MP_GlobalParameters_Week() );
      }
      day      := day.StartOfNextWeek();
    }
  *]
}