| | |
| | | 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() ) ) ){ |