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; DELETE FROM agenda_tarefa WHERE idPrimario ='-1729553426139' - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1728048110413','1','','100072','2024-10-04','2024-09-27','08:00:00','12:00:00','Pendente','44','44','','-1728048110413','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1728048110413','1','','100072','2024-10-04','2024-10-04','','','','','44','31043901','-1728048127406','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1728048110413','1','','100072','2024-10-04','2024-10-04','','','','','44','31096701','-1728048133397','','') - 44; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1728048110413','1','','100072','2024-10-04','2024-10-04','','','','','44','30147601','-1728048140468','','') - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','102','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','103','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','105','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','204','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','205','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','304','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','108','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','307','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','420','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','421','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','422','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','113','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','209','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','212','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','116','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','214','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1728048127406','215','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1729553426139','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 44; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('-1728048110413','','','') - 44; UPDATE agenda_tarefa SET idPrimario = 52244 WHERE idPrimario = -1728048110413 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 52244 WHERE tarefa = -1728048110413 - 44; UPDATE agenda_resposta_formulario SET tarefa = 52245 WHERE tarefa = -1728048127406 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 52245 WHERE tarefa = -1728048127406 - 44; UPDATE agenda_resposta_formulario SET tarefa = 52246 WHERE tarefa = -1728048133397 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 52246 WHERE tarefa = -1728048133397 - 44; UPDATE agenda_resposta_formulario SET tarefa = 52247 WHERE tarefa = -1728048140468 - 44; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 52247 WHERE tarefa = -1728048140468 - 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;