Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhny
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王夏晖
zhny
Commits
bfe71a09
Commit
bfe71a09
authored
May 17, 2018
by
jichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改表名
parent
a5caa609
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
EnergyCountMRepository.java
...rcisoft/business/overview/dao/EnergyCountMRepository.java
+3
-3
No files found.
src/main/java/org/rcisoft/business/overview/dao/EnergyCountMRepository.java
View file @
bfe71a09
...
@@ -26,7 +26,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
...
@@ -26,7 +26,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
@Select
(
"<script>select sum(WATER) as water,sum(WATER_MONEY) as waterMoney,"
+
@Select
(
"<script>select sum(WATER) as water,sum(WATER_MONEY) as waterMoney,"
+
"sum(ELEC) as elec,sum(ELEC_MONEY) as elecMoney,"
+
"sum(ELEC) as elec,sum(ELEC_MONEY) as elecMoney,"
+
"sum(GAS) as gas,sum(GAS_MONEY) as gasMoney"
+
"sum(GAS) as gas,sum(GAS_MONEY) as gasMoney"
+
" from
ENERGY_COUNT_M
e "
+
" from
energy_count_m
e "
+
"where e.PRO_ID=#{proId} and `year`=#{year}"
+
"where e.PRO_ID=#{proId} and `year`=#{year}"
+
"<if test=\"day != null\"> and `day`=${day} group by e.`day`</if>"
+
"<if test=\"day != null\"> and `day`=${day} group by e.`day`</if>"
+
"<if test=\"mon != null\"> and mon=${mon} group by e.mon</if></script>"
)
"<if test=\"mon != null\"> and mon=${mon} group by e.mon</if></script>"
)
...
@@ -42,7 +42,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
...
@@ -42,7 +42,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
"<if test=\"type == 1\">sum(e.WATER_MONEY)</if>"
+
"<if test=\"type == 1\">sum(e.WATER_MONEY)</if>"
+
"<if test=\"type == 2\">sum(e.ELEC_MONEY)</if>"
+
"<if test=\"type == 2\">sum(e.ELEC_MONEY)</if>"
+
"<if test=\"type == 3\">sum(e.GAS_MONEY)</if>"
+
"<if test=\"type == 3\">sum(e.GAS_MONEY)</if>"
+
" as MONEY from
ENERGY_COUNT_M
e"
+
" as MONEY from
energy_count_m
e"
+
" where e.PRO_ID=#{proId} and e.`YEAR`=#{year} and e.MON=${mon} and e.`DAY`=${day} group by e.`HOUR`+0 asc</script>"
)
" where e.PRO_ID=#{proId} and e.`YEAR`=#{year} and e.MON=${mon} and e.`DAY`=${day} group by e.`HOUR`+0 asc</script>"
)
@ResultMap
(
"resultMapVo"
)
@ResultMap
(
"resultMapVo"
)
List
<
EnergyCountMVo
>
countDailyPrice
(
EnergyCountMVo
energyCountMVo
);
List
<
EnergyCountMVo
>
countDailyPrice
(
EnergyCountMVo
energyCountMVo
);
...
@@ -82,7 +82,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
...
@@ -82,7 +82,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
"<if test=\"type == 1\">sum(e.WATER_MONEY)</if>"
+
"<if test=\"type == 1\">sum(e.WATER_MONEY)</if>"
+
"<if test=\"type == 2\">sum(e.ELEC_MONEY)</if>"
+
"<if test=\"type == 2\">sum(e.ELEC_MONEY)</if>"
+
"<if test=\"type == 3\">sum(e.GAS_MONEY)</if>"
+
"<if test=\"type == 3\">sum(e.GAS_MONEY)</if>"
+
" as MONEY from
ENERGY_COUNT_M
e where e.PRO_ID=#{proId} and e.`YEAR`=#{year} and e.MON=${mon}"
+
" as MONEY from
energy_count_m
e where e.PRO_ID=#{proId} and e.`YEAR`=#{year} and e.MON=${mon}"
+
"<if test=\"hour != null\"> and e.HOUR <= #{hour}</if>"
+
"<if test=\"hour != null\"> and e.HOUR <= #{hour}</if>"
+
" group by e.`DAY`+0 asc) a order by a.MONEY desc</script>"
)
" group by e.`DAY`+0 asc) a order by a.MONEY desc</script>"
)
@ResultMap
(
"resultMapVo"
)
@ResultMap
(
"resultMapVo"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment