xiaoding721
2024-09-25 da53ff7a774a54bae8248c5fb310dcdeb80c3cc7
新增下发班次信息报表,修复一些bug
已修改5个文件
已添加11个文件
已删除4个文件
440 ■■■■■ 文件已修改
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_Dispatch.qbl 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_IDHolder/StaticMethod_GetGUID.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_IDHolder/_ROOT_Type_IDHolder.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Test/StaticMethod_Test.qbl 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UphillRouting/Method_Use.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form568/Component_pOperation.def 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form568/Response_pOperation_Button593_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form568/Response_pOperation_Button633_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form568/Response_pOperation_bDownload_OnClick.def 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form568/Response_pOperation_dhXMLDataListener_OnDataChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_ListData.def 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelData.def 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelDispatchShiftSchedulingInformation.def 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_listActionBarPageData.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_listContextMenuData.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Response_PanelDispatchShiftSchedulingInformation_ButtonDispatch_OnClick#844.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/_ROOT_Component_FormDispatchShiftSchedulingInformation.def 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_PanelRibbon322#88.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_bDownload_OnClick.def 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_Dispatch.qbl
@@ -1,9 +1,84 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Dispatch
StaticMethod Dispatch (
  Date startDate,
  Date endDate,
  const OfflinePlanTable offlinePlan,
  RecycleBin owner
)
{
  TextBody:
  [*
    // Akari Sep-4-2024 (created)
    owner.DispatchShiftSchedulingInformation( relflush );
    macroPlan := offlinePlan.MacroPlan();
    now := DateTime::Now();
    shiftPatterns := selectset( macroPlan,ShiftPattern,object,true );
    shiftPatternIndexTree := NamedValueTree::Create();
    for( i := 0; i < shiftPatterns.Size(); i++){
      shiftPattern := shiftPatterns.Element( i );
      shiftPatternHandle := shiftPatternIndexTree.GetHandle( shiftPattern.Name() );
      shiftPatternIndexTree.Root().AddChild( shiftPatternHandle,i );
    }
    units := selectset( macroPlan,Unit,object, true );
    unitIndexTree := NamedValueTree::Create();
    for( i := 0; i < units.Size(); i++){
      unit := units.Element( i );
      unitHandle := unitIndexTree.GetHandle( unit.Name() );
      unitIndexTree.Root().AddChild( unitHandle,i );
    }
    traverse( offlinePlan,OfflinePlanRow,row ){
      productID := row.ProductID();
      productLine := row.ProductionLine();
      factory := constnull( Unit );
      {
        unitHandle := unitIndexTree.GetHandle( productLine );
        unitIndex := guard( unitIndexTree.Root().Child( unitHandle ), null( NamedValue ));
        if( not isnull( unitIndex )){
          unit := units.Element( unitIndex.GetValueAsNumber() );
          temp1 := unit;
          temp2 := unit.Parent();
          while( not isnull( temp1.Parent())){
            temp2 := temp1;
            temp1 := temp1.Parent();
          }
          factory := temp2;
        }
      }
      traverse( row,OfflinePlanCell,cell ,startDate <= cell.OfflinePlanColumn().ColumnDate() and endDate > cell.OfflinePlanColumn().ColumnDate()){
        shiftDate := cell.OfflinePlanColumn().ColumnDate();
        shiftName := cell.Shift();
        shiftVolume := cell.Quantity();
        shiftDayTime := constnull( ShiftDayTime );
        {
          shiftPatternHandle := shiftPatternIndexTree.GetHandle( shiftName );
          shiftPatternIndex := guard( shiftPatternIndexTree.Root().Child( shiftPatternHandle ),null( NamedValue ));
          if( not isnull( shiftPatternIndex )){
            shiftPattern := shiftPatterns.Element( shiftPatternIndex.GetValueAsNumber() );
            shiftDayTime := select( shiftPattern,ShiftDayTime,object,true );
          }
        }
        shiftSchedulingInformation := owner.DispatchShiftSchedulingInformation( relnew ,
                                                                                ID := IDHolder::GetGUID() ,
                                                                                InterfaceTime := now ,
                                                                                VersionName := macroPlan.MDSMacroPlan().Description(),
                                                                                Product := productID,
                                                                                ProductLine := productLine,
                                                                                ShiftDate := shiftDate,
                                                                                ShiftName := shiftName,
                                                                                ShiftVolume := shiftVolume );
        if( not isnull( shiftDayTime )){
          shiftSchedulingInformation.ShiftStartDate( shiftDayTime.StartDateTime() );
          shiftSchedulingInformation.ShiftEndDate( shiftDayTime.EndDateTIme() );
        }
        if( not isnull( factory )){
          shiftSchedulingInformation.FactoryName( factory.Name() );
        }
      }
    }
  *]
}
_Main/BL/Type_IDHolder/StaticMethod_GetGUID.qbl
对比新文件
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetGUID () const as String
{
  TextBody:
  [*
    // Akari Sep-24-2024 (created)
    return OS::GenerateGUIDAsString();
  *]
}
_Main/BL/Type_IDHolder/_ROOT_Type_IDHolder.qbl
对比新文件
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type IDHolder #extension
{
}
_Main/BL/Type_Test/StaticMethod_Test.qbl
@@ -11,21 +11,8 @@
{
  TextBody:
  [*
    archive.ArchivePP( relflush );
    archive.ArchiveBudget( relflush );
    archive.ArchivePP( relnew,Name := "2025 M" )
    archive.ArchivePP( relnew,Name := "2025 W" )
    archive.ArchivePP( relnew,Name := "2026 M" )
    archive.ArchivePP( relnew,Name := "2026 W" )
    archive.ArchivePP( relnew,Name := "2027 M" )
    archive.ArchivePP( relnew,Name := "2027 W" )
    archive.ArchiveBudget( relnew,Name := "VWED-2025 M" )
    archive.ArchiveBudget( relnew,Name := "VWED-2025 W" )
    archive.ArchiveBudget( relnew,Name := "VWED-2026 M" )
    archive.ArchiveBudget( relnew,Name := "VWED-2026 W" )
    archive.ArchiveBudget( relnew,Name := "2VWED-027 M" )
    archive.ArchiveBudget( relnew,Name := "VWED-2027 W" )
    traverse( macroPlan,Product_MP,product ){
      archive.ActualDailyProductionData( relnew,ProductNo := product.ID(),ProductionDate := Date::Construct( 2020,4,1 ),ActualOut := 100);
    }
  *]
}
_Main/BL/Type_UphillRouting/Method_Use.qbl
@@ -7,7 +7,7 @@
    // Akari Aug-26-2024 (created)
    this.IsUsed( true );
    
    copy_routing := this.Routing().Copy( this.Suffix() + this.StartDate().Format( "Y-M2-D2") );
    copy_routing := this.Routing().Copy( this.Suffix() + [String]this.Percentage()+"%_" + this.StartDate().Format( "Y-M2-D2") );
    
    copy_routing.Start( this.StartDate() );
    
_Main/UI/MacroPlannerWebApp/Component_Form568/Component_pOperation.def
@@ -13,18 +13,7 @@
      [
        Image: 'EXPORT1'
        Label: '瀵煎嚭'
        Taborder: 2
      ]
    }
    Component bDownload id:bDownload_774
    {
      #keys: '[412672.0.1084305565]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'DOWNLOAD'
        Label: '涓嬭浇'
        Taborder: 3
        Taborder: 0
      ]
    }
    Component dhXMLDataListener
@@ -50,26 +39,6 @@
      ]
      Properties:
      [
        Taborder: 4
      ]
    }
    Component Button593
    {
      #keys: '[414996.1.20921786]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: '鍙戝竷鐗堟湰'
        Taborder: 0
      ]
    }
    Component Button633
    {
      #keys: '[414996.1.20921810]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: '姹囨姤鐗堟湰'
        Taborder: 1
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_Form568/Response_pOperation_Button593_OnClick.def
文件已删除
_Main/UI/MacroPlannerWebApp/Component_Form568/Response_pOperation_Button633_OnClick.def
文件已删除
_Main/UI/MacroPlannerWebApp/Component_Form568/Response_pOperation_bDownload_OnClick.def
文件已删除
_Main/UI/MacroPlannerWebApp/Component_Form568/Response_pOperation_dhXMLDataListener_OnDataChanged.def
对比新文件
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: pOperation/dhXMLDataListener
Response OnDataChanged () id:Response_pOperation_dhXMLDataListener_OnDataChanged
{
  #keys: '[414996.1.100510169]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  QuillAction
  {
    Body:
    [*
      binaryValue := dhXMLDataListener.Data( ).Export();
      Application.Download( "鐝璁″垝_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
      dhXMLDataListener.Data( ).Delete();
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_ListData.def
对比新文件
@@ -0,0 +1,41 @@
Quintiq file version 2.0
Component ListData
{
  #keys: '[414996.1.97731280]'
  BaseType: 'WebList'
  Children:
  [
    Component DataExtractorData
    {
      #keys: '[414996.1.97731281]'
      BaseType: 'WebDataExtractor'
      Properties:
      [
        DataType: 'external[RecycleBin]'
        Source: 'RecycleBin'
        Taborder: 0
        Transformation: 'DispatchShiftSchedulingInformation'
      ]
    }
    #child: listActionBarPageData
    Component DataSetLevelData
    {
      #keys: '[414996.1.97731286]'
      BaseType: 'WebDataSetLevel'
      Children:
      [
        #child: listContextMenuData
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Fac","title":"Fac","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Fac"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FactoryName","title":"FactoryName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FactoryName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"InterfaceTime","title":"InterfaceTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"InterfaceTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Product","title":"Product","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Product"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductLine","title":"ProductLine","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductLine"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftDate","title":"ShiftDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftEndDate","title":"ShiftEndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftEndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftName","title":"ShiftName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftStartDate","title":"ShiftStartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftStartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftVolume","title":"ShiftVolume","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftVolume"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SingleShiftName","title":"SingleShiftName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SingleShiftName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Tips","title":"Tips","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Tips"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"VersionFlag","title":"VersionFlag","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"VersionFlag"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"VersionName","title":"VersionName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"VersionName"}}]'
        ContextMenu: 'listContextMenuData'
        Taborder: 2
      ]
    }
  ]
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelData.def
对比新文件
@@ -0,0 +1,14 @@
Quintiq file version 2.0
Component PanelData
{
  #keys: '[414996.1.100510623]'
  BaseType: 'WebPanel'
  Children:
  [
    #child: ListData
  ]
  Properties:
  [
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_PanelDispatchShiftSchedulingInformation.def
对比新文件
@@ -0,0 +1,45 @@
Quintiq file version 2.0
Component PanelDispatchShiftSchedulingInformation
{
  #keys: '[414996.1.100510600]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ButtonDispatch id:ButtonDispatch_715
    {
      #keys: '[414996.1.100510694]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: '鐢熸垚涓嬪彂鏁版嵁'
        Taborder: 2
      ]
    }
    Component dsStartDate
    {
      #keys: '[414996.1.100510711]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        Label: 'StartDate'
        Taborder: 0
      ]
    }
    Component dsEndDate
    {
      #keys: '[414996.1.100510731]'
      BaseType: 'WebDateSelector'
      Properties:
      [
        Label: 'EndDate'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    FixedSize: true
    Orientation: 'horizontal'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_listActionBarPageData.def
对比新文件
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component listActionBarPageData
{
  #keys: '[414996.1.97731283]'
  BaseType: 'listActionBarPage'
  Properties:
  [
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Component_listContextMenuData.def
对比新文件
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component listContextMenuData
{
  #keys: '[414996.1.97731288]'
  BaseType: 'listContextMenu'
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/Response_PanelDispatchShiftSchedulingInformation_ButtonDispatch_OnClick#844.def
对比新文件
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: PanelDispatchShiftSchedulingInformation/ButtonDispatch_715
Response OnClick () id:Response_FormDispatchShiftSchedulingInformation_ButtonDispatch_OnClick_844
{
  #keys: '[414996.1.100510693]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      offlineTable := select( MacroPlan,OfflinePlanTable,table,true );
      DispatchShiftSchedulingInformation::Dispatch( dsStartDate.Date(),dsEndDate.Date(),offlineTable,RecycleBin );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormDispatchShiftSchedulingInformation/_ROOT_Component_FormDispatchShiftSchedulingInformation.def
对比新文件
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent FormDispatchShiftSchedulingInformation
{
  #keys: '[414996.1.100510483]'
  BaseType: 'WebForm'
  Children:
  [
    #child: PanelData
    #child: PanelDispatchShiftSchedulingInformation
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Component_PanelRibbon322#88.def
@@ -130,16 +130,6 @@
        Taborder: 9
      ]
    }
    Component bDownload
    {
      #keys: '[412672.1.97871677]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'DOWNLOAD'
        Taborder: 10
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_bDownload_OnClick.def
文件已删除
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def
对比新文件
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: PanelRibbon322_88/dhXMLDataListener
Response OnDataChanged () id:Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged
{
  #keys: '[414996.1.100521179]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  QuillAction
  {
    Body:
    [*
      binaryValue := dhXMLDataListener.Data( ).Export();
      Application.Download( MP_Cell_ScheduleSummary::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
      dhXMLDataListener.Data( ).Delete();
    *]
    GroupServerCalls: false
  }
}