Commit 16b1e5c8 authored by neo's avatar neo

[bugfix] fixed datasource query xml join two table with projecti d

parent 832950c9
...@@ -35,15 +35,17 @@ ...@@ -35,15 +35,17 @@
JOIN JOIN
PERIOD_CELL_DATA_SOURCE CDS PERIOD_CELL_DATA_SOURCE CDS
ON ON
DS.ID = CDS.DATA_SOURCE_ID DS.ID = CDS.DATA_SOURCE_ID AND DS.PROJECT_ID=CDS.PROJECT_ID
JOIN JOIN
PERIOD_CELL_DATA CD PERIOD_CELL_DATA CD
ON ON
CDS.CELL_DATA_ID = CD.ID CDS.CELL_DATA_ID = CD.ID
AND CDS.PROJECT_ID=CD.PROJECT_ID
JOIN JOIN
PERIOD_REPORT RPT PERIOD_REPORT RPT
ON ON
CD.REPORT_ID= RPT.ID CD.REPORT_ID= RPT.ID
AND CD.PROJECT_ID=RPT.PROJECT_ID
WHERE WHERE
CD.REPORT_ID = #{reportID,jdbcType=BIGINT} CD.REPORT_ID = #{reportID,jdbcType=BIGINT}
...@@ -75,7 +77,7 @@ ...@@ -75,7 +77,7 @@
JOIN JOIN
PERIOD_DATA_SOURCE DS PERIOD_DATA_SOURCE DS
ON ON
CDS.DATA_SOURCE_ID = DS.ID CDS.DATA_SOURCE_ID = DS.ID AND CDS.PROJECT_ID = DS.PROJECT_ID
WHERE WHERE
DS.TYPE = 10 DS.TYPE = 10
AND CDS.CELL_DATA_ID = #{cellDataID,jdbcType=BIGINT} AND CDS.CELL_DATA_ID = #{cellDataID,jdbcType=BIGINT}
...@@ -109,7 +111,7 @@ ...@@ -109,7 +111,7 @@
JOIN JOIN
PERIOD_CELL_DATA_SOURCE CELLDATASOURCE PERIOD_CELL_DATA_SOURCE CELLDATASOURCE
ON ON
CELLDATA.ID = CELLDATASOURCE.CELL_DATA_ID CELLDATA.ID = CELLDATASOURCE.CELL_DATA_ID AND CELLDATA.PROJECT_ID = CELLDATASOURCE.PROJECT_ID
WHERE WHERE
CELLDATASOURCE.DATA_SOURCE_ID = #{dataSourceID,jdbcType=BIGINT} LIMIT 1 CELLDATASOURCE.DATA_SOURCE_ID = #{dataSourceID,jdbcType=BIGINT} LIMIT 1
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment