| | |
| | | } |
| | | info( "KeyProduct : " + [String]isKeyProduct ) |
| | | info( "Create purchase supply material : " + [String]createPurchaseSupplyMaterial ) |
| | | |
| | | // 初始换-0 |
| | | info( "Initial" ); |
| | | info( "Start Initial" ); |
| | | macroPlan.InitialUnitAndStockingPoint(); |
| | | |
| | | // 单位-1 |
| | | info( "UnitOfMeasure_MP::DoSync" ) |
| | | UnitOfMeasure_MP::DoSync( macroPlan ); |
| | | |
| | | // 销售部门-2 |
| | | info( "SalesSegment::DoSync" ) |
| | | SalesSegment_MP::DoSync( macroPlan, businessTypes ); |
| | | |
| | | // 库存点-3 |
| | | info( "StockingPoint::DoSync" ) |
| | | info( "Sales Segment Finished, Start Get StockingPoint From Api" ) |
| | | bodynumber := "2"; |
| | | postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber ); |
| | | address := "api-uat-sgc.tianma.cn"; |
| | |
| | | port := 443; |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiStockingPointData( data ); |
| | | |
| | | // 货币信息-4 |
| | | info( "Currencies::DoSync" ) |
| | | info( "Get StockingPoint From Api Finished, Start Get CurrencyInfo From Api" ) |
| | | bodynumber := "1"; |
| | | postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber ); |
| | | address := "api-uat-sgc.tianma.cn"; |
| | |
| | | port := 443; |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiCurenciesData( data ); |
| | | |
| | | //货币汇率信息-5 |
| | | info( "CurrencyRates::DoSync" ) |
| | | info( "Get CurrencyInfo From Api Finished, Start Get CurrencyRates From Api" ) |
| | | bodynumber := "5"; |
| | | postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber ); |
| | | address := "api-uat-sgc.tianma.cn"; |
| | |
| | | macroPlan.ApiCurencyRatesData( data ); |
| | | |
| | | // 产品物料-6 |
| | | info( "Product::DoSync" ) |
| | | //todo: 数据有重复,先略过 |
| | | info( "Get CurrencyRates From Api Finished, Start Product Data Broker" ) |
| | | macroPlan.Broker_OTD_Product().Execute(); |
| | | info( "Start data mapping of product" ); |
| | | info( "Product Data Broker Finished, Start Product Mapping" ); |
| | | //testproduct := construct( Strings ); |
| | | macroPlan.MappingProductData( businessTypes, false ); |
| | | |
| | | //单位转换-7 |
| | | info( "BaseConversionFactor::DoSync" ) |
| | | BaseConversionFactor::DoSync( macroPlan ); |
| | | |
| | | // Unit-9 |
| | | // 与Operation一同处理 |
| | | info( "Unit::DoSync" ) |
| | | info( "Start data broker of operation" ); |
| | | info( "BaseConversionFactor Finished, Start Operation Data Broker" ); |
| | | macroPlan.Broker_OTD_Operation().Execute(); |
| | | info( "Operation Data Broker Finished, Start Unit Mapping" ); |
| | | macroPlan.MappingUnitData( businessTypes ); |
| | | |
| | | // 工艺路线 + BOM-9 |
| | | info( "Operation&BOM::DoSync" ) |
| | | info( "Start data mapping of operation" ); |
| | | info( "Unit Finished, Start Operation Mapping" ); |
| | | macroPlan.MappingOperationData( businessTypes ); |
| | | info( "Operation Finished, Start BOM Data Broker" ); |
| | | macroPlan.Broker_OTD_BOM().Execute(); |
| | | info( "BOM Data Broker Finished, Start BOM Mapping" ); |
| | | macroPlan.MappingOperationBOMData( businessTypes, isKeyProduct, createPurchaseSupplyMaterial ); |
| | | |
| | | //车道信息-10 |
| | | info( "Lanes::DoSync" ) |
| | | info( "BOM Finished, Start Get Lanes From Api" ); |
| | | bodynumber := "3"; |
| | | postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber ); |
| | | address := "api-uat-sgc.tianma.cn"; |
| | |
| | | port := 443; |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiLanesData( data ); |
| | | |
| | | //车道运输段-11 |
| | | info( "LaneLegs::DoSync" ) |
| | | info( "Get Lanes From Api Finished, Start Get LaneLegs From Api" ); |
| | | bodynumber := "4"; |
| | | postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber ); |
| | | address := "api-uat-sgc.tianma.cn"; |
| | |
| | | port := 443; |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiLaneLegsData( data ); |
| | | // 供应网络(车道)-12 |
| | | info( "ProductInLane::DoSync" ) |
| | | macroPlan.Broker_OTD_ProductInLane().Execute(); |
| | | macroPlan.MappingProductInLaneData(); |
| | | |
| | | //// 供应网络(车道)-12 |
| | | //info( "Get Lanelegs From Api Finished, Start ProductInLane Data Broker" ); |
| | | //macroPlan.Broker_OTD_ProductInLane().Execute(); |
| | | //info( "ProductInLane Data Broker Finished, Start ProductInLane Mapping" ); |
| | | //macroPlan.MappingProductInLaneData(); |
| | | |
| | | // 在库库存数据-13 |
| | | info( "ActualPISPIP::DoSync" ) |
| | | info( "ProductInLane Finished, Start ActualPISPIP Data Broker" ); |
| | | macroPlan.Broker_OTD_ActualPISPIP().Execute(); |
| | | info( "ActualPISPIP Data Broker Finished, Start ActualPISPIP Mapping" ); |
| | | //macroPlan.MappingActualPISPIPData( businessTypes, true ); |
| | | macroPlan.MappingActualPISPIPData( businessTypes, false ); |
| | | |
| | | // 在途库存-14 |
| | | info( "ExternalSupply::DoSync" ) |
| | | info( "Start data broker of External supply" ); |
| | | info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" ); |
| | | macroPlan.Broker_OTD_ExternalSupply().Execute(); |
| | | //macroPlan.MappingExternalSupplyData( businessTypes, true ); |
| | | info( "Start data mapping of External supply" ); |
| | | info( "ExternalSupply Data Broker Finished, Start ExternalSupply Mapping" ); |
| | | macroPlan.MappingExternalSupplyData( businessTypes, false ); |
| | | |
| | | // 库存成本-15 |
| | | info( "InventoryCost::DoSync" ); |
| | | InventoryValueAndCost::DoSync( macroPlan ); |
| | | |
| | | //// todo 制造成本-16 |
| | | //info( "OperationCost::DoSync" ); |
| | | //info( "InventoryCost Finished, Start OperationCost Mapping" ); |
| | | //macroPlan.MappingOperationCostData( businessTypes ); |
| | | |
| | | // 订单预测-17 |
| | | info( "Forecast::DoSync" ); |
| | | Forecast::DoSync( macroPlan, businessTypes ); |
| | | |
| | | // 订单需求-18 |
| | | info( "CustomerOrder::DoSync" ); |
| | | CustomerOrder::DoSync( macroPlan, businessTypes ); |
| | | |
| | | //// todo 供应商能力 |
| | | //info( "ProviderCapacity::DoSync" ) |
| | | |
| | | //// todo 供应商回复 |
| | | //info( "ProviderReply::DoSync" ) |
| | | *] |