Commit inicial funcionando.
This commit is contained in:
@@ -21,13 +21,11 @@ struct CsvHeader {
|
||||
#[derive(Debug, serde::Deserialize)]
|
||||
struct CsvEvaluation {
|
||||
APRESENTACAO: u8,
|
||||
CONFIRMACAO_DE_EMAIL: u8,
|
||||
CONFIRMACAO_DE_TELEFONE: u8,
|
||||
PROTOCOLO: u8,
|
||||
USO_DO_PORTUGUES: u8,
|
||||
AGENDAMENTO: u8,
|
||||
PACIENCIA_E_EDUCACAO: u8,
|
||||
DISPONIBILIDADE: u8,
|
||||
ESCLARECIMENTO: u8,
|
||||
ID_TALK: String,
|
||||
}
|
||||
|
||||
@@ -294,16 +292,15 @@ fn main() {
|
||||
.filter_map(|value| value.ok())
|
||||
.collect_vec();
|
||||
|
||||
if columns.len() != 8 {
|
||||
if columns.len() != 6 {
|
||||
return None;
|
||||
}
|
||||
|
||||
// Parse id talk from file_path
|
||||
// filename example is: CC - Erraoander Quintana - 515578 - 20251020515578.csv
|
||||
// filename example is: AGE - Vinicius Pereira - 515578 - 20251020515578.csv
|
||||
// id talk is the last information, so in the example is: 20251020515578
|
||||
let regex_filename =
|
||||
// regex::Regex::new(r"(FIN - )((\w+\s*)+) - (\d+) - (\d+).csv").unwrap();
|
||||
regex::Regex::new(r"FIN - (.+?) - (\d+) - (\d+)\.csv").unwrap();
|
||||
regex::Regex::new(r"AGE - (.+?) - (\d+) - (\d+)\.csv").unwrap();
|
||||
|
||||
let filename = file_path_csv
|
||||
.file_name()
|
||||
@@ -535,7 +532,7 @@ fn main() {
|
||||
let recipients = "Wilson da Conceição Oliveira <wilson.oliveira@nova.net.br>, nicolas.borges@nova.net.br";
|
||||
println!("Trying to send mail... {recipients}");
|
||||
send_mail_util::send_mail_util::send_email(
|
||||
&format!("Relatório agrupado dos atendimentos da fila do Financeiro N2 do mês {first_day_of_last_month}"),
|
||||
&format!("Relatório agrupado dos atendimentos da fila do Agendamento do mês {first_day_of_last_month}"),
|
||||
&BOT_EMAIL,
|
||||
&BOT_EMAIL_PASSWORD,
|
||||
recipients,
|
||||
|
||||
Reference in New Issue
Block a user