@@ -17,7 +17,10 @@ public interface BusTeamRepository extends BaseMapper<BusTeam>{
@Select("<script>select a.*,count(b.TEAM_ID) as teamNumber,sum(b.BLD_AREA) as area from `bus_team` a join `bus_project` b on a.`TEAM_ID`=b.`TEAM_ID` where 1=1 <if test=\"type != null\"> and `TEAM_TYPE` = #{type}</if> GROUP BY TEAM_ID</script>")
@Select("<script>select a.*,count(1) teamNumber,sum(b.BLD_AREA) area from bus_team a,bus_project b where "+
" case when a.TEAM_TYPE = '1' then a.TEAM_ID=b.TEAM_ID_ON else a.TEAM_ID=b.TEAM_ID_OFF end"+
"<if test=\"type != null\"> and TEAM_TYPE = #{type}</if>"+
@@ -116,7 +116,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
* @param energyCountM
* @return
*/
@Select("<script>select SUM(e.WATER) WATER,SUM(e.ELEC) ELEC,SUM(e.GAS) GAS from energy_count_m e where e.PRO_ID=#{proId} and e.`YEAR`=#{year} and e.MON=#{mon} and e.`DAY`=#{day}</script>")
@Select("<script>select SUM(e.WATER) WATER,SUM(e.ELEC) ELEC,SUM(e.GAS) GAS from energy_count_m e where e.PRO_ID=#{proId} and e.`YEAR`=#{year} and e.MON=${mon} and e.`DAY`=${day}</script>")
@@ -134,7 +134,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
* @param energyCountMVo
* @return
*/
@Select("<script>select e.`DAY`,sum(if(e.WATER_MONEY is null,0,e.WATER_MONEY))+sum(if(e.ELEC_MONEY is null,0,e.ELEC_MONEY))+sum(if(e.GAS_MONEY is null,0,e.GAS_MONEY)) MONEY from energy_count_m e where e.PRO_ID=#{proId} and e.`YEAR`=#{year} and e.MON=#{mon} group by e.`DAY`+0 asc</script>")
@Select("<script>select e.`DAY`,sum(if(e.WATER_MONEY is null,0,e.WATER_MONEY))+sum(if(e.ELEC_MONEY is null,0,e.ELEC_MONEY))+sum(if(e.GAS_MONEY is null,0,e.GAS_MONEY)) MONEY from energy_count_m e where e.PRO_ID=#{proId} and e.`YEAR`=#{year} and e.MON=${mon} group by e.`DAY`+0 asc</script>")
@@ -143,7 +143,7 @@ public interface EnergyCountMRepository extends BaseMapper<EnergyCountM> {
* @param energyCountMVo
* @return
*/
@Select("<script>select e.`HOUR`,sum(if(e.WATER_MONEY is null,0,e.WATER_MONEY))+sum(if(e.ELEC_MONEY is null,0,e.ELEC_MONEY))+sum(if(e.GAS_MONEY is null,0,e.GAS_MONEY)) 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>")
@Select("<script>select e.`HOUR`,sum(if(e.WATER_MONEY is null,0,e.WATER_MONEY))+sum(if(e.ELEC_MONEY is null,0,e.ELEC_MONEY))+sum(if(e.GAS_MONEY is null,0,e.GAS_MONEY)) 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>")