Merge remote-tracking branch 'refs/remotes/origin/dev_release'
| | |
| | | [* |
| | | // Administrator Jul-12-2023 (created) |
| | | laneid := datarow.Get( "laneid" ).GetString(); |
| | | originstockingpointid := datarow.Get( "originstockingpointid" ).GetString(); |
| | | destinationstockingpointid := datarow.Get( "destinationstockingpointid" ).GetString(); |
| | | originstockingpointid := datarow.Get( "originstockingpointid" ).GetString()+"_STOCK"; |
| | | destinationstockingpointid := datarow.Get( "destinationstockingpointid" ).GetString()+"_STOCK"; |
| | | name := datarow.Get( "name" ).GetString(); |
| | | userleadtime := datarow.Get( "userleadtime" ); |
| | | processingtime := Duration::Zero(); |
| | |
| | | routingStep := RoutingStep::Create( routing, routingStepName, "", true ); |
| | | product := Product_MP::FindById( this, productId ); |
| | | if( isnull( product ) ) { |
| | | error( "product : " + productId + " not found" ); |
| | | info( "product : " + productId + " not found" ); |
| | | } |
| | | stockingPointId := orgCode + "_" + productType + "_Stock"; |
| | | stockingPointId := orgCode + "_" + productType + "_STOCK"; |
| | | stockingPoint := StockingPoint_MP::FindById( this, stockingPointId ); |
| | | if( isnull( stockingPoint ) ) { |
| | | error( "stockingPoint : " + stockingPointId + " not found" ); |
| | | info( "stockingPoint : " + stockingPointId + " not found" ); |
| | | } |
| | | |
| | | if( not isnull( product) and not isnull( stockingPoint)){ |
| | | unit := Unit::FindById( this, unitId ); |
| | | if( isnull( unit ) ) { |
| | | unit := this.Unit( relnew, |
| | |
| | | Currency_MP := this.BaseCurrency(), UnitOfMeasure_MP := this.DefaultUnitOfMeasure() ); |
| | | } |
| | | // Operation |
| | | operation := Operation::FindOperationTypeIndex( operationId); |
| | | if( isnull( operation)){ |
| | | operation := Operation::Create( operationId, unit, operationId, routingStep, |
| | | Duration::Zero(), Duration::Zero(), 1.0, false, |
| | | Real::MinReal(), false, Real::MaxReal(), |
| | |
| | | // OperaionBom |
| | | operation.CreateOperationBOM( product, stockingPoint, false, true ); |
| | | operation.GetOperationBOM( product.ID(), stockingPoint.ID(), false ).Quantity( 1 ); |
| | | } |
| | | |
| | | } |
| | | *] |
| | | } |
| | |
| | | data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody ); |
| | | macroPlan.ApiLaneLegsData( data ); |
| | | |
| | | //// 供应网络(车道)-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(); |
| | | // 供应网络(车道)-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( "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 ); |
| | | macroPlan.MappingActualPISPIPData( businessTypes, isKeyProduct ); |
| | | |
| | | // 在途库存-14 |
| | | info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" ); |
| | | macroPlan.Broker_OTD_ExternalSupply().Execute(); |
| | | //macroPlan.MappingExternalSupplyData( businessTypes, true ); |
| | | info( "ExternalSupply Data Broker Finished, Start ExternalSupply Mapping" ); |
| | | macroPlan.MappingExternalSupplyData( businessTypes, false ); |
| | | macroPlan.MappingExternalSupplyData( businessTypes, isKeyProduct ); |
| | | |
| | | // 库存成本-15 |
| | | InventoryValueAndCost::DoSync( macroPlan ); |