update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; 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 ; - 111; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 111; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 111; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1749215527164','3','teste teste','851','2025-06-06','2025-06-28','08:00:00','09:00:00','Pendente','111','111','','-1749215527164','','') - 111; UPDATE agenda_tarefa SET idPrimario = 53081 WHERE idPrimario = -1749215527164 - 111; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 53081 WHERE tarefa = -1749215527164 - 111; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; 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 ; - 111; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 111; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 111; statusNaoFinalizado - 111; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('53081','3','','851','2025-06-06','2025-06-06','','','','','111','31004001','-1749215576565','','') - 111; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('53081','3','','851','2025-06-06','2025-06-06','','','','','111','20596001','-1749215589149','','') - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215576565','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215589149','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; UPDATE agenda_resposta_formulario SET tarefa = 53083 WHERE tarefa = -1749215576565 - 111; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 53083 WHERE tarefa = -1749215576565 - 111; UPDATE agenda_resposta_formulario SET tarefa = 53084 WHERE tarefa = -1749215589149 - 111; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 53084 WHERE tarefa = -1749215589149 - 111; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; 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 ; - 111; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 111; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 111; statusNaoFinalizado - 111; statusNaoFinalizado - 111; DELETE FROM agenda_tarefa WHERE idPrimario ='53081' - 111; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; 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 ; - 111; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 111; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 111; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1749215752628','3','','7019','2025-06-06','2025-06-28','08:00:00','08:00:00','Pendente','111','111','','-1749215752628','','') - 111; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1749215752628','3','','7019','2025-06-06','2025-06-06','','','','','111','32101901','-1749215755845','','') - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','115','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 111; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1749215755845','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 111; UPDATE agenda_tarefa SET idPrimario = 53085 WHERE idPrimario = -1749215752628 - 111; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 53085 WHERE tarefa = -1749215752628 - 111; UPDATE agenda_resposta_formulario SET tarefa = 53086 WHERE tarefa = -1749215755845 - 111; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 53086 WHERE tarefa = -1749215755845 - 111; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 111; 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 ; - 111; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 111; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 111; statusNaoFinalizado - 111; statusNaoFinalizado - 111;