Browse Source

健康管理功能模块优化与BUG修复

shilin 2 years ago
parent
commit
96f6873c6a
21 changed files with 1100 additions and 30 deletions
  1. 32 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/EarlywarningmainMapper.java
  2. 5 4
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/HealthsystemsubMapper.java
  3. 21 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/StatejudgmentrecordMapper.java
  4. 289 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/model/auto/Earlywarningmain.java
  5. 38 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/model/auto/Statejudgmentrecord.java
  6. 62 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/EarlywarningsService.java
  7. 231 10
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/HealthJudgeService.java
  8. 27 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/HealthsystemsubsService.java
  9. 4 4
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/RecommenmainsService.java
  10. 29 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/StatejudgmentrecordsService.java
  11. 48 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/WindturbinetestingpointnewsService.java
  12. 64 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/WindturbinewindyawsService.java
  13. 22 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IEarlywarningmainService.java
  14. 3 2
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IHealthsystemsubService.java
  15. 17 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IStatejudgmentrecordService.java
  16. 32 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/EarlywarningmainServiceImpl.java
  17. 6 5
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/HealthsystemsubServiceImpl.java
  18. 30 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/StatejudgmentrecordServiceImpl.java
  19. 20 0
      realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/task/SaticScheduleTask.java
  20. 113 0
      realtime/healthmodel-server-cph/src/main/resources/application-hbn.yml
  21. 7 5
      realtime/healthmodel-server-cph/src/test/java/HealthTest.java

+ 32 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/EarlywarningmainMapper.java

@@ -0,0 +1,32 @@
+package com.gyee.healthmodel.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.healthmodel.model.auto.Earlywarningmain;
+import com.gyee.healthmodel.vo.EventVo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-10
+ */
+public interface EarlywarningmainMapper extends BaseMapper<Earlywarningmain> {
+
+
+
+    @Select("select s.windturbineid wtId,s.alertvalue warnId,s.alerttext warnName,count(*) eventnum " +
+            " from ${alerthistory} h,alarmsnap s " +
+            " where to_NUMBER(h.snapid) =to_NUMBER(s.id) and s.category1='custom'    and s.windturbineid is not null" +
+            " and s.windturbineid='${wtId}'" +
+            " group by  s.stationid,s.alertvalue,s.alerttext,s.windturbineid order by s.windturbineid,eventnum desc")
+
+    public List<EventVo> getCounList(@Param(value = "alerthistory")String alerthistory,@Param(value = "wtId")String wtId);
+
+
+}

+ 5 - 4
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/HealthsystemsubMapper.java

@@ -1,12 +1,10 @@
 package com.gyee.healthmodel.mapper.auto;
 
-import com.gyee.healthmodel.model.auto.Healthsystem;
-import com.gyee.healthmodel.model.auto.Healthsystemsub;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.healthmodel.model.auto.Healthsystemsub;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
-import java.util.Date;
 import java.util.List;
 
 /**
@@ -22,4 +20,7 @@ public interface HealthsystemsubMapper extends BaseMapper<Healthsystemsub> {
 
     @Select(" select * from HealthSystemSub t where hid=#{hid}  order BY id   ")
     public List<Healthsystemsub> queryHealthSystemSub(@Param(value = "hid") String hid);
-}
+
+    @Select(" select * from HealthSystemSub t  order BY id   ")
+    public List<Healthsystemsub> queryHealthSystemSubAll();
+}

+ 21 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/mapper/auto/StatejudgmentrecordMapper.java

@@ -0,0 +1,21 @@
+package com.gyee.healthmodel.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.healthmodel.model.auto.Statejudgmentrecord;
+import org.apache.ibatis.annotations.Delete;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-20
+ */
+public interface StatejudgmentrecordMapper extends BaseMapper<Statejudgmentrecord> {
+
+    @Delete(" delete from Statejudgmentrecord ")
+    public int deleteStatejudge();
+
+
+}

+ 289 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/model/auto/Earlywarningmain.java

@@ -0,0 +1,289 @@
+package com.gyee.healthmodel.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("EARLYWARNINGMAIN")
+public class Earlywarningmain extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("RECODEDATE")
+    private Date recodedate;
+
+    @TableField("WPID")
+    private String wpid;
+
+    @TableField("WPNAME")
+    private String wpname;
+
+    @TableField("WTID")
+    private String wtid;
+
+    @TableField("WTNAME")
+    private String wtname;
+
+    @TableField("DAY3TOP1")
+    private Integer day3top1;
+
+    @TableField("DAY3TOP2")
+    private Integer day3top2;
+
+    @TableField("DAY3TOP3")
+    private Integer day3top3;
+
+    @TableField("DAY7TOP1")
+    private Integer day7top1;
+
+    @TableField("DAY7TOP2")
+    private Integer day7top2;
+
+    @TableField("DAY7TOP3")
+    private Integer day7top3;
+
+    @TableField("DAY15TOP1")
+    private Integer day15top1;
+
+    @TableField("DAY15TOP2")
+    private Integer day15top2;
+
+    @TableField("DAY15TOP3")
+    private Integer day15top3;
+
+    @TableField("MONTH1TOP1")
+    private Integer month1top1;
+
+    @TableField("MONTH1TOP2")
+    private Integer month1top2;
+
+    @TableField("MONTH1TOP3")
+    private Integer month1top3;
+
+    @TableField("DAY3TOP1NAME")
+    private String day3top1name;
+
+    @TableField("DAY3TOP2NAME")
+    private String day3top2name;
+
+    @TableField("DAY3TOP3NAME")
+    private String day3top3name;
+
+    @TableField("DAY7TOP1NAME")
+    private String day7top1name;
+
+    @TableField("DAY7TOP2NAME")
+    private String day7top2name;
+
+    @TableField("DAY7TOP3NAME")
+    private String day7top3name;
+
+    @TableField("DAY15TOP1NAME")
+    private String day15top1name;
+
+    @TableField("DAY15TOP2NAME")
+    private String day15top2name;
+
+    @TableField("DAY15TOP3NAME")
+    private String day15top3name;
+
+    @TableField("MONTH1TOP1NAME")
+    private String month1top1name;
+
+    @TableField("MONTH1TOP2NAME")
+    private String month1top2name;
+
+    @TableField("MONTH1TOP3NAME")
+    private String month1top3name;
+
+    @TableField("MONTH1TOPNUM")
+    private Integer month1topnum;
+
+    @TableField("DAY7TOPNUM")
+    private Integer day7topnum;
+
+    @TableField("DAY15TOPNUM")
+    private Integer day15topnum;
+
+    @TableField("DAY3TOPNUM")
+    private Integer day3topnum;
+
+    @TableField("SYNTHESISTOPNUM")
+    private Integer synthesistopnum;
+
+    @TableField("DAY1TOP1")
+    private Integer day1top1;
+
+    @TableField("DAY1TOP2")
+    private Integer day1top2;
+
+    @TableField("DAY1TOP3")
+    private Integer day1top3;
+
+    @TableField("DAY1TOP1NAME")
+    private String day1top1name;
+
+    @TableField("DAY1TOP2NAME")
+    private String day1top2name;
+
+    @TableField("DAY1TOP3NAME")
+    private String day1top3name;
+
+    @TableField("DAY1TOPNUM")
+    private Integer day1topnum;
+
+    private String day3top1Id;
+    private String day3top2Id;
+    private String day3top3Id;
+    private String day7top1Id;
+    private String day7top2Id;
+    private String day7top3Id;
+    private String day15top1Id;
+    private String day15top2Id;
+    private String day15top3Id;
+    private String month1top1Id;
+    private String month1top2Id;
+    private String month1top3Id;
+
+    private String day1top1Id;
+    private String day1top2Id;
+    private String day1top3Id;
+
+    public String getDay3top1Id() {
+        return day3top1Id;
+    }
+
+    public void setDay3top1Id(String day3top1Id) {
+        this.day3top1Id = day3top1Id;
+    }
+
+    public String getDay3top2Id() {
+        return day3top2Id;
+    }
+
+    public void setDay3top2Id(String day3top2Id) {
+        this.day3top2Id = day3top2Id;
+    }
+
+    public String getDay3top3Id() {
+        return day3top3Id;
+    }
+
+    public void setDay3top3Id(String day3top3Id) {
+        this.day3top3Id = day3top3Id;
+    }
+
+    public String getDay7top1Id() {
+        return day7top1Id;
+    }
+
+    public void setDay7top1Id(String day7top1Id) {
+        this.day7top1Id = day7top1Id;
+    }
+
+    public String getDay7top2Id() {
+        return day7top2Id;
+    }
+
+    public void setDay7top2Id(String day7top2Id) {
+        this.day7top2Id = day7top2Id;
+    }
+
+    public String getDay7top3Id() {
+        return day7top3Id;
+    }
+
+    public void setDay7top3Id(String day7top3Id) {
+        this.day7top3Id = day7top3Id;
+    }
+
+    public String getDay15top1Id() {
+        return day15top1Id;
+    }
+
+    public void setDay15top1Id(String day15top1Id) {
+        this.day15top1Id = day15top1Id;
+    }
+
+    public String getDay15top2Id() {
+        return day15top2Id;
+    }
+
+    public void setDay15top2Id(String day15top2Id) {
+        this.day15top2Id = day15top2Id;
+    }
+
+    public String getDay15top3Id() {
+        return day15top3Id;
+    }
+
+    public void setDay15top3Id(String day15top3Id) {
+        this.day15top3Id = day15top3Id;
+    }
+
+    public String getMonth1top1Id() {
+        return month1top1Id;
+    }
+
+    public void setMonth1top1Id(String month1top1Id) {
+        this.month1top1Id = month1top1Id;
+    }
+
+    public String getMonth1top2Id() {
+        return month1top2Id;
+    }
+
+    public void setMonth1top2Id(String month1top2Id) {
+        this.month1top2Id = month1top2Id;
+    }
+
+    public String getMonth1top3Id() {
+        return month1top3Id;
+    }
+
+    public void setMonth1top3Id(String month1top3Id) {
+        this.month1top3Id = month1top3Id;
+    }
+
+    public String getDay1top1Id() {
+        return day1top1Id;
+    }
+
+    public void setDay1top1Id(String day1top1Id) {
+        this.day1top1Id = day1top1Id;
+    }
+
+    public String getDay1top2Id() {
+        return day1top2Id;
+    }
+
+    public void setDay1top2Id(String day1top2Id) {
+        this.day1top2Id = day1top2Id;
+    }
+
+    public String getDay1top3Id() {
+        return day1top3Id;
+    }
+
+    public void setDay1top3Id(String day1top3Id) {
+        this.day1top3Id = day1top3Id;
+    }
+}

+ 38 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/model/auto/Statejudgmentrecord.java

@@ -0,0 +1,38 @@
+package com.gyee.healthmodel.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("STATEJUDGMENTRECORD")
+public class Statejudgmentrecord extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("WPID")
+    private String wpid;
+
+    @TableField("WTID")
+    private String wtid;
+
+    @TableField("STATEJUDGMENT")
+    private String statejudgment;
+
+
+}

+ 62 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/EarlywarningsService.java

@@ -0,0 +1,62 @@
+package com.gyee.healthmodel.service;
+
+import com.gyee.common.model.StringUtils;
+import com.gyee.healthmodel.init.CacheContext;
+import com.gyee.healthmodel.model.auto.Windpowerstation;
+import com.gyee.healthmodel.model.auto.Windturbine;
+import com.gyee.healthmodel.service.auto.IEarlywarningmainService;
+import com.gyee.healthmodel.vo.EventVo;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Calendar;
+import java.util.List;
+
+@Service
+public class EarlywarningsService {
+
+    @Resource
+    private IEarlywarningmainService earlywarningmainService;
+
+    private final String  ALARMHISTORY="ALARMHISTORY";
+
+    public List<EventVo> getCountMap(String wtId) {
+
+        List<EventVo> list = null;
+        if(StringUtils.notEmp(wtId) && CacheContext.wtmap.containsKey(wtId) )
+        {
+            Windturbine wt= CacheContext.wtmap.get(wtId);
+            if(CacheContext.wpmap.containsKey(wt.getWindpowerstationid()))
+            {
+                Windpowerstation wp=CacheContext.wpmap.get(wt.getWindpowerstationid());
+
+                String wpname=wp.getId().substring(0,wp.getId().indexOf("_"));
+                StringBuilder alerthistory=new StringBuilder(ALARMHISTORY).append("_").append(wpname).append("_");
+
+                Calendar cal = Calendar.getInstance();
+                cal.set(Calendar.HOUR_OF_DAY, 0);
+                cal.set(Calendar.MINUTE, 0);
+                cal.set(Calendar.SECOND, 0);
+
+                int year=cal.get(Calendar.YEAR);
+                int month=cal.get(Calendar.MONTH)+1;
+
+                alerthistory.append(year);
+                if(month<10)
+                {
+                    alerthistory.append("0").append(month);
+                }else
+                {
+                    alerthistory.append(month);
+                }
+
+                list =earlywarningmainService.getCounList(String.valueOf(alerthistory),wtId);
+
+            }
+        }
+
+
+
+        return list;
+    }
+}

+ 231 - 10
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/HealthJudgeService.java

@@ -1,7 +1,10 @@
 package com.gyee.healthmodel.service;
 
 
+import com.gyee.common.model.DNAVal;
+import com.gyee.common.model.PointData;
 import com.gyee.healthmodel.init.CacheContext;
+import com.gyee.healthmodel.init.Constant;
 import com.gyee.healthmodel.model.auto.*;
 import com.gyee.healthmodel.util.*;
 import com.gyee.healthmodel.vo.healthsystem.DataVo;
@@ -14,6 +17,8 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.*;
 import java.util.Map.Entry;
 import java.util.concurrent.CountDownLatch;
@@ -31,6 +36,8 @@ public class HealthJudgeService {
 	private ThreadPoolTaskExecutor threadPoolTaskExecutor;
 	@Resource
 	private Statejudgmentrecord2sService statejudgmentrecord2sService;
+    @Resource
+    private StatejudgmentrecordsService statejudgmentrecordsService;
 	@Resource
 	private HealthInitialService healthInitialService;
 	@Resource
@@ -51,17 +58,198 @@ public class HealthJudgeService {
     private WobugeqsService wobugeqsService;
     @Resource
     private AlertrulefailuresubsService alertrulefailuresubsService;
-
+    @Resource
+    private EarlywarningsService earlywarningsService;
 	private final double judgescore=80;
+    @Resource
+    private WindturbinetestingpointnewsService windturbinetestingpointnewsService;
+    @Resource
+    private CurvefittingsubsService curvefittingsubsService;
+    @Resource
+    private Windturbineinfodaytop2sService windturbineinfodaytop2sService;
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+    public void changeHealthModelValue() throws Exception {
+
+//        healthInitialService.healthInitial();// 初始化函数算法模型数据
+
+        List<String> codels = new ArrayList<String>();
+        codels.add(Constant.CLXJKZT);
+        codels.add(Constant.FDJJKZT);
+        codels.add(Constant.BJJKZT);
+        codels.add(Constant.ZKJKZT);
+
+        List<Statejudgmentrecord> pols=new ArrayList<>();
+        for (Windturbine wt : CacheContext.wtls) {
+
+            if (wt.getWindpowerstationid().endsWith("FDC")) {
+
+                Statejudgmentrecord po = new Statejudgmentrecord();
+                po.setId(com.gyee.common.model.StringUtils.getUUID());
+                po.setWpid(wt.getWindpowerstationid());
+                po.setWtid(wt.getId());
+
+                StringBuilder statejudgment = new StringBuilder();
+
+                double fjzt=0;
+                double score=100;
+                Windturbinetestingpointnew ai = windturbinetestingpointnewsService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT);
+                PointData point=realApiUtil.getRealData(ai);
+
+                if(StringUtils.notEmp(point))
+                {
+                    if(point.getPointValueInDouble()==2)
+                    {
+                        fjzt = 2;
+                    }
+                }
+
+                String[] points = new String[codels.size()];
+
+                for (int i = 0; i < codels.size(); i++) {
+                    if (CacheContext.wtpAimap.containsKey(wt.getId())) {
+                        Map<String, Windturbinetestingpointnew> wtmap = CacheContext.wtpAimap.get(wt.getId());
+                        // 判断是否包含该统一编码
+                        if (wtmap.containsKey(codels.get(i))) {
+                            Windturbinetestingpointnew temp = wtmap.get(codels.get(i));
+                            points[i] = temp.getCode();
+                        }
+
+                    }
+                }
+
+                Windturbinetestingpointnew fjjkzf = windturbinetestingpointnewsService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJJKZZ);
+
+                DNAVal[] ssvalues = realApiUtil.getRealtimeTagValues(points);
+
+                PointData fjjkzfpoint=new PointData();
+                fjjkzfpoint.setEdnaId(fjjkzf.getCode());
+                fjjkzfpoint.setPointTime(new BigDecimal(new Date().getTime()).divide(new BigDecimal(1000), 0, RoundingMode.HALF_EVEN).longValue());
+
+                double clxzt = ssvalues[0].DValue;
+                double fdjzt = ssvalues[1].DValue;
+                double bjzt = ssvalues[2].DValue;
+                double zkzt = ssvalues[3].DValue;
+
+                fjjkzfpoint.setPointValueInDouble(score);
+                realApiUtil.updatePoint(fjjkzfpoint);
+
+                // 出现故障状态,直接降到10分 差
+                if (fjzt == 2) {
+                    score = 10.0;
+                    statejudgment.append("1-");
+                } else {
+                    statejudgment.append("0-");
+                }
+                // 齿轮箱、发电机、变浆、主控健康运行状态同时大于等于2
+                if (clxzt >= 2 && fdjzt >= 2 && bjzt >= 2 && zkzt >= 2
+                        || (clxzt == 4 || fdjzt == 4 || bjzt == 4 || zkzt == 4)) {
+                    score = setScoreValue(score);
+                    statejudgment.append("1-");
+                } else {
+                    statejudgment.append("0-");
+                }
+
+                Map<String, Double> xnmap =windturbineinfodaytop2sService.findXnfx(Calendar.getInstance().getTime());
+
+                if(xnmap.containsKey(wt.getId()))
+                {
+                    double djpgscore =xnmap.get(wt.getId());
+                    if(djpgscore<60)
+                    {
+                        setScoreValue(score);
+                        statejudgment.append("1-");
+                    }
+                }else
+                {
+                    statejudgment.append("0-");
+                }
+
+                Map<String, List<Curvefittingsub>> cfmap =null;
+                Calendar c=Calendar.getInstance();
+                c.add(Calendar.DAY_OF_MONTH, -1);
+
+
+                cfmap =curvefittingsubsService.findCurvefittingmapByDate(c.getTime(), wt, 3.0, 5.0);
+                double qxpc1 =curvefittingsubsService.getNuberValue(cfmap, wt);
+                double xfqrqc=Math.abs(qxpc1);
+                //小风曲线偏差
+                if(xfqrqc>5)
+                {
+                    setScoreValue(score);
+                    statejudgment.append("1-");
+                }else
+                {
+                    statejudgment.append("0-");
+                }
+                cfmap = curvefittingsubsService.findCurvefittingmapByDate(c.getTime(), wt, 5.0, 11.0);
+                double qxpc2 =curvefittingsubsService.getNuberValue(cfmap, wt);
+                double zcclqc=Math.abs(qxpc2);
+                //正常出力曲线偏差
+                if(zcclqc>5)
+                {
+                    setScoreValue(score);
+                    statejudgment.append("1-");
+                }else
+                {
+                    statejudgment.append("0-");
+                }
+                cfmap = curvefittingsubsService.findCurvefittingmapByDate(c.getTime(), wt, 11.0, 25.0);
+                double qxpc3 =curvefittingsubsService.getNuberValue(cfmap, wt);
+                double dfqrqc=Math.abs(qxpc3);
+                //大风曲线偏差
+                if(dfqrqc>5)
+                {
+                    setScoreValue(score);
+                    statejudgment.append("1-");
+                }else
+                {
+                    statejudgment.append("0-");
+                }
 
+                fjjkzf = windturbinetestingpointnewsService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJJKZZ);
 
+                fjjkzfpoint=new PointData();
+                fjjkzfpoint.setEdnaId(fjjkzf.getCode());
+                fjjkzfpoint.setPointTime(new BigDecimal(new Date().getTime()).divide(new BigDecimal(1000), 0, RoundingMode.HALF_EVEN).longValue());
 
+                fjjkzfpoint.setPointValueInDouble(score);
+                realApiUtil.updatePoint(fjjkzfpoint);
 
+                po.setStatejudgment(String.valueOf(statejudgment.substring(0, statejudgment.length() - 1)));
+
+                pols.add(po);
+            }
+        }
+
+
+        statejudgmentrecordsService.deleteStatejudge();
+
+        if(!pols.isEmpty())
+        {
+            for(Statejudgmentrecord po:pols)
+            {
+                statejudgmentrecordsService.insertStatejudgmentrecord(po);
+            }
+        }
+        System.out.println("结束健康模型分数计算!");
+    }
+
+    private double setScoreValue(double score) {
+        if (score >= 60) {
+            score = score - 20.0;
+        } else if (score < 60 && score >= 30) {
+            score = score - 10.0;
+        } else {
+            score = 10.0;
+        }
+        return score;
+    }
 	public void healthJudge3() throws Exception {
 
 		ScriptJava sj = new ScriptJava();
 		healthInitialService.healthInitial();// 初始化函数算法模型数据
 
+        Map<String, Integer> maps = new HashMap<>();
 
 		Map<String, List<Healthsystemsub>> hsmap = new HashMap<>();
 
@@ -73,17 +261,33 @@ public class HealthJudgeService {
 			hcmap.put(e.getName(), e);
 		}
 		List<Healthsystem> hsls = healthsystemsService.queryHealthSystem();
+
+        Map<String,List<Healthsystemsub>> map= healthsystemsubsService.queryHealthSystemSubMap();
 		if (!hsls.isEmpty()) {
 			for (Healthsystem hs : hsls) {
-				List<Healthsystemsub> subls = healthsystemsubsService.queryHealthSystemSub(hs.getId());
-				if (!subls.isEmpty()) {
-					StringBuilder sb = new StringBuilder();
-					sb.append(hs.getWpid()).append("_").append(hs.getModelid());
-					if (!hsmap.containsKey(String.valueOf(sb))) {
-						hsmap.put(String.valueOf(sb), subls);
-					}
+//				List<Healthsystemsub> subls = healthsystemsubsService.queryHealthSystemSub(hs.getId());
+//				if (!subls.isEmpty()) {
+//					StringBuilder sb = new StringBuilder();
+//					sb.append(hs.getWpid()).append("_").append(hs.getModelid());
+//					if (!hsmap.containsKey(String.valueOf(sb))) {
+//						hsmap.put(String.valueOf(sb), subls);
+//					}
+//
+//				}
+
+                if(map.containsKey(hs.getId()))
+                {
+                    List<Healthsystemsub> subls =map.get(hs.getId());
+                    if (!subls.isEmpty()) {
+                        StringBuilder sb = new StringBuilder();
+                        sb.append(hs.getWpid()).append("_").append(hs.getModelid());
+                        if (!hsmap.containsKey(String.valueOf(sb))) {
+                            hsmap.put(String.valueOf(sb), subls);
+                        }
+
+                    }
+                }
 
-				}
 			}
 		}
 
@@ -244,7 +448,24 @@ public class HealthJudgeService {
 						if (isHave == true) {
 							po.setMark("此风机近期有故障记录,故不在推荐范围之内!");
 						} else if (po.getScore() <=judgescore) {
-							po.setMark("健康报告达到推荐级别,推荐检修!");
+
+						    if(maps.containsKey(po.getWpid()))
+                            {
+                                int temp=maps.get(po.getWpid())+1;
+                                if(temp>2)
+                                {
+                                    po.setMark("健康指标未达到推荐级别,不予推荐!");
+                                }else
+                                {
+                                    po.setMark("健康报告达到推荐级别,推荐检修!");
+                                }
+                                maps.put(po.getWpid(),temp);
+                            }else
+                            {
+                                po.setMark("健康报告达到推荐级别,推荐检修!");
+                                maps.put(po.getWpid(),1);
+                            }
+							//po.setMark("健康报告达到推荐级别,推荐检修!");
 						} else {
 							po.setMark("健康指标未达到推荐级别,不予推荐!");
 						}

+ 27 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/HealthsystemsubsService.java

@@ -7,7 +7,9 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -36,4 +38,29 @@ public class HealthsystemsubsService  {
 
     }
 
+
+    public Map<String,List<Healthsystemsub>> queryHealthSystemSubMap()
+    {
+        Map<String,List<Healthsystemsub>> map=new HashMap<>();
+        List<Healthsystemsub> ls=healthsystemsubService.queryHealthSystemSubAll();
+        if (!ls.isEmpty())
+        {
+            for(Healthsystemsub sub:ls)
+            {
+                if(map.containsKey(sub.getHid()))
+                {
+                    List<Healthsystemsub> subs=map.get(sub.getHid());
+                    subs.add(sub);
+                    map.put(sub.getHid(),subs);
+                }else
+                {
+                    List<Healthsystemsub> subs=new ArrayList<>();
+                    subs.add(sub);
+                    map.put(sub.getHid(),subs);
+                }
+            }
+        }
+        return  map;
+
+    }
 }

+ 4 - 4
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/RecommenmainsService.java

@@ -126,11 +126,11 @@ public class RecommenmainsService {
                     String partnames = sj.getPart1() + "," + sj.getPart2()
                             + ","
                             + sj.getPart3();
-                    String partids = getAlertRuleIDByName(wt, sj.getPart1())
-                            + "," + getAlertRuleIDByName(wt, sj.getPart2())
-                            + "," + getAlertRuleIDByName(wt, sj.getPart3());
+//                    String partids = getAlertRuleIDByName(wt, sj.getPart1())
+//                            + "," + getAlertRuleIDByName(wt, sj.getPart2())
+//                            + "," + getAlertRuleIDByName(wt, sj.getPart3());
                     rm.setBak1(sj.getFormula());
-                    rm.setBak2(partids);
+                    rm.setBak2(partnames);
                     setJudgeWeatherAndSpeed( wt, rm);
 
 //					if (!rmmap.containsKey(rm.getWtid())) {

+ 29 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/StatejudgmentrecordsService.java

@@ -0,0 +1,29 @@
+package com.gyee.healthmodel.service;
+
+import com.gyee.healthmodel.model.auto.Statejudgmentrecord;
+import com.gyee.healthmodel.service.auto.IStatejudgmentrecordService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * @ClassName : Statejudgmentrecord2sService
+ * @Description : 健康推荐service
+ */
+@Service
+public class StatejudgmentrecordsService {
+
+    @Resource
+    private IStatejudgmentrecordService statejudgmentrecordService;
+
+
+    public boolean insertStatejudgmentrecord(Statejudgmentrecord vo) {
+
+        return  statejudgmentrecordService.save(vo);
+    }
+
+    public int deleteStatejudge() {
+
+        return  statejudgmentrecordService.deleteStatejudge();
+    }
+}

+ 48 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/WindturbinetestingpointnewsService.java

@@ -0,0 +1,48 @@
+package com.gyee.healthmodel.service;
+
+import com.gyee.healthmodel.init.CacheContext;
+import com.gyee.healthmodel.model.auto.Windturbinetestingpointnew;
+import com.gyee.healthmodel.service.auto.IWindturbinetestingpointnewService;
+import com.gyee.healthmodel.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Map;
+
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-03-08
+ */
+@Service
+public class WindturbinetestingpointnewsService {
+
+    @Resource
+    private  IWindturbinetestingpointnewService windturbinetestingpointnewService;
+
+
+    public Windturbinetestingpointnew getWindTurbineTestingPointAi2(String wtId, String unicode)  {
+
+        Windturbinetestingpointnew point=new Windturbinetestingpointnew();
+        if(StringUtils.notEmp(wtId) && StringUtils.notEmp(unicode) )
+        {
+            if(CacheContext.wtmap.containsKey(wtId))
+            {
+                if(CacheContext.wtpAimap.containsKey(wtId))
+                {
+                    Map<String, Windturbinetestingpointnew> map=CacheContext.wtpAimap.get(wtId);
+                    if(map.containsKey(unicode))
+                    {
+                        point=map.get(unicode);
+                    }
+                }
+            }
+        }
+
+        return point;
+    }
+}

+ 64 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/WindturbinewindyawsService.java

@@ -0,0 +1,64 @@
+package com.gyee.healthmodel.service;
+
+import com.gyee.healthmodel.model.auto.Windturbinewindyaw;
+import com.gyee.healthmodel.service.auto.IWindturbinewindyawService;
+import com.gyee.healthmodel.util.DateUtils;
+import com.gyee.healthmodel.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * @ClassName : WindturbinewindyawService
+ * @Description : 偏航对风统计service
+ */
+@Service
+public class WindturbinewindyawsService {
+
+    private final int DIGIT=2;
+    @Resource
+    private IWindturbinewindyawService windturbinewindyawService;
+
+
+    public Map<String,Integer> findWindturbinewindyaw(Date recodeDate)  {
+
+
+        Calendar c=Calendar.getInstance();
+        c.setTime(recodeDate);
+        c.add(Calendar.DAY_OF_MONTH, -1);
+        Date endDate = c.getTime();
+        c.add(Calendar.DAY_OF_MONTH, -7);
+        Date beginDate = c.getTime();
+
+        Map<String,Integer> map=new HashMap<>();
+        List<Windturbinewindyaw> windturbinewindyawlist = windturbinewindyawService.findWindturbinewindyaw(DateUtils.truncate(beginDate),DateUtils.truncate(endDate));
+        if (null !=windturbinewindyawlist && !windturbinewindyawlist.isEmpty()) {
+            for (Windturbinewindyaw yaw : windturbinewindyawlist)
+            {
+                if(StringUtils.notEmp(yaw.getWindturbineid()) && StringUtils.notEmp(yaw.getQualified()) && StringUtils.notEmp(yaw.getUnqualified())) {
+
+                    if (map.containsKey(yaw.getWindturbineid())) {
+
+                        if (yaw.getUnqualified() > yaw.getQualified()) {
+                            int time = map.get(yaw.getWindturbineid());
+                            map.put(yaw.getWindturbineid(), time + 1);
+                        }
+
+                    } else {
+
+                        if (yaw.getUnqualified() > yaw.getQualified()) {
+                            map.put(yaw.getWindturbineid(), 1);
+                        }
+
+                    }
+                }
+            }
+        }
+        return map;
+    }
+
+
+
+
+}

+ 22 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IEarlywarningmainService.java

@@ -0,0 +1,22 @@
+package com.gyee.healthmodel.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.healthmodel.model.auto.Earlywarningmain;
+import com.gyee.healthmodel.vo.EventVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-10
+ */
+public interface IEarlywarningmainService extends IService<Earlywarningmain> {
+
+    public List<EventVo> getCounList(@Param(value = "alerthistory")String alerthistory, @Param(value = "wtId")String wtId);
+
+}

+ 3 - 2
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IHealthsystemsubService.java

@@ -1,8 +1,7 @@
 package com.gyee.healthmodel.service.auto;
 
-import com.gyee.healthmodel.model.auto.Healthsystemsub;
 import com.baomidou.mybatisplus.extension.service.IService;
-import org.apache.ibatis.annotations.Param;
+import com.gyee.healthmodel.model.auto.Healthsystemsub;
 
 import java.util.List;
 
@@ -17,4 +16,6 @@ import java.util.List;
 public interface IHealthsystemsubService extends IService<Healthsystemsub> {
 
     public List<Healthsystemsub> queryHealthSystemSub(String hid);
+
+    public List<Healthsystemsub> queryHealthSystemSubAll();
 }

+ 17 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/IStatejudgmentrecordService.java

@@ -0,0 +1,17 @@
+package com.gyee.healthmodel.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.healthmodel.model.auto.Statejudgmentrecord;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-20
+ */
+public interface IStatejudgmentrecordService extends IService<Statejudgmentrecord> {
+
+    public int deleteStatejudge();
+}

+ 32 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/EarlywarningmainServiceImpl.java

@@ -0,0 +1,32 @@
+package com.gyee.healthmodel.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.healthmodel.mapper.auto.EarlywarningmainMapper;
+import com.gyee.healthmodel.model.auto.Earlywarningmain;
+import com.gyee.healthmodel.service.auto.IEarlywarningmainService;
+import com.gyee.healthmodel.vo.EventVo;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-10
+ */
+@Service
+public class EarlywarningmainServiceImpl extends ServiceImpl<EarlywarningmainMapper, Earlywarningmain> implements IEarlywarningmainService {
+
+    @Resource
+    private EarlywarningmainMapper earlywarningmainMapper;
+
+    @Override
+    public List<EventVo> getCounList(String alerthistory,String wtId) {
+        return  earlywarningmainMapper.getCounList(alerthistory,wtId);
+    }
+
+}

+ 6 - 5
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/HealthsystemsubServiceImpl.java

@@ -1,15 +1,12 @@
 package com.gyee.healthmodel.service.auto.impl;
 
-import com.gyee.healthmodel.mapper.auto.Windturbineinfoday3Mapper;
-import com.gyee.healthmodel.model.auto.Healthsystemsub;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.healthmodel.mapper.auto.HealthsystemsubMapper;
-import com.gyee.healthmodel.model.auto.Windturbineinfoday3;
+import com.gyee.healthmodel.model.auto.Healthsystemsub;
 import com.gyee.healthmodel.service.auto.IHealthsystemsubService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.Date;
 import java.util.List;
 
 /**
@@ -29,4 +26,8 @@ public class HealthsystemsubServiceImpl extends ServiceImpl<HealthsystemsubMappe
     public List<Healthsystemsub> queryHealthSystemSub(String hid) {
         return  healthsystemsubMapper.queryHealthSystemSub(hid);
     }
+    @Override
+    public List<Healthsystemsub> queryHealthSystemSubAll(){
+        return  healthsystemsubMapper.queryHealthSystemSubAll();
+    }
 }

+ 30 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/service/auto/impl/StatejudgmentrecordServiceImpl.java

@@ -0,0 +1,30 @@
+package com.gyee.healthmodel.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.healthmodel.mapper.auto.StatejudgmentrecordMapper;
+import com.gyee.healthmodel.model.auto.Statejudgmentrecord;
+import com.gyee.healthmodel.service.auto.IStatejudgmentrecordService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-20
+ */
+@Service
+public class StatejudgmentrecordServiceImpl extends ServiceImpl<StatejudgmentrecordMapper, Statejudgmentrecord> implements IStatejudgmentrecordService {
+
+    @Resource
+    private StatejudgmentrecordMapper statejudgmentrecordMapper;
+    @Override
+    public int deleteStatejudge() {
+        return  statejudgmentrecordMapper.deleteStatejudge();
+    }
+
+
+}

+ 20 - 0
realtime/healthmodel-server-cph/src/main/java/com/gyee/healthmodel/task/SaticScheduleTask.java

@@ -31,6 +31,26 @@ public class SaticScheduleTask {
     @Resource
     private RecommenmainsService recommenmainsService;
     //3.添加定时任务
+
+
+
+
+    @XxlJob("healthmodel-wtHealthModelValue")
+    public void configureTasks0()  {
+
+
+        XxlJobHelper.log("风机健康状态判断调度程序执行开始!........");
+
+        try {
+
+            healthJudgeService.changeHealthModelValue();
+        } catch (Exception e) {
+
+            e.printStackTrace();
+        }
+
+        XxlJobHelper.log("风机健康状态判断调度程序执行完成!........");
+    }
     /**
      * 风机损失率统计
      */

+ 113 - 0
realtime/healthmodel-server-cph/src/main/resources/application-hbn.yml

@@ -0,0 +1,113 @@
+# 项目相关配置
+gyee:
+  #实时数据库Url
+  baseurl: http://10.83.68.96:8011/ts
+  healthurl: http://10.83.68.96:8012/ts
+  #实时数据库选择
+  realtimedataBase: mongodb #数据查询模式 golden、hwy
+  initialcode: INITIAL
+server:
+  port: 8162
+  servlet:
+    context-path: /
+
+management:
+  health:
+    redis:
+      enabled: false
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #    driverClassName: com.mysql.jdbc.Driver
+    #druid连接池配置
+    druid:
+      #主库数据源
+      master:
+
+        url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+        username: gdprod
+        password: gd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
+      #备数据源 #关闭
+      slave:
+        enabled: false
+        url: jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+        #两票数据源
+      ticket:
+        url: jdbc:sqlserver://10.83.68.98:1434;DatabaseName=fdeamnew
+        username: sa
+        password: ibs
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        #配置初始化连接数大小
+      initial-size: 10
+      # 最大连接数
+      max-active: 50
+      #最小连接数
+      min-idle: 10
+      #获取连接等待超时时间
+      max-wait: 5000
+      pool-prepared-statements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。
+      max-pool-prepared-statement-per-connection-size: 20
+      validation-query: SELECT 1 FROM DUAL
+      validation-query-timeout: 20000
+      test-on-borrow: false #申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-on-return: false #归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
+      test-while-idle: true #建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
+      time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      min-evictable-idle-time-millis: 300000  #一个连接在池中最小生存的时间,单位是毫秒
+      #StatViewServlet配置。(因为暴露的监控信息比较敏感,支持密码加密和访问ip限定)
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        #可以增加访问账号密码【去掉注释就可以】
+        #login-username: admin
+        #login-password: admin
+      filter:
+        stat:
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: false
+        wall:
+          config:
+            multi-statement-allow: true
+
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+
+logging:
+  level:
+    root: info
+    com.example: debug
+
+edos:
+  baseURL: http://10.0.118.73:8011/ts

+ 7 - 5
realtime/healthmodel-server-cph/src/test/java/HealthTest.java

@@ -1,10 +1,11 @@
 import com.gyee.healthmodel.HealthmodelMain;
-import com.gyee.healthmodel.service.HealthJudgeService;
 import com.gyee.healthmodel.service.RecommenmainsService;
 import com.gyee.healthmodel.util.SpringUtils;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
+import java.util.Calendar;
+
 public class HealthTest {
 
     @SneakyThrows
@@ -14,10 +15,11 @@ public class HealthTest {
 
         System.out.println("调度程序执行开始!........");
 
-        HealthJudgeService healthJudgeService= SpringUtils.getBean("healthJudgeService");
-        RecommenmainsService recommenmainsService= SpringUtils.getBean("recommenmainsService");
-//       healthJudgeService.healthJudge3();
-
+//        HealthJudgeService healthJudgeService= SpringUtils.getBean("healthJudgeService");
+//        healthJudgeService.healthJudge3();
+       RecommenmainsService recommenmainsService= SpringUtils.getBean("recommenmainsService");
+        Calendar cal = Calendar.getInstance();
+        recommenmainsService.deleteList(cal.getTime());
         recommenmainsService.recommenMainWt();
 //        healthJudgeService.saveWindturbineBjCount();
 // healthJudgeService.savePartbjcount();