From 5773247d347db0d22b867c80c857022f8d67a823 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 26 八月 2024 11:12:23 +0800
Subject: [PATCH] 修复一些bug‘
---
_Main/BL/Type_UphillRouting/Attribute_Suffix.qbl | 7 +
_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl | 7 +
_Main/BL/Type_UphillRouting/Attribute_isUsed.qbl | 7 +
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def | 8 -
_Main/BL/Type_UphillRouting/DefaultValue_isUsed.qbl | 7 +
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_npPercentage_OnUserChanged.def | 16 ++++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def | 1
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_efPercentage_OnCreated.def | 18 ++++
_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick.def | 2
/dev/null | 7 -
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnOk_OnClick.def | 20 +++++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting#943.def | 2
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def | 1
_Main/BL/Type_UphillRouting/Method_Use.qbl | 22 +++++
_Main/BL/Type_UphillRouting/StaticMethod_Create#90.qbl | 18 +---
_Main/Sys/Definitions/Sales demo/CarCo/1.0 Base/MP_ChangeoverLossSetting.xlsx | 0
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlActions#646.def | 40 ++++++++++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnCancel_OnClick.def | 15 +++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def | 16 +++
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_UseUphillRoutings.def | 12 +++
20 files changed, 195 insertions(+), 31 deletions(-)
diff --git a/_Main/BL/Type_UphillRouting/Attribute_Suffix.qbl b/_Main/BL/Type_UphillRouting/Attribute_Suffix.qbl
new file mode 100644
index 0000000..75ac991
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/Attribute_Suffix.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Suffix
+{
+ #keys: '3[414996.1.26354666][414996.1.26354665][414996.1.26354667]'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_UphillRouting/Attribute_Type.qbl b/_Main/BL/Type_UphillRouting/Attribute_Type.qbl
deleted file mode 100644
index d2929c0..0000000
--- a/_Main/BL/Type_UphillRouting/Attribute_Type.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute Type
-{
- #keys: '3[412672.0.1047812165][412672.0.1047812164][412672.0.1047812166]'
- ValueType: String
-}
diff --git a/_Main/BL/Type_UphillRouting/Attribute_isUsed.qbl b/_Main/BL/Type_UphillRouting/Attribute_isUsed.qbl
new file mode 100644
index 0000000..9792e92
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/Attribute_isUsed.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute isUsed
+{
+ #keys: '3[414996.1.27011002][414996.1.27011001][414996.1.27011003]'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_UphillRouting/DefaultValue_isUsed.qbl b/_Main/BL/Type_UphillRouting/DefaultValue_isUsed.qbl
new file mode 100644
index 0000000..9c66748
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/DefaultValue_isUsed.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+ ISOValue: 'false'
+ TargetAttribute: isUsed
+}
diff --git a/_Main/BL/Type_UphillRouting/Method_Use.qbl b/_Main/BL/Type_UphillRouting/Method_Use.qbl
new file mode 100644
index 0000000..f2d2705
--- /dev/null
+++ b/_Main/BL/Type_UphillRouting/Method_Use.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+Method Use
+{
+ TextBody:
+ [*
+ // Akari Aug-26-2024 (created)
+ this.isUsed( true );
+
+ copy_routing := this.Routing().Copy( this.Suffix() + this.StartDate().Format( "Y-M2-D2") );
+
+ copy_routing.Start( this.StartDate() );
+
+ copy_routing.End( this.EndDate() );
+
+ traverse( copy_routing,OperationForPlanningMatrix,op){
+ op.Throughput( op.Throughput() * ( this.Percentage() / 100) );
+ }
+
+ copy_routing.CopyUphillRouting( relset, this );
+ *]
+}
diff --git "a/_Main/BL/Type_UphillRouting/StaticMethod_Create\04390.qbl" "b/_Main/BL/Type_UphillRouting/StaticMethod_Create\04390.qbl"
index ce2b5af..85c0934 100644
--- "a/_Main/BL/Type_UphillRouting/StaticMethod_Create\04390.qbl"
+++ "b/_Main/BL/Type_UphillRouting/StaticMethod_Create\04390.qbl"
@@ -6,29 +6,19 @@
Date endDate,
Real percentage,
String suffix
-)
+) as UphillRouting
{
TextBody:
[*
// rislai Jun-14-2024 (created)
- verifyData := select( owner,UphillRouting,ur,ur.Type() = suffix and LocalTool::IsOverlap( ur.StartDate(),ur.EndDate(),startDate,endDate ));
+ verifyData := select( owner,UphillRouting,ur,ur.Suffix() = suffix and LocalTool::IsOverlap( ur.StartDate(),ur.EndDate(),startDate,endDate ));
if( not isnull( verifyData )){
error( "璁剧疆鐨凷tart鍜孍nd涓嶅彲涓庡凡鏈夋暟鎹殑鏃堕棿鍖洪棿閲嶅彔銆�" );
}
- data := owner.UphillRouting( relnew,StartDate := startDate, EndDate := endDate,Percentage := percentage,Type := suffix );
+ data := owner.UphillRouting( relnew,StartDate := startDate, EndDate := endDate,Percentage := percentage,Suffix := suffix );
- copy_routing := owner.Copy( suffix + startDate.Format( "Y-M2-D2") );
-
- copy_routing.Start( startDate );
-
- copy_routing.End( endDate );
-
- traverse( copy_routing,OperationForPlanningMatrix,op){
- op.Throughput( op.Throughput() * ( percentage / 100) );
- }
-
- copy_routing.CopyUphillRouting( relset, data );
+ return data;
*]
}
diff --git a/_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl b/_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl
index 91d1b68..a7f7173 100644
--- a/_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl
@@ -11,7 +11,12 @@
[*
// rislai Jun-14-2024 (created)
traverse( unit,Operation.RoutingForPlanningMatrix,routing , routing.IsEnabled() and LocalTool::IsOverlap( startDate,endDate,routing.Start(),routing.End())){
- UphillRouting::Create( routing,startDate,endDate,percentage,"_浜х嚎鐖潯_" );
+ suffix := "_浜х嚎鐖潯_";
+
+ data := UphillRouting::Create( routing,startDate,endDate,percentage,suffix );
+
+ data.Use();
+
}
*]
}
diff --git a/_Main/Sys/Definitions/Sales demo/CarCo/1.0 Base/MP_ChangeoverLossSetting.xlsx b/_Main/Sys/Definitions/Sales demo/CarCo/1.0 Base/MP_ChangeoverLossSetting.xlsx
new file mode 100644
index 0000000..47f6222
--- /dev/null
+++ b/_Main/Sys/Definitions/Sales demo/CarCo/1.0 Base/MP_ChangeoverLossSetting.xlsx
Binary files differ
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def
index a63289d..ee1c756 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def
@@ -61,12 +61,26 @@
Properties:
[
DataBinding: 'dhDialogData.Data.Percentage'
- Label: 'Percentage'
+ Label: 'Percentage*'
Max: '99'
Min: '1'
+ PlaceHolder: 'Percentage 涓哄繀濉」'
Taborder: 3
]
}
+ Component efPercentage
+ {
+ #keys: '[414996.1.29740363]'
+ BaseType: 'WebEditField'
+ Properties:
+ [
+ DataBinding: 'dhDialogData.Data.Percentage'
+ Enabled: false
+ Label: 'Final Percentage'
+ Taborder: 4
+ Tooltip: '鏈�缁堣緭鍏ョ殑Percentage浼氬湪杩欓噷灞曠ず'
+ ]
+ }
]
Properties:
[
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def
index c276ae9..273a671 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def
@@ -14,5 +14,6 @@
}else{
}
+ info( npPercentage.Number() );
*]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def
index d855b10..2efb364 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def
@@ -13,12 +13,8 @@
{
Body:
[*
- if( WebMessageBox::Warning( Form, "鏄惁纭鐢熸垚宸ヨ壓璺嚎锛�",Translations::MessageBox_OKCancel() ,true ) = 0 ){
- Form.OnOK();
- Form.Close();
- }else{
- Form.Close();
- }
+ Form.OnOK();
+ Form.Close();
*]
}
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_efPercentage_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_efPercentage_OnCreated.def
new file mode 100644
index 0000000..0e12e23
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_efPercentage_OnCreated.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: pnlContent/efPercentage
+Response OnCreated () id:Response_pnlContent_efPercentage_OnCreated
+{
+ #keys: '[414996.1.29740670]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebComponent_OnCreated'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+ if( isnull( dhDialogData.Data() )){
+ this.Text( [String]90 );
+ }
+ *]
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_npPercentage_OnUserChanged.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_npPercentage_OnUserChanged.def
new file mode 100644
index 0000000..11eb8ae
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_npPercentage_OnUserChanged.def
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: pnlContent/npPercentage
+Response OnUserChanged () id:Response_pnlContent_npPercentage_OnUserChanged
+{
+ #keys: '[414996.1.28611725]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebNumberPicker_OnUserChanged'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+ efPercentage.Text( [String]this.Number() );
+ *]
+ }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting\043943.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting\043943.def"
index f203f9c..51f84d8 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting\043943.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting\043943.def"
@@ -12,7 +12,7 @@
Properties:
[
DataType: 'Routing'
- FixedFilter: 'object.Type() = "_浜у搧鐖潯_"'
+ FixedFilter: 'object.Suffix() = "_浜у搧鐖潯_"'
Source: 'dhRouting'
Taborder: 0
Transformation: 'UphillRouting'
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlActions\043646.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlActions\043646.def"
new file mode 100644
index 0000000..1816485
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlActions\043646.def"
@@ -0,0 +1,40 @@
+Quintiq file version 2.0
+Component pnlActions id:pnlActions_646
+{
+ #keys: '[414996.1.26570436]'
+ BaseType: 'WebPanel'
+ Children:
+ [
+ Component btnOk
+ {
+ #keys: '[414996.1.26570437]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Label: 'OK'
+ Taborder: 0
+ ]
+ }
+ Component btnCancel
+ {
+ #keys: '[414996.1.26570438]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Label: 'Cancel'
+ Taborder: 1
+ ]
+ }
+ ]
+ Properties:
+ [
+ Alignment: 'trailing'
+ Border: true
+ ExcludeFromActiveComponent: true
+ FixedSize: true
+ Orientation: 'horizontal'
+ Padding: 'true'
+ Style: 'footer'
+ Taborder: 1
+ ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_UseUphillRoutings.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_UseUphillRoutings.def
new file mode 100644
index 0000000..0c53412
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_UseUphillRoutings.def
@@ -0,0 +1,12 @@
+Quintiq file version 2.0
+#parent: #root
+Method UseUphillRoutings () id:Method_DialogCreateEditUphillRoutings_UseUphillRoutings
+{
+ #keys: '[414996.1.26570568]'
+ Body:
+ [*
+ traverse( dhRouting.Data(),UphillRouting,uphillRouting,not uphillRouting.isUsed() ){
+ uphillRouting.Use();
+ }
+ *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnCancel_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnCancel_OnClick.def
new file mode 100644
index 0000000..785890f
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnCancel_OnClick.def
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: pnlActions_646/btnCancel
+Response OnClick () id:Response_pnlActions_646_btnCancel_OnClick
+{
+ #keys: '[414996.1.26570434]'
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+ Form.Close();
+ *]
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnOk_OnClick.def
new file mode 100644
index 0000000..9d33877
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnOk_OnClick.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: pnlActions_646/btnOk
+Response OnClick () id:Response_pnlActions_646_btnOk_OnClick
+{
+ #keys: '[414996.1.26570435]'
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ GroupServerCalls: true
+ QuillAction
+ {
+ Body:
+ [*
+ if( WebMessageBox::Warning( Form, "鏄惁纭鐢熸垚宸ヨ壓璺嚎锛�",Translations::MessageBox_OKCancel() ,true ) = 0 ){
+ Form.UseUphillRoutings();
+ Form.Close();
+ }else{
+ // Form.Close();
+ }
+ *]
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def
index 362a310..d3a4362 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def
@@ -8,6 +8,7 @@
Children:
[
#child: pnlContent
+ #child: pnlActions_646
]
Properties:
[
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick.def
index 46b6cd4..f0fc40c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick.def
@@ -2,7 +2,7 @@
#parent: ListRoutings
Response OnClick (
Routing selection
-) id:Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick
+) id:Response_ListRoutings_MenuHotTestRatio_OnClick
{
#keys: '[415136.0.761890849]'
CanBindMultiple: false
--
Gitblit v1.9.3