Jelajahi Sumber

添加逆变器判定

shilin 2 tahun lalu
induk
melakukan
acd824e2bb

+ 1 - 1
web/health-hb/src/main/java/com/gyee/frame/mapper/auto/StatejudgmentrecordMapper.java

@@ -61,7 +61,7 @@ public interface StatejudgmentrecordMapper {
      *
      * @mbg.generated
      */
-    Statejudgmentrecord selectByPrimaryKey(Integer id);
+    Statejudgmentrecord selectByPrimaryKey(String id);
 
     /**
      * This method was generated by MyBatis Generator.

+ 4 - 11
web/health-hb/src/main/java/com/gyee/frame/model/auto/Statejudgmentrecord.java

@@ -10,7 +10,7 @@ public class Statejudgmentrecord implements Serializable {
      *
      * @mbg.generated
      */
-    private Integer id;
+    private String id;
 
     /**
      *
@@ -55,19 +55,12 @@ public class Statejudgmentrecord implements Serializable {
      *
      * @mbg.generated
      */
-    public Integer getId() {
+
+    public String getId() {
         return id;
     }
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column STATEJUDGMENTRECORD.ID
-     *
-     * @param id the value for STATEJUDGMENTRECORD.ID
-     *
-     * @mbg.generated
-     */
-    public void setId(Integer id) {
+    public void setId(String id) {
         this.id = id;
     }
 

+ 10 - 10
web/health-hb/src/main/java/com/gyee/frame/model/auto/StatejudgmentrecordExample.java

@@ -204,52 +204,52 @@ public class StatejudgmentrecordExample {
             return (Criteria) this;
         }
 
-        public Criteria andIdEqualTo(Integer value) {
+        public Criteria andIdEqualTo(String value) {
             addCriterion("ID =", value, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdNotEqualTo(Integer value) {
+        public Criteria andIdNotEqualTo(String value) {
             addCriterion("ID <>", value, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdGreaterThan(Integer value) {
+        public Criteria andIdGreaterThan(String value) {
             addCriterion("ID >", value, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
             addCriterion("ID >=", value, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdLessThan(Integer value) {
+        public Criteria andIdLessThan(String value) {
             addCriterion("ID <", value, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdLessThanOrEqualTo(Integer value) {
+        public Criteria andIdLessThanOrEqualTo(String value) {
             addCriterion("ID <=", value, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdIn(List<Integer> values) {
+        public Criteria andIdIn(List<String> values) {
             addCriterion("ID in", values, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdNotIn(List<Integer> values) {
+        public Criteria andIdNotIn(List<String> values) {
             addCriterion("ID not in", values, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdBetween(Integer value1, Integer value2) {
+        public Criteria andIdBetween(String value1, String value2) {
             addCriterion("ID between", value1, value2, "id");
             return (Criteria) this;
         }
 
-        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+        public Criteria andIdNotBetween(String value1, String value2) {
             addCriterion("ID not between", value1, value2, "id");
             return (Criteria) this;
         }

+ 2 - 2
web/health-hb/src/main/java/com/gyee/frame/service/StatejudgmentrecordService.java

@@ -22,7 +22,7 @@ public class StatejudgmentrecordService implements BaseService<Statejudgmentreco
 	@Override
 	public int deleteByPrimaryKey(String ids) {
 				
-			List<Integer> lista=Convert.toIntArrayList(ids);
+			List<String> lista=Convert.toListStrArray(ids);
 			StatejudgmentrecordExample example=new StatejudgmentrecordExample();
 			example.createCriteria().andIdIn(lista);
 			return statejudgmentrecordMapper.deleteByExample(example);
@@ -34,7 +34,7 @@ public class StatejudgmentrecordService implements BaseService<Statejudgmentreco
 	@Override
 	public Statejudgmentrecord selectByPrimaryKey(String id) {
 				
-			return statejudgmentrecordMapper.selectByPrimaryKey(Integer.valueOf(id));
+			return statejudgmentrecordMapper.selectByPrimaryKey(id);
 				
 	}
 

+ 2 - 2
web/health-hb/src/main/java/com/gyee/frame/service/health/HealthMainService.java

@@ -491,8 +491,8 @@ public class HealthMainService {
                         if(InitialRunner.wtmap.containsKey(wtId))
                         {
                             Windturbine wt=InitialRunner.wtmap.get(wtId);
-                            if (StringUtils.notEmp(wt.getStatus())) {
-                                String num = wt.getStatus().substring(wt.getStatus().length() - 3);
+                            if (StringUtils.notEmp(wt.getId())) {
+                                String num = wt.getId().substring(wt.getId().indexOf("_")+1);
                                 vo.setName(num);
 
                             }

+ 47 - 24
web/health-hb/src/main/java/com/gyee/frame/service/health/HealthSubService.java

@@ -31,7 +31,8 @@ public class HealthSubService {
 //    private Monthlygradeassessmentmain2Service monthlygradeassessmentmain2Service;
     @Resource
     private ShutdowneventService shutdowneventService;
-
+    @Resource
+    private StatejudgmentrecordService statejudgmentrecordService;
     @Resource
     private CurvefittingsubService curvefittingsubService;
     @Resource
@@ -532,32 +533,54 @@ public class HealthSubService {
         if (StringUtils.notEmp(wtId)) {
 
 
-            List<Statejudgmentrecord2> ls = statejudgmentrecord2Service.findStatejudgmentrecord2(wtId);
+            List<Statejudgmentrecord> ls = statejudgmentrecordService.getStatejudgmentrecordListBywtId(wtId);
 
 
-            Windturbinetestingpointnew ai = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FJZT);
-            PointData point=realApiUtil.getRealData(ai);
-
-            if(StringUtils.notEmp(point))
-            {
-                if(point.getPointValueInDouble()==2)
-                {
+            if (!ls.isEmpty()) {
+                String[] str = ls.get(0).getStatejudgment().split("-");
+                if (str.length == 6) {
                     ValueVo vo1 = new ValueVo();
+                    ValueVo vo2 = new ValueVo();
+                    ValueVo vo3 = new ValueVo();
+                    ValueVo vo4 = new ValueVo();
+                    ValueVo vo5 = new ValueVo();
+                    ValueVo vo6 = new ValueVo();
+
                     vo1.setName("运行状态为故障!");
-                    vo1.setValue("进行扣分处理!");
-                }
-            }
-            if (!ls.isEmpty()) {
-                String[] str = ls.get(0).getStatejudgment().split(",");
-                if (str.length>0) {
-                    for(int i=0;i<str.length;i++)
+                    vo2.setName("风机部件健康状态异常!");
+                    vo3.setName("风机等级评估得分过低!");
+                    vo4.setName("3-5米小风曲线偏差过大!");
+                    vo5.setName("5-11米风曲线偏差过大!");
+                    vo6.setName("11-25米风曲线偏差过大!");
+                    Windturbinetestingpointnew ai = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FJZT);
+                    PointData point=realApiUtil.getRealData(ai);
+
+                    if(StringUtils.notEmp(point))
                     {
-                        ValueVo vo1 = new ValueVo();
-                        vo1.setName(str[i]);
-                        vo1.setValue("进行扣分处理!");
-                        vols.add(vo1);
+                        if(point.getPointValueInDouble()==2)
+                        {
+                            setScoreValue("1",vo1);
+                        }else
+                        {
+                            setScoreValue(str[0], vo1);
+                        }
+                    }else
+                    {
+                        setScoreValue(str[0], vo1);
                     }
 
+                    setScoreValue(str[1], vo2);
+                    setScoreValue(str[2], vo3);
+                    setScoreValue(str[3], vo4);
+                    setScoreValue(str[4], vo5);
+                    setScoreValue(str[5], vo6);
+
+                    vols.add(vo1);
+                    vols.add(vo2);
+                    vols.add(vo3);
+                    vols.add(vo4);
+                    vols.add(vo5);
+                    vols.add(vo6);
                 }
             }
 
@@ -1317,7 +1340,7 @@ public class HealthSubService {
                 double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
                 String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
                 time = time.substring(time.length() - 5);
-                tList.add(time);
+             //   tList.add(time);
                 clxls.add(hisData);
             }
         } catch (Exception e) {
@@ -1330,7 +1353,7 @@ public class HealthSubService {
                 double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
                 String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
                 time = time.substring(time.length() - 5);
-                tList.add(time);
+             //   tList.add(time);
                 fdjls.add(hisData);
             }
         } catch (Exception e) {
@@ -1343,7 +1366,7 @@ public class HealthSubService {
                 double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
                 String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
                 time = time.substring(time.length() - 5);
-                tList.add(time);
+             //   tList.add(time);
                 bjls.add(hisData);
             }
         } catch (Exception e) {
@@ -1356,7 +1379,7 @@ public class HealthSubService {
                 double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
                 String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
                 time = time.substring(time.length() - 5);
-                tList.add(time);
+               // tList.add(time);
                 zkls.add(hisData);
             }
         } catch (Exception e) {

+ 1 - 1
web/health-hb/src/main/java/com/gyee/frame/service/health/WindTurbineHealthListService.java

@@ -34,7 +34,7 @@ public class WindTurbineHealthListService {
     public List<HealthmodelrecordsVo> windTurbineHealthList(String wpId) throws Exception {
 
         List<String> codels = new ArrayList<String>();
-        codels.add(Constant.FJJKJGZ);
+        codels.add(Constant.FJJKZZ);
         codels.add(Constant.CLXJKZT);
         codels.add(Constant.FDJJKZT);
         codels.add(Constant.BJJKZT);

+ 9 - 9
web/health-hb/src/main/resources/mybatis/auto/StatejudgmentrecordMapper.xml

@@ -6,7 +6,7 @@
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
-    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <id column="ID" jdbcType="VARCHAR" property="id" />
     <result column="WPID" jdbcType="VARCHAR" property="wpid" />
     <result column="WTID" jdbcType="VARCHAR" property="wtid" />
     <result column="STATEJUDGMENT" jdbcType="VARCHAR" property="statejudgment" />
@@ -110,7 +110,7 @@
     select 
     <include refid="Base_Column_List" />
     from STATEJUDGMENTRECORD
-    where ID = #{id,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=VARCHAR}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
     <!--
@@ -118,7 +118,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     delete from STATEJUDGMENTRECORD
-    where ID = #{id,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=VARCHAR}
   </delete>
   <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.StatejudgmentrecordExample">
     <!--
@@ -137,7 +137,7 @@
     -->
     insert into STATEJUDGMENTRECORD (ID, WPID, WTID, 
       STATEJUDGMENT)
-    values (#{id,jdbcType=DECIMAL}, #{wpid,jdbcType=VARCHAR}, #{wtid,jdbcType=VARCHAR}, 
+    values (#{id,jdbcType=VARCHAR}, #{wpid,jdbcType=VARCHAR}, #{wtid,jdbcType=VARCHAR}, 
       #{statejudgment,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Statejudgmentrecord">
@@ -162,7 +162,7 @@
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
-        #{id,jdbcType=DECIMAL},
+        #{id,jdbcType=VARCHAR},
       </if>
       <if test="wpid != null">
         #{wpid,jdbcType=VARCHAR},
@@ -193,7 +193,7 @@
     update STATEJUDGMENTRECORD
     <set>
       <if test="record.id != null">
-        ID = #{record.id,jdbcType=DECIMAL},
+        ID = #{record.id,jdbcType=VARCHAR},
       </if>
       <if test="record.wpid != null">
         WPID = #{record.wpid,jdbcType=VARCHAR},
@@ -215,7 +215,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     update STATEJUDGMENTRECORD
-    set ID = #{record.id,jdbcType=DECIMAL},
+    set ID = #{record.id,jdbcType=VARCHAR},
       WPID = #{record.wpid,jdbcType=VARCHAR},
       WTID = #{record.wtid,jdbcType=VARCHAR},
       STATEJUDGMENT = #{record.statejudgment,jdbcType=VARCHAR}
@@ -240,7 +240,7 @@
         STATEJUDGMENT = #{statejudgment,jdbcType=VARCHAR},
       </if>
     </set>
-    where ID = #{id,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Statejudgmentrecord">
     <!--
@@ -251,6 +251,6 @@
     set WPID = #{wpid,jdbcType=VARCHAR},
       WTID = #{wtid,jdbcType=VARCHAR},
       STATEJUDGMENT = #{statejudgment,jdbcType=VARCHAR}
-    where ID = #{id,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>