yanweiyuan3
2023-10-17 ea56fab48d2ed55b4de46f4500565415535056b0
Move to GlobalOTDSOP

将之前link到GlobalOTDTable的MappingVersionControl、VersionControl和VersionStatus迁移到GlobalOTDSOP并对于前后端相关方法中进行了相应调整修改,并修复了无BusinessType实例时无法创建空场景的问题
已重命名2个文件
已修改22个文件
已添加3个文件
已删除3个文件
224 ■■■■ 文件已修改
_Main/BL/EDI/Broker_Broker_OTD_VersionControl.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_MappingVersionControl_GlobalOTDSOP_GlobalOTDSOP_MappingVersionContr.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_MappingVersionControl_GlobalOTDTable_GlobalOTDTable_MappingVersionC.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_VersionControl_GlobalOTDSOP_GlobalOTDSOP_VersionControl.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_VersionControl_GlobalOTDTable_GlobalOTDTable_VersionControl.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_VersionStatus_GlobalOTDSOP_GlobalOTDSOP_VersionStatus.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_VersionStatus_GlobalOTDTable_GlobalOTDTable_VersionStatus.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalOTDSOP/StaticMethod_GetOutputVersionData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalOTDSOP/StaticMethod_GetVersionData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_CopyVersion.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_Create.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_CreateNewSceneVersion.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_CreateNewVersion.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_FindByFullVersionID.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_FindLatestUpdateVersion.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_FindLatestVersion.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_FindReleasedVersions.qbl 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_GetVersionInfo.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_ReleaseNewVersion.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionStatus/StaticMethod_CreateOrUpdate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionStatus/StaticMethod_FindLatestStatus.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionStatus/StaticMethod_GetBusinessTypeStatus.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuEdit_OnClick.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_TIANMA_JITUAN_ListScenario_MenuRelaeaseNewVersion_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_TIANMA_JITUAN_ListScenario_MenuSaveNewVersion_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/Response_PanelVersionOfSOPHeader_ButtonVersionOfSOPHeaderCopy_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/Response_PanelVersionOfSOPHeader_ButtonVersionOfSOPHeaderFresh_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/Response_PanelVersionOfSOPHeader_ButtonVersionOfSOPHeaderRelease_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/_ROOT_Component_FormVersionOfSOP.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/EDI/Broker_Broker_OTD_VersionControl.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_VersionControl
{
  MDSDefinition: GlobalOTDTable
  MDSDefinition: GlobalOTDSOP
  TimeZone: 'ACT'
  UseOSTimeZone: false
  EDIModelLink.Destination MappingVersionControl
_Main/BL/Relations/Relation_MappingVersionControl_GlobalOTDSOP_GlobalOTDSOP_MappingVersionContr.qbl
对比新文件
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation MappingVersionControl_GlobalOTDSOP_GlobalOTDSOP_MappingVersionControl
{
  #keys: '1[412960.0.337760056]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide GlobalOTDSOP
  {
    #keys: '3[412960.0.337760058][412960.0.337760057][412960.0.337760059]'
    Cardinality: '0to1'
    ObjectDefinition: MappingVersionControl
    OwningSide: 'Reference'
  }
  RelationSide.RightSide MappingVersionControl
  {
    #keys: '3[412960.0.337760061][412960.0.337760060][412960.0.337760062]'
    Cardinality: '1toN'
    ObjectDefinition: GlobalOTDSOP
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_MappingVersionControl_GlobalOTDTable_GlobalOTDTable_MappingVersionC.qbl
文件已删除
_Main/BL/Relations/Relation_VersionControl_GlobalOTDSOP_GlobalOTDSOP_VersionControl.qbl
对比新文件
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation VersionControl_GlobalOTDSOP_GlobalOTDSOP_VersionControl
{
  #keys: '1[412960.0.337760078]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide GlobalOTDSOP
  {
    #keys: '3[412960.0.337760080][412960.0.337760079][412960.0.337760081]'
    Cardinality: '0to1'
    ObjectDefinition: VersionControl
    OwningSide: 'Reference'
  }
  RelationSide.RightSide VersionControl
  {
    #keys: '3[412960.0.337760083][412960.0.337760082][412960.0.337760084]'
    Cardinality: '1toN'
    ObjectDefinition: GlobalOTDSOP
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_VersionControl_GlobalOTDTable_GlobalOTDTable_VersionControl.qbl
文件已删除
_Main/BL/Relations/Relation_VersionStatus_GlobalOTDSOP_GlobalOTDSOP_VersionStatus.qbl
对比新文件
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation VersionStatus_GlobalOTDSOP_GlobalOTDSOP_VersionStatus
{
  #keys: '1[412960.0.337760095]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide GlobalOTDSOP
  {
    #keys: '3[412960.0.337760097][412960.0.337760096][412960.0.337760098]'
    Cardinality: '0to1'
    ObjectDefinition: VersionStatus
    OwningSide: 'Reference'
  }
  RelationSide.RightSide VersionStatus
  {
    #keys: '3[412960.0.337760100][412960.0.337760099][412960.0.337760101]'
    Cardinality: '1toN'
    ObjectDefinition: GlobalOTDSOP
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_VersionStatus_GlobalOTDTable_GlobalOTDTable_VersionStatus.qbl
文件已删除
_Main/BL/Type_GlobalOTDSOP/StaticMethod_GetOutputVersionData.qbl
文件名从 _Main/BL/Type_GlobalDTOTable/StaticMethod_GetOutputVersionData.qbl 修改
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetOutputVersionData (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  MacroPlan macroplan,
  String businessname
)
@@ -66,6 +66,6 @@
      }
    
    // Send Data To DB
    owner.Broker_OTD_VersionControlToDB().Execute();
    // owner.Broker_OTD_VersionControlToDB().Execute();
  *]
}
_Main/BL/Type_GlobalOTDSOP/StaticMethod_GetVersionData.qbl
文件名从 _Main/BL/Type_GlobalDTOTable/StaticMethod_GetVersionData.qbl 修改
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetVersionData (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String businessname
)
{
@@ -17,7 +17,7 @@
    }
    
    // Get Data From DB
    owner.Broker_OTD_VersionControl().Execute();
    //owner.Broker_OTD_VersionControl().Execute();
    
    // Get Data list to deal
    listtodeal := selectset( owner, MappingVersionControl, item, item.DataTo() = businesstype );
_Main/BL/Type_VersionControl/StaticMethod_CopyVersion.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CopyVersion (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String businessname
) as VersionControl
{
_Main/BL/Type_VersionControl/StaticMethod_Create.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Create (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String businesstype,
  String caltype,
  DateTime createtime,
_Main/BL/Type_VersionControl/StaticMethod_CreateNewSceneVersion.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateNewSceneVersion (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String businessname
) as VersionControl
{
_Main/BL/Type_VersionControl/StaticMethod_CreateNewVersion.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateNewVersion (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String businessname
) as VersionControl
{
_Main/BL/Type_VersionControl/StaticMethod_FindByFullVersionID.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod FindByFullVersionID (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String versionid
) as VersionControl
{
_Main/BL/Type_VersionControl/StaticMethod_FindLatestUpdateVersion.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod FindLatestUpdateVersion (
  GlobalOTDTable globalotdtable,
  GlobalOTDSOP globalotdsop,
  String businesstype
) as VersionControl
{
@@ -11,7 +11,7 @@
    // Administrator Sep-13-2023 (created)
    
    // Get the latest version data 
    latestversion := maxselect( globalotdtable,
    latestversion := maxselect( globalotdsop,
                                VersionControl, 
                                version, 
                                version.BusinessType()=businesstype and version.IsReleased()=true, 
_Main/BL/Type_VersionControl/StaticMethod_FindLatestVersion.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod FindLatestVersion (
  GlobalOTDTable globalotdtable,
  GlobalOTDSOP globalotdsop,
  String businesstype
) as VersionControl
{
@@ -11,7 +11,7 @@
    // Administrator Sep-13-2023 (created)
    
    // Get the latest version data 
    latestversion := maxselect( globalotdtable,
    latestversion := maxselect( globalotdsop,
                                VersionControl, 
                                version, 
                                version.BusinessType()=businesstype, 
_Main/BL/Type_VersionControl/StaticMethod_FindReleasedVersions.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod FindReleasedVersions (
  GlobalOTDTable globalotdtable,
  GlobalOTDSOP globalotdsop,
  String businesstype,
  String versionid
) as owning VersionControls
@@ -12,7 +12,10 @@
    // Administrator Sep-13-2023 (created)
    
    // Get the latest version data 
    latestversion := selectset( globalotdtable, VersionControl, version, version.BusinessType()=businesstype and version.IsReleased()=true and version.VersionID().FindString( versionid, 0 ) = 0 );
    latestversion := selectset( globalotdsop,
                                VersionControl,
                                version,
                                version.BusinessType()=businesstype and version.IsReleased()=true and version.VersionID().FindString( versionid, 0 ) = 0 );
    
    return &latestversion;
  *]
_Main/BL/Type_VersionControl/StaticMethod_GetVersionInfo.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetVersionInfo (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String businessname
) as owning Strings
{
@@ -9,9 +9,9 @@
  TextBody:
  [*
    // Administrator Sep-13-2023 (created)
    businesstyoe := GlobalOTDTable::GetBusinessTypeName( businessname );
    businesstype := GlobalOTDTable::GetBusinessTypeName( businessname );
    result := construct( Strings );
    rootversion := VersionControl::FindLatestVersion( owner, businesstyoe );
    rootversion := VersionControl::FindLatestVersion( owner, businesstype );
    
    if( not isnull( rootversion ) ){
      result.Add( rootversion.VersionID() );
_Main/BL/Type_VersionControl/StaticMethod_ReleaseNewVersion.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ReleaseNewVersion (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String businesstype
)
{
_Main/BL/Type_VersionStatus/StaticMethod_CreateOrUpdate.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateOrUpdate (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String businesstype,
  String businessname,
  DateTime lastreleasetime,
_Main/BL/Type_VersionStatus/StaticMethod_FindLatestStatus.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod FindLatestStatus (
  GlobalOTDTable globalotdtable,
  GlobalOTDSOP globalotdsop,
  String businesstype
) as VersionStatus
{
@@ -11,7 +11,7 @@
    // Administrator Sep-13-2023 (created)
    
    // Get the latest version data 
    lateststatus := select( globalotdtable, VersionStatus, version, version.BusinessType()=businesstype );
    lateststatus := select( globalotdsop, VersionStatus, version, version.BusinessType()=businesstype );
    
    return lateststatus;
  *]
_Main/BL/Type_VersionStatus/StaticMethod_GetBusinessTypeStatus.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetBusinessTypeStatus (
  GlobalOTDTable owner,
  GlobalOTDSOP owner,
  String rootversionid
)
{
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -19,13 +19,14 @@
    
    // New version
    globalotdtable := GlobalOTDTable;
    globalotdsop := GlobalOTDSOP;
    testbusinesstype := "闆嗗洟";
    if( data.IsCreateNewVersion() ){
      VersionControl::CreateNewSceneVersion( globalotdtable, testbusinesstype );
      VersionControl::CreateNewSceneVersion( globalotdsop, testbusinesstype );
      }else{
        VersionControl::CopyVersion( globalotdtable, testbusinesstype );
        VersionControl::CopyVersion( globalotdsop, testbusinesstype );
        }
    versionname := VersionControl::GetVersionInfo( globalotdtable, testbusinesstype ).Element( 3 );
    versionname := VersionControl::GetVersionInfo( globalotdsop, testbusinesstype ).Element( 3 );
    
    // Get Version Name
    if( data.Name() = "" ){
@@ -33,10 +34,11 @@
      }
    
    // Get Business Type from Scenario Name
    businesstype := select( globalotdtable,
                            BusinessType,
                            b,
                            b.ScenarioName()=data.ScenarioName() ).BusinessTypeName();
    businesstype := guard( select( globalotdtable,
                                   BusinessType,
                                   b,
                                   b.ScenarioName()=data.ScenarioName() ).BusinessTypeName(),
                           "" );
    data.BusinessType( businesstype );
    
    // Copy scenario
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuEdit_OnClick.def
@@ -17,8 +17,7 @@
    [*
      // Edit scenario
      dlg := construct( DialogCreateEditScenario );
      dlg.dropDownStringListGeneral().Visible( selection.EnableSync() );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableScenarioNames( GlobalOTDTable ) );
      dlg.DropDownListGeneral().Visible( selection.EnableSync() );
      dlg.checkboxIsKeyProduct().Visible( selection.EnableSync() );
      dlg.checkboxCreatePurchaseSupplyProduct().Visible( selection.EnableSync() );
      
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_TIANMA_JITUAN_ListScenario_MenuRelaeaseNewVersion_OnClick.def
@@ -18,12 +18,12 @@
    Body:
    [*
      // Copy scenario
      owner := GlobalOTDTable;
      owner := GlobalOTDSOP;
      macroplan := MacroPlan;
      testbusinesstype := "闆嗗洟";
      
      VersionControl::ReleaseNewVersion( owner, testbusinesstype );
      GlobalOTDTable::GetOutputVersionData( owner, macroplan, testbusinesstype );
      GlobalOTDSOP::GetOutputVersionData( owner, macroplan, testbusinesstype );
      selection.SetReleased();
      
      versionname := VersionControl::GetVersionInfo( owner, testbusinesstype ).Element( 3 );
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_TIANMA_JITUAN_ListScenario_MenuSaveNewVersion_OnClick.def
@@ -18,7 +18,7 @@
    Body:
    [*
      // Copy scenario
      owner := GlobalOTDTable;
      owner := GlobalOTDSOP;
      macroplan := MacroPlan;
      testbusinesstype := "闆嗗洟";
      
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/Response_PanelVersionOfSOPHeader_ButtonVersionOfSOPHeaderCopy_OnClick.def
@@ -9,7 +9,7 @@
  {
    Body:
    [*
      owner := GlobalOTDTable;
      owner := GlobalOTDSOP;
      testbusinesstype := "闆嗗洟";
      rootversionid := VersionControl::GetVersionInfo( owner, testbusinesstype ).Element( 2 );
      dlg := construct( DialogVersionIDCopy );
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/Response_PanelVersionOfSOPHeader_ButtonVersionOfSOPHeaderFresh_OnClick.def
@@ -9,7 +9,7 @@
  {
    Body:
    [*
      owner := GlobalOTDTable;
      owner := GlobalOTDSOP;
      testbusinesstype := "闆嗗洟";
      //GlobalOTDTable::GetVersionData( owner, testbusinesstype );
      rootversionid := VersionControl::GetVersionInfo( owner, testbusinesstype ).Element( 0 );
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/Response_PanelVersionOfSOPHeader_ButtonVersionOfSOPHeaderRelease_OnClick.def
@@ -10,7 +10,7 @@
  {
    Body:
    [*
      owner := GlobalOTDTable;
      owner := GlobalOTDSOP;
      macroplan := MacroPlan;
      testbusinesstype := "闆嗗洟";
      
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/_ROOT_Component_FormVersionOfSOP.def
@@ -21,8 +21,8 @@
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'GlobalOTDTable'
            Source: 'GlobalOTDTable'
            DataType: 'GlobalOTDSOP'
            Source: 'GlobalOTDSOP'
            Taborder: 0
            Transformation: 'VersionStatus'
          ]