From b431995d0cdfde5047ee028ddba76150d93120a2 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期四, 17 十月 2024 00:45:39 +0800
Subject: [PATCH] 修复一些bug
---
_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl | 34 +++--
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl | 1
_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl | 78 ++++++++++++
_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl | 4
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def | 12 -
_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def | 16 +-
_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def | 10
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport#1.qbl | 28 ++--
_Main/BL/Type_LocalColumn/Attribute_CustomName.qbl | 7 +
_Main/BL/Type_LocalColumn/Function_CalcDate.qbl | 2
/dev/null | 30 -----
_Main/BL/Type_LocalColumn/Function_CalcName.qbl | 13 ++
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_dhXMLDataListener_OnDataChanged.def | 20 +++
_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def | 2
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl | 48 ++++----
_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl | 4
_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl | 1
_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl | 2
18 files changed, 196 insertions(+), 116 deletions(-)
diff --git a/_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl b/_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl
index c01e5fa..5a3d269 100644
--- a/_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl
+++ b/_Main/BL/Type_ExportXMLData/Method_CalculatePriority.qbl
@@ -11,38 +11,40 @@
priority := 1 ;
}else if( element.LikeUserLocale( "<name>浜х嚎</name>" )){
priority := 2 ;
- }else if( element.LikeUserLocale( "<name>Attribute</name>" )){
+ }else if( element.LikeUserLocale( "<name> </name>" )){
priority := 3 ;
- }else if( element.LikeUserLocale( "<name>浜у湴</name>" )){
+ }else if( element.LikeUserLocale( "<name>Attribute</name>" )){
priority := 4 ;
- }else if( element.LikeUserLocale( "<name>杞﹀瀷</name>" )){
+ }else if( element.LikeUserLocale( "<name>浜у湴</name>" )){
priority := 5 ;
- }else if( element.LikeUserLocale( "<name>鍙戝姩鏈洪浂浠跺彿</name>" )){
+ }else if( element.LikeUserLocale( "<name>杞﹀瀷</name>" )){
priority := 6 ;
- }else if( element.LikeUserLocale( "<name>鍙戝姩鏈哄洓浣嶇爜</name>" )){
+ }else if( element.LikeUserLocale( "<name>鍙戝姩鏈洪浂浠跺彿</name>" )){
priority := 7 ;
- }else if( element.LikeUserLocale( "<name>鐢熶骇澶╂暟</name>" )){
+ }else if( element.LikeUserLocale( "<name>鍙戝姩鏈哄洓浣嶇爜</name>" )){
priority := 8 ;
- }else if( element.LikeUserLocale( "<name>鍔犵彮/娆犲伐鏃堕暱</name>" )){
+ }else if( element.LikeUserLocale( "<name>鐢熶骇澶╂暟</name>" )){
priority := 9 ;
- }else if( element.LikeUserLocale( "<name>骞虫棩鍔犵彮鏃堕暱</name>" )){
+ }else if( element.LikeUserLocale( "<name>鍔犵彮/娆犲伐鏃堕暱</name>" )){
priority := 10 ;
- }else if( element.LikeUserLocale( "<name>浼戞伅鏃ュ姞鐝椂闀�</name>" )){
+ }else if( element.LikeUserLocale( "<name>骞虫棩鍔犵彮鏃堕暱</name>" )){
priority := 11 ;
- }else if( element.LikeUserLocale( "<name>鑺傚亣鏃ュ姞鐝椂闀�</name>" )){
+ }else if( element.LikeUserLocale( "<name>浼戞伅鏃ュ姞鐝椂闀�</name>" )){
priority := 12 ;
- }else if( element.LikeUserLocale( "<name>娆犲伐鏃堕暱</name>" )){
+ }else if( element.LikeUserLocale( "<name>鑺傚亣鏃ュ姞鐝椂闀�</name>" )){
priority := 13 ;
- }else if( element.LikeUserLocale( "<name>鍔犵彮/娆犲伐璐�</name>" )){
+ }else if( element.LikeUserLocale( "<name>娆犲伐鏃堕暱</name>" )){
priority := 14 ;
- }else if( element.LikeUserLocale( "<name>骞虫棩鍔犵彮璐�</name>" )){
+ }else if( element.LikeUserLocale( "<name>鍔犵彮/娆犲伐璐�</name>" )){
priority := 15 ;
- }else if( element.LikeUserLocale( "<name>浼戞伅鏃ュ姞鐝垂</name>" )){
+ }else if( element.LikeUserLocale( "<name>骞虫棩鍔犵彮璐�</name>" )){
priority := 16 ;
- }else if( element.LikeUserLocale( "<name>鑺傚亣鏃ュ姞鐝垂</name>" )){
+ }else if( element.LikeUserLocale( "<name>浼戞伅鏃ュ姞鐝垂</name>" )){
priority := 17 ;
- }else if( element.LikeUserLocale( "<name>娆犲伐璐�</name>" )){
+ }else if( element.LikeUserLocale( "<name>鑺傚亣鏃ュ姞鐝垂</name>" )){
priority := 18 ;
+ }else if( element.LikeUserLocale( "<name>娆犲伐璐�</name>" )){
+ priority := 19 ;
}else{
// <column><name>2020/04/01</name>
priority := [Number]element.SubString( 14,10 ).ReplaceAll( "/","") ;
diff --git a/_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl b/_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl
index f87cb3f..6e31752 100644
--- a/_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl
+++ b/_Main/BL/Type_ExportXMLManager/StaticMethod_AwaitLocalTableXMLData.qbl
@@ -21,7 +21,6 @@
}onerror{
info( element );
}
-
}
*]
}
diff --git "a/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport\0431.qbl" "b/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport\0431.qbl"
index 1eb1832..d033d04 100644
--- "a/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport\0431.qbl"
+++ "b/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateComprehensiveHoursReport\0431.qbl"
@@ -15,13 +15,13 @@
//column1 := table.LocalColumn( relnew,Name := "宸ュ巶" ,CustomIndex := 1);
//column2 := table.LocalColumn( relnew,Name := "浜х嚎" ,CustomIndex := 2);
- column3 := table.LocalColumn( relnew,Name := "鐢熶骇澶╂暟" ,CustomIndex := 3);
+ column3 := table.LocalColumn( relnew,CustomName := "鐢熶骇澶╂暟" ,CustomIndex := 3);
- column4 := table.LocalColumn( relnew,Name := "鍔犵彮/娆犲伐鏃堕暱" ,CustomIndex := 4);
- column5 := table.LocalColumn( relnew,Name := "鑺傚亣鏃ュ姞鐝椂闀�" ,CustomIndex := 6);
+ column4 := table.LocalColumn( relnew,CustomName := "鍔犵彮/娆犲伐鏃堕暱" ,CustomIndex := 4);
+ column5 := table.LocalColumn( relnew,CustomName := "鑺傚亣鏃ュ姞鐝椂闀�" ,CustomIndex := 6);
- column6 := table.LocalColumn( relnew,Name := "鍔犵彮/娆犲伐璐�" ,CustomIndex := 8);
- column7 := table.LocalColumn( relnew,Name := "鑺傚亣鏃ュ姞鐝垂" ,CustomIndex := 10);
+ column6 := table.LocalColumn( relnew,CustomName := "鍔犵彮/娆犲伐璐�" ,CustomIndex := 8);
+ column7 := table.LocalColumn( relnew,CustomName := "鑺傚亣鏃ュ姞鐝垂" ,CustomIndex := 10);
units := selectset( shiftPlans,Elements.UnitPeriodTime.Unit,unit,true );
@@ -73,13 +73,13 @@
// chanxianxCell := LocalCell_Default::GetCell( rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
// 宸ヤ綔鏃�
- workingDayCell := LocalCell_Default::GetCell( rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
+ workingDayCell := LocalCell_Default::GetCell( rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
// 鑺傚亣鏃ュ姞鐝�
- holidayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
+ holidayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
// 浼戞伅鏃ュ姞鐝�
- breakDayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
+ breakDayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
// 骞虫椂鍔犵彮
- defaultDayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
+ defaultDayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
if( shiftPlan.Outcome() <> "" ){
workingDayCell.RealValue( workingDayCell.RealValue() + 1 );
@@ -144,7 +144,7 @@
}
}else{
if( not shiftPlan.IsHoliday() and not ( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) )){
- qiangongCell := LocalCell_Default::GetCell( rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
+ qiangongCell := LocalCell_Default::GetCell( rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
}
}
@@ -183,14 +183,14 @@
rowKey := row.CustomName();
unit := units.Element( unitIndexTree.Root().Child( unitIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
- jiejiariCell := LocalCell_Default::GetCell( rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
- jiejiarifeiCell := LocalCell_Default::GetCell( rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
+ jiejiariCell := LocalCell_Default::GetCell( rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
+ jiejiarifeiCell := LocalCell_Default::GetCell( rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
jiejiarifeiCell.RealValue( EmployeeCost::GetSalary( unit,holidayMultiplier,jiejiariCell.RealValue()));
- qiangongCell := LocalCell_Default::GetCell( rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
+ qiangongCell := LocalCell_Default::GetCell( rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
- qiangongfeiCell := LocalCell_Default::GetCell( rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
+ qiangongfeiCell := LocalCell_Default::GetCell( rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
qiangongfeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier,qiangongCell.RealValue() ));
}
diff --git a/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl b/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
index 2a888ca..94d74a0 100644
--- a/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
+++ b/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
@@ -15,17 +15,17 @@
//column1 := table.LocalColumn( relnew,Name := "宸ュ巶" ,CustomIndex := 1);
//column2 := table.LocalColumn( relnew,Name := "浜х嚎" ,CustomIndex := 2);
- column3 := table.LocalColumn( relnew,Name := "鐢熶骇澶╂暟" ,CustomIndex := 3);
+ column3 := table.LocalColumn( relnew,CustomName := "鐢熶骇澶╂暟" ,CustomIndex := 3);
- column4 := table.LocalColumn( relnew,Name := "骞虫棩鍔犵彮鏃堕暱" ,CustomIndex := 4);
- column5 := table.LocalColumn( relnew,Name := "浼戞伅鏃ュ姞鐝椂闀�" ,CustomIndex := 5);
- column6 := table.LocalColumn( relnew,Name := "鑺傚亣鏃ュ姞鐝椂闀�" ,CustomIndex := 6);
- column7 := table.LocalColumn( relnew,Name := "娆犲伐鏃堕暱" ,CustomIndex := 7);
+ column4 := table.LocalColumn( relnew,CustomName := "骞虫棩鍔犵彮鏃堕暱" ,CustomIndex := 4);
+ column5 := table.LocalColumn( relnew,CustomName := "浼戞伅鏃ュ姞鐝椂闀�" ,CustomIndex := 5);
+ column6 := table.LocalColumn( relnew,CustomName := "鑺傚亣鏃ュ姞鐝椂闀�" ,CustomIndex := 6);
+ column7 := table.LocalColumn( relnew,CustomName := "娆犲伐鏃堕暱" ,CustomIndex := 7);
- column8 := table.LocalColumn( relnew,Name := "骞虫棩鍔犵彮璐�" ,CustomIndex := 8);
- column9 := table.LocalColumn( relnew,Name := "浼戞伅鏃ュ姞鐝垂" ,CustomIndex := 9);
- column10 := table.LocalColumn( relnew,Name := "鑺傚亣鏃ュ姞鐝垂" ,CustomIndex := 10);
- column11 := table.LocalColumn( relnew,Name := "娆犲伐璐�" ,CustomIndex := 11);
+ column8 := table.LocalColumn( relnew,CustomName := "骞虫棩鍔犵彮璐�" ,CustomIndex := 8);
+ column9 := table.LocalColumn( relnew,CustomName := "浼戞伅鏃ュ姞鐝垂" ,CustomIndex := 9);
+ column10 := table.LocalColumn( relnew,CustomName := "鑺傚亣鏃ュ姞鐝垂" ,CustomIndex := 10);
+ column11 := table.LocalColumn( relnew,CustomName := "娆犲伐璐�" ,CustomIndex := 11);
units := selectset( shiftPlans,Elements.UnitPeriodTime.Unit,unit,true );
@@ -76,14 +76,14 @@
// gongchangCell := LocalCell_Default::GetCell( rowKey + column1.Name(), cellIndexTree, cells, row, column1 );
// chanxianxCell := LocalCell_Default::GetCell( rowKey + column2.Name(), cellIndexTree, cells, row, column2 );
// 宸ヤ綔鏃�
- workingDayCell := LocalCell_Default::GetCell( rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
+ workingDayCell := LocalCell_Default::GetCell( rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
// 鑺傚亣鏃ュ姞鐝�
- holidayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
+ holidayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
// 浼戞伅鏃ュ姞鐝�
- breakDayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
+ breakDayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
// 骞虫椂鍔犵彮
- defaultDayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
-
+ defaultDayOvertimeHourCell := LocalCell_Default::GetCell( rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
+
if( shiftPlan.Outcome() <> "" ){
workingDayCell.RealValue( workingDayCell.RealValue() + 1 );
if( shiftPlan.IsHoliday() ){
@@ -145,7 +145,7 @@
}
}else{
if( not shiftPlan.IsHoliday() and not ( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) )){
- qiangongCell := LocalCell_Default::GetCell( rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
+ qiangongCell := LocalCell_Default::GetCell( rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
qiangongCell.RealValue( qiangongCell.RealValue() + 8 );
}
}
@@ -185,30 +185,30 @@
unit := units.Element( unitIndexTree.Root().Child( unitIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
// 鑺傚亣鏃ュ姞鐝垂
- jiejiariCell := LocalCell_Default::GetCell( rowKey + column6.Name(), cellIndexTree, cells, row, column6 );
- jiejiarifeiCell := LocalCell_Default::GetCell( rowKey + column10.Name(), cellIndexTree, cells, row, column10 );
+ jiejiariCell := LocalCell_Default::GetCell( rowKey + column6.CustomName(), cellIndexTree, cells, row, column6 );
+ jiejiarifeiCell := LocalCell_Default::GetCell( rowKey + column10.CustomName(), cellIndexTree, cells, row, column10 );
jiejiarifeiCell.RealValue( EmployeeCost::GetSalary( unit,holidayMultiplier,jiejiariCell.RealValue()));
// 浼戞伅鏃ュ姞鐝垂
- xiuxiCell := LocalCell_Default::GetCell( rowKey + column5.Name(), cellIndexTree, cells, row, column5 );
- xiuxifeiCell := LocalCell_Default::GetCell( rowKey + column9.Name(), cellIndexTree, cells, row, column9 );
+ xiuxiCell := LocalCell_Default::GetCell( rowKey + column5.CustomName(), cellIndexTree, cells, row, column5 );
+ xiuxifeiCell := LocalCell_Default::GetCell( rowKey + column9.CustomName(), cellIndexTree, cells, row, column9 );
xiuxifeiCell.RealValue( EmployeeCost::GetSalary( unit,breakDayMultiplier,xiuxiCell.RealValue()));
// 骞虫椂鍔犵彮璐�
- jiabanCell := LocalCell_Default::GetCell( rowKey + column4.Name(), cellIndexTree, cells, row, column4 );
- jiabanfeiCell := LocalCell_Default::GetCell( rowKey + column8.Name(), cellIndexTree, cells, row, column8 );
+ jiabanCell := LocalCell_Default::GetCell( rowKey + column4.CustomName(), cellIndexTree, cells, row, column4 );
+ jiabanfeiCell := LocalCell_Default::GetCell( rowKey + column8.CustomName(), cellIndexTree, cells, row, column8 );
jiabanfeiCell.RealValue( EmployeeCost::GetSalary( unit,defaultMultiplier ,jiabanCell.RealValue()));
// 娆犲伐璐�
- qiangongCell := LocalCell_Default::GetCell( rowKey + column7.Name(), cellIndexTree, cells, row, column7 );
+ qiangongCell := LocalCell_Default::GetCell( rowKey + column7.CustomName(), cellIndexTree, cells, row, column7 );
qiangongCell.RealValue( qiangongCell.RealValue() - 8 );
- qiangongfeiCell := LocalCell_Default::GetCell( rowKey + column11.Name(), cellIndexTree, cells, row, column11 );
+ qiangongfeiCell := LocalCell_Default::GetCell( rowKey + column11.CustomName(), cellIndexTree, cells, row, column11 );
qiangongfeiCell.RealValue( EmployeeCost::GetSalary( unit,qiangongMultiplier,qiangongCell.RealValue() ));
// 宸ヤ綔鏃�
- workingDayCell := LocalCell_Default::GetCell( rowKey + column3.Name(), cellIndexTree, cells, row, column3 );
+ workingDayCell := LocalCell_Default::GetCell( rowKey + column3.CustomName(), cellIndexTree, cells, row, column3 );
workingDayCell.RealValue( workingDayCell.RealValue() );
}
diff --git a/_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl b/_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl
index e9956a5..9cb69dc 100644
--- a/_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl
+++ b/_Main/BL/Type_LocalCell_Default/StaticMethod_GetColumnXML.qbl
@@ -14,7 +14,7 @@
cells := selectsortedset( column, LocalCell.astype( LocalCell_Default ), cell,
exists( rows,Elements,element,element = cell.LocalRow()), cell.LocalRow().Index());
if( type = "data" ){
- columnXML := "<column><name>" + column.Name() + "</name><type>String</type>";
+ columnXML := "<column><name>" + column.Name() + "</name><type>Number</type>";
traverse ( cells, Elements, cell ) {
cellXML := '<cell value="' + cell.RealValue().Format( "N(Dec)" ) + '"/>'
columnXML := columnXML + cellXML;
@@ -22,7 +22,7 @@
columnXML := columnXML + "</column>";
}
if( type = "attribute" ){
- columnXML1 := "<column><name>浜х嚎</name><type>String</type>";
+ columnXML1 := "<column><name> </name><type>String</type>";
traverse ( cells, Elements, cell ) {
cellXML := '<cell value="' + cell.LocalRow().Name() + '"/>'
columnXML1 := columnXML1 + cellXML;
diff --git a/_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl b/_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl
index 44609af..e1f736a 100644
--- a/_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl
+++ b/_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_GenerateColumnIndex.qbl
@@ -30,7 +30,7 @@
// 2023/01/01
index := [Number]generalColumn.Name().ReplaceAll( "/", "" );
}
- column := localTable.LocalColumn( relnew, Name := generalColumn.Name(),CustomIndex := index );
+ column := localTable.LocalColumn( relnew, CustomName := generalColumn.Name(),CustomIndex := index );
columns.Add( column );
columnTree.Root().AddChild( tempHandle,columns.Size() - 1 );
}
diff --git a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
index e115edc..d5c3eee 100644
--- a/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
@@ -70,9 +70,13 @@
}
}
}
+
+
traverse( table,MP_Column,column,column.MP_Cell( relsize ) = 0 ){
column.Delete();
}
+
+
return table;
*]
}
diff --git a/_Main/BL/Type_LocalColumn/Attribute_CustomName.qbl b/_Main/BL/Type_LocalColumn/Attribute_CustomName.qbl
new file mode 100644
index 0000000..d407e8c
--- /dev/null
+++ b/_Main/BL/Type_LocalColumn/Attribute_CustomName.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CustomName
+{
+ #keys: '3[414996.1.141371567][414996.1.141371566][414996.1.141371568]'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_LocalColumn/Function_CalcDate.qbl b/_Main/BL/Type_LocalColumn/Function_CalcDate.qbl
index 2f59aa9..d867734 100644
--- a/_Main/BL/Type_LocalColumn/Function_CalcDate.qbl
+++ b/_Main/BL/Type_LocalColumn/Function_CalcDate.qbl
@@ -6,7 +6,7 @@
[*
// rislai Jun-28-2024 (created)
if( not this.IsAttrbuteColumn() ){
- names := this.Name().Tokenize( "/" );
+ names := this.CustomName().Tokenize( "/" );
this.Date( ifexpr( this.CustomDate() <> Date::MinDate(),this.CustomDate(),guard( Date::Construct( [Number]names.Element( 0 ),[Number]names.Element( 1 ),[Number]names.Element( 2 )),Date::MinDate() )));
}
*]
diff --git a/_Main/BL/Type_LocalColumn/Function_CalcName.qbl b/_Main/BL/Type_LocalColumn/Function_CalcName.qbl
new file mode 100644
index 0000000..4f0ca88
--- /dev/null
+++ b/_Main/BL/Type_LocalColumn/Function_CalcName.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcName
+{
+ TextBody:
+ [*
+ // Akari Oct-16-2024 (created)
+
+ value := ifexpr( this.CustomName() <> "", this.CustomName(),this.Date().Format( "Y/M2/D2"))
+
+ this.Name( value );
+ *]
+}
diff --git a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl
index 10e8056..9fd7313 100644
--- a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl
+++ b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_Create.qbl
@@ -39,7 +39,6 @@
columnIndex := guard( columnIndexTree.Root().Child( columnHandle ),null( NamedValue ));
if( not isnull( columnIndex )){
column := columns.Element( columnIndex.GetValueAsNumber() );
-
row.MP_Cell( relnew,MP_Cell_AnnualPlanReport,MP_Column := column ,NewSupply := pispippl.NewSupplyQuantity());
}
}
diff --git a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
index 562676c..4b76a6f 100644
--- a/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
+++ b/_Main/BL/Type_MP_Cell_AnnualPlanReport/StaticMethod_CreateFullTable.qbl
@@ -14,6 +14,11 @@
startDate := minselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
endDate := maxselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate();
+ localCells := construct( LocalCell_Defaults );
+ localCellIndexTree := NamedValueTree::Create();
+
+ localRows := construct( LocalRows );
+ localRowIndexTree := NamedValueTree::Create();
localColumns := construct( LocalColumns );
localColumnIndexTree := NamedValueTree::Create();
for( i := startDate; i <= endDate; i := i + 1 ){
@@ -35,7 +40,17 @@
localColumnIndexTree.Root().AddChild( localColumnHandle,localColumns.Size() - 1 );
}
traverse( tables,Elements.MP_Row,row ){
- localRow := localTable.LocalRow( relnew,CustomName := row.Name(),ProductID := row.ProductID(),StockingPointID := row.StockingPointID(),Index := localTable.GetRowIndexCache() );
+ localRowHandle := localRowIndexTree.GetHandle( row.ProductID() + row.StockingPointID() );
+ localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
+ localRow := null( LocalRow );
+ if( isnull( localRowIndex )){
+ localRow := localTable.LocalRow( relnew,CustomName := row.Name(),ProductID := row.ProductID(),StockingPointID := row.StockingPointID(),Index := localTable.GetRowIndexCache() );
+ localRows.Add( localRow );
+ localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
+ }else{
+ localRow := localRows.Element( localRowIndex.GetValueAsNumber() );
+ }
+
traverse( row,MP_Cell.astype( MP_Cell_AnnualPlanReport ),cell ){
localColumnHandle := localColumnIndexTree.GetHandle( cell.MP_Column().Date().AsQUILL() );
localColumnIndex := guard( localColumnIndexTree.Root().Child( localColumnHandle ),null( NamedValue ));
@@ -43,26 +58,83 @@
localColumn := localColumns.Element( localColumnIndex.GetValueAsNumber() );
localCell := localRow.LocalCell( relnew,LocalCell_Default,LocalColumn := localColumn );
localCell.RealValue( cell.NewSupply() );
+
+ localCellHandle := localCellIndexTree.GetHandle( localRow.ProductID() + localRow.StockingPointID() + localColumn.CustomDate().AsQUILL() + localColumn.TimeUnit() );
+ localCells.Add( localCell );
+ localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
}
}
}
+
+ owner := maxselect( owners,Elements,element,element.StartOfPlanning() );
+ traverse( owner,Product_MP.ProductInStockingPoint_MP,pisp_mp ){
+ pispippls := selectset( pisp_mp,ProductInStockingPointInPeriod.astype( ProductInStockingPointInPeriodPlanningLeaf ),pispippl,
+ pispippl.Period_MP().StartDate() > endDate
+ and pispippl.Period_MP().TimeUnit() = Translations::MP_GlobalParameters_Day());
+ if( pispippls.Size() <> 0 ){
+ localRowHandle := localRowIndexTree.GetHandle( pisp_mp.ProductID() + pisp_mp.StockingPointID() );
+ localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
+ localRow := null( LocalRow );
+ if( isnull( localRowIndex )){
+ localRow := localTable.LocalRow( relnew,CustomName := pisp_mp.Name(),ProductID := pisp_mp.ProductID(),StockingPointID := pisp_mp.StockingPointID(),Index := localTable.GetRowIndexCache() );
+ localRows.Add( localRow );
+ localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
+ }else{
+ localRow := localRows.Element( localRowIndex.GetValueAsNumber() );
+ }
+ traverse( pispippls,Elements,pispippl ){
+ columnHandle := localColumnIndexTree.GetHandle( pispippl.Period_MP().StartDate().AsQUILL() );
+ columnIndex := guard( localColumnIndexTree.Root().Child( columnHandle ),null( NamedValue ));
+ if( not isnull( columnIndex )){
+ column := localColumns.Element( columnIndex.GetValueAsNumber() );
+ localCell := localRow.LocalCell( relnew,LocalCell_Default,LocalColumn := column );
+ localCell.RealValue( pispippl.NewSupplyQuantity() );
+ }
+ }
+ }
+ }
+
traverse( localTable,LocalRow,row ){
traverse( localTable,LocalColumn,column,column.TimeUnit() = "Week" ){
value := sum( row,LocalCell.astype( LocalCell_Default ),cell,
cell.LocalColumn().TimeUnit() = "Day" and
cell.LocalColumn().CustomDate() >= column.CustomDate() and
cell.LocalColumn().CustomDate() < column.CustomDate().StartOfNextWeek(),cell.RealValue());
- row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
+ localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
+
+ localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
+ localCells.Add( localCell );
+ localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
}
traverse( localTable,LocalColumn,column,column.TimeUnit() = "Month" ){
value := sum( row,LocalCell.astype( LocalCell_Default ),cell,
cell.LocalColumn().TimeUnit() = "Day" and
cell.LocalColumn().CustomDate() >= column.CustomDate() and
cell.LocalColumn().CustomDate() < column.CustomDate().StartOfNextMonth(),cell.RealValue());
- row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
+ localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := value );
+
+ localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
+ localCells.Add( localCell );
+ localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
}
}
+ traverse( localTable,LocalColumn,column,column.LocalCell( relsize ) = 0 ){
+ column.Delete();
+ }
+
+ //traverse( localTable,LocalRow,row ){
+ // traverse( localTable,LocalColumn,column ){
+ // localCellHandle := localCellIndexTree.GetHandle( row.ProductID() + row.StockingPointID() + column.CustomDate().AsQUILL() + column.TimeUnit() );
+ // localCellIndex := guard( localCellIndexTree.Root().Child( localCellHandle ),null( NamedValue ));
+ // if( isnull( localCellIndex )){
+ // localCell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := 0.0 );
+ // localCells.Add( localCell );
+ // localCellIndexTree.Root().AddChild( localCellHandle,localCells.Size() - 1 );
+ // }
+ // }
+ //}
+
return localTable;
*]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def
index 35cd231..40d7bc0 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Component_pExport.def
@@ -29,7 +29,7 @@
Properties:
[
DataType: 'RecycleBin'
- FixedFilter: 'object.Name() = MP_Cell_ScheduleSummary::GetTableName()'
+ FixedFilter: 'object.Name() = MP_Cell_AnnualPlanReport::GetTableName()'
Source: 'RecycleBin'
Taborder: 0
Transformation: 'ExportXMLManager'
@@ -39,16 +39,6 @@
Properties:
[
Taborder: 1
- ]
- }
- Component bDownload id:bDownload_520
- {
- #keys: '[412672.1.111158091]'
- BaseType: 'WebButton'
- Properties:
- [
- Image: 'DOWNLOAD'
- Taborder: 2
]
}
]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_PanelAnnualPlan_dhComparisonData854_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_PanelAnnualPlan_dhComparisonData854_OnCreated.def
deleted file mode 100644
index 97b60d1..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_PanelAnnualPlan_dhComparisonData854_OnCreated.def
+++ /dev/null
@@ -1,12 +0,0 @@
-Quintiq file version 2.0
-#parent: PanelAnnualPlan/dhComparisonData854
-Response OnCreated () id:Response_PanelAnnualPlan_dhComparisonData854_OnCreated
-{
- #keys: '[412672.1.106503674]'
- CanBindMultiple: false
- DefinitionID: 'Responsedef_WebComponent_OnCreated'
- GroupServerCalls: true
- QuillAction
- {
- }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bDownload_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bDownload_OnClick.def
deleted file mode 100644
index 213451f..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bDownload_OnClick.def
+++ /dev/null
@@ -1,30 +0,0 @@
-Quintiq file version 2.0
-#parent: pExport/bDownload_520
-Response OnClick () id:Response_pExport_bDownload_OnClick
-{
- #keys: '[412672.1.111158090]'
- CanBindMultiple: false
- DefinitionID: 'Responsedef_WebButton_OnClick'
- Precondition:
- [*
- flag := true;
- feedback := "";
- if( isnull( dhXMLDataListener.Data() )){
- flag := false;
- feedback := "褰撳墠鏃犱笅杞芥暟鎹紝鐐瑰嚮瀵煎嚭鍒涘缓涓嬭浇鏁版嵁銆�"
- }
- return flag;
- *]
- QuillAction
- {
- Body:
- [*
- binaryValue := dhXMLDataListener.Data( ).Export();
-
- Application.Download( MP_Cell_ScheduleSummary::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
-
- dhXMLDataListener.Data( ).Delete();
- *]
- GroupServerCalls: false
- }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def
index 31bd86a..a1bac03 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_bExport_OnClick.def
@@ -10,7 +10,7 @@
Body:
[*
rows := selectset( dhComparisonData854.Data(),LocalRow,row,exists( dhFinelProduct.Data(),Elements,entity,entity.ID() = row.ProductID()) and exists( dhFinelStockingPoint.Data(),Elements,entity,entity.DisplayName() = row.StockingPointID()));
- columns := selectset( dhComparisonData854.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() );
+ columns := selectset( dhComparisonData854.Data(),LocalColumn,column,dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() and column.TimeUnit() = dhTimeUnit.Data());
LocalCell_Default::AsyncExport( RecycleBin,rows,columns );
//Application.Download( "浜у嚭瀵煎叆妯℃澘.xlsx",data.AsBinaryData() );
*]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_dhXMLDataListener_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_dhXMLDataListener_OnDataChanged.def
new file mode 100644
index 0000000..801f169
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormAnnualPlanReport/Response_pExport_dhXMLDataListener_OnDataChanged.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+#parent: pExport/dhXMLDataListener_801
+Response OnDataChanged () id:Response_pExport_dhXMLDataListener_OnDataChanged
+{
+ #keys: '[414996.1.140601534]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
+ QuillAction
+ {
+ Body:
+ [*
+ if( not isnull( this.Data() )){
+ binaryValue := dhXMLDataListener.Data( ).Export();
+ Application.Download( MP_Cell_AnnualPlanReport::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
+ dhXMLDataListener.Data( ).Delete();
+ }
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def
index f4c7e38..5ec0ace 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormScheduleSummaryReport/Response_PanelRibbon322_88_dhXMLDataListener_OnDataChanged.def
@@ -9,11 +9,11 @@
{
Body:
[*
- binaryValue := dhXMLDataListener.Data( ).Export();
-
- Application.Download( MP_Cell_ScheduleSummary::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
-
- dhXMLDataListener.Data( ).Delete();
+ if( not isnull( this.Data() )){
+ binaryValue := dhXMLDataListener.Data( ).Export();
+ Application.Download( MP_Cell_ScheduleSummary::GetTableName() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
+ dhXMLDataListener.Data( ).Delete();
+ }
*]
GroupServerCalls: false
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def
index 30330c3..4f5d93b 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_StandardHoursReport/Response_pOperaction_dhXMLDataListener_OnDataChanged.def
@@ -9,12 +9,16 @@
{
Body:
[*
- traverse( dhXMLDataListener.Data(),Elements,element ){
- binaryValue := element.Export();
-
- Application.Download( element.Name() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
-
- element.Delete();
+ try{
+ traverse( dhXMLDataListener.Data(),Elements,element ){
+ binaryValue := element.Export();
+ Application.Download( element.Name() + "_" + DateTime::Now().Format( "YM2D2H2mmss" ) + ".xlsx", binaryValue.AsBinaryData() );
+ element.Delete();
+ }
+ }onerror{
+ traverse( dhXMLDataListener.Data(),Elements,element ){
+ element.Delete();
+ }
}
*]
GroupServerCalls: false
--
Gitblit v1.9.3