|
|
@@ -29,16 +29,19 @@ public class ReportType extends Controller {
|
|
|
|
|
|
@API(title = "授权报表中心应用的报表查询", apiversion = R.ID20240407094904.v1.class)
|
|
|
public String queryReport() throws YosException {
|
|
|
- QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_report", "sys_reportid");
|
|
|
- querySQL.setTableAlias("t1");
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "jimu_report", "t2", "t1.jimu_report_id = t2.id");
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "sys_reporttype", "t3", "t1.sys_reportid = t3.sys_reportid and t3.siteid='" + siteid + "'");
|
|
|
- querySQL.setWhere("t1.systemappid=" + 163 + " and (ifnull(t1.siteid,'')='' or t1.siteid = '" + siteid + "')");
|
|
|
- querySQL.addQueryFields("name", "if(t1.reporttype = '积木报表', t2.name, t1.name)");
|
|
|
- querySQL.addQueryFields("type", "group_concat(t3.type separator ',')");
|
|
|
- querySQL.addGroupBy("t1.sys_reportid","t1.name","t2.name");
|
|
|
- querySQL.setPage(pageSize, pageNumber);
|
|
|
- Rows query = querySQL.query();
|
|
|
+ SQLFactory sqlFactory = new SQLFactory(this, "授权报表中心应用的报表查询");
|
|
|
+ sqlFactory.addParameter("siteid", siteid);
|
|
|
+// QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_report", "sys_reportid");
|
|
|
+// querySQL.setTableAlias("t1");
|
|
|
+// querySQL.addJoinTable(JOINTYPE.left, "jimu_report", "t2", "t1.jimu_report_id = t2.id");
|
|
|
+// querySQL.addJoinTable(JOINTYPE.left, "sys_reporttype", "t3", "t1.sys_reportid = t3.sys_reportid and t3.siteid='" + siteid + "'");
|
|
|
+// querySQL.setWhere("t1.systemappid=" + 163 + " and (ifnull(t1.siteid,'')='' or t1.siteid = '" + siteid + "')");
|
|
|
+// querySQL.addQueryFields("name", "if(t1.reporttype = '积木报表', t2.name, t1.name)");
|
|
|
+// querySQL.addQueryFields("type", "group_concat(t3.type separator ',')");
|
|
|
+// querySQL.addGroupBy("t1.sys_reportid", "t1.name", "t2.name");
|
|
|
+// querySQL.setPage(pageSize, pageNumber);
|
|
|
+// Rows query = querySQL.query();
|
|
|
+ Rows query = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
return getSucReturnObject().setData(query).toString();
|
|
|
|
|
|
}
|