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

报警规则表结构修改

shilin 2 éve
szülő
commit
a58fcca643

+ 3 - 3
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/Alertrule2.java

@@ -64,7 +64,7 @@ public class Alertrule2 implements Serializable {
      *
      * @mbg.generated
      */
-    private Integer enabled;
+    private Boolean enabled;
 
     /**
      *
@@ -325,7 +325,7 @@ public class Alertrule2 implements Serializable {
      *
      * @mbg.generated
      */
-    public Integer getEnabled() {
+    public Boolean getEnabled() {
         return enabled;
     }
 
@@ -337,7 +337,7 @@ public class Alertrule2 implements Serializable {
      *
      * @mbg.generated
      */
-    public void setEnabled(Integer enabled) {
+    public void setEnabled(Boolean enabled) {
         this.enabled = enabled;
     }
 

+ 10 - 10
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/Alertrule2Example.java

@@ -624,52 +624,52 @@ public class Alertrule2Example {
             return (Criteria) this;
         }
 
-        public Criteria andEnabledEqualTo(Integer value) {
+        public Criteria andEnabledEqualTo(Boolean value) {
             addCriterion("ENABLED =", value, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledNotEqualTo(Integer value) {
+        public Criteria andEnabledNotEqualTo(Boolean value) {
             addCriterion("ENABLED <>", value, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledGreaterThan(Integer value) {
+        public Criteria andEnabledGreaterThan(Boolean value) {
             addCriterion("ENABLED >", value, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledGreaterThanOrEqualTo(Integer value) {
+        public Criteria andEnabledGreaterThanOrEqualTo(Boolean value) {
             addCriterion("ENABLED >=", value, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledLessThan(Integer value) {
+        public Criteria andEnabledLessThan(Boolean value) {
             addCriterion("ENABLED <", value, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledLessThanOrEqualTo(Integer value) {
+        public Criteria andEnabledLessThanOrEqualTo(Boolean value) {
             addCriterion("ENABLED <=", value, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledIn(List<Integer> values) {
+        public Criteria andEnabledIn(List<Boolean> values) {
             addCriterion("ENABLED in", values, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledNotIn(List<Integer> values) {
+        public Criteria andEnabledNotIn(List<Boolean> values) {
             addCriterion("ENABLED not in", values, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledBetween(Integer value1, Integer value2) {
+        public Criteria andEnabledBetween(Boolean value1, Boolean value2) {
             addCriterion("ENABLED between", value1, value2, "enabled");
             return (Criteria) this;
         }
 
-        public Criteria andEnabledNotBetween(Integer value1, Integer value2) {
+        public Criteria andEnabledNotBetween(Boolean value1, Boolean value2) {
             addCriterion("ENABLED not between", value1, value2, "enabled");
             return (Criteria) this;
         }

+ 143 - 204
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -50,7 +50,7 @@ public class GenreSetPushService {
     private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
     @Resource
     private RecommenmainService recommenmainService;
-
+    private final String QY = "QY";
     private final String ZC = "ZC";
     private final String JZ = "JZ";
     private final String QS = "0";
@@ -1054,7 +1054,7 @@ public class GenreSetPushService {
             }
 
 
-            if (id.equals(QS)) {
+            if (id.equals(QY+QS)) {
                 // 减排二氧化碳
                 Windpowerstationpointnew temppoint = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.TPOINT_JPEYHT);
                 int jpeyht = (int) (realApiUtil.getRealData(temppoint).getPointValueInDouble() * 10000);
@@ -1103,6 +1103,7 @@ public class GenreSetPushService {
 
             c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
             int daynum = c.get(Calendar.DAY_OF_MONTH);
+
             List<WpMttrAndMtbMonth> mmls = wpMttrAndMtbMonthService.getMttrAndMtbf(id, tempyear, tempmonth);
 
             if (!mmls.isEmpty()) {
@@ -2248,7 +2249,7 @@ public class GenreSetPushService {
             }
 
 
-            if (id.equals(QS)) {
+            if (id.equals(QY+QS)) {
                 // 减排二氧化碳
                 Windpowerstationpointnew temppoint = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.TPOINT_JPEYHT);
                 int jpeyht = (int) (realApiUtil.getRealData(temppoint).getPointValueInDouble() * 10000);
@@ -2388,17 +2389,18 @@ public class GenreSetPushService {
                     templs = InitialRunner.wpallls;
                 }
                 for (Windpowerstation wp : templs) {
-                    if (id.equals(FD)) {
-                        if (wp.getId().endsWith("FDC")) {
-                            wplist.add(wp);
-                        }
-                    } else if (id.equals(GF)) {
-                        if (wp.getId().endsWith("GDC")) {
-                            wplist.add(wp);
-                        }
-                    } else if (id.equals(QS)) {
-                        wplist.add(wp);
-                    } else if (id.indexOf(FD) > 0) {
+//                    if (id.equals(FD)) {
+//                        if (wp.getId().endsWith("FDC")) {
+//                            wplist.add(wp);
+//                        }
+//                    } else if (id.equals(GF)) {
+//                        if (wp.getId().endsWith("GDC")) {
+//                            wplist.add(wp);
+//                        }
+//                    } else if (id.equals(QS)) {
+//                        wplist.add(wp);
+//                    } else
+                    if (id.indexOf(FD) > 0) {
                         if (wp.getId().endsWith("FDC")) {
                             wplist.add(wp);
                         }
@@ -2415,28 +2417,28 @@ public class GenreSetPushService {
 
                 //待机台数
                 Double djnum = 0.0;
-                //手动停机台数
-                Double sdtjnum = 0.0;
+//                //手动停机台数
+//                Double sdtjnum = 0.0;
                 //正常发电台数
                 Double zcfdnum = 0.0;
-                //缺陷降出力台数
-                Double qxjclnum = 0.0;
+//                //缺陷降出力台数
+//                Double qxjclnum = 0.0;
                 // 限电降出力台数
                 Double xdjclnum = 0.0;
                 // 限电停机台数
                 Double xdtjnum = 0.0;
                 // 故障停机台数
                 Double gztjnum = 0.0;
-                // 场内受累停机台数
-                Double cnsltjnum = 0.0;
+//                // 场内受累停机台数
+//                Double cnsltjnum = 0.0;
                 // 检修停机台数
                 Double jxtjnum = 0.0;
-                // 场内受累检修台数
-                Double cnsljxnum = 0.0;
-                // 电网受累台数
-                Double dwslnum = 0.0;
-                // 环境受累台数
-                Double hjslnum = 0.0;
+//                // 场内受累检修台数
+//                Double cnsljxnum = 0.0;
+//                // 电网受累台数
+//                Double dwslnum = 0.0;
+//                // 环境受累台数
+//                Double hjslnum = 0.0;
                 // 风机离线台数
                 Double lxnum = 0.0;
                 for (Windpowerstation wp : wplist) {
@@ -2450,7 +2452,7 @@ public class GenreSetPushService {
                         List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
                         for (Windturbine wt : wtls) {
                             //明细状态
-                            fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.ZTMX).getCode());
+                            fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
                         }
                     } else if (wp.getId().endsWith("GDC") && InitialRunner.gp_nbqmap.containsKey(wp.getId())) {
                         List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wp.getId());
@@ -2464,26 +2466,56 @@ public class GenreSetPushService {
                     List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
                     List<PointData> gfzblist = realApiUtil.getRealData(gfzbls);
 
+
+
                     if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
 
-                        if (wp.getId().endsWith("FDC") && InitialRunner.wp_wtmap.containsKey(wp.getId())) {
-                            List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
-                            for (Windturbine wt : wtls) {
-                                //明细状态
-                                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.ZTMX).getCode());
-                            }
-                        } else if (wp.getId().endsWith("GDC") && InitialRunner.gp_nbqmap.containsKey(wp.getId())) {
-                            List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wp.getId());
-                            for (Inverter wt : wtls) {
-                                //状态
-                                gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
+
+                        for (int i = 0; i < fjzblist.size(); i++) {
+
+
+                            double fjzt = MathUtil.twoBit(MathUtil.twoBit(fjzblist.get(i).getPointValueInDouble()));
+
+                            switch (Double.valueOf(fjzt).intValue()) {
+                                case 0:
+                                    djnum++;
+                                    break;
+                                case 1:
+                                    zcfdnum++;
+                                    break;
+                                case 2:
+                                    gztjnum++;
+                                    break;
+                                case 3:
+                                    lxnum++;
+                                    break;
+                                case 4:
+                                    jxtjnum++;
+                                    break;
+                                case 5:
+                                    xdjclnum++;
+                                    break;
+                                case 6:
+                                    xdtjnum++;
+                                    break;
+
+                                default:
+
+                                    break;
                             }
                         }
 
+                        mxztmap.put("fd_djts", djnum);
+                        mxztmap.put("fd_yxts", zcfdnum);
+                        mxztmap.put("fd_xdjclts", xdjclnum);
+                        mxztmap.put("fd_xdtjts", xdtjnum);
+                        mxztmap.put("fd_gzts", gztjnum);
+                        mxztmap.put("fd_jxts", jxtjnum);
+                        mxztmap.put("fd_lxts", lxnum);
+                        mxztmap.put("fd_jrts", djnum +  zcfdnum +  gztjnum +  jxtjnum + xdjclnum + xdtjnum + lxnum);
                     }
 
                     if (!gfzblist.isEmpty() && gfzblist.size() == gfzblist.size()) {
-
                         for (int i = 0; i < gfzblist.size(); i++) {
                             double gfzt = MathUtil.twoBit(MathUtil.twoBit(gfzblist.get(i).getPointValueInDouble()));
                             switch (Double.valueOf(gfzt).intValue()) {
@@ -2506,7 +2538,7 @@ public class GenreSetPushService {
                                     xdjclnum++;
                                     break;
                                 case 6:
-                                    xdjclnum++;
+                                    xdtjnum++;
                                     break;
 
                                 default:
@@ -2514,26 +2546,21 @@ public class GenreSetPushService {
                                     break;
                             }
                         }
+
                     }
+                    mxztmap.put("gf_djts", djnum);
+                    mxztmap.put("gf_yxts", zcfdnum);
+                    mxztmap.put("gf_xdjclts", xdjclnum);
+                    mxztmap.put("gf_xdtjts", xdtjnum);
+                    mxztmap.put("gf_gzts", gztjnum);
+                    mxztmap.put("gf_jxts", jxtjnum);
+                    mxztmap.put("gf_lxts", lxnum);
+                    mxztmap.put("gf_jrts", djnum +  zcfdnum +  gztjnum +  jxtjnum + xdjclnum + xdtjnum + lxnum);
 
                 }
 
-                mxztmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
 
 
-                mxztmap.put("djts", djnum);
-                mxztmap.put("sdtjts", sdtjnum);
-                mxztmap.put("yxts", zcfdnum);
-                mxztmap.put("fdjclts", qxjclnum);
-                mxztmap.put("xdjclts", xdjclnum);
-                mxztmap.put("xdtjts", xdtjnum);
-                mxztmap.put("gzts", gztjnum);
-                mxztmap.put("cnslgzts", cnsltjnum);
-                mxztmap.put("jxts", jxtjnum);
-                mxztmap.put("cnsljxts", cnsljxnum);
-                mxztmap.put("dwslts", dwslnum);
-                mxztmap.put("hjslts", hjslnum);
-                mxztmap.put("lxts", lxnum);
 
             } else {
 
@@ -2565,139 +2592,77 @@ public class GenreSetPushService {
                 Double lxnum = 0.0;
 
 
-                if (id.endsWith("FDC")) {
-                    List<String> mxztls = new ArrayList<>();
-                    //待机台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.DJNUM).getCode());
-                    //手动停机台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.TJNUM).getCode());
-                    //正常发电台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.FDNUM).getCode());
-                    // 缺陷降出力台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.FDJCLNUM).getCode());
-                    // 限电降出力台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.XDJCLNUM).getCode());
-                    // 限电停机台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.XDTJNUM).getCode());
-                    // 故障停机台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.GZNUM).getCode());
-                    // 场内受累停机台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.CNGZNUM).getCode());
-                    // 检修停机台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.JXNUM).getCode());
-                    // 场内受累检修台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.CNJXNUM).getCode());
-                    // 电网受累台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.DWSLNUM).getCode());
-                    // 环境受累台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.HJSLNUM).getCode());
-                    // 风机离线台数
-                    mxztls.add(windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(id, Constant.LXNUM).getCode());
+                List<String> fjzbls = new ArrayList<>();
+                List<String> gfzbls = new ArrayList<>();
+                //光伏没有明细计算点,所以区分开
+                if (id.endsWith("FDC") && InitialRunner.wp_wtmap.containsKey(id)) {
+                    List<Windturbine> wtls = InitialRunner.wp_wtmap.get(id);
+                    for (Windturbine wt : wtls) {
+                        //明细状态
+                        fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                    }
 
+                    List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
 
-                    List<PointData> mxztlist = realApiUtil.getRealData(mxztls);
+                    if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
 
-                    if (!mxztlist.isEmpty() && mxztlist.size() == mxztls.size()) {
 
+                        for (int i = 0; i < fjzblist.size(); i++) {
+
+
+                            double fjzt = MathUtil.twoBit(MathUtil.twoBit(fjzblist.get(i).getPointValueInDouble()));
+
+                            switch (Double.valueOf(fjzt).intValue()) {
+                                case 0:
+                                    djnum++;
+                                    break;
+                                case 1:
+                                    zcfdnum++;
+                                    break;
+                                case 2:
+                                    gztjnum++;
+                                    break;
+                                case 3:
+                                    lxnum++;
+                                    break;
+                                case 4:
+                                    jxtjnum++;
+                                    break;
+                                case 5:
+                                    xdjclnum++;
+                                    break;
+                                case 6:
+                                    xdtjnum++;
+                                    break;
+
+                                default:
+
+                                    break;
+                            }
+                        }
 
-                        //待机台数
-                        djnum = MathUtil.twoBit(mxztlist.get(0).getPointValueInDouble());
                         mxztmap.put("djts", djnum);
-                        //手动停机台数
-                        sdtjnum = MathUtil.twoBit(mxztlist.get(1).getPointValueInDouble());
-                        mxztmap.put("sdtjts", sdtjnum);
-                        //正常发电台数
-                        zcfdnum = MathUtil.twoBit(mxztlist.get(2).getPointValueInDouble());
                         mxztmap.put("yxts", zcfdnum);
-                        //缺陷降出力台数
-                        qxjclnum = MathUtil.twoBit(mxztlist.get(3).getPointValueInDouble());
-                        mxztmap.put("fdjclts", qxjclnum);
-                        // 限电降出力台数
-                        xdjclnum = MathUtil.twoBit(mxztlist.get(4).getPointValueInDouble());
                         mxztmap.put("xdjclts", xdjclnum);
-                        // 限电停机台数
-                        xdtjnum = MathUtil.twoBit(mxztlist.get(5).getPointValueInDouble());
                         mxztmap.put("xdtjts", xdtjnum);
-                        // 故障停机台数
-                        gztjnum = MathUtil.twoBit(mxztlist.get(6).getPointValueInDouble());
                         mxztmap.put("gzts", gztjnum);
-                        // 场内受累停机台数
-                        cnsltjnum = MathUtil.twoBit(mxztlist.get(7).getPointValueInDouble());
-                        mxztmap.put("cnslgzts", cnsltjnum);
-                        // 检修停机台数
-                        jxtjnum = MathUtil.twoBit(mxztlist.get(8).getPointValueInDouble());
                         mxztmap.put("jxts", jxtjnum);
-                        // 场内受累检修台数
-                        cnsljxnum = MathUtil.twoBit(mxztlist.get(9).getPointValueInDouble());
-                        mxztmap.put("cnsljxts", cnsljxnum);
-                        // 电网受累台数
-                        dwslnum = MathUtil.twoBit(mxztlist.get(10).getPointValueInDouble());
-                        mxztmap.put("dwslts", dwslnum);
-                        // 环境受累台数
-                        hjslnum = MathUtil.twoBit(mxztlist.get(11).getPointValueInDouble());
-                        mxztmap.put("hjslts", hjslnum);
-                        // 风机离线台数
-                        lxnum = MathUtil.twoBit(mxztlist.get(12).getPointValueInDouble());
                         mxztmap.put("lxts", lxnum);
+                        mxztmap.put("jrts", djnum +  zcfdnum +  gztjnum +  jxtjnum + xdjclnum + xdtjnum + lxnum);
+                    }
+                } else if (id.endsWith("GDC") && InitialRunner.gp_nbqmap.containsKey(id)) {
+                    List<Inverter> wtls = InitialRunner.gp_nbqmap.get(id);
+                    for (Inverter wt : wtls) {
+                        //状态
+                        gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
+                    }
 
+                    List<PointData> gfzblist = realApiUtil.getRealData(gfzbls);
 
-                        mxztmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
-
-                    } else {
-
-                        mxztmap.put("djts", 0.0);
-                        mxztmap.put("sdtjts", 0.0);
-                        mxztmap.put("yxts", 0.0);
-                        mxztmap.put("fdjclts", 0.0);
-                        mxztmap.put("xdjclts", 0.0);
-                        mxztmap.put("xdtjts", 0.0);
-                        mxztmap.put("gzts", 0.0);
-                        mxztmap.put("cnslgzts", 0.0);
-                        mxztmap.put("jxts", 0.0);
-                        mxztmap.put("cnsljxts", 0.0);
-                        mxztmap.put("dwslts", 0.0);
-                        mxztmap.put("hjslts", 0.0);
-                        mxztmap.put("lxts", 0.0);
-                        mxztmap.put("jrts", 0.0);
-                    }
 
-                } else if (id.endsWith("GDC") || InitialRunner.pjmap.containsKey(id) || InitialRunner.lnmap.containsKey(id)) {
-                    List<String> gfzbls = new ArrayList<>();
 
 
-                    if (id.endsWith("GDC") && InitialRunner.gp_nbqmap.containsKey(id)) {
-                        List<Inverter> wtls = InitialRunner.gp_nbqmap.get(id);
-                        for (Inverter wt : wtls) {
-                            //状态
-                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
-                        }
-                    } else if (InitialRunner.pj_nbqmap.containsKey(id)) {
-                        List<Inverter> wtls = InitialRunner.pj_nbqmap.get(id);
-                        for (Inverter wt : wtls) {
-                            //状态
-                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
-                        }
-                    } else if (InitialRunner.ln_nbqmap.containsKey(id)) {
-                        List<Inverter> wtls = InitialRunner.ln_nbqmap.get(id);
-                        for (Inverter wt : wtls) {
-                            //状态
-                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
-                        }
-                    } else if (InitialRunner.pj_wtmap.containsKey(id)) {
-                        List<Windturbine> wtls = InitialRunner.pj_wtmap.get(id);
-                        for (Windturbine wt : wtls) {
-                            //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
-                        }
-                    } else if (InitialRunner.ln_wtmap.containsKey(id)) {
-                        List<Windturbine> wtls = InitialRunner.ln_wtmap.get(id);
-                        for (Windturbine wt : wtls) {
-                            //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
-                        }
-                    }
 
-                    List<PointData> gfzblist = realApiUtil.getRealData(gfzbls);
                     if (!gfzblist.isEmpty() && gfzblist.size() == gfzblist.size()) {
                         for (int i = 0; i < gfzblist.size(); i++) {
                             double gfzt = MathUtil.twoBit(MathUtil.twoBit(gfzblist.get(i).getPointValueInDouble()));
@@ -2721,53 +2686,26 @@ public class GenreSetPushService {
                                     xdjclnum++;
                                     break;
                                 case 6:
-                                    xdjclnum++;
+                                    xdtjnum++;
                                     break;
+
                                 default:
+
                                     break;
                             }
-
                         }
-                    }
 
-                    //待机台数
+                    }
                     mxztmap.put("djts", djnum);
-                    //正常发电台数
                     mxztmap.put("yxts", zcfdnum);
-                    // 限电降出力台数
                     mxztmap.put("xdjclts", xdjclnum);
-                    // 故障停机台数
+                    mxztmap.put("xdtjts", xdtjnum);
                     mxztmap.put("gzts", gztjnum);
-                    // 检修停机台数
                     mxztmap.put("jxts", jxtjnum);
-                    // 电网受累台数
-                    mxztmap.put("dwslts", dwslnum);
-                    // 风机离线台数
                     mxztmap.put("lxts", lxnum);
-                    mxztmap.put("sdtjts", 0.0);
-                    mxztmap.put("fdjclts", 0.0);
-                    mxztmap.put("xdtjts", 0.0);
-                    mxztmap.put("cnslgzts", 0.0);
-                    mxztmap.put("cnsljxts", 0.0);
-                    mxztmap.put("hjslts", 0.0);
-
-                    mxztmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
-                } else {
-                    mxztmap.put("djts", 0.0);
-                    mxztmap.put("sdtjts", 0.0);
-                    mxztmap.put("yxts", 0.0);
-                    mxztmap.put("fdjclts", 0.0);
-                    mxztmap.put("xdjclts", 0.0);
-                    mxztmap.put("xdtjts", 0.0);
-                    mxztmap.put("gzts", 0.0);
-                    mxztmap.put("cnslgzts", 0.0);
-                    mxztmap.put("jxts", 0.0);
-                    mxztmap.put("cnsljxts", 0.0);
-                    mxztmap.put("dwslts", 0.0);
-                    mxztmap.put("hjslts", 0.0);
-                    mxztmap.put("lxts", 0.0);
-                    mxztmap.put("jrts", 0.0);
+                    mxztmap.put("jrts", djnum +  zcfdnum +  gztjnum +  jxtjnum + xdjclnum + xdtjnum + lxnum);
                 }
+
             }
             map.put("mxztmap", mxztmap);
 //
@@ -3228,9 +3166,10 @@ public class GenreSetPushService {
                 } else if (yycfdl > (yfdljh * 1.2)) {
                     jczbmap.put("yycfdl", MathUtil.twoBit(yfdljh * 1.2));
                 }
-            }
 
+            }
 
+            jczbmap.put("nycfdl", MathUtil.twoBit(nfdljh * 1.1));
             if (yfdljh == 0.0) {
                 nfdljh = 1.0;
             }

+ 1 - 1
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/MatrixQfPushService.java

@@ -350,7 +350,7 @@ public class MatrixQfPushService {
                 }
 
                 //限电台数
-                jczbmap.put("slts", 0.0);
+                jczbmap.put("slts", slts);
                 double djts=(Double)jczbmap.get("djts");
                 double yxts=(Double)jczbmap.get("yxts");
                 double gzts=(Double)jczbmap.get("gzts");

+ 443 - 443
web/monitor-web-sxjn/src/main/resources/mybatis/auto/Alertrule2Mapper.xml

@@ -1,481 +1,481 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.gyee.frame.mapper.auto.Alertrule2Mapper">
-  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Alertrule2">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    <id column="ID" jdbcType="VARCHAR" property="id" />
-    <result column="NAME" jdbcType="VARCHAR" property="name" />
-    <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
-    <result column="EXPRESSION" jdbcType="VARCHAR" property="expression" />
-    <result column="TAG" jdbcType="VARCHAR" property="tag" />
-    <result column="RANK" jdbcType="VARCHAR" property="rank" />
-    <result column="ENABLED" jdbcType="DECIMAL" property="enabled" />
-    <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
-    <result column="EDNAVALUE" jdbcType="DECIMAL" property="ednavalue" />
-    <result column="CATEGORY" jdbcType="VARCHAR" property="category" />
-    <result column="RANGE" jdbcType="VARCHAR" property="range" />
-    <result column="STATION" jdbcType="VARCHAR" property="station" />
-    <result column="WINDTURBINE" jdbcType="VARCHAR" property="windturbine" />
-    <result column="LINE" jdbcType="VARCHAR" property="line" />
-    <result column="PROJECT" jdbcType="VARCHAR" property="project" />
-    <result column="ELECTRICAL" jdbcType="VARCHAR" property="electrical" />
-    <result column="TASKSTART" jdbcType="VARCHAR" property="taskstart" />
-    <result column="RELATEDPARTS" jdbcType="VARCHAR" property="relatedparts" />
-  </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
+    <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Alertrule2">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        <id column="ID" jdbcType="VARCHAR" property="id" />
+        <result column="NAME" jdbcType="VARCHAR" property="name" />
+        <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
+        <result column="EXPRESSION" jdbcType="VARCHAR" property="expression" />
+        <result column="TAG" jdbcType="VARCHAR" property="tag" />
+        <result column="RANK" jdbcType="VARCHAR" property="rank" />
+        <result column="ENABLED" jdbcType="BOOLEAN" property="enabled" />
+        <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
+        <result column="EDNAVALUE" jdbcType="DECIMAL" property="ednavalue" />
+        <result column="CATEGORY" jdbcType="VARCHAR" property="category" />
+        <result column="RANGE" jdbcType="VARCHAR" property="range" />
+        <result column="STATION" jdbcType="VARCHAR" property="station" />
+        <result column="WINDTURBINE" jdbcType="VARCHAR" property="windturbine" />
+        <result column="LINE" jdbcType="VARCHAR" property="line" />
+        <result column="PROJECT" jdbcType="VARCHAR" property="project" />
+        <result column="ELECTRICAL" jdbcType="VARCHAR" property="electrical" />
+        <result column="TASKSTART" jdbcType="VARCHAR" property="taskstart" />
+        <result column="RELATEDPARTS" jdbcType="VARCHAR" property="relatedparts" />
+    </resultMap>
+    <sql id="Example_Where_Clause">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        <where>
+            <foreach collection="oredCriteria" item="criteria" separator="or">
+                <if test="criteria.valid">
+                    <trim prefix="(" prefixOverrides="and" suffix=")">
+                        <foreach collection="criteria.criteria" item="criterion">
+                            <choose>
+                                <when test="criterion.noValue">
+                                    and ${criterion.condition}
+                                </when>
+                                <when test="criterion.singleValue">
+                                    and ${criterion.condition} #{criterion.value}
+                                </when>
+                                <when test="criterion.betweenValue">
+                                    and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                                </when>
+                                <when test="criterion.listValue">
+                                    and ${criterion.condition}
+                                    <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                                        #{listItem}
+                                    </foreach>
+                                </when>
+                            </choose>
+                        </foreach>
+                    </trim>
+                </if>
             </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
+        </where>
+    </sql>
+    <sql id="Update_By_Example_Where_Clause">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        <where>
+            <foreach collection="example.oredCriteria" item="criteria" separator="or">
+                <if test="criteria.valid">
+                    <trim prefix="(" prefixOverrides="and" suffix=")">
+                        <foreach collection="criteria.criteria" item="criterion">
+                            <choose>
+                                <when test="criterion.noValue">
+                                    and ${criterion.condition}
+                                </when>
+                                <when test="criterion.singleValue">
+                                    and ${criterion.condition} #{criterion.value}
+                                </when>
+                                <when test="criterion.betweenValue">
+                                    and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                                </when>
+                                <when test="criterion.listValue">
+                                    and ${criterion.condition}
+                                    <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                                        #{listItem}
+                                    </foreach>
+                                </when>
+                            </choose>
+                        </foreach>
+                    </trim>
+                </if>
             </foreach>
-          </trim>
+        </where>
+    </sql>
+    <sql id="Base_Column_List">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        ID, NAME, DESCRIPTION, EXPRESSION, TAG, RANK, ENABLED, MODELID, EDNAVALUE, CATEGORY,
+        RANGE, STATION, WINDTURBINE, LINE, PROJECT, ELECTRICAL, TASKSTART, RELATEDPARTS
+    </sql>
+    <select id="selectByExample" parameterType="com.gyee.frame.model.auto.Alertrule2Example" resultMap="BaseResultMap">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        select
+        <if test="distinct">
+            distinct
         </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    ID, NAME, DESCRIPTION, EXPRESSION, TAG, RANK, ENABLED, MODELID, EDNAVALUE, CATEGORY,
-    RANGE, STATION, WINDTURBINE, LINE, PROJECT, ELECTRICAL, TASKSTART, RELATEDPARTS
-  </sql>
-  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.Alertrule2Example" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from ALERTRULE2
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    select 
-    <include refid="Base_Column_List" />
-    from ALERTRULE2
-    where ID = #{id,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    delete from ALERTRULE2
-    where ID = #{id,jdbcType=VARCHAR}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.Alertrule2Example">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    delete from ALERTRULE2
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.gyee.frame.model.auto.Alertrule2">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    insert into ALERTRULE2 (ID, NAME, DESCRIPTION, 
-      EXPRESSION, TAG, RANK, 
-      ENABLED, MODELID, EDNAVALUE, 
-      CATEGORY, RANGE, STATION,
-      WINDTURBINE, LINE, PROJECT, 
-      ELECTRICAL, TASKSTART, RELATEDPARTS
-      )
-    values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, 
-      #{expression,jdbcType=VARCHAR}, #{tag,jdbcType=VARCHAR}, #{rank,jdbcType=VARCHAR}, 
-      #{enabled,jdbcType=DECIMAL}, #{modelid,jdbcType=VARCHAR}, #{ednavalue,jdbcType=DECIMAL}, 
-      #{category,jdbcType=VARCHAR}, #{range,jdbcType=VARCHAR}, #{station,jdbcType=VARCHAR}, 
-      #{windturbine,jdbcType=VARCHAR}, #{line,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR}, 
-      #{electrical,jdbcType=VARCHAR}, #{taskstart,jdbcType=VARCHAR}, #{relatedparts,jdbcType=VARCHAR}
-      )
-  </insert>
-  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Alertrule2">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    insert into ALERTRULE2
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        ID,
-      </if>
-      <if test="name != null">
-        NAME,
-      </if>
-      <if test="description != null">
-        DESCRIPTION,
-      </if>
-      <if test="expression != null">
-        EXPRESSION,
-      </if>
-      <if test="tag != null">
-        TAG,
-      </if>
-      <if test="rank != null">
-        RANK,
-      </if>
-      <if test="enabled != null">
-        ENABLED,
-      </if>
-      <if test="modelid != null">
-        MODELID,
-      </if>
-      <if test="ednavalue != null">
-        EDNAVALUE,
-      </if>
-      <if test="category != null">
-        CATEGORY,
-      </if>
-      <if test="range != null">
-        RANGE,
-      </if>
-      <if test="station != null">
-        STATION,
-      </if>
-      <if test="windturbine != null">
-        WINDTURBINE,
-      </if>
-      <if test="line != null">
-        LINE,
-      </if>
-      <if test="project != null">
-        PROJECT,
-      </if>
-      <if test="electrical != null">
-        ELECTRICAL,
-      </if>
-      <if test="taskstart != null">
-        TASKSTART,
-      </if>
-      <if test="relatedparts != null">
-        RELATEDPARTS,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=VARCHAR},
-      </if>
-      <if test="name != null">
-        #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="description != null">
-        #{description,jdbcType=VARCHAR},
-      </if>
-      <if test="expression != null">
-        #{expression,jdbcType=VARCHAR},
-      </if>
-      <if test="tag != null">
-        #{tag,jdbcType=VARCHAR},
-      </if>
-      <if test="rank != null">
-        #{rank,jdbcType=VARCHAR},
-      </if>
-      <if test="enabled != null">
-        #{enabled,jdbcType=DECIMAL},
-      </if>
-      <if test="modelid != null">
-        #{modelid,jdbcType=VARCHAR},
-      </if>
-      <if test="ednavalue != null">
-        #{ednavalue,jdbcType=DECIMAL},
-      </if>
-      <if test="category != null">
-        #{category,jdbcType=VARCHAR},
-      </if>
-      <if test="range != null">
-        #{range,jdbcType=VARCHAR},
-      </if>
-      <if test="station != null">
-        #{station,jdbcType=VARCHAR},
-      </if>
-      <if test="windturbine != null">
-        #{windturbine,jdbcType=VARCHAR},
-      </if>
-      <if test="line != null">
-        #{line,jdbcType=VARCHAR},
-      </if>
-      <if test="project != null">
-        #{project,jdbcType=VARCHAR},
-      </if>
-      <if test="electrical != null">
-        #{electrical,jdbcType=VARCHAR},
-      </if>
-      <if test="taskstart != null">
-        #{taskstart,jdbcType=VARCHAR},
-      </if>
-      <if test="relatedparts != null">
-        #{relatedparts,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.gyee.frame.model.auto.Alertrule2Example" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    select count(*) from ALERTRULE2
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update ALERTRULE2
-    <set>
-      <if test="record.id != null">
-        ID = #{record.id,jdbcType=VARCHAR},
-      </if>
-      <if test="record.name != null">
+        <include refid="Base_Column_List" />
+        from ALERTRULE2
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause" />
+        </if>
+        <if test="orderByClause != null">
+            order by ${orderByClause}
+        </if>
+    </select>
+    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        select
+        <include refid="Base_Column_List" />
+        from ALERTRULE2
+        where ID = #{id,jdbcType=VARCHAR}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        delete from ALERTRULE2
+        where ID = #{id,jdbcType=VARCHAR}
+    </delete>
+    <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.Alertrule2Example">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        delete from ALERTRULE2
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause" />
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.gyee.frame.model.auto.Alertrule2">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        insert into ALERTRULE2 (ID, NAME, DESCRIPTION,
+        EXPRESSION, TAG, RANK,
+        ENABLED, MODELID, EDNAVALUE,
+        CATEGORY, RANGE, STATION,
+        WINDTURBINE, LINE, PROJECT,
+        ELECTRICAL, TASKSTART, RELATEDPARTS
+        )
+        values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
+        #{expression,jdbcType=VARCHAR}, #{tag,jdbcType=VARCHAR}, #{rank,jdbcType=VARCHAR},
+        #{enabled,jdbcType=BOOLEAN}, #{modelid,jdbcType=VARCHAR}, #{ednavalue,jdbcType=DECIMAL},
+        #{category,jdbcType=VARCHAR}, #{range,jdbcType=VARCHAR}, #{station,jdbcType=VARCHAR},
+        #{windturbine,jdbcType=VARCHAR}, #{line,jdbcType=VARCHAR}, #{project,jdbcType=VARCHAR},
+        #{electrical,jdbcType=VARCHAR}, #{taskstart,jdbcType=VARCHAR}, #{relatedparts,jdbcType=VARCHAR}
+        )
+    </insert>
+    <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Alertrule2">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        insert into ALERTRULE2
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                ID,
+            </if>
+            <if test="name != null">
+                NAME,
+            </if>
+            <if test="description != null">
+                DESCRIPTION,
+            </if>
+            <if test="expression != null">
+                EXPRESSION,
+            </if>
+            <if test="tag != null">
+                TAG,
+            </if>
+            <if test="rank != null">
+                RANK,
+            </if>
+            <if test="enabled != null">
+                ENABLED,
+            </if>
+            <if test="modelid != null">
+                MODELID,
+            </if>
+            <if test="ednavalue != null">
+                EDNAVALUE,
+            </if>
+            <if test="category != null">
+                CATEGORY,
+            </if>
+            <if test="range != null">
+                RANGE,
+            </if>
+            <if test="station != null">
+                STATION,
+            </if>
+            <if test="windturbine != null">
+                WINDTURBINE,
+            </if>
+            <if test="line != null">
+                LINE,
+            </if>
+            <if test="project != null">
+                PROJECT,
+            </if>
+            <if test="electrical != null">
+                ELECTRICAL,
+            </if>
+            <if test="taskstart != null">
+                TASKSTART,
+            </if>
+            <if test="relatedparts != null">
+                RELATEDPARTS,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="description != null">
+                #{description,jdbcType=VARCHAR},
+            </if>
+            <if test="expression != null">
+                #{expression,jdbcType=VARCHAR},
+            </if>
+            <if test="tag != null">
+                #{tag,jdbcType=VARCHAR},
+            </if>
+            <if test="rank != null">
+                #{rank,jdbcType=VARCHAR},
+            </if>
+            <if test="enabled != null">
+                #{enabled,jdbcType=BOOLEAN},
+            </if>
+            <if test="modelid != null">
+                #{modelid,jdbcType=VARCHAR},
+            </if>
+            <if test="ednavalue != null">
+                #{ednavalue,jdbcType=DECIMAL},
+            </if>
+            <if test="category != null">
+                #{category,jdbcType=VARCHAR},
+            </if>
+            <if test="range != null">
+                #{range,jdbcType=VARCHAR},
+            </if>
+            <if test="station != null">
+                #{station,jdbcType=VARCHAR},
+            </if>
+            <if test="windturbine != null">
+                #{windturbine,jdbcType=VARCHAR},
+            </if>
+            <if test="line != null">
+                #{line,jdbcType=VARCHAR},
+            </if>
+            <if test="project != null">
+                #{project,jdbcType=VARCHAR},
+            </if>
+            <if test="electrical != null">
+                #{electrical,jdbcType=VARCHAR},
+            </if>
+            <if test="taskstart != null">
+                #{taskstart,jdbcType=VARCHAR},
+            </if>
+            <if test="relatedparts != null">
+                #{relatedparts,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <select id="countByExample" parameterType="com.gyee.frame.model.auto.Alertrule2Example" resultType="java.lang.Long">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        select count(*) from ALERTRULE2
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause" />
+        </if>
+    </select>
+    <update id="updateByExampleSelective" parameterType="map">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        update ALERTRULE2
+        <set>
+            <if test="record.id != null">
+                ID = #{record.id,jdbcType=VARCHAR},
+            </if>
+            <if test="record.name != null">
+                NAME = #{record.name,jdbcType=VARCHAR},
+            </if>
+            <if test="record.description != null">
+                DESCRIPTION = #{record.description,jdbcType=VARCHAR},
+            </if>
+            <if test="record.expression != null">
+                EXPRESSION = #{record.expression,jdbcType=VARCHAR},
+            </if>
+            <if test="record.tag != null">
+                TAG = #{record.tag,jdbcType=VARCHAR},
+            </if>
+            <if test="record.rank != null">
+                RANK = #{record.rank,jdbcType=VARCHAR},
+            </if>
+            <if test="record.enabled != null">
+                ENABLED = #{record.enabled,jdbcType=BOOLEAN},
+            </if>
+            <if test="record.modelid != null">
+                MODELID = #{record.modelid,jdbcType=VARCHAR},
+            </if>
+            <if test="record.ednavalue != null">
+                EDNAVALUE = #{record.ednavalue,jdbcType=DECIMAL},
+            </if>
+            <if test="record.category != null">
+                CATEGORY = #{record.category,jdbcType=VARCHAR},
+            </if>
+            <if test="record.range != null">
+                RANGE = #{record.range,jdbcType=VARCHAR},
+            </if>
+            <if test="record.station != null">
+                STATION = #{record.station,jdbcType=VARCHAR},
+            </if>
+            <if test="record.windturbine != null">
+                WINDTURBINE = #{record.windturbine,jdbcType=VARCHAR},
+            </if>
+            <if test="record.line != null">
+                LINE = #{record.line,jdbcType=VARCHAR},
+            </if>
+            <if test="record.project != null">
+                PROJECT = #{record.project,jdbcType=VARCHAR},
+            </if>
+            <if test="record.electrical != null">
+                ELECTRICAL = #{record.electrical,jdbcType=VARCHAR},
+            </if>
+            <if test="record.taskstart != null">
+                TASKSTART = #{record.taskstart,jdbcType=VARCHAR},
+            </if>
+            <if test="record.relatedparts != null">
+                RELATEDPARTS = #{record.relatedparts,jdbcType=VARCHAR},
+            </if>
+        </set>
+        <if test="_parameter != null">
+            <include refid="Update_By_Example_Where_Clause" />
+        </if>
+    </update>
+    <update id="updateByExample" parameterType="map">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        update ALERTRULE2
+        set ID = #{record.id,jdbcType=VARCHAR},
         NAME = #{record.name,jdbcType=VARCHAR},
-      </if>
-      <if test="record.description != null">
         DESCRIPTION = #{record.description,jdbcType=VARCHAR},
-      </if>
-      <if test="record.expression != null">
         EXPRESSION = #{record.expression,jdbcType=VARCHAR},
-      </if>
-      <if test="record.tag != null">
         TAG = #{record.tag,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rank != null">
         RANK = #{record.rank,jdbcType=VARCHAR},
-      </if>
-      <if test="record.enabled != null">
-        ENABLED = #{record.enabled,jdbcType=DECIMAL},
-      </if>
-      <if test="record.modelid != null">
+        ENABLED = #{record.enabled,jdbcType=BOOLEAN},
         MODELID = #{record.modelid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.ednavalue != null">
         EDNAVALUE = #{record.ednavalue,jdbcType=DECIMAL},
-      </if>
-      <if test="record.category != null">
         CATEGORY = #{record.category,jdbcType=VARCHAR},
-      </if>
-      <if test="record.range != null">
         RANGE = #{record.range,jdbcType=VARCHAR},
-      </if>
-      <if test="record.station != null">
         STATION = #{record.station,jdbcType=VARCHAR},
-      </if>
-      <if test="record.windturbine != null">
         WINDTURBINE = #{record.windturbine,jdbcType=VARCHAR},
-      </if>
-      <if test="record.line != null">
         LINE = #{record.line,jdbcType=VARCHAR},
-      </if>
-      <if test="record.project != null">
         PROJECT = #{record.project,jdbcType=VARCHAR},
-      </if>
-      <if test="record.electrical != null">
         ELECTRICAL = #{record.electrical,jdbcType=VARCHAR},
-      </if>
-      <if test="record.taskstart != null">
         TASKSTART = #{record.taskstart,jdbcType=VARCHAR},
-      </if>
-      <if test="record.relatedparts != null">
-        RELATEDPARTS = #{record.relatedparts,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update ALERTRULE2
-    set ID = #{record.id,jdbcType=VARCHAR},
-      NAME = #{record.name,jdbcType=VARCHAR},
-      DESCRIPTION = #{record.description,jdbcType=VARCHAR},
-      EXPRESSION = #{record.expression,jdbcType=VARCHAR},
-      TAG = #{record.tag,jdbcType=VARCHAR},
-      RANK = #{record.rank,jdbcType=VARCHAR},
-      ENABLED = #{record.enabled,jdbcType=DECIMAL},
-      MODELID = #{record.modelid,jdbcType=VARCHAR},
-      EDNAVALUE = #{record.ednavalue,jdbcType=DECIMAL},
-      CATEGORY = #{record.category,jdbcType=VARCHAR},
-    RANGE = #{record.range,jdbcType=VARCHAR},
-      STATION = #{record.station,jdbcType=VARCHAR},
-      WINDTURBINE = #{record.windturbine,jdbcType=VARCHAR},
-      LINE = #{record.line,jdbcType=VARCHAR},
-      PROJECT = #{record.project,jdbcType=VARCHAR},
-      ELECTRICAL = #{record.electrical,jdbcType=VARCHAR},
-      TASKSTART = #{record.taskstart,jdbcType=VARCHAR},
-      RELATEDPARTS = #{record.relatedparts,jdbcType=VARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Alertrule2">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update ALERTRULE2
-    <set>
-      <if test="name != null">
-        NAME = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="description != null">
+        RELATEDPARTS = #{record.relatedparts,jdbcType=VARCHAR}
+        <if test="_parameter != null">
+            <include refid="Update_By_Example_Where_Clause" />
+        </if>
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Alertrule2">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        update ALERTRULE2
+        <set>
+            <if test="name != null">
+                NAME = #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="description != null">
+                DESCRIPTION = #{description,jdbcType=VARCHAR},
+            </if>
+            <if test="expression != null">
+                EXPRESSION = #{expression,jdbcType=VARCHAR},
+            </if>
+            <if test="tag != null">
+                TAG = #{tag,jdbcType=VARCHAR},
+            </if>
+            <if test="rank != null">
+                RANK = #{rank,jdbcType=VARCHAR},
+            </if>
+            <if test="enabled != null">
+                ENABLED = #{enabled,jdbcType=BOOLEAN},
+            </if>
+            <if test="modelid != null">
+                MODELID = #{modelid,jdbcType=VARCHAR},
+            </if>
+            <if test="ednavalue != null">
+                EDNAVALUE = #{ednavalue,jdbcType=DECIMAL},
+            </if>
+            <if test="category != null">
+                CATEGORY = #{category,jdbcType=VARCHAR},
+            </if>
+            <if test="range != null">
+                RANGE = #{range,jdbcType=VARCHAR},
+            </if>
+            <if test="station != null">
+                STATION = #{station,jdbcType=VARCHAR},
+            </if>
+            <if test="windturbine != null">
+                WINDTURBINE = #{windturbine,jdbcType=VARCHAR},
+            </if>
+            <if test="line != null">
+                LINE = #{line,jdbcType=VARCHAR},
+            </if>
+            <if test="project != null">
+                PROJECT = #{project,jdbcType=VARCHAR},
+            </if>
+            <if test="electrical != null">
+                ELECTRICAL = #{electrical,jdbcType=VARCHAR},
+            </if>
+            <if test="taskstart != null">
+                TASKSTART = #{taskstart,jdbcType=VARCHAR},
+            </if>
+            <if test="relatedparts != null">
+                RELATEDPARTS = #{relatedparts,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where ID = #{id,jdbcType=VARCHAR}
+    </update>
+    <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Alertrule2">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        update ALERTRULE2
+        set NAME = #{name,jdbcType=VARCHAR},
         DESCRIPTION = #{description,jdbcType=VARCHAR},
-      </if>
-      <if test="expression != null">
         EXPRESSION = #{expression,jdbcType=VARCHAR},
-      </if>
-      <if test="tag != null">
         TAG = #{tag,jdbcType=VARCHAR},
-      </if>
-      <if test="rank != null">
         RANK = #{rank,jdbcType=VARCHAR},
-      </if>
-      <if test="enabled != null">
-        ENABLED = #{enabled,jdbcType=DECIMAL},
-      </if>
-      <if test="modelid != null">
+        ENABLED = #{enabled,jdbcType=BOOLEAN},
         MODELID = #{modelid,jdbcType=VARCHAR},
-      </if>
-      <if test="ednavalue != null">
         EDNAVALUE = #{ednavalue,jdbcType=DECIMAL},
-      </if>
-      <if test="category != null">
         CATEGORY = #{category,jdbcType=VARCHAR},
-      </if>
-      <if test="range != null">
         RANGE = #{range,jdbcType=VARCHAR},
-      </if>
-      <if test="station != null">
         STATION = #{station,jdbcType=VARCHAR},
-      </if>
-      <if test="windturbine != null">
         WINDTURBINE = #{windturbine,jdbcType=VARCHAR},
-      </if>
-      <if test="line != null">
         LINE = #{line,jdbcType=VARCHAR},
-      </if>
-      <if test="project != null">
         PROJECT = #{project,jdbcType=VARCHAR},
-      </if>
-      <if test="electrical != null">
         ELECTRICAL = #{electrical,jdbcType=VARCHAR},
-      </if>
-      <if test="taskstart != null">
         TASKSTART = #{taskstart,jdbcType=VARCHAR},
-      </if>
-      <if test="relatedparts != null">
-        RELATEDPARTS = #{relatedparts,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where ID = #{id,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Alertrule2">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update ALERTRULE2
-    set NAME = #{name,jdbcType=VARCHAR},
-      DESCRIPTION = #{description,jdbcType=VARCHAR},
-      EXPRESSION = #{expression,jdbcType=VARCHAR},
-      TAG = #{tag,jdbcType=VARCHAR},
-      RANK = #{rank,jdbcType=VARCHAR},
-      ENABLED = #{enabled,jdbcType=DECIMAL},
-      MODELID = #{modelid,jdbcType=VARCHAR},
-      EDNAVALUE = #{ednavalue,jdbcType=DECIMAL},
-      CATEGORY = #{category,jdbcType=VARCHAR},
-    RANGE = #{range,jdbcType=VARCHAR},
-      STATION = #{station,jdbcType=VARCHAR},
-      WINDTURBINE = #{windturbine,jdbcType=VARCHAR},
-      LINE = #{line,jdbcType=VARCHAR},
-      PROJECT = #{project,jdbcType=VARCHAR},
-      ELECTRICAL = #{electrical,jdbcType=VARCHAR},
-      TASKSTART = #{taskstart,jdbcType=VARCHAR},
-      RELATEDPARTS = #{relatedparts,jdbcType=VARCHAR}
-    where ID = #{id,jdbcType=VARCHAR}
-  </update>
+        RELATEDPARTS = #{relatedparts,jdbcType=VARCHAR}
+        where ID = #{id,jdbcType=VARCHAR}
+    </update>
 
-  <select id="getAlarmTotal"  resultType="com.gyee.frame.model.custom.AlarmTotalVo">
+    <select id="getAlarmTotal"  resultType="com.gyee.frame.model.custom.AlarmTotalVo">
     select s.stationid wpId, s.windturbineid wtId, s.alerttext name from ( select snapid, sum(count) as count,sum(time) time from alarmcount
     a left join alarmsnap ss on a.snapid = ss.id
     where
@@ -489,7 +489,7 @@
 
   </select>
 
-  <select id="getAlarmTypenum"  resultType="com.gyee.frame.model.custom.SimpleVo">
+    <select id="getAlarmTypenum"  resultType="com.gyee.frame.model.custom.SimpleVo">
      select count(*) value,w.name name from alertrule2 t,windturbine_parts w where t.relatedparts=w.id group by w.name
   </select>