xiaoding721
2024-08-21 37d5e499ff0d2aa0d4d3d7a4c6ec65ec2ffd1d70
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
已修改13个文件
已添加25个文件
555 ■■■■■ 文件已修改
_Main/BL/Dataset_InterfaceDataset/Daemon_FinishedEngineInventoryInterface#0.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Dataset_InterfaceDataset/Daemon_MachineStockInterface.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Dataset_InterfaceDataset/Daemon_ShippingActualInterface.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CustomerDemandPPAIDS_InterfaceDataset_InterfaceDataset_CustomerDema.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CustomerDemandPPAIDS_InterfaceLoginfo_InterfaceLoginfo_CustomerDema.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_PackagingCapacity.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Attribute_PlannedInventory.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_DemandDate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_DemandQty.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_Fac.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_FactoryName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_InterfaceTime.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_Product.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_VersionFlag.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_VersionName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerDemandPPAIDS/_ROOT_Type_CustomerDemandPPAIDS.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceLoginfo/Attribute_IsShow.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceLoginfo/DefaultValue_IsShow.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Download.qbl 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuCustomerDemandPPAIDS_OnClick.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlActions.def 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlContent.def 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_New.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnCancel_OnClick.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnOk_OnClick.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/_ROOT_Component_DialogCustomerDemandPPAIDS.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bRefresh_OnClick.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/CCEngineRackReport.vw 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Dataset_InterfaceDataset/Daemon_FinishedEngineInventoryInterface#0.qbl
@@ -5,7 +5,7 @@
  Frequency: P1DT0H0M0S
  Priority: 'Default'
  StartDate: 2024-07-19
  StartTimeOfDay: P0DT9H0M0S
  StartTimeOfDay: P0DT10H0M0S
  Text:
  [*
    options := DatasetFindOptions::Construct( 'InterfaceDataset' ).IncludeOffline( true ); //to load we must search offline datasets.
_Main/BL/Dataset_InterfaceDataset/Daemon_MachineStockInterface.qbl
@@ -5,7 +5,7 @@
  Frequency: P1DT0H0M0S
  Priority: 'Default'
  StartDate: 2024-07-19
  StartTimeOfDay: P0DT9H0M0S
  StartTimeOfDay: P0DT10H0M0S
  Text:
  [*
    options := DatasetFindOptions::Construct( 'InterfaceDataset' ).IncludeOffline( true ); //to load we must search offline datasets.
_Main/BL/Dataset_InterfaceDataset/Daemon_ShippingActualInterface.qbl
@@ -5,7 +5,7 @@
  Frequency: P1DT0H0M0S
  Priority: 'Default'
  StartDate: 2024-07-19
  StartTimeOfDay: P0DT9H0M0S
  StartTimeOfDay: P0DT10H0M0S
  Text:
  [*
    options := DatasetFindOptions::Construct( 'InterfaceDataset' ).IncludeOffline( true ); //to load we must search offline datasets.
_Main/BL/InfoMessages.qbl
@@ -106,6 +106,10 @@
  {
    DefaultText: 'application/json'
  }
  InfoMessage InterfaceDataset_CustomerDemandPPAIDS_Name
  {
    DefaultText: 'Customer demand(PPA + IDS)'
  }
  InfoMessage InterfaceDataset_FinishedEngineInventory_Name
  {
    DefaultText: 'Finished engine inventory'
_Main/BL/Relations/Relation_CustomerDemandPPAIDS_InterfaceDataset_InterfaceDataset_CustomerDema.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CustomerDemandPPAIDS_InterfaceDataset_InterfaceDataset_CustomerDemandPPAIDS
{
  #keys: '1[415136.0.1024850018]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide InterfaceDataset
  {
    #keys: '3[415136.0.1024850020][415136.0.1024850019][415136.0.1024850021]'
    Cardinality: '0to1'
    ObjectDefinition: CustomerDemandPPAIDS
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CustomerDemandPPAIDS
  {
    #keys: '3[415136.0.1024850023][415136.0.1024850022][415136.0.1024850024]'
    Cardinality: '1toN'
    ObjectDefinition: InterfaceDataset
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_CustomerDemandPPAIDS_InterfaceLoginfo_InterfaceLoginfo_CustomerDema.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CustomerDemandPPAIDS_InterfaceLoginfo_InterfaceLoginfo_CustomerDemandPPAIDS
{
  #keys: '1[415136.0.1027064726]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide InterfaceLoginfo
  {
    #keys: '3[415136.0.1027064728][415136.0.1027064727][415136.0.1027064729]'
    Cardinality: '0to1'
    ObjectDefinition: CustomerDemandPPAIDS
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CustomerDemandPPAIDS
  {
    #keys: '3[415136.0.1027064731][415136.0.1027064730][415136.0.1027064732]'
    Cardinality: '1toN'
    ObjectDefinition: InterfaceLoginfo
    OwningSide: 'Reference'
  }
}
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Download.qbl
@@ -78,31 +78,31 @@
          //Attribute
          //外租库入库费用
          rententercostcellElement := xmlDOM.CreateElement( "cell" );
          rententercostcellElement.SetAttribute( "value", 'RentEnterCost' );
          rententercostcellElement.SetAttribute( "value", '外租库入库费用' );//RentEnterCost
          attricolumnelement.AppendChild( rententercostcellElement );
          //外租库出库费用
          rentoutcostcellElement := xmlDOM.CreateElement( "cell" );
          rentoutcostcellElement.SetAttribute( "value", 'RentOutCost' );
          rentoutcostcellElement.SetAttribute( "value", '外租库出库费用' );//RentOutCost
          attricolumnelement.AppendChild( rentoutcostcellElement );
          //厂内到外租库运输费用
          factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" );
          factorytorenttranscostcellElement.SetAttribute( "value", 'FactoryToRentTransCost' );
          factorytorenttranscostcellElement.SetAttribute( "value", '厂内到外租库运输费用' );//FactoryToRentTransCost
          attricolumnelement.AppendChild( factorytorenttranscostcellElement );
          //外租库仓储费用
          rentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
          rentstoragecostcellElement.SetAttribute( "value", 'RentStorageCost' );
          rentstoragecostcellElement.SetAttribute( "value", '外租库仓储费用' );//RentStorageCost
          attricolumnelement.AppendChild( rentstoragecostcellElement );
          //预计总费用
          estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
          estimatedtotalcostcellElement.SetAttribute( "value", 'EstimatedTotalCost' );
          estimatedtotalcostcellElement.SetAttribute( "value", '预计总费用' );//EstimatedTotalCost
          attricolumnelement.AppendChild( estimatedtotalcostcellElement );
          //系数
          coefficientcellElement := xmlDOM.CreateElement( "cell" );
          coefficientcellElement.SetAttribute( "value", 'Coefficient' );
          coefficientcellElement.SetAttribute( "value", '系数' );//Coefficient
          attricolumnelement.AppendChild( coefficientcellElement );
          //总费用
          totalcostcellElement := xmlDOM.CreateElement( "cell" );
          totalcostcellElement.SetAttribute( "value", 'TotalCost' );
          totalcostcellElement.SetAttribute( "value", '总费用' );//TotalCost
          attricolumnelement.AppendChild( totalcostcellElement );
        }
        //外租库入库费用
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl
@@ -98,51 +98,51 @@
          //Attribute
          //长春外租库入库费用
          ccrententercostcellElement := xmlDOM.CreateElement( "cell" );
          ccrententercostcellElement.SetAttribute( "value", 'CCRentEnterCost' );
          ccrententercostcellElement.SetAttribute( "value", '长春外租库入库费用' );//CCRentEnterCost
          attricolumnelement.AppendChild( ccrententercostcellElement );
          //长春外租库出库费用
          ccrentoutcostcellElement := xmlDOM.CreateElement( "cell" );
          ccrentoutcostcellElement.SetAttribute( "value", 'CCRentOutCost' );
          ccrentoutcostcellElement.SetAttribute( "value", '长春外租库出库费用' );//CCRentOutCost
          attricolumnelement.AppendChild( ccrentoutcostcellElement );
          //长春长途运输费用
          cclongtranscostcellElement := xmlDOM.CreateElement( "cell" );
          cclongtranscostcellElement.SetAttribute( "value", 'CCLongTransCost' );
          cclongtranscostcellElement.SetAttribute( "value", '长春长途运输费用' );//CCLongTransCost
          attricolumnelement.AppendChild( cclongtranscostcellElement );
          //长春短途运输费用
          ccshorttranscostcellElement := xmlDOM.CreateElement( "cell" );
          ccshorttranscostcellElement.SetAttribute( "value", 'CCShortTransCost' );
          ccshorttranscostcellElement.SetAttribute( "value", '长春短途运输费用' );//CCShortTransCost
          attricolumnelement.AppendChild( ccshorttranscostcellElement );
          //长春外租库仓储费用
          ccrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
          ccrentstoragecostcellElement.SetAttribute( "value", 'CCRentStorageCost' );
          ccrentstoragecostcellElement.SetAttribute( "value", '长春外租库仓储费用' );//CCRentStorageCost
          attricolumnelement.AppendChild( ccrentstoragecostcellElement );
          //大连外租库入库费用
          dlrententercostcellElement := xmlDOM.CreateElement( "cell" );
          dlrententercostcellElement.SetAttribute( "value", 'DLRentEnterCost' );
          dlrententercostcellElement.SetAttribute( "value", '大连外租库入库费用' );//DLRentEnterCost
          attricolumnelement.AppendChild( dlrententercostcellElement );
          //大连外租库出库费用
          dlrentoutcostcellElement := xmlDOM.CreateElement( "cell" );
          dlrentoutcostcellElement.SetAttribute( "value", 'DLRentOutCost' );
          dlrentoutcostcellElement.SetAttribute( "value", '大连外租库出库费用' );//DLRentOutCost
          attricolumnelement.AppendChild( dlrentoutcostcellElement );
          //厂内到外租库运输费用
          factorytorenttranscostcellElement := xmlDOM.CreateElement( "cell" );
          factorytorenttranscostcellElement.SetAttribute( "value", 'FactoryToRentTransCost' );
          factorytorenttranscostcellElement.SetAttribute( "value", '厂内到外租库运输费用' );//FactoryToRentTransCost
          attricolumnelement.AppendChild( factorytorenttranscostcellElement );
          //大连外租库仓储费用
          dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
          dlrentstoragecostcellElement.SetAttribute( "value", 'DLRentStorageCost' );
          dlrentstoragecostcellElement.SetAttribute( "value", '大连外租库仓储费用' );//DLRentStorageCost
          attricolumnelement.AppendChild( dlrentstoragecostcellElement );
          //预计总费用
          estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
          estimatedtotalcostcellElement.SetAttribute( "value", 'EstimatedTotalCost' );
          estimatedtotalcostcellElement.SetAttribute( "value", '预计总费用' );//EstimatedTotalCost
          attricolumnelement.AppendChild( estimatedtotalcostcellElement );
          //系数
          coefficientcellElement := xmlDOM.CreateElement( "cell" );
          coefficientcellElement.SetAttribute( "value", 'Coefficient' );
          coefficientcellElement.SetAttribute( "value", '系数' );//Coefficient
          attricolumnelement.AppendChild( coefficientcellElement );
          //总费用
          totalcostcellElement := xmlDOM.CreateElement( "cell" );
          totalcostcellElement.SetAttribute( "value", 'TotalCost' );
          totalcostcellElement.SetAttribute( "value", '总费用' );//TotalCost
          attricolumnelement.AppendChild( totalcostcellElement );
        }
        //长春外租库入库费用
_Main/BL/Type_CC_EngineRackCell/Attribute_PackagingCapacity.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute PackagingCapacity
{
  #keys: '3[415754.0.111003142][415754.0.111003141][415754.0.111003143]'
  Description: '包装容量'
  ValueType: Number
}
_Main/BL/Type_CC_EngineRackCell/Attribute_PlannedInventory.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute PlannedInventory
{
  #keys: '3[415754.0.111003178][415754.0.111003177][415754.0.111003179]'
  ValueType: Real
}
_Main/BL/Type_CC_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
Function CalcNumberOfEmptyShelves
{
  TextBody:
  [*
    // vwedadmin Aug-20-2024 (created)
    value := guard( [Number] ( this.TotalQuantityOfMaterialRacks() - ( this.PlannedInventory() / this.PackagingCapacity() ) ), 0 );
    this.NumberOfEmptyShelves( value );
  *]
}
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
@@ -9,11 +9,14 @@
    macroPlan.CC_EngineRackRow( relflush );
    macroPlan.CC_EngineRackColumn( relflush );
    
    // åˆ›å»ºè¡ŒEVO5 MLB, EVO5 MQB, GEN3 MLB, GEN3 MQB
    macroPlan.CC_EngineRackRow( relnew, Generation := "EVO5", MLB_MQB := "MLB" );
    macroPlan.CC_EngineRackRow( relnew, Generation := "EVO5", MLB_MQB := "MQB" );
    macroPlan.CC_EngineRackRow( relnew, Generation := "GEN3", MLB_MQB := "MLB" );
    macroPlan.CC_EngineRackRow( relnew, Generation := "GEN3", MLB_MQB := "MQB" );
    // åˆ›å»ºè¡Œ
    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, g.ToUpper() = "EVO5" or g.ToUpper() = "GEN3" ) {
      traverse ( mqbmlbs, Elements, m, m.ToUpper() = "MLB" or m.ToUpper() = "MQB" ) {
        macroPlan.CC_EngineRackRow( relnew, Generation := g, MLB_MQB := m );
      }
    }
    
    // åˆ›å»ºåˆ—
    indexDate := macroPlan.StartOfPlanning().Date().StartOfMonth();
@@ -24,12 +27,54 @@
    
    // åˆ›å»ºå•元格
    traverse ( macroPlan, CC_EngineRackRow, ccerr ) {
      // å‘动机成本参数
      lce  := select( macroPlan, LogisticsCostEngine, tempLCE, tempLCE.Generation() = ccerr.Generation() and tempLCE.MLB_MQB() = ccerr.MLB_MQB() and tempLCE.Factory() = "长春工厂" );
      // æ–™æž¶æˆæœ¬å‚æ•°
      lcmr := select( macroPlan, LogisticsCostMaterialRack, tempLCMR, tempLCMR.Factory() = "长春工厂" );
      traverse ( macroPlan, CC_EngineRackColumn, ccerc ) {
        cell := ccerr.CC_EngineRackCell( relnew );
        
        // ç©ºæ–™æž¶æ•°é‡ï¼ˆé•¿æ˜¥åŽ‚è¯¥äº§å“çš„æ–™æž¶æ€»æ•°é‡ - å‘动机库存 / åŒ…装容量 ï¼‰
        lastDayOfThisMonth := ccerc.StartDate().StartOfNextMonth() - 1;
        plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP,
                                 tempPISPIP.ProductInStockingPoint_MP().Product_MP().IsLeaf()                          and
                                 tempPISPIP.ProductInStockingPoint_MP().Product_MP().ParentID()   = "产成品"           and
                                 tempPISPIP.ProductInStockingPoint_MP().StockingPointID()         = "长春外租库"       and
                                 tempPISPIP.ProductInStockingPoint_MP().Product_MP().Generation() = ccerr.Generation() and
                                 tempPISPIP.ProductInStockingPoint_MP().Product_MP().MQBMLB()     = ccerr.MLB_MQB()    and
                                 tempPISPIP.Start().Date()                                                  = lastDayOfThisMonth,
                                 tempPISPIP.PlannedInventoryLevelEnd() );
        cell.PackagingCapacity( guard( lce.PackagingCapacity(), 0 ) );
        cell.PlannedInventory( plannedInventory );
        // å¤–租库入库费用(发动机销量 / åŒ…装容量[向上取整] * æ–™æž¶å…¥åº“单价)
        engineSales := sum( macroPlan, FSImportData, tempFSID,
                            tempFSID.Unit()              = "长春工厂"               and
                            tempFSID.Generation()        = ccerr.Generation()       and
                            tempFSID.MqbMlb()            = ccerr.MLB_MQB()          and
                            tempFSID.StartDate().Year()  = ccerc.StartDate().Year() and
                            tempFSID.StartDate().Month() = ccerc.StartDate().Month(),
                            tempFSID.Quantity() );
        cell.StorageFeesForRentedWarehouses( guard( [Number] ( engineSales / guard( lce.PackagingCapacity(), 0 ) ) * guard( lcmr.WarehousingPrice(), 0 ), 0 ) );
        
        // å¤–租库出库费用(发动机产量 / åŒ…装容量[向上取整] * æ–™æž¶å‡ºåº“单价)
        engineProductions := sum( macroPlan, FPImportData, tempFPID,
                                  tempFPID.Unit()              = "长春工厂"               and
                                  tempFPID.Generation()        = ccerr.Generation()       and
                                  tempFPID.MqbMlb()            = ccerr.MLB_MQB()          and
                                  tempFPID.StartDate().Year()  = ccerc.StartDate().Year() and
                                  tempFPID.StartDate().Month() = ccerc.StartDate().Month(),
                                  tempFPID.Quantity() );
        cell.OutboundExpensesForRentedWarehouses( guard( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 0 ) ) * guard( lcmr.OutboundPrice(), 0 ), 0 ) );
        // å¤–租库运输费用:发动机运输量/包装容量/装载容量(向上取整)*料架运输单价
        // å¤–租库仓储费用:料架总数量-发动机库存/包装容量(向上取整),再乘以空料架仓储单价得到空料架仓储费用。发动机库存取Actual inventories里取到长春外租库该发动机的仓储量,料架总数量需要手动维护。
        // æ¸…洗费用:发动机入库量/包装容量*料架清洗单价。发动机入库量取发动机销量,包装容量取自发动机成本表。料架清洗单价取料架成本表。
        cell.CC_EngineRackColumn( relset, ccerc );
      }
    }
  *]
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_DemandDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute DemandDate
{
  #keys: '3[415136.0.1022289854][415136.0.1022289853][415136.0.1022289855]'
  Description: '需求日期'
  ValueType: Date
}
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_DemandQty.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute DemandQty
{
  #keys: '3[415136.0.1022289864][415136.0.1022289863][415136.0.1022289865]'
  Description: '需求数量'
  ValueType: Number
}
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_Fac.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Fac
{
  #keys: '3[415136.0.1022289894][415136.0.1022289893][415136.0.1022289895]'
  Description: '工厂简写'
  ValueType: String
}
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_FactoryName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute FactoryName
{
  #keys: '3[415136.0.1022289884][415136.0.1022289883][415136.0.1022289885]'
  Description: '工厂名称'
  ValueType: String
}
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_InterfaceTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute InterfaceTime
{
  #keys: '3[415136.0.1022289904][415136.0.1022289903][415136.0.1022289905]'
  Description: '接口时间'
  ValueType: DateTime
}
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_Product.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Product
{
  #keys: '3[415136.0.1022289844][415136.0.1022289843][415136.0.1022289845]'
  Description: '物料号'
  ValueType: String
}
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_VersionFlag.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionFlag
{
  #keys: '3[415136.0.1022289914][415136.0.1022289913][415136.0.1022289915]'
  Description: '版本标识'
  ValueType: Boolean
}
_Main/BL/Type_CustomerDemandPPAIDS/Attribute_VersionName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionName
{
  #keys: '3[415136.0.1022289874][415136.0.1022289873][415136.0.1022289875]'
  Description: '版本名称'
  ValueType: String
}
_Main/BL/Type_CustomerDemandPPAIDS/StaticMethod_GenerateData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateData (
  const MacroPlan macroplan,
  InterfaceDataset interfaceDataset,
  String executor,
  Boolean versionflag
)
{
  Description: '生成可以下发的客户需求(PPA+IDS)数据'
  TextBody:
  [*
    // ç”„兰鸽 Aug-20-2024 (created)
    cdlast                 := maxobject( interfaceDataset, CustomerDemandPPAIDS, cd, cd.InterfaceTime(), cd.DemandDate(), cd.Product() );
    if( not isnull( cdlast ) ){
      loginfo              := cdlast.InterfaceLoginfo();
      if( not loginfo.IsShow() ){
        loginfo.Delete();
      }else{
        loginfo.Last( false );
      }
      interfaceDataset.CustomerDemandPPAIDS( relflush );
    }
    nowdate                := DateTime::ActualTime();
    loginfo                := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser := executor
                                                                 , Name := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name()
                                                                 , InterfaceDateTime := DateTime::ActualTime()
                                                                 , Message := '客户需求(PPA+IDS)数据推送'
                                                                 , IsShow := false
                                                                 , Last := true
                                                                 , ReturnSuccess := true
                                                                 , ReturnMsg := 'Success'
                                                                 , Success := true
                                                                  );
    traverse( macroplan, SalesDemand.astype( Forecast ), forecast ){
      cd                  :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product           := forecast.ProductID()
                                                                   , DemandDate              := forecast.StartDate()
                                                                   , DemandQty               := [Number]forecast.Quantity()
                                                                   , VersionName             := macroplan.ScenarioName()
                                                                   , InterfaceTime           := nowdate
                                                                   , VersionFlag             := versionflag
                                                                   );
      loginfo.CustomerDemandPPAIDS( relinsert, cd );
    }
    loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) );
  *]
}
_Main/BL/Type_CustomerDemandPPAIDS/_ROOT_Type_CustomerDemandPPAIDS.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type CustomerDemandPPAIDS
{
  #keys: '5[415136.0.1022289840][415136.0.1022289838][0.0.0][415136.0.1022289839][415136.0.1022289841]'
  BaseType: Object
  Description: '客户需求(PPA+IDS)'
  StructuredName: 'CustomerDemandPPAIDSs'
}
_Main/BL/Type_InterfaceLoginfo/Attribute_IsShow.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsShow
{
  #keys: '3[415136.0.1027064712][415136.0.1027064711][415136.0.1027064713]'
  Description: '是否显示'
  ValueType: Boolean
}
_Main/BL/Type_InterfaceLoginfo/DefaultValue_IsShow.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  ISOValue: 'true'
  TargetAttribute: IsShow
}
_Main/BL/Type_InterfaceLoginfo/StaticMethod_CallInterface.qbl
@@ -68,8 +68,8 @@
    
    if( loginfo.Success() ){
      resultJson     := JSON::Parse( loginfo.Response() );
      code           := resultJson.Get( "code" ).AsString();
      msg            := resultJson.Get( "message" ).AsString();
      code           := resultJson.Get( "code" ).GetString();
      msg            := resultJson.Get( "message" ).GetString();
      data           := resultJson.Get( "data" );
      
      loginfo.ReturnMsg( msg );
_Main/BL/Type_InventorySummarySource/StaticMethod_Download.qbl
@@ -85,19 +85,19 @@
          //Attribute
          //期末库存
          endcellElement := xmlDOM.CreateElement( "cell" );
          endcellElement.SetAttribute( "value", 'EndingInventory' );
          endcellElement.SetAttribute( "value", '期末库存' );//EndingInventory
          attricolumnelement.AppendChild( endcellElement );
          //最小库存
          mincellElement := xmlDOM.CreateElement( "cell" );
          mincellElement.SetAttribute( "value", 'MinimumInventory' );
          mincellElement.SetAttribute( "value", '最小库存' );//MinimumInventory
          attricolumnelement.AppendChild( mincellElement );
          //最大库存
          maxcellElement := xmlDOM.CreateElement( "cell" );
          maxcellElement.SetAttribute( "value", 'MaximumInventory' );
          maxcellElement.SetAttribute( "value", '最大库存' );//MaximumInventory
          attricolumnelement.AppendChild( maxcellElement );
          //平均库存
          avecellElement := xmlDOM.CreateElement( "cell" );
          avecellElement.SetAttribute( "value", 'AverageInventory' );
          avecellElement.SetAttribute( "value", '平均库存' );//AverageInventory
          attricolumnelement.AppendChild( avecellElement );
        }
        //期末库存
_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Download.qbl
@@ -78,39 +78,39 @@
          //Attribute
          //长春装配计划
          ccaqcellElement := xmlDOM.CreateElement( "cell" );
          ccaqcellElement.SetAttribute( "value", 'CCAssemblyPlanQty' );
          ccaqcellElement.SetAttribute( "value", '长春装配计划' );//CCAssemblyPlanQty
          attricolumnelement.AppendChild( ccaqcellElement );
          //长春生产计划
          ccpqcellElement := xmlDOM.CreateElement( "cell" );
          ccpqcellElement.SetAttribute( "value", 'CCProductionQty' );
          ccpqcellElement.SetAttribute( "value", '长春生产计划' );//CCProductionQty
          attricolumnelement.AppendChild( ccpqcellElement );
          //长春调拨计划
          cctqcellElement := xmlDOM.CreateElement( "cell" );
          cctqcellElement.SetAttribute( "value", 'CCTransferQty' );
          cctqcellElement.SetAttribute( "value", '长春调拨计划' );//CCTransferQty
          attricolumnelement.AppendChild( cctqcellElement );
          //长春库存
          cciqcellElement := xmlDOM.CreateElement( "cell" );
          cciqcellElement.SetAttribute( "value", 'CCInventoryQty' );
          cciqcellElement.SetAttribute( "value", '长春库存' );//CCInventoryQty
          attricolumnelement.AppendChild( cciqcellElement );
          //大连装配计划
          dlaqcellElement := xmlDOM.CreateElement( "cell" );
          dlaqcellElement.SetAttribute( "value", 'DLAssemblyPlanQty' );
          dlaqcellElement.SetAttribute( "value", '大连装配计划' );//DLAssemblyPlanQty
          attricolumnelement.AppendChild( dlaqcellElement );
          //大连生产计划
          dlpqcellElement := xmlDOM.CreateElement( "cell" );
          dlpqcellElement.SetAttribute( "value", 'DLProductionQty' );
          dlpqcellElement.SetAttribute( "value", '大连生产计划' );//DLProductionQty
          attricolumnelement.AppendChild( dlpqcellElement );
          //大连调拨计划
          dltqcellElement := xmlDOM.CreateElement( "cell" );
          dltqcellElement.SetAttribute( "value", 'DLTransferQty' );
          dltqcellElement.SetAttribute( "value", '大连调拨计划' );//DLTransferQty
          attricolumnelement.AppendChild( dltqcellElement );
          //大连库存
          dliqcellElement := xmlDOM.CreateElement( "cell" );
          dliqcellElement.SetAttribute( "value", 'DLInventoryQty' );
          dliqcellElement.SetAttribute( "value", '大连库存' );//DLInventoryQty
          attricolumnelement.AppendChild( dliqcellElement );
          //长春 + å¤§è¿ž åº“å­˜
          tiqcellElement := xmlDOM.CreateElement( "cell" );
          tiqcellElement.SetAttribute( "value", 'TotalInventoryQty' );
          tiqcellElement.SetAttribute( "value", '长春 + å¤§è¿žåº“å­˜' );//TotalInventoryQty
          attricolumnelement.AppendChild( tiqcellElement );
        }
        //长春装配计划
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
@@ -44,10 +44,31 @@
      BaseType: 'WebMenu'
      Properties:
      [
        Taborder: 3
        Taborder: 4
        Title: '计划库存数据推送接口测试'
      ]
    }
    Component MenuInterface367
    {
      #keys: '[415136.0.1024980241]'
      BaseType: 'WebMenu'
      Properties:
      [
        Separator: true
        Taborder: 3
      ]
    }
    Component MenuCustomerDemandPPAIDS
    {
      #keys: '[415136.0.1024980263]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'FLAG_AMBER'
        Taborder: 5
        Title: 'Customer demand(PPA + IDS)'
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_MenuCustomerDemandPPAIDS_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: ContextMenuInterface/MenuCustomerDemandPPAIDS
Response OnClick () id:Response_MacroPlanner_ContextMenuInterface_MenuCustomerDemandPPAIDS_OnClick
{
  #keys: '[415136.0.1024980283]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMenu_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and not isnull( InterfaceDataset );
  *]
  QuillAction
  {
    Body:
    [*
      dlg := construct( DialogCustomerDemandPPAIDS );
      dlg.Title( Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() );
      dlg.New( Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlActions.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
Quintiq file version 2.0
Component pnlActions
{
  #keys: '[415136.0.1022501788]'
  BaseType: 'WebPanel'
  Children:
  [
    Component btnOk
    {
      #keys: '[415136.0.1022501792]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'OK'
        Taborder: 0
      ]
    }
    Component btnCancel
    {
      #keys: '[415136.0.1022501794]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Cancel'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    Border: true
    ExcludeFromActiveComponent: true
    FixedSize: true
    Orientation: 'horizontal'
    Padding: 'true'
    Style: 'footer'
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Component_pnlContent.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
Quintiq file version 2.0
Component pnlContent
{
  #keys: '[415136.0.1022501786]'
  BaseType: 'WebPanel'
  Children:
  [
    Component rbgVersionFlag
    {
      #keys: '[415136.0.1022501839]'
      BaseType: 'WebRadioButtonGroup'
      Properties:
      [
        ButtonLabels: '发布版本;汇报版本'
        ButtonValues: 'true;false'
        Taborder: 0
        Title: '版本标识'
      ]
    }
    Component efInterfacename
    {
      #keys: '[415136.0.1022501890]'
      BaseType: 'WebEditField'
      Properties:
      [
        Label: '接口名称'
        Taborder: 1
        Visible: false
      ]
    }
  ]
  Properties:
  [
    Padding: 'true'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_New.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
Method New (
  String name
) id:Method_DialogCustomerDemandPPAIDS_New
{
  #keys: '[415136.0.1022502059]'
  Body:
  [*
    // Edit Product(s)
    efInterfacename.Text( name );
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Method_OnOK.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_DialogCustomerDemandPPAIDS_OnOK
{
  #keys: '[415136.0.1022502154]'
  Body:
  [*
    // On ok
    Form.ApplyChanges();
    if( efInterfacename.Text() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() ){
      CustomerDemandPPAIDS::GenerateData( MacroPlan, InterfaceDataset, QuintiqUser::CurrentUser().DisplayName(), ifexpr( rbgVersionFlag.BoundValue() = "true", true, false ) );
    }
    Form.Close();
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnCancel_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActions/btnCancel
Response OnClick () id:Response_pnlActions_btnCancel_OnClick
{
  #keys: '[415136.0.1022501798]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.Close();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/Response_pnlActions_btnOk_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[415136.0.1022501797]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.OnOK();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCustomerDemandPPAIDS/_ROOT_Component_DialogCustomerDemandPPAIDS.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent DialogCustomerDemandPPAIDS
{
  #keys: '[415136.0.1022501784]'
  BaseType: 'WebForm'
  Children:
  [
    #child: pnlContent
    #child: pnlActions
  ]
  Properties:
  [
    Alignment: 'trailing'
    EnterButton: 'btnOk'
    EscapeButton: 'btnCancel'
    ExcludeFromActiveComponent: true
    Image: 'FLAG_AMBER'
    Padding: 'false'
    Title: 'Customer demand(PPA + IDS)'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bRefresh_OnClick.def
@@ -14,6 +14,8 @@
    Body:
    [*
      CC_EngineRackCell::CreateData( MacroPlan );
      WebMessageBox::Success( Translations::A_VWED_Success() );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Views/CCEngineRackReport.vw
@@ -30,7 +30,7 @@
          FormCC_EngineRackReport_MatrixEditor531
          {
            gridColor: '#c4c4c4'
            totalHeaderWidth: 200
            totalHeaderWidth: 500
            attributeHeaderWidthRatio: 0.6
            nameHeaderWidthRatio: 0.4
            columnWidth: 100