INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1731527594271','7','inadimplĂȘncia ','44','2024-11-13','2024-11-14','08:00:00','18:00:00','Pendente','44','44','','-1731527594271','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37602','3','','100098','2024-11-18','2024-11-18','','','','','44','32054801','-1731955541012','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37602','3','','100098','2024-11-18','2024-11-18','','','','','44','30929501','-1731955559808','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('37602','3','','100098','2024-11-18','2024-11-18','','','','','44','30993303','-1731955586462','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1731955600380','2','','100098','2024-11-18','2024-11-18','17:00:00','18:00:00','Pendente','44','44','','-1731955600380','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1731955600380','2','','100098','2024-11-18','2024-11-18','','','','','44','30059401','-1731955601995','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1731955615431','4','','100098','2024-11-18','2024-11-18','17:00:00','18:00:00','Pendente','44','44','','-1731955615431','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732007612771','7','','44','2024-11-19','2024-11-21','08:00:00','18:00:00','Pendente','44','44','','-1732007612771','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732007623992','7','','44','2024-11-19','2024-11-22','08:00:00','18:00:00','Pendente','44','44','','-1732007623992','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732007654442','3','','100089','2024-11-19','2024-11-26','08:00:00','18:00:00','Pendente','44','44','','-1732007654442','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732007665897','2','','100089','2024-11-19','2024-11-26','17:00:00','18:00:00','Pendente','44','44','','-1732007665897','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732007679748','4','','100089','2024-11-19','2024-11-26','17:00:00','18:00:00','Pendente','44','44','','-1732007679748','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732007697330','3','','100089','2024-11-19','2024-11-27','08:00:00','18:00:00','Pendente','44','44','','-1732007697330','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732007719522','7','','44','2024-11-19','2024-11-28','08:00:00','18:00:00','Pendente','44','44','','-1732007719522','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1732007736353','7','','44','2024-11-19','2024-11-29','08:00:00','18:00:00','Pendente','44','44','','-1732007736353','','') - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955601995','416','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955601995','417','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955601995','418','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955601995','419','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','110','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','111','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','112','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','114','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','208','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','210','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','115','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955586462','117','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','110','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','111','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','112','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','115','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955541012','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','111','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','112','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','114','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','115','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1731955559808','117','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; UPDATE agenda_tarefa SET idPrimario = 44213 WHERE idPrimario = -1731527594271 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44213 WHERE tarefa = -1731527594271 - 44; UPDATE agenda_resposta_formulario SET tarefa = 44214 WHERE tarefa = -1731955541012 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44214 WHERE tarefa = -1731955541012 - 44; UPDATE agenda_resposta_formulario SET tarefa = 44215 WHERE tarefa = -1731955559808 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44215 WHERE tarefa = -1731955559808 - 44; UPDATE agenda_resposta_formulario SET tarefa = 44216 WHERE tarefa = -1731955586462 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44216 WHERE tarefa = -1731955586462 - 44; UPDATE agenda_tarefa SET idPrimario = 44217 WHERE idPrimario = -1731955600380 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44217 WHERE tarefa = -1731955600380 - 44; UPDATE agenda_resposta_formulario SET tarefa = 44218 WHERE tarefa = -1731955601995 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44218 WHERE tarefa = -1731955601995 - 44; UPDATE agenda_tarefa SET idPrimario = 44219 WHERE idPrimario = -1731955615431 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44219 WHERE tarefa = -1731955615431 - 44; UPDATE agenda_tarefa SET idPrimario = 44220 WHERE idPrimario = -1732007612771 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44220 WHERE tarefa = -1732007612771 - 44; UPDATE agenda_tarefa SET idPrimario = 44221 WHERE idPrimario = -1732007623992 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44221 WHERE tarefa = -1732007623992 - 44; UPDATE agenda_tarefa SET idPrimario = 44222 WHERE idPrimario = -1732007654442 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44222 WHERE tarefa = -1732007654442 - 44; UPDATE agenda_tarefa SET idPrimario = 44223 WHERE idPrimario = -1732007665897 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44223 WHERE tarefa = -1732007665897 - 44; UPDATE agenda_tarefa SET idPrimario = 44224 WHERE idPrimario = -1732007679748 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44224 WHERE tarefa = -1732007679748 - 44; UPDATE agenda_tarefa SET idPrimario = 44225 WHERE idPrimario = -1732007697330 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44225 WHERE tarefa = -1732007697330 - 44; UPDATE agenda_tarefa SET idPrimario = 44226 WHERE idPrimario = -1732007719522 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44226 WHERE tarefa = -1732007719522 - 44; UPDATE agenda_tarefa SET idPrimario = 44227 WHERE idPrimario = -1732007736353 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 44227 WHERE tarefa = -1732007736353 - 44; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 44; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 44; insert into agenda_tarefa (idPrimario, assunto, vendedor, dataCriacao, dataInsercao, data, horario_inicial, horario_final, usuario, supervisor, idOriginal, observacao, clientes, resumo, status) select date_format(now(),'%Y%m%d%H%i%s') * -1, 999, b.vendedor, curdate(), now(), a.prazo, '08:00:00', '08:00:00', b.supervisor, b.supervisor, date_format(now(),'%Y%m%d%H%i%s') * -1, a.acao, '', '', 'Pendente' FROM agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b where a.tarefaAgendada is null and a.tarefa = b.id ; - 44; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 44; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44; statusNaoFinalizado - 44;