hongji.li
2023-09-26 5b7f4030c8a73dc0161973b953d788e1e1f0d01f
注释info
已修改2个文件
20 ■■■■ 文件已修改
_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
@@ -19,7 +19,7 @@
    
    traverse ( finaleProductInStockingPoint_MPs, Elements, fpispmp ) {
      capacityAllocationResultsRuleConfigurations := selectset( globalOTDTable, CapacityAllocationResultsRuleConfiguration, tempCARRC, tempCARRC.ModuleMaterialCode() = fpispmp.ProductID() and tempCARRC.StockingPointID() = fpispmp.StockingPointID() );
      info( "生产的产品:", fpispmp.ProductID(), "------产品在库存点-------:", fpispmp.StockingPointID() );
    //  info( "生产的产品:", fpispmp.ProductID(), "------产品在库存点-------:", fpispmp.StockingPointID() );
      traverse ( period_MPS, Elements, pmp ) {     
        // CapacityAllocationResults::IterativeGeneration( globalOTDTable, pisp, 1, null( NewSupply ), -1.0, pmp.StartDate() ); 老版
        CapacityAllocationResults::IterativeGeneration2( globalOTDTable, fpispmp, pmp.StartDate(), capacityAllocationResultsRuleConfigurations, 0, null( NewSupply ), 0.0 );
_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl
@@ -13,7 +13,7 @@
  TextBody:
  [*
    numberOfLayers++;
    info( "目标时间:", targetDate.Format( "Y-M2-D2" ) );
    //info( "目标时间:", targetDate.Format( "Y-M2-D2" ) );
    info( pisp.Name() );
    traverse ( pisp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, pispippl.Start().Date() = targetDate ) {
      traverse ( pispippl, NewSupply, ns, ns.Quantity() > 0 ) {
@@ -23,7 +23,7 @@
        
        ontype( ns.PeriodTask_MP() ) {
          PeriodTaskOperation as pto : {
            info( "Operation周期任务..." );
    //        info( "Operation周期任务..." );
            traverse ( ns, PeriodTask_MP.astype( PeriodTaskOperation ).DependentDemand, dd ) {
              if ( numberOfLayers = 1 ) {
                currentLayerDependentDemandQuantity := ns.Quantity();
@@ -31,9 +31,9 @@
              currentLayerDependentDemandQuantity := currentLayerDependentDemandQuantity                     * 
                                                     ns.ProcessOutput().astype( OperationOutput ).Quantity() *
                                                     dd.ProcessInput().astype( OperationInput ).Quantity();
              info( "层数:", numberOfLayers, "    当前供应的pisp:", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    总供应值:", ns.Quantity(), "    需要供应值:", currentLayerDependentDemandQuantity,
                    "    当前需求pisp:", dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    需求值:", currentLayerDependentDemandQuantity );
              info( "-----------------------------------------------------------------------------------------------------------------" );
    //          info( "层数:", numberOfLayers, "    当前供应的pisp:", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    总供应值:", ns.Quantity(), "    需要供应值:", currentLayerDependentDemandQuantity,
    //                "    当前需求pisp:", dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    需求值:", currentLayerDependentDemandQuantity );
    //          info( "-----------------------------------------------------------------------------------------------------------------" );
              CapacityAllocationResults::IterativeGeneration2( globalOTDTable,
                                                               dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(),
                                                               targetDate,
@@ -45,7 +45,7 @@
            }
            carrc := select( carrcs, Elements, carrc, carrc.PanelMaterialCode() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() );
            if ( not isnull( carrc ) ) {
              info( "找到面板物料..." );
    //          info( "找到面板物料..." );
              globalOTDTable.CapacityAllocationResults( relnew,
                                                        PanelBase             := pto.Operation().UnitID(),
                                                        PanelMaterialCode     := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(),
@@ -73,9 +73,9 @@
          PeriodTaskLaneLeg as ptll : {
            targetDependentDemand := select( ptll, DependentDemand, dd, dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() );
            currentLayerDependentDemandQuantity := ifexpr( numberOfLayers = 1, targetDependentDemand.Quantity(), currentLayerDependentDemandQuantity );
            info( "层数:", numberOfLayers,"    当前供应的pisp:", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    总供应值:", ns.Quantity(), "    需要供应值:", currentLayerDependentDemandQuantity,
                  "    当前需求pisp:", targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    需求值:", currentLayerDependentDemandQuantity );
            info( "LaneLeg周期任务..." );
    //        info( "层数:", numberOfLayers,"    当前供应的pisp:", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    总供应值:", ns.Quantity(), "    需要供应值:", currentLayerDependentDemandQuantity,
    //              "    当前需求pisp:", targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    需求值:", currentLayerDependentDemandQuantity );
    //        info( "LaneLeg周期任务..." );
            info( "-----------------------------------------------------------------------------------------------------------------" );
            CapacityAllocationResults::IterativeGeneration2( globalOTDTable,
                                                             targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(),