admin
2024-11-08 9d701cfffa9c41690aca461d91a79ff3eb060c05
物流报表bug修复
已修改2个文件
19 ■■■■ 文件已修改
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
@@ -201,6 +201,9 @@
      cell.DLExternalRentalWarehouseTransportationCosts( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLExternalRentalWarehouseTransportationCosts() ) );
      cell.DLRentalWarehouseStorageFees( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLRentalWarehouseStorageFees() ) );
      cell.CleaningCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CleaningCost() ) );
      cell.CCCleaningCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCCleaningCost() ) ); // CC外租库清洗费用
      cell.DLRentalWarehouseMaterialRackCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLRentalWarehouseMaterialRackCost() ) ); // 大连外租库料架费用
      cell.CCExternalRentalWarehouseDLMaterialRackCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCExternalRentalWarehouseDLMaterialRackCost() ) ); // CC外租库DL料架费用
      cell.EstimatedTotalCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.EstimatedTotalCost() ) );
      cell.Coefficient( 1.05 );
      cell.TotalCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalCost() ) );
@@ -224,6 +227,9 @@
      cell.DLExternalRentalWarehouseTransportationCosts( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLExternalRentalWarehouseTransportationCosts() ) );    
      cell.DLRentalWarehouseStorageFees( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLRentalWarehouseStorageFees() ) );    
      cell.CleaningCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CleaningCost() ) );    
      cell.CCCleaningCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCCleaningCost() ) ); // CC外租库清洗费用
      cell.DLRentalWarehouseMaterialRackCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLRentalWarehouseMaterialRackCost() ) ); // 大连外租库料架费用
      cell.CCExternalRentalWarehouseDLMaterialRackCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCExternalRentalWarehouseDLMaterialRackCost() ) ); // CC外租库DL料架费用
      cell.EstimatedTotalCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.EstimatedTotalCost() ) );    
      cell.Coefficient( 1.05 );
      cell.TotalCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalCost() ) );                        
_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl
@@ -26,7 +26,9 @@
    }
    
    // 创建单元格
    traverse ( macroPlan, MachineLogisticsCostReportRow, mlcrr ) { // 循环行
    traverse ( macroPlan, MachineLogisticsCostReportRow, mlcrr
    //           , mlcrr.Factory() = "长春工厂"
              ) { // 循环行
      info( "当前遍历的行:", mlcrr.Factory(), " ", mlcrr.Category() );
      traverse ( macroPlan, MachineLogisticsCostReportColumn, mlcrc ) { // 循环列
      
@@ -39,6 +41,12 @@
                        tempLCT.Product()     = mlcrr.Category()                                                                                                                         and
                        tempLCT.Origin()      = ifexpr( mlcrr.Category() = "AGW", "DL AGW", ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "外租库" )     and
                        tempLCT.Destination() = ifexpr( mlcrr.Category() = "AGW", "CC AGW库房", ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "线边库" ) );
        // 运输成本参数(调拨费用)
        lct1  := select( macroPlan, LogisticsCostTransport, tempLCT,
                         tempLCT.Product()     = mlcrr.Category()                                                                                                                         and
                         tempLCT.Origin()      = ifexpr( mlcrr.Category() = "AGW", "DL AGW", ifexpr( mlcrr.Factory() = "大连工厂", "CC", "DL" ) + " " + mlcrr.Category() )                and
                         tempLCT.Destination() = ifexpr( mlcrr.Category() = "AGW", "CC AGW库房", ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "外租库" ) );
    
         // 当前月末最后一天日期
        lastDayOfThisMonth := mlcrc.StartDate().StartOfNextMonth() - 1;
@@ -76,7 +84,8 @@
                                 guard( tempTPC.TransferPlanColumn().ColumnDate().Year()   = mlcrc.StartDate().Year(), false )                              and
                                 guard(  tempTPC.TransferPlanColumn().ColumnDate().Month() = mlcrc.StartDate().Month(), false ),
                                 [Number]tempTPC.Value() );
        cell.TransferCost( [Number] ( [Number] ( transferQuantity / guard( lcm.PackagingCapacity(), 1 ) ) / guard( lct.LoadingCapacity(), 1 ) ) * guard( lct.TransportPrice(), 1 ) );
    //    info( "调拨数量:", transferQuantity, "    包装容量:", guard( lcm.PackagingCapacity(), 1 ), "    装载容量:", guard( lct1.LoadingCapacity(), 1 ), "    运输单价:",guard( lct1.TransportPrice(), 1 )  );
        cell.TransferCost( [Number] ( ceil( ceil( transferQuantity / guard( lcm.PackagingCapacity(), 1 ) ) / guard( lct1.LoadingCapacity(), 1 ) ) * guard( lct1.TransportPrice(), 1 ) ) );
    
        // 外租库入库费用(入库量[包装量] / 包装容量 * 入库单价)
        cell.StorageFeesForRentedWarehouses( packageQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.WarehousingPrice(), 1 ) );