lazhen
2024-05-29 d70f23927b7b48623ecf1a822bab042e9ce3235f
日历不可用事件界面初始化数据
已添加31个文件
已修改5个文件
611 ■■■■■ 文件已修改
_Main/BL/Relations/Relation_LibCal_Calendar_LibCal_SubscriberEventTable_LibCal_SubscriberEventT.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_LibCal_SubscriberEventCell_LibCal_SubscriberEventColumn_LibCal_Subs.qbl 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_LibCal_SubscriberEventCell_LibCal_SubscriberEventRow_LibCal_Subscri.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_LibCal_SubscriberEventTable_LibCal_SubscriberEventColumn_LibCal_Sub.qbl 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_LibCal_SubscriberEventTable_LibCal_SubscriberEventRow_LibCal_Subscr.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_Calendar/_ROOT_Type_LibCal_Calendar.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Value.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventCell/_ROOT_Type_LibCal_SubscriberEventCell.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventColumn/Attribute_Index.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventColumn/Attribute_Name.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventColumn/Attribute_RowName.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventColumn/Function_CalcIndex.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventColumn/_ROOT_Type_LibCal_SubscriberEventColumn.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_Event.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_EventType.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_RowNr.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_Subscriber.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventRow/_ROOT_Type_LibCal_SubscriberEventRow.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_ID.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_Name.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/StaticMethod_InitializeTable.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LibCal_SubscriberEventTable/_ROOT_Type_LibCal_SubscriberEventTable.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelExport.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelList.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelPeriods.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_matrixEditorActionBarPageTable.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_matrixeditorContextMenuTable.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Method_InitializeSubscribers.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelExport_ButtonInitialize_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelPeriods_RadioButtonGroupUseForPlanning_OnChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_ListList.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_LibCal_Calendar_LibCal_SubscriberEventTable_LibCal_SubscriberEventT.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation LibCal_Calendar_LibCal_SubscriberEventTable_LibCal_SubscriberEventTable_LibCal_Calendar
{
  #keys: '1[415136.0.671975041]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide LibCal_SubscriberEventTable
  {
    #keys: '3[415136.0.671975043][415136.0.671975042][415136.0.671975044]'
    Cardinality: '1toN'
    ObjectDefinition: LibCal_Calendar
    OwningSide: 'Owned'
  }
  RelationSide.RightSide LibCal_Calendar
  {
    #keys: '3[415136.0.671975046][415136.0.671975045][415136.0.671975047]'
    Cardinality: '0to1'
    ObjectDefinition: LibCal_SubscriberEventTable
    OwningSide: 'Reference'
  }
}
_Main/BL/Relations/Relation_LibCal_SubscriberEventCell_LibCal_SubscriberEventColumn_LibCal_Subs.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
Quintiq file version 2.0
#parent: #root
Relation LibCal_SubscriberEventCell_LibCal_SubscriberEventColumn_LibCal_SubscriberEventColumn_LibCal_SubscriberEventCell
{
  #keys: '1[415136.0.671975141]'
  ProceduralSequenceRelationStrategy
  {
    #keys: '13[0.0.0][415136.0.671975193][415136.0.671975187][415136.0.671975194][415136.0.671975188][415136.0.671975195][415136.0.671975189][415136.0.671975196][415136.0.671975190][415136.0.671975197][415136.0.671975191][415136.0.671975198][415136.0.671975192]'
    SequenceElementSuffix: 'CellInColumn'
    SequenceSuffix: 'CellInColumn'
  }
  RelationSide.LeftSide LibCal_SubscriberEventColumn
  {
    #keys: '3[415136.0.671975143][415136.0.671975142][415136.0.671975144]'
    Cardinality: '0to1'
    ObjectDefinition: LibCal_SubscriberEventCell
    OwningSide: 'Reference'
  }
  RelationSide.RightSide LibCal_SubscriberEventCell
  {
    #keys: '3[415136.0.671975146][415136.0.671975145][415136.0.671975147]'
    Cardinality: '1toN'
    ObjectDefinition: LibCal_SubscriberEventColumn
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_LibCal_SubscriberEventCell_LibCal_SubscriberEventRow_LibCal_Subscri.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation LibCal_SubscriberEventCell_LibCal_SubscriberEventRow_LibCal_SubscriberEventRow_LibCal_SubscriberEventCell
{
  #keys: '1[415136.0.671975174]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide LibCal_SubscriberEventRow
  {
    #keys: '3[415136.0.671975176][415136.0.671975175][415136.0.671975177]'
    Cardinality: '0to1'
    ObjectDefinition: LibCal_SubscriberEventCell
    OwningSide: 'Reference'
  }
  RelationSide.RightSide LibCal_SubscriberEventCell
  {
    #keys: '3[415136.0.671975179][415136.0.671975178][415136.0.671975180]'
    Cardinality: '1toN'
    ObjectDefinition: LibCal_SubscriberEventRow
    OwningSide: 'Reference'
  }
}
_Main/BL/Relations/Relation_LibCal_SubscriberEventTable_LibCal_SubscriberEventColumn_LibCal_Sub.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
Quintiq file version 2.0
#parent: #root
Relation LibCal_SubscriberEventTable_LibCal_SubscriberEventColumn_LibCal_SubscriberEventColumn_LibCal_SubscriberEventTable
{
  #keys: '1[415136.0.671975067]'
  ProceduralSequenceRelationStrategy
  {
    #keys: '13[0.0.0][415136.0.671975160][415136.0.671975154][415136.0.671975161][415136.0.671975155][415136.0.671975162][415136.0.671975156][415136.0.671975163][415136.0.671975157][415136.0.671975164][415136.0.671975158][415136.0.671975165][415136.0.671975159]'
    SequenceElementSuffix: 'Column'
    SequenceSuffix: 'Column'
  }
  RelationSide.LeftSide LibCal_SubscriberEventColumn
  {
    #keys: '3[415136.0.671975069][415136.0.671975068][415136.0.671975070]'
    Cardinality: '1toN'
    ObjectDefinition: LibCal_SubscriberEventTable
    OwningSide: 'Owned'
  }
  RelationSide.RightSide LibCal_SubscriberEventTable
  {
    #keys: '3[415136.0.671975072][415136.0.671975071][415136.0.671975073]'
    Cardinality: '0to1'
    ObjectDefinition: LibCal_SubscriberEventColumn
    OwningSide: 'Reference'
  }
}
_Main/BL/Relations/Relation_LibCal_SubscriberEventTable_LibCal_SubscriberEventRow_LibCal_Subscr.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation LibCal_SubscriberEventTable_LibCal_SubscriberEventRow_LibCal_SubscriberEventRow_LibCal_SubscriberEventTable
{
  #keys: '1[415136.0.671975080]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide LibCal_SubscriberEventRow
  {
    #keys: '3[415136.0.671975082][415136.0.671975081][415136.0.671975083]'
    Cardinality: '1toN'
    ObjectDefinition: LibCal_SubscriberEventTable
    OwningSide: 'Owned'
  }
  RelationSide.RightSide LibCal_SubscriberEventTable
  {
    #keys: '3[415136.0.671975085][415136.0.671975084][415136.0.671975086]'
    Cardinality: '0to1'
    ObjectDefinition: LibCal_SubscriberEventRow
    OwningSide: 'Reference'
  }
}
_Main/BL/Type_LibCal_Calendar/_ROOT_Type_LibCal_Calendar.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type LibCal_Calendar #extension
{
}
_Main/BL/Type_LibCal_SubscriberEventCell/Attribute_Value.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Value
{
  #keys: '3[415136.0.671975132][415136.0.671975131][415136.0.671975133]'
  ValueType: String
}
_Main/BL/Type_LibCal_SubscriberEventCell/_ROOT_Type_LibCal_SubscriberEventCell.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type LibCal_SubscriberEventCell
{
  #keys: '5[415136.0.671975128][415136.0.671975126][0.0.0][415136.0.671975127][415136.0.671975129]'
  BaseType: Object
  Description: '日历不可用事件表的单元格'
  StructuredName: 'LibCal_SubscriberEventCells'
}
_Main/BL/Type_LibCal_SubscriberEventColumn/Attribute_Index.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Index
{
  #keys: '3[415136.0.671975104][415136.0.671975103][415136.0.671975105]'
  ValueType: Number
}
_Main/BL/Type_LibCal_SubscriberEventColumn/Attribute_Name.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Name
{
  #keys: '3[415136.0.671975094][415136.0.671975093][415136.0.671975095]'
  Description: '名称'
  ValueType: String
}
_Main/BL/Type_LibCal_SubscriberEventColumn/Attribute_RowName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute RowName
{
  #keys: '3[415136.0.674522587][415136.0.674522586][415136.0.674522588]'
  ValueType: String
}
_Main/BL/Type_LibCal_SubscriberEventColumn/Function_CalcIndex.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcIndex
{
  TextBody:
  [*
    // ç”„兰鸽 May-28-2024 (created)
    value := ifexpr( isnull( this.PreviousColumn() ), 0, this.PreviousColumn().Index() + 1 )
    this.Index( value );
  *]
}
_Main/BL/Type_LibCal_SubscriberEventColumn/_ROOT_Type_LibCal_SubscriberEventColumn.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type LibCal_SubscriberEventColumn
{
  #keys: '5[415136.0.671975059][415136.0.671975057][0.0.0][415136.0.671975058][415136.0.671975060]'
  BaseType: Object
  Description: '日历不可用事件表的列'
  StructuredName: 'LibCal_SubscriberEventColumns'
}
_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_Event.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Event
{
  #keys: '3[415136.0.675350014][415136.0.675350013][415136.0.675350015]'
  Description: '事件'
  ValueType: String
}
_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_EventType.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute EventType
{
  #keys: '3[415136.0.675350024][415136.0.675350023][415136.0.675350025]'
  Description: '事件类型'
  ValueType: String
}
_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_RowNr.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute RowNr
{
  #keys: '3[415136.0.671975114][415136.0.671975113][415136.0.671975115]'
  IsReadOnly: true
  ValueType: Number
}
_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_Subscriber.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Subscriber
{
  #keys: '3[415136.0.671975222][415136.0.671975221][415136.0.671975223]'
  Description: '产线'
  ValueType: String
}
_Main/BL/Type_LibCal_SubscriberEventRow/_ROOT_Type_LibCal_SubscriberEventRow.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type LibCal_SubscriberEventRow
{
  #keys: '5[415136.0.671975064][415136.0.671975062][0.0.0][415136.0.671975063][415136.0.671975065]'
  BaseType: Object
  Description: '日历不可用事件表的行'
  StructuredName: 'LibCal_SubscriberEventRows'
}
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_ID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ID
{
  #keys: '3[415136.0.671975032][415136.0.671975031][415136.0.671975033]'
  IsReadOnly: true
  ValueType: String
}
_Main/BL/Type_LibCal_SubscriberEventTable/Attribute_Name.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Name
{
  #keys: '3[415136.0.671975022][415136.0.671975021][415136.0.671975023]'
  Description: '名称'
  ValueType: String
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeDay.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
Quintiq file version 2.0
#parent: #root
Method InitializeDay (
  LibCal_SubscriberEventTable table,
  LibCal_SubscriberEventRow row,
  DateTime starttime,
  DateTime endtime
)
{
  TextBody:
  [*
    // ç”„兰鸽 May-29-2024 (created)
    for(  startTime := starttime; startTime < endtime; startTime := startTime.StartOfNextDay() ){
      time := startTime.Format( 'M/D/Y' );
      column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time );
      if( isnull( column ) ){
        column := table.LibCal_SubscriberEventColumn( relnew, Name := time );
      }
      duration := startTime.StartOfNextDay() - startTime;
      if( startTime.StartOfNextDay() > endtime ){
        duration := endtime - startTime;
      }
      info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() );
      cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() );
      row.LibCal_SubscriberEventCell( relinsert, cell );
    }
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeMonth.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
Quintiq file version 2.0
#parent: #root
Method InitializeMonth (
  LibCal_SubscriberEventTable table,
  LibCal_SubscriberEventRow row,
  DateTime starttime,
  DateTime endtime
)
{
  TextBody:
  [*
    // ç”„兰鸽 May-29-2024 (created)
    for(  startTime := starttime; startTime < endtime; startTime := startTime.StartOfMonth() ){
      time := startTime.Format( 'M/D/Y' );
      if( starttime = startTime ){
        time := startTime.StartOfMonth().Format( 'M/D/Y' );
      }
      column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time );
      if( isnull( column ) ){
        column := table.LibCal_SubscriberEventColumn( relnew, Name := time );
      }
      duration := startTime.StartOfNextMonth() - startTime;
      if( startTime.StartOfNextMonth() > endtime ){
        duration := endtime - startTime;
      }
    //  info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() );
      cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() );
      row.LibCal_SubscriberEventCell( relinsert, cell );
    }
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
Quintiq file version 2.0
#parent: #root
Method InitializeTable (
  LibCal_Calendars subscribers,
  LibCal_EventCategory category
)
{
  TextBody:
  [*
    // ç”„兰鸽 May-28-2024 (created)
    rownr                 := this.LibCal_SubscriberEventRow( relsize );
    subscribercolumn      := selectobject( this, LibCal_SubscriberEventColumn, column, column.RowName() = 'Line' );
    if( isnull( subscribercolumn ) ){
      subscribercolumn := this.LibCal_SubscriberEventColumn( relnew, RowName := 'Line' );
    }
    eventcolumn := selectobject( this, LibCal_SubscriberEventColumn, column, column.RowName() = 'Event' );
    if( isnull( eventcolumn ) ){
      eventcolumn := this.LibCal_SubscriberEventColumn( relnew, RowName := 'Event' );
    }
    timezone := this.LibCal_Calendar().GetTimeZone();
    traverse( subscribers, Elements, subscriber ){
    //  info( '------------------------', subscriber.CalendarID(), subscriber.CalendarType() );
    //  traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation ){
      traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory().Name() = 'Unavailable' ){
    //    info( '------------------------', participation.Event().Subject(), '------', participation.Event().EventCategory().Name() );
        event := participation.Event();
        row := selectobject( this, LibCal_SubscriberEventRow, row, row.Subscriber() = subscriber.CalendarID() and row.Event() = event.Subject() and row.EventType() = event.EventType() );
        if( isnull( row ) ){
          row := this.LibCal_SubscriberEventRow( relnew, RowNr := rownr, Subscriber := subscriber.CalendarID(), Event := event.Subject(), EventType := event.EventType() );
          subscribercell := subscribercolumn.LibCal_SubscriberEventCell( relnew, Value := row.Subscriber() );
          row.LibCal_SubscriberEventCell( relinsert, subscribercell );
          eventcell := eventcolumn.LibCal_SubscriberEventCell( relnew, Value := row.Event() );
          row.LibCal_SubscriberEventCell( relinsert, eventcell );
          rownr := rownr + 1;
        }
        endTime     := participation.EndDate().DateTime( timezone ).AddAsPeriod( timezone, event.EndTimeOfDay() );
        startTime   := participation.StartDate().DateTime( timezone ).AddAsPeriod( timezone, event.StartTimeOfDay() );
    //    info( participation.StartDate().DateTime( timezone ).AddAsPeriod( timezone, event.StartTimeOfDay() ), endTime );
        if( this.ID() = 'Day' ){
          this.InitializeDay( this, row, startTime, endTime );
        }else if( this.ID() = 'Week' ){
          this.InitializeWeek( this, row, startTime, endTime );
        }else{
          this.InitializeMonth( this, row, startTime, endTime );
        }
      }
    }
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
Quintiq file version 2.0
#parent: #root
Method InitializeWeek (
  LibCal_SubscriberEventTable table,
  LibCal_SubscriberEventRow row,
  DateTime starttime,
  DateTime endtime
)
{
  TextBody:
  [*
    // ç”„兰鸽 May-29-2024 (created)
    for(  startTime := starttime; startTime < endtime; startTime := startTime.StartOfNextWeek() ){
      time := startTime.Format( 'M/D/Y' );
      if( starttime = startTime ){
        time := startTime.StartOfWeek().Format( 'M/D/Y' );
      }
      column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time );
      if( isnull( column ) ){
        column := table.LibCal_SubscriberEventColumn( relnew, Name := time );
      }
      duration := startTime.StartOfNextWeek() - startTime;
      if( startTime.StartOfNextWeek() > endtime ){
        duration := endtime - startTime;
      }
      info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() );
      cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() );
      row.LibCal_SubscriberEventCell( relinsert, cell );
    }
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/StaticMethod_InitializeTable.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
StaticMethod InitializeTable (
  LibCal_Calendars subscribers,
  LibCal_Calendar owner
)
{
  TextBody:
  [*
    // ç”„兰鸽 May-28-2024 (created)
    if( owner.LibCal_SubscriberEventTable( relsize ) < 1 ){
      owner.LibCal_SubscriberEventTable( relnew, ID := 'Day', Name := 'Day' );
      owner.LibCal_SubscriberEventTable( relnew, ID := 'Week', Name := 'Week' );
      owner.LibCal_SubscriberEventTable( relnew, ID := 'Month', Name := 'Month' );
    }
    category_i := selectobject( owner,CalendarRegistry.EventCategory, category, category.Name() = 'Unavaliable' );
    info('-----------------------------', owner.LibCal_SubscriberEventTable( relsize ), subscribers.Size(), isnull( category_i ) );
    traverse( owner, LibCal_SubscriberEventTable, table ){
      table.InitializeTable( subscribers, category_i );
    }
  *]
}
_Main/BL/Type_LibCal_SubscriberEventTable/_ROOT_Type_LibCal_SubscriberEventTable.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type LibCal_SubscriberEventTable
{
  #keys: '5[415136.0.671975018][415136.0.671975016][0.0.0][415136.0.671975017][415136.0.671975019]'
  BaseType: Object
  Description: '日历不可用事件表'
  StructuredName: 'LibCal_SubscriberEventTables'
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
Quintiq file version 2.0
Component MatrixEditorTable
{
  #keys: '[415136.0.671350612]'
  BaseType: 'WebMatrixEditor'
  Children:
  [
    Component MatrixEditorTableCell
    {
      #keys: '[415136.0.671350613]'
      BaseType: 'WebMatrixEditorCell'
      Children:
      [
        Component DataExtractorTableCell
        {
          #keys: '[415136.0.671350614]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'LibCal_SubscriberEventTable'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LibCal_SubscriberEventColumn.LibCal_SubscriberEventCell'
          ]
        }
      ]
      Properties:
      [
        Attributes: 'Value'
        Column: 'LibCal_SubscriberEventColumn'
        Row: 'LibCal_SubscriberEventRow'
        Taborder: 0
      ]
    }
    Component MatrixEditorTableRows
    {
      #keys: '[415136.0.671350617]'
      BaseType: 'WebMatrixEditorHeaderLevel'
      Children:
      [
        Component DataExtractorTableRows
        {
          #keys: '[415136.0.671350618]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'LibCal_SubscriberEventTable'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LibCal_SubscriberEventRow'
          ]
        }
      ]
      Properties:
      [
        Legend: 'RowNr'
        SortCriteria: 'RowNr'
        Taborder: 1
      ]
    }
    Component MatrixEditorTableColumns
    {
      #keys: '[415136.0.671350621]'
      BaseType: 'WebMatrixEditorHeaderLevel'
      Children:
      [
        Component DataExtractorTableColumns
        {
          #keys: '[415136.0.671350622]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'LibCal_SubscriberEventTable'
            Source: 'dhTable'
            Taborder: 0
            Transformation: 'LibCal_SubscriberEventColumn'
          ]
        }
      ]
      Properties:
      [
        Legend: 'Name'
        SortCriteria: 'Index'
        Taborder: 2
      ]
    }
    #child: matrixEditorActionBarPageTable
    #child: matrixeditorContextMenuTable
  ]
  Properties:
  [
    Columns: 'MatrixEditorTableColumns'
    ContextMenu: 'matrixeditorContextMenuTable'
    Rows: 'MatrixEditorTableRows'
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelExport.def
@@ -15,6 +15,16 @@
        Taborder: 0
      ]
    }
    Component ButtonInitialize
    {
      #keys: '[415136.0.670072471]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'ARROW_CIRCLE'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelList.def
@@ -3,6 +3,21 @@
{
  #keys: '[415136.0.658772810]'
  BaseType: 'WebPanel'
  Children:
  [
    #child: MatrixEditorTable
    Component dhTable
    {
      #keys: '[415136.0.672310139]'
      BaseType: 'WebDataHolder'
      Databinding: 'LibCal_SubscriberEventTable'
      Properties:
      [
        Description: '表'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 1
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_PanelPeriods.def
@@ -11,8 +11,9 @@
      BaseType: 'WebRadioButtonGroup'
      Properties:
      [
        BoundValue: 'Day'
        ButtonLabels: 'Day;Week;Month'
        ButtonValues: 'true;false'
        ButtonValues: 'Day;Week;Month'
        Orientation: 'horizontal'
        Taborder: 0
        Title: 'Periods'
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_matrixEditorActionBarPageTable.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component matrixEditorActionBarPageTable
{
  #keys: '[415136.0.671350625]'
  BaseType: 'matrixEditorActionBarPage'
  Properties:
  [
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_matrixeditorContextMenuTable.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component matrixeditorContextMenuTable
{
  #keys: '[415136.0.671350628]'
  BaseType: 'matrixeditorContextMenu'
  Properties:
  [
    Taborder: 4
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Method_InitializeSubscribers.def
@@ -7,7 +7,7 @@
  [*
    owner_i := LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar();
    category_i := selectobject( owner_i,CalendarRegistry.EventCategory, category, category.Name() = 'Unavaliable' );
    info( '-------------------------------', isnull( owner_i ), isnull( category_i ) );
    sEvent := owner_i.Event( relshadow,
                             EventID        := [String]Key::NextPersistentKey(),
    //                         StartTimeOfDay := start_i.TimeOfDay( timezone ),
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelExport_ButtonInitialize_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: PanelExport/ButtonInitialize
Response OnClick () id:Response_PanelExport_ButtonInitialize_OnClick
{
  #keys: '[415136.0.670072520]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar() );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_PanelPeriods_RadioButtonGroupUseForPlanning_OnChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: PanelPeriods/RadioButtonGroupUseForPlanning
Response OnChanged () id:Response_PanelPeriods_RadioButtonGroupUseForPlanning_OnChanged
{
  #keys: '[415136.0.672310167]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebRadioButtonGroup_OnChanged'
  QuillAction
  {
    Body:
    [*
      owner_i := LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar();
      table := selectobject( owner_i, LibCal_SubscriberEventTable, table, table.ID() = this.BoundValue() );
      info( isnull( owner_i ), isnull( table ), this.BoundValue() );
      info( '------------------------', owner_i.CalendarID(), table.Name() );
      dhTable.Data( table );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Component_ListList.def
@@ -28,7 +28,7 @@
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Calendar.CalendarID","title":"CalendarID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Calendar.CalendarID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.Subject","title":"Subject","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.Subject"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.StartTimeOfDay","title":"StartTimeOfDay","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.StartTimeOfDay"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.EndTimeOfDay","title":"EndTimeOfDay","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.EndTimeOfDay"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.Description","title":"Description","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.Description"}}]'
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Calendar.CalendarID","title":"CalendarID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Calendar.CalendarID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.EventType","title":"EventType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.EventType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.Subject","title":"Subject","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.Subject"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.StartTimeOfDay","title":"StartTimeOfDay","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.StartTimeOfDay"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.EndTimeOfDay","title":"EndTimeOfDay","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.EndTimeOfDay"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Event.Description","title":"Description","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Event.Description"}}]'
        ContextMenu: 'listContextMenu967'
        Taborder: 2
      ]