lihongji
2024-08-12 acf70acb5438a3358d07978afdc0eb28950f40d5
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl
@@ -52,26 +52,26 @@
            //周
            weekcolumn          := table.GetColumnByUnit( Translations::MP_GlobalParameters_Week(), weekstart );
            
            supplyquantity      := [Real]ceil( pispip.NewSupplyQuantity() );//向上取整
            inventoryquantity   := [Real]ceil( pispip.PlannedInventoryLevelEnd() );//向上取整
            supplyquantity      := [Number]pispip.NewSupplyQuantity();//四舍五入
            inventoryquantity   := [Number]pispip.PlannedInventoryLevelEnd();//四舍五入
            
            //装配线
            if( isccassemnly or isdlassemnly ){
              row.SetCellAssemblyValue( daycolumn, isccassemnly, supplyquantity );
              row.SetCellAssemblyValue( weekcolumn, isccassemnly, supplyquantity );
              row.SetCellAssemblyValue( daycolumn, isccassemnly, [Real]supplyquantity );
              row.SetCellAssemblyValue( weekcolumn, isccassemnly, [Real]supplyquantity );
            }
            
            //机加线
            if( isccproduction or isdlproduction ){
              row.SetCellProductionValue( daycolumn, isccproduction, supplyquantity );
              row.SetCellProductionValue( weekcolumn, isccproduction, supplyquantity );
              row.SetCellProductionValue( daycolumn, isccproduction, [Real]supplyquantity );
              row.SetCellProductionValue( weekcolumn, isccproduction, [Real]supplyquantity );
            }
            //库存
            if( iscc or isdl ){
              row.SetCellInventoryValue( daycolumn, iscc, inventoryquantity );
              row.SetCellInventoryValue( daycolumn, iscc, [Real]inventoryquantity );
              if( pispip.Start() = weekstart + Duration::Days( 6 ) or pispip.Period_MP() = endperiod ){
                weekstart         := ( weekstart + Duration::Days( 7 ) ).Date();
                row.SetCellInventoryValue( weekcolumn, iscc, inventoryquantity );
                row.SetCellInventoryValue( weekcolumn, iscc, [Real]inventoryquantity );
              }
            }
          }