admin
2024-10-25 a6d4789248cb5aff8627f200e40b32be57c28e51
_Main/BL/Type_MaterialRackProportionCell/StaticMethod_CreateDate.qbl
@@ -6,19 +6,18 @@
{
  TextBody:
  [*
    genrations   := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.Generation().TrimBoth() <> "", tempPMP.Generation() );
    mqbmlbs      := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.MQBMLB().TrimBoth() <> "", tempPMP.MQBMLB() );
    traverse ( genrations, Elements, g ) {
      traverse ( mqbmlbs, Elements, m ) {
        mrpr     := select( macroPlan, MaterialRackProportionRow, tempMRPR, tempMRPR.Generation() = g and tempMRPR.MLB_MQB() = m );
        if ( isnull( mrpr ) ) {
          mrpr   := macroPlan.MaterialRackProportionRow( relnew, Generation := g, MLB_MQB := m );
          traverse ( macroPlan, MaterialRackColumn, mrc ) {
            cell := mrpr.MaterialRackProportionCell( relnew, Quantity := 0 );
            cell.MaterialRackColumn( relset, mrc );
          }
        }
      }
    macroPlan.MaterialRackProportionRow( relflush );
    mrpr   := macroPlan.MaterialRackProportionRow( relnew, Generation := "大连外租库", MLB_MQB := "" );
    traverse ( macroPlan, MaterialRackColumn, mrc ) {
      cell := mrpr.MaterialRackProportionCell( relnew, Quantity := 0 );
      cell.MaterialRackColumn( relset, mrc );
    }
    mrpr   := macroPlan.MaterialRackProportionRow( relnew, Generation := "长春外租库", MLB_MQB := "" );
    traverse ( macroPlan, MaterialRackColumn, mrc ) {
      cell := mrpr.MaterialRackProportionCell( relnew, Quantity := 0 );
      cell.MaterialRackColumn( relset, mrc );
    }
  *]
}