From 1d05303e9cba4871a61b9890033bf8e20efc7a60 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期一, 26 八月 2024 17:38:15 +0800
Subject: [PATCH] 生产计划推送接口
---
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/_ROOT_Type_InterfaceProductionSchedulingPlanPush.qbl | 9 +++
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningDate.qbl | 8 ++
_Main/BL/Relations/Relation_InterfaceProductionSchedulingPlanPush_InterfaceDataset_InterfaceDat.qbl | 23 +++++++
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Fac.qbl | 8 ++
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Product.qbl | 8 ++
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def | 6 ++
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPla.def | 22 +++++++
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_VersionName.qbl | 8 ++
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_FactoryName.qbl | 8 ++
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningQty.qbl | 8 ++
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/StaticMethod_GenerateData.qbl | 26 ++++++++
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def | 12 +++
12 files changed, 145 insertions(+), 1 deletions(-)
diff --git a/_Main/BL/Relations/Relation_InterfaceProductionSchedulingPlanPush_InterfaceDataset_InterfaceDat.qbl b/_Main/BL/Relations/Relation_InterfaceProductionSchedulingPlanPush_InterfaceDataset_InterfaceDat.qbl
new file mode 100644
index 0000000..dbc66fc
--- /dev/null
+++ b/_Main/BL/Relations/Relation_InterfaceProductionSchedulingPlanPush_InterfaceDataset_InterfaceDat.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation InterfaceProductionSchedulingPlanPush_InterfaceDataset_InterfaceDataset_InterfaceProductionSchedulingPlanPush
+{
+ #keys: '1[415754.0.136725964]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide InterfaceDataset
+ {
+ #keys: '3[415754.0.136725966][415754.0.136725965][415754.0.136725967]'
+ Cardinality: '0to1'
+ ObjectDefinition: InterfaceProductionSchedulingPlanPush
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide InterfaceProductionSchedulingPlanPush
+ {
+ #keys: '3[415754.0.136725969][415754.0.136725968][415754.0.136725970]'
+ Cardinality: '1toN'
+ ObjectDefinition: InterfaceDataset
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Fac.qbl b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Fac.qbl
new file mode 100644
index 0000000..7b10fc0
--- /dev/null
+++ b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Fac.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Fac
+{
+ #keys: '3[415754.0.136760165][415754.0.136760164][415754.0.136760166]'
+ Description: '宸ュ巶绠�鍐�'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_FactoryName.qbl b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_FactoryName.qbl
new file mode 100644
index 0000000..4db83d4
--- /dev/null
+++ b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_FactoryName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute FactoryName
+{
+ #keys: '3[415754.0.136726097][415754.0.136726096][415754.0.136726098]'
+ Description: '宸ュ巶鍚嶇О'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningDate.qbl b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningDate.qbl
new file mode 100644
index 0000000..329beab
--- /dev/null
+++ b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningDate.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute PlanningDate
+{
+ #keys: '3[415754.0.136726023][415754.0.136726022][415754.0.136726024]'
+ Description: '鎺掍骇鏃ユ湡'
+ ValueType: Date
+}
diff --git a/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningQty.qbl b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningQty.qbl
new file mode 100644
index 0000000..be85ed2
--- /dev/null
+++ b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningQty.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute PlanningQty
+{
+ #keys: '3[415754.0.136760128][415754.0.136760127][415754.0.136760129]'
+ Description: '瀵瑰簲鏃ユ湡鐨勮鍒掓暟閲�'
+ ValueType: Number
+}
diff --git a/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Product.qbl b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Product.qbl
new file mode 100644
index 0000000..7fcd906
--- /dev/null
+++ b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Product.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Product
+{
+ #keys: '3[415754.0.136725988][415754.0.136725987][415754.0.136725989]'
+ Description: '鐗╂枡鍙�'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_VersionName.qbl b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_VersionName.qbl
new file mode 100644
index 0000000..f8cc10f
--- /dev/null
+++ b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_VersionName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute VersionName
+{
+ #keys: '3[415754.0.136726060][415754.0.136726059][415754.0.136726061]'
+ Description: '鐗堟湰鍚嶇О'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/StaticMethod_GenerateData.qbl b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/StaticMethod_GenerateData.qbl
new file mode 100644
index 0000000..28ee031
--- /dev/null
+++ b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/StaticMethod_GenerateData.qbl
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod GenerateData (
+ MacroPlan macroPlan,
+ InterfaceDataset interfaceDataset
+)
+{
+ TextBody:
+ [*
+ interfaceDataset.InterfaceProductionSchedulingPlanPush( relflush );
+
+ traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pispmp, not pispmp.IsSystem() and pispmp.IsLeaf() and ( pispmp.StockingPointID() = "DL-MoMo" or pispmp.StockingPointID() = "CC-MoMo" ) ) {
+ info( pispmp.Name() );
+ traverse ( pispmp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, not pispippl.IsPeriodFrozen() ) {
+ interfaceDataset.InterfaceProductionSchedulingPlanPush( relnew,
+ Product := pispmp.ProductID(),
+ PlanningDate := pispippl.Start().Date(),
+ PlanningQty := [Number]pispippl.NewSupplyQuantity(),
+ VersionName := macroPlan.ScenarioName(),
+ FactoryName := ifexpr( pispmp.StockingPointID().Regex( "澶ц繛" ) or pispmp.StockingPointID().Regex( "DL" ), "澶ц繛宸ュ巶", "闀挎槬宸ュ巶" ),
+ Fac := ifexpr( pispmp.StockingPointID().Regex( "澶ц繛" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" )
+ );
+ }
+ }
+ *]
+}
diff --git a/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/_ROOT_Type_InterfaceProductionSchedulingPlanPush.qbl b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/_ROOT_Type_InterfaceProductionSchedulingPlanPush.qbl
new file mode 100644
index 0000000..3be0156
--- /dev/null
+++ b/_Main/BL/Type_InterfaceProductionSchedulingPlanPush/_ROOT_Type_InterfaceProductionSchedulingPlanPush.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type InterfaceProductionSchedulingPlanPush
+{
+ #keys: '5[415754.0.136750146][415754.0.136750144][0.0.0][415754.0.136750145][415754.0.136750147]'
+ BaseType: Object
+ StructuredName: 'InterfaceProductionSchedulingPlanPushs'
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
index 4509029..dcad4a7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
@@ -65,10 +65,20 @@
Properties:
[
Image: 'FLAG_AMBER'
- Taborder: 5
+ Taborder: 6
Title: 'Customer demand(PPA + IDS)'
]
}
+ Component mInterfaceProductionSchedulingPlanPush
+ {
+ #keys: '[415754.0.140441770]'
+ BaseType: 'WebMenu'
+ Properties:
+ [
+ Taborder: 5
+ Title: '鐢熶骇鎺掔▼璁″垝鏁版嵁鎺ㄩ�佹帴鍙f祴璇�'
+ ]
+ }
]
Properties:
[
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def
index 10c1fc2..1ae81f1 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def
@@ -5,11 +5,17 @@
#keys: '[413988.0.1495640258]'
CanBindMultiple: false
DefinitionID: 'Responsedef_WebMenu_OnClick'
+ Precondition:
+ [*
+ return not isnull( MacroPlan ) and not isnull( InterfaceDataset );
+ *]
QuillAction
{
Body:
[*
InterfacePlanInventoryDataPush::GenerateData( MacroPlan, InterfaceDataset );
+
+ WebMessageBox::Success( "鎺ㄩ�佹垚鍔燂紒" );
*]
GroupServerCalls: false
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPla.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPla.def
new file mode 100644
index 0000000..dd980dc
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPla.def
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: ContextMenuInterface/mInterfaceProductionSchedulingPlanPush
+Response OnClick () id:Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPlanPush_OnClick
+{
+ #keys: '[415754.0.141940525]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebMenu_OnClick'
+ Precondition:
+ [*
+ return not isnull( MacroPlan ) and not isnull( InterfaceDataset );
+ *]
+ QuillAction
+ {
+ Body:
+ [*
+ InterfaceProductionSchedulingPlanPush::GenerateData( MacroPlan, InterfaceDataset );
+
+ WebMessageBox::Success( "鎺ㄩ�佹垚鍔燂紒" );
+ *]
+ GroupServerCalls: false
+ }
+}
--
Gitblit v1.9.3