Browse Source

Atualizado até à sessão de 25 de março

master
Andre Silva 5 years ago
parent
commit
12bd97b82c
19 changed files with 1221 additions and 236 deletions
  1. BIN
      dbs/bdfarmacia.mv.db
  2. +915
    -0
      dbs/bdfarmacia.trace.db
  3. +135
    -107
      public/scripts/main.js
  4. +1
    -1
      public/scripts/main.js.map
  5. +0
    -0
      server/services/categorias/get.js
  6. +0
    -11
      server/services/farmaciaProdutos.js
  7. +0
    -0
      server/services/farmacias/get.js
  8. +10
    -0
      server/services/farmacias/produtos/post.js
  9. +0
    -0
      server/services/produtos/get.js
  10. +14
    -0
      server/services/stock/grafico.js
  11. +5
    -5
      server/setup/_schema-form-3-produto.js
  12. +11
    -11
      server/setup/_schema-form-4-produto_farmacia.js
  13. +1
    -0
      ui/package.json
  14. +42
    -0
      ui/src/components/GraficoStock/index.jsx
  15. +1
    -1
      ui/src/components/TabelaCategorias/index.jsx
  16. +15
    -33
      ui/src/components/TabelaFarmacia/StockBotao/index.jsx
  17. +15
    -36
      ui/src/components/TabelaFarmacia/index.jsx
  18. +9
    -31
      ui/src/components/TabelaProdutos/index.jsx
  19. +47
    -0
      ui/src/utils/Service.js

BIN
dbs/bdfarmacia.mv.db View File


+ 915
- 0
dbs/bdfarmacia.trace.db View File

@ -3718,3 +3718,918 @@ select produto.farmacia_multi from produto [42122-198]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834) at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:21:40 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "categoria.nome" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.stock, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join farmacia on produto.farmacia_id = farmacia.id
where farmacia.id = 2 [42122-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.ExpressionColumn.getColumnException(ExpressionColumn.java:176)
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:158)
at org.h2.expression.Alias.optimize(Alias.java:52)
at org.h2.command.dml.Select.prepare(Select.java:1256)
at org.h2.command.Parser.prepareCommand(Parser.java:690)
at org.h2.engine.Session.prepareLocal(Session.java:629)
at org.h2.engine.Session.prepareCommand(Session.java:567)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:78)
at org.netuno.tritao.dev.Query._main(SourceFile:37)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:21:48 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "produto.farmacia_id" not found; SQL statement:
select produto.nome, categoria.tipo as "Categoria", produto.stock, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join farmacia on produto.farmacia_id = farmacia.id
where farmacia.id = 2 [42122-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.ExpressionColumn.getColumnException(ExpressionColumn.java:176)
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:158)
at org.h2.expression.condition.Comparison.optimize(Comparison.java:205)
at org.h2.expression.condition.ConditionAndOr.optimize(ConditionAndOr.java:133)
at org.h2.expression.condition.ConditionAndOr.optimize(ConditionAndOr.java:134)
at org.h2.command.dml.Select.prepare(Select.java:1259)
at org.h2.command.Parser.prepareCommand(Parser.java:690)
at org.h2.engine.Session.prepareLocal(Session.java:629)
at org.h2.engine.Session.prepareCommand(Session.java:567)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:78)
at org.netuno.tritao.dev.Query._main(SourceFile:37)
at jdk.internal.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:23:15 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "produto.farmacia_id" not found; SQL statement:
select produto.farmacia_id
from produto [42122-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.ExpressionColumn.getColumnException(ExpressionColumn.java:176)
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:158)
at org.h2.command.dml.Select.prepare(Select.java:1256)
at org.h2.command.Parser.prepareCommand(Parser.java:690)
at org.h2.engine.Session.prepareLocal(Session.java:629)
at org.h2.engine.Session.prepareCommand(Session.java:567)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:78)
at org.netuno.tritao.dev.Query._main(SourceFile:37)
at jdk.internal.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:30:43 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "produto.farmacia_id" not found; SQL statement:
select produto.nome, categoria.tipo as "Categoria", produto.stock, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join farmacia on produto.farmacia_id = farmacia.id
where farmacia.id = 1 [42122-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.ExpressionColumn.getColumnException(ExpressionColumn.java:176)
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:158)
at org.h2.expression.condition.Comparison.optimize(Comparison.java:205)
at org.h2.expression.condition.ConditionAndOr.optimize(ConditionAndOr.java:133)
at org.h2.expression.condition.ConditionAndOr.optimize(ConditionAndOr.java:134)
at org.h2.command.dml.Select.prepare(Select.java:1259)
at org.h2.command.Parser.prepareCommand(Parser.java:690)
at org.h2.engine.Session.prepareLocal(Session.java:629)
at org.h2.engine.Session.prepareCommand(Session.java:567)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:78)
at org.netuno.tritao.dev.Query._main(SourceFile:37)
at jdk.internal.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:43:03 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "produto.farmacia_id" not found; SQL statement:
select produto.farmacia_id from produto [42122-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.ExpressionColumn.getColumnException(ExpressionColumn.java:176)
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:158)
at org.h2.command.dml.Select.prepare(Select.java:1256)
at org.h2.command.Parser.prepareCommand(Parser.java:690)
at org.h2.engine.Session.prepareLocal(Session.java:629)
at org.h2.engine.Session.prepareCommand(Session.java:567)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:78)
at org.netuno.tritao.dev.Query._main(SourceFile:37)
at jdk.internal.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:53:37 jdbc[3]: exception
org.h2.jdbc.JdbcSQLDataException: Parameter "#1" is not set; SQL statement:
select produto.nome, categoria.tipo as "Categoria", produto.stock, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_farmacia on produto_farmacia.produto_id = produto.id
where produto_farmacia.farmacia_id = ? [90012-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:587)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.Parameter.checkSet(Parameter.java:94)
at org.h2.command.Prepared.checkParameters(Prepared.java:180)
at org.h2.command.CommandContainer.query(CommandContainer.java:144)
at org.h2.command.Command.executeQuery(Command.java:202)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:85)
at org.netuno.tritao.dev.Query._main(SourceFile:37)
at jdk.internal.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:55:20 jdbc[3]: exception
org.h2.jdbc.JdbcSQLDataException: Parameter "#1" is not set; SQL statement:
select produto.nome, categoria.tipo as "Categoria", produto.stock, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_farmacia on produto_farmacia.produto_id = produto.id
where produto_farmacia.farmacia_id = ?
[90012-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:587)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.Parameter.checkSet(Parameter.java:94)
at org.h2.command.Prepared.checkParameters(Prepared.java:180)
at org.h2.command.CommandContainer.query(CommandContainer.java:144)
at org.h2.command.Command.executeQuery(Command.java:202)
at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:115)
at org.netuno.psamata.DB.executeQuery(SourceFile:460)
at org.netuno.psamata.DB.executeQuery(SourceFile:411)
at org.netuno.psamata.DB.query(SourceFile:381)
at org.netuno.tritao.resource.DB.query(SourceFile:761)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostMethodDesc$SingleMethod$MHBase.invokeHandle(HostMethodDesc.java:292)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestCodeCache$1.executeImpl(HostToGuestCodeCache.java:86)
at org.graalvm.truffle/com.oracle.truffle.polyglot.GuestToHostRootNode.execute(GuestToHostRootNode.java:82)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callInlined(OptimizedCallTarget.java:485)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callInlined(GraalRuntimeSupport.java:120)
at org.graalvm.truffle/com.oracle.truffle.polyglot.GuestToHostRootNode.guestToHostCall(GuestToHostRootNode.java:108)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostMethodDesc$SingleMethod$MHBase.invokeGuestToHost(HostMethodDesc.java:319)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNode.doInvoke(HostExecuteNode.java:809)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNode.doOverloadedCached(HostExecuteNode.java:241)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNodeGen.executeAndSpecialize(HostExecuteNodeGen.java:241)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNodeGen.execute(HostExecuteNodeGen.java:94)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObject.invokeMember(HostObject.java:412)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObjectGen$InteropLibraryExports$Cached.invokeMemberNode_AndSpecialize(HostObjectGen.java:1393)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObjectGen$InteropLibraryExports$Cached.invokeMember(HostObjectGen.java:1365)
at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$CachedDispatch.invokeMember(InteropLibraryGen.java:6078)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode$ForeignInvokeNode.executeCall(JSFunctionCallNode.java:1482)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode.executeAndSpecialize(JSFunctionCallNode.java:294)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode.executeCall(JSFunctionCallNode.java:240)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode$InvokeNode.execute(JSFunctionCallNode.java:711)
at com.oracle.truffle.js.nodes.access.WritePropertyNode.executeAndSpecialize(WritePropertyNode.java:263)
at com.oracle.truffle.js.nodes.access.WritePropertyNode.executeVoid(WritePropertyNode.java:235)
at com.oracle.truffle.js.nodes.binary.DualNode.executeVoid(DualNode.java:148)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.executeVoid(AbstractBlockNode.java:80)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.executeVoid(AbstractBlockNode.java:55)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedBlockNode.executeGeneric(OptimizedBlockNode.java:79)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.execute(AbstractBlockNode.java:75)
at com.oracle.truffle.js.nodes.function.FunctionBodyNode.execute(FunctionBodyNode.java:73)
at com.oracle.truffle.js.nodes.function.FunctionRootNode.executeInRealm(FunctionRootNode.java:147)
at com.oracle.truffle.js.runtime.JavaScriptRealmBoundaryRootNode.execute(JavaScriptRealmBoundaryRootNode.java:93)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:459)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
at com.oracle.truffle.js.lang.JavaScriptLanguage$1.execute(JavaScriptLanguage.java:214)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:446)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:434)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.eval(PolyglotContextImpl.java:941)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:347)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:373)
at org.netuno.psamata.script.GraalRunner.eval(SourceFile:169)
at org.netuno.tritao.config.Hili.runGraalScript(SourceFile:550)
at org.netuno.tritao.config.Hili.runScriptSandbox(SourceFile:393)
at org.netuno.tritao.config.Hili.runScriptSandbox(SourceFile:310)
at org.netuno.tritao.Service.execute(SourceFile:630)
at org.netuno.tritao.Service._main(SourceFile:571)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:55:22 jdbc[3]: exception
org.h2.jdbc.JdbcSQLDataException: Parameter "#1" is not set; SQL statement:
select produto.nome, categoria.tipo as "Categoria", produto.stock, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_farmacia on produto_farmacia.produto_id = produto.id
where produto_farmacia.farmacia_id = ?
[90012-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:587)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.Parameter.checkSet(Parameter.java:94)
at org.h2.command.Prepared.checkParameters(Prepared.java:180)
at org.h2.command.CommandContainer.query(CommandContainer.java:144)
at org.h2.command.Command.executeQuery(Command.java:202)
at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:115)
at org.netuno.psamata.DB.executeQuery(SourceFile:460)
at org.netuno.psamata.DB.executeQuery(SourceFile:411)
at org.netuno.psamata.DB.query(SourceFile:381)
at org.netuno.tritao.resource.DB.query(SourceFile:761)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostMethodDesc$SingleMethod$MHBase.invokeHandle(HostMethodDesc.java:292)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestCodeCache$1.executeImpl(HostToGuestCodeCache.java:86)
at org.graalvm.truffle/com.oracle.truffle.polyglot.GuestToHostRootNode.execute(GuestToHostRootNode.java:82)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callInlined(OptimizedCallTarget.java:485)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callInlined(GraalRuntimeSupport.java:120)
at org.graalvm.truffle/com.oracle.truffle.polyglot.GuestToHostRootNode.guestToHostCall(GuestToHostRootNode.java:108)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostMethodDesc$SingleMethod$MHBase.invokeGuestToHost(HostMethodDesc.java:319)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNode.doInvoke(HostExecuteNode.java:809)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNode.doOverloadedCached(HostExecuteNode.java:241)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNodeGen.executeAndSpecialize(HostExecuteNodeGen.java:241)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNodeGen.execute(HostExecuteNodeGen.java:94)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObject.invokeMember(HostObject.java:412)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObjectGen$InteropLibraryExports$Cached.invokeMemberNode_AndSpecialize(HostObjectGen.java:1393)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObjectGen$InteropLibraryExports$Cached.invokeMember(HostObjectGen.java:1365)
at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$CachedDispatch.invokeMember(InteropLibraryGen.java:6078)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode$ForeignInvokeNode.executeCall(JSFunctionCallNode.java:1482)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode.executeAndSpecialize(JSFunctionCallNode.java:294)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode.executeCall(JSFunctionCallNode.java:240)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode$InvokeNode.execute(JSFunctionCallNode.java:711)
at com.oracle.truffle.js.nodes.access.WritePropertyNode.executeAndSpecialize(WritePropertyNode.java:263)
at com.oracle.truffle.js.nodes.access.WritePropertyNode.executeVoid(WritePropertyNode.java:235)
at com.oracle.truffle.js.nodes.binary.DualNode.executeVoid(DualNode.java:148)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.executeVoid(AbstractBlockNode.java:80)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.executeVoid(AbstractBlockNode.java:55)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedBlockNode.executeGeneric(OptimizedBlockNode.java:79)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.execute(AbstractBlockNode.java:75)
at com.oracle.truffle.js.nodes.function.FunctionBodyNode.execute(FunctionBodyNode.java:73)
at com.oracle.truffle.js.nodes.function.FunctionRootNode.executeInRealm(FunctionRootNode.java:147)
at com.oracle.truffle.js.runtime.JavaScriptRealmBoundaryRootNode.execute(JavaScriptRealmBoundaryRootNode.java:93)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:459)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
at com.oracle.truffle.js.lang.JavaScriptLanguage$1.execute(JavaScriptLanguage.java:214)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:446)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:434)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.eval(PolyglotContextImpl.java:941)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:347)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:373)
at org.netuno.psamata.script.GraalRunner.eval(SourceFile:169)
at org.netuno.tritao.config.Hili.runGraalScript(SourceFile:550)
at org.netuno.tritao.config.Hili.runScriptSandbox(SourceFile:393)
at org.netuno.tritao.config.Hili.runScriptSandbox(SourceFile:310)
at org.netuno.tritao.Service.execute(SourceFile:630)
at org.netuno.tritao.Service._main(SourceFile:571)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:55:23 jdbc[3]: exception
org.h2.jdbc.JdbcSQLDataException: Parameter "#1" is not set; SQL statement:
select produto.nome, categoria.tipo as "Categoria", produto.stock, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_farmacia on produto_farmacia.produto_id = produto.id
where produto_farmacia.farmacia_id = ?
[90012-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:587)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.Parameter.checkSet(Parameter.java:94)
at org.h2.command.Prepared.checkParameters(Prepared.java:180)
at org.h2.command.CommandContainer.query(CommandContainer.java:144)
at org.h2.command.Command.executeQuery(Command.java:202)
at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:115)
at org.netuno.psamata.DB.executeQuery(SourceFile:460)
at org.netuno.psamata.DB.executeQuery(SourceFile:411)
at org.netuno.psamata.DB.query(SourceFile:381)
at org.netuno.tritao.resource.DB.query(SourceFile:761)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostMethodDesc$SingleMethod$MHBase.invokeHandle(HostMethodDesc.java:292)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestCodeCache$1.executeImpl(HostToGuestCodeCache.java:86)
at org.graalvm.truffle/com.oracle.truffle.polyglot.GuestToHostRootNode.execute(GuestToHostRootNode.java:82)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callInlined(OptimizedCallTarget.java:485)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callInlined(GraalRuntimeSupport.java:120)
at org.graalvm.truffle/com.oracle.truffle.polyglot.GuestToHostRootNode.guestToHostCall(GuestToHostRootNode.java:108)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostMethodDesc$SingleMethod$MHBase.invokeGuestToHost(HostMethodDesc.java:319)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNode.doInvoke(HostExecuteNode.java:809)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNode.doOverloadedCached(HostExecuteNode.java:241)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNodeGen.executeAndSpecialize(HostExecuteNodeGen.java:241)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNodeGen.execute(HostExecuteNodeGen.java:94)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObject.invokeMember(HostObject.java:412)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObjectGen$InteropLibraryExports$Cached.invokeMemberNode_AndSpecialize(HostObjectGen.java:1393)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObjectGen$InteropLibraryExports$Cached.invokeMember(HostObjectGen.java:1365)
at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$CachedDispatch.invokeMember(InteropLibraryGen.java:6078)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode$ForeignInvokeNode.executeCall(JSFunctionCallNode.java:1482)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode.executeAndSpecialize(JSFunctionCallNode.java:294)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode.executeCall(JSFunctionCallNode.java:240)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode$InvokeNode.execute(JSFunctionCallNode.java:711)
at com.oracle.truffle.js.nodes.access.WritePropertyNode.executeAndSpecialize(WritePropertyNode.java:263)
at com.oracle.truffle.js.nodes.access.WritePropertyNode.executeVoid(WritePropertyNode.java:235)
at com.oracle.truffle.js.nodes.binary.DualNode.executeVoid(DualNode.java:148)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.executeVoid(AbstractBlockNode.java:80)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.executeVoid(AbstractBlockNode.java:55)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedBlockNode.executeGeneric(OptimizedBlockNode.java:79)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.execute(AbstractBlockNode.java:75)
at com.oracle.truffle.js.nodes.function.FunctionBodyNode.execute(FunctionBodyNode.java:73)
at com.oracle.truffle.js.nodes.function.FunctionRootNode.executeInRealm(FunctionRootNode.java:147)
at com.oracle.truffle.js.runtime.JavaScriptRealmBoundaryRootNode.execute(JavaScriptRealmBoundaryRootNode.java:93)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:459)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
at com.oracle.truffle.js.lang.JavaScriptLanguage$1.execute(JavaScriptLanguage.java:214)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:446)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:434)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.eval(PolyglotContextImpl.java:941)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:347)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:373)
at org.netuno.psamata.script.GraalRunner.eval(SourceFile:169)
at org.netuno.tritao.config.Hili.runGraalScript(SourceFile:550)
at org.netuno.tritao.config.Hili.runScriptSandbox(SourceFile:393)
at org.netuno.tritao.config.Hili.runScriptSandbox(SourceFile:310)
at org.netuno.tritao.Service.execute(SourceFile:630)
at org.netuno.tritao.Service._main(SourceFile:571)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)
2021-03-25 11:57:47 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 11:57:48 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 11:57:50 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 12:22:36 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco
from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 12:22:38 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco
from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 12:26:26 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco
from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 12:26:29 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco
from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 12:27:24 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco
from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 12:27:26 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "produto_loja" not found; SQL statement:
select produto.nome, categoria.nome as "Categoria", produto.quantidade, produto.preco
from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_loja on produto_loja.produto_id = produto.id
inner join loja on produto_loja.loja_id = loja.id
and loja.id = ?
[42102-198]
2021-03-25 14:57:27 jdbc[3]: exception
org.h2.jdbc.JdbcSQLDataException: Parameter "#1" is not set; SQL statement:
select produto.nome, categoria.tipo as "Categoria", produto.stock, produto.preco
from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_farmacia on produto_farmacia.produto_id = produto.id
inner join farmacia on produto_farmacia.farmacia_id = farmacia.id
and farmacia.id = ?
[90012-198]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:587)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.expression.Parameter.checkSet(Parameter.java:94)
at org.h2.command.Prepared.checkParameters(Prepared.java:180)
at org.h2.command.CommandContainer.query(CommandContainer.java:144)
at org.h2.command.Command.executeQuery(Command.java:202)
at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:115)
at org.netuno.psamata.DB.executeQuery(SourceFile:460)
at org.netuno.psamata.DB.executeQuery(SourceFile:411)
at org.netuno.psamata.DB.query(SourceFile:381)
at org.netuno.tritao.resource.DB.query(SourceFile:761)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostMethodDesc$SingleMethod$MHBase.invokeHandle(HostMethodDesc.java:292)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestCodeCache$1.executeImpl(HostToGuestCodeCache.java:86)
at org.graalvm.truffle/com.oracle.truffle.polyglot.GuestToHostRootNode.execute(GuestToHostRootNode.java:82)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callInlined(OptimizedCallTarget.java:485)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callInlined(GraalRuntimeSupport.java:120)
at org.graalvm.truffle/com.oracle.truffle.polyglot.GuestToHostRootNode.guestToHostCall(GuestToHostRootNode.java:108)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostMethodDesc$SingleMethod$MHBase.invokeGuestToHost(HostMethodDesc.java:319)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNode.doInvoke(HostExecuteNode.java:809)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNode.doOverloadedCached(HostExecuteNode.java:241)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNodeGen.executeAndSpecialize(HostExecuteNodeGen.java:241)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostExecuteNodeGen.execute(HostExecuteNodeGen.java:94)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObject.invokeMember(HostObject.java:412)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObjectGen$InteropLibraryExports$Cached.invokeMemberNode_AndSpecialize(HostObjectGen.java:1393)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostObjectGen$InteropLibraryExports$Cached.invokeMember(HostObjectGen.java:1365)
at org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibraryGen$CachedDispatch.invokeMember(InteropLibraryGen.java:6078)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode$ForeignInvokeNode.executeCall(JSFunctionCallNode.java:1482)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode.executeAndSpecialize(JSFunctionCallNode.java:294)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode.executeCall(JSFunctionCallNode.java:240)
at com.oracle.truffle.js.nodes.function.JSFunctionCallNode$InvokeNode.execute(JSFunctionCallNode.java:711)
at com.oracle.truffle.js.nodes.access.WritePropertyNode.executeAndSpecialize(WritePropertyNode.java:263)
at com.oracle.truffle.js.nodes.access.WritePropertyNode.executeVoid(WritePropertyNode.java:235)
at com.oracle.truffle.js.nodes.binary.DualNode.executeVoid(DualNode.java:148)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.executeVoid(AbstractBlockNode.java:80)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.executeVoid(AbstractBlockNode.java:55)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedBlockNode.executeGeneric(OptimizedBlockNode.java:79)
at com.oracle.truffle.js.nodes.control.AbstractBlockNode.execute(AbstractBlockNode.java:75)
at com.oracle.truffle.js.nodes.function.FunctionBodyNode.execute(FunctionBodyNode.java:73)
at com.oracle.truffle.js.nodes.function.FunctionRootNode.executeInRealm(FunctionRootNode.java:147)
at com.oracle.truffle.js.runtime.JavaScriptRealmBoundaryRootNode.execute(JavaScriptRealmBoundaryRootNode.java:93)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:459)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:71)
at com.oracle.truffle.js.lang.JavaScriptLanguage$1.execute(JavaScriptLanguage.java:214)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:446)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:434)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotContextImpl.eval(PolyglotContextImpl.java:941)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:347)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:373)
at org.netuno.psamata.script.GraalRunner.eval(SourceFile:169)
at org.netuno.tritao.config.Hili.runGraalScript(SourceFile:550)
at org.netuno.tritao.config.Hili.runScriptSandbox(SourceFile:393)
at org.netuno.tritao.config.Hili.runScriptSandbox(SourceFile:310)
at org.netuno.tritao.Service.execute(SourceFile:630)
at org.netuno.tritao.Service._main(SourceFile:571)
at jdk.internal.reflect.GeneratedMethodAccessor250.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.netuno.proteu.Run.run(SourceFile:103)
at org.netuno.proteu.Run.<init>(SourceFile:33)
at org.netuno.proteu.DynamicURL.build(SourceFile:153)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:452)
at org.netuno.proteu.Enterprise.service(SourceFile:525)
at javax.servlet.http.HttpServlet.service(SourceFile:791)
at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(SourceFile:1402)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1369)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1284)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:556)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:938)
at java.base/java.lang.Thread.run(Thread.java:834)

+ 135
- 107
public/scripts/main.js View File

@ -85802,7 +85802,7 @@ var TabelaCategoria = function TabelaCategoria() {
netuno.service({ netuno.service({
url: '/services/categorias', url: '/services/categorias',
method: 'POST',
method: 'GET',
credentials: 'include', credentials: 'include',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
@ -85848,6 +85848,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var antd_lib_spin__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(antd_lib_spin__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var antd_lib_spin__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(antd_lib_spin__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var antd_lib_typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/lib/typography */ "./node_modules/antd/lib/typography/index.js"); /* harmony import */ var antd_lib_typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/lib/typography */ "./node_modules/antd/lib/typography/index.js");
/* harmony import */ var antd_lib_typography__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(antd_lib_typography__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var antd_lib_typography__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(antd_lib_typography__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var antd_lib_notification__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/lib/notification */ "./node_modules/antd/lib/notification/index.js");
/* harmony import */ var antd_lib_notification__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(antd_lib_notification__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _utils_Service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/Service */ "./src/utils/Service.js");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@ -85865,10 +85868,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var Title = antd_lib_typography__WEBPACK_IMPORTED_MODULE_4___default.a.Title; var Title = antd_lib_typography__WEBPACK_IMPORTED_MODULE_4___default.a.Title;
var StockBotao = function StockBotao(_ref) { var StockBotao = function StockBotao(_ref) {
var produto = _ref.produto,
var farmacia = _ref.farmacia,
onClose = _ref.onClose; onClose = _ref.onClose;
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false), var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false),
@ -85882,40 +85887,16 @@ var StockBotao = function StockBotao(_ref) {
setData = _useState4[1]; setData = _useState4[1];
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () { Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
setLoading(true);
var _fail = function fail() {
setLoading(false);
notification["error"]({
message: 'Lista de Stock',
description: 'Houve uma falha ao carregar o stock de produtos...',
style: {
marginTop: 100
}
});
};
netuno.service({
url: '/services/produtos',
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
_utils_Service__WEBPACK_IMPORTED_MODULE_6__["default"].call({
url: "farmacias/produtos",
method: "post",
setData: setData,
setLoading: setLoading,
body: JSON.stringify({ body: JSON.stringify({
uid: produto.uid
id: farmacia.id
}), }),
success: function success(response) {
if (response.json) {
setData(response.json);
setLoading(false);
} else {
_fail();
}
},
fail: function fail() {
_fail();
}
errorTitle: 'Botão de Stock',
errorMessage: 'Houve uma falha ao carregar a lista de stock...'
}); });
}, []); }, []);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_modal__WEBPACK_IMPORTED_MODULE_2___default.a, { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_modal__WEBPACK_IMPORTED_MODULE_2___default.a, {
@ -85935,7 +85916,7 @@ var StockBotao = function StockBotao(_ref) {
}; };
StockBotao.propTypes = { StockBotao.propTypes = {
produto: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object.isRequired,
farmacia: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object.isRequired,
onClose: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired onClose: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired
}; };
/* harmony default export */ __webpack_exports__["default"] = (StockBotao); /* harmony default export */ __webpack_exports__["default"] = (StockBotao);
@ -85962,8 +85943,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var antd_lib_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/lib/button */ "./node_modules/antd/lib/button/index.js"); /* harmony import */ var antd_lib_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/lib/button */ "./node_modules/antd/lib/button/index.js");
/* harmony import */ var antd_lib_button__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(antd_lib_button__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var antd_lib_button__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(antd_lib_button__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _StockBotao_index_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StockBotao/index.jsx */ "./src/components/TabelaFarmacia/StockBotao/index.jsx"); /* harmony import */ var _StockBotao_index_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StockBotao/index.jsx */ "./src/components/TabelaFarmacia/StockBotao/index.jsx");
var _this = undefined;
/* harmony import */ var _utils_Service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/Service */ "./src/utils/Service.js");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@ -85983,6 +85963,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var TabelaFarmacia = function TabelaFarmacia() { var TabelaFarmacia = function TabelaFarmacia() {
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])([]), var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])([]),
_useState2 = _slicedToArray(_useState, 2), _useState2 = _slicedToArray(_useState, 2),
@ -85991,41 +85972,21 @@ var TabelaFarmacia = function TabelaFarmacia() {
var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(null), var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(null),
_useState4 = _slicedToArray(_useState3, 2), _useState4 = _slicedToArray(_useState3, 2),
stock = _useState4[0],
setStock = _useState4[1];
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
var _fail = function fail() {
_this.setState({
loading: false
});
farmacia = _useState4[0],
setFarmacia = _useState4[1];
notification["error"]({
message: 'Erro',
description: 'Tabela de Farmácia com erros...',
style: {
marginTop: 100
}
});
};
var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false),
_useState6 = _slicedToArray(_useState5, 2),
loading = _useState6[0],
setLoading = _useState6[1];
netuno.service({
url: '/services/farmacias',
method: 'GET',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
success: function success(response) {
if (response.json) {
setData(response.json);
} else {
_fail();
}
},
fail: function fail() {
_fail();
}
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
_utils_Service__WEBPACK_IMPORTED_MODULE_6__["default"].call({
url: "farmacias",
setData: setData,
setLoading: setLoading,
errorTitle: 'Tabela de Farmacias',
errorMessage: 'Houve uma falha ao carregar a tabela de farmacias...'
}); });
}, []); }, []);
var columns = [{ var columns = [{
@ -86036,15 +85997,15 @@ var TabelaFarmacia = function TabelaFarmacia() {
render: function render(text, record, index) { render: function render(text, record, index) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_button__WEBPACK_IMPORTED_MODULE_4___default.a, { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_button__WEBPACK_IMPORTED_MODULE_4___default.a, {
onClick: function onClick() { onClick: function onClick() {
return setStock(record);
return setFarmacia(record);
} }
}, "Ver Stock")); }, "Ver Stock"));
} }
}]; }];
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, !!stock && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockBotao_index_jsx__WEBPACK_IMPORTED_MODULE_5__["default"], {
produto: stock,
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, !!farmacia && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockBotao_index_jsx__WEBPACK_IMPORTED_MODULE_5__["default"], {
farmacia: farmacia,
onClose: function onClose() { onClose: function onClose() {
return setStock(null);
return setFarmacia(null);
} }
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_table__WEBPACK_IMPORTED_MODULE_1___default.a, { }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_table__WEBPACK_IMPORTED_MODULE_1___default.a, {
dataSource: data, dataSource: data,
@ -86073,8 +86034,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var antd_lib_table_Column__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(antd_lib_table_Column__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var antd_lib_table_Column__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(antd_lib_table_Column__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var antd_lib_tag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/lib/tag */ "./node_modules/antd/lib/tag/index.js"); /* harmony import */ var antd_lib_tag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/lib/tag */ "./node_modules/antd/lib/tag/index.js");
/* harmony import */ var antd_lib_tag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(antd_lib_tag__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var antd_lib_tag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(antd_lib_tag__WEBPACK_IMPORTED_MODULE_3__);
var _this = undefined;
/* harmony import */ var _utils_Service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/Service */ "./src/utils/Service.js");
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@ -86091,6 +86051,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var columns = [{ var columns = [{
title: "Nome", title: "Nome",
dataIndex: "nome" dataIndex: "nome"
@ -86111,38 +86072,18 @@ var TabelaProduto = function TabelaProduto() {
data = _useState2[0], data = _useState2[0],
setData = _useState2[1]; setData = _useState2[1];
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
var _fail = function fail() {
_this.setState({
loading: false
});
notification["error"]({
message: 'Erro',
description: 'Tabela dos Produtos com erros existentes',
style: {
marginTop: 100
}
});
};
var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false),
_useState4 = _slicedToArray(_useState3, 2),
loading = _useState4[0],
setLoading = _useState4[1];
netuno.service({
url: '/services/produtos',
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
success: function success(response) {
if (response.json) {
setData(response.json);
} else {
_fail();
}
},
fail: function fail() {
_fail();
}
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
_utils_Service__WEBPACK_IMPORTED_MODULE_4__["default"].call({
url: "produtos",
setData: setData,
setLoading: setLoading,
errorTitle: 'Tabela de Pessoas',
errorMessage: 'Houve uma falha ao carregar a tabela das pessoas...'
}); });
}, []); }, []);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_table__WEBPACK_IMPORTED_MODULE_1___default.a, { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_table__WEBPACK_IMPORTED_MODULE_1___default.a, {
@ -86364,6 +86305,93 @@ var update = api(content, options);
module.exports = content.locals || {}; module.exports = content.locals || {};
/***/ }),
/***/ "./src/utils/Service.js":
/*!******************************!*\
!*** ./src/utils/Service.js ***!
\******************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Service; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var antd_lib_notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/lib/notification */ "./node_modules/antd/lib/notification/index.js");
/* harmony import */ var antd_lib_notification__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(antd_lib_notification__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var antd_lib_spin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/lib/spin */ "./node_modules/antd/lib/spin/index.js");
/* harmony import */ var antd_lib_spin__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(antd_lib_spin__WEBPACK_IMPORTED_MODULE_2__);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var Service = /*#__PURE__*/function () {
function Service() {
_classCallCheck(this, Service);
}
_createClass(Service, null, [{
key: "spin",
value: function spin(loading) {
return loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(antd_lib_spin__WEBPACK_IMPORTED_MODULE_2___default.a, null);
}
}, {
key: "call",
value: function call(settings) {
if (!settings.url || !settings.setData || !settings.setLoading) {
console.error("Service.call", settings);
return;
}
settings.setLoading(true);
var _fail = function fail() {
settings.setLoading(false);
antd_lib_notification__WEBPACK_IMPORTED_MODULE_1___default.a["error"]({
message: settings.errorTitle ? settings.errorTitle : "Erro no Serviço",
description: settings.errorMessage ? settings.errorMessage : settings.url,
style: {
marginTop: 100
}
});
};
netuno.service({
url: "/services/".concat(settings.url),
method: settings.method ? settings.method.toUpperCase() : "GET",
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
body: settings.body ? settings.body : null,
success: function success(response) {
if (response.json) {
settings.setData(response.json);
settings.setLoading(false);
} else {
_fail();
}
},
fail: function fail() {
_fail();
}
});
}
}]);
return Service;
}();
/***/ }), /***/ }),
/***/ 0: /***/ 0:


+ 1
- 1
public/scripts/main.js.map
File diff suppressed because it is too large
View File


server/services/categorias.js → server/services/categorias/get.js View File


+ 0
- 11
server/services/farmaciaProdutos.js View File

@ -1,11 +0,0 @@
const dbFarmaciaProdutos = _db.query(
`select produto.nome, produto.categoria_id, produto.stock, produto.preco
from produto
inner join categoria
on produto.categoria_id = categoria.id
inner join farmacia
on produto.farmacia_id = farmacia.id
where farmacia.id = ?
`)
_out.json(dbFarmaciaProdutos)

server/services/farmacias.js → server/services/farmacias/get.js View File


+ 10
- 0
server/services/farmacias/produtos/post.js View File

@ -0,0 +1,10 @@
const dbFarmaciaProdutos = _db.query(
`select produto.nome, categoria.tipo as "Categoria", produto.stock, produto.preco
from produto
inner join categoria on produto.categoria_id = categoria.id
inner join produto_farmacia on produto_farmacia.produto_id = produto.id
inner join farmacia on produto_farmacia.farmacia_id = farmacia.id
and farmacia.id = ?
`, _req.getInt("id"))
_out.json(dbFarmaciaProdutos)

server/services/produtos.js → server/services/produtos/get.js View File


+ 14
- 0
server/services/stock/grafico.js View File

@ -0,0 +1,14 @@
// const dbStock = _db.query(`
// SELECT
// SUBSTRING(publicacao.momento FROM 1 FOR 10) AS "mes",
// comunidade.nome AS "comunidade",
// COUNT(publicacao.id) AS "total"
// FROM
// publicacao INNER JOIN comunidade ON publicacao.comunidade_id = comunidade.id
// GROUP BY SUBSTRING(publicacao.momento FROM 1 FOR 10), comunidade.nome
// ORDER BY SUBSTRING(publicacao.momento FROM 1 FOR 10), comunidade.nome
// `)
// java.lang.Thread.sleep(4000)
// _out.json(dbStock)

+ 5
- 5
server/setup/_schema-form-3-produto.js View File

@ -59,21 +59,21 @@ _form.createComponentIfNotExists(
"d912b013-cebb-499e-ad74-dce70bdd569f", "d912b013-cebb-499e-ad74-dce70bdd569f",
_val.init() _val.init()
.set("colspan", 0) .set("colspan", 0)
.set("displayname", "Farmacia_Multi")
.set("displayname", "Farmacias")
.set("firebase", "") .set("firebase", "")
.set("group_id", 0) .set("group_id", 0)
.set("height", 0) .set("height", 0)
.set("max", 0) .set("max", 0)
.set("min", 0) .set("min", 0)
.set("name", "farmacia_multi")
.set("name", "farmacia_id")
.set("notnull", false) .set("notnull", false)
.set("primarykey", false) .set("primarykey", false)
.set("properties", "{\"ITEM_SEPARATOR\":{\"default\":\" # \",\"type\":\"STRING\",\"value\":\" # \"},\"MAX_COLUMN_LENGTH\":{\"default\":\"0\",\"type\":\"INTEGER\",\"value\":\"0\"},\"COLUMN_SEPARATOR\":{\"default\":\" - \",\"type\":\"LINK_SEPARATOR\",\"value\":\" - \"},\"REFERENCE\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"farmacia_produto:farmacia_nova_tabela_id\"},\"LINK\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"farmacia_produto:produto_nova_tabela_id\"},\"SERVICE\":{\"default\":\"com/MultiSelect.netuno\",\"type\":\"STRING\",\"value\":\"com/MultiSelect.netuno\"},\"ONLY_ACTIVES\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("properties", "{\"ITEM_SEPARATOR\":{\"default\":\" # \",\"type\":\"STRING\",\"value\":\" # \"},\"MAX_COLUMN_LENGTH\":{\"default\":\"0\",\"type\":\"INTEGER\",\"value\":\"0\"},\"COLUMN_SEPARATOR\":{\"default\":\" - \",\"type\":\"LINK_SEPARATOR\",\"value\":\" - \"},\"REFERENCE\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"produto_farmacia:produto_id\"},\"LINK\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"produto_farmacia:farmacia_id\"},\"SERVICE\":{\"default\":\"com/MultiSelect.netuno\",\"type\":\"STRING\",\"value\":\"com/MultiSelect.netuno\"},\"ONLY_ACTIVES\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0) .set("rowspan", 0)
.set("tdheight", 0) .set("tdheight", 0)
.set("tdwidth", 0) .set("tdwidth", 0)
.set("type", "multiselect") .set("type", "multiselect")
.set("uid", "55cc95a0-d1a2-42b1-89f9-c29c95af4579")
.set("uid", "cd9ced29-69e8-420f-a95d-ba70b4243ea3")
.set("user_id", 0) .set("user_id", 0)
.set("whenedit", true) .set("whenedit", true)
.set("whenexport", true) .set("whenexport", true)
@ -97,7 +97,7 @@ _form.createComponentIfNotExists(
.set("min", 0) .set("min", 0)
.set("name", "nome") .set("name", "nome")
.set("notnull", true) .set("notnull", true)
.set("primarykey", false)
.set("primarykey", true)
.set("properties", "{\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"}}") .set("properties", "{\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"}}")
.set("rowspan", 0) .set("rowspan", 0)
.set("tdheight", 0) .set("tdheight", 0)


server/setup/_schema-form-4-farmacia_produto.js → server/setup/_schema-form-4-produto_farmacia.js View File


+ 1
- 0
ui/package.json View File

@ -30,6 +30,7 @@
}, },
"dependencies": { "dependencies": {
"antd": "^4.1.0", "antd": "^4.1.0",
"bizcharts": "^4.1.9",
"chart.js": "^2.9.3", "chart.js": "^2.9.3",
"react-chartjs-2": "^2.9.0" "react-chartjs-2": "^2.9.0"
} }


+ 42
- 0
ui/src/components/GraficoStock/index.jsx View File

@ -0,0 +1,42 @@
import React, { useState, useEffect } from "react";
import PropTypes from "prop-types";
import Spin from 'antd/lib/spin';
import Typography from 'antd/lib/typography';
import { Chart, LineAdvance } from 'bizcharts';
import Service from "../../utils/Service";
const { Title } = Typography;
const GraficoStock = () => {
const [ loading, setLoading ] = useState(false);
const [ data, setData ] = useState([]);
useEffect(() => {
Service.call({
url: `publicacoes/grafico`,
method: "post",
setData,
setLoading,
errorTitle: 'Gráfico de Stock',
errorMessage: 'Houve uma falha ao carregar o gráfico do stock...'
})
}, []);
return <>
{ Service.spin(loading) }
<Chart padding={[10, 20, 50, 40]} autoFit height={300} data={data} >
<LineAdvance
shape="smooth"
point
area
position="mes*total"
color="comunidade"
/>
</Chart>
</>;
};
GraficoPublicacoes.propTypes = {
};
export default GraficoStock;

+ 1
- 1
ui/src/components/TabelaCategorias/index.jsx View File

@ -30,7 +30,7 @@ const TabelaCategoria = () => {
}; };
netuno.service({ netuno.service({
url: '/services/categorias', url: '/services/categorias',
method: 'POST',
method: 'GET',
credentials: 'include', credentials: 'include',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'


+ 15
- 33
ui/src/components/TabelaFarmacia/StockBotao/index.jsx View File

@ -3,48 +3,30 @@ import PropTypes from "prop-types";
import Modal from 'antd/lib/modal'; import Modal from 'antd/lib/modal';
import Spin from 'antd/lib/spin'; import Spin from 'antd/lib/spin';
import Typography from 'antd/lib/typography'; import Typography from 'antd/lib/typography';
import notification from 'antd/lib/notification';
import Service from "../../../utils/Service";
const { Title } = Typography; const { Title } = Typography;
const StockBotao = ({ produto, onClose }) => {
const StockBotao = ({ farmacia, onClose }) => {
const [ loading, setLoading ] = useState(false); const [ loading, setLoading ] = useState(false);
const [ data, setData ] = useState([]); const [ data, setData ] = useState([]);
useEffect(() => { useEffect(() => {
setLoading(true);
const fail = ()=> {
setLoading(false);
notification["error"]({
message: 'Lista de Stock',
description: 'Houve uma falha ao carregar o stock de produtos...',
style: {
marginTop: 100,
}
});
};
netuno.service({
url: '/services/produtos',
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
Service.call({
url: `farmacias/produtos`,
method: "post",
setData,
setLoading,
body: JSON.stringify({ body: JSON.stringify({
uid: produto.uid
id: farmacia.id
}), }),
success: (response)=> {
if (response.json) {
setData(response.json);
setLoading(false);
} else {
fail();
}
},
fail: ()=> {
fail();
}
});
errorTitle: 'Botão de Stock',
errorMessage: 'Houve uma falha ao carregar a lista de stock...'
})
}, []); }, []);
return <Modal return <Modal
title="Produtos" title="Produtos"
visible={true} visible={true}
@ -67,7 +49,7 @@ const StockBotao = ({ produto, onClose }) => {
}; };
StockBotao.propTypes = { StockBotao.propTypes = {
produto: PropTypes.object.isRequired,
farmacia: PropTypes.object.isRequired,
onClose: PropTypes.func.isRequired onClose: PropTypes.func.isRequired
}; };

+ 15
- 36
ui/src/components/TabelaFarmacia/index.jsx View File

@ -5,6 +5,7 @@ import Column from "antd/lib/table/Column";
import Tag from "antd/lib/tag"; import Tag from "antd/lib/tag";
import Button from 'antd/lib/button'; import Button from 'antd/lib/button';
import StockBotao from "./StockBotao/index.jsx"; import StockBotao from "./StockBotao/index.jsx";
import Service from "../../utils/Service";
@ -14,43 +15,21 @@ const TabelaFarmacia = () => {
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [ stock, setStock ] = useState(null);
const [ farmacia, setFarmacia ] = useState(null);
const [ loading, setLoading ] = useState(false);
useEffect(() => {
const fail = () => {
this.setState({ loading: false });
notification["error"]({
message: 'Erro',
description: 'Tabela de Farmácia com erros...',
style: {
marginTop: 100,
}
});
};
netuno.service({
url: '/services/farmacias',
method: 'GET',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
success: (response) => {
if (response.json) {
setData(response.json);
} else {
fail();
}
},
fail: () => {
fail();
}
useEffect(() => {
Service.call({
url: `farmacias`,
setData,
setLoading,
errorTitle: 'Tabela de Farmacias',
errorMessage: 'Houve uma falha ao carregar a tabela de farmacias...'
}); });
}, []);
}, [ ]);
const columns = [ const columns = [
{ {
@ -61,7 +40,7 @@ const TabelaFarmacia = () => {
title: "Stock de Farmácias", title: "Stock de Farmácias",
render: (text, record, index) => ( render: (text, record, index) => (
<div> <div>
{ <Button onClick={ () => setStock(record) }>Ver Stock</Button>}
{ <Button onClick={ () => setFarmacia(record) }>Ver Stock</Button>}
</div> </div>
) )
} }
@ -72,9 +51,9 @@ const TabelaFarmacia = () => {
return <> return <>
{ !!stock && <StockBotao
produto={stock}
onClose={ () => setStock(null) }
{ !!farmacia && <StockBotao
farmacia={farmacia}
onClose={ () => setFarmacia(null) }
/> } /> }


+ 9
- 31
ui/src/components/TabelaProdutos/index.jsx View File

@ -3,6 +3,7 @@ import React, { useState, useEffect } from "react";
import Table from 'antd/lib/table'; import Table from 'antd/lib/table';
import Column from "antd/lib/table/Column"; import Column from "antd/lib/table/Column";
import Tag from "antd/lib/tag"; import Tag from "antd/lib/tag";
import Service from "../../utils/Service";
const columns = [ const columns = [
@ -30,40 +31,17 @@ const TabelaProduto = () => {
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [ loading, setLoading ] = useState(false);
useEffect(() => { useEffect(() => {
const fail = () => {
this.setState({ loading: false });
notification["error"]({
message: 'Erro',
description: 'Tabela dos Produtos com erros existentes',
style: {
marginTop: 100,
}
});
};
netuno.service({
url: '/services/produtos',
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
success: (response) => {
if (response.json) {
setData(response.json);
} else {
fail();
}
},
fail: () => {
fail();
}
Service.call({
url: `produtos`,
setData,
setLoading,
errorTitle: 'Tabela de Pessoas',
errorMessage: 'Houve uma falha ao carregar a tabela das pessoas...'
}); });
}, []);
}, [ ]);
return <Table columns={columns} dataSource={data} /> return <Table columns={columns} dataSource={data} />


+ 47
- 0
ui/src/utils/Service.js View File

@ -0,0 +1,47 @@
import React from "react";
import notification from 'antd/lib/notification';
import Spin from 'antd/lib/spin';
export default class Service {
static spin(loading) {
return loading && <Spin />;
}
static call(settings) {
if (!settings.url || !settings.setData || !settings.setLoading) {
console.error("Service.call", settings);
return;
}
settings.setLoading(true);
const fail = ()=> {
settings.setLoading(false);
notification["error"]({
message: settings.errorTitle ? settings.errorTitle : "Erro no Serviço",
description: settings.errorMessage ? settings.errorMessage : settings.url,
style: {
marginTop: 100,
}
});
};
netuno.service({
url: `/services/${settings.url}`,
method: settings.method ? settings.method.toUpperCase() : "GET",
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
body: settings.body ? settings.body : null,
success: (response)=> {
if (response.json) {
settings.setData(response.json);
settings.setLoading(false);
} else {
fail();
}
},
fail: ()=> {
fail();
}
});
}
}

Loading…
Cancel
Save