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/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