admin
2024-08-27 131236be1e80fea9aa9ff158bd270646059cfdfc
接口优化
已添加2个文件
已修改2个文件
34 ■■■■ 文件已修改
_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_InterfaceTime.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_VersionFlag.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_InterfaceTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute InterfaceTime
{
  #keys: '3[415754.0.167220062][415754.0.167220061][415754.0.167220063]'
  Description: '接口时间'
  ValueType: DateTime
}
_Main/BL/Type_InterfacePlanInventoryDataPush/Attribute_VersionFlag.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionFlag
{
  #keys: '3[415754.0.167260029][415754.0.167260028][415754.0.167260030]'
  Description:
  [*
    1:发布版本
    0:汇报版本
  *]
  ValueType: Number
}
_Main/BL/Type_InterfacePlanInventoryDataPush/StaticMethod_GenerateData.qbl
@@ -2,12 +2,16 @@
#parent: #root
StaticMethod GenerateData (
  MacroPlan macroPlan,
  InterfaceDataset interfaceDataset
  InterfaceDataset interfaceDataset,
  Number versionFlag
)
{
  TextBody:
  [*
    interfaceDataset.InterfacePlanInventoryDataPush( relflush );
    ipidps := selectset( interfaceDataset, InterfacePlanInventoryDataPush, tempIPIDP, tempIPIDP.VersionFlag() = versionFlag );
    MacroPlan::DeleteObjects( ipidps );
    actualDateTime := DateTime::ActualTime();
    
    traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pispmp, not pispmp.IsSystem() and pispmp.IsLeaf() ) {
      traverse ( pispmp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, not pispippl.IsPeriodFrozen() ) {
@@ -17,7 +21,9 @@
                                                         PlanningInventory := [Number]pispippl.InventoryLevelEnd(),
                                                         VersionName       := macroPlan.ScenarioName(),
                                                         FactoryName       := ifexpr( pispmp.StockingPointID().Regex( "大连" ) or pispmp.StockingPointID().Regex( "DL" ), "大连工厂", "长春工厂" ),
                                                         Fac               := ifexpr( pispmp.StockingPointID().Regex( "大连" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" )
                                                         Fac               := ifexpr( pispmp.StockingPointID().Regex( "大连" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" ),
                                                         InterfaceTime     := actualDateTime,
                                                         VersionFlag       := versionFlag
                                                        );
      } 
    }
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def
@@ -13,7 +13,7 @@
  {
    Body:
    [*
      InterfacePlanInventoryDataPush::GenerateData( MacroPlan, InterfaceDataset );
      InterfacePlanInventoryDataPush::GenerateData( MacroPlan, InterfaceDataset, Number::Random( 0, 1 ) );
      
      WebMessageBox::Success( "推送成功!" );
    *]