DELETE FROM agenda_tarefa WHERE idPrimario ='-1724414639498' - 40;
INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1724414547951','3','','100082','2024-08-23','2024-08-01','08:00:00','09:00:00','Pendente','40','40','','-1724414547951','','') - 40;
INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1724414547951','3','','100082','2024-08-23','2024-08-23','','','','','40','31330801','-1724414554307','','') - 40;
INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1724414547951','3','','100082','2024-08-23','2024-08-23','','','','','40','30668101','-1724414594806','','') - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1724414554307','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40;
INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('-1724414547951','','','') - 40;
UPDATE agenda_tarefa SET idPrimario = 33547 WHERE idPrimario = -1724414547951 - 40;
UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 33547 WHERE tarefa = -1724414547951 - 40;
UPDATE agenda_resposta_formulario SET tarefa = 33548 WHERE tarefa = -1724414554307 - 40;
UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 33548 WHERE tarefa = -1724414554307 - 40;
UPDATE agenda_resposta_formulario SET tarefa = 33549 WHERE tarefa = -1724414594806 - 40;
UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 33549 WHERE tarefa = -1724414594806 - 40;
update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
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 ; - 40;
update agenda_tarefa set idPrimario = id where  idPrimario = idOriginal; - 40;
update agenda_resposta_desenvolvimento_equipe aa set    aa.tarefaAgendada = 1 where  aa.tarefaAgendada is null; - 40;
statusNaoFinalizado - 40;
statusNaoFinalizado - 40;
statusNaoFinalizado - 40;
update agenda_resposta_formulario a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
update agenda_resposta_desenvolvimento_equipe a, agenda_tarefa b set a.tarefa = b.id where a.tarefa = b.idOriginal - 40;
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 ; - 40;
update agenda_tarefa set idPrimario = id where  idPrimario = idOriginal; - 40;
update agenda_resposta_desenvolvimento_equipe aa set    aa.tarefaAgendada = 1 where  aa.tarefaAgendada is null; - 40;