lazhen
2024-07-12 1e51fbda78f4782a252c5ad187064e96934a1eca
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Download.qbl
@@ -8,7 +8,7 @@
  TextBody:
  [*
    
    table := selectobject( macroPlan, EnginePipelineSource.Report, table, table.IsShow() );
    table := selectobject( macroPlan, MachiningPipelineSource.Report, table, table.IsShow() );
    
    xmlDOMI := XMLDOMImplementation::Create();
    xmlDOM  := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>' + table.Name() + '</name></table>' );
@@ -57,32 +57,98 @@
          productcellElement3 := xmlDOM.CreateElement( "cell" );
          productcellElement3.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement3 );
          productcellElement4 := xmlDOM.CreateElement( "cell" );
          productcellElement4.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement4 );
          productcellElement5 := xmlDOM.CreateElement( "cell" );
          productcellElement5.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement5 );
          productcellElement6 := xmlDOM.CreateElement( "cell" );
          productcellElement6.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement6 );
          productcellElement7 := xmlDOM.CreateElement( "cell" );
          productcellElement7.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement7 );
          productcellElement8 := xmlDOM.CreateElement( "cell" );
          productcellElement8.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement8 );
          productcellElement9 := xmlDOM.CreateElement( "cell" );
          productcellElement9.SetAttribute( "value", row.Name() );
          productcolumnelement.AppendChild( productcellElement9 );
          //Attribute
          //生产
          endcellElement := xmlDOM.CreateElement( "cell" );
          endcellElement.SetAttribute( "value", 'ProductionQuantity' );
          attricolumnelement.AppendChild( endcellElement );
          //需求
          mincellElement := xmlDOM.CreateElement( "cell" );
          mincellElement.SetAttribute( "value", 'DemandQuantity' );
          attricolumnelement.AppendChild( mincellElement );
          //库存
          maxcellElement := xmlDOM.CreateElement( "cell" );
          maxcellElement.SetAttribute( "value", 'InventoryQUantity' );
          attricolumnelement.AppendChild( maxcellElement );
          //长春装配计划
          ccaqcellElement := xmlDOM.CreateElement( "cell" );
          ccaqcellElement.SetAttribute( "value", 'CCAssemblyPlanQty' );
          attricolumnelement.AppendChild( ccaqcellElement );
          //长春生产计划
          ccpqcellElement := xmlDOM.CreateElement( "cell" );
          ccpqcellElement.SetAttribute( "value", 'CCProductionQty' );
          attricolumnelement.AppendChild( ccpqcellElement );
          //长春调拨计划
          cctqcellElement := xmlDOM.CreateElement( "cell" );
          cctqcellElement.SetAttribute( "value", 'CCTransferQty' );
          attricolumnelement.AppendChild( cctqcellElement );
          //长春库存
          cciqcellElement := xmlDOM.CreateElement( "cell" );
          cciqcellElement.SetAttribute( "value", 'CCInventoryQty' );
          attricolumnelement.AppendChild( cciqcellElement );
          //大连装配计划
          dlaqcellElement := xmlDOM.CreateElement( "cell" );
          dlaqcellElement.SetAttribute( "value", 'DLAssemblyPlanQty' );
          attricolumnelement.AppendChild( dlaqcellElement );
          //大连生产计划
          dlpqcellElement := xmlDOM.CreateElement( "cell" );
          dlpqcellElement.SetAttribute( "value", 'DLProductionQty' );
          attricolumnelement.AppendChild( dlpqcellElement );
          //大连调拨计划
          dltqcellElement := xmlDOM.CreateElement( "cell" );
          dltqcellElement.SetAttribute( "value", 'DLTransferQty' );
          attricolumnelement.AppendChild( dltqcellElement );
          //大连库存
          dliqcellElement := xmlDOM.CreateElement( "cell" );
          dliqcellElement.SetAttribute( "value", 'DLInventoryQty' );
          attricolumnelement.AppendChild( dliqcellElement );
          //长春 + 大连 库存
          tiqcellElement := xmlDOM.CreateElement( "cell" );
          tiqcellElement.SetAttribute( "value", 'TotalInventoryQty' );
          attricolumnelement.AppendChild( tiqcellElement );
        }
        //生产
        endcellElement := xmlDOM.CreateElement( "cell" );
        endcellElement.SetAttribute( "value", [String]c.ProductionQuantity() );
        columnelement.AppendChild( endcellElement );
        //需求
        mincellElement := xmlDOM.CreateElement( "cell" );
        mincellElement.SetAttribute( "value", [String]c.DemandQuantity() );
        columnelement.AppendChild( mincellElement );
        //库存
        maxcellElement := xmlDOM.CreateElement( "cell" );
        maxcellElement.SetAttribute( "value", [String]c.InventoryQuantity() );
        columnelement.AppendChild( maxcellElement );
        //长春装配计划
        ccaqcellElement := xmlDOM.CreateElement( "cell" );
        ccaqcellElement.SetAttribute( "value", [String]c.CCAssemblyPlanQty() );
        columnelement.AppendChild( ccaqcellElement );
        //长春生产计划
        ccpqcellElement := xmlDOM.CreateElement( "cell" );
        ccpqcellElement.SetAttribute( "value", [String]c.CCProductionQty() );
        columnelement.AppendChild( ccpqcellElement );
        //长春调拨计划
        cctqcellElement := xmlDOM.CreateElement( "cell" );
        cctqcellElement.SetAttribute( "value", [String]c.CCTransferQty() );
        columnelement.AppendChild( cctqcellElement );
        //长春库存
        cciqcellElement := xmlDOM.CreateElement( "cell" );
        cciqcellElement.SetAttribute( "value", [String]c.CCInventoryQty() );
        columnelement.AppendChild( cciqcellElement );
        //大连装配计划
        dlaqcellElement := xmlDOM.CreateElement( "cell" );
        dlaqcellElement.SetAttribute( "value", [String]c.DLAssemblyPlanQty() );
        columnelement.AppendChild( dlaqcellElement );
        //大连生产计划
        dlpqcellElement := xmlDOM.CreateElement( "cell" );
        dlpqcellElement.SetAttribute( "value", [String]c.DLProductionQty() );
        columnelement.AppendChild( dlpqcellElement );
        //大连调拨计划
        dltqcellElement := xmlDOM.CreateElement( "cell" );
        dltqcellElement.SetAttribute( "value", [String]c.DLTransferQty() );
        columnelement.AppendChild( dltqcellElement );
        //大连库存
        dliqcellElement := xmlDOM.CreateElement( "cell" );
        dliqcellElement.SetAttribute( "value", [String]c.DLInventoryQty() );
        columnelement.AppendChild( dliqcellElement );
        //长春 + 大连 库存
        tiqcellElement := xmlDOM.CreateElement( "cell" );
        tiqcellElement.SetAttribute( "value", [String]c.TotalInventoryQty() );
        columnelement.AppendChild( tiqcellElement );
      }
      tableElement.AppendChild( columnelement );  
    }
@@ -91,7 +157,7 @@
    
    //info( xmlString );
    
    tableGroupHandle := TableGroupHandle::Create( EnginePipelineReport::GetDefaultName() );
    tableGroupHandle := TableGroupHandle::Create( MachiningPipelineReport::GetDefaultName() );
    tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
    tableGroupHandle.Add( tableHandle );