| | |
| | | Date endDate, |
| | | Real percentage, |
| | | String suffix |
| | | ) |
| | | ) as UphillRouting |
| | | { |
| | | TextBody: |
| | | [* |
| | | // rislai Jun-14-2024 (created) |
| | | |
| | | verifyData := select( owner,UphillRouting,ur,ur.Type() = suffix and LocalTool::IsOverlap( ur.StartDate(),ur.EndDate(),startDate,endDate )); |
| | | verifyData := select( owner,UphillRouting,ur,ur.Suffix() = suffix and LocalTool::IsOverlap( ur.StartDate(),ur.EndDate(),startDate,endDate )); |
| | | if( not isnull( verifyData )){ |
| | | error( "设置的Start和End不可与已有数据的时间区间重叠。" ); |
| | | } |
| | | |
| | | data := owner.UphillRouting( relnew,StartDate := startDate, EndDate := endDate,Percentage := percentage,Type := suffix ); |
| | | data := owner.UphillRouting( relnew,StartDate := startDate, EndDate := endDate,Percentage := percentage,Suffix := suffix ); |
| | | |
| | | copy_routing := owner.Copy( suffix + startDate.Format( "Y-M2-D2") ); |
| | | |
| | | copy_routing.Start( startDate ); |
| | | |
| | | copy_routing.End( endDate ); |
| | | |
| | | traverse( copy_routing,OperationForPlanningMatrix,op){ |
| | | op.Throughput( op.Throughput() * ( percentage / 100) ); |
| | | } |
| | | |
| | | copy_routing.CopyUphillRouting( relset, data ); |
| | | return data; |
| | | *] |
| | | } |