Forráskód Böngészése

修正升压站报警异常

shilin 1 éve
szülő
commit
ca0ff03f66

+ 21 - 1
alarm-service/src/main/java/com/gyee/alarm/mapper/auto/AlarmTsMapper.java

@@ -87,8 +87,28 @@ public interface AlarmTsMapper extends BaseMapper<AlarmTs> {
 
                     );
 
+    @Update("ALTER  table  ${tbName}  set TAG  " +
+            "alarmid=#{alarmid}, alarmtype=#{alarmtype}," +
+            "characteristic=#{characteristic}, components=#{components},description=#{description}, deviceid=#{deviceid}, devicename=#{devicename}," +
+            "devicetype=#{devicetype}, enabled=#{enabled}, lineid=#{lineid}, linename=#{linename},modelId= #{modelId}, projectid=#{projectid}," +
+            "projectname=#{projectname}, rank=#{rank}, resettable=#{resettable}, stationid=#{stationid}, stationname=#{stationname}, subcomponents=#{subcomponents}," +
+            "suffix=#{suffix}, tagid= #{tagid}, triggertype=#{triggertype}, uniformcode=#{uniformcode},name=#{name}, nemCode=#{nemCode}, faultCause=#{faultCause}, resolvent=#{resolvent},faultType=#{faultType},aname=#{aname} "
+            )
+    int updateTable(@Param("tbName") String tbName, @Param("alarmid") String alarmid, @Param("alarmtype") String alarmtype,
+                    @Param("characteristic") String characteristic, @Param("components") String components,
+                    @Param("description") String description,
+                    @Param("deviceid") String deviceid, @Param("devicename") String devicename,
+                    @Param("devicetype") String devicetype, @Param("enabled") Boolean enabled,
+                    @Param("lineid") String lineid, @Param("linename") String linename,
+                    @Param("modelId") String modelId, @Param("projectid") String projectid,
+                    @Param("projectname") String projectname, @Param("rank") Integer rank,
+                    @Param("resettable") Boolean resettable, @Param("stationid") String stationid,
+                    @Param("stationname") String stationname, @Param("subcomponents") String subcomponents,
+                    @Param("suffix") String suffix, @Param("tagid") String tagid,
+                    @Param("triggertype") Integer triggertype, @Param("uniformcode") String uniformcode, @Param("superTableName") String superTableName,
+                    @Param("name") String name, @Param("nemCode") String nemCode, @Param("faultCause") String faultCause, @Param("resolvent") String resolvent, @Param("faultType") String faultType, @Param("aname") String aname
 
-
+    );
     @Update("create table  if not exists ${tbName} using ${superTableName} tags( #{alarmid}, #{alarmtype}," +
             "#{characteristic}, #{components}, #{description}, #{deviceid}, #{devicename}," +
             "#{devicetype}, #{enabled}, #{lineid}, #{linename}, #{modelId}, #{projectid}," +

+ 14 - 1
alarm-service/src/main/java/com/gyee/alarm/service/AlarmBtService.java

@@ -78,7 +78,20 @@ public class AlarmBtService {
                         vo.getName(),
                         vo.getNemCode(),vo.getFaultCause(),vo.getResolvent(),vo.getFaultType(),vo.getAname());
 
-
+                alarmTsService.updateTable(vo.getTbName(), vo.getAlarmid(), vo.getAlarmtype(),
+                        vo.getCharacteristic(), vo.getComponents(),
+                        vo.getDescription(),
+                        vo.getDeviceid(), vo.getDevicename(),
+                        vo.getDevicetype(), vo.getEnabled(),
+                        vo.getLineid(), vo.getLinename(),
+                        vo.getModelId(), vo.getProjectid(),
+                        vo.getProjectname(), vo.getRank(),
+                        vo.getResettable(), vo.getStationid(),
+                        vo.getStationname(), vo.getSubcomponents(),
+                        vo.getSuffix(), vo.getTagid(),
+                        vo.getTriggertype(), vo.getUniformcode(), vo.getSuperTableName(),
+                        vo.getName(),
+                        vo.getNemCode(),vo.getFaultCause(),vo.getResolvent(),vo.getFaultType(),vo.getAname());
 
             }
         }

+ 14 - 1
alarm-service/src/main/java/com/gyee/alarm/service/AlarmCtService.java

@@ -77,7 +77,20 @@ public class AlarmCtService {
                         vo.getTriggertype(), vo.getUniformcode(),
                         vo.getSuperTableName(),vo.getName(),
                         vo.getNemCode(),vo.getFaultCause(),vo.getResolvent(),vo.getFaultType(),vo.getAname());
-
+                alarmTsService.updateTable(vo.getTbName(), vo.getAlarmid(), vo.getAlarmtype(),
+                        vo.getCharacteristic(), vo.getComponents(),
+                        vo.getDescription(),
+                        vo.getDeviceid(), vo.getDevicename(),
+                        vo.getDevicetype(), vo.getEnabled(),
+                        vo.getLineid(), vo.getLinename(),
+                        vo.getModelId(), vo.getProjectid(),
+                        vo.getProjectname(), vo.getRank(),
+                        vo.getResettable(), vo.getStationid(),
+                        vo.getStationname(), vo.getSubcomponents(),
+                        vo.getSuffix(), vo.getTagid(),
+                        vo.getTriggertype(), vo.getUniformcode(), vo.getSuperTableName(),
+                        vo.getName(),
+                        vo.getNemCode(),vo.getFaultCause(),vo.getResolvent(),vo.getFaultType(),vo.getAname());
 //                AlarmTag po = new AlarmTag();
 //                po.setId(vo.getTbName());
 //                po.setVal(0.0);

+ 14 - 1
alarm-service/src/main/java/com/gyee/alarm/service/AlarmInService.java

@@ -86,7 +86,20 @@ public class AlarmInService {
                         vo.getTriggertype(), vo.getUniformcode(),vo.getSuperTableName(),
                         vo.getName(),
                         vo.getNemCode(),vo.getFaultCause(),vo.getResolvent(),vo.getFaultType(),vo.getAname());
-
+                alarmTsService.updateTable(vo.getTbName(), vo.getAlarmid(), vo.getAlarmtype(),
+                        vo.getCharacteristic(), vo.getComponents(),
+                        vo.getDescription(),
+                        vo.getDeviceid(), vo.getDevicename(),
+                        vo.getDevicetype(), vo.getEnabled(),
+                        vo.getLineid(), vo.getLinename(),
+                        vo.getModelId(), vo.getProjectid(),
+                        vo.getProjectname(), vo.getRank(),
+                        vo.getResettable(), vo.getStationid(),
+                        vo.getStationname(), vo.getSubcomponents(),
+                        vo.getSuffix(), vo.getTagid(),
+                        vo.getTriggertype(), vo.getUniformcode(), vo.getSuperTableName(),
+                        vo.getName(),
+                        vo.getNemCode(),vo.getFaultCause(),vo.getResolvent(),vo.getFaultType(),vo.getAname());
 
             }
         }

+ 15 - 0
alarm-service/src/main/java/com/gyee/alarm/service/AlarmWtService.java

@@ -116,6 +116,21 @@ public class AlarmWtService {
                         vo.getName(),
                         vo.getNemCode(), vo.getFaultCause(), vo.getResolvent(), vo.getFaultType(), vo.getAname());
 
+
+                alarmTsService.updateTable(vo.getTbName(), vo.getAlarmid(), vo.getAlarmtype(),
+                        vo.getCharacteristic(), vo.getComponents(),
+                        vo.getDescription(),
+                        vo.getDeviceid(), vo.getDevicename(),
+                        vo.getDevicetype(), vo.getEnabled(),
+                        vo.getLineid(), vo.getLinename(),
+                        vo.getModelId(), vo.getProjectid(),
+                        vo.getProjectname(), vo.getRank(),
+                        vo.getResettable(), vo.getStationid(),
+                        vo.getStationname(), vo.getSubcomponents(),
+                        vo.getSuffix(), vo.getTagid(),
+                        vo.getTriggertype(), vo.getUniformcode(), vo.getSuperTableName(),
+                        vo.getName(),
+                        vo.getNemCode(),vo.getFaultCause(),vo.getResolvent(),vo.getFaultType(),vo.getAname());
 //                AlarmTag po=new AlarmTag();
 //                po.setId(vo.getTbName());
 //                if(valuemap.containsKey(vo.getTagid()))

+ 15 - 0
alarm-service/src/main/java/com/gyee/alarm/service/auto/IAlarmTsService.java

@@ -38,7 +38,22 @@ public interface IAlarmTsService extends IService<AlarmTs> {
 
     );
 
+    public int updateTable(String tbName, String alarmid, String alarmtype,
+                           String characteristic, String components,
+                           String description,
+                           String deviceid, String devicename,
+                           String devicetype, Boolean enabled,
+                           String lineid, String linename,
+                           String modelId, String projectid,
+                           String projectname, Integer rank,
+                           Boolean resettable, String stationid,
+                           String stationname, String subcomponents,
+                           String suffix, String tagid,
+                           Integer triggertype, String uniformcode, String superTableName,
+                           String name,String nemCode, String faultCause, String resolvent,String faultType,String aname
+
 
+    );
 
     public int insertOne(AlarmTs one);
 

+ 31 - 0
alarm-service/src/main/java/com/gyee/alarm/service/auto/impl/AlarmTsServiceImpl.java

@@ -66,6 +66,37 @@ public class AlarmTsServiceImpl extends ServiceImpl<AlarmTsMapper, AlarmTs> impl
     }
 
 
+    public int updateTable(String tbName, String alarmid, String alarmtype,
+                           String characteristic, String components,
+                           String description,
+                           String deviceid, String devicename,
+                           String devicetype, Boolean enabled,
+                           String lineid, String linename,
+                           String modelId, String projectid,
+                           String projectname, Integer rank,
+                           Boolean resettable, String stationid,
+                           String stationname, String subcomponents,
+                           String suffix, String tagid,
+                           Integer triggertype, String uniformcode, String superTableName,
+                           String name,String nemCode, String faultCause, String resolvent,String faultType,String aname
+
+
+    ) {
+        return alarmTsMapper.updateTable(tbName, alarmid, alarmtype,
+                characteristic, components,
+                description,
+                deviceid, devicename,
+                devicetype, enabled,
+                lineid, linename,
+                modelId, projectid,
+                projectname, rank,
+                resettable, stationid,
+                stationname, subcomponents,
+                suffix, tagid,
+                triggertype, uniformcode,superTableName,   name, nemCode,  faultCause,  resolvent,faultType,aname);
+    }
+
+
     public int createTable(AlarmVo vo) {
         return alarmTsMapper.createTable(vo);
     }