xiaoding721
2024-11-13 6d9548e7d4d9221c031deddf985fcb674fa680d2
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
已修改4个文件
27 ■■■■■ 文件已修改
_Main/BL/Type_FinancialProductionReport/Method_GenerateColumn.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesReport/Method_GenerateColumn.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/Method_GenerateColumn.qbl
@@ -11,7 +11,7 @@
    startofyear               := startofplanning.StartOfYear();
    startofnextyear           := startofplanning.StartOfNextYear();
    
    for( start := startofyear; start < startofnextyear; start := start.StartOfMonth() ){
    for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){
      periodtime := start.Date();
      periodname := periodtime.Format( "M2/D2/Y" );
      this.FinancialProductionColumn( relnew, Name := periodname, Period := periodtime );
_Main/BL/Type_FinancialSalesReport/Method_GenerateColumn.qbl
@@ -11,7 +11,7 @@
    startofyear               := startofplanning.StartOfYear();
    startofnextyear           := startofplanning.StartOfNextYear();
    
    for( start := startofyear; start < startofnextyear; start := start.StartOfMonth() ){
    for( start := startofyear; start < startofnextyear; start := start.StartOfNextMonth() ){
      periodtime := start.Date();
      periodname := periodtime.Format( "M2/D2/Y" );
      this.FinancialSalesColumn( relnew, Name := periodname, Period := periodtime );
_Main/BL/Type_InventorySummarySource/StaticMethod_Initialize.qbl
@@ -93,7 +93,7 @@
      isccorigin             := originspid.StartsWith( '长春' ) or originspid.StartsWith( 'CC' );
      //起始地是大连
      isdlorigin             :=  originspid.StartsWith( '大连' ) or originspid.StartsWith( 'DL' );
      if( isccorigin and isdlorigin ){
      if( isccorigin or isdlorigin ){
        traverse( laneleg, Trip, trip, trip.LeadTime().Days() > 1 ){
          for( transferdate := trip.Departure() + Duration::Days( 1 ); transferdate < trip.Arrival(); transferdate := transferdate + Duration::Days( 1 ) ){
            daycolumn        := selectobject( table, InventorySummaryColumn, column, column.StartDate() = transferdate.Date(), column.TimeUnit() = Translations::MP_GlobalParameters_Day() );
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl
@@ -81,21 +81,24 @@
    traverse( owner, Unit.Lane.LaneLeg, laneleg ){
      originspid             := laneleg.OriginStockingPointID();
      destinationspid        := laneleg.DestinationStockingPointID();
      //CC to DL 长春厂内库到大连外租库
      iscctodl               := originspid.EndsWith( '厂内库' ) and ( originspid.StartsWith( '长春' ) or originspid.StartsWith( 'CC' ) ) and destinationspid = '大连外租库';
      //CC to DL 长春工厂到大连工厂
      iscctodl               := ( originspid.StartsWith( '长春' ) or originspid.StartsWith( 'CC' ) ) and ( destinationspid.StartsWith( '大连' ) or destinationspid.StartsWith( 'DL' ) );
      //DL to CC 大连厂内库到大连发动机的长春外租库
      isdltocc               := originspid.EndsWith( '厂内库' ) and ( originspid.StartsWith( '大连' ) or originspid.StartsWith( 'DL' ) ) and destinationspid = '大连发动机的长春外租库';
      if( iscctodl and isdltocc ){
        traverse( table, Column, column){//, column.StartDate().Month() = 1
          alltrips           := selectset( laneleg, Trip, trip, ( trip.Arrival().Date() < column.StartDate().StartOfNextMonth() and trip.Arrival().Date() >= column.StartDate() )
                                           or ( trip.Departure().Date() < column.StartDate().StartOfNextMonth() and trip.Departure().Date() >= column.StartDate() ) );
      if( iscctodl or isdltocc ){
    //    info( '------iscctodl------', originspid, destinationspid, iscctodl );
        traverse( table, Column, column  ){//, column.StartDate().Month() = 1
          alltrips           := selectset( laneleg, Trip, trip, trip.Arrival().Date() = column.StartDate()
                                           or trip.Departure().Date() = column.StartDate() );
          producttrips      := selectuniquevalues( alltrips, Elements.ProductInTrip, pit, pit.Quantity() <> 0 and exists( pit.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent ), pit.ProductID() );
          traverse( producttrips, Elements, producttrip ){//, producttrip = '6912'
    //      info( '---------Column----------', alltrips.Size(), producttrips.Size(), column.StartDate() );
          traverse( producttrips, Elements, producttrip ){//, producttrip = '06K103011CP'
            row             := table.GetRow( producttrip );
            product         := selectobject( owner, Product_MP, product, product.ID() = producttrip );
            products.Add( product );
            departureqty    := sum( alltrips, Elements.ProductInTrip, pit, ( pit.Trip().Departure().Date() < column.StartDate().StartOfNextMonth() and pit.Trip().Departure().Date() >= column.StartDate() ) and pit.Product_MP() = product, pit.Quantity() );
            arrivalqty      := sum( alltrips, Elements.ProductInTrip, pit, ( pit.Trip().Arrival().Date() < column.StartDate().StartOfNextMonth() and pit.Trip().Arrival().Date() >= column.StartDate() ) and pit.Product_MP() = product, pit.Quantity() );
            departureqty    := sum( alltrips, Elements.ProductInTrip, pit, pit.Trip().Departure().Date() = column.StartDate() and pit.Product_MP() = product, pit.Quantity() );
            arrivalqty      := sum( alltrips, Elements.ProductInTrip, pit, pit.Trip().Arrival().Date() = column.StartDate() and pit.Product_MP() = product, pit.Quantity() );
    //        info( '---------***************8---------', departureqty, arrivalqty, column.StartDate() );
            row.SetDepartureAndArrivalValue( column, iscctodl, departureqty, arrivalqty );
          }
        }