From ad81ba0fcc6ff3ca0576056bc494a110a6a691ea Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期三, 23 十月 2024 17:50:32 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev
---
_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl | 5
_Main/BL/Type_WholeShift/Method_ContinuousProductionScheduling.qbl | 76 +++++++
_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp | 77 +++++++
_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl | 5
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl | 16 -
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl | 12
_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl | 14 +
_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl | 8
_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp | 143 ++++++++++++++
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelExport_369_bRefresh_OnClick.def | 2
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl | 12
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl | 12 +
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl | 10
_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl | 21 +
_Main/BL/Type_WholeShift/Method_PostProcessing2.qbl | 3
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def | 3
_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl | 18 +
_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_MatrixEditorTable_OnUpdateValue.def | 2
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_GetDefaultName.qbl | 2
_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl | 18 +
/dev/null | 13 -
_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_MatrixEditorTable_358_OnUpdateValue.def | 2
_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl | 13 +
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReport.def | 1
_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl | 21 +
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def | 2
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl | 14 +
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def | 3
_Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl | 28 ++
_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl | 8
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl | 15 -
31 files changed, 479 insertions(+), 100 deletions(-)
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcAllCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcAllCost.qbl
deleted file mode 100644
index c23582b..0000000
--- a/_Main/BL/Type_CCEngineLogisticsCostCell/Function_CalcAllCost.qbl
+++ /dev/null
@@ -1,13 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Function CalcAllCost
-{
- Description: '璁$畻鎬昏垂鐢�'
- TextBody:
- [*
- // 鐢勫叞楦� Aug-12-2024 (created)
- value := this.EstimateTotalCost() * [Real]this.CoefficientValue();
-
- this.AllCost( value );
- *]
-}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcAllCost.qbl b/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcAllCost.qbl
deleted file mode 100644
index c23582b..0000000
--- a/_Main/BL/Type_CCEngineLogisticsCostCell0/Function_CalcAllCost.qbl
+++ /dev/null
@@ -1,13 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Function CalcAllCost
-{
- Description: '璁$畻鎬昏垂鐢�'
- TextBody:
- [*
- // 鐢勫叞楦� Aug-12-2024 (created)
- value := this.EstimateTotalCost() * [Real]this.CoefficientValue();
-
- this.AllCost( value );
- *]
-}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
index 0d48222..62befe8 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/Method_Generate.qbl
@@ -36,7 +36,7 @@
sumcell := sumrow.Initialize( column );
}
//鏄剧ず鏈堝崟鍏冩牸
- showcell := showrow.Cell( relnew, RentInCost := cell.RentInCost(), RentOutOfCost := cell.RentOutOfCost(), WerkToRentTransCost := cell.WerkToRentTransCost(), RentStorCost := cell.RentStorCost(), CoefficientValue := cell.CoefficientValue() );
+ showcell := showrow.Cell( relnew, RentInCost := cell.RentInCost(), RentOutOfCost := cell.RentOutOfCost(), WerkToRentTransCost := cell.WerkToRentTransCost(), RentStorCost := cell.RentStorCost(), CoefficientValue := cell.CoefficientValue(), AllCost := cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
column.Cell( relinsert, showcell );
//鏄剧ず骞村崟鍏冩牸
yearcell.RentInCost( cell.RentInCost() + yearcell.RentInCost() );
@@ -54,6 +54,17 @@
sumcell.WerkToRentTransCost( cell.WerkToRentTransCost() + sumcell.WerkToRentTransCost() );
sumcell.RentStorCost( cell.RentStorCost() + sumcell.RentStorCost() );
}
+ yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() );
+ }
+ }
+ Transaction::Transaction().Propagate( attribute( CCEngineLogisticsCostCell, EstimateTotalCost ) );
+ traverse( yearcolumn, Cell, cell ){
+ cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
+ }
+ traverse( sumrow, Cell, cell ){
+ cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
+ if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){
+ cell.IsUpdate( true );
}
}
*]
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
index 190be2b..e5819b2 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
@@ -10,13 +10,13 @@
TextBody:
[*
// 鐢勫叞楦� Sep-20-2024 (created)
- name := CCEngineLogisticsCostReport::GetDefaultName();
+ //name := CCEngineLogisticsCostReport::GetDefaultName();
source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
source.ReadStructure();
Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
//娓呯┖瀵煎叆涔嬪墠鐨勮〃
- owner.CCEngineLogisticsCostReport( relflush );
+ //owner.CCEngineLogisticsCostReport( relflush );
cnv2 := StringToDate::StandardConverter();
cnv2.SetCustomConversion();
//cnv2.CustomFormatString( "M2/D2/Y" );
@@ -26,9 +26,7 @@
productcolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 );
attricolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 1 );
//鐢熸垚鏂拌〃鐨勬棩鏈熷垪
- table := owner.CCEngineLogisticsCostReport( relnew, ID := name, Name := name );
- showtable := owner.CCEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
- table.GenerateColumn( owner );
+ table := CCEngineLogisticsCostReport::InitiateSearch( owner );
traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, excelrow ){
productcell := selectobject( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn() = productcolumn );
//澶勭悊鏈鍚屾鐨勪骇鍝�
@@ -77,13 +75,5 @@
}
}
}
- rows := selectsortedset( table, Row, row, row.Name() );
- i := 0;
- traverse( rows, Elements, e ){
- e.RowNr( i );
- i := i + 1;
- }
- //
- showtable.Generate( owner.CCEngineLogisticsCostSearch(), products );
*]
}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
index 572e04a..bbf9847 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Initialize.qbl
@@ -150,12 +150,12 @@
}
}
}
- rows := selectsortedset( table, Row, row, row.Name() );
- i := 0;
- traverse( rows, Elements, e ){
- e.RowNr( i );
- i := i + 1;
- }
+ //rows := selectsortedset( table, Row, row, row.Name() );
+ //i := 0;
+ //traverse( rows, Elements, e ){
+ // e.RowNr( i );
+ // i := i + 1;
+ //}
//
showtable.Generate( search, products );
*]
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
index 8ed89f7..108b822 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
@@ -45,7 +45,8 @@
, DLRentOutOfCost := cell.DLRentOutOfCost()
, WerkToDLRentTransCost := cell.WerkToDLRentTransCost()
, DLRentStorCost := cell.DLRentStorCost()
- , CoefficientValue := cell.CoefficientValue() );
+ , CoefficientValue := cell.CoefficientValue()
+ , AllCost := cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
column.Cell( relinsert, showcell );
//鏄剧ず骞村崟鍏冩牸
yearcell.CCRentInCost( cell.CCRentInCost() + yearcell.CCRentInCost() );
@@ -78,6 +79,17 @@
sumcell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + sumcell.WerkToDLRentTransCost() );
sumcell.DLRentStorCost( cell.DLRentStorCost() + sumcell.DLRentStorCost() );
}
+ yearcell.AllCost( yearcell.EstimateTotalCost() * [Real]yearcell.CoefficientValue() );
+ }
+ }
+ Transaction::Transaction().Propagate( attribute( DLEngineLogisticsCostCell, EstimateTotalCost ) );
+ traverse( yearcolumn, Cell, cell ){
+ cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
+ }
+ traverse( sumrow, Cell, cell ){
+ cell.AllCost( cell.EstimateTotalCost() * [Real]cell.CoefficientValue() );
+ if( exists( cell.Column(), Cell, acell, acell.IsUpdate() ) ){
+ cell.IsUpdate( true );
}
}
info( '-------------------------g------------end---------------------------------' );
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl
index 04d5dbc..b289258 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Download.qbl
@@ -95,6 +95,10 @@
product12cellElement := xmlDOM.CreateElement( "cell" );
product12cellElement.SetAttribute( "value", row.Name() );
productcolumnelement.AppendChild( product12cellElement );
+
+ product13cellElement := xmlDOM.CreateElement( "cell" );
+ product13cellElement.SetAttribute( "value", row.Name() );
+ productcolumnelement.AppendChild( product13cellElement );
//Attribute
//闀挎槬澶栫搴撳叆搴撹垂鐢�
ccrententercostcellElement := xmlDOM.CreateElement( "cell" );
@@ -131,6 +135,10 @@
//澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�
dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
dlrentstoragecostcellElement.SetAttribute( "value", '澶ц繛澶栫搴撲粨鍌ㄨ垂鐢�' );//DLRentStorageCost
+ attricolumnelement.AppendChild( dlrentstoragecostcellElement );
+ //澶ц繛澶栫搴撳叾浠栬垂鐢�
+ dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
+ dlrentstoragecostcellElement.SetAttribute( "value", '澶ц繛澶栫搴撳叾浠栬垂鐢�' );//DLRentStorageCost
attricolumnelement.AppendChild( dlrentstoragecostcellElement );
//棰勮鎬昏垂鐢�
estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
@@ -181,6 +189,10 @@
dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
dlrentstoragecostcellElement.SetAttribute( "value", c.DLRentStorCost().Format( 'N(Dec)' ) );
columnelement.AppendChild( dlrentstoragecostcellElement );
+ //澶ц繛澶栫搴撳叾浠栬垂鐢�
+ dlrentstoragecostcellElement := xmlDOM.CreateElement( "cell" );
+ dlrentstoragecostcellElement.SetAttribute( "value", c.DLRentOtherCost().Format( 'N(Dec)' ) );
+ columnelement.AppendChild( dlrentstoragecostcellElement );
//棰勮鎬昏垂鐢�
estimatedtotalcostcellElement := xmlDOM.CreateElement( "cell" );
estimatedtotalcostcellElement.SetAttribute( "value", c.EstimateTotalCost().Format( 'N(Dec)' ) );
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_GetDefaultName.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_GetDefaultName.qbl
index 5f29f58..257fc9c 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_GetDefaultName.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_GetDefaultName.qbl
@@ -5,6 +5,6 @@
TextBody:
[*
// 鐢勫叞楦� Jun-25-2024 (created)
- return 'CC engine logistics cost reports';
+ return 'DL engine logistics cost reports';
*]
}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
index 2726257..b6edd38 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
@@ -10,13 +10,12 @@
TextBody:
[*
// 鐢勫叞楦� Sep-20-2024 (created)
- name := CCEngineLogisticsCostReport::GetDefaultName();
+ //name := CCEngineLogisticsCostReport::GetDefaultName();
source := GeneralExcelImportAndExportDataSource::Upload( recycle, binaryValue, OS::TempPath() + "template.xlsx" );
source.ReadStructure();
Transaction::Transaction().Propagate( attribute( GeneralExcelImportAndExportDataColumn, ColumnIndex ) );
//娓呯┖瀵煎叆涔嬪墠鐨勮〃
- owner.DLEngineLogisticsCostReport( relflush );
cnv2 := StringToDate::StandardConverter();
cnv2.SetCustomConversion();
//cnv2.CustomFormatString( "M2/D2/Y" );
@@ -26,9 +25,7 @@
productcolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 );
attricolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 1 );
//鐢熸垚鏂拌〃鐨勬棩鏈熷垪
- table := owner.DLEngineLogisticsCostReport( relnew, ID := name, Name := name );
- showtable := owner.DLEngineLogisticsCostReport( relnew, ID := name + 'Show', Name := name, IsShow := true );
- table.GenerateColumn( owner );
+ table := DLEngineLogisticsCostReport::InitiateSearch( owner );
traverse( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataRow, excelrow ){
productcell := selectobject( excelrow, GeneralExcelImportAndExportDataCell, excelcell, excelcell.GeneralExcelImportAndExportDataColumn() = productcolumn );
//澶勭悊鏈鍚屾鐨勪骇鍝�
@@ -87,13 +84,5 @@
}
}
}
- rows := selectsortedset( table, Row, row, row.Name() );
- i := 0;
- traverse( rows, Elements, e ){
- e.RowNr( i );
- i := i + 1;
- }
- //
- showtable.Generate( owner.DLEngineLogisticsCostSearch(), products );
*]
}
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
index 08b0f6f..0828d4e 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_InitializeNew.qbl
@@ -220,12 +220,12 @@
}
}
- rows := selectsortedset( table, Row, row, row.Name() );
- i := 0;
- traverse( rows, Elements, e ){
- e.RowNr( i );
- i := i + 1;
- }
+ //rows := selectsortedset( table, Row, row, row.Name() );
+ //i := 0;
+ //traverse( rows, Elements, e ){
+ // e.RowNr( i );
+ // i := i + 1;
+ //}
info( '-------------------------------------end----------------------------------' );
//
showtable.Generate( search, products );
diff --git a/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl b/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
index fa38c09..d816f95 100644
--- a/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_EnginePipelineReport/Method_GenerateColumn.qbl
@@ -28,10 +28,11 @@
}
}
if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){
+ weekstartstr := ' KW';
for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){
- weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();
+ weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();//Name := weekend.Format( "M2/D2/Y" )
- this.Column( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.Column( relnew, Name := 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_GenerateShow.qbl b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
index 45ed8d4..bcccd0d 100644
--- a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
@@ -24,15 +24,15 @@
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() );
+ column := selectobject( this, FinancialProductionColumn, column, column.Name() = cell.FinancialProductionColumn().Name() and not column.IsDay() );
- sumcell := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow );
+ sumcell := selectobject( column, FinancialProductionCell, c, c.FinancialProductionRow() = sumrow );
if( isnull( sumcell ) ){
- sumcell := column.FinancialProductionCell( relnew, Quantity := 0);
+ sumcell := column.FinancialProductionCell( relnew, Quantity := 0);
sumrow.FinancialProductionCell( relinsert, sumcell );
}
- showcell := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate() );
+ showcell := column.FinancialProductionCell( relnew, Quantity := cell.Quantity(), IsUpdate := cell.IsUpdate() );
showrow.FinancialProductionCell( relinsert, showcell );
yearcell.Quantity( yearcell.Quantity() + cell.Quantity() );
sumyearcell.Quantity( sumyearcell.Quantity() + cell.Quantity() );
@@ -40,5 +40,11 @@
}
}
}
+ traverse( this, FinancialProductionColumn, column ){
+ if( exists( column, FinancialProductionCell, cell, cell.IsUpdate() ) ){
+ sumcell := selectobject( sumrow, FinancialProductionCell, sumcell, sumcell.FinancialProductionColumn() = column );
+ sumcell.IsUpdate( true );
+ }
+ }
*]
}
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
index 3d8a7dc..2188d1d 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Download.qbl
@@ -38,12 +38,21 @@
row := c.FinancialProductionRow();
//Factory
InventorySummarySource::CreateCellElement( xmlDOM, searchunitcolumn, row.Factory() );
- //Generation
- InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() );
- //Power
- InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() );
- //MLBMQBS
- InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() );
+ if( not isnull( row.Product_MP() ) ){
+ //Generation
+ InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() );
+ //Power
+ InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() );
+ //MLBMQBS
+ InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() );
+ }else{
+ //Generation
+ InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, '' );
+ //Power
+ InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, '' );
+ //MLBMQBS
+ InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, '' );
+ }
//Product
InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
//Unit
diff --git a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
index 133fb6d..678d5cc 100644
--- a/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/StaticMethod_Initialize.qbl
@@ -7,19 +7,21 @@
TextBody:
[*
// 鐢勫叞楦� Jun-24-2024 (created)
- owner.FinancialProductionSource( relflush );
+ traverse( owner, FinancialProductionSource, source, not source.IsImport() ){
+ source.Delete();
+ }
owner.FPImportData( relflush );
ccunit := FinancialProductionReport::GetDefaultCCUnit();
dlunit := FinancialProductionReport::GetDefaultDLUnit();
allunit := FinancialProductionReport::GetDefaultAllUnit();
source := owner.FinancialProductionSource( relnew, IsImport := false, Name := FinancialProductionReport::GetDefaultName() );
table := source.FinancialProductionReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
- showtable := source.FinancialProductionReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
+ 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 );
+ //search := owner.FinancialProductionSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
productids := construct( Strings );
table.GenerateColumn( owner );
@@ -38,7 +40,7 @@
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 ){
- dayperiodtime := ( pispip.Start() + Duration::Days( 1 ) ).Date();
+ dayperiodtime := pispip.Start().Date();
dayperiodname := dayperiodtime.Format( "M2/D2/Y" );
periodtime := dayperiodtime.StartOfMonth();
periodname := periodtime.Format( "M2/D2/Y" );
@@ -52,7 +54,11 @@
}
}
}
- factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
- showtable.Generate( search, factorys, productids );
+ 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_GenerateShow.qbl b/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
index 58c304f..f37bed3 100644
--- a/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
@@ -19,7 +19,7 @@
productid.Add( row.Name() );
if( productids.ContainsAll( productid ) ){
- showrow := this.FinancialSalesRow( relnew, Name := factory.Format( 'S(Len(10))' ).Concat( row.Name() ), Unit := row.Unit() );
+ 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 );
@@ -42,5 +42,11 @@
}
}
}
+ traverse( this, FinancialSalesColumn, column ){
+ if( exists( column, FinancialSalesCell, cell, cell.IsUpdate() ) ){
+ 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 36d1094..43dbe28 100644
--- a/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
@@ -25,7 +25,7 @@
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 );
+ 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 );
}
@@ -41,7 +41,7 @@
if( isnull( tablecolumn ) ){
tablecolumn := table.FinancialSalesColumn( relnew, Name := periodname, Period := yearday.Date() );
}
- unitcell := selectobject( unitrow, FinancialSalesCell, unitcell, unitcell.FinancialSalesColumn().Name() = column.Name() );
+ unitcell := selectobject( unitrow, FinancialSalesCell, unitcell, unitcell.FinancialSalesColumn() = tablecolumn );
if( isnull( unitcell ) ){
unitcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
unitrow.FinancialSalesCell( relinsert, unitcell );
@@ -51,12 +51,12 @@
previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
quantity := [Real]cell.Value() + [Real]previouscell.Value();
if( [Real]unitcell.Value() <> quantity ){
- unitcell.Value( [String]( [Number]cell.Value() ) );
+ unitcell.Value( [String]( [Number]quantity ) );
unitcell.IsUpdate( true );
}
}
}
- allcell := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn().Name() = column.Name() );
+ allcell := selectobject( allrow, FinancialSalesCell, allcell, allcell.FinancialSalesColumn() = tablecolumn );
if( isnull( unitcell ) ){
allcell := tablecolumn.FinancialSalesCell( relnew, Value := cell.Value() );
allrow.FinancialSalesCell( relinsert, allcell );
@@ -66,7 +66,7 @@
previouscell := selectobject( row, FinancialSalesCell, previouscell, previouscell.FinancialSalesColumn() = previouscolumn );
quantity := [Real]cell.Value() + [Real]previouscell.Value();
if( [Real]allcell.Value() <> quantity ){
- allcell.Value( [String]( [Number]cell.Value() ) );
+ allcell.Value( [String]( [Number]quantity ) );
allcell.IsUpdate( true );
}
}
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
index 73339a8..a0bf9ca 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_Download.qbl
@@ -38,12 +38,21 @@
row := c.FinancialSalesRow();
//Factory
InventorySummarySource::CreateCellElement( xmlDOM, searchunitcolumn, row.Factory() );
- //Generation
- InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() );
- //Power
- InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() );
- //MLBMQBS
- InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() );
+ if( not isnull( row.Product_MP() ) ){
+ //Generation
+ InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, row.Product_MP().Generation() );
+ //Power
+ InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, row.Product_MP().Power() );
+ //MLBMQBS
+ InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, row.Product_MP().MQBMLB() );
+ }else{
+ //Generation
+ InventorySummarySource::CreateCellElement( xmlDOM, generationcolumn, '' );
+ //Power
+ InventorySummarySource::CreateCellElement( xmlDOM, powercolumn, '' );
+ //MLBMQBS
+ InventorySummarySource::CreateCellElement( xmlDOM, mlbmqbcolumn, '' );
+ }
//Product
InventorySummarySource::CreateCellElement( xmlDOM, productcolumnelement, row.Name() );
//Unit
diff --git a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
index 18b51ad..f4def0f 100644
--- a/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/StaticMethod_InitializeNew.qbl
@@ -8,7 +8,9 @@
TextBody:
[*
// 鐢勫叞楦� Jun-24-2024 (created)
- owner.FinancialSalesSource( relflush );
+ traverse( owner, FinancialSalesSource, source, not source.IsImport() ){
+ source.Delete();
+ }
owner.FSImportData( relflush );
productids := construct( Strings );
allunit := FinancialSalesReport::GetDefaultAllUnit();
@@ -20,12 +22,12 @@
source := owner.FinancialSalesSource( relnew, IsImport := false, Name := FinancialSalesReport::GetDefaultName() );
table := source.FinancialSalesReport( relnew, ID := source.Name(), Name := source.Name(), IsImport := false );
- showtable := source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
+ source.FinancialSalesReport( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsImport := false, IsShow := true );
startofplanning := owner.StartOfPlanning().Date();
//startofyear := startofplanning.StartOfYear();
startofnextyear := startofplanning.StartOfNextYear();
- search := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
+ //search := owner.FinancialSalesSearch( relnew, Unit := allunit, Generation := allunit, MqbMlb := allunit, Power := allunit );
table.GenerateColumn( owner );
@@ -81,7 +83,7 @@
traverse( pisp, ProductInStockingPointInPeriod, pispip, not pispip.Period_MP().IsHistorical()
and pispip.Period_MP().StartDate() < startofnextyear
and ( pispip.DependentDemandAndSalesDemandQuantity() <> 0 or pispip.NewSupplyQuantity() <> 0 ) ){
- dayperiodtime := ( pispip.Start() + Duration::Days( 1 ) ).Date();
+ dayperiodtime := pispip.Start().Date();
dayperiodname := dayperiodtime.Format( "M2/D2/Y" );
periodtime := dayperiodtime.StartOfMonth();
periodname := periodtime.Format( "M2/D2/Y" );
@@ -131,7 +133,11 @@
// }
// }
//}
- factorys := selectset( owner, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() );
- showtable.Generate( search, factorys, productids );
+ 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 64d6ac0..c81aa32 100644
--- a/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_InventorySummaryReport/Method_GenerateColumn.qbl
@@ -30,15 +30,15 @@
}else if( timeunit = Translations::MP_GlobalParameters_Week() ){
weekstartstr := ' KW';
for( start := starttime; start <= endtime; start := start.StartOfNextWeek() ){
- weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();
+ 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 := weekend.Format( "M2/D2/Y" ).Concat( weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ) ), StartDate := start.Date(), EndaDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.InventorySummaryColumn( relnew, Name := 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() ){
- monthend := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date();
+ monthend := ( start.StartOfNextMonth() - Duration::Days( 1 ) ).Date();//monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( '鏈�' ) )
us_locale := Locale::Construct( 'en_us' );
- this.InventorySummaryColumn( relnew, Name := monthend.Format( "M2/D2/Y" ).Concat( ' ' ).Concat( monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( '鏈�' ) ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() );
+ this.InventorySummaryColumn( relnew, Name := monthend.Format( "MM", us_locale ).Concat( '/').Concat( [String]monthend.Month() ).Concat( '鏈�' ), StartDate := start.Date(), EndaDate := monthend, TimeUnit := Translations::MP_GlobalParameters_Month() );
}
}
}
diff --git a/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl b/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
index 2bac9e3..04f00b1 100644
--- a/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
+++ b/_Main/BL/Type_MachiningPipelineReport/Method_GenerateColumn.qbl
@@ -29,10 +29,11 @@
}
}
if( timeunit = 'All' or timeunit = Translations::MP_GlobalParameters_Week() ){
+ weekstartstr := ' KW';
for( start := startdate; start <= enddate; start := start.StartOfNextWeek() ){
- weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();
+ weekend := ( start.StartOfNextWeek() - Duration::Days( 1 ) ).Date();// weekend.Format( "M2/D2/Y" )
- this.Column( relnew, Name := weekend.Format( "M2/D2/Y" ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
+ this.Column( relnew, Name := weekstartstr.Concat( weekend.Week().Format( 'N(LPad0(2))' ) ), StartDate := start, EndDate := weekend, TimeUnit := Translations::MP_GlobalParameters_Week() );
}
}
}
diff --git a/_Main/BL/Type_WholeShift/Method_ContinuousProductionScheduling.qbl b/_Main/BL/Type_WholeShift/Method_ContinuousProductionScheduling.qbl
new file mode 100644
index 0000000..a430caf
--- /dev/null
+++ b/_Main/BL/Type_WholeShift/Method_ContinuousProductionScheduling.qbl
@@ -0,0 +1,76 @@
+Quintiq file version 2.0
+#parent: #root
+Method ContinuousProductionScheduling (
+ MacroPlan macroPlan,
+ UnitPeriodTimeBases uptbs
+)
+{
+ Description: '涓�鍛ㄥ唴杩炵画鎺掍骇'
+ TextBody:
+ [*
+ debuginfo( "寮�濮嬭缃繛缁帓浜�" );
+
+ // 涓�鍛ㄧ殑寮�濮嬫椂闂淬�愬惊鐜储寮曘��
+ indexStartDate := macroPlan.StartOfPlanning().Date().StartOfWeek();
+
+ needHandleUPTBs := selectsortedset( uptbs, Elements, tempUPTB, tempUPTB.StartDate().StartOfWeek() = indexStartDate, tempUPTB.StartDate() );
+
+
+ while ( needHandleUPTBs.Size() > 0 ) {
+ debuginfo( "-------------------------------------------", "姝e湪澶勭悊鐨勫懆寮�濮嬫椂闂达細", indexStartDate.Format( "Y-M2-D2" ),
+ " 姝e湪澶勭悊鐨勫懆缁撴潫鏃堕棿锛�", ( indexStartDate.StartOfNextWeek() - 1 ).Format( "Y-M2-D2" ), " 澶勭悊鐨勪釜鏁帮細", needHandleUPTBs.Size() );
+
+ // 闇�瑕佸鐞嗘爣蹇�
+ needHandleFlag := false;
+ // 绗竴娆″嚭鐜颁骇鑳芥棩鏈�
+ firstAppearCapacityDate := Date::MinDate();
+ // 绗竴娆″嚭鐜颁骇鑳芥棩鏈熴�愬鐞嗚繛缁帓浜х敤鍒般��
+ firstAppearCapacityDate1 := Date::MinDate();
+
+ // 璇嗗埆鏄惁闇�瑕佽繛缁帓浜�
+ traverse ( needHandleUPTBs, Elements, uptb ) {
+ // 缁欑涓�娆′骇鑳借祴鍊�
+ if ( firstAppearCapacityDate.IsMinInfinity() and uptb.UsedCapacity().HoursAsReal() > 0.0 ) {
+ firstAppearCapacityDate := uptb.StartDate();
+ firstAppearCapacityDate1 := uptb.StartDate();
+ }
+
+ // 鍒ゆ柇鏄惁闇�瑕佽繛缁帓浜�
+ if ( not firstAppearCapacityDate.IsMinInfinity() and firstAppearCapacityDate <> uptb.StartDate() and uptb.UsedCapacity().HoursAsReal() > 0.0 ) {
+ if ( ( firstAppearCapacityDate + 1 ) = uptb.StartDate() ) {
+ firstAppearCapacityDate := uptb.StartDate();
+ } else {
+ needHandleFlag := true;
+ }
+ }
+ }
+
+ // 澶勭悊杩炵画鎺掍骇
+ if ( needHandleFlag ) {
+ // 绱㈠紩寮�濮嬫椂闂�
+ handleIndexStartDate := firstAppearCapacityDate1 + 1;
+ // 闇�瑕佸鐞嗙殑UPTB鐨勬渶澶ф椂闂�
+ handleIndexEndDate := maxobject( needHandleUPTBs, Elements, tempUPTB, true, tempUPTB.StartDate() ).StartDate();
+
+ // debuginfo( "闇�瑕佸鐞嗙殑鍛ㄥ紑濮嬫椂闂达細", indexStartDate.Format( "Y-M2-D2" ), " 闇�瑕佸鐞嗙殑鍛ㄧ粨鏉熸椂闂达細", handleIndexEndDate.Format( "Y-M2-D2" ),
+ // " 绗竴娆″嚭鐜颁骇鑳界殑鏃ユ湡锛�", firstAppearCapacityDate1.Format( "Y-M2-D2" ) );
+ needFillUPTB := select( needHandleUPTBs, Elements, tempUPTB, tempUPTB.StartDate() = handleIndexStartDate );
+
+ while ( guard( needFillUPTB.UsedCapacity().HoursAsReal(), -1 ) <= 0.0 and handleIndexStartDate <= handleIndexEndDate ) {
+ targetUPTB := minselect( needHandleUPTBs, Elements, tempUPTB, tempUPTB.StartDate() > handleIndexStartDate and tempUPTB.UsedCapacity().HoursAsReal() > 0.0, tempUPTB.StartDate() );
+
+ // 绉诲姩鍛ㄦ湡浠诲姟
+ if ( not isnull( needFillUPTB ) and not isnull( targetUPTB ) ) {
+ this.MobileCycleTask( needFillUPTB, targetUPTB );
+ }
+
+ handleIndexStartDate := handleIndexStartDate + 1;
+ needFillUPTB := select( needHandleUPTBs, Elements, tempUPTB, tempUPTB.StartDate() = handleIndexStartDate );
+ }
+ }
+
+ indexStartDate := indexStartDate.StartOfNextWeek();
+ needHandleUPTBs := selectsortedset( uptbs, Elements, tempUPTB, tempUPTB.StartDate().StartOfWeek() = indexStartDate, tempUPTB.StartDate() );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl b/_Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl
new file mode 100644
index 0000000..91571aa
--- /dev/null
+++ b/_Main/BL/Type_WholeShift/Method_MobileCycleTask.qbl
@@ -0,0 +1,28 @@
+Quintiq file version 2.0
+#parent: #root
+Method MobileCycleTask (
+ UnitPeriodTimeBase fillUPTB,
+ UnitPeriodTimeBase targetUPTB
+)
+{
+ Description: '杩炵画鐢熶骇锛岀Щ鍔ㄤ袱涓懆鏈熶换鍔�'
+ TextBody:
+ [*
+ debuginfo( "闇�瑕佸~鍏呯殑鏃ユ湡锛�", fillUPTB.StartDate().Format( "Y-M2-D2" ), " 鐩爣琚彇鏁版棩鏈燂細", targetUPTB.StartDate().Format( "Y-M2-D2" ) );
+
+ // 鍒ゆ柇鍙敤浜ц兘鏄惁涓�鑷�
+ if ( fillUPTB.BaseAvailableCapacity().HoursAsReal() = targetUPTB.BaseAvailableCapacity().HoursAsReal() ) {
+ // 鍒犻櫎闇�瑕佸~鍏呯殑UPTB
+ PeriodTaskOperation::Delete( selectset( fillUPTB, PeriodTaskOperation, tempPTO, true ) );
+
+ traverse ( targetUPTB, PeriodTaskOperation, pto ) {
+ PeriodTaskOperation::Create( pto.Operation(), fillUPTB, pto.Quantity(), false );
+ }
+
+ // 鍒犻櫎鐩爣琚彇鏁扮殑UPTB
+ PeriodTaskOperation::Delete( selectset( targetUPTB, PeriodTaskOperation, tempPTO, true ) );
+ }
+
+ Transaction::Transaction().Propagate();
+ *]
+}
diff --git a/_Main/BL/Type_WholeShift/Method_PostProcessing2.qbl b/_Main/BL/Type_WholeShift/Method_PostProcessing2.qbl
index 90057d1..c761cbd 100644
--- a/_Main/BL/Type_WholeShift/Method_PostProcessing2.qbl
+++ b/_Main/BL/Type_WholeShift/Method_PostProcessing2.qbl
@@ -44,6 +44,9 @@
// this.A_generateRequirements( macroPlan, unit.ID() );
// Transaction::Transaction().Propagate();
// }
+
+ // 璁剧疆杩炵画鎺掍骇
+ this.ContinuousProductionScheduling( macroPlan, uptbs );
}
// 杞﹂亾鏁寸彮
diff --git a/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp b/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
index cd90a20..d9d9f08 100644
--- a/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
+++ b/_Main/Sys/Repr/Global/CCEngineLogisticsCostCell.qrp
@@ -6,36 +6,113 @@
{
AttributeKey: '[415136.0.1160240044]'
Synonym: '鎬昏垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF6666'
+ ConditionBody: 'object.IsUpdate()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation CoefficientValue
{
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 047ceef..2f5d5ae 100644
--- a/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
+++ b/_Main/Sys/Repr/Global/DLEngineLogisticsCostCell.qrp
@@ -6,66 +6,209 @@
{
AttributeKey: '[415136.0.1160164830]'
Synonym: '鎬昏垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF6666'
+ ConditionBody: 'object.IsUpdate()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation CCLongTransCost
{
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_MatrixEditorTable_358_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_MatrixEditorTable_358_OnUpdateValue.def
index 7cda122..56c7966 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_MatrixEditorTable_358_OnUpdateValue.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCCEngineLogisticsCostReport/Response_MatrixEditorTable_358_OnUpdateValue.def
@@ -24,6 +24,8 @@
tcel.WerkToRentTransCost( cell.WerkToRentTransCost() );
tcel.RentStorCost( cell.RentStorCost() );
tcel.CoefficientValue( cell.CoefficientValue() );
+ estimatetotalcost := tcel.RentInCost() + tcel.RentOutOfCost() + tcel.WerkToRentTransCost() + tcel.RentStorCost();
+ tcel.AllCost( estimatetotalcost * [Real]tcel.CoefficientValue() );
}
}
*]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_MatrixEditorTable_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_MatrixEditorTable_OnUpdateValue.def
index d14c74f..cb93775 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_MatrixEditorTable_OnUpdateValue.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDLEngineLogisticsCostReport/Response_MatrixEditorTable_OnUpdateValue.def
@@ -31,6 +31,8 @@
tcel.DLRentStorCost( cell.DLRentStorCost() );
tcel.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() );
tcel.CoefficientValue( cell.CoefficientValue() );
+ estimatetotalcost := tcel.CCRentInCost() + tcel.CCRentOutOfCost() + tcel.CCLongTransCost() + tcel.CCRentStorCost() + tcel.CCShorTransCost() + tcel.DLRentInCost() + tcel.DLRentOutOfCost() + tcel.DLRentOtherCost() + tcel.DLRentStorCost() + tcel.WerkToDLRentTransCost();
+ tcel.AllCost( estimatetotalcost * [Real]tcel.CoefficientValue() );
}
}
*]
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 e61a571..ed101ef 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
@@ -15,7 +15,7 @@
[*
FinancialProductionSource::Initialize( MacroPlan );
- table := selectobject( MacroPlan, FinancialProductionSource.FinancialProductionReport, table, not table.IsImport() and table.IsShow() );
+ 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 4c7abdd..3fed469 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_PanelOperation_ButtonProductionImport660_OnClick.def
@@ -29,8 +29,9 @@
if( not source.IsExistFutureMonthData() or
( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){
+ FinancialSalesSource::InitializeNew( MacroPlan );
source.AfterImport();
- FinancialProductionSource::InitiateSearch( MacroPlan );
+ DataHolderTable.Data( FinancialProductionSource::InitiateSearch( MacroPlan ) );
}
WebMessageBox::Success( Translations::A_VWED_Success() );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReport.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReport.def
index 5163288..39a3275 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReport.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Component_PanelFinancialSalesReport.def
@@ -10,6 +10,7 @@
]
Properties:
[
+ Orientation: 'horizontal'
Taborder: 2
]
}
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 330cc27..0308160 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelExport_bRefresh_OnClick.def
@@ -15,7 +15,7 @@
[*
FinancialSalesSource::InitializeNew( MacroPlan );
- table := selectobject( MacroPlan, FinancialSalesSource.FinancialSalesReport, table, not table.IsImport() and table.IsShow() );
+ 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 c8b312a..edc3ece 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_PanelOperation_ButtonSalesImport_OnClick.def
@@ -29,8 +29,9 @@
//濡傛灉瀛樺湪璁″垝寮�濮嬪悗鐨勬棩鏈熸暟鎹渶瑕佺偣鍑荤‘璁�
if( not source.IsExistFutureMonthData() or
( source.IsExistFutureMonthData() and WebMessageBox::Question( this, Translations::MP_FinancialProductionReport_Question(), 'Yes|No' ) = 0 ) ){
+ FinancialSalesSource::InitializeNew( MacroPlan );
source.AfterImport();
- FinancialSalesSource::InitiateSearch( MacroPlan );
+ DataHolderTable.Data( FinancialSalesSource::InitiateSearch( MacroPlan ) );
}
WebMessageBox::Success( Translations::A_VWED_Success() );
--
Gitblit v1.9.3