yanweiyuan3
2023-09-14 4b60afbb9fe35115958a3560c55b2ae08e267d71
Data input & output add

添加数据输出/输入接口,该接口目前只做了版本号解析功能,另,添加版本发布功能,目前点击版本发布会生成新版本号并调用输出接口,点击刷新按钮时将调用数据抽取接口,另,需要建立新中间表MID_VERSIONCONTROL
已添加25个文件
已修改7个文件
670 ■■■■■ 文件已修改
_Main/BL/EDI/Broker_Broker_OTD_VersionControl.qbl 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/EDI/Broker_Broker_OTD_VersionControlToDB.qbl 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_MappingVersionControl_GlobalOTDTable_GlobalOTDTable_MappingVersionC.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/StaticMethod_GetOutputVersionData.qbl 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/StaticMethod_GetVersionData.qbl 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_CreateTime.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_DataFrom.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_DataTo.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_EndTime.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_ProductID.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_Qty.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_ReleaseTime.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_StartTime.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_StockingPointID.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_User.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_VersionID.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/Attribute_VersionName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/TypeIndex_TypeIndexVersionControl.qbl 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingVersionControl/_ROOT_Type_MappingVersionControl.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Scenario/Attribute_IsCreateNewVersion.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Scenario/Attribute_VersionID.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Scenario/DefaultValue_VersionID.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_CreateNewSceneVersion.qbl 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_CreateNewVersion.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_FindByFullVersionID.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_FindLatestUpdateVersion.qbl 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_VersionControl/StaticMethod_ReleaseLatestVersion.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Component_PanelGeneral#549.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def 9 ●●●●● 补丁 | 查看 | 原始文档 | 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 | 历史
_var/_Main/ModelSettings/Common/Development/_ROOT_Role_Development.properties 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/EDI/Broker_Broker_OTD_VersionControl.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,133 @@
Quintiq file version 2.0
#parent: #root
EDIBroker Broker_OTD_VersionControl
{
  MDSDefinition: GlobalOTDTable
  TimeZone: 'ACT'
  UseOSTimeZone: false
  EDIModelLink.Destination MappingVersionControl
  {
    EDIMLTable MappingVersionControl
    {
      PrimaryKeyColumns: EndTime
      PrimaryKeyColumns: ProductID
      PrimaryKeyColumns: StartTime
      PrimaryKeyColumns: StockingPointID
      PrimaryKeyColumns: VersionID
      TargetType: MappingVersionControl
      TypeIndex: TypeIndexVersionControl
      EDIMLColumn CreateTime { Attribute: CreateTime ValueType: DateTime }
      EDIMLColumn DataFrom { Attribute: DataFrom ValueType: String }
      EDIMLColumn DataTo { Attribute: DataTo ValueType: String }
      EDIMLColumn EndTime { Attribute: EndTime ValueType: DateTime }
      EDIMLColumn ProductID { Attribute: ProductID ValueType: String }
      EDIMLColumn Qty { Attribute: Qty ValueType: Real }
      EDIMLColumn ReleaseTime { Attribute: ReleaseTime ValueType: DateTime }
      EDIMLColumn StartTime { Attribute: StartTime ValueType: DateTime }
      EDIMLColumn StockingPointID { Attribute: StockingPointID ValueType: String }
      EDIMLColumn User { Attribute: User ValueType: String }
      EDIMLColumn VersionID { Attribute: VersionID ValueType: String }
      EDIMLColumn VersionName { Attribute: VersionName ValueType: String }
    }
  }
  EDIODBCLink.Source MID_VERSIONCONTROL
  {
    DataIntegrityStrategy: 'Disabled'
    SettingsEngineLink: 'domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle'
    EDIODBCLinkTable MID_VERSIONCONTROL
    {
      OthersMayCreateTable: true
      OthersMayDeleteRow: true
      OthersMayDropTable: true
      OthersMayFlushTable: true
      OthersMayInsertRow: true
      Parameters: '/owner="TIANMA"'
      PrimaryKeyColumns: ENDTIME
      PrimaryKeyColumns: ID
      PrimaryKeyColumns: PRODUCTID
      PrimaryKeyColumns: STARTTIME
      PrimaryKeyColumns: STOCKINGPOINTID
      RecordModificationHintStrategy: 'None'
      EDIODBCLinkColumn CREATETIME
      {
        OthersMayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn DATAFROM
      {
        OthersMayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn DATATO
      {
        OthersMayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn ENDTIME
      {
        OthersMayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn ID
      {
        OthersMayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn NAME
      {
        OthersMayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn PRODUCTID
      {
        OthersMayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn QTY
      {
        OthersMayUpdateColumn: true
        ValueType: Real
      }
      EDIODBCLinkColumn RELEASETIME
      {
        OthersMayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn STARTTIME
      {
        OthersMayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn STOCKINGPOINTID
      {
        OthersMayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn USER
      {
        OthersMayUpdateColumn: true
        ValueType: String
      }
    }
  }
  EDITransformation.Transformation TransformationVersionControl
  {
    EDITableTransformation
    {
      InputTable: MID_VERSIONCONTROL
      OutputTable: MappingVersionControl
      EDIColumnMatch { InputColumn: CREATETIME OutputColumn: CreateTime }
      EDIColumnMatch { InputColumn: DATAFROM OutputColumn: DataFrom }
      EDIColumnMatch { InputColumn: DATATO OutputColumn: DataTo }
      EDIColumnMatch { InputColumn: ENDTIME OutputColumn: EndTime }
      EDIColumnMatch { InputColumn: ID OutputColumn: VersionID }
      EDIColumnMatch { InputColumn: NAME OutputColumn: VersionName }
      EDIColumnMatch { InputColumn: PRODUCTID OutputColumn: ProductID }
      EDIColumnMatch { InputColumn: QTY OutputColumn: Qty }
      EDIColumnMatch { InputColumn: RELEASETIME OutputColumn: ReleaseTime }
      EDIColumnMatch { InputColumn: STARTTIME OutputColumn: StartTime }
      EDIColumnMatch { InputColumn: STOCKINGPOINTID OutputColumn: StockingPointID }
      EDIColumnMatch { InputColumn: USER OutputColumn: User }
    }
  }
}
_Main/BL/EDI/Broker_Broker_OTD_VersionControlToDB.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,133 @@
Quintiq file version 2.0
#parent: #root
EDIBroker Broker_OTD_VersionControlToDB
{
  MDSDefinition: GlobalOTDTable
  TimeZone: 'ACT'
  UseOSTimeZone: false
  EDIModelLink.Source MappingVersionControlToDB
  {
    EDIMLTable MappingVersionControl
    {
      PrimaryKeyColumns: EndTime
      PrimaryKeyColumns: ProductID
      PrimaryKeyColumns: StartTime
      PrimaryKeyColumns: StockingPointID
      PrimaryKeyColumns: VersionID
      TargetType: MappingVersionControl
      TypeIndex: TypeIndexVersionControl
      EDIMLColumn CreateTime { Attribute: CreateTime ValueType: DateTime }
      EDIMLColumn DataFrom { Attribute: DataFrom ValueType: String }
      EDIMLColumn DataTo { Attribute: DataTo ValueType: String }
      EDIMLColumn EndTime { Attribute: EndTime ValueType: DateTime }
      EDIMLColumn ProductID { Attribute: ProductID ValueType: String }
      EDIMLColumn Qty { Attribute: Qty ValueType: Real }
      EDIMLColumn ReleaseTime { Attribute: ReleaseTime ValueType: DateTime }
      EDIMLColumn StartTime { Attribute: StartTime ValueType: DateTime }
      EDIMLColumn StockingPointID { Attribute: StockingPointID ValueType: String }
      EDIMLColumn User { Attribute: User ValueType: String }
      EDIMLColumn VersionID { Attribute: VersionID ValueType: String }
      EDIMLColumn VersionName { Attribute: VersionName ValueType: String }
    }
  }
  EDIODBCLink.Destination MID_VERSIONCONTROLTODB
  {
    DataIntegrityStrategy: 'Disabled'
    SettingsEngineLink: 'domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle'
    EDIODBCLinkTable MID_VERSIONCONTROL
    {
      MayCreateTable: true
      MayDeleteRow: true
      MayDropTable: true
      MayFlushTable: true
      MayInsertRow: true
      Parameters: '/owner="TIANMA"'
      PrimaryKeyColumns: ENDTIME
      PrimaryKeyColumns: ID
      PrimaryKeyColumns: PRODUCTID
      PrimaryKeyColumns: STARTTIME
      PrimaryKeyColumns: STOCKINGPOINTID
      RecordModificationHintStrategy: 'None'
      EDIODBCLinkColumn CREATETIME
      {
        MayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn DATAFROM
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn DATATO
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn ENDTIME
      {
        MayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn ID
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn NAME
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn PRODUCTID
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn QTY
      {
        MayUpdateColumn: true
        ValueType: Real
      }
      EDIODBCLinkColumn RELEASETIME
      {
        MayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn STARTTIME
      {
        MayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn STOCKINGPOINTID
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn USER
      {
        MayUpdateColumn: true
        ValueType: String
      }
    }
  }
  EDITransformation.Transformation TransformationVersionControlToDB
  {
    EDITableTransformation
    {
      InputTable: MappingVersionControl
      OutputTable: MID_VERSIONCONTROL
      EDIColumnMatch { InputColumn: CreateTime OutputColumn: CREATETIME }
      EDIColumnMatch { InputColumn: DataFrom OutputColumn: DATAFROM }
      EDIColumnMatch { InputColumn: DataTo OutputColumn: DATATO }
      EDIColumnMatch { InputColumn: EndTime OutputColumn: ENDTIME }
      EDIColumnMatch { InputColumn: ProductID OutputColumn: PRODUCTID }
      EDIColumnMatch { InputColumn: Qty OutputColumn: QTY }
      EDIColumnMatch { InputColumn: ReleaseTime OutputColumn: RELEASETIME }
      EDIColumnMatch { InputColumn: StartTime OutputColumn: STARTTIME }
      EDIColumnMatch { InputColumn: StockingPointID OutputColumn: STOCKINGPOINTID }
      EDIColumnMatch { InputColumn: User OutputColumn: USER }
      EDIColumnMatch { InputColumn: VersionID OutputColumn: ID }
      EDIColumnMatch { InputColumn: VersionName OutputColumn: NAME }
    }
  }
}
_Main/BL/Relations/Relation_MappingVersionControl_GlobalOTDTable_GlobalOTDTable_MappingVersionC.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation MappingVersionControl_GlobalOTDTable_GlobalOTDTable_MappingVersionControl
{
  #keys: '1[412960.0.150120043]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide GlobalOTDTable
  {
    #keys: '3[412960.0.150120045][412960.0.150120044][412960.0.150120046]'
    Cardinality: '0to1'
    ObjectDefinition: MappingVersionControl
    OwningSide: 'Reference'
  }
  RelationSide.RightSide MappingVersionControl
  {
    #keys: '3[412960.0.150120048][412960.0.150120047][412960.0.150120049]'
    Cardinality: '1toN'
    ObjectDefinition: GlobalOTDTable
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_GlobalDTOTable/StaticMethod_GetOutputVersionData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,71 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetOutputVersionData (
  GlobalOTDTable owner,
  MacroPlan macroplan,
  String businessname
)
{
  Description: '形成并发送版本数据'
  TextBody:
  [*
    // Administrator Sep-14-2023 (created)
    businesstype := GlobalOTDTable::GetBusinessTypeName( businessname );
    // Clean exist data
    traverse( owner, MappingVersionControl, mpc, true ){
      mpc.Delete();
    }
    // Get Latest version
    latestversion := VersionControl::FindLatestUpdateVersion( owner, businesstype );
    createtime := latestversion.CreateTime();
    datafrom := businesstype;
    releasetime := latestversion.ReleaseTime();
    versionid := latestversion.VersionID() + "-" + latestversion.CalType();
    info( versionid );
    versionname := latestversion.LongVersionName();
    user := latestversion.User();
    // Get Data list to deal
    listtodeal := selectset( macroplan,
                              Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod,
                              pispip,
                              true );
    if( latestversion.CalType() = "TM_SOP_R1" ){
      listtodeal := selectset( macroplan,
                               Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod,
                               pispip,
                               pispip.ProductInStockingPoint_MP().ProductID().StartsWith( "C1" ) );
      }
    traverse( listtodeal, Elements, item, true ){
      endtime := item.End();
      productid := item.ProductInStockingPoint_MP().ProductID();
      qty := item.SalesDemandQuantity();
      starttime := item.Start();
      stockingpointid := item.StockingPointInPeriod().StockingPointID();
      datato := "TM";
      if( businesstype <> "TM" ){
        datato := "TM";
        }
      owner.MappingVersionControl( relnew,
                                   CreateTime := createtime,
                                   DataFrom := datafrom,
                                   DataTo := datato,
                                   EndTime := endtime,
                                   ProductID := productid,
                                   Qty := qty,
                                   ReleaseTime := releasetime,
                                   StartTime := starttime,
                                   StockingPointID := stockingpointid,
                                   User := user,
                                   VersionID := versionid,
                                   VersionName := versionname )
      }
    // Send Data To DB
    owner.Broker_OTD_VersionControlToDB().Execute();
  *]
}
_Main/BL/Type_GlobalDTOTable/StaticMethod_GetVersionData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetVersionData (
  GlobalOTDTable owner,
  String businessname
)
{
  Description: '抽取并处理版本数据'
  TextBody:
  [*
    // Administrator Sep-14-2023 (created)
    businesstype := GlobalOTDTable::GetBusinessTypeName( businessname );
    // Clean exist data
    traverse( owner, MappingVersionControl, mpc, true ){
      mpc.Delete();
    }
    // Get Data From DB
    owner.Broker_OTD_VersionControl().Execute();
    // Get Data list to deal
    listtodeal := selectset( owner, MappingVersionControl, item, item.DataTo() = businesstype );
    traverse( listtodeal, Elements, item, true ){
      versionid := item.VersionID();
      existversion := VersionControl::FindByFullVersionID( owner, versionid );
      if( isnull( existversion ) ){
        longversionname := item.VersionName();
        longversionnamelist := longversionname.Tokenize( "-" );
        shortversionname := longversionnamelist.Element( longversionnamelist.Size() );
        caltype := shortversionname.SubString( 0, 10 );
        shortversionid := versionid.ReplaceAll( "-" + caltype, "" );
        newversioncontrol := VersionControl::Create( owner,
                                                     item.DataFrom(),
                                                     caltype,
                                                     item.CreateTime(),
                                                     shortversionid,
                                                     longversionname,
                                                     shortversionname,
                                                     item.User() );
        newversioncontrol.IsReleased( true );
        }
      }
  *]
}
_Main/BL/Type_MappingVersionControl/Attribute_CreateTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute CreateTime
{
  #keys: '3[412960.0.150120147][412960.0.150120146][412960.0.150120148]'
  Description: '创建时间'
  ValueType: DateTime
}
_Main/BL/Type_MappingVersionControl/Attribute_DataFrom.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute DataFrom
{
  #keys: '3[412960.0.150120067][412960.0.150120066][412960.0.150120068]'
  Description: '数据发出的部门名称'
  ValueType: String
}
_Main/BL/Type_MappingVersionControl/Attribute_DataTo.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute DataTo
{
  #keys: '3[412960.0.150120077][412960.0.150120076][412960.0.150120078]'
  Description: '接收数据的部门名称'
  ValueType: String
}
_Main/BL/Type_MappingVersionControl/Attribute_EndTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
Attribute EndTime
{
  #keys: '3[412960.0.150120127][412960.0.150120126][412960.0.150120128]'
  Description: '结束时间'
  IsReadOnly: true
  ValueType: DateTime
}
_Main/BL/Type_MappingVersionControl/Attribute_ProductID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
Attribute ProductID
{
  #keys: '3[412960.0.150120087][412960.0.150120086][412960.0.150120088]'
  Description: '物料编码'
  IsReadOnly: true
  ValueType: String
}
_Main/BL/Type_MappingVersionControl/Attribute_Qty.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Qty
{
  #keys: '3[412960.0.150120097][412960.0.150120096][412960.0.150120098]'
  Description: '数量'
  ValueType: Real
}
_Main/BL/Type_MappingVersionControl/Attribute_ReleaseTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ReleaseTime
{
  #keys: '3[412960.0.150120157][412960.0.150120156][412960.0.150120158]'
  Description: '发布时间'
  ValueType: DateTime
}
_Main/BL/Type_MappingVersionControl/Attribute_StartTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
Attribute StartTime
{
  #keys: '3[412960.0.150120117][412960.0.150120116][412960.0.150120118]'
  Description: '开始时间'
  IsReadOnly: true
  ValueType: DateTime
}
_Main/BL/Type_MappingVersionControl/Attribute_StockingPointID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
Attribute StockingPointID
{
  #keys: '3[412960.0.150120107][412960.0.150120106][412960.0.150120108]'
  Description: '库存点编码'
  IsReadOnly: true
  ValueType: String
}
_Main/BL/Type_MappingVersionControl/Attribute_User.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute User
{
  #keys: '3[412960.0.150120137][412960.0.150120136][412960.0.150120138]'
  Description: '用户名称'
  ValueType: String
}
_Main/BL/Type_MappingVersionControl/Attribute_VersionID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionID
{
  #keys: '3[412960.0.150120057][412960.0.150120056][412960.0.150120058]'
  Description: '数据库抽取的全量版本号'
  IsReadOnly: true
  ValueType: String
}
_Main/BL/Type_MappingVersionControl/Attribute_VersionName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionName
{
  #keys: '3[412960.0.150124918][412960.0.150124917][412960.0.150124919]'
  Description: '版本名称'
  ValueType: String
}
_Main/BL/Type_MappingVersionControl/TypeIndex_TypeIndexVersionControl.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
Quintiq file version 2.0
#parent: #root
TypeIndex TypeIndexVersionControl
{
  Attributes:
  [
    TypeIndexAttribute
    {
      ModelElement: VersionID
    }
    TypeIndexAttribute
    {
      ModelElement: EndTime
    }
    TypeIndexAttribute
    {
      ModelElement: StockingPointID
    }
    TypeIndexAttribute
    {
      ModelElement: StartTime
    }
    TypeIndexAttribute
    {
      ModelElement: ProductID
    }
  ]
}
_Main/BL/Type_MappingVersionControl/_ROOT_Type_MappingVersionControl.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type MappingVersionControl
{
  #keys: '5[412960.0.150120040][412960.0.150120038][0.0.0][412960.0.150120039][412960.0.150120041]'
  BaseType: Object
  Description: '版本控制中间表'
  StructuredName: 'MappingVersionControls'
}
_Main/BL/Type_Scenario/Attribute_IsCreateNewVersion.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsCreateNewVersion
{
  #keys: '3[412960.0.155630021][412960.0.155630020][412960.0.155630022]'
  Description: '是否创建从集团SOP开始的全新版本'
  ValueType: Boolean
}
_Main/BL/Type_Scenario/Attribute_VersionID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionID
{
  #keys: '3[412960.0.150120035][412960.0.150120034][412960.0.150120036]'
  Description: '当前场景对应的版本号,于创建版本时确定'
  ValueType: String
}
_Main/BL/Type_Scenario/DefaultValue_VersionID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: VersionID
}
_Main/BL/Type_VersionControl/StaticMethod_CreateNewSceneVersion.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateNewSceneVersion (
  GlobalOTDTable owner,
  String businessname
) as VersionControl
{
  Description: '随创建场景进行版本创建'
  TextBody:
  [*
    // Administrator Sep-13-2023 (created)
    createtime := DateTime::ActualTime();
    user := QuintiqUser::CurrentUser().Username();
    starttime := DateTime::Construct(1970,1,1,0,0,0);
    // Get the local scenario businesstype
    businesstype := GlobalOTDTable::GetBusinessTypeName( businessname );
    // Get the older version info
    oldversion_id := "";
    oldversion_name := "";
    oldcaltype := "";
    // Calculate new version info
    additionversionid := ( createtime.MinutesAsReal( starttime ) * 60 * 10 + createtime.SecondOfMinute() ).Round( 0 );
    newversionid := oldversion_id + [String]additionversionid;
    newcaltype := GlobalOTDTable::GetNextCalType( oldcaltype, businesstype );
    newsingleversionname := newcaltype + "(" + createtime.Format( "Y-M2-D2 H:m:s" ) + ")";
    newversionname := oldversion_name + newsingleversionname;
    // Create new version
    newversion := VersionControl::Create( owner, businesstype, newcaltype, createtime, newversionid, newversionname, newsingleversionname, user );
    return newversion;
  *]
}
_Main/BL/Type_VersionControl/StaticMethod_CreateNewVersion.qbl
@@ -33,8 +33,8 @@
    
    
    // Calculate new version info
    additionversionid := [Number]( createtime.MinutesAsReal( starttime ) * 60 );
    newversionid := oldversion_id + additionversionid.AsQUILL();
    additionversionid := ( createtime.MinutesAsReal( starttime ) * 60 * 10 + createtime.SecondOfMinute() ).Round( 0 );
    newversionid := oldversion_id + [String]additionversionid;
    newcaltype := GlobalOTDTable::GetNextCalType( oldcaltype, businesstype );
    newsingleversionname := newcaltype + "(" + createtime.Format( "Y-M2-D2 H:m:s" ) + ")";
    newversionname := oldversion_name + newsingleversionname;
_Main/BL/Type_VersionControl/StaticMethod_FindByFullVersionID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
StaticMethod FindByFullVersionID (
  GlobalOTDTable owner,
  String versionid
) as VersionControl
{
  Description: '通过全量版本号进行查找'
  TextBody:
  [*
    // Administrator Sep-14-2023 (created)
    // Get the version data
    resultversion :=  select( owner, VersionControl, version, version.VersionID() + "-" + version.CalType() = versionid );
    return resultversion;
  *]
}
_Main/BL/Type_VersionControl/StaticMethod_FindLatestUpdateVersion.qbl
@@ -11,7 +11,12 @@
    // Administrator Sep-13-2023 (created)
    
    // Get the latest version data 
    latestversion := maxselect( globalotdtable, VersionControl, version, version.BusinessType()=businesstype and version.IsReleased()=true, version.CreateTime() );
    latestversion := maxselect( globalotdtable,
                                VersionControl,
                                version,
                                version.BusinessType()=businesstype,
    //                             and version.IsReleased()=true,
                                version.CreateTime() );
    
    return latestversion;
  *]
_Main/BL/Type_VersionControl/StaticMethod_ReleaseLatestVersion.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ReleaseLatestVersion
{
  Description: '发布当前版本,待编写'
  TextBody:
  [*
    // Administrator Sep-14-2023 (created)
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Component_PanelGeneral#549.def
@@ -51,5 +51,16 @@
        Taborder: 4
      ]
    }
    Component CheckboxIsCreateNewVersion
    {
      #keys: '[412960.0.157150313]'
      BaseType: 'WebCheckbox'
      Properties:
      [
        DataBinding: 'DataHolderDialogData.Data.IsCreateNewVersion'
        Label: 'Create a new version'
        Taborder: 7
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -96,6 +96,15 @@
                           data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() );
    }
    
    // New version
    globalotdtable := GlobalOTDTable;
    testbusinesstype := "集团";
    if( data.IsCreateNewVersion() ){
      VersionControl::CreateNewSceneVersion( globalotdtable, testbusinesstype );
      }else{
        VersionControl::CreateNewVersion( globalotdtable, testbusinesstype );
        }
    this.Close();
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/Response_PanelVersionOfSOPHeader_ButtonVersionOfSOPHeaderFresh_OnClick.def
@@ -10,6 +10,8 @@
    Body:
    [*
      owner := GlobalOTDTable;
      testbusinesstype := "集团";
      GlobalOTDTable::GetVersionData( owner, testbusinesstype );
      rootversionid := VersionControl::GetSOPVersionInfo( owner ).Element( 0 );
      DataExtractorVersionOfSOPDetails.FixedFilter( "object.VersionID().FindString( " + rootversionid.AsQUILL() + ", 0 ) = 0" );
      rootversionname := VersionControl::GetSOPVersionInfo( owner ).Element( 1 );
_Main/UI/MacroPlannerWebApp/Component_FormVersionOfSOP/Response_PanelVersionOfSOPHeader_ButtonVersionOfSOPHeaderRelease_OnClick.def
@@ -11,9 +11,11 @@
    Body:
    [*
      owner := GlobalOTDTable;
      macroplan := MacroPlan;
      testbusinesstype := "集团";
      
      VersionControl::ReleaseNewVersion( owner, testbusinesstype );
      GlobalOTDTable::GetOutputVersionData( owner, macroplan, testbusinesstype );
    *]
  }
}
_var/_Main/ModelSettings/Common/Development/_ROOT_Role_Development.properties
@@ -204,11 +204,11 @@
domainmodel.ediremotedatasourcedefinition.remotestorage.inputunitsfrommodel.parameters=
domainmodel.ediremotedatasourcedefinition.remotestorage.inputunitsfrommodel.password=
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle.connection=
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle.connection=dbodbc1
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle.maxcolumnnamelength=0
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle.maxtablenamelength=0
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle.parameters=
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle.password=
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle.parameters=/datasource=orclpdb /owner=TIANMA /chardatatypeforstring /characterencoding=UTF-8 /appdatatypeforstring=wchar
domainmodel.ediremotedatasourcedefinition.remotestorage.localoracle.password=1 E9FE769DABE91891284EBBA6CEA8F41B 479d6f99-cffb-41e6-94f1-d35bdf20703c
domainmodel.ediremotedatasourcedefinition.remotestorage.oracle=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.oracle.connection=dbodbc1
domainmodel.ediremotedatasourcedefinition.remotestorage.oracle.maxcolumnnamelength=0