如何在 JXLS 的 SQL 模板中使用多个参数

How to use more one parameters in SQL template for JXLS

我在 JXLS 的模板文件中有一个 SQL,SQL 中有两个查询变量,但我不知道如何填写参数,感谢您的帮助求助!

jx:each(items="jdbc.query('SELECT * FROM DATA_DIE where stock_type = ? and matnr <> ?', '["1","1000"]')" var="DIE" lastCell="G2")

只需列出所有以逗号分隔的参数,例如

jx:each(items="jdbc.query('SELECT * FROM DATA_DIE where stock_type = ? and matnr <> ?', '1', '1000')" var="DIE" lastCell="G2")

如果值 1 和 1000 只是数字字段,您也可以跳过引号。