From 4bb71bc32df6a2ce847b5dc1853dea732e2d0253 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期三, 23 十月 2024 17:53:19 +0800
Subject: [PATCH] 财务产量报表/销量报表导入bug
---
_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl | 2
_Main/BL/Type_MachiningPipelineReport/Method_Generate.qbl | 2
_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp | 66 -----
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def | 6
_Main/BL/Type_DLEngineLogisticsCostExcel/_ROOT_Type_DLEngineLogisticsCostExcel.qbl | 10
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelLeft.def | 1
_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl | 2
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl | 6
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl | 6
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_bRefresh_OnClick#57.def | 5
_Main/BL/Relations/Relation_DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCos.qbl | 23 +
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_Name.qbl | 7
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl | 7
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_Name.qbl | 7
_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl | 6
_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl | 2
_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp | 132 -----------
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def | 5
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl | 2
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl | 7
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl | 61 ++--
_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl | 2
_Main/BL/Type_FinancialSalesReport/Method_Generate.qbl | 4
_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_Name.qbl | 6
_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl | 7
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def | 21 +
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl | 14
_Main/BL/Type_CCEngineLogisticsCostExcel/_ROOT_Type_CCEngineLogisticsCostExcel.qbl | 10
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl | 62 ++--
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl | 15
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonImport_OnClick.def | 4
_Main/BL/Type_FinancialProductionReport/Method_Generate.qbl | 4
_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_Name.qbl | 6
_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl | 6
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def | 5
_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl | 7
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl | 42 ++
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def | 10
_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl | 50 +++-
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_ButtonImport_OnClick#130.def | 4
_Main/BL/Relations/Relation_CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCos.qbl | 23 +
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl | 6
42 files changed, 335 insertions(+), 338 deletions(-)
diff --git a/_Main/BL/Relations/Relation_CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCos.qbl b/_Main/BL/Relations/Relation_CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCos.qbl
new file mode 100644
index 0000000..0e12e2d
--- /dev/null
+++ b/_Main/BL/Relations/Relation_CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCos.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation CCEngineLogisticsCostExcel_MacroPlan_MacroPlan_CCEngineLogisticsCostExcel
+{
+ #keys: '1[415136.0.1234200117]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MacroPlan
+ {
+ #keys: '3[415136.0.1234200119][415136.0.1234200118][415136.0.1234200120]'
+ Cardinality: '0to1'
+ ObjectDefinition: CCEngineLogisticsCostExcel
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide CCEngineLogisticsCostExcel
+ {
+ #keys: '3[415136.0.1234200122][415136.0.1234200121][415136.0.1234200123]'
+ Cardinality: '0to1'
+ ObjectDefinition: MacroPlan
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCos.qbl b/_Main/BL/Relations/Relation_DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCos.qbl
new file mode 100644
index 0000000..6c61846
--- /dev/null
+++ b/_Main/BL/Relations/Relation_DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCos.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation DLEngineLogisticsCostExcel_MacroPlan_MacroPlan_DLEngineLogisticsCostExcel
+{
+ #keys: '1[415136.0.1234200080]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MacroPlan
+ {
+ #keys: '3[415136.0.1234200082][415136.0.1234200081][415136.0.1234200083]'
+ Cardinality: '0to1'
+ ObjectDefinition: DLEngineLogisticsCostExcel
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide DLEngineLogisticsCostExcel
+ {
+ #keys: '3[415136.0.1234200085][415136.0.1234200084][415136.0.1234200086]'
+ Cardinality: '0to1'
+ ObjectDefinition: MacroPlan
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl b/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl
new file mode 100644
index 0000000..1224ee6
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute FileBinaryValue
+{
+ #keys: '3[415136.0.1234200111][415136.0.1234200110][415136.0.1234200112]'
+ ValueType: BinaryValue
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_Name.qbl b/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_Name.qbl
new file mode 100644
index 0000000..233cc32
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_Name.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+ #keys: '3[415136.0.1234200105][415136.0.1234200104][415136.0.1234200106]'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl b/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl
new file mode 100644
index 0000000..c0eebab
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute UploadDateTime
+{
+ #keys: '3[415136.0.1234200108][415136.0.1234200107][415136.0.1234200109]'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_Name.qbl b/_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_Name.qbl
new file mode 100644
index 0000000..86c3d59
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_Name.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+ TargetAttribute: Name
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl b/_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl
new file mode 100644
index 0000000..8dde94e
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+ TargetAttribute: UploadDateTime
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostExcel/_ROOT_Type_CCEngineLogisticsCostExcel.qbl b/_Main/BL/Type_CCEngineLogisticsCostExcel/_ROOT_Type_CCEngineLogisticsCostExcel.qbl
new file mode 100644
index 0000000..4688bfb
--- /dev/null
+++ b/_Main/BL/Type_CCEngineLogisticsCostExcel/_ROOT_Type_CCEngineLogisticsCostExcel.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type CCEngineLogisticsCostExcel
+{
+ #keys: '5[415136.0.1234200102][415136.0.1234200100][0.0.0][415136.0.1234200101][415136.0.1234200103]'
+ BaseType: Object
+ Description: '闀挎槬鍙戝姩鏈虹墿娴佹垚鏈姤琛ㄥ鍏xcel'
+ StructuredName: 'CCEngineLogisticsCostExcels'
+}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
index e5819b2..be9c992 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
@@ -3,14 +3,13 @@
StaticMethod Import (
MacroPlan owner,
RecycleBin recycle,
- BinaryValue binaryValue,
- String filePath
+ BinaryValue binaryValue
)
{
TextBody:
[*
// 鐢勫叞楦� Sep-20-2024 (created)
- //name := CCEngineLogisticsCostReport::GetDefaultName();
+
source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
source.ReadStructure();
Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
@@ -75,5 +74,6 @@
}
}
}
+ owner.DLEngineLogisticsCostExcel( relnew, Name := CCEngineLogisticsCostReport::GetDefaultName(), FileBinaryValue := binaryValue, UploadDateTime := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ) );
*]
}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
index bbf9847..ed2c859 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -157,6 +157,6 @@
// i := i + 1;
//}
//
- showtable.Generate( search, products );
+ //showtable.Generate( search, products );
*]
}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
index b6edd38..7761078 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
@@ -3,14 +3,13 @@
StaticMethod Import (
MacroPlan owner,
RecycleBin recycle,
- BinaryValue binaryValue,
- String filePath
+ BinaryValue binaryValue
)
{
TextBody:
[*
// 鐢勫叞楦� Sep-20-2024 (created)
- //name := CCEngineLogisticsCostReport::GetDefaultName();
+
source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
source.ReadStructure();
Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
@@ -84,5 +83,6 @@
}
}
}
+ owner.DLEngineLogisticsCostExcel( relnew, Name := DLEngineLogisticsCostReport::GetDefaultName(), FileBinaryValue := binaryValue, UploadDateTime := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ) );
*]
}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
index 0828d4e..85c9da7 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
@@ -18,8 +18,8 @@
startofnextyear := startofplanning.StartOfNextYear();
table := owner.DLEngineLogisticsCostReport( relnew, ID := name, Name := name );
- showtable := owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
- search := owner.DLEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit );
+ owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
+ owner.DLEngineLogisticsCostSearch( relnew, Generation := allunit, MqbMlb := allunit, Power := allunit );
products := construct( Product_MPs );
@@ -228,6 +228,6 @@
//}
info( '-------------------------------------end----------------------------------' );
//
- showtable.Generate( search, products );
+ //showtable.Generate( search, products );
*]
}
diff --git a/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl b/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl
new file mode 100644
index 0000000..9c187ec
--- /dev/null
+++ b/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_FileBinaryValue.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute FileBinaryValue
+{
+ #keys: '3[415136.0.1234200077][415136.0.1234200076][415136.0.1234200078]'
+ ValueType: BinaryValue
+}
diff --git a/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_Name.qbl b/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_Name.qbl
new file mode 100644
index 0000000..59dcbf1
--- /dev/null
+++ b/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_Name.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+ #keys: '3[415136.0.1234200067][415136.0.1234200066][415136.0.1234200068]'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl b/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl
new file mode 100644
index 0000000..cdede41
--- /dev/null
+++ b/_Main/BL/Type_DLEngineLogisticsCostExcel/Attribute_UploadDateTime.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute UploadDateTime
+{
+ #keys: '3[415136.0.1234200073][415136.0.1234200072][415136.0.1234200074]'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_Name.qbl b/_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_Name.qbl
new file mode 100644
index 0000000..86c3d59
--- /dev/null
+++ b/_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_Name.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+ TargetAttribute: Name
+}
diff --git a/_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl b/_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl
new file mode 100644
index 0000000..8dde94e
--- /dev/null
+++ b/_Main/BL/Type_DLEngineLogisticsCostExcel/DefaultValue_UploadDateTime.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#parent: #root
+DefaultValue
+{
+ TargetAttribute: UploadDateTime
+}
diff --git a/_Main/BL/Type_DLEngineLogisticsCostExcel/_ROOT_Type_DLEngineLogisticsCostExcel.qbl b/_Main/BL/Type_DLEngineLogisticsCostExcel/_ROOT_Type_DLEngineLogisticsCostExcel.qbl
new file mode 100644
index 0000000..1271a97
--- /dev/null
+++ b/_Main/BL/Type_DLEngineLogisticsCostExcel/_ROOT_Type_DLEngineLogisticsCostExcel.qbl
@@ -0,0 +1,10 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type DLEngineLogisticsCostExcel
+{
+ #keys: '5[415136.0.1234200060][415136.0.1234200058][0.0.0][415136.0.1234200059][415136.0.1234200061]'
+ BaseType: Object
+ Description: '澶ц繛鍙戝姩鏈虹墿娴佹垚鏈姤琛ㄥ鍏xcel'
+ StructuredName: 'DLEngineLogisticsCostExcels'
+}
diff --git a/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl b/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl
index 5dfe598..5a7b2b7 100644
--- a/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl
+++ b/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl
@@ -63,7 +63,7 @@
traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){
- column := selectobject( this, Column, column, column.Name() = cell.Column().Name() and column.TimeUnit() = search.TimeUnit() );
+ column := selectobject( this, Column, column, column.StartDate() = cell.Column().StartDate() and column.TimeUnit() = search.TimeUnit() );
if( not isnull( column ) ){
diff --git a/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl b/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
index d816f95..ea96e9a 100644
--- a/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
@@ -32,7 +32,7 @@
for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){
weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//Name := weekend.Format( "M2/D2/Y" )
- this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.Column( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
}
}
}
diff --git a/_Main/BL/Type_FinancialProductionReport/Method_Generate.qbl b/_Main/BL/Type_FinancialProductionReport/Method_Generate.qbl
index b576503..5dc922a 100644
--- a/_Main/BL/Type_FinancialProductionReport/Method_Generate.qbl
+++ b/_Main/BL/Type_FinancialProductionReport/Method_Generate.qbl
@@ -12,8 +12,10 @@
table := selectobject( this, FinancialProductionSource.FinancialProductionReport, report, not report.IsShow() );
//娓呯┖涔嬪墠瀛樺偍鐨勬樉绀烘暟鎹�
this.Clear();
+ //骞存眹鎬�
+ yearcolumn := this.FinancialProductionColumn( relnew, Name := '姹囨��', Period := this.FinancialProductionSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
traverse( factorys, Elements, factory ){
- this.GenerateShow( table, productids, factory.ID() );
+ this.GenerateShow( table, yearcolumn, productids, factory.ID() );
}
rows := selectsortedset( this, FinancialProductionRow, row, row.Name() );
i := 0;
diff --git a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
index bcccd0d..683c9ad 100644
--- a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
@@ -2,6 +2,7 @@
#parent: #root
Method GenerateShow (
FinancialProductionReport table,
+ FinancialProductionColumn yearcolumn,
Strings productids,
String factory
)
@@ -9,22 +10,32 @@
TextBody:
[*
// 鐢勫叞楦� Oct-12-2024 (created)
- //骞存眹鎬�
- yearcolumn := this.FinancialProductionColumn( relnew, Name := '姹囨��', Period := this.FinancialProductionSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
+ allunit := FinancialProductionReport::GetDefaultAllUnit();
+
sumrow := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Factory := factory );
sumyearcell := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 );
sumrow.FinancialProductionCell( relinsert, sumyearcell );
- traverse( table, FinancialProductionRow, row, row.Unit() = factory ){
+ traverse( table, FinancialProductionRow, row, factory = allunit or row.Unit() = factory ){
productid := construct( Strings );
productid.Add( row.Name() );
if( productids.ContainsAll( productid ) ){
- showrow := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), Factory := factory );
- row.Product_MP().FinancialProductionRow( relinsert, showrow );
- yearcell := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 );
- showrow.FinancialProductionCell( relinsert, yearcell );
+ isupdate := false;
+ showrow := selectobject( this, FinancialProductionRow, fprow, fprow.Name() = factory.Format( 'S(Len(10))' ).Concat( row.Name() ) and fprow.Unit() = factory and factory = factory );
+ if( isnull( showrow ) ){
+ showrow := this.FinancialProductionRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := factory, Factory := factory );
+ row.Product_MP().FinancialProductionRow( relinsert, showrow );
+ }
+ yearcell := selectobject( yearcolumn, FinancialProductionCell, fpcell, fpcell.FinancialProductionRow() = showrow );
+ if( isnull( yearcell ) ){
+ yearcell := yearcolumn.FinancialProductionCell( relnew, Quantity := 0 );
+ showrow.FinancialProductionCell( relinsert, yearcell );
+ }
traverse( row, FinancialProductionCell, cell, not cell.FinancialProductionColumn().IsDay() ){
column := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() );
+ if( isnull( column ) ){
+ column := this.FinancialProductionColumn( relnew, Name := cell.FinancialProductionColumn().Name(), Period := cell.FinancialProductionColumn().Period() );
+ }
sumcell := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow );
if( isnull( sumcell ) ){
@@ -32,16 +43,27 @@
sumrow.FinancialProductionCell( relinsert, sumcell );
}
- showcell := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate() );
- showrow.FinancialProductionCell( relinsert, showcell );
+ showcell := selectobject( showrow, FinancialProductionCell, fpcell, fpcell.FinancialProductionColumn() = column );
+ if( isnull( showcell ) ){
+ showcell := column.FinancialProductionCell( relnew, Quantity := 0, IsUpdate := cell.IsUpdate() );
+ showrow.FinancialProductionCell( relinsert, showcell );
+ }
+ if( cell.IsUpdate() ){
+ isupdate := true;
+ showcell.IsUpdate( cell.IsUpdate() );
+ }
+ showcell.Quantity( showcell.Quantity() + cell.Quantity() );
yearcell.Quantity( yearcell.Quantity() + cell.Quantity() );
sumyearcell.Quantity( sumyearcell.Quantity() + cell.Quantity() );
sumcell.Quantity( sumcell.Quantity() + cell.Quantity() );
}
+ if( isupdate ){
+ yearcell.IsUpdate( isupdate );
+ }
}
}
traverse( this, FinancialProductionColumn, column ){
- if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() ) ){
+ if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() and cell.FinancialProductionRow().Factory() = factory ) ){
sumcell := selectobject( sumrow, FinancialProductionCell, sumcell, sumcell.FinancialProductionColumn() = column );
sumcell.IsUpdate( true );
}
diff --git a/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl b/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
index 8c5cef4..845846f 100644
--- a/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
@@ -5,7 +5,7 @@
TextBody:
[*
// 鐢勫叞楦� Jun-24-2024 (created)
- allunit := FinancialProductionReport::GetDefaultAllUnit();
+ //allunit := FinancialProductionReport::GetDefaultAllUnit();
//鏌ヨ闇�瑕佸鍏ョ殑鎶ヨ〃
table := selectobject( this.MacroPlan(), FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() and not table.IsShow() );
yearday := this.MacroPlan().StartOfPlanning().StartOfYear();
@@ -29,51 +29,49 @@
if( isnull( unitrow ) ){
unitrow := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := unit.Value() );
}
- allrow := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
- if( isnull( unitrow ) ){
- allrow := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := allunit );
- }
+ // allrow := selectobject( table, FinancialProductionRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
+ // if( isnull( unitrow ) ){
+ // allrow := table.FinancialProductionRow( relnew, Name := product.Value(), Unit := allunit );
+ // }
//璇诲彇姣忎竴琛岀殑鍗曞厓鏍�
- traverse( row, FinancialProductionCell, cell, cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and cnv2.Convert( cell.FinancialProductionColumn().Name() ) <> beforeyearday ){
+ traverse( row, FinancialProductionCell, cell, cell.Value() <> '0' and cell.FinancialProductionColumn() <> productcolumn and cell.FinancialProductionColumn() <> unitcolumn and cnv2.Convert( cell.FinancialProductionColumn().Name() ) <> beforeyearday ){
period := cnv2.Convert( cell.FinancialProductionColumn().Name() )
- periodname := yearday.Format( "M2/D2/Y" );
+ periodname := period.Format( "M2/D2/Y" );
+ quantity := [Real]cell.Value();
+ previouscolumn := cell.FinancialProductionColumn().PreviousColumn();
+ if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
+ previouscell := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn );
+ quantity := [Real]cell.Value() + [Real]previouscell.Value();
+ }
+ // info( '-----------------', period );
//鑾峰彇琚鍏ユ姤琛ㄧ殑鏃ユ湡鍒�
- tablecolumn := selectobject( table, FinancialProductionColumn, column, not column.IsDay() and column.Name() = periodname );
+ tablecolumn := selectobject( table, FinancialProductionColumn, column, not column.IsDay() and column.Name() = periodname );
if( isnull( tablecolumn ) ){
- tablecolumn := table.FinancialProductionColumn( relnew, Name := periodname, Period := yearday.Date() );
+ tablecolumn := table.FinancialProductionColumn( relnew, Name := periodname, Period := yearday.Date() );
}
//鑾峰彇琚鍏ユ姤琛ㄧ殑鍗曞厓鏍�
unitcell := selectobject( unitrow, FinancialProductionCell, unitcell, unitcell.FinancialProductionColumn() = tablecolumn );
+ // allcell := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = tablecolumn );
+ // if( isnull( allcell ) ){
+ // allcell := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() );
+ // allrow.FinancialProductionCell( relinsert, allcell );
+ // }else{
+ // if( allcell.Quantity() <> quantity ){
+ // allcell.Quantity( quantity );
+ // allcell.IsUpdate( true );
+ // }
+ // }
if( isnull( unitcell ) ){
unitcell := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() );
unitrow.FinancialProductionCell( relinsert, unitcell );
}else{
- previouscolumn := cell.FinancialProductionColumn().PreviousColumn();
- if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
- previouscell := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn );
- quantity := [Real]cell.Value() + [Real]previouscell.Value();
- if( unitcell.Quantity() <> quantity ){
- unitcell.Quantity( quantity );
- unitcell.IsUpdate( true );
- }
+ if( unitcell.Quantity() <> quantity ){
+ unitcell.Quantity( quantity );
+ unitcell.IsUpdate( true );
}
}
- allcell := selectobject( allrow, FinancialProductionCell, allcell, allcell.FinancialProductionColumn() = tablecolumn );
- if( isnull( unitcell ) ){
- allcell := tablecolumn.FinancialProductionCell( relnew, Quantity := [Real]cell.Value(), Value := cell.Value() );
- allrow.FinancialProductionCell( relinsert, allcell );
- }else{
- previouscolumn := cell.FinancialProductionColumn().PreviousColumn();
- if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
- previouscell := selectobject( row, FinancialProductionCell, previouscell, previouscell.FinancialProductionColumn() = previouscolumn );
- quantity := [Real]cell.Value() + [Real]previouscell.Value();
- if( unitcell.Quantity() <> quantity ){
- allcell.Quantity( [Real]cell.Value() );
- allcell.IsUpdate( true );
- }
- }
- }
+
}
}
}
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
index 678d5cc..3853c35 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -13,15 +13,12 @@
owner.FPImportData( relflush );
ccunit := FinancialProductionReport::GetDefaultCCUnit();
dlunit := FinancialProductionReport::GetDefaultDLUnit();
- allunit := FinancialProductionReport::GetDefaultAllUnit();
+ //allunit := FinancialProductionReport::GetDefaultAllUnit();
source := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() );
table := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
startofplanning := owner.StartOfPlanning().Date();
- //startofyear := startofplanning.StartOfYear();
startofnextyear := startofplanning.StartOfNextYear();
-
- //search := owner.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
productids := construct( Strings );
table.GenerateColumn( owner );
@@ -36,7 +33,7 @@
//鑾峰彇宸ュ巶琛�
factoryrow := table.GetRowByUnit( pisp.Product_MP(), ifexpr( iscc, ccunit, dlunit ) );
//鑾峰彇鍚堣琛�
- allrow := table.GetRowByUnit( pisp.Product_MP(), allunit );
+ // allrow := table.GetRowByUnit( pisp.Product_MP(), allunit );
productids.Add( pisp.ProductID() );
//褰損roduct planning鐨勬棩鏈熷尯闂村湪闇�瑕佺殑鏃ユ湡鍖洪棿鍐�
traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear and pispip.NewSupplyQuantity() <> 0 ){
@@ -49,15 +46,12 @@
column := selectobject( table, FinancialProductionColumn, column, column.Name() = periodname and column.Period() = periodtime and not column.IsDay() );
factoryrow.Initialize( daycolumn, pispip.NewSupplyQuantity() );
factoryrow.Initialize( column, pispip.NewSupplyQuantity() );
- allrow.Initialize( column, pispip.NewSupplyQuantity() );
+ // allrow.Initialize( column, pispip.NewSupplyQuantity() );
}
}
}
}
- excelsource := selectobject( owner, FinancialProductionSource, excelsource, excelsource.IsImport() );
- if( not isnull( excelsource ) ){
- excelsource.AfterImport();
- }
+
//factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
//showtable.Generate( search, factorys, productids );
*]
diff --git a/_Main/BL/Type_FinancialSalesReport/Method_Generate.qbl b/_Main/BL/Type_FinancialSalesReport/Method_Generate.qbl
index 4838b9d..19b08b0 100644
--- a/_Main/BL/Type_FinancialSalesReport/Method_Generate.qbl
+++ b/_Main/BL/Type_FinancialSalesReport/Method_Generate.qbl
@@ -12,8 +12,10 @@
table := selectobject( this, FinancialSalesSource.FinancialSalesReport, report, not report.IsShow() );
//娓呯┖涔嬪墠瀛樺偍鐨勬樉绀烘暟鎹�
this.Clear();
+ //骞存眹鎬�
+ yearcolumn := this.FinancialSalesColumn( relnew, Name := '姹囨��', Period := search.MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
traverse( factorys, Elements, factory ){
- this.GenerateShow( table, productids, factory.ID() );
+ this.GenerateShow( table, yearcolumn, productids, factory.ID() );
}
rows := selectsortedset( this, FinancialSalesRow, row, row.Name() );
i := 0;
diff --git a/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl b/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
index f37bed3..e56d045 100644
--- a/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
@@ -2,6 +2,7 @@
#parent: #root
Method GenerateShow (
FinancialSalesReport table,
+ FinancialSalesColumn yearcolumn,
Strings productids,
String factory
)
@@ -9,41 +10,62 @@
TextBody:
[*
// 鐢勫叞楦� Oct-12-2024 (created)
- //骞存眹鎬�
- yearcolumn := this.FinancialSalesColumn( relnew, Name := '姹囨��', Period := this.FinancialSalesSource().MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
- sumrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Factory := factory );
- sumyearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
+ allunit := FinancialProductionReport::GetDefaultAllUnit();
+
+ sumrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( 'SUM' ), Factory := factory );
+ sumyearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
sumrow.FinancialSalesCell( relinsert, sumyearcell );
- traverse( table, FinancialSalesRow, row, row.Unit() = factory ){
- productid := construct( Strings );
+ //error( '-----------------', productids.Size(), selectset( table, FinancialSalesRow, row, factory = allunit or row.Unit() = factory ).Size() );
+ traverse( table, FinancialSalesRow, row, factory = allunit or row.Unit() = factory ){
+ productid := construct( Strings );
productid.Add( row.Name() );
if( productids.ContainsAll( productid ) ){
- showrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit(), Factory := factory );
- row.Product_MP().FinancialSalesRow( relinsert, showrow );
- yearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
- showrow.FinancialSalesCell( relinsert, yearcell );
+ isupdate := false;
+ showrow := selectobject( this, FinancialSalesRow, fprow, fprow.Name() = factory.Format( 'S(Len(10))' ).Concat( row.Name() ) and fprow.Unit() = factory and factory = factory );
+ if( isnull( showrow ) ){
+ showrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := factory, Factory := factory );
+ row.Product_MP().FinancialSalesRow( relinsert, showrow );
+ }
+ yearcell := selectobject( yearcolumn, FinancialSalesCell, fpcell, fpcell.FinancialSalesRow() = showrow );
+ if( isnull( yearcell ) ){
+ yearcell := yearcolumn.FinancialSalesCell( relnew, Value := '0' );
+ showrow.FinancialSalesCell( relinsert, yearcell );
+ }
traverse( row, FinancialSalesCell, cell, not cell.FinancialSalesColumn().IsDay() ){
column := selectobject( this, FinancialSalesColumn, column, column.Name() = cell.FinancialSalesColumn().Name() and not column.IsDay());
-
+ if( isnull( column ) ){
+ column := this.FinancialSalesColumn( relnew, Name := cell.FinancialSalesColumn().Name(), Period := cell.FinancialSalesColumn().Period() );
+ }
sumcell := selectobject( column, FinancialSalesCell, c, c.FinancialSalesRow() = sumrow );
if( isnull( sumcell ) ){
sumcell := column.FinancialSalesCell( relnew, Value := '0' );
sumrow.FinancialSalesCell( relinsert, sumcell );
}
- showcell := column.FinancialSalesCell( relnew, Value := cell.Value(), IsUpdate := cell.IsUpdate() );
- showrow.FinancialSalesCell( relinsert, showcell );
+ showcell := selectobject( showrow, FinancialSalesCell, fpcell, fpcell.FinancialSalesColumn() = column );
+ if( isnull( showcell ) ){
+ showcell := column.FinancialSalesCell( relnew, Value := '0', IsUpdate := cell.IsUpdate() );
+ showrow.FinancialSalesCell( relinsert, showcell );
+ }
+ if( cell.IsUpdate() ){
+ isupdate := true;
+ showcell.IsUpdate( cell.IsUpdate() );
+ }
+ showcell.Value( [String]( [Real]showcell.Value() + [Real]cell.Value() ) );
yearcell.Value( [String]( [Real]yearcell.Value() + [Real]cell.Value() ) );
sumyearcell.Value( [String]( [Real]sumyearcell.Value() + [Real]cell.Value() ) );
value := [Real]cell.Value() + [Real]sumcell.Value();
sumcell.Value( [String]value );
}
+ if( isupdate ){
+ yearcell.IsUpdate( isupdate );
+ }
}
}
traverse( this, FinancialSalesColumn, column ){
- if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() ) ){
+ if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() and cell.FinancialSalesRow().Factory() = factory ) ){
sumcell := selectobject( sumrow, FinancialSalesCell, sumcell, sumcell.FinancialSalesColumn() = column );
sumcell.IsUpdate( true );
}
diff --git a/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl b/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
index 43dbe28..ba14ab4 100644
--- a/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
@@ -5,7 +5,7 @@
TextBody:
[*
// 鐢勫叞楦� Jun-24-2024 (created)
- allunit := FinancialProductionReport::GetDefaultAllUnit();
+ //allunit := FinancialProductionReport::GetDefaultAllUnit();
table := selectobject( this.MacroPlan(), FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and not table.IsShow() );
yearday := this.MacroPlan().StartOfPlanning().StartOfYear();
beforeyearday := ( yearday - Duration::Days( 1 ) ).Date();
@@ -25,52 +25,47 @@
if( isnull( unitrow ) ){
unitrow := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := unit.Value() );
}
- allrow := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
- if( isnull( unitrow ) ){
- allrow := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit );
- }
+ // allrow := selectobject( table, FinancialSalesRow, allrow, allrow.Name() = product.Value() and allrow.Unit() = allunit );
+ // if( isnull( unitrow ) ){
+ // allrow := table.FinancialSalesRow( relnew, Name := product.Value(), Unit := allunit );
+ // }
- traverse( row, FinancialSalesCell, cell, cell.FinancialSalesColumn() <> productcolumn and cell.FinancialSalesColumn() <> unitcolumn and cnv2.Convert( cell.FinancialSalesColumn().Name() ) <> beforeyearday ){
+ traverse( row, FinancialSalesCell, cell, cell.Value() <> '0' and cell.FinancialSalesColumn() <> productcolumn and cell.FinancialSalesColumn() <> unitcolumn and cnv2.Convert( cell.FinancialSalesColumn().Name() ) <> beforeyearday ){
column := cell.FinancialSalesColumn();
period := cnv2.Convert( column.Name() )
- periodname := period.Format( "M2/D2/Y" )
-
+ periodname := period.Format( "M2/D2/Y" );
+ quantity := [Real]cell.Value()
+ previouscolumn := cell.FinancialSalesColumn().PreviousColumn();
+ if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
+ previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
+ quantity := [Real]cell.Value() + [Real]previouscell.Value();
+ }
tablecolumn := construct( FinancialSalesColumn );
//鑾峰彇琚鍏ユ姤琛ㄧ殑鏃ユ湡鍒�
- tablecolumn := selectobject( table, FinancialSalesColumn, fscolumn, not fscolumn.IsDay() and fscolumn.Name() = periodname );
+ tablecolumn := selectobject( table, FinancialSalesColumn, fscolumn, not fscolumn.IsDay() and fscolumn.Name() = periodname );
if( isnull( tablecolumn ) ){
- tablecolumn := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() );
+ tablecolumn := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() );
}
unitcell := selectobject( unitrow, FinancialSalesCell, unitcell, unitcell.FinancialSalesColumn() = tablecolumn );
if( isnull( unitcell ) ){
unitcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
unitrow.FinancialSalesCell( relinsert, unitcell );
}else{
- previouscolumn := cell.FinancialSalesColumn().PreviousColumn();
- if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
- previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
- quantity := [Real]cell.Value() + [Real]previouscell.Value();
- if( [Real]unitcell.Value() <> quantity ){
- unitcell.Value( [String]( [Number]quantity ) );
- unitcell.IsUpdate( true );
- }
+ if( [Real]unitcell.Value() <> quantity ){
+ unitcell.Value( [String]( [Number]quantity ) );
+ unitcell.IsUpdate( true );
}
}
- allcell := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn );
- if( isnull( unitcell ) ){
- allcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
- allrow.FinancialSalesCell( relinsert, allcell );
- }else{
- previouscolumn := cell.FinancialSalesColumn().PreviousColumn();
- if( period = yearday.Date() and not isnull( previouscolumn ) and beforeyearday = cnv2.Convert( previouscolumn.Name() ) ){
- previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
- quantity := [Real]cell.Value() + [Real]previouscell.Value();
- if( [Real]allcell.Value() <> quantity ){
- allcell.Value( [String]( [Number]quantity ) );
- allcell.IsUpdate( true );
- }
- }
- }
+ // allcell := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn );
+ // if( isnull( allcell ) ){
+ // allcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
+ // allrow.FinancialSalesCell( relinsert, allcell );
+ // }else{
+ // if( [Real]allcell.Value() <> quantity ){
+ // allcell.Value( [String]( [Number]quantity ) );
+ // allcell.IsUpdate( true );
+ // }
+ // }
}
}
}
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
index f4def0f..1d0e66d 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
@@ -13,7 +13,7 @@
}
owner.FSImportData( relflush );
productids := construct( Strings );
- allunit := FinancialSalesReport::GetDefaultAllUnit();
+ //allunit := FinancialSalesReport::GetDefaultAllUnit();
ccunit := FinancialSalesReport::GetDefaultCCUnit();
dlunit := FinancialSalesReport::GetDefaultDLUnit();
ccsalessegment := FinancialSalesReport::GetSalesSegmentCC();
@@ -49,7 +49,7 @@
if( ( iscc and product.MQBMLB() = 'MLB' ) or ( isccrent and product.MQBMLB() = 'MQB' ) or isdl ){
//鑾峰彇鍚堣琛�
- allrow := table.GetRow( allunit, product );
+ // allrow := table.GetRow( allunit, product );
//鑾峰彇宸ュ巶琛�
factoryrow := table.GetRow( ifexpr( isdl, dlunit, ccunit ), product );
@@ -67,7 +67,7 @@
factoryrow.Initialize( column, quantity );
factoryrow.Initialize( daycolumn, quantity );
- allrow.Initialize( column, quantity );
+ // allrow.Initialize( column, quantity );
}
}
}
@@ -77,7 +77,7 @@
and exists( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical() and pispip.Period_MP().StartDate() < startofnextyear
and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ) ){//浜у搧涓篗QB
product := pisp.Product_MP();
- allrow := table.GetRow( allunit, product );
+ // allrow := table.GetRow( allunit, product );
factoryrow := table.GetRow( dlunit, product );
productids.Add( pisp.ProductID() );
traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical()
@@ -93,7 +93,7 @@
factoryrow.Initialize( column, quantity );//鍙朤otal Demand瀛楁鎸夋湀姹囨�婚渶姹傛暟閲�
factoryrow.Initialize( daycolumn, quantity );
- allrow.Initialize( column, quantity );
+ // allrow.Initialize( column, quantity );
}
}
// }
@@ -133,10 +133,7 @@
// }
// }
//}
- excelsource := selectobject( owner, FinancialSalesSource, excelsource, excelsource.IsImport() );
- if( not isnull( excelsource ) ){
- excelsource.AfterImport();
- }
+
//factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
//showtable.Generate( search, factorys, productids );
*]
diff --git a/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl b/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
index c81aa32..7a930fa 100644
--- a/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
@@ -32,7 +32,7 @@
for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){
weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//weekend.Format( "M2/D2/Y" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) )
- this.InventorySummaryColumn( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.InventorySummaryColumn( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
}
}else if( timeunit = Translations::MP_GlobalParameters_Month() ){
for( start := starttime; start <= endtime; start := start.StartOfNextMonth() ){
diff --git a/_Main/BL/Type_MachiningPipelineReport/Method_Generate.qbl b/_Main/BL/Type_MachiningPipelineReport/Method_Generate.qbl
index d6715fd..ceb56aa 100644
--- a/_Main/BL/Type_MachiningPipelineReport/Method_Generate.qbl
+++ b/_Main/BL/Type_MachiningPipelineReport/Method_Generate.qbl
@@ -18,7 +18,7 @@
showrow := this.Row( relnew, Name := row.Name(), RowNr := row.RowNr() );
traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){
- column := selectobject( this, Column, column, column.Name() = cell.Column().Name() and column.TimeUnit() = search.TimeUnit() );
+ column := selectobject( this, Column, column, column.StartDate() = cell.Column().StartDate() and column.TimeUnit() = search.TimeUnit() );
if( not isnull( column ) ){
sumcell := selectobject( column, Cell, c, c.Row() = sumrow );
diff --git a/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl b/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
index 04f00b1..9c7e917 100644
--- a/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
@@ -33,7 +33,7 @@
for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){
weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();// weekend.Format( "M2/D2/Y" )
- this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.Column( relnew, Name := weekend.Format( "M2/D2" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
}
}
}
diff --git a/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp b/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
index d9d9f08..ddb28c0 100644
--- a/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
+++ b/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
@@ -22,97 +22,31 @@
{
AttributeKey: '[415136.0.1188511346]'
Synonym: '绯绘暟'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation EstimateTotalCost
{
AttributeKey: '[415136.0.1160240036]'
Synonym: '棰勮鎬昏垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation RentInCost
{
AttributeKey: '[415136.0.1160164662]'
Synonym: '澶栫搴撳叆搴撹垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation RentOutOfCost
{
AttributeKey: '[415136.0.1160164672]'
Synonym: '澶栫搴撳嚭搴撹垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation RentStorCost
{
AttributeKey: '[415136.0.1160164707]'
Synonym: '澶栫搴撲粨鍌ㄨ垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation WerkToRentTransCost
{
AttributeKey: '[415136.0.1160240024]'
Synonym: '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
RelationRepresentation Column { RelationKey: '[415136.0.986881392]' Visibility: 'Normal' }
}
diff --git a/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp b/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
index 2f5d5ae..dff9aa5 100644
--- a/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
+++ b/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
@@ -22,193 +22,61 @@
{
AttributeKey: '[415136.0.1160164734]'
Synonym: '闀挎槬闀块�旇繍杈撹垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation CCRentInCost
{
AttributeKey: '[415136.0.1160164742]'
Synonym: '闀挎槬澶栫搴撳叆搴撹垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation CCRentOutOfCost
{
AttributeKey: '[415136.0.1160164750]'
Synonym: '闀挎槬澶栫搴撳嚭搴撹垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation CCRentStorCost
{
AttributeKey: '[415136.0.1160164771]'
Synonym: '闀挎槬澶栫搴撲粨鍌ㄨ垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation CCShorTransCost
{
AttributeKey: '[415136.0.1160164779]'
Synonym: '闀挎槬鐭�旇繍杈撹垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation CoefficientValue
{
AttributeKey: '[415136.0.1188511355]'
Synonym: '绯绘暟'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation DLRentInCost
{
AttributeKey: '[415136.0.1160164787]'
Synonym: '澶ц繛澶栫搴撳叆搴撹垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation DLRentOtherCost
{
AttributeKey: '[415136.0.1184074681]'
Synonym: '澶ц繛澶栫搴撳叾浠栬垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation DLRentOutOfCost
{
AttributeKey: '[415136.0.1160164795]'
Synonym: '澶ц繛澶栫搴撳嚭搴撹垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation DLRentStorCost
{
AttributeKey: '[415136.0.1160164806]'
Synonym: '澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation EstimateTotalCost
{
AttributeKey: '[415136.0.1160164814]'
Synonym: '棰勮鎬昏垂鐢�'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
AttributeRepresentation WerkToDLRentTransCost
{
AttributeKey: '[415136.0.1160164822]'
Synonym: '鍘傚唴鍒板绉熷簱杩愯緭璐圭敤'
- Conditional:
- [
- DataRepresentation.Conditional
- {
- BackgroundColor: '$FF6666'
- ConditionBody: 'object.IsUpdate()'
- ConversionBody: ''
- DefaultBackgroundColor: false
- InheritConversion: false
- }
- ]
}
RelationRepresentation Column { RelationKey: '[415136.0.992900194]' Visibility: 'Normal' }
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonImport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonImport_OnClick.def
index 70947b6..32b2e5e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonImport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_ButtonImport_OnClick.def
@@ -19,12 +19,12 @@
uploadJson := JSON::Parse( uploadJsonString );
Archive::VerifyTheFileName( uploadJson );
- fileName := uploadJson.Get( "name" ).GetString();
+ // fileName := uploadJson.Get( "name" ).GetString();
base64String := uploadJson.Get( "data" ).GetString();
webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
- CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData, fileName );
+ CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData );
WebMessageBox::Success( Translations::A_VWED_Success() );
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def
index cceb058..5b93647 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_PanelExport_670_bRefresh_OnClick.def
@@ -15,6 +15,12 @@
[*
CCEngineLogisticsCostReport::Initialize( MacroPlan );
+ if( not isnull( MacroPlan.DLEngineLogisticsCostExcel() ) ){
+ CCEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, MacroPlan.CCEngineLogisticsCostExcel().FileBinaryValue() );
+ }else{
+ CCEngineLogisticsCostReport::InitiateSearch( MacroPlan );
+ }
+
table := selectobject( MacroPlan, CCEngineLogisticsCostReport, table, table.IsShow() );
DataHolderTable.Data( table );
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_ButtonImport_OnClick\043130.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_ButtonImport_OnClick\043130.def"
index 7af570d..84aac1d 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_ButtonImport_OnClick\043130.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_ButtonImport_OnClick\043130.def"
@@ -19,12 +19,12 @@
uploadJson := JSON::Parse( uploadJsonString );
Archive::VerifyTheFileName( uploadJson );
- fileName := uploadJson.Get( "name" ).GetString();
+ // fileName := uploadJson.Get( "name" ).GetString();
base64String := uploadJson.Get( "data" ).GetString();
webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
- DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData, fileName );
+ DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, webFileBinaryData );
WebMessageBox::Success( Translations::A_VWED_Success() );
}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_bRefresh_OnClick\04357.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_bRefresh_OnClick\04357.def"
index 109cc6d..fec6f4c 100644
--- "a/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_bRefresh_OnClick\04357.def"
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_PanelExport_bRefresh_OnClick\04357.def"
@@ -15,6 +15,11 @@
[*
DLEngineLogisticsCostReport::InitializeNew( MacroPlan );
+ if( not isnull( MacroPlan.DLEngineLogisticsCostExcel() ) ){
+ DLEngineLogisticsCostReport::Import( MacroPlan, RecycleBin, MacroPlan.DLEngineLogisticsCostExcel().FileBinaryValue() );
+ }else{
+ DLEngineLogisticsCostReport::InitiateSearch( MacroPlan );
+ }
table := selectobject( MacroPlan, DLEngineLogisticsCostReport, table, table.IsShow() );
DataHolderTable.Data( table );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def
index ed101ef..6b29c26 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def
@@ -14,7 +14,10 @@
Body:
[*
FinancialProductionSource::Initialize( MacroPlan );
-
+ excelsource := selectobject( MacroPlan, FinancialProductionSource, excelsource, excelsource.IsImport() );
+ if( not isnull( excelsource ) ){
+ excelsource.AfterImport();
+ }
table := FinancialProductionSource::InitiateSearch( MacroPlan );
DataHolderTable.Data( table );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def
index 3fed469..bcfb3b7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def
@@ -29,9 +29,15 @@
if( not source.IsExistFutureMonthData() or
( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){
- FinancialSalesSource::InitializeNew( MacroPlan );
+ FinancialProductionSource::Initialize( MacroPlan );
source.AfterImport();
- DataHolderTable.Data( FinancialProductionSource::InitiateSearch( MacroPlan ) );
+ productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() )
+ and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() )
+ and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() );
+
+ table := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, table.IsShow() );
+ table.Generate( dhSearch.Data(), dhFactorys.Data(), productids );
+ DataHolderTable.Data( table );
}
WebMessageBox::Success( Translations::A_VWED_Success() );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelLeft.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelLeft.def
index 089941a..3b32a1c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelLeft.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelLeft.def
@@ -13,6 +13,7 @@
Properties:
[
FixedSize: true
+ MinimumColumns: 20
Taborder: 0
]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def
index 0308160..0182c4e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def
@@ -14,7 +14,10 @@
Body:
[*
FinancialSalesSource::InitializeNew( MacroPlan );
-
+ excelsource := selectobject( MacroPlan, FinancialSalesSource, excelsource, excelsource.IsImport() );
+ if( not isnull( excelsource ) ){
+ excelsource.AfterImport();
+ }
table := FinancialSalesSource::InitiateSearch( MacroPlan );//selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() );
DataHolderTable.Data( table );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def
index edc3ece..efe9b1c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def
@@ -14,24 +14,31 @@
Body:
[*
try {
- uploadJsonString := Application.GetFile();
+ uploadJsonString := Application.GetFile();
if ( uploadJsonString <> "" ) {
- uploadJson := JSON::Parse( uploadJsonString );
+ uploadJson := JSON::Parse( uploadJsonString );
Archive::VerifyTheFileName( uploadJson );
- fileName := uploadJson.Get( "name" ).GetString();
- base64String := uploadJson.Get( "data" ).GetString();
+ fileName := uploadJson.Get( "name" ).GetString();
+ base64String := uploadJson.Get( "data" ).GetString();
- webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
+ webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
- source := FinancialSalesSource::Upload( MacroPlan, webFileBinaryData, fileName );
+ source := FinancialSalesSource::Upload( MacroPlan, webFileBinaryData, fileName );
source.ReadStructure();
//濡傛灉瀛樺湪璁″垝寮�濮嬪悗鐨勬棩鏈熸暟鎹渶瑕佺偣鍑荤‘璁�
if( not source.IsExistFutureMonthData() or
( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){
FinancialSalesSource::InitializeNew( MacroPlan );
source.AfterImport();
- DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) );
+ productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() )
+ and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() )
+ and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() );
+
+ table := selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, table.IsShow() );
+ table.Generate( dhSearch.Data(), dhFactorys.Data(), productids );
+ DataHolderTable.Data( table );
+ // DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) );
}
WebMessageBox::Success( Translations::A_VWED_Success() );
--
Gitblit v1.9.3