hongji.li
2023-10-26 dc03b8a0920cb6793a37e3a9cc4cd83ff384be94
实际库存、外部库存、库存成本、产品在车道实现多事业部分发
已修改6个文件
46 ■■■■■ 文件已修改
_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoASync.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_DoASyncMappingExternalSupplyData.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_DoASyncMappingInventoryValueAndCostData.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_DoASyncMappingProductInLaneData.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/StaticMethod_DoASync#253.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoASync.qbl
@@ -3,7 +3,7 @@
StaticMethod DoASync (
  MacroPlan macroPlan,
  const GlobalOTDTable globalOTDTable,
  String businessTypeName
  Strings businessTypeNames
)
{
  TextBody:
@@ -12,6 +12,6 @@
    //info( "ActualPISPIP Finished, Start InventoryCost Data Broker" );
    //macroPlan.Broker_OTD_InventoryCost().Execute();
    info( "InventoryCost Data Broker Finished, Start InventoryCost Mapping" );
    macroPlan.DoASyncMappingInventoryValueAndCostData(globalOTDTable,businessTypeName);
    macroPlan.DoASyncMappingInventoryValueAndCostData(globalOTDTable,businessTypeNames);
  *]
}
_Main/BL/Type_MacroPlan/Method_DoASyncMappingActualPISPIPData.qbl
@@ -12,9 +12,10 @@
    // renhao Aug-14-2023 (created)
    listtodeal := construct( Global_MappingActualProductInStockingPointInPeriods, constcontent );
    if ( businessTypes.Size() > 0 ) {
      businessTypeName := businessTypes.Element( 0 );
      targetGlobal_ProductCategory := select( globalOTDTable, Global_ProductCategory, tempGPC, tempGPC.BusinessTypeName() = businessTypeName );
      listtodeal := selectset( targetGlobal_ProductCategory, Global_MappingProduct_MP.Global_MAPISPIPCategory.Global_MappingActualProductInStockingPointInPeriod,
      targetGlobal_ProductCategory := selectset( globalOTDTable, Global_ProductCategory, tempGPC,
                                                 exists( businessTypes, Elements, tempBTN, tempBTN = tempGPC.BusinessTypeName() ) );
      listtodeal := selectset( targetGlobal_ProductCategory,
                               Elements.Global_MappingProduct_MP.Global_MAPISPIPCategory.Global_MappingActualProductInStockingPointInPeriod,
                               tempGMPIL, 
                               ( tempGMPIL.ActualInventoryLevelEnd() > 0 ) and 
                               ( organcodelist.Find( tempGMPIL.StockingPointID().SubString( 0, 3 ) ) >= 0 ) );
_Main/BL/Type_MacroPlan/Method_DoASyncMappingExternalSupplyData.qbl
@@ -15,9 +15,10 @@
    
    listtodeal := construct( Global_MappingInventorySupplys, constcontent );
    if ( businessTypes.Size() > 0 ) {
      businessTypeName := businessTypes.Element( 0 );
      targetGlobal_ProductCategory := select( globalOTDTable, Global_ProductCategory, tempGPC, tempGPC.BusinessTypeName() = businessTypeName );
      listtodeal := selectset( targetGlobal_ProductCategory, Global_MappingProduct_MP.Global_InventorySupplyCategory.Global_MappingInventorySupply,
      targetGlobal_ProductCategory := selectset( globalOTDTable, Global_ProductCategory, tempGPC,
                                                 exists( businessTypes, Elements, tempBTN, tempBTN = tempGPC.BusinessTypeName() ) );
      listtodeal := selectset( targetGlobal_ProductCategory,
                               Elements.Global_MappingProduct_MP.Global_InventorySupplyCategory.Global_MappingInventorySupply,
                               tempGMIS, 
                               ( tempGMIS.UserQuantity()>0 ) and 
                               ( tempGMIS.Date() >= queryStartDate ) and 
_Main/BL/Type_MacroPlan/Method_DoASyncMappingInventoryValueAndCostData.qbl
@@ -2,18 +2,22 @@
#parent: #root
Method DoASyncMappingInventoryValueAndCostData (
  const GlobalOTDTable globalOTDTable,
  String businessTypeName
  Strings businessTypeNames
)
{
  TextBody:
  [*
    // yypsybs Aug-15-2023 (created)
    listtodeal := construct( Global_MappingStockingPointCosts, constcontent );
    if ( businessTypeName = "" ) {
    if ( businessTypeNames.Size() = 0 ) {
      listtodeal := selectset( globalOTDTable,Global_MappingStockingPointCost,item,true );
    } else {
      targetGlobal_ProductCategory := select( globalOTDTable, Global_ProductCategory, tempGPC, tempGPC.BusinessTypeName() = businessTypeName );
      listtodeal := selectset( targetGlobal_ProductCategory, Global_MappingProduct_MP.Global_StockingPointCostCategory.Global_MappingStockingPointCost, tempGMPIL, true );
      targetGlobal_ProductCategory := selectset( globalOTDTable, Global_ProductCategory, tempGPC,
                                                 exists( businessTypeNames, Elements, tempBTN, tempBTN = tempGPC.BusinessTypeName() ) );
      listtodeal := selectset( targetGlobal_ProductCategory,
                               Elements.Global_MappingProduct_MP.Global_StockingPointCostCategory.Global_MappingStockingPointCost,
                               tempGMPIL,
                               true );
    }
    totalcount := listtodeal.Size();
    
_Main/BL/Type_MacroPlan/Method_DoASyncMappingProductInLaneData.qbl
@@ -2,7 +2,7 @@
#parent: #root
Method DoASyncMappingProductInLaneData (
  const GlobalOTDTable globalOTDTable,
  String businessTypeName
  Strings businessTypeNames
)
{
  Description: 'Get Product In Line data'
@@ -11,11 +11,15 @@
    // Administrator Aug-17-2023 (created)
    // list to deal
    listtodeal := construct( Global_MappingProductInLanes, constcontent );
    if ( businessTypeName = "" ) {
    if ( businessTypeNames.Size() = 0 ) {
      listtodeal := selectset( globalOTDTable, Global_MappingProductInLane, item ,true );
    } else {
      targetGlobal_ProductCategory := select( globalOTDTable, Global_ProductCategory, tempGPC, tempGPC.BusinessTypeName() = businessTypeName );
      listtodeal := selectset( targetGlobal_ProductCategory, Global_MappingProduct_MP.Global_ProductInLineCategory.Global_MappingProductInLane, tempGMPIL, true );
      targetGlobal_ProductCategory := selectset( globalOTDTable, Global_ProductCategory, tempGPC,
                                                 exists( businessTypeNames, Elements, tempBTN, tempBTN = tempGPC.BusinessTypeName() ) );
      listtodeal := selectset( targetGlobal_ProductCategory,
                               Elements.Global_MappingProduct_MP.Global_ProductInLineCategory.Global_MappingProductInLane,
                               tempGMPIL,
                               true );
    }
    totalcount := listtodeal.Size();
    info( "ProductInLane has " + totalcount.AsQUILL() + " rows in total" );
_Main/BL/Type_MacroPlan/StaticMethod_DoASync#253.qbl
@@ -115,7 +115,7 @@
    //info( "Get Lanelegs From Api Finished, Start ProductInLane Data Broker" );
    //macroPlan.Broker_OTD_ProductInLane().Execute();
    info( "ProductInLane Data Broker Finished, Start ProductInLane Mapping" );
    macroPlan.DoASyncMappingProductInLaneData(globalOTDTable,guard( businessTypeName.Element( 0 ), "" ));
    macroPlan.DoASyncMappingProductInLaneData(globalOTDTable,businessTypeName);
    
    // 在库库存数据-13
    //info( "ProductInLane Finished, Start ActualPISPIP Data Broker" );
@@ -130,7 +130,7 @@
    macroPlan.DoASyncMappingExternalSupplyData( businessTypeName, isKeyProduct ,globalOTDTable, organcodelist );
    
    // 库存成本-15
    InventoryValueAndCost::DoASync( macroPlan,globalOTDTable,guard( businessTypeName.Element( 0 ), "" ) );
    InventoryValueAndCost::DoASync( macroPlan,globalOTDTable, businessTypeName );
    
    // todo 制造成本-16
    info( "InventoryCost Finished, Start OperationCost Mapping" );