Finish Order Lock
完成订单锁定/解锁功能开发
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsLocked |
| | | { |
| | | #keys: '3[412960.0.250388873][412960.0.250388872][412960.0.250388874]' |
| | | Description: 'æ¯å¦è¢«éå®' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod LockUnlock ( |
| | | MacroPlan owner, |
| | | CustomerOrders customerorders, |
| | | Boolean lock |
| | | ) |
| | | { |
| | | Description: 'éå®/è§£é订å' |
| | | TextBody: |
| | | [* |
| | | // Administrator Sep-21-2023 (created) |
| | | lastmodifytime := DateTime::ActualTime(); |
| | | lastmodify := QuintiqUser::CurrentUser().Username(); |
| | | if( lock ){ |
| | | traverse( customerorders, Elements, order ){ |
| | | order.IsLocked( lock ); |
| | | order.LastModify( lastmodify ); |
| | | order.LastModifyTime( lastmodifytime ); |
| | | owner.OrderLockLog( relnew, |
| | | CustomerName := order.CustomerName(), |
| | | End := order.First().AsPlanningBaseSalesDemandInPeriod().End().Date(), |
| | | EndDate := order.EndDate(), |
| | | IsLocked := order.IsLocked(), |
| | | LastModify := order.LastModify(), |
| | | LastModifyTime := order.LastModifyTime(), |
| | | OrderID := order.OrderID(), |
| | | Price := order.Price(), |
| | | ProductID := order.ProductID(), |
| | | Quantity := order.Quantity(), |
| | | SalesSegmentName := order.SalesSegmentName(), |
| | | StockingPointID := order.StockingPointID(), |
| | | UnitOfMeasureName := order.UnitOfMeasureName(), |
| | | Notes := "æ·»å éå®" ); |
| | | } |
| | | }else{ |
| | | traverse( customerorders, Elements, order ){ |
| | | order.IsLocked( lock ); |
| | | order.LastModify( lastmodify ); |
| | | order.LastModifyTime( lastmodifytime ); |
| | | owner.OrderLockLog( relnew, |
| | | CustomerName := order.CustomerName(), |
| | | End := order.First().AsPlanningBaseSalesDemandInPeriod().End().Date(), |
| | | EndDate := order.EndDate(), |
| | | IsLocked := order.IsLocked(), |
| | | LastModify := order.LastModify(), |
| | | LastModifyTime := order.LastModifyTime(), |
| | | OrderID := order.OrderID(), |
| | | Price := order.Price(), |
| | | ProductID := order.ProductID(), |
| | | Quantity := order.Quantity(), |
| | | SalesSegmentName := order.SalesSegmentName(), |
| | | StockingPointID := order.StockingPointID(), |
| | | UnitOfMeasureName := order.UnitOfMeasureName(), |
| | | Notes := "è§£é¤éå®" ); |
| | | } |
| | | } |
| | | *] |
| | | } |
ÎļþÃû´Ó _Main/BL/Type_OrderLockLog/Attribute_IsFirmed#2.qbl ÐÞ¸Ä |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsFirmed |
| | | Attribute IsLocked |
| | | { |
| | | #keys: '3[412960.0.217504477][412960.0.217504476][412960.0.217504478]' |
| | | ValueType: Boolean |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Notes |
| | | { |
| | | #keys: '3[412960.0.250388891][412960.0.250388890][412960.0.250388892]' |
| | | Description: '夿³¨' |
| | | ValueType: String |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"OrderID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegmentName","title":"SalesSegmentName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SalesSegmentName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsFirmed","title":"IsFirmed","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsFirmed"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"First.AsPlanningBaseSalesDemandInPeriod.End","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"First.AsPlanningBaseSalesDemandInPeriod.End"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModify","title":"LastModify","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModify"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModifyTime","title":"LastModifyTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModifyTime"}}]' |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"OrderID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegmentName","title":"SalesSegmentName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SalesSegmentName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsLocked","title":"IsLocked","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsLocked"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"First.AsPlanningBaseSalesDemandInPeriod.End","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"First.AsPlanningBaseSalesDemandInPeriod.End"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModify","title":"LastModify","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModify"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModifyTime","title":"LastModifyTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModifyTime"}}]' |
| | | ContextMenu: 'listContextMenuOrderLock' |
| | | Taborder: 2 |
| | | ] |
| | |
| | | #keys: '[412960.0.245380616]' |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | GroupServerCalls: true |
| | | Precondition: |
| | | [* |
| | | checkorders := DataHolderOrderLockCheckedOrder.Data(); |
| | | pispips := construct( ProductInStockingPointInPeriods ); |
| | | traverse( checkorders, Elements, order ){ |
| | | pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ) ); |
| | | } |
| | | return ProductInStockingPointInPeriod::CanLockUnlock( pispips, feedback ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | checkorders := DataHolderOrderLockCheckedOrder.Data(); |
| | | pispips := construct( ProductInStockingPointInPeriods ); |
| | | macroplan := MacroPlan; |
| | | traverse( checkorders, Elements, order ){ |
| | | info( order.ProductID() ); |
| | | pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ) ); |
| | | } |
| | | |
| | | pispipLeafs := selectset( pispips, |
| | | Elements.astype( ProductInStockingPointInPeriodPlanningLeaf ), |
| | | pispip, |
| | | true ); |
| | | |
| | | CustomerOrder::LockUnlock( macroplan, checkorders, true ); |
| | | ProductInStockingPointInPeriod::LockUnlockPlanning( pispipLeafs, true, true ); |
| | | *] |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelOrderLockHeader_545/ButtonOrderLockHeaderUnlock |
| | | Response OnClick () id:Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderUnlock_OnClick |
| | | { |
| | | #keys: '[412960.0.250520489]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | GroupServerCalls: true |
| | | Precondition: |
| | | [* |
| | | checkorders := DataHolderOrderLockCheckedOrder.Data(); |
| | | pispips := construct( ProductInStockingPointInPeriods ); |
| | | traverse( checkorders, Elements, order ){ |
| | | pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ) ); |
| | | } |
| | | return ProductInStockingPointInPeriod::CanLockUnlock( pispips, feedback ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | checkorders := DataHolderOrderLockCheckedOrder.Data(); |
| | | pispips := construct( ProductInStockingPointInPeriods ); |
| | | macroplan := MacroPlan; |
| | | traverse( checkorders, Elements, order ){ |
| | | pispips.Add( selectset( order, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ) ); |
| | | } |
| | | |
| | | pispipLeafs := selectset( pispips, |
| | | Elements.astype( ProductInStockingPointInPeriodPlanningLeaf ), |
| | | pispip, |
| | | true ); |
| | | |
| | | CustomerOrder::LockUnlock( macroplan, checkorders, false ); |
| | | ProductInStockingPointInPeriod::LockUnlockPlanning( pispipLeafs, false, true ); |
| | | *] |
| | | } |
| | | } |
| | |
| | | newfilter := ""; |
| | | findcount := 0; |
| | | traverse( existfilterlist, Elements, filter ){ |
| | | if( filter.FindString( "IsFirmed()", 0 ) >= 0 ){ |
| | | if( filter.FindString( "IsLocked()", 0 ) >= 0 ){ |
| | | if( this.BoundValue() = "locked" ){ |
| | | if( newfilter = "" ){ |
| | | newfilter := "( object.IsFirmed() = true )"; |
| | | newfilter := "( object.IsLocked() = true )"; |
| | | }else{ |
| | | newfilter := newfilter + " and " + "( object.IsFirmed() = true )"; |
| | | newfilter := newfilter + " and " + "( object.IsLocked() = true )"; |
| | | } |
| | | }else if( this.BoundValue() = "unlocked" ){ |
| | | if( newfilter = "" ){ |
| | | newfilter := "( object.IsFirmed() = false )"; |
| | | newfilter := "( object.IsLocked() = false )"; |
| | | }else{ |
| | | newfilter := newfilter + " and " + "( object.IsFirmed() = false )"; |
| | | newfilter := newfilter + " and " + "( object.IsLocked() = false )"; |
| | | } |
| | | }else if( this.BoundValue() = "all" ){ |
| | | newfilter := newfilter + ""; |
| | |
| | | if( findcount = 0 ){ |
| | | if( this.BoundValue() = "locked" ){ |
| | | if( newfilter = "" ){ |
| | | newfilter := "( object.IsFirmed() = true )"; |
| | | newfilter := "( object.IsLocked() = true )"; |
| | | }else{ |
| | | newfilter := newfilter + " and " + "( object.IsFirmed() = true )"; |
| | | newfilter := newfilter + " and " + "( object.IsLocked() = true )"; |
| | | } |
| | | }else if( this.BoundValue() = "unlocked" ){ |
| | | if( newfilter = "" ){ |
| | | newfilter := "( object.IsFirmed() = false )"; |
| | | newfilter := "( object.IsLocked() = false )"; |
| | | }else{ |
| | | newfilter := newfilter + " and " + "( object.IsFirmed() = false )"; |
| | | newfilter := newfilter + " and " + "( object.IsLocked() = false )"; |
| | | } |
| | | }else if( this.BoundValue() = "all" ){ |
| | | newfilter := newfilter + ""; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component ListOrderLockLog |
| | | { |
| | | #keys: '[412960.0.251923186]' |
| | | BaseType: 'WebList' |
| | | Children: |
| | | [ |
| | | Component DataExtractorOrderLockLog473 |
| | | { |
| | | #keys: '[412960.0.251923187]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'structured[OrderLockLog]' |
| | | Source: 'DataHolderOrderLockLog' |
| | | Taborder: 0 |
| | | Transformation: 'Elements' |
| | | ] |
| | | } |
| | | #child: listActionBarPageOrderLockLog |
| | | Component DataSetLevelOrderLockLog |
| | | { |
| | | #keys: '[412960.0.251923192]' |
| | | BaseType: 'WebDataSetLevel' |
| | | Children: |
| | | [ |
| | | #child: listContextMenuOrderLockLog |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"OrderID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegmentName","title":"SalesSegmentName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SalesSegmentName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsLocked","title":"IsLocked","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsLocked"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"End","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"End"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModify","title":"LastModify","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModify"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModifyTime","title":"LastModifyTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModifyTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Notes","title":"Notes","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Notes"}}]' |
| | | ContextMenu: 'listContextMenuOrderLockLog' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component PanelOrderLockLog |
| | | { |
| | | #keys: '[412960.0.250590911]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: ListOrderLockLog |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listActionBarPageOrderLockLog |
| | | { |
| | | #keys: '[412960.0.251923189]' |
| | | BaseType: 'listActionBarPage' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listContextMenuOrderLockLog |
| | | { |
| | | #keys: '[412960.0.251923194]' |
| | | BaseType: 'listContextMenu' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: MacroPlannerWebApp |
| | | OrphanComponent FormOrderLockLog |
| | | { |
| | | #keys: '[412960.0.248150315]' |
| | | BaseType: 'WebForm' |
| | | Children: |
| | | [ |
| | | #child: PanelOrderLockLog |
| | | Component DataHolderOrderLockLog |
| | | { |
| | | #keys: '[412960.0.250590928]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'structured[OrderLockLog]*' |
| | | Children: |
| | | [ |
| | | Component DataExtractorOrderLockLog |
| | | { |
| | | #keys: '[412960.0.250590940]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'MacroPlan' |
| | | Source: 'MacroPlan' |
| | | Taborder: 0 |
| | | Transformation: 'OrderLockLog' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Description: '订åéå®/è§£éæ¥å¿' |
| | | Image: 'TEXT_LOCK' |
| | | Title: '订åéå®/è§£éæ¥å¿' |
| | | ] |
| | | } |
| | |
| | | userconfigurableinformation |
| | | { |
| | | } |
| | | page: 'applicationDevelopmentActionBarPageDef' |
| | | group: '' |
| | | index: 2 |
| | | image: 'DOCUMENT_LOCK' |
| | | page: 'applicationDevelopmentActionBarPageDef' |
| | | group: '' |
| | | description: '' |
| | | } |
| | | formatversion: 2 |
| | |
| | | userconfigurableinformation |
| | | { |
| | | } |
| | | page: 'applicationDevelopmentActionBarPageDef' |
| | | group: '' |
| | | index: 1 |
| | | image: 'WINDOW_TIME' |
| | | page: 'applicationDevelopmentActionBarPageDef' |
| | | group: '' |
| | | description: '' |
| | | } |
| | | formatversion: 2 |