I need to import batches of files, analyze the data and produce a report. There are 3 types of data within these files. For each type of data there is a different layout.
Seller details
The salesperson data has the format id 001 and the line will have the following format:
001çCPFçNameçSalary
Client's data
The customer data has the format id 002 and the line will have the following format:
002çCNPJçNameçBusiness Area
Sales data
Sales data has the format id 003. Within the sales line, there is the list of items, which is surrounded by square brackets []. The line will have the following format:
003çSale IDç [Item ID-Item Quantity-Item Price] çSalesman name
Sample Data
The following is an example of the data that the system should be able to read.
001ç1234567891234çPedroç50000
001ç3245678865434çPauloç40000.99
002ç2345675434544345çJose da SilvaçRural
002ç2345675433444345çEduardo PereiraçRural
003ç10ç [1-10-100,2-30-2.50,3-40-3.10] çPedro
003ç08ç [1-34-10,2-33-1.50,3-40-0.10] çPaulo
What to do when the field values contain the delimiter (ç)?
Example:
001ç1234567891234çAssunçãoç50000
没有评论:
发表评论