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_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','101','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 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_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','101','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','303','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','106','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','107','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','305','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','207','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','110','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','111','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','115','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('30291','117','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 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 ('-1721222716418','3','','42','2024-07-17','2024-06-30','08:00:00','09:00:00','Finalizado','42','42','','-1721222716418','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1721222716418','3','','42','2024-07-17','2024-07-17','','','','','42','31096801','-1721222756670','','') - 42; INSERT INTO agenda_tarefa (idPrimario, assunto, observacao, vendedor, dataCriacao, data, horario_inicial, horario_final, status, usuario, supervisor, clientes, idOriginal, resumo, dataRota) values ('-1721222716418','3','','42','2024-07-17','2024-07-17','','','','','42','31128401','-1721222765887','','') - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','101','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','302','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','303','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','106','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','107','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','206','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','305','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','207','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','109','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','110','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','111','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','112','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','114','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','208','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','210','0','') ON DUPLICATE KEY UPDATE resposta = '0', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','115','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_formulario (tarefa, item, resposta, resposta_txt) values ('-1721222756670','117','1','') ON DUPLICATE KEY UPDATE resposta = '1', resposta_txt = '' - 42; INSERT INTO agenda_resposta_desenvolvimento_equipe (tarefa, prazo, feedback, acao) values ('-1721222716418','2024-07-31','','entregar expositor') - 42; UPDATE agenda_tarefa SET idPrimario = 30821 WHERE idPrimario = -1721222716418 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30821 WHERE tarefa = -1721222716418 - 42; UPDATE agenda_resposta_formulario SET tarefa = 30822 WHERE tarefa = -1721222756670 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30822 WHERE tarefa = -1721222756670 - 42; UPDATE agenda_resposta_formulario SET tarefa = 30823 WHERE tarefa = -1721222765887 - 42; UPDATE agenda_resposta_desenvolvimento_equipe SET tarefa = 30823 WHERE tarefa = -1721222765887 - 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; 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 = '30821' GROUP BY a.idPrimario - 42; Binding output parameters deu certo: ( 0) - 42; FORM VENDEDOR 20 - 42; GRUPO->

Grupos:

Grupo Qtd Percentual
1 - 1 - PLANEJAR 3 66.67
2 - 2 - LEITURA DE LOJA 4 50.00
3 - 3 - EXECUTAR 1 100.00
4 - 4 - NEGOCIAR 7 28.57
5 - 5 - ANALISAR 2 100.00
- 42; 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 0.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 0.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 100.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 100.00
4 - 4 - NEGOCIAR 109 - 14 - FEZ UMA ABORDAGEM/ABERTURA EFICIENTE? (CORDIAL, POSITIVA, ADEQUADA AO PERFIL DESTE CLIENTE) 1 0.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 100.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 0.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 0.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 0.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
- 42; statusNaoFinalizado - 42; statusNaoFinalizado - 42;