lazhen
2024-10-14 72141aeb7e246c3fb227afd0077e3fb647f1c0f7
换型损失设置提示不存在产品
已修改11个文件
44 ■■■■ 文件已修改
_Main/BL/InfoMessages.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport/StaticMethod_Import.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CCEngineLogisticsCostReport0/StaticMethod_Import.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialProductionSource/Method_AfterImport.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesReport/Method_GenerateShow.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FinancialSalesSource/Method_AfterImport.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialProductionReport/Response_OnCreated.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFinancialSalesReport/Response_OnCreated.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventorySummaryReport/Response_OnCreated.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_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
  {
_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 );
_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 );
_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() ) ) ){
_Main/BL/Type_FinancialProductionReport/Method_GenerateShow.qbl
@@ -31,7 +31,7 @@
            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() );
_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' );
_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() ) );
_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' );
_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
_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
_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