| | |
| | | { |
| | | #keys: '[414702.1.84941735]' |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | flag := not isnull( GlobalOTDTable ) and not isnull( GlobalOTDLog ); |
| | | |
| | | activeScenario := DataHolderActiveScenario.Data(); |
| | | currentScenario := DataHolderScenario.Data(); |
| | | businessType := ddlBusinessType.Data(); |
| | | |
| | | if ( activeScenario = currentScenario or isnull( businessType ) ) { |
| | | flag := false; |
| | | feedback := "无法对当前选中场景进行分发"; |
| | | } |
| | | |
| | | isExists := exists( GlobalOTDLog, DataDistributionLog, tempDD, tempDD.ExecuteStatus() = "Running" and tempDD.MacroPlanMDSID() = currentScenario.DatasetMDSID() ); |
| | | if ( flag and isExists ) { |
| | | flag := false; |
| | | feedback := "当前场景正在进行分发"; |
| | | } |
| | | |
| | | return flag; |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | Form.ApplyChanges(); |
| | | |
| | | businessType := select( GlobalOTDTable, |
| | | BusinessType, |
| | | b, |
| | | b.ScenarioName() = dropDownStringListGeneral.Text() |
| | | ); |
| | | |
| | | //Global_BrokerExecuteLog::CreateInOperation( GlobalOTDTable, "DataDistribution", ApplicationMacroPlanner.GetUserName() ); |
| | | DataDistributionLog::Create( GlobalOTDLog, ApplicationMacroPlanner.GetUserName(), DataHolderScenario.Data().DatasetMDSID(), DataHolderScenario.Data().Name() ); |
| | | MacroPlan::DoASync( DataHolderScenario.Data(), |
| | | businessType.BusinessTypeName(), |
| | | ddlBusinessType.Data(), |
| | | checkboxIsKeyProduct.Checked(), |
| | | checkboxCreatePurchaseSupplyProduct.Checked(), |
| | | GlobalOTDTable ); |