Browse Source

后台管理修改

shilin 2 years ago
parent
commit
dbe0843dfd

+ 12 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -330,6 +330,18 @@ public class InitialRunner implements CommandLineRunner {
                         map.put(mp.getUniformcode(), mp);
                         phPointmap.put(mp.getJunctionboxid(), map);
                     }
+                }else if(mp.getTypes().equals(PhotoVolaticType.ZL.getName()))
+                {
+
+                    if(phPointmap.containsKey(mp.getInverterid())){
+                        Map<String, PhotovoltaicTestingPointNew> map = phPointmap.get(mp.getInverterid());
+                        map.put(mp.getUniformcode(), mp);
+                        phPointmap.put(mp.getInverterid(), map);
+                    }else{
+                        Map<String, PhotovoltaicTestingPointNew> map = new HashMap<String, PhotovoltaicTestingPointNew>();
+                        map.put(mp.getUniformcode(), mp);
+                        phPointmap.put(mp.getInverterid(), map);
+                    }
                 }
 
             }

+ 10 - 0
web/monitor-web-sxjn/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

+ 29 - 19
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java

@@ -83,7 +83,8 @@ public class MatrixPushByWpService {
 
 
         Map<String, Object> map = new HashMap<>();
-
+        Map<String, Object> zcmap = new HashMap<>();
+        Map<String, Object> jzmap = new HashMap<>();
         int djts = 0;
         int yxts = 0;
         int gzts = 0;
@@ -101,11 +102,17 @@ public class MatrixPushByWpService {
 
                 String[] strs = Constant.TPOINT_Inverter_Matrix;
                 List<String> pointcodes = new ArrayList<>();
-                String[] zlstrs = Constant.TPOINT_Inverter_Branch;
+
                 List<String> zlpointcodes = new ArrayList<>();
 
                 for (Inverter wt : wtls) {
 
+                    String[] zlstrs = new String[wt.getBranchnum()];
+
+                    for(int i=0;i<zlstrs.length;i++)
+                    {
+                        zlstrs[i]=Constant.TPOINT_Inverter_Branch[i];
+                    }
 
                     for (int i = 0; i < strs.length; i++) {
                         PhotovoltaicTestingPointNew pt = photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), strs[i]);
@@ -116,7 +123,7 @@ public class MatrixPushByWpService {
 
                     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())) {
+                        if (StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode())) {
                             zlpointcodes.add(pt.getCode());
                         }
                     }
@@ -126,6 +133,7 @@ public class MatrixPushByWpService {
                 List<PointData> zlptlist = realApiUtil.getRealData(zlpointcodes);
 
 
+                int zlnumber=0;
                 if (!ptlist.isEmpty() && ptlist.size() == pointcodes.size()) {
                     int step = strs.length;
                     for (int i = 0; i < wtls.size(); i++) {
@@ -153,23 +161,25 @@ public class MatrixPushByWpService {
                             slts++;
                         }
                         List<Integer> zlls = new ArrayList<>();
-                        int zlstep = zlstrs.length;
+
                         if (!zlptlist.isEmpty() && zlptlist.size() == zlpointcodes.size()) {
                             int zlresult = 0; //正常
 
-                            for (int j = 0; j < zlstrs.length; j++) {
-                                if (StringUtils.notEmp(zlptlist.get(i * zlstep + j))) {
-                                    double zldl = zlptlist.get(i * zlstep + j).getPointValueInDouble();
-                                    double dlresult = new BigDecimal(dl).divide(new BigDecimal(2), 4, RoundingMode.HALF_EVEN).doubleValue();
+                            for (int j = 0; j < wt.getBranchnum(); j++) {
+
+
+                                    double zldl = zlptlist.get(zlnumber).getPointValueInDouble();
+                                    double dlresult = new BigDecimal(dl).divide(new BigDecimal(20), 4, RoundingMode.HALF_EVEN).doubleValue();
                                     if (zldl < dlresult) {
                                         zlresult = 1;//偏低
-                                    } else {
+                                    } else  if (zldl==0) {
                                         zlresult = 2;//零支路
                                     }
-                                }
+                                zlnumber++;
                                 zlls.add(zlresult);
                             }
 
+
                         }
 
 
@@ -178,9 +188,9 @@ public class MatrixPushByWpService {
 
                             if (square.getTypes().equals(ZC)) {
 
-                                if (map.containsKey(square.getId())) {
-                                    List<InverterVo> ls = (List<InverterVo>) map.get(square.getId());
-                                    ;
+                                if (zcmap.containsKey(square.getId())) {
+                                    List<InverterVo> ls = (List<InverterVo>) zcmap.get(square.getId());
+
                                     InverterVo vo = new InverterVo();
                                     vo.setId(wt.getId());
                                     vo.setName(wt.getName());
@@ -190,7 +200,7 @@ public class MatrixPushByWpService {
                                     vo.setSqname(square.getName());
                                     vo.setZt(zt);
                                     ls.add(vo);
-                                    map.put(square.getId(), ls);
+                                    zcmap.put(square.getId(), ls);
                                 } else {
                                     List<InverterVo> ls = new ArrayList<>();
                                     InverterVo vo = new InverterVo();
@@ -202,7 +212,7 @@ public class MatrixPushByWpService {
                                     vo.setZlls(zlls);
                                     vo.setSqname(square.getName());
                                     ls.add(vo);
-                                    map.put(square.getId(), ls);
+                                    zcmap.put(square.getId(), ls);
 
                                 }
                             } else {
@@ -218,12 +228,13 @@ public class MatrixPushByWpService {
                             }
                         }
                     }
-
+                    map.put(JZ,vos);
+                    map.put(ZC,zcmap);
                 }
 
             }
 
-
+;
         } else if (wpId.endsWith("FDC") && InitialRunner.wp_wtmap.containsKey(wpId)) {
 
 
@@ -311,8 +322,7 @@ public class MatrixPushByWpService {
 
             }
 
-            //风机指标MAP
-            map.put("fjmap", vos);
+
         }
         fczbmap.put("djts", djts);
         fczbmap.put("yxts", yxts);

+ 344 - 327
web/monitor-web-sxjn/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>