| | |
| | | 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() ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetGUID () const as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Sep-24-2024 (created) |
| | | return OS::GenerateGUIDAsString(); |
| | | *] |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type IDHolder #extension |
| | | { |
| | | } |
| | |
| | | { |
| | | 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); |
| | | } |
| | | *] |
| | | } |
| | |
| | | // 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() ); |
| | | |
| | |
| | | [ |
| | | 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 |
| | |
| | | ] |
| | | 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 |
| | | ] |
| | | } |
对比新文件 |
| | |
| | | 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 |
| | | } |
| | | } |
对比新文件 |
| | |
| | | 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 |
| | | ] |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelData |
| | | { |
| | | #keys: '[414996.1.100510623]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: ListData |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
对比新文件 |
| | |
| | | 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 |
| | | ] |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | Component listActionBarPageData |
| | | { |
| | | #keys: '[414996.1.97731283]' |
| | | BaseType: 'listActionBarPage' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | Component listContextMenuData |
| | | { |
| | | #keys: '[414996.1.97731288]' |
| | | BaseType: 'listContextMenu' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
对比新文件 |
| | |
| | | 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 ); |
| | | *] |
| | | } |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: MacroPlannerWebApp |
| | | OrphanComponent FormDispatchShiftSchedulingInformation |
| | | { |
| | | #keys: '[414996.1.100510483]' |
| | | BaseType: 'WebForm' |
| | | Children: |
| | | [ |
| | | #child: PanelData |
| | | #child: PanelDispatchShiftSchedulingInformation |
| | | ] |
| | | } |
| | |
| | | Taborder: 9 |
| | | ] |
| | | } |
| | | Component bDownload |
| | | { |
| | | #keys: '[412672.1.97871677]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'DOWNLOAD' |
| | | Taborder: 10 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
对比新文件 |
| | |
| | | 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 |
| | | } |
| | | } |