From 72141aeb7e246c3fb227afd0077e3fb647f1c0f7 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 14 十月 2024 18:18:25 +0800
Subject: [PATCH] 换型损失设置提示不存在产品
---
_Main/BL/InfoMessages.qbl | 6 ++++--
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def | 4 ++++
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl | 4 ++--
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl | 3 ++-
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl | 3 ++-
_Main/UI/MacroPlannerWebApp/Component_FormInventorySummaryReport/Response_OnCreated.def | 4 ++++
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl | 3 ++-
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl | 10 ++++++++--
_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl | 2 +-
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl | 3 ++-
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_OnCreated.def | 4 ++++
11 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl
index fa931f1..f12c34f 100644
--- a/_Main/BL/InfoMessages.qbl
+++ b/_Main/BL/InfoMessages.qbl
@@ -174,9 +174,11 @@
{
DefaultText: 'The import ChangeLossNr is not positive number.'
}
- InfoMessage MP_ChangeLossSettingExcel_Import_ProductNoExist
+ InfoMessage MP_ChangeLossSettingExcel_Import_ProductNoExist (
+ const String productids
+ )
{
- DefaultText: 'The entered product does not exist.'
+ DefaultText: 'The entered products @productids@does not exist.'
}
InfoMessage MP_ChangeLossSettingExcel_Import_UnitNoExist
{
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
index c08efa2..69d95bd 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl
@@ -19,7 +19,8 @@
owner.CCEngineLogisticsCostReport( relflush );
cnv2 := StringToDate::StandardConverter();
cnv2.SetCustomConversion();
- cnv2.CustomFormatString( "M2/D2/Y" );
+ //cnv2.CustomFormatString( "M2/D2/Y" );
+ cnv2.CustomFormatString( "MM/dd/yyyy" );
products := construct( Product_MPs );
productcolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 );
diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
index 318e4b7..e0ffefd 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl
@@ -19,7 +19,8 @@
owner.DLEngineLogisticsCostReport( relflush );
cnv2 := StringToDate::StandardConverter();
cnv2.SetCustomConversion();
- cnv2.CustomFormatString( "M2/D2/Y" );
+ //cnv2.CustomFormatString( "M2/D2/Y" );
+ cnv2.CustomFormatString( "MM/dd/yyyy" );
products := construct( Product_MPs );
productcolumn := selectobject( source, GeneralExcelImportAndExportDataTable.GeneralExcelImportAndExportDataColumn, column, column.ColumnIndex() = 0 );
diff --git a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
index 7acf689..82ccf2c 100644
--- a/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
+++ b/_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
@@ -20,8 +20,14 @@
error( Translations::MP_ChangeLossSettingExcel_Import_PositiveInteger() );
}
//瀵煎叆浜у搧鏄惁瀛樺湪
- if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Product_MP, product, product.ID() = excel.Product1() or product.ID() = excel.Product2() ) ) ){
- error( Translations::MP_ChangeLossSettingExcel_Import_ProductNoExist() );
+ productfirsts := selectuniquevalues( macroplan, ChangeLossSettingExcel, excel, excel.Product1() );
+ productseconds := selectuniquevalues( macroplan, ChangeLossSettingExcel, excel, excel.Product2() );
+ productids := productfirsts.Union( productseconds );
+ nonproductids := selectuniquevalues( productids, Elements, e, not exists( macroplan, Product_MP, product, product.ID() = e ), e );
+ if( nonproductids.Size() > 0 ){
+ error( Translations::MP_ChangeLossSettingExcel_Import_ProductNoExist( nonproductids.Concatenate( ";" ) ) );
+ //if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Product_MP, product, product.ID() = excel.Product1() or product.ID() = excel.Product2() ) ) ){
+ // error( Translations::MP_ChangeLossSettingExcel_Import_ProductNoExist() );
}
//瀵煎叆浜х嚎鏄惁瀛樺湪
if( exists( macroplan, ChangeLossSettingExcel, excel, not exists( macroplan, Unit, unit, unit.ID() = excel.Unit() ) ) ){
diff --git a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
index ecdf492..1d2fd02 100644
--- a/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
@@ -27,11 +27,11 @@
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() );
+ 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() );
diff --git a/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl b/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
index d5681ca..310a91b 100644
--- a/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
+++ b/_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl
@@ -12,7 +12,8 @@
beforeyearday := ( yearday - Duration::Days( 1 ) ).Date();
cnv2 := StringToDate::StandardConverter();
cnv2.SetCustomConversion();
- cnv2.CustomFormatString( "M2/D2/Y" );
+ //cnv2.CustomFormatString( "M2/D2/Y" );
+ cnv2.CustomFormatString( "MM/dd/yyyy" );
traverse( this, FinancialProductionReport, report ){
//鑾峰彇瀵煎叆鐨勪骇鍝佸垪鍜屽伐鍘傚垪
productcolumn := selectobject( report, FinancialProductionColumn, column, column.Name() = 'Product' );
diff --git a/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl b/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
index 2b618a4..712aafb 100644
--- a/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
+++ b/_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl
@@ -32,7 +32,7 @@
sumrow.FinancialSalesCell( relinsert, sumcell );
}
- showcell := column.FinancialSalesCell( relnew, Value := cell.Value() );
+ showcell := column.FinancialSalesCell( relnew, Value := cell.Value(), IsUpdate := cell.IsUpdate() );
showrow.FinancialSalesCell( relinsert, showcell );
yearcell.Value( [String]( [Real]yearcell.Value() + [Real]cell.Value() ) );
sumyearcell.Value( [String]( [Real]sumyearcell.Value() + [Real]cell.Value() ) );
diff --git a/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl b/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
index 8c0cd6a..bfd3c4c 100644
--- a/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
+++ b/_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl
@@ -11,7 +11,8 @@
beforeyearday := ( yearday - Duration::Days( 1 ) ).Date();
cnv2 := StringToDate::StandardConverter();
cnv2.SetCustomConversion();
- cnv2.CustomFormatString( "M2/D2/Y" );
+ //cnv2.CustomFormatString( "M2/D2/Y" );
+ cnv2.CustomFormatString( "MM/dd/yyyy" );
traverse( this, FinancialSalesReport, report ){
productcolumn := selectobject( report, FinancialSalesColumn, column, column.Name() = 'Product' );
unitcolumn := selectobject( report, FinancialSalesColumn, column, column.Name() = 'Unit' );
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def
index 299ea3d..4ecacd9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def
@@ -15,6 +15,10 @@
ProductGeneration::Initilize( MacroPlan );
ProductPower::Initilize( MacroPlan );
ProductMLBMQB::Initilize( MacroPlan );
+ dhFactorys.Data( selectset( MacroPlan, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ) );
+ dhGenerations.Data( selectset( MacroPlan, ProductGeneration, factory, true ) );
+ dhPowers.Data( selectset( MacroPlan, ProductPower, factory, true ) );
+ dhMQBMLBs.Data( selectset( MacroPlan, ProductMLBMQB, factory, true ) );
DataHolderTable.Data( table );
*]
GroupServerCalls: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_OnCreated.def
index a705821..d01722e 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_OnCreated.def
@@ -14,6 +14,10 @@
ProductGeneration::Initilize( MacroPlan );
ProductPower::Initilize( MacroPlan );
ProductMLBMQB::Initilize( MacroPlan );
+ dhFactorys.Data( selectset( MacroPlan, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ) );
+ dhGenerations.Data( selectset( MacroPlan, ProductGeneration, factory, true ) );
+ dhPowers.Data( selectset( MacroPlan, ProductPower, factory, true ) );
+ dhMQBMLBs.Data( selectset( MacroPlan, ProductMLBMQB, factory, true ) );
DataHolderTable.Data( table );
*]
GroupServerCalls: false
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormInventorySummaryReport/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormInventorySummaryReport/Response_OnCreated.def
index b305b69..0ac636d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormInventorySummaryReport/Response_OnCreated.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormInventorySummaryReport/Response_OnCreated.def
@@ -14,6 +14,10 @@
ProductGeneration::Initilize( MacroPlan );
ProductPower::Initilize( MacroPlan );
ProductMLBMQB::Initilize( MacroPlan );
+ dhFactorys.Data( selectset( MacroPlan, Factory, factory, factory.ID() = FinancialProductionReport::GetDefaultAllUnit() ) );
+ dhGenerations.Data( selectset( MacroPlan, ProductGeneration, factory, true ) );
+ dhPowers.Data( selectset( MacroPlan, ProductPower, factory, true ) );
+ dhMQBMLBs.Data( selectset( MacroPlan, ProductMLBMQB, factory, true ) );
DataHolderTable.Data( table );
*]
GroupServerCalls: false
--
Gitblit v1.9.3