实际库存、外部库存、库存成本、产品在车道实现多事业部分发
| | |
| | | StaticMethod DoASync ( |
| | | MacroPlan macroPlan, |
| | | const GlobalOTDTable globalOTDTable, |
| | | String businessTypeName |
| | | Strings businessTypeNames |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | //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); |
| | | *] |
| | | } |
| | |
| | | // 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 ) ); |
| | |
| | | |
| | | 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 |
| | |
| | | #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(); |
| | | |
| | |
| | | #parent: #root |
| | | Method DoASyncMappingProductInLaneData ( |
| | | const GlobalOTDTable globalOTDTable, |
| | | String businessTypeName |
| | | Strings businessTypeNames |
| | | ) |
| | | { |
| | | Description: 'Get Product In Line data' |
| | |
| | | // 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" ); |
| | |
| | | //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" ); |
| | |
| | | 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" ); |