浏览代码

修改河北监视模块

shilin 2 年之前
父节点
当前提交
ca37128069

+ 24 - 1
web/monitor-hb/src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -627,5 +627,28 @@ public static final String TPOINT_WT_60FX = "AI011";// 风机60秒风向
     public static final String[] TPOINT_Inverter_Matrix = { "FJZT", "AIG013",
             "AIG027"};
 
-
+    //逆变器支路测点
+    public static final String[] TPOINT_Wt_Matrix = { "FJZT", "AI130","AI022","AI128" };
+    //逆变器矩阵测点
+    public static final String[] TPOINT_Inverter_Branch = { "AIG077",
+            "AIG078",
+            "AIG079",
+            "AIG080",
+            "AIG081",
+            "AIG082",
+            "AIG083",
+            "AIG084",
+            "AIG085",
+            "AIG086",
+            "AIG087",
+            "AIG088",
+            "AIG089",
+            "AIG090",
+            "AIG091",
+            "AIG092",
+            "AIG093",
+            "AIG094",
+            "AIG095",
+            "AIG096"
+    };
 }

+ 10 - 0
web/monitor-hb/src/main/java/com/gyee/frame/model/auto/Inverter.java

@@ -93,6 +93,16 @@ public class Inverter implements Serializable {
      */
     private String modelid;
 
+    private Integer branchnum;
+
+    public Integer getBranchnum() {
+        return branchnum;
+    }
+
+    public void setBranchnum(Integer branchnum) {
+        this.branchnum = branchnum;
+    }
+
     /**
      * This field was generated by MyBatis Generator.
      * This field corresponds to the database table inverter

+ 14 - 3
web/monitor-hb/src/main/java/com/gyee/frame/model/custom/InverterVo.java

@@ -2,10 +2,11 @@
 package com.gyee.frame.model.custom;
 
 
+import java.util.List;
 
 public class InverterVo {
 
-    private Integer zt;
+    private Double zt;
     private Double fdl;
 
     private Double gl;
@@ -16,6 +17,16 @@ public class InverterVo {
 
     private String sqname;
 
+    private List<Integer> zlls;
+
+    public List<Integer> getZlls() {
+        return zlls;
+    }
+
+    public void setZlls(List<Integer> zlls) {
+        this.zlls = zlls;
+    }
+
     public String getSqname() {
         return sqname;
     }
@@ -24,11 +35,11 @@ public class InverterVo {
         this.sqname = sqname;
     }
 
-    public Integer getZt() {
+    public Double getZt() {
         return zt;
     }
 
-    public void setZt(Integer zt) {
+    public void setZt(Double zt) {
         this.zt = zt;
     }
 

+ 25 - 0
web/monitor-hb/src/main/java/com/gyee/frame/model/custom/MatrixPjVo.java

@@ -0,0 +1,25 @@
+package com.gyee.frame.model.custom;
+
+import java.util.List;
+
+public class MatrixPjVo {
+
+	private String name;
+	private List<SquareVo> squareVos;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<SquareVo> getSquareVos() {
+        return squareVos;
+    }
+
+    public void setSquareVos(List<SquareVo> squareVos) {
+        this.squareVos = squareVos;
+    }
+}

+ 25 - 0
web/monitor-hb/src/main/java/com/gyee/frame/model/custom/SquareVo.java

@@ -0,0 +1,25 @@
+package com.gyee.frame.model.custom;
+
+import java.util.List;
+
+public class SquareVo {
+
+    private String name;
+    private List<InverterVo> inverterVos;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<InverterVo> getInverterVos() {
+        return inverterVos;
+    }
+
+    public void setInverterVos(List<InverterVo> inverterVos) {
+        this.inverterVos = inverterVos;
+    }
+}

+ 140 - 52
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java

@@ -3,6 +3,7 @@ package com.gyee.frame.service.websocket;
 
 import cn.hutool.core.date.DateUtil;
 import com.google.common.collect.Maps;
+import com.gyee.frame.common.conf.V2Config;
 import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.agc.AgcVo;
@@ -18,6 +19,8 @@ import org.apache.commons.compress.utils.Lists;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.*;
 
 @Service
@@ -1314,77 +1317,120 @@ public class WtInfoPushService {
 
         List<InverterVo> vos=new ArrayList<>();
         if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {
-            List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wpId);
-            for (Inverter wt : wtls) {
-                double gl=0.0;
-                double fdl=0.0;
-                int zt=0;
 
-                List<String> pointcodes=new ArrayList<>();
+            if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {
+                List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wpId);
+                for (Inverter wt : wtls) {
+                    double gl=0.0;
+                    double fdl=0.0;
+                    double zt=0;
+                    double dl=0.0;
+                    List<String> pointcodes=new ArrayList<>();
 
-                String[] strs=Constant.TPOINT_Inverter_Matrix;
-                for(int i=0;i<strs.length;i++)
-                {
-                    PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),strs[i]);
-                    if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()))
+                    String[] strs=Constant.TPOINT_Inverter_Matrix;
+                    for(int i=0;i<strs.length;i++)
                     {
-                        pointcodes.add(pt.getCode());
+                        PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),strs[i]);
+                        if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()))
+                        {
+                            pointcodes.add(pt.getCode());
+                        }
                     }
-                }
 
-                List<PointData> ptlist = realApiUtil.getRealData(pointcodes);
+                    List<PointData> ptlist = realApiUtil.getRealData(pointcodes);
 
-                if(!ptlist.isEmpty() && ptlist.size()==pointcodes.size())
-                {
-                    zt=Double.valueOf(ptlist.get(0).getPointValueInDouble()).intValue();
-                    gl=StringUtils.round(ptlist.get(1).getPointValueInDouble(),2);
-                    fdl=StringUtils.round(ptlist.get(2).getPointValueInDouble(),2);
-                }
-                if (StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid())) {
-                    Square square = InitialRunner.sqmap.get(wt.getSquareid());
+                    if(!ptlist.isEmpty() && ptlist.size()==pointcodes.size())
+                    {
+                        zt=Double.valueOf(ptlist.get(0).getPointValueInDouble()).intValue();
+                        gl=StringUtils.round(ptlist.get(1).getPointValueInDouble(),2);
+                        dl=StringUtils.round(ptlist.get(2).getPointValueInDouble(),2);
+                        fdl=StringUtils.round(ptlist.get(3).getPointValueInDouble(),2);
+                    }
 
-                    if (square.getTypes().equals(ZC)) {
+                    String[] zlstrs=Constant.TPOINT_Inverter_Branch;
+                    List<String> zlpointcodes=new ArrayList<>();
+                    for(int i=0;i<zlstrs.length;i++)
+                    {
+                        PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),strs[i]);
+                        if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()) && !pt.getCode().equals(V2Config.getInitialcode()))
+                        {
+                            zlpointcodes.add(pt.getCode());
+                        }
+                    }
 
-                        if(map.containsKey(square.getId()))
+                    List<PointData> zlptlist = realApiUtil.getRealData(zlpointcodes);
+                    List<Integer> zlls=new ArrayList<>();
+                    if(!zlptlist.isEmpty() && zlptlist.size()==zlpointcodes.size())
+                    {
+                        for(PointData po:zlptlist)
                         {
-                            List<InverterVo> ls=map.get(square.getId());;
-                            InverterVo vo=new InverterVo();
-                            vo.setId(wt.getId());
-                            vo.setName(wt.getName());
-                            vo.setFdl(fdl);
-                            vo.setGl(gl);
-                            vo.setZt(zt);
-                            vo.setSqname(square.getName());
-                            ls.add(vo);
-                            map.put(square.getId(),ls);
+                            int zlresult=0; //正常
+                            if(StringUtils.notEmp(po))
+                            {
+                                double dlresult=new BigDecimal(dl).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
+                                if(po.getPointValueInDouble()<dlresult)
+                                {
+                                    zlresult=1;//偏低
+                                }else
+                                {
+                                    zlresult=2;//零支路
+                                }
+                            }
+                            zlls.add(zlresult);
+                        }
+                    }
+
+                    if (StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid())) {
+                        Square square = InitialRunner.sqmap.get(wt.getSquareid());
+
+                        if (square.getTypes().equals(ZC)) {
+
+                            if(map.containsKey(square.getId()))
+                            {
+                                List<InverterVo> ls=map.get(square.getId());;
+                                InverterVo vo=new InverterVo();
+                                vo.setId(wt.getId());
+                                vo.setName(wt.getName());
+                                vo.setFdl(fdl);
+                                vo.setGl(gl);
+                                vo.setZlls(zlls);
+                                vo.setSqname(square.getName());
+                                vo.setZt(zt);
+                                ls.add(vo);
+                                map.put(square.getId(),ls);
+                            }else
+                            {
+                                List<InverterVo> ls=new ArrayList<>();
+                                InverterVo vo=new InverterVo();
+                                vo.setId(wt.getId());
+                                vo.setName(wt.getName());
+                                vo.setFdl(fdl);
+                                vo.setGl(gl);
+                                vo.setZt(zt);
+                                vo.setZlls(zlls);
+                                vo.setSqname(square.getName());
+                                ls.add(vo);
+                                map.put(square.getId(),ls);
+
+                            }
                         }else
                         {
-                            List<InverterVo> ls=new ArrayList<>();
                             InverterVo vo=new InverterVo();
                             vo.setId(wt.getId());
                             vo.setName(wt.getName());
+                            vo.setSqname(square.getName());
                             vo.setFdl(fdl);
                             vo.setGl(gl);
                             vo.setZt(zt);
-                            vo.setSqname(square.getName());
-                            ls.add(vo);
-                            map.put(square.getId(),ls);
-
+                            vo.setZlls(zlls);
+                            vos.add(vo);
                         }
-                    }else
-                    {
-                        InverterVo vo=new InverterVo();
-                        vo.setId(wt.getId());
-                        vo.setName(wt.getName());
-                        vo.setFdl(fdl);
-                        vo.setGl(gl);
-                        vo.setZt(zt);
-                        vo.setSqname(square.getName());
-                        vos.add(vo);
                     }
-                }
 
+                }
+                map.put(JZ,vos);
             }
+
         }
 
         map.put(JZ,vos);
@@ -1394,6 +1440,7 @@ public class WtInfoPushService {
 
 
 
+
     public Map<String,Map<String,List<InverterVo>>> findMatrix() throws Exception {
 
         Map<String,Map<String,List<InverterVo>>> matrixmap=new HashMap<>();
@@ -1414,8 +1461,8 @@ public class WtInfoPushService {
                     for (Inverter wt : wtls) {
                         double gl=0.0;
                         double fdl=0.0;
-                        int zt=0;
-
+                        double zt=0;
+                        double dl=0.0;
                         List<String> pointcodes=new ArrayList<>();
 
                         String[] strs=Constant.TPOINT_Inverter_Matrix;
@@ -1435,7 +1482,42 @@ public class WtInfoPushService {
                             zt=Double.valueOf(ptlist.get(0).getPointValueInDouble()).intValue();
                             gl=StringUtils.round(ptlist.get(1).getPointValueInDouble(),2);
                             fdl=StringUtils.round(ptlist.get(2).getPointValueInDouble(),2);
+                            dl=StringUtils.round(ptlist.get(3).getPointValueInDouble(),2);
+                        }
+
+                        String[] zlstrs=Constant.TPOINT_Inverter_Branch;
+                        List<String> zlpointcodes=new ArrayList<>();
+                        for(int i=0;i<zlstrs.length;i++)
+                        {
+                            PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),zlstrs[i]);
+                            if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()) && !pt.getCode().equals(V2Config.getInitialcode()))
+                            {
+                                zlpointcodes.add(pt.getCode());
+                            }
                         }
+
+                        List<PointData> zlptlist = realApiUtil.getRealData(zlpointcodes);
+                        List<Integer> zlls=new ArrayList<>();
+                        if(!zlptlist.isEmpty() && zlptlist.size()==zlpointcodes.size())
+                        {
+                            for(PointData po:zlptlist)
+                            {
+                                int zlresult=0; //正常
+                                if(StringUtils.notEmp(po))
+                                {
+                                    double dlresult=new BigDecimal(dl).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
+                                    if(po.getPointValueInDouble()<dlresult)
+                                    {
+                                        zlresult=1;//偏低
+                                    }else
+                                    {
+                                        zlresult=2;//零支路
+                                    }
+                                }
+                                zlls.add(zlresult);
+                            }
+                        }
+
                         if (StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid())) {
                             Square square = InitialRunner.sqmap.get(wt.getSquareid());
 
@@ -1449,6 +1531,7 @@ public class WtInfoPushService {
                                     vo.setName(wt.getName());
                                     vo.setFdl(fdl);
                                     vo.setGl(gl);
+                                    vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     vo.setZt(zt);
                                     ls.add(vo);
@@ -1462,6 +1545,7 @@ public class WtInfoPushService {
                                     vo.setFdl(fdl);
                                     vo.setGl(gl);
                                     vo.setZt(zt);
+                                    vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     ls.add(vo);
                                     map.put(square.getId(),ls);
@@ -1476,6 +1560,7 @@ public class WtInfoPushService {
                                 vo.setFdl(fdl);
                                 vo.setGl(gl);
                                 vo.setZt(zt);
+                                vo.setZlls(zlls);
                                 vos.add(vo);
                             }
                         }
@@ -1491,6 +1576,7 @@ public class WtInfoPushService {
 
         return matrixmap;
     }
+
     public Object findInverterDI(String id) throws Exception {
         List<PhotovoltaicTestingPointNew> pointList = photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNewDiList(id);
         Map<String, String> idName = Maps.newHashMap();
@@ -1611,4 +1697,6 @@ public class WtInfoPushService {
         return map;
     }
 
+
+
 }

+ 344 - 327
web/monitor-hb/src/main/resources/mybatis/auto/InverterMapper.xml

@@ -1,351 +1,368 @@
 <?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.InverterMapper">
-  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Inverter">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    <id column="id" jdbcType="VARCHAR" property="id" />
-    <result column="code" jdbcType="VARCHAR" property="code" />
-    <result column="windpowerstationid" jdbcType="VARCHAR" property="windpowerstationid" />
-    <result column="projectid" jdbcType="VARCHAR" property="projectid" />
-    <result column="lineid" jdbcType="VARCHAR" property="lineid" />
-    <result column="name" jdbcType="VARCHAR" property="name" />
-    <result column="squareid" jdbcType="VARCHAR" property="squareid" />
-    <result column="boxchangeid" jdbcType="VARCHAR" property="boxchangeid" />
-    <result column="isstandard" jdbcType="INTEGER" property="isstandard" />
-    <result column="modelId" jdbcType="VARCHAR" property="modelid" />
-  </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.Inverter">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        <id column="id" jdbcType="VARCHAR" property="id"/>
+        <result column="code" jdbcType="VARCHAR" property="code"/>
+        <result column="windpowerstationid" jdbcType="VARCHAR" property="windpowerstationid"/>
+        <result column="projectid" jdbcType="VARCHAR" property="projectid"/>
+        <result column="lineid" jdbcType="VARCHAR" property="lineid"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="squareid" jdbcType="VARCHAR" property="squareid"/>
+        <result column="boxchangeid" jdbcType="VARCHAR" property="boxchangeid"/>
+        <result column="isstandard" jdbcType="INTEGER" property="isstandard"/>
+        <result column="modelId" jdbcType="VARCHAR" property="modelid"/>
+        <result column="branchnum" jdbcType="INTEGER" property="branchnum"/>
+    </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, code, windpowerstationid, projectid, lineid, name, squareid, boxchangeid, isstandard,
+        modelId,branchnum
+    </sql>
+    <select id="selectByExample" parameterType="com.gyee.frame.model.auto.InverterExample" 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 inverter
+        <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 inverter
+        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 inverter
+        where id = #{id,jdbcType=VARCHAR}
+    </delete>
+    <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.InverterExample">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        delete from inverter
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause"/>
         </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    id, code, windpowerstationid, projectid, lineid, name, squareid, boxchangeid, isstandard, 
-    modelId
-  </sql>
-  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.InverterExample" 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 inverter
-    <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 inverter
-    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 inverter
-    where id = #{id,jdbcType=VARCHAR}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.InverterExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    delete from inverter
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.gyee.frame.model.auto.Inverter">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    insert into inverter (id, code, windpowerstationid, 
-      projectid, lineid, name, 
-      squareid, boxchangeid, isstandard, 
-      modelId)
-    values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{windpowerstationid,jdbcType=VARCHAR}, 
-      #{projectid,jdbcType=VARCHAR}, #{lineid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
-      #{squareid,jdbcType=VARCHAR}, #{boxchangeid,jdbcType=VARCHAR}, #{isstandard,jdbcType=INTEGER}, 
-      #{modelid,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Inverter">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    insert into inverter
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="code != null">
-        code,
-      </if>
-      <if test="windpowerstationid != null">
-        windpowerstationid,
-      </if>
-      <if test="projectid != null">
-        projectid,
-      </if>
-      <if test="lineid != null">
-        lineid,
-      </if>
-      <if test="name != null">
-        name,
-      </if>
-      <if test="squareid != null">
-        squareid,
-      </if>
-      <if test="boxchangeid != null">
-        boxchangeid,
-      </if>
-      <if test="isstandard != null">
-        isstandard,
-      </if>
-      <if test="modelid != null">
-        modelId,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=VARCHAR},
-      </if>
-      <if test="code != null">
-        #{code,jdbcType=VARCHAR},
-      </if>
-      <if test="windpowerstationid != null">
-        #{windpowerstationid,jdbcType=VARCHAR},
-      </if>
-      <if test="projectid != null">
-        #{projectid,jdbcType=VARCHAR},
-      </if>
-      <if test="lineid != null">
-        #{lineid,jdbcType=VARCHAR},
-      </if>
-      <if test="name != null">
-        #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="squareid != null">
-        #{squareid,jdbcType=VARCHAR},
-      </if>
-      <if test="boxchangeid != null">
-        #{boxchangeid,jdbcType=VARCHAR},
-      </if>
-      <if test="isstandard != null">
-        #{isstandard,jdbcType=INTEGER},
-      </if>
-      <if test="modelid != null">
-        #{modelid,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.gyee.frame.model.auto.InverterExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    select count(*) from inverter
-    <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 inverter
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=VARCHAR},
-      </if>
-      <if test="record.code != null">
+    </delete>
+    <insert id="insert" parameterType="com.gyee.frame.model.auto.Inverter">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        insert into inverter (id, code, windpowerstationid,
+        projectid, lineid, name,
+        squareid, boxchangeid, isstandard,
+        modelId,branchnum)
+        values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{windpowerstationid,jdbcType=VARCHAR},
+        #{projectid,jdbcType=VARCHAR}, #{lineid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
+        #{squareid,jdbcType=VARCHAR}, #{boxchangeid,jdbcType=VARCHAR}, #{isstandard,jdbcType=INTEGER},
+        #{modelid,jdbcType=VARCHAR}, #{branchnum,jdbcType=INTEGER})
+    </insert>
+    <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Inverter">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        insert into inverter
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="code != null">
+                code,
+            </if>
+            <if test="windpowerstationid != null">
+                windpowerstationid,
+            </if>
+            <if test="projectid != null">
+                projectid,
+            </if>
+            <if test="lineid != null">
+                lineid,
+            </if>
+            <if test="name != null">
+                name,
+            </if>
+            <if test="squareid != null">
+                squareid,
+            </if>
+            <if test="boxchangeid != null">
+                boxchangeid,
+            </if>
+            <if test="isstandard != null">
+                isstandard,
+            </if>
+            <if test="modelid != null">
+                modelId,
+            </if>
+            <if test="branchnum != null">
+                branchnum,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=VARCHAR},
+            </if>
+            <if test="code != null">
+                #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="windpowerstationid != null">
+                #{windpowerstationid,jdbcType=VARCHAR},
+            </if>
+            <if test="projectid != null">
+                #{projectid,jdbcType=VARCHAR},
+            </if>
+            <if test="lineid != null">
+                #{lineid,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="squareid != null">
+                #{squareid,jdbcType=VARCHAR},
+            </if>
+            <if test="boxchangeid != null">
+                #{boxchangeid,jdbcType=VARCHAR},
+            </if>
+            <if test="isstandard != null">
+                #{isstandard,jdbcType=INTEGER},
+            </if>
+            <if test="modelid != null">
+                #{modelid,jdbcType=VARCHAR},
+            </if>
+            <if test="branchnum != null">
+                #{branchnum,jdbcType=INTEGER},
+            </if>
+        </trim>
+    </insert>
+    <select id="countByExample" parameterType="com.gyee.frame.model.auto.InverterExample" resultType="java.lang.Long">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        select count(*) from inverter
+        <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 inverter
+        <set>
+            <if test="record.id != null">
+                id = #{record.id,jdbcType=VARCHAR},
+            </if>
+            <if test="record.code != null">
+                code = #{record.code,jdbcType=VARCHAR},
+            </if>
+            <if test="record.windpowerstationid != null">
+                windpowerstationid = #{record.windpowerstationid,jdbcType=VARCHAR},
+            </if>
+            <if test="record.projectid != null">
+                projectid = #{record.projectid,jdbcType=VARCHAR},
+            </if>
+            <if test="record.lineid != null">
+                lineid = #{record.lineid,jdbcType=VARCHAR},
+            </if>
+            <if test="record.name != null">
+                name = #{record.name,jdbcType=VARCHAR},
+            </if>
+            <if test="record.squareid != null">
+                squareid = #{record.squareid,jdbcType=VARCHAR},
+            </if>
+            <if test="record.boxchangeid != null">
+                boxchangeid = #{record.boxchangeid,jdbcType=VARCHAR},
+            </if>
+            <if test="record.isstandard != null">
+                isstandard = #{record.isstandard,jdbcType=INTEGER},
+            </if>
+            <if test="record.modelid != null">
+                modelId = #{record.modelid,jdbcType=VARCHAR},
+            </if>
+            <if test="record.branchnum != null">
+                branchnum = #{record.branchnum,jdbcType=INTEGER},
+            </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 inverter
+        set id = #{record.id,jdbcType=VARCHAR},
         code = #{record.code,jdbcType=VARCHAR},
-      </if>
-      <if test="record.windpowerstationid != null">
         windpowerstationid = #{record.windpowerstationid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.projectid != null">
         projectid = #{record.projectid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.lineid != null">
         lineid = #{record.lineid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.name != null">
         name = #{record.name,jdbcType=VARCHAR},
-      </if>
-      <if test="record.squareid != null">
         squareid = #{record.squareid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.boxchangeid != null">
         boxchangeid = #{record.boxchangeid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.isstandard != null">
         isstandard = #{record.isstandard,jdbcType=INTEGER},
-      </if>
-      <if test="record.modelid != null">
         modelId = #{record.modelid,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 inverter
-    set id = #{record.id,jdbcType=VARCHAR},
-      code = #{record.code,jdbcType=VARCHAR},
-      windpowerstationid = #{record.windpowerstationid,jdbcType=VARCHAR},
-      projectid = #{record.projectid,jdbcType=VARCHAR},
-      lineid = #{record.lineid,jdbcType=VARCHAR},
-      name = #{record.name,jdbcType=VARCHAR},
-      squareid = #{record.squareid,jdbcType=VARCHAR},
-      boxchangeid = #{record.boxchangeid,jdbcType=VARCHAR},
-      isstandard = #{record.isstandard,jdbcType=INTEGER},
-      modelId = #{record.modelid,jdbcType=VARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Inverter">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update inverter
-    <set>
-      <if test="code != null">
-        code = #{code,jdbcType=VARCHAR},
-      </if>
-      <if test="windpowerstationid != null">
+        branchnum = #{record.branchnum,jdbcType=INTEGER}
+        <if test="_parameter != null">
+            <include refid="Update_By_Example_Where_Clause"/>
+        </if>
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Inverter">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        update inverter
+        <set>
+            <if test="code != null">
+                code = #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="windpowerstationid != null">
+                windpowerstationid = #{windpowerstationid,jdbcType=VARCHAR},
+            </if>
+            <if test="projectid != null">
+                projectid = #{projectid,jdbcType=VARCHAR},
+            </if>
+            <if test="lineid != null">
+                lineid = #{lineid,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                name = #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="squareid != null">
+                squareid = #{squareid,jdbcType=VARCHAR},
+            </if>
+            <if test="boxchangeid != null">
+                boxchangeid = #{boxchangeid,jdbcType=VARCHAR},
+            </if>
+            <if test="isstandard != null">
+                isstandard = #{isstandard,jdbcType=INTEGER},
+            </if>
+            <if test="modelid != null">
+                modelId = #{modelid,jdbcType=VARCHAR},
+            </if>
+            <if test="branchnum != null">
+                branchnum = #{branchnum,jdbcType=INTEGER},
+            </if>
+        </set>
+        where id = #{id,jdbcType=VARCHAR}
+    </update>
+    <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Inverter">
+        <!--
+          WARNING - @mbg.generated
+          This element is automatically generated by MyBatis Generator, do not modify.
+        -->
+        update inverter
+        set code = #{code,jdbcType=VARCHAR},
         windpowerstationid = #{windpowerstationid,jdbcType=VARCHAR},
-      </if>
-      <if test="projectid != null">
         projectid = #{projectid,jdbcType=VARCHAR},
-      </if>
-      <if test="lineid != null">
         lineid = #{lineid,jdbcType=VARCHAR},
-      </if>
-      <if test="name != null">
         name = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="squareid != null">
         squareid = #{squareid,jdbcType=VARCHAR},
-      </if>
-      <if test="boxchangeid != null">
         boxchangeid = #{boxchangeid,jdbcType=VARCHAR},
-      </if>
-      <if test="isstandard != null">
         isstandard = #{isstandard,jdbcType=INTEGER},
-      </if>
-      <if test="modelid != null">
         modelId = #{modelid,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Inverter">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-    -->
-    update inverter
-    set code = #{code,jdbcType=VARCHAR},
-      windpowerstationid = #{windpowerstationid,jdbcType=VARCHAR},
-      projectid = #{projectid,jdbcType=VARCHAR},
-      lineid = #{lineid,jdbcType=VARCHAR},
-      name = #{name,jdbcType=VARCHAR},
-      squareid = #{squareid,jdbcType=VARCHAR},
-      boxchangeid = #{boxchangeid,jdbcType=VARCHAR},
-      isstandard = #{isstandard,jdbcType=INTEGER},
-      modelId = #{modelid,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
+        branchnum = #{branchnum,jdbcType=INTEGER}
+        where id = #{id,jdbcType=VARCHAR}
+    </update>
 </mapper>