From a3503a8a1304bc6f2fac3d68e8546244f9afd87c Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期三, 13 九月 2023 13:32:16 +0800
Subject: [PATCH] 面板拉料
---
_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/QuintiqEndpoint_QuintiqEndpoint.qbl | 8 ++
_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/_ROOT_IntegratorConfig_PanelMaterialRestServer.qbl | 6 ++
_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Response_PanelFunctionButtons_ButtonSend_OnClick.def | 24 ++++++++
_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperRequest.qbl | 8 ++
_Main/BL/ConfigTemplates.properties | 4 +
_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse#1.qbl | 8 ++
_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/RestEndpoint_PanelMaterialRestEndpoint.qbl | 10 +++
_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Component_PanelFunctionButtons.def | 11 +++
_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/MessageEnhancerProcessor_MessageHeaderEnhancerProcessor.qbl | 25 ++++++++
_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl | 21 +++++++
_Main/BL/Type_GlobalDTOTable/StaticMethod_ReceivingPanelMaterials.qbl | 13 ++++
_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl | 36 ++++++++++++
12 files changed, 174 insertions(+), 0 deletions(-)
diff --git a/_Main/BL/ConfigTemplates.properties b/_Main/BL/ConfigTemplates.properties
index aeac723..d39c798 100644
--- a/_Main/BL/ConfigTemplates.properties
+++ b/_Main/BL/ConfigTemplates.properties
@@ -115,7 +115,11 @@
domainmodel.historicaltransactioncontrol=template:domainmodel.historicaltransactioncontrol
domainmodel.httphandlergroupdefinition.quantus=template:domainmodel.httphandlergroupdefinition
domainmodel.integratorconfig.dsendpoint.q3dspace_3dsendpoint=template:domainmodel.integratorconfig.dsendpoint
+domainmodel.integratorconfig.quintiqendpoint.jtmbrestserver_quintiqendpoint=template:domainmodel.integratorconfig.quintiqendpoint
+domainmodel.integratorconfig.quintiqendpoint.panelmaterialrestserver_quintiqendpoint=template:domainmodel.integratorconfig.quintiqendpoint
domainmodel.integratorconfig.quintiqendpoint.q3dspace_quintiqendpoint=template:domainmodel.integratorconfig.quintiqendpoint
+domainmodel.integratorconfig.restendpoint.jtmbrestserver_restserver=template:domainmodel.integratorconfig.restendpoint
+domainmodel.integratorconfig.restendpoint.panelmaterialrestserver_panelmaterialrestendpoint=template:domainmodel.integratorconfig.restendpoint
domainmodel.mdsstoragedefinitionmanager=template:domainmodel.mdsstoragedefinitionmanager
domainmodel.soapclientinterfacedefinition.interface.libdef_soapclients=template:domainmodel.soapclientinterfacedefinition
domainmodel.soapclientinterfacedefinition.interface.sopdsscclientinterfaces=template:domainmodel.soapclientinterfacedefinition
diff --git "a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl" "b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl"
new file mode 100644
index 0000000..bc0047d
--- /dev/null
+++ "b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl"
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+ContentMapperProcessor ContentMapperReponse
+{
+ PosX: 305
+ PosY: 450
+ ReplyChannelOutputs: QuintiqEndpoint
+}
diff --git a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperRequest.qbl b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperRequest.qbl
new file mode 100644
index 0000000..68694b3
--- /dev/null
+++ b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperRequest.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+ContentMapperProcessor ContentMapperRequest
+{
+ PosX: 405
+ PosY: 200
+ RequestChannelInputs: QuintiqEndpoint
+}
diff --git a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/MessageEnhancerProcessor_MessageHeaderEnhancerProcessor.qbl b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/MessageEnhancerProcessor_MessageHeaderEnhancerProcessor.qbl
new file mode 100644
index 0000000..28845d0
--- /dev/null
+++ b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/MessageEnhancerProcessor_MessageHeaderEnhancerProcessor.qbl
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+MessageEnhancerProcessor MessageHeaderEnhancerProcessor
+{
+ PosX: 205
+ PosY: 200
+ RequestChannelInputs: ContentMapperRequest
+ MessageEnhancerSet
+ {
+ Property: '_QI.IsRequest'
+ Type: 'String'
+ }
+ MessageEnhancerSet
+ {
+ Property: '_QI.Method'
+ Type: 'String'
+ Value: 'ReceivingPanelMaterials'
+ }
+ MessageEnhancerSet
+ {
+ Property: '_QI.Type'
+ Type: 'String'
+ Value: 'GlobalOTDTable'
+ }
+}
diff --git a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/QuintiqEndpoint_QuintiqEndpoint.qbl b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/QuintiqEndpoint_QuintiqEndpoint.qbl
new file mode 100644
index 0000000..eaf832c
--- /dev/null
+++ b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/QuintiqEndpoint_QuintiqEndpoint.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+QuintiqEndpoint QuintiqEndpoint
+{
+ PosX: 555
+ PosY: 300
+ SettingsEngineLink: 'domainmodel.integratorconfig.quintiqendpoint.panelmaterialrestserver_quintiqendpoint'
+}
diff --git a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/RestEndpoint_PanelMaterialRestEndpoint.qbl b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/RestEndpoint_PanelMaterialRestEndpoint.qbl
new file mode 100644
index 0000000..f771e1a
--- /dev/null
+++ b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/RestEndpoint_PanelMaterialRestEndpoint.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#parent: #root
+RestEndpoint PanelMaterialRestEndpoint
+{
+ PosX: 55
+ PosY: 300
+ ReplyChannelOutputs: ContentMapperReponse
+ RequestChannelInputs: MessageHeaderEnhancerProcessor
+ SettingsEngineLink: 'domainmodel.integratorconfig.restendpoint.panelmaterialrestserver_panelmaterialrestendpoint'
+}
diff --git a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/_ROOT_IntegratorConfig_PanelMaterialRestServer.qbl b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/_ROOT_IntegratorConfig_PanelMaterialRestServer.qbl
new file mode 100644
index 0000000..b91eb27
--- /dev/null
+++ b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/_ROOT_IntegratorConfig_PanelMaterialRestServer.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #root
+IntegratorConfig PanelMaterialRestServer
+{
+}
diff --git a/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl b/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl
new file mode 100644
index 0000000..cf331b0
--- /dev/null
+++ b/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl
@@ -0,0 +1,21 @@
+Quintiq file version 2.0
+#parent: #root
+Method ReceivingPanelMaterials (
+ NamedValueTree requestnvt
+) as stream[NamedValueTree]
+{
+ TextBody:
+ [*
+ info( requestnvt.ToString() );
+
+ logfile( "--------------------------------------1------------------------------------------------" );
+ body := LibInt_MessageAccessor::GetBodyValueAsString( requestnvt );
+ rep := LibInt_MessageAccessor::CreateEmptyMessage();
+ LibInt_MessageAccessor::SetBodyValueAsString( rep, body );
+ logfile( "--------------------------------------2------------------------------------------------" );
+ info( rep.ToString() );
+
+
+ return emit( rep );
+ *]
+}
diff --git a/_Main/BL/Type_GlobalDTOTable/StaticMethod_ReceivingPanelMaterials.qbl b/_Main/BL/Type_GlobalDTOTable/StaticMethod_ReceivingPanelMaterials.qbl
new file mode 100644
index 0000000..ad3eacc
--- /dev/null
+++ b/_Main/BL/Type_GlobalDTOTable/StaticMethod_ReceivingPanelMaterials.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ReceivingPanelMaterials (
+ NamedValueTree requestnvt
+) as stream[NamedValueTree]
+{
+ TextBody:
+ [*
+ MDSGlobalOTDTable::Find( DatasetFindOptions::Construct("GlobalOTDTable")) -> ( c ) {
+ return c.ReceivingPanelMaterials( requestnvt );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl b/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl
new file mode 100644
index 0000000..620a059
--- /dev/null
+++ b/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl
@@ -0,0 +1,36 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Send (
+ MacroPlan macroPlan,
+ Scenario scenario,
+ String businessType
+)
+{
+ TextBody:
+ [*
+ info( "鐗堟湰鍙凤細", scenario.Name(), " 浜嬩笟閮細", businessType );
+
+ jsonBuilder := JSON::Object();
+
+ jsonBuilder.Add( "releaseDate", Date::ActualDate().Format( "Y-M2-D2" ) );
+ jsonBuilder.Add( "businessType", businessType );
+ jsonBuilder.Add( "scenarioName", scenario.Name() );
+
+ jsonBuilderPanelMaterials := JSON::Array();
+ traverse ( macroPlan, PanelMaterial, pm, true ) {
+ jsonBuilderPanelMaterial := JSON::Object();
+
+ jsonBuilderPanelMaterial.Add( "productID", pm.PanelModel() );
+ jsonBuilderPanelMaterial.Add( "productDescription", pm.MaterialDescription() );
+ jsonBuilderPanelMaterial.Add( "startDate", pm.StartDate().Format( "Y-M2-D2" ) );
+ jsonBuilderPanelMaterial.Add( "quantity", pm.DemandQuantity() );
+
+ jsonBuilderPanelMaterials.Add( jsonBuilderPanelMaterial );
+ }
+ jsonBuilder.Add( "panelMaterials", jsonBuilderPanelMaterials );
+
+ json := jsonBuilder.Build();
+
+ info( json.AsPrettyString() );
+ *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Component_PanelFunctionButtons.def b/_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Component_PanelFunctionButtons.def
index fd349be..9d84240 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Component_PanelFunctionButtons.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Component_PanelFunctionButtons.def
@@ -27,6 +27,17 @@
Taborder: 1
]
}
+ Component DropDownStringListBusinessType
+ {
+ #keys: '[414702.0.170431848]'
+ BaseType: 'WebDropDownStringList'
+ Properties:
+ [
+ Label: '浜嬩笟閮ㄩ�夋嫨'
+ Strings: '澶╁崕;涓撴樉;IT;杞﹁浇;TM17;TM18;杩愬姩鍋ュ悍;姹借溅鐢靛瓙'
+ Taborder: 2
+ ]
+ }
]
Properties:
[
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Response_PanelFunctionButtons_ButtonSend_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Response_PanelFunctionButtons_ButtonSend_OnClick.def
new file mode 100644
index 0000000..acdfa4f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPanelPullPlanReport/Response_PanelFunctionButtons_ButtonSend_OnClick.def
@@ -0,0 +1,24 @@
+Quintiq file version 2.0
+#parent: PanelFunctionButtons/ButtonSend
+Response OnClick () id:Response_PanelFunctionButtons_ButtonSend_OnClick
+{
+ #keys: '[414702.0.168500044]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ Precondition:
+ [*
+ return not isnull( MacroPlan ) and not isnull( DataHolderActiveScenario.Data() );
+ *]
+ QuillAction
+ {
+ Body:
+ [*
+ scenario := DataHolderActiveScenario.Data();
+
+ PanelMaterial::Send( MacroPlan, scenario, DropDownStringListBusinessType.Text() );
+
+ WebMessageBox::Success( "鍙戦�佹垚鍔燂紒", true );
+ *]
+ GroupServerCalls: false
+ }
+}
--
Gitblit v1.9.3