logger.info("Audit Report capture process start")
for clientid in clients:
files = xmlgenops.loadFileslist(clientid, os.path.join(filepath, clientid , 'Outgoing'), 'xml')
totalFiles[clientid] = len(files)
total_files += len(files)
logger.info ("Processing for client '{}'".format(clientid))
files_with_issues = 0
file_header_print = True
for filename in files:
filename = filename[1]
fullfilename = os.path.join(filepath, clientid , "Outgoing", filename)
clientcount[clientid] = clientcount[clientid] + 1 if clientcount.get(clientid) else 1
headstr = "Client:SeqNo:Filename"
datastr = "{}:{}:{}".format(clientid, clientcount[clientid], filename)
try:
xmltree = ET.parse(fullfilename)
except ET.ParseError as err:
print("xml parse error")
clienterror[clientid] = clienterror[clientid] + 1 if clienterror.get(clientid) else 1
fileswitherror.append("{}:{}".format(datastr, err))
continue
myroot = xmltree.getroot()
for i in myroot.iter('record'):
file_header_print = True
for j in i.iter():
if j.tag == 'row':
# If we encounter a row element, iterate over its children instead
for k in j.iter():
if k.tag not in ignoretags:
if file_header_print:
headstr = "{}:{}".format(headstr, k.tag)
datastr = "{}:{}".format(datastr, k.text)
else:
if j.tag not in ignoretags:
if file_header_print:
headstr = "{}:{}".format(headstr, j.tag)
datastr = "{}:{}".format(datastr, j.text)
if file_header_print:
file_header_print = False
logger.info(headstr)
logger.info(datastr)
logger.info("Audit Report capture process end")
上面的代码是我的代码的一部分,它给了我下面给出的日志报告
2023-03-13 10:13:29,957 : INFO : audreport : Audit Report : START
2023-03-13 10:13:29,973 : INFO : audreport : Database connection established
2023-03-13 10:13:29,978 : INFO : audreport : Processing for clients '['AD', 'AW', 'CC']' User: Lukmana
2023-03-13 10:13:30,116 : INFO : audreport : Loading files from 'Y:/PMT_Training/Softco_Files
2023-03-13 10:13:30,116 : INFO : audreport : Audit Report capture process start
2023-03-13 10:13:30,119 : INFO : audreport : Processing for client 'AD'
2023-03-13 10:13:30,134 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount
2023-03-13 10:13:30,134 : INFO : audreport : AD:1:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296919.xml:1020:2296919:1007173604:0000155186:HIGH PURITY PRODUCTS INC:2022-10-28:USD:21325.00:0.00:21325.00:45907133:Email:2022-11-01:INVOICE:00001:588528:00002:588528:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296919.pdf:1:45907133:65-6554:None:None:316.0000:EA:27.00:8532.00:1:45907133:65-6554:None:None:316.0000:EA:27.00:8532.00:2:45907133:65-6610:None:None:482.0000:EA:2.00:964.00:2:45907133:65-6610:None:None:482.0000:EA:2.00:964.00:3:45907133:65-6513:None:None:68.0000:EA:1.00:68.00:3:45907133:65-6513:None:None:68.0000:EA:1.00:68.00:4:45907133:65-6507:None:None:64.0000:EA:8.00:512.00:4:45907133:65-6507:None:None:64.0000:EA:8.00:512.00:5:45907133:65-6506:None:None:73.0000:EA:4.00:292.00:5:45907133:65-6506:None:None:73.0000:EA:4.00:292.00:6:45907133:65-6509M:None:None:64.0000:EA:27.00:1728.00:6:45907133:65-6509M:None:None:64.0000:EA:27.00:1728.00:7:45907133:65-6611:None:None:472.0000:EA:4.00:1888.00:7:45907133:65-6611:None:None:472.0000:EA:4.00:1888.00:8:45907133:65-6510:None:None:134.0000:EA:3.00:402.00:8:45907133:65-6510:None:None:134.0000:EA:3.00:402.00:9:45907133:65-6502:None:None:184.0000:EA:2.00:368.00:9:45907133:65-6502:None:None:184.0000:EA:2.00:368.00:10:45907133:65-6607:None:None:266.0000:EA:6.00:1596.00:10:45907133:65-6607:None:None:266.0000:EA:6.00:1596.00:11:45907133:65-6508:None:None:78.0000:EA:27.00:2106.00:11:45907133:65-6508:None:None:78.0000:EA:27.00:2106.00:12:45907133:65-6508T:None:None:2734.0000:EA:1.00:2734.00:12:45907133:65-6508T:None:None:2734.0000:EA:1.00:2734.00:13:45907133:FREIGHT CHARGES:None:None:135.0000:EA:1.00:135.00:13:45907133:FREIGHT CHARGES:None:None:135.0000:EA:1.00:135.00
2023-03-13 10:13:30,167 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount
2023-03-13 10:13:30,167 : INFO : audreport : AD:3:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296925.xml:1020:2296925:71074269:0000155186:STAUFFER GLOVE SAFETY:2022-10-27:USD:2584.72:12.90:2571.82:47007526:Email:2022-11-01:INVOICE:00001:588534:00002:588534:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296925.pdf:1:47007526:N014187:None:None:157.70:EA:15:2365.50:1:47007526:N014187:None:None:157.70:EA:15:2365.50:2:47007526:N014258:None:None:51.58:EA:4:206.32:2:47007526:N014258:None:None:51.58:EA:4:206.32
2023-03-13 10:13:30,188 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount
2023-03-13 10:13:30,188 : INFO : audreport : AD:4:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296961.xml:1010:2296961:0000007624:0000137879:CDW DIRECT LLC:2022-11-01:USD:460.42:35.68:424.74:45922117:Email:2022-11-01:INVOICE:00001:588549:00002:588549:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296961.pdf:1:45922117:997-7413-01:None:None:409.59:EA:1:409.59:1:45922117:997-7413-01:None:None:409.59:EA:1:409.59:2:45922117:SHIPPING:None:None:15.15:EA:1:15.15:2:45922117:SHIPPING:None:None:15.15:EA:1:15.15
2023-03-13 10:13:30,429 : INFO : audreport : Processing for client 'AW'
2023-03-13 10:13:30,429 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount
2023-03-13 10:13:30,429 : INFO : audreport : AW:1:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296984.xml:1010:2296984:7722074583:0000132929:VANGUARD INTL SEMICONDUCTOR CORP:2022-11-01:USD:21850.00:0.00:21850.00:45971694:Email:2022-11-01:INVOICE:00001:588572:00002:588572:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296984.pdf:1:45971694:8VL3850PXV-B0VG:None:None:874.00:EA:25:21850.00:1:45971694:8VL3850PXV-B0VG:None:None:874.00:EA:25:21850.00
2023-03-13 10:13:30,444 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount
2023-03-13 10:13:30,444 : INFO : audreport : AW:2:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296985.xml:1010:2296985:7722074586:0000132929:VANGUARD INTL SEMICONDUCTOR CORP:2022-11-01:USD:22575.00:0.00:22575.00:45968296:Email:2022-11-01:INVOICE:00001:588573:00002:588573:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296985.pdf:1:45968296:8VL8609-1XV-B1VG:None:None:903.00:EA:25:22575.00:1:45968296:8VL8609-1XV-B1VG:None:None:903.00:EA:25:22575.00
2023-03-13 10:13:30,460 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount
2023-03-13 10:13:30,622 : INFO : audreport : Processing for client 'CC'
2023-03-13 10:13:30,637 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name
2023-03-13 10:13:30,637 : INFO : audreport : CC:1:11a77bd9-ede6-4e53-942e-b9fa103d5736_1361879.xml:00040:1361879:68481161:30150461:CARGILL NV (BEL):2022-11-19:EUR:13350.40:0.00:13350.40:5188633:Email:2022-11-21:INVOICE:None:None:001:1524:None:[email protected]:None:None:None:None:11a77bd9-ede6-4e53-942e-b9fa103d5736_1361879.pdf
2023-03-13 10:13:30,653 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name
2023-03-13 10:13:30,653 : INFO : audreport : CC:2:11a77bd9-ede6-4e53-942e-b9fa103d5736_1361880.xml:00030:1361880:9160543447:30130087:DIAGEO NI:2022-11-17:GBP:32426.76:5404.46:27022.30:89095:Email:2022-11-21:INVOICE:None:None:001:1519:None:[email protected]:None:None:None:None:11a77bd9-ede6-4e53-942e-b9fa103d5736_1361880.pdf
2023-03-13 10:13:30,678 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name
2023-03-13 10:13:30,678 : INFO : audreport : CC:3:2b21abc3-2c56-46df-8e86-f6af8b17560e_1361468.xml:00040:1361468:413502322:30110395:KERRY INGREDIENTS & FLAVOURS LTD:2022-11-18:EUR:20250.00:0.00:20250.00:5191015:Email:2022-11-21:INVOICE:None:None:001:1512:Incorrect PO:[email protected]:None:None:None:None:2b21abc3-2c56-46df-8e86-f6af8b17560e_1361468.pdf
2023-03-13 10:13:30,705 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name
可以看到AD、AW、CC这几个都是客户端。我的问题很简单,当前的日志报告有每个客户端中每个文件的标题。我只想在每个客户端顶部有一个标头,但标头必须是每个客户端的最大长度或最长的标头。我的预期结果是:
Audit Report : START
2023-03-13 10:11:25,722 : INFO : audreport : Database connection established
2023-03-13 10:11:25,738 : INFO : audreport : Processing for clients '['AD', 'AW', 'CC']' User: Lukmana
2023-03-13 10:11:25,864 : INFO : audreport : Loading files from 'Y:/PMT_Training/Softco_Files
2023-03-13 10:11:25,864 : INFO : audreport : Audit Report capture process start
2023-03-13 10:11:25,864 : INFO : audreport : Processing for client 'AD'
2023-03-13 10:11:25,879 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount
2023-03-13 10:11:25,879 : INFO : audreport : AD:1:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296919.xml:1020:2296919:1007173604:0000155186:HIGH PURITY PRODUCTS INC:2022-10-28:USD:21325.00:0.00:21325.00:45907133:Email:2022-11-01:INVOICE:00001:588528:00002:588528:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296919.pdf:1:45907133:65-6554:None:None:316.0000:EA:27.00:8532.00:2:45907133:65-6610:None:None:482.0000:EA:2.00:964.00:3:45907133:65-6513:None:None:68.0000:EA:1.00:68.00:4:45907133:65-6507:None:None:64.0000:EA:8.00:512.00:5:45907133:65-6506:None:None:73.0000:EA:4.00:292.00:6:45907133:65-6509M:None:None:64.0000:EA:27.00:1728.00:7:45907133:65-6611:None:None:472.0000:EA:4.00:1888.00:8:45907133:65-6510:None:None:134.0000:EA:3.00:402.00:9:45907133:65-6502:None:None:184.0000:EA:2.00:368.00:10:45907133:65-6607:None:None:266.0000:EA:6.00:1596.00:11:45907133:65-6508:None:None:78.0000:EA:27.00:2106.00:12:45907133:65-6508T:None:None:2734.0000:EA:1.00:2734.00:13:45907133:FREIGHT CHARGES:None:None:135.0000:EA:1.00:135.00
2023-03-13 10:11:25,915 : INFO : audreport : AD:3:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296925.xml:1020:2296925:71074269:0000155186:STAUFFER GLOVE SAFETY:2022-10-27:USD:2584.72:12.90:2571.82:47007526:Email:2022-11-01:INVOICE:00001:588534:00002:588534:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296925.pdf:1:47007526:N014187:None:None:157.70:EA:15:2365.50:2:47007526:N014258:None:None:51.58:EA:4:206.32
2023-03-13 10:11:25,930 : INFO : audreport : AD:4:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296961.xml:1010:2296961:0000007624:0000137879:CDW DIRECT LLC:2022-11-01:USD:460.42:35.68:424.74:45922117:Email:2022-11-01:INVOICE:00001:588549:00002:588549:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296961.pdf:1:45922117:997-7413-01:None:None:409.59:EA:1:409.59:2:45922117:SHIPPING:None:None:15.15:EA:1:15.15
2023-03-13 10:11:25,948 : INFO : audreport : AD:5:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296979.xml:1010:2296979:7722074584:0000104006:VANGUARD INTL SEMICONDUCTOR CORP:2022-11-01:USD:22750.00:0.00:22750.00:45971687:Email:2022-11-01:INVOICE:00001:588567:00002:588567:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296979.pdf:1:45971687:8VL8627NQ20XV-B0VG:None:None:910.00:EA:25:22750.00
2023-03-13 10:11:26,176 : INFO : audreport : Processing for client 'AW'
2023-03-13 10:11:26,176 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount
2023-03-13 10:11:26,191 : INFO : audreport : AW:1:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296984.xml:1010:2296984:7722074583:0000132929:VANGUARD INTL SEMICONDUCTOR CORP:2022-11-01:USD:21850.00:0.00:21850.00:45971694:Email:2022-11-01:INVOICE:00001:588572:00002:588572:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296984.pdf:1:45971694:8VL3850PXV-B0VG:None:None:874.00:EA:25:21850.00
2023-03-13 10:11:26,191 : INFO : audreport : AW:2:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296985.xml:1010:2296985:7722074586:0000132929:VANGUARD INTL SEMICONDUCTOR CORP:2022-11-01:USD:22575.00:0.00:22575.00:45968296:Email:2022-11-01:INVOICE:00001:588573:00002:588573:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296985.pdf:1:45968296:8VL8609-1XV-B1VG:None:None:903.00:EA:25:22575.00
2023-03-13 10:11:26,207 : INFO : audreport : AW:3:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296986.xml:1010:2296986:7722074561:0000144983:VANGUARD INTL SEMICONDUCTOR CORP:2022-11-01:USD:22080.00:0.00:22080.00:45968294:Email:2022-11-01:INVOICE:00001:588574:00002:588574:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296986.pdf:1:45968294:8VL8301XV-B0VG:None:None:920.00:EA:24:22080.00
2023-03-13 10:11:26,223 : INFO : audreport : AW:4:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296987.xml:1010:2296987:AN2208001-4:0000147689:VANGUARD INTL SEMICONDUCTOR CORP:2022-11-01:USD:22416.00:0.00:22416.00:45968301:Email:2022-11-01:INVOICE:00001:588575:00002:588575:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296987.pdf:1:45968301:8VL8640-6NQ20XV-B0VG:None:None:934.00:EA:24:22416.00
2023-03-13 10:11:26,238 : INFO : audreport : AW:5:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296988.xml:1020:2296988:7722074555:0000144417:VANGUARD INTL SEMICONDUCTOR CORP:2022-11-01:USD:22416.00:0.00:22416.00:45968265:Email:2022-11-01:INVOICE:00001:588576:00002:588576:None:[email protected]:None:None:None:None:ADI_875a41cf-079e-4ca8-a1cc-9d945c711bf0_2296988.pdf:1:45968265:8VL8640NP20XV-B0VG:None:None:934.00:EA:24:22416.00
2023-03-13 10:11:26,363 : INFO : audreport : Processing for client 'CC'
2023-03-13 10:11:26,379 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name
2023-03-13 10:11:26,379 : INFO : audreport : CC:1:11a77bd9-ede6-4e53-942e-b9fa103d5736_1361879.xml:00040:1361879:68481161:30150461:CARGILL NV (BEL):2022-11-19:EUR:13350.40:0.00:13350.40:5188633:Email:2022-11-21:INVOICE:None:None:001:1524:None:[email protected]:None:None:None:None:11a77bd9-ede6-4e53-942e-b9fa103d5736_1361879.pdf
2023-03-13 10:11:26,394 : INFO : audreport : CC:2:11a77bd9-ede6-4e53-942e-b9fa103d5736_1361880.xml:00030:1361880:9160543447:30130087:DIAGEO NI:2022-11-17:GBP:32426.76:5404.46:27022.30:89095:Email:2022-11-21:INVOICE:None:None:001:1519:None:[email protected]:None:None:None:None:11a77bd9-ede6-4e53-942e-b9fa103d5736_1361880.pdf
2023-03-13 10:11:26,410 : INFO : audreport : CC:3:2b21abc3-2c56-46df-8e86-f6af8b17560e_1361468.xml:00040:1361468:413502322:30110395:KERRY INGREDIENTS & FLAVOURS LTD:2022-11-18:EUR:20250.00:0.00:20250.00:5191015:Email:2022-11-21:INVOICE:None:None:001:1512:Incorrect PO:[email protected]:None:None:None:None:2b21abc3-2c56-46df-8e86-f6af8b17560e_1361468.pdf
2023-03-13 10:11:26,410 : INFO : audreport : CC:4:2b21abc3-2c56-46df-8e86-f6af8b17560e_1361469.xml:00040:1361469:3070620367:30110029:BOC GASES IRELAND LTD:2022-11-17:EUR:74.04:13.84:60.20:89348:Email:2022-11-21:INVOICE:None:None:001:1509:None:[email protected]:None:None:None:None:2b21abc3-2c56-46df-8e86-f6af8b17560e_1361469.pdf
2023-03-13 10:11:26,426 : INFO : audreport : CC:5:2b21abc3-2c56-46df-8e86-f6af8b17560e_1361701.xml:00040:1361701:005652 001:30112974:Funkin Cocktails:2022-11-18:EUR:42886.80:0.00:42886.80:5194926:Email:2022-11-21:INVOICE:None:None:001:1518:Incorrect PO:[email protected]:None:None:None:None:2b21abc3-2c56-46df-8e86-f6af8b17560e_1361701.pdf
在我的预期结果中,您可以看到每个客户端都有单个标头,每个标头的最大长度在每个客户端文件中。我该怎么做?
NB:日志中的标题表示:-
2023-03-13 10:11:25,879 : INFO : audreport : Client:SeqNo:Filename:organization:case_id:invoice_number:supplier_number:supplier_name:posting_date:currency_code:gross_amount:tax_amount:net_amount:order_number:invoice_source:invoice_capture_date:document_type:data_capture_provider_code:data_capture_provider_reference:document_capture_provide_code:document_capture_provider_ref:data_capture_issue:from_email:to_email:box_number:data_captured:data_container:pdf_file_name:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount:row_number:order_number:product_code:contract_number:bill_of_lading:unit_price:unit:quantity:amount