¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation ProductionLineBatchData_ShiftPattern3_ShiftPattern_ProductionLineBatchData3 |
| | | { |
| | | #keys: '1[414996.1.105920038]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide ShiftPattern3 |
| | | { |
| | | #keys: '3[414996.1.105920040][414996.1.105920039][414996.1.105920041]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: ProductionLineBatchData |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide ProductionLineBatchData3 |
| | | { |
| | | #keys: '3[414996.1.105920043][414996.1.105920042][414996.1.105920044]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: ShiftPattern |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation ProductionLineBatchData_Unit3_Unit_ProductionLineBatchData3 |
| | | { |
| | | #keys: '1[414996.1.105920060]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide Unit3 |
| | | { |
| | | #keys: '3[414996.1.105920062][414996.1.105920061][414996.1.105920063]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: ProductionLineBatchData |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide ProductionLineBatchData3 |
| | | { |
| | | #keys: '3[414996.1.105920065][414996.1.105920064][414996.1.105920066]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: Unit |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | owner.DispatchShiftPlan( relnew,ID := OS::GenerateGUIDAsString(), |
| | | owner.DispatchShiftPlan( relnew,ID := OS:: GenerateGUIDAsString(), |
| | | ProductLine := shiftPlan.UnitPeriodTime().Unit().ID(), |
| | | ShiftDate := shiftPlan.UnitPeriodTime().Period_MP().StartDate(), |
| | | Tips := shiftPlan.Remark(), |
| | |
| | | // è½®æ¢ç次ç¼å |
| | | shiftPattern1 := this.ShiftPattern1(); |
| | | shiftPattern2 := this.ShiftPattern2(); |
| | | shiftPattern3 := this.ShiftPattern3(); |
| | | tempShiftPattern := shiftPattern1; |
| | | |
| | | dayPeriod_MPs := selectsortedset( owner,Period_MP,period_MP, period_MP.TimeUnit() = 'Day' and period_MP.StartDate() >= this.StartDate() and period_MP.EndDate() <= this.EndDate() ,period_MP.StartDate()); |
| | |
| | | |
| | | tempPeriod_MPs := selectset( dayPeriod_MPs,Elements,period_MP,period_MP.StartDate() >= tempStartDate and period_MP.EndDate() <= tempEndDate ); |
| | | |
| | | unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP())); |
| | | unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP())); |
| | | |
| | | unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()) and not isnull( unitPeriodTime.UnitAvailability())); |
| | | unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()) and not isnull( unitPeriodTime.UnitAvailability())); |
| | | unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,exists( tempPeriod_MPs,Elements,period_MP,period_MP = unitPeriodTime.Period_MP()) and not isnull( unitPeriodTime.UnitAvailability())); |
| | | if( unitPeriodTimes1.Size() > 0 ){ |
| | | this.OnOK( unitPeriodTimes1,shiftPattern1 ); |
| | | } |
| | | if( unitPeriodTimes2.Size() > 0 ){ |
| | | this.OnOK( unitPeriodTimes2,shiftPattern2 ); |
| | | } |
| | | if( unitPeriodTimes3.Size() > 0 ){ |
| | | this.OnOK( unitPeriodTimes3,shiftPattern3 ); |
| | | } |
| | | |
| | | // æ¢ç次 |
| | | tempShiftPattern := shiftPattern1; |
| | | shiftPattern1 := shiftPattern2; |
| | | shiftPattern2 := tempShiftPattern; |
| | | shiftPattern2 := shiftPattern3; |
| | | shiftPattern3 := tempShiftPattern; |
| | | } |
| | | } |
| | | if( weekPeriod_MPs.Size() <> 0 ){ |
| | | traverse( weekPeriod_MPs,Elements,period_MP ){ |
| | | unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP()); |
| | | unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP()); |
| | | unitPeriodTimes1 := selectset( this.Unit1(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP() and not isnull( unitPeriodTime.UnitAvailability())); |
| | | unitPeriodTimes2 := selectset( this.Unit2(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP() and not isnull( unitPeriodTime.UnitAvailability())); |
| | | unitPeriodTimes3 := selectset( this.Unit3(),UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime,period_MP = unitPeriodTime.Period_MP() and not isnull( unitPeriodTime.UnitAvailability())); |
| | | |
| | | if( unitPeriodTimes1.Size() > 0 ){ |
| | | this.OnOK( unitPeriodTimes1,shiftPattern1 ); |
| | |
| | | if( unitPeriodTimes2.Size() > 0 ){ |
| | | this.OnOK( unitPeriodTimes2,shiftPattern2 ); |
| | | } |
| | | |
| | | if( unitPeriodTimes3.Size() > 0 ){ |
| | | this.OnOK( unitPeriodTimes3,shiftPattern3 ); |
| | | } |
| | | |
| | | // æ¢ç次 |
| | | tempShiftPattern := shiftPattern1; |
| | | shiftPattern1 := shiftPattern2; |
| | | shiftPattern2 := tempShiftPattern; |
| | | shiftPattern2 := shiftPattern3; |
| | | shiftPattern3 := tempShiftPattern; |
| | | } |
| | | } |
| | | |
| | |
| | | minloadthreshold := firstElement.MinimumLoadThreshold(); |
| | | } |
| | | } |
| | | isbatchedit := unitPeriodTimes.Size() > 1; |
| | | |
| | | isbatchedit := unitPeriodTimes.Size() > 1; |
| | | UnitAvailability::CreateOrUpdateForUnitPeriodTimes( unitPeriodTimes, |
| | | not isbatchedit or false, |
| | | timeunit, |
| | |
| | | Method Update ( |
| | | Unit line1, |
| | | Unit line2, |
| | | Unit line3, |
| | | ShiftPattern shiftPattern1, |
| | | ShiftPattern shiftPattern2, |
| | | ShiftPattern shiftPattern3, |
| | | Date startDate, |
| | | Date endDate |
| | | ) |
| | |
| | | |
| | | this.ShiftPattern1( relset, shiftPattern1 ); |
| | | this.ShiftPattern2( relset, shiftPattern2 ); |
| | | this.ShiftPattern3( relset, shiftPattern3 ); |
| | | this.Unit1( relset, line1 ); |
| | | this.Unit2( relset, line2 ); |
| | | this.Unit3( relset, line3 ); |
| | | this.StartDate( startDate ); |
| | | this.EndDate( endDate ); |
| | | *] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method VerifyUnits ( |
| | | const Unit unit1, |
| | | const Unit unit2, |
| | | const Unit unit3 |
| | | ) const declarative as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Sep-29-2024 (created) |
| | | return ( this.Unit1() = unit1 or this.Unit2() = unit2 or this.Unit3() = unit3 or |
| | | this.Unit1() = unit2 or this.Unit2() = unit3 or this.Unit3() = unit1 or |
| | | this.Unit1() = unit3 or this.Unit2() = unit1 or this.Unit3() = unit2 ) |
| | | *] |
| | | } |
| | |
| | | value := true; |
| | | //ï¼3ï¼ å䏿¶é´ï¼ä¸æ¡äº§çº¿ä¸å¯ä»¥å夿¡äº§çº¿è½®æ¢ç产ï¼å¦æäº§çº¿1ZKGå产线2ZKçè½®æ¢ç次已ç»å¨4/29/2024çæï¼é£ä¹äº§çº¿1ZKGåå
¶ä»äº§çº¿çè½®æ¢çæ¬¡æ æ³å¨å䏿¶é´çæï¼æ¤æ¶ãEnableãæé®ç¦ç¨ |
| | | verifyData := select( owner,ProductionLineBatchData,plbd, plbd <> this and plbd.IsEnable() and |
| | | ( plbd.Unit1() = this.Unit1() or plbd.Unit2() = this.Unit2() or plbd.Unit1() = this.Unit2() or plbd.Unit2() = this.Unit1()) and |
| | | plbd.VerifyUnits( this.Unit1(),this.Unit2(),this.Unit3() ) and |
| | | LocalTool::IsOverlap( plbd.StartDate(),plbd.EndDate(),this.StartDate(),this.EndDate())); |
| | | |
| | | if( not isnull( verifyData )){ |
| | |
| | | MacroPlan owner, |
| | | Unit line1, |
| | | Unit line2, |
| | | Unit line3, |
| | | ShiftPattern shiftPattern1, |
| | | ShiftPattern shiftPattern2, |
| | | ShiftPattern shiftPattern3, |
| | | Date startDate, |
| | | Date endDate |
| | | ) as ProductionLineBatchData |
| | |
| | | TextBody: |
| | | [* |
| | | // rislai Jun-7-2024 (created) |
| | | if( isnull( shiftPattern1 ) or isnull( shiftPattern2 ) or isnull( line1 ) or isnull( line2 )){ |
| | | if( isnull( shiftPattern1 ) or isnull( line1 ) ){ |
| | | error( "æ°æ®ä¸è½ä¸ºç©ºï¼" ); |
| | | } |
| | | // ï¼1ï¼ æ°å¢äº§çº¿1å产线2ç¸åæ¶æ¥éâç¸åäº§çº¿æ æ³æ°å¢âï¼ |
| | |
| | | data := owner.ProductionLineBatchData( relnew, |
| | | ShiftPattern1 := shiftPattern1, |
| | | ShiftPattern2 := shiftPattern2, |
| | | ShiftPattern3 := shiftPattern3, |
| | | Unit1 := line1, |
| | | Unit2 := line2, |
| | | Unit3 := line3, |
| | | StartDate := startDate, |
| | | EndDate := endDate ); |
| | | |
| | |
| | | DataBinding: 'DialogData.Data.ShiftPattern1' |
| | | DisplayField: 'Name' |
| | | Label: 'Shift pattern 1' |
| | | Taborder: 2 |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component ddlShiftPattern2 |
| | |
| | | DataBinding: 'DialogData.Data.ShiftPattern2' |
| | | DisplayField: 'Name' |
| | | Label: 'Shift pattern 2' |
| | | Taborder: 3 |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | Component dsStartDate |
| | |
| | | [ |
| | | DataBinding: 'DialogData.Data.StartDate' |
| | | Label: 'Start date' |
| | | Taborder: 4 |
| | | Taborder: 6 |
| | | ] |
| | | } |
| | | Component dsEndDate |
| | |
| | | [ |
| | | DataBinding: 'DialogData.Data.EndDate' |
| | | Label: 'End date' |
| | | Taborder: 7 |
| | | ] |
| | | } |
| | | Component ddlLine3 |
| | | { |
| | | #keys: '[414996.1.106189463]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'Unit' |
| | | Children: |
| | | [ |
| | | Component deContent872 |
| | | { |
| | | #keys: '[414996.1.106189464]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'structured[Unit]' |
| | | Source: 'ApplicationMacroPlanner.DataHolderUnit' |
| | | Taborder: 0 |
| | | Transformation: 'Elements.astype(Unit)' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DialogData.Data.Unit3' |
| | | DisplayField: 'Name' |
| | | Label: 'Line 3' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component ddlShiftPattern3 |
| | | { |
| | | #keys: '[414996.1.108410230]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'ShiftPattern' |
| | | Children: |
| | | [ |
| | | Component deContent529 |
| | | { |
| | | #keys: '[414996.1.108410231]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'MacroPlan' |
| | | Source: 'MacroPlan' |
| | | Taborder: 0 |
| | | Transformation: 'ShiftPattern' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | DataBinding: 'DialogData.Data.ShiftPattern3' |
| | | DisplayField: 'Name' |
| | | Label: 'Shift pattern 3' |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | |
| | | if( not isnull( DialogData.Data( ))){ |
| | | DialogData.Data( ).Update( ddlLine1.Data(), |
| | | ddlLine2.Data(), |
| | | ddlLine3.Data(), |
| | | ddlShiftPattern1.Data(), |
| | | ddlShiftPattern2.Data(), |
| | | ddlShiftPattern3.Data(), |
| | | dsStartDate.Date(), |
| | | dsEndDate.Date()); |
| | | }else{ |
| | | ProductionLineBatchData::Create( MacroPlan, |
| | | ddlLine1.Data(), |
| | | ddlLine2.Data(), |
| | | ddlLine3.Data(), |
| | | ddlShiftPattern1.Data(), |
| | | ddlShiftPattern2.Data(), |
| | | ddlShiftPattern3.Data(), |
| | | dsStartDate.Date(), |
| | | dsEndDate.Date()); |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImageIsEnable","title":"ImageIsEnable","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImageIsEnable"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit1.Name","title":"Unit1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit1.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit2.Name","title":"Unit2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit2.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftPattern1.Name","title":"Shift pattern 1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ShiftPattern1.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftPattern2.Name","title":"Shift pattern 2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ShiftPattern2.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"Start date","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"End date","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}}]' |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImageIsEnable","title":"ImageIsEnable","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImageIsEnable"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit1.Name","title":"Unit1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit1.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit2.Name","title":"Unit2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit2.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit3.Name","title":"Unit3","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit3.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftPattern1.Name","title":"Shift pattern 1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ShiftPattern1.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftPattern2.Name","title":"Shift pattern 2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ShiftPattern2.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftPattern3.Name","title":"Shift pattern 3","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ShiftPattern3.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"Start date","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"End date","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}}]' |
| | | ContextMenu: 'listContextMenuProductionLineBatchData' |
| | | Taborder: 2 |
| | | ] |