| | |
| | | info( "Prepare to do sync" ) |
| | | info( "Get organ code list" ) |
| | | businessTypeName := businessType.BusinessTypeName().Tokenize( "," ); |
| | | macroPlan.BusinessType( businessType.BusinessTypeName() ); |
| | | |
| | | organcodelist := selectvalues( businessType, OrganCode, organ, true, organ.OrganCodeName() ); |
| | | |
| | | if( organcodelist.Size() = 0 ){ |
| | |
| | | macroPlan.DoASyncMappingUnitData( businessTypeName ,globalOTDTable, organcodelist); |
| | | |
| | | // 库存点-3 |
| | | info( "Sales Segment Finished, Start Get StockingPoint From Api" ) |
| | | parameter := select( globalOTDTable, GlobalParameters, param, param.AttributeName() = "StockingPoint" ); |
| | | postrequestbody := parameter.PostRequestBody(); |
| | | address := parameter.Address(); |
| | | url := parameter.AttributeValue(); |
| | | port := [Number]parameter.Port(); |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiStockingPointData( data ); |
| | | info( "Sales Segment Finished, Start Get StockingPoint From Mapping" ) |
| | | StockingPoint_MP::CreateFromMapping( globalOTDTable, macroPlan ); |
| | | //parameter := select( globalOTDTable, GlobalParameters, param, param.AttributeName() = "StockingPoint" ); |
| | | //postrequestbody := parameter.PostRequestBody(); |
| | | //address := parameter.Address(); |
| | | //url := parameter.AttributeValue(); |
| | | //port := [Number]parameter.Port(); |
| | | //data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | //macroPlan.ApiStockingPointData( data ); |
| | | |
| | | // 货币信息-4 |
| | | info( "Get StockingPoint From Api Finished, Start Get CurrencyInfo From Api" ) |
| | | parameter := select( globalOTDTable, GlobalParameters, param, param.AttributeName() = "CurrencyInfo" ); |
| | | postrequestbody := parameter.PostRequestBody(); |
| | | address := parameter.Address(); |
| | | url := parameter.AttributeValue(); |
| | | port := [Number]parameter.Port(); |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiCurenciesData( data ); |
| | | info( "Get StockingPoint From Api Finished, Start Get CurrencyInfo From Mapping" ) |
| | | Currency_MP::CreateFromMapping( globalOTDTable, macroPlan ); |
| | | |
| | | //货币汇率信息-5 |
| | | info( "Get CurrencyInfo From Api Finished, Start Get CurrencyRates From Api" ) |
| | | parameter := select( globalOTDTable, GlobalParameters, param, param.AttributeName() = "CurrencyRates" ); |
| | | postrequestbody := parameter.PostRequestBody(); |
| | | address := parameter.Address(); |
| | | url := parameter.AttributeValue(); |
| | | port := [Number]parameter.Port(); |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiCurencyRatesData( data ); |
| | | info( "Get CurrencyInfo From Api Finished, Start Get CurrencyRates From Mapping" ) |
| | | CurrencyRate_MP::CreateFromMapping( globalOTDTable, macroPlan ); |
| | | |
| | | // 产品物料-6 |
| | | //info( "Get CurrencyRates From Api Finished, Start Product Data Broker" ) |
| | |
| | | macroPlan.DoASyncMappingOperationBOMData( businessTypeName, isKeyProduct, createPurchaseSupplyMaterial,globalOTDTable, organcodelist ); |
| | | |
| | | //车道信息-10 |
| | | info( "BOM Finished, Start Get Lanes From Api" ); |
| | | parameter := select( globalOTDTable, GlobalParameters, param, param.AttributeName() = "Lanes" ); |
| | | postrequestbody := parameter.PostRequestBody(); |
| | | address := parameter.Address(); |
| | | url := parameter.AttributeValue(); |
| | | port := [Number]parameter.Port(); |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiLanesData( data ); |
| | | info( "BOM Finished, Start Get Lanes From Mapping" ); |
| | | Lane::CreasteFromMapping( globalOTDTable, macroPlan ); |
| | | |
| | | //车道运输段-11 |
| | | info( "Get Lanes From Api Finished, Start Get LaneLegs From Api" ); |
| | | parameter := select( globalOTDTable, GlobalParameters, param, param.AttributeName() = "LaneLegs" ); |
| | | postrequestbody := parameter.PostRequestBody(); |
| | | address := parameter.Address(); |
| | | url := parameter.AttributeValue(); |
| | | port := [Number]parameter.Port(); |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiLaneLegsData( data ); |
| | | info( "Get Lanes From Api Finished, Start Get LaneLegs From Mapping" ); |
| | | LaneLeg::CreateFromMapping( globalOTDTable, macroPlan ); |
| | | |
| | | // 供应网络(车道)-12 |
| | | //info( "Get Lanelegs From Api Finished, Start ProductInLane Data Broker" ); |