xiaoding721
2024-08-21 641cca4f8f96002f98eb8e099867864deb282f98
添加班次信息下发类,修复一些bug
已添加19个文件
已修改1个文件
331 ■■■■■ 文件已修改
_Main/BL/EDI/Broker_RB_DispatchShiftPlanBroker.qbl 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_DispatchShiftPlan_RecycleBin_RecycleBin_DispatchShiftPlan.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Archive/StaticMethod_GenerateForecast.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_Fac.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_FactoryName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_ID.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_InterfaceTime.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_ProductLine.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_ShiftDate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_Tips.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_VersionFlag.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Attribute_VersionName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/Function_CalcFac.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/TypeIndex_IDTypeIndex.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DispatchShiftPlan/_ROOT_Type_DispatchShiftPlan.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_ListSalesDemands.def 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_PanelAllSalesDemands.def 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_PanelSalesDemands.def 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/_ROOT_Component_FormForecasts.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/EDI/Broker_RB_DispatchShiftPlanBroker.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,119 @@
Quintiq file version 2.0
#parent: #root
EDIBroker RB_DispatchShiftPlanBroker
{
  MDSDefinition: RecycleBin
  TimeZone: 'ACT'
  UseOSTimeZone: false
  EDIModelLink.Source DispatchShiftPlanSource
  {
    EDIMLTable DispatchShiftPlan
    {
      TargetType: DispatchShiftPlan
      EDIMLColumn Fac { Attribute: Fac ValueType: String }
      EDIMLColumn FactoryName { Attribute: FactoryName ValueType: String }
      EDIMLColumn ID { Attribute: ID ValueType: String }
      EDIMLColumn InterfaceTime { Attribute: InterfaceTime ValueType: DateTime }
      EDIMLColumn ProductLine { Attribute: ProductLine ValueType: String }
      EDIMLColumn ShiftDate { Attribute: ShiftDate ValueType: Date }
      EDIMLColumn Tips { Attribute: Tips ValueType: String }
      EDIMLColumn VersionFlag { Attribute: VersionFlag ValueType: String }
      EDIMLColumn VersionName { Attribute: VersionName ValueType: String }
    }
  }
  EDIODBCLink.Destination DispatchShiftPlanDestination
  {
    DataIntegrityStrategy: 'Disabled'
    SettingsEngineLink: 'domainmodel.ediremotedatasourcedefinition.remotestorage.vwed'
    EDIODBCLinkTable A_DispatchShiftPlan
    {
      MayCreateTable: true
      MayDeleteRow: true
      MayDropTable: true
      MayFlushTable: true
      MayInsertRow: true
      Parameters: '/owner="dbo"'
      PrimaryKeyColumns: ID
      RecordModificationHintStrategy: 'None'
      EDIODBCLinkColumn Fac
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn FactoryName
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn ID
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn InterfaceTime
      {
        MayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn ProductLine
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn ShiftDate
      {
        MayUpdateColumn: true
        ValueType: DateTime
      }
      EDIODBCLinkColumn Tips
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn VersionFlag
      {
        MayUpdateColumn: true
        ValueType: String
      }
      EDIODBCLinkColumn VersionName
      {
        MayUpdateColumn: true
        ValueType: String
      }
    }
  }
  EDITransformation.Transformation DispatchShiftPlanTransformation
  {
    EDITableTransformation
    {
      InputTable: DispatchShiftPlan
      OutputTable: A_DispatchShiftPlan
      EDIColumnMatch { InputColumn: Fac OutputColumn: Fac }
      EDIColumnMatch { InputColumn: FactoryName OutputColumn: FactoryName }
      EDIColumnMatch { InputColumn: ID OutputColumn: ID }
      EDIColumnMatch { InputColumn: InterfaceTime OutputColumn: InterfaceTime }
      EDIColumnMatch { InputColumn: ProductLine OutputColumn: ProductLine }
      EDIColumnMatch
      {
        InputColumn: ShiftDate
        OutputColumn: ShiftDate
        Converter
        {
          XMLDefinition:
          [*
            <?xml version="1.0" encoding="UTF-16"?>
            <DateToDateTime xmlns="http://www.quintiq.com/GEB/DateToDateTime" Key="@1">
              <IsStandard>true</IsStandard>
              <IsISO>false</IsISO>
              <IsCustom>false</IsCustom>
              <ConversionType>0</ConversionType>
            </DateToDateTime>
          *]
        }
      }
      EDIColumnMatch { InputColumn: Tips OutputColumn: Tips }
      EDIColumnMatch { InputColumn: VersionFlag OutputColumn: VersionFlag }
      EDIColumnMatch { InputColumn: VersionName OutputColumn: VersionName }
    }
  }
}
_Main/BL/Relations/Relation_DispatchShiftPlan_RecycleBin_RecycleBin_DispatchShiftPlan.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation DispatchShiftPlan_RecycleBin_RecycleBin_DispatchShiftPlan
{
  #keys: '1[414996.1.17706936]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide RecycleBin
  {
    #keys: '3[414996.1.17706938][414996.1.17706937][414996.1.17706939]'
    Cardinality: '0to1'
    ObjectDefinition: DispatchShiftPlan
    OwningSide: 'Reference'
  }
  RelationSide.RightSide DispatchShiftPlan
  {
    #keys: '3[414996.1.17706941][414996.1.17706940][414996.1.17706942]'
    Cardinality: '1toN'
    ObjectDefinition: RecycleBin
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_Archive/StaticMethod_GenerateForecast.qbl
@@ -11,7 +11,7 @@
      f.Delete();
    }
    
    traverse ( archiveExecutionStatus, TemporaryDemandData, tdd ,tdd.StartDate() >= macroPlan.StartOfPlanning().Date()) {
    traverse ( archiveExecutionStatus, TemporaryDemandData, tdd ,tdd.Origin() = "" or tdd.StartDate() >= macroPlan.StartOfPlanning().Date()) {
      targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = tdd.ProductID() );
      targetStockingPoint_MP := select( macroPlan, StockingPoint_MP, tempSPMP, tempSPMP.ID() = tdd.StockingPointID() );
      info( tdd.SalesSegmentName() );
_Main/BL/Type_DispatchShiftPlan/Attribute_Fac.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Fac
{
  #keys: '3[414996.1.17706904][414996.1.17706903][414996.1.17706905]'
  Description: '工厂简写'
  ValueType: String
}
_Main/BL/Type_DispatchShiftPlan/Attribute_FactoryName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute FactoryName
{
  #keys: '3[414996.1.17706894][414996.1.17706893][414996.1.17706895]'
  Description: '工厂名称'
  ValueType: String
}
_Main/BL/Type_DispatchShiftPlan/Attribute_ID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ID
{
  #keys: '3[414996.1.17710059][414996.1.17710058][414996.1.17710060]'
  IsReadOnly: true
  ValueType: String
}
_Main/BL/Type_DispatchShiftPlan/Attribute_InterfaceTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute InterfaceTime
{
  #keys: '3[414996.1.17706914][414996.1.17706913][414996.1.17706915]'
  Description: '下发时间'
  ValueType: DateTime
}
_Main/BL/Type_DispatchShiftPlan/Attribute_ProductLine.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ProductLine
{
  #keys: '3[414996.1.17706957][414996.1.17706956][414996.1.17706958]'
  Description: '产线'
  ValueType: String
}
_Main/BL/Type_DispatchShiftPlan/Attribute_ShiftDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ShiftDate
{
  #keys: '3[414996.1.17706855][414996.1.17706854][414996.1.17706856]'
  Description: '班次日期'
  ValueType: Date
}
_Main/BL/Type_DispatchShiftPlan/Attribute_Tips.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Tips
{
  #keys: '3[414996.1.17706865][414996.1.17706864][414996.1.17706866]'
  Description: '备注'
  ValueType: String
}
_Main/BL/Type_DispatchShiftPlan/Attribute_VersionFlag.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionFlag
{
  #keys: '3[414996.1.17706927][414996.1.17706926][414996.1.17706928]'
  Description: '版本标识'
  ValueType: String
}
_Main/BL/Type_DispatchShiftPlan/Attribute_VersionName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionName
{
  #keys: '3[414996.1.17706875][414996.1.17706874][414996.1.17706876]'
  Description: '版本名称'
  ValueType: String
}
_Main/BL/Type_DispatchShiftPlan/Function_CalcFac.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Function CalcFac
{
  TextBody:
  [*
    // Akari Aug-21-2024 (created)
    value := "";
    if( this.FactoryName() = "大连工厂" ){
      value := "DL";
    }else if( this.FactoryName() = "长春工厂"){
      value := "CC";
    }
    this.Fac( value );
  *]
}
_Main/BL/Type_DispatchShiftPlan/StaticMethod_Dispatch.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Dispatch (
  const MacroPlan macroPlan,
  RecycleBin owner
)
{
  TextBody:
  [*
    // Akari Aug-21-2024 (created)
    now := DateTime::Now();
    macroPlanName := macroPlan.MDSMacroPlan().Description();
    traverse( macroPlan,Unit.UnitPeriod.astype( UnitPeriodTime ).ShiftPlan,shiftPlan ){
       factory := shiftPlan.UnitPeriodTime().Unit();
       while( factory.HasParent() ){
         temp1 := factory;
         factory := factory.Parent();
         if( not factory.HasParent() ){
           factory := temp1;
         }
       }
       owner.DispatchShiftPlan( relnew,ID := OS::GenerateGUIDAsString(),
                                ProductLine := shiftPlan.UnitPeriodTime().Unit().ID(),
                                ShiftDate := shiftPlan.UnitPeriodTime().Period_MP().StartDate(),
                                Tips := shiftPlan.Remark(),
                                VersionName := macroPlanName,
                                FactoryName := factory.ID(),
                                InterfaceTime := now
                                );
    }
    owner.RB_DispatchShiftPlanBroker().AsyncExecute();
  *]
}
_Main/BL/Type_DispatchShiftPlan/TypeIndex_IDTypeIndex.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
Quintiq file version 2.0
#parent: #root
TypeIndex IDTypeIndex
{
  Attributes:
  [
    TypeIndexAttribute
    {
      ModelElement: ID
    }
  ]
}
_Main/BL/Type_DispatchShiftPlan/_ROOT_Type_DispatchShiftPlan.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type DispatchShiftPlan
{
  #keys: '5[414996.1.17706851][414996.1.17706849][0.0.0][414996.1.17706850][414996.1.17706852]'
  BaseType: Object
  Description: '下发班次信息'
  StructuredName: 'DispatchShiftPlans'
}
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_ListSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
Component ListSalesDemands #extension
{
  Children:
  [
    Component DataSetLevelSalesDemands #extension
    {
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgNotLinkedToPeriod","title":"ImgNotLinkedToPeriod","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgNotLinkedToPeriod"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgIsPostponed","title":"ImgIsPostponed","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgIsPostponed"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPoint_MP.ID","title":"Stocking point","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"StockingPoint_MP.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegment_MP.Name","title":"Sales segment","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"SalesSegment_MP.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Product_MP.ID","title":"Product","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Product_MP.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"Start","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasure_MP.Name","title":"Quantity UoM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"UnitOfMeasure_MP.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Original Qty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NettedQuantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"NettedQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FulfilledQuantity","title":"Fulfilled","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"FulfilledQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeChart","columnid":"Fulfillment Illustration","title":"Fulfillment","subtotals":"","tooltip":"","width":-1,"display":"shown","type":"stackbar","relative":true,"attributes":[{"name":"Fulfilled demand","color":"rgb(87,184,71)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Fulfillment","title":"Fulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"object.FulfilledQuantity().Round(2)"}},{"name":"Unfulfilled demand","color":"rgb(232,123,0)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Unfulfilled demand","title":"Unfulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"maxvalue(object.NettedQuantity()-object.FulfilledQuantity(),0.0).Round(2)"}}]}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PriceUoM","title":"PriceUoM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"PriceUoM"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Priority.Name","title":"Priority","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Priority.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DemandUncertaintyPercentage","title":"Uncertainty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DemandUncertaintyPercentage"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Origin","title":"Origin","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Origin"}}]'
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_PanelAllSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
Component PanelAllSalesDemands #extension
{
  Children:
  [
    #child: ListSalesDemands
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/Component_PanelSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
Component PanelSalesDemands #extension
{
  Children:
  [
    #child: PanelAllSalesDemands
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormForecasts/_ROOT_Component_FormForecasts.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: LibMacroPlannerWebUI
OrphanComponent FormForecasts #extension
{
  Children:
  [
    #child: PanelSalesDemands
  ]
}