INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('52512','2','','100120','2025-05-27','2025-05-27','','','','','40','31370201','-1748370903354','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('52513','3','','100120','2025-05-27','2025-05-27','','','','','40','31370201','-1748370909805','','') - 40; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('52514','4','','100120','2025-05-27','2025-05-27','','','','','40','31370201','-1748370918869','','') - 40; UPDATE agenda_tarefa SET assunto ='2', observacao = '', vendedor='100120', dataCriacao = '2025-05-27', data = '2025-05-27', horario_inicial = '08:00:00', horario_final = '08:30:00', status = 'Finalizado', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '52512' - 40; UPDATE agenda_tarefa SET assunto ='3', observacao = '', vendedor='100120', dataCriacao = '2025-05-27', data = '2025-05-27', horario_inicial = '09:00:00', horario_final = '17:00:00', status = 'Finalizado', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '52513' - 40; UPDATE agenda_tarefa SET assunto ='3', observacao = '', vendedor='100120', dataCriacao = '2025-05-27', data = '2025-05-28', horario_inicial = '08:00:00', horario_final = '17:00:00', status = 'Pendente', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '52515' - 40; UPDATE agenda_tarefa SET assunto ='4', observacao = '', vendedor='100120', dataCriacao = '2025-05-27', data = '2025-05-28', horario_inicial = '17:00:00', horario_final = '17:30:00', status = 'Pendente', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '52516' - 40; UPDATE agenda_tarefa SET assunto ='4', observacao = '', vendedor='100120', dataCriacao = '2025-05-28', data = '2025-05-29', horario_inicial = '12:00:00', horario_final = '12:30:00', status = 'Pendente', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '52517' - 40; UPDATE agenda_tarefa SET assunto ='1003', observacao = 'PELOTAS RS', vendedor='100054', dataCriacao = '2025-05-28', data = '2025-05-29', horario_inicial = '08:00:00', horario_final = '12:00:00', status = 'Pendente', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '52518' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370903354','416','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370903354','417','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370903354','418','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370903354','419','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','206','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','109','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','111','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','114','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','208','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','210','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','115','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370909805','117','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','423','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','424','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','425','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','426','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','427','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','404','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','428','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','429','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','430','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','431','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','432','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','433','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','434','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','435','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','436','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1748370918869','437','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('52514','','','') - 40; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('52512','','','') - 40; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('52513','','','') - 40; UPDATE agenda_resposta_formulario SET tarefa = 52900 WHERE tarefa = -1748370903354 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 52900 WHERE tarefa = -1748370903354 - 40; UPDATE agenda_resposta_formulario SET tarefa = 52901 WHERE tarefa = -1748370909805 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 52901 WHERE tarefa = -1748370909805 - 40; UPDATE agenda_resposta_formulario SET tarefa = 52902 WHERE tarefa = -1748370918869 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 52902 WHERE tarefa = -1748370918869 - 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; sqlCabecalho-> SELECT a.idPrimario, f.descricao, concat(b.supervisor,' - ',g.nome) supervisor, concat(b.vendedor,' - ',h.nome) vendedor, DATE_FORMAT(b.data, '%d/%m/%Y') as data, b.horario_inicial, b.horario_final, b.supervisor, b.vendedor FROM agenda_tarefa a, agenda_tarefa b left join agenda_assunto f on b.assunto = f.id left join vendedor g on b.supervisor = g.id left join vendedor h on b.vendedor = h.id, agenda_resposta_formulario c left join agenda_item d on c.item = d.id left join agenda_grupo e on d.grupo = e.id WHERE a.idPrimario = b.id AND a.id = c.tarefa AND a.idPrimario = '52512' GROUP BY a.idPrimario - 40; Binding output parameters deu certo: ( 0) - 40; FORM VENDEDOR 20 - 40; GRUPO->

Grupos:

Grupo Qtd Percentual
50 - 10 - ANALISE SITUACIONAL DO COLABORADOR 4 25.00
- 40; Respostas->

Questões:

GrupoQuestesQtdPercentual
50 - 10 - ANALISE SITUACIONAL DO COLABORADOR 416 - É C1 (MOTIVAÇÃO BAIXA / HABILIDADE BAIXA)? ESTILO DO LÍDER = DIRIGIR. 1 0.00
50 - 10 - ANALISE SITUACIONAL DO COLABORADOR 417 - É C2 (MOTIVAÇÃO ALTA / HABILIDADE BAIXA)? ESTILO DO LÍDER = GUIAR. 1 100.00
50 - 10 - ANALISE SITUACIONAL DO COLABORADOR 418 - É C3 (MOTIVAÇÃO BAIXA / HABILIDADE ALTA)? ESTILO DO LÍDER = APOIAR. 1 0.00
50 - 10 - ANALISE SITUACIONAL DO COLABORADOR 419 - É C4 (MOTIVAÇÃO ALTA / HABILIDADE ALTA)? ESTILO DO LÍDER = DELEGAR. 1 0.00
- 40; sqlCabecalho-> SELECT a.idPrimario, f.descricao, concat(b.supervisor,' - ',g.nome) supervisor, concat(b.vendedor,' - ',h.nome) vendedor, DATE_FORMAT(b.data, '%d/%m/%Y') as data, b.horario_inicial, b.horario_final, b.supervisor, b.vendedor FROM agenda_tarefa a, agenda_tarefa b left join agenda_assunto f on b.assunto = f.id left join vendedor g on b.supervisor = g.id left join vendedor h on b.vendedor = h.id, agenda_resposta_formulario c left join agenda_item d on c.item = d.id left join agenda_grupo e on d.grupo = e.id WHERE a.idPrimario = b.id AND a.id = c.tarefa AND a.idPrimario = '52513' GROUP BY a.idPrimario - 40; Binding output parameters deu certo: ( 0) - 40; FORM VENDEDOR 20 - 40; GRUPO->

Grupos:

Grupo Qtd Percentual
1 - 1 - PLANEJAR 3 100.00
2 - 2 - LEITURA DE LOJA 4 50.00
3 - 3 - EXECUTAR 1 0.00
4 - 4 - NEGOCIAR 7 71.43
5 - 5 - ANALISAR 2 100.00
- 40; Respostas->

Questões:

GrupoQuestesQtdPercentual
1 - 1 - PLANEJAR 101 - 1 - É UMA VISITA NO ROTEIRO DO DIA? 1 100.00
1 - 1 - PLANEJAR 302 - 2 - TEM AS PARCIAIS (TOPS/CAMPANHAS), ANALISOU E SABE O QUE PRECISA FAZER NESTA VISITA/CLIENTE (ITENS QUE PRECISA POSITIVAR, O QUE FALTA PARA BATER 10KG, TAREFA ANTERIOR, ETC)? 1 100.00
1 - 1 - PLANEJAR 303 - 3 - REVISOU CADASTRO (CRÉDITO) E HISTÓRICO DE COMPRA? 1 100.00
2 - 2 - LEITURA DE LOJA 106 - 5 - ANALISOU NOSSO PREÇOS VS PREÇO SUGERIDO? PRODUTOS ESTÃO PRECIFICADOS? 1 100.00
2 - 2 - LEITURA DE LOJA 107 - 6 - ANALISOU CONCORRENTES (ESPAÇO, MIX E PREÇOS)? IDENTIFICOU OPORTUNIDADES COM OLHO NA CONCORRÊNCIA? 1 0.00
2 - 2 - LEITURA DE LOJA 206 - 7 - LOJA TEM PONTO EXTRA? (ILHA/EXPOSITOR/PILHA NA ENTRADA DA LOJA/SACHE NO BALCÃO) 1 0.00
2 - 2 - LEITURA DE LOJA 305 - 4 - FEZ O LEVANTAMENTO DE ESTOQUE USANDO O HISTÓRICO DO APP DE VENDAS(PREÇO E CAMPANHA) OU A FICHA IMPRESSA? 1 100.00
3 - 3 - EXECUTAR 207 - 8 - EXECUTOU NO PONTO DE VENDA (ABASTECEU, COLOCOU MATERIAL, ORGANIZOU, ARRUMOU E/OU COLOCOU PREÇO)? (SE NÃO, CORRIJA PREÇOS DE IMEDIATO) 1 0.00
4 - 4 - NEGOCIAR 109 - 14 - FEZ UMA ABORDAGEM/ABERTURA EFICIENTE? (CORDIAL, POSITIVA, ADEQUADA AO PERFIL DESTE CLIENTE) 1 100.00
4 - 4 - NEGOCIAR 110 - 15 - APRESENTOU A PAUTA AO CLIENTE (MESMO SENDO FILIAL OU COMPRADOR AUSENTE, APRESENTE AO GESTOR DA LOJA ITENS QUE DESEJA INTRODUZIR)? 1 0.00
4 - 4 - NEGOCIAR 111 - 12 - INICIOU A VENDA POR TOP 20 DO PET ESPECIALIZADO (SE FOR FILIAL OU COMPRADOR AUSENTE, FEZ A CONTAGEM ESTOQUE TOP 20)? 1 100.00
4 - 4 - NEGOCIAR 112 - 17 - NEGOCIOU AS RUPTURAS (SE FOR FILIAL OU COMPRADOR AUSENTE, FEZ A CONTAGEM ESTOQUE E IDENTIFICOU RUPTURA)? 1 0.00
4 - 4 - NEGOCIAR 114 - 14 - NEGOCIOU A VENDA DE ALGUM ITEM QUE ESTA EM PREMIO/CAMPANHA PARA O VENDEDOR? (SE FOR FILIAL OU COMPRADOR AUSENTE, MARCAR SIM) 1 100.00
4 - 4 - NEGOCIAR 208 - 15 - CONSEGUIU REVERTER OBJEÇÃO(SE NÃO TEVE=RESPOSTA SIM)?SE NÃO CONSEGUIR REVERTER ESTE É UM TEMA PARA ABORDAR NO FEEDBACK, INCLUIR NAS TAREFA/AGENDA FUTURA. QUAL A OBJEÇÃO, COMO REVERTER, DICAS, TREINAR, ETC SE FOR FILIAL OU COMPRADOR AUSENTE MAR 1 100.00
4 - 4 - NEGOCIAR 210 - 17 - TIROU O PEDIDO? (NÃO É ORÇAMENTO! É PEDIDO PARA FATURAR JÁ!!) (SE FOR FILIAL OU COMPRADOR AUSENTE, MARCAR SIM) 1 100.00
5 - 5 - ANALISAR 115 - 18 - AO SAIR DO CLIENTE REFORÇOU O QUE FOI COMBINADO? (VALOR DO PEDIDO/DATA/ESPAÇO/PREÇO/RUPTURAS/CAMPANHAS/ITENS INTRODUZIR) 1 100.00
5 - 5 - ANALISAR 117 - 20 - TRASMITIU AO SAIR DO CLIENTE? (PEDIDO, NÃO VENDA OU VENDA DIGITADO POSTERIOR) 1 100.00
- 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; statusNaoFinalizado - 40; UPDATE agenda_tarefa SET assunto ='3', observacao = '', vendedor='100120', dataCriacao = '2025-05-28', data = '2025-05-29', horario_inicial = '08:00:00', horario_final = '12:00:00', status = 'Pendente', usuario = '40', supervisor = '40', clientes = '', resumo= '' WHERE id = '52518' - 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; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1748449779493','1003','PELOTAS ','100054','2025-05-28','2025-05-29','13:00:00','14:00:00','Pendente','40','40','','-1748449779493','','') - 40; UPDATE agenda_tarefa SET idPrimario = 52903 WHERE idPrimario = -1748449779493 - 40; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 52903 WHERE tarefa = -1748449779493 - 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; DELETE FROM agenda_tarefa WHERE idPrimario ='-1746637260315' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','302','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 40; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1746637260315','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 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;