Browse Source

宁夏分公司代码修改,修改查询条件

shilin 3 weeks ago
parent
commit
ddf0b2f634

+ 6 - 2
alarm-web/src/main/java/com/gyee/alarm/mapper/auto/AlarmTsMapper.java

@@ -215,6 +215,9 @@ public interface AlarmTsMapper extends BaseMapper<AlarmTs> {
             "<if test='components != null'>",
             "and components in (${components}) ",
             "</if>",
+            "<if test='subcomponents != null'>",
+            "and subcomponents in (${subcomponents}) ",
+            "</if>",
             "<if test='stationid != null'>",
             "and stationid = #{stationid}",
             "</if>",
@@ -235,7 +238,7 @@ public interface AlarmTsMapper extends BaseMapper<AlarmTs> {
             "</where>",
 
             "</script>"})
-    List<Integer> selectByWtCount(@Param("begin")long begin,@Param("end")long end,@Param("modelId")String modelId,@Param("superTableName") String superTableName,@Param("alarmType")String alarmType,@Param("stationid")String stationid,@Param("deviceid")String deviceid,@Param("description")String description, @Param("deviceType")String deviceType, @Param("components")String components,@Param("alarmid")String alarmid, @Param("isclose")Boolean isclose);
+    List<Integer> selectByWtCount(@Param("begin")long begin,@Param("end")long end,@Param("modelId")String modelId,@Param("superTableName") String superTableName,@Param("alarmType")String alarmType,@Param("stationid")String stationid,@Param("deviceid")String deviceid,@Param("description")String description, @Param("deviceType")String deviceType, @Param("components")String components,@Param("alarmid")String alarmid, @Param("isclose")Boolean isclose, @Param("subcomponents")String subcomponents);
 //    @Select("select deviceid as wtId,stationid as stationId,alarmid,description,components as typeCode,max(timeLong) as maxSeconds,min(timeLong) as minSeconds,avg(timeLong) as avgSeconds,sum(timeLong) as totalSeconds,count(*) as total from alarmWt where ts>=#{begin} and ts<=#{end}  and alarmtype='windturbine'  and #{begin} group by deviceid,components,stationid,alarmid,description")
 
     @Select({"<script>",
@@ -247,7 +250,8 @@ public interface AlarmTsMapper extends BaseMapper<AlarmTs> {
             "and stationid = #{stationid}",
 
             "<if test='alarmid != null'>",
-            "and alarmid in (${alarmid}) ",
+//            "and alarmid in (${alarmid}) ",
+            "and characteristic like #{alarmid}",
             "</if>",
             "<if test='components != null'>",
             "and components in (${components}) ",

+ 1 - 1
alarm-web/src/main/java/com/gyee/alarm/service/AlarmHistoryService.java

@@ -395,7 +395,7 @@ public class AlarmHistoryService   {
 
 
         map.put("ls",vos);
-        List<Integer> total=alarmTsMapper.selectByWtCount(begin,end,modelId,superTableName, alarmType, stationid, deviceid, description,deviceType,components,alarmId,isclose);
+        List<Integer> total=alarmTsMapper.selectByWtCount(begin,end,modelId,superTableName, alarmType, stationid, deviceid, description,deviceType,components,alarmId,isclose,subcomponents);
 
         if(!total.isEmpty())
         {