xiaoding721
2024-10-14 527527e0692b647362616756cfef333e7d9c9ed7
_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() ) ) ){