INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1718395822424','3','','100099','2024-06-14','2024-06-15','08:00:00','12:00:00','Pendente','42','42','','-1718395822424','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1718395822424','3','','100099','2024-06-14','2024-06-14','','','','','42','30439901','-1718395830748','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1718395822424','3','','100099','2024-06-14','2024-06-14','','','','','42','30439901','-1718395861105','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395830748','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','101','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718395861105','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; UPDATE agenda_tarefa SET idPrimario = 30049 WHERE idPrimario = -1718395822424 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30049 WHERE tarefa = -1718395822424 - 42; UPDATE agenda_resposta_formulario SET tarefa = 30049 WHERE tarefa = -1718395830748 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30049 WHERE tarefa = -1718395830748 - 42; UPDATE agenda_resposta_formulario SET tarefa = 30049 WHERE tarefa = -1718395861105 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30049 WHERE tarefa = -1718395861105 - 42; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; 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 ; - 42; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 42; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 42; statusNaoFinalizado - 42; statusNaoFinalizado - 42; statusNaoFinalizado - 42; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; 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 ; - 42; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 42; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1718396471423','3','','100099','2024-06-14','2024-06-14','08:00:00','09:00:00','Pendente','42','42','','-1718396471423','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1718396471423','3','','100099','2024-06-14','2024-06-14','','','','','42','30439901','-1718396477276','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396477276','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; UPDATE agenda_tarefa SET idPrimario = 30050 WHERE idPrimario = -1718396471423 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30050 WHERE tarefa = -1718396471423 - 42; UPDATE agenda_resposta_formulario SET tarefa = 30051 WHERE tarefa = -1718396477276 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30051 WHERE tarefa = -1718396477276 - 42; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; 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 ; - 42; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 42; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 42; statusNaoFinalizado - 42; statusNaoFinalizado - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('30050','3','','100099','2024-06-14','2024-06-14','','','','','42','30153501','-1718396515427','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','101','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396515427','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; UPDATE agenda_resposta_formulario SET tarefa = 30052 WHERE tarefa = -1718396515427 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30052 WHERE tarefa = -1718396515427 - 42; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; 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 ; - 42; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 42; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 42; statusNaoFinalizado - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1718396585875','2','','100099','2024-06-14','2024-06-14','10:00:00','11:00:00','Pendente','42','42','','-1718396585875','','') - 42; UPDATE agenda_tarefa SET idPrimario = 30053 WHERE idPrimario = -1718396585875 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30053 WHERE tarefa = -1718396585875 - 42; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; 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 ; - 42; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 42; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 42; statusNaoFinalizado - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('30053','2','','100099','2024-06-14','2024-06-14','','','','','42','30439901','-1718396658769','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396658769','416','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396658769','417','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396658769','418','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396658769','419','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; UPDATE agenda_resposta_formulario SET tarefa = 30054 WHERE tarefa = -1718396658769 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30054 WHERE tarefa = -1718396658769 - 42; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; 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 ; - 42; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 42; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 42; statusNaoFinalizado - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1718396815444','4','','100097','2024-06-14','2024-06-13','13:00:00','14:00:00','Pendente','42','42','','-1718396815444','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1718396815444','4','','100097','2024-06-14','2024-06-14','','','','','42','31195601','-1718396823248','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','423','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','424','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','425','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','426','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','427','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','404','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','428','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','429','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','430','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','431','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','432','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','433','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','434','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','435','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','436','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1718396823248','437','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; UPDATE agenda_tarefa SET idPrimario = 30055 WHERE idPrimario = -1718396815444 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30055 WHERE tarefa = -1718396815444 - 42; UPDATE agenda_resposta_formulario SET tarefa = 30056 WHERE tarefa = -1718396823248 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30056 WHERE tarefa = -1718396823248 - 42; update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 42; 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 ; - 42; update agenda_tarefa set idPrimario = id where idPrimario = idOriginal; - 42; update agenda_resposta_desenvolvimento_equipe aa set aa.tarefaAgendada = 1 where aa.tarefaAgendada is null; - 42; statusNaoFinalizado - 42; statusNaoFinalizado - 42;