|
|
@@ -39,44 +39,44 @@ public interface FailurestatisticsmainMapper extends BaseMapper<Failurestatistic
|
|
|
@Insert(" INSERT INTO Failurestatisticsmain(id,recodedate,wpid,wpname,wtid,wtname,day3top1,day3top2,day3top3,day7top1,day7top2,day7top3,day15top1,day15top2,day15top3,month1top1,month1top2,month1top3,day3top1name,day3top2name,day3top3name,day7top1name,day7top2name,day7top3name,day15top1name,day15top2name,day15top3name,month1top1name,month1top2name,month1top3name,month1topnum,day7topnum,day15topnum,day3topnum,synthesistopnum,day1top1,day1top2,day1top3,day1top1name,day1top2name,day1top3name,day1topnum) VALUES(#{id,jdbcType=VARCHAR},#{recodedate},#{wpid,jdbcType=VARCHAR},#{wpname,jdbcType=VARCHAR},#{wtid,jdbcType=VARCHAR},#{wtname,jdbcType=VARCHAR},#{day3top1,jdbcType=INTEGER},#{day3top2,jdbcType=INTEGER},#{day3top3,jdbcType=INTEGER},#{day7top1,jdbcType=INTEGER},#{day7top2,jdbcType=INTEGER},#{day7top3,jdbcType=INTEGER},#{day15top1,jdbcType=INTEGER},#{day15top2,jdbcType=INTEGER},#{day15top3,jdbcType=INTEGER},#{month1top1,jdbcType=INTEGER},#{month1top2,jdbcType=INTEGER},#{month1top3,jdbcType=INTEGER},#{day3top1name,jdbcType=VARCHAR},#{day3top2name,jdbcType=VARCHAR},#{day3top3name,jdbcType=VARCHAR},#{day7top1name,jdbcType=VARCHAR},#{day7top2name,jdbcType=VARCHAR},#{day7top3name,jdbcType=VARCHAR},#{day15top1name,jdbcType=VARCHAR},#{day15top2name,jdbcType=VARCHAR},#{day15top3name,jdbcType=VARCHAR},#{month1top1name,jdbcType=VARCHAR},#{month1top2name,jdbcType=VARCHAR},#{month1top3name,jdbcType=VARCHAR},#{month1topnum,jdbcType=INTEGER},#{day7topnum,jdbcType=INTEGER},#{day15topnum,jdbcType=INTEGER},#{day3topnum,jdbcType=INTEGER},#{synthesistopnum,jdbcType=INTEGER},#{day1top1,jdbcType=INTEGER},#{day1top2,jdbcType=INTEGER},#{day1top3,jdbcType=INTEGER},#{day1top1name,jdbcType=VARCHAR},#{day1top2name,jdbcType=VARCHAR},#{day1top3name,jdbcType=VARCHAR},#{day1topnum,jdbcType=INTEGER})")
|
|
|
public int insertFailurestatisticsmain(Failurestatisticsmain failurestatisticsmain);
|
|
|
|
|
|
- // @Select(" select s.windpowerstationid wpId,s.windturbineid wtId,max(s.num) eventnum " +
|
|
|
-// "from (select t.windpowerstationid,t.windturbineid,w.id,w.chinesetext,count(*) num " +
|
|
|
-// "from shutdownevent t inner join Warning2 w on t.warningid = w.id where t.stopTime>=#{beginDate} " +
|
|
|
-// "and t.stopTime<=#{endDate} group by t.windpowerstationid,w.id,w.chinesetext,t.windturbineid order by t.windturbineid,num desc) s " +
|
|
|
-// " group by s.windpowerstationid,s.windturbineid order by s.windpowerstationid,eventnum desc,s.windturbineid ")
|
|
|
- @Select("select s.windpowerstationid wpId,s.windturbineid wtId,max(s.num) eventnum from" +
|
|
|
- " (select t.windpowerstationid,t.windturbineid,s.id,s.alerttext,count(*) num " +
|
|
|
- " from shutdownevent t inner join (select n.alerttext,w.faulttime,n.windturbineid,n.stationid id from faulthistory w inner join faultsnap n" +
|
|
|
- " on n.id=w.snapid where w.faulttime >=#{beginDate} " +
|
|
|
- " and w.faulttime <=#{endDate} and w.messagetype=1) s on " +
|
|
|
- " s.windturbineid=t.windturbineid where " +
|
|
|
- " t.stopTime>=#{beginDate} " +
|
|
|
- " and t.stopTime<=#{endDate} and t.statusCode=2 group by t.windpowerstationid,s.id,s.alerttext,t.windturbineid " +
|
|
|
- " order by t.windturbineid,num desc) s group by s.windpowerstationid,s.windturbineid order by s.windpowerstationid,eventnum desc,s.windturbineid ")
|
|
|
+ @Select(" select s.windpowerstationid wpId,s.windturbineid wtId,max(s.num) eventnum " +
|
|
|
+ "from (select t.windpowerstationid,t.windturbineid,w.id,w.chinesetext,count(*) num " +
|
|
|
+ "from shutdownevent t inner join Warning2 w on t.warningid = w.id where t.stopTime>=#{beginDate} " +
|
|
|
+ "and t.stopTime<=#{endDate} group by t.windpowerstationid,w.id,w.chinesetext,t.windturbineid order by t.windturbineid,num desc) s " +
|
|
|
+ " group by s.windpowerstationid,s.windturbineid order by s.windpowerstationid,eventnum desc,s.windturbineid ")
|
|
|
+// @Select("select s.windpowerstationid wpId,s.windturbineid wtId,max(s.num) eventnum from" +
|
|
|
+// " (select t.windpowerstationid,t.windturbineid,s.id,s.alerttext,count(*) num " +
|
|
|
+// " from shutdownevent t inner join (select n.alerttext,w.faulttime,n.windturbineid,n.stationid id from faulthistory w inner join faultsnap n" +
|
|
|
+// " on n.id=w.snapid where w.faulttime >=#{beginDate} " +
|
|
|
+// " and w.faulttime <=#{endDate} and w.messagetype=1) s on " +
|
|
|
+// " s.windturbineid=t.windturbineid where " +
|
|
|
+// " t.stopTime>=#{beginDate} " +
|
|
|
+// " and t.stopTime<=#{endDate} and t.statusCode=2 group by t.windpowerstationid,s.id,s.alerttext,t.windturbineid " +
|
|
|
+// " order by t.windturbineid,num desc) s group by s.windpowerstationid,s.windturbineid order by s.windpowerstationid,eventnum desc,s.windturbineid ")
|
|
|
|
|
|
public List<EventVo> getCountOrderNum(@Param(value = "beginDate")Date beginDate, @Param(value = "endDate")Date endDate);
|
|
|
|
|
|
|
|
|
- // @Select(" select t.windturbineid wtId,w.id warnId,w.chinesetext warnName,count(*) eventnum from shutdownevent t inner join Warning2 w " +
|
|
|
-// "on t.warningid = w.id where t.stopTime>=#{beginDate} and t.stopTime<=#{endDate} group by w.id,w.chinesetext,t.windturbineid " +
|
|
|
-// "order by t.windturbineid,eventnum desc ")
|
|
|
- @Select(" select t.windturbineid wtId,s.id warnId,s.alerttext warnName,count(*) eventnum from shutdownevent t inner " +
|
|
|
- "join(select n.alerttext,w.faulttime,n.windturbineid,n.stationid id from faulthistory w " +
|
|
|
- " inner join faultsnap n on n.id=w.snapid where w.faulttime >=#{beginDate} " +
|
|
|
- " and w.faulttime <=#{endDate} and w.messagetype=1) s on " +
|
|
|
- " s.windturbineid=t.windturbineid and t.stopTime>=#{beginDate}" +
|
|
|
- " and t.stopTime<=#{endDate} and t.statusCode=2 group by s.id,s.alerttext,t.windturbineid " +
|
|
|
- " order by t.windturbineid,eventnum desc ")
|
|
|
+ @Select(" select t.windturbineid wtId,w.id warnId,w.chinesetext warnName,count(*) eventnum from shutdownevent t inner join Warning2 w " +
|
|
|
+ "on t.warningid = w.id where t.stopTime>=#{beginDate} and t.stopTime<=#{endDate} group by w.id,w.chinesetext,t.windturbineid " +
|
|
|
+ "order by t.windturbineid,eventnum desc ")
|
|
|
+// @Select(" select t.windturbineid wtId,s.id warnId,s.alerttext warnName,count(*) eventnum from shutdownevent t inner " +
|
|
|
+// "join(select n.alerttext,w.faulttime,n.windturbineid,n.stationid id from faulthistory w " +
|
|
|
+// " inner join faultsnap n on n.id=w.snapid where w.faulttime >=#{beginDate} " +
|
|
|
+// " and w.faulttime <=#{endDate} and w.messagetype=1) s on " +
|
|
|
+// " s.windturbineid=t.windturbineid and t.stopTime>=#{beginDate}" +
|
|
|
+// " and t.stopTime<=#{endDate} and t.statusCode=2 group by s.id,s.alerttext,t.windturbineid " +
|
|
|
+// " order by t.windturbineid,eventnum desc ")
|
|
|
public List<EventVo> getCountMap(@Param(value = "beginDate")Date beginDate, @Param(value = "endDate")Date endDate);
|
|
|
|
|
|
- // @Select(" select t.id,t.windTurbineId,t.warningId,w.chinesetext warnDesc,t.stopTime,t.startTime,t.stopHours,t.lossPower from shutdownevent t " +
|
|
|
-// "inner join Warning2 w on t.warningid = w.id where t.stopTime>=#{beginDate} and t.stopTime<=#{endDate} order by t.windturbineid,t.starttime desc ")
|
|
|
- @Select("select t.id,t.windTurbineId,s.warningId,s.alerttext warnDesc,t.stopTime,t.startTime,t.stopHours,t.lossPower" +
|
|
|
- " from shutdownevent t inner join (select n.alerttext,w.faulttime,n.windturbineid,n.stationid warningId from faulthistory w " +
|
|
|
- " inner join faultsnap n on n.id=w.snapid where w.faulttime >=#{beginDate} " +
|
|
|
- " and w.faulttime <=#{endDate} and w.messagetype=1) s on " +
|
|
|
- " s.windturbineid=t.windturbineid " +
|
|
|
- " where t.stopTime>=#{beginDate}" +
|
|
|
- " and t.stopTime<=#{endDate} and t.statusCode=2 order by t.windturbineid,t.starttime desc ")
|
|
|
+ @Select(" select t.id,t.windTurbineId,t.warningId,w.chinesetext warnDesc,t.stopTime,t.startTime,t.stopHours,t.lossPower from shutdownevent t " +
|
|
|
+ "inner join Warning2 w on t.warningid = w.id where t.stopTime>=#{beginDate} and t.stopTime<=#{endDate} order by t.windturbineid,t.starttime desc ")
|
|
|
+// @Select("select t.id,t.windTurbineId,s.warningId,s.alerttext warnDesc,t.stopTime,t.startTime,t.stopHours,t.lossPower" +
|
|
|
+// " from shutdownevent t inner join (select n.alerttext,w.faulttime,n.windturbineid,n.stationid warningId from faulthistory w " +
|
|
|
+// " inner join faultsnap n on n.id=w.snapid where w.faulttime >=#{beginDate} " +
|
|
|
+// " and w.faulttime <=#{endDate} and w.messagetype=1) s on " +
|
|
|
+// " s.windturbineid=t.windturbineid " +
|
|
|
+// " where t.stopTime>=#{beginDate}" +
|
|
|
+// " and t.stopTime<=#{endDate} and t.statusCode=2 order by t.windturbineid,t.starttime desc ")
|
|
|
public List<ShutdowneventVo> getEventMap(@Param(value = "beginDate")Date beginDate, @Param(value = "endDate")Date endDate);
|
|
|
}
|