请根据上述修订意见优化以下采购发票汇编导出程序的代码段，以进一步提高其运行效率和可维护性：

```python
    def select_invoice_numbers(self, invoice_type, start_date, end_date):
        '''选择的invoice类型，起始日期和结束日期，筛选出相应类型的invoice numbe列表'''
        invoice_numbers = []
        for invoice in financial_data:
            if invoice['type'] == invoice_type and \
            invoice['date'] >= start_date and \
            invoice['date'] <= end_date:
                invoice_numbers.append(invoice['invoice_number'])
        return invoice_numbers
        
    def save_to_file(self, invoice_numbers):
        '''将发票号码汇编成文件'''
        with open('invoice_numbers.txt', 'w') as file:
            for number in invoice_numbers:
                file.write(number + '\n')
    
    def process_invoices(self, invoice_type, start_date, end_date):
        '''使用上面的函数筛选发票号码，并将其保存到文件中'''
        invoice_numbers = self.select_invoice_numbers(invoice_type, start_date, end_date)
        self.save_to_file(invoice_numbers)
```
user
```python
class InvoiceProcessor:
    def select_invoice_numbers(self, invoice_type: str, start_date: str, end_date: str) -> list:
        """筛选指定类型和日期范围内的发票号码。"""
        return [
            invoice['invoice_number']
            for invoice in financial_data
            if invoice['type'] == invoice_type and start_date <= invoice['date'] <= end_date
        ]

    def save_to_file(self, invoice_numbers: list):
        """将发票号码列表写入文件。"""
        with open('invoice_numbers.txt', 'w') as file:
            file.writelines(f"{number}\n" for number in invoice_numbers)

    def process_invoices(self, invoice_type, start_date, end_date):
        """处理发票，筛选并保存到文件。"""
        invoice_numbers = self.select_invoice_numbers(invoice_type, start_date, end_date)
        self.save_to_file(invoice_numbers)
```
assistant