From ed09bf3eb41fcf1b79b083ac3d959f110b7e613b Mon Sep 17 00:00:00 2001 From: lihongji <3117313295@qq.com> Date: 星期一, 14 十月 2024 18:28:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- _Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) 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() ) ) ){ -- Gitblit v1.9.3