瀏覽代碼

风机绩效表明细风能利用率修改

shilin 3 年之前
父節點
當前提交
236c26192b
共有 25 個文件被更改,包括 4355 次插入43 次删除
  1. 10 10
      pom.xml
  2. 14 0
      src/main/java/com/gyee/frame/common/spring/Constant.java
  3. 273 0
      src/main/java/com/gyee/frame/controller/recommen/RecommenController.java
  4. 2 2
      src/main/java/com/gyee/frame/controller/report/WtHealthReportMonthController.java
  5. 6 1
      src/main/java/com/gyee/frame/mapper/auto/RecommenmainMapper.java
  6. 103 0
      src/main/java/com/gyee/frame/mapper/auto/RecommenmainMsSqlMapper.java
  7. 5 0
      src/main/java/com/gyee/frame/mapper/auto/WobugeqMapper.java
  8. 3 4
      src/main/java/com/gyee/frame/model/auto/Recommenmain.java
  9. 10 11
      src/main/java/com/gyee/frame/model/auto/RecommenmainExample.java
  10. 575 0
      src/main/java/com/gyee/frame/model/auto/RecommenmainMsSql.java
  11. 1424 0
      src/main/java/com/gyee/frame/model/auto/RecommenmainMsSqlExample.java
  12. 330 0
      src/main/java/com/gyee/frame/model/custom/MainTrackVo.java
  13. 106 0
      src/main/java/com/gyee/frame/model/custom/WoBugEqVo.java
  14. 166 0
      src/main/java/com/gyee/frame/service/RecommenmainMsSqlService.java
  15. 41 0
      src/main/java/com/gyee/frame/service/RecommenmainService.java
  16. 48 1
      src/main/java/com/gyee/frame/service/WobugeqService.java
  17. 26 0
      src/main/java/com/gyee/frame/service/WtReportMainService.java
  18. 450 0
      src/main/java/com/gyee/frame/service/recommen/RecommenService.java
  19. 128 0
      src/main/java/com/gyee/frame/util/MathUtil.java
  20. 13 13
      src/main/resources/mybatis-generator.xml
  21. 10 0
      src/main/resources/mybatis/auto/RecommenmainMapper.xml
  22. 478 0
      src/main/resources/mybatis/auto/RecommenmainMsSqlMapper.xml
  23. 7 0
      src/main/resources/mybatis/auto/WobugeqMapper.xml
  24. 126 0
      src/test/java/test/RecommenTest.java
  25. 1 1
      src/test/java/test/WtHealthReportTest.java

+ 10 - 10
pom.xml

@@ -300,17 +300,17 @@
 <!--						<artifactId>mysql-connector-java</artifactId>-->
 <!--						<version>${mysql.version}</version>-->
 <!--					</dependency>-->
-			<dependency>
-                <groupId>com.oracle</groupId>
-                <artifactId>ojdbc6</artifactId>
-                <version>11.2.0.3</version>
-            </dependency>
+<!--			<dependency>-->
+<!--                <groupId>com.oracle</groupId>-->
+<!--                <artifactId>ojdbc6</artifactId>-->
+<!--                <version>11.2.0.3</version>-->
+<!--            </dependency>-->
 
-<!--					<dependency>-->
-<!--					<groupId>com.microsoft.sqlserver</groupId>-->
-<!--					<artifactId>sqljdbc4</artifactId>-->
-<!--					<version>4.0</version>-->
-<!--				    </dependency>-->
+					<dependency>
+					<groupId>com.microsoft.sqlserver</groupId>
+					<artifactId>sqljdbc4</artifactId>
+					<version>4.0</version>
+				    </dependency>
 
         </dependencies>
     </plugin>

+ 14 - 0
src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -318,4 +318,18 @@ public class Constant {
 	public static final String FCCFTSD = "FCCFTSD";// 测风塔湿度
 	public static final String FCCFTYQ = "FCCFTYQ";// 测风塔压强
 	public static final String FCCFTMD = "KQMD";// 空气密度
+
+	public static final String YCFJJKZT4HOUR = "JKYC001";// 风机健康状态未来4小时
+	public static final String YCFJJKZT1DAY = "JKYC006";// 风机健康状态未来1天
+	public static final String YCFJJKZT3DAY = "JKYC011";// 风机健康状态未来3天
+	public static final String YCFJJKZT7DAY = "JKYC016";// 风机健康状态未来7天
+	public static final String YCFJJKZT1MONTH = "JKYC021";// 风机健康状态未来1个月
+
+	public static final String FJJKZZ = "JKZT100";// 风机健康总状态得分
+
+	public static final String FJJKZT = "JKZT001";// 风机健康状态
+	public static final String CLXJKZT = "JKZT002";// 齿轮箱健康状态
+	public static final String FDJJKZT = "JKZT003";// 发电机健康状态
+	public static final String BJJKZT = "JKZT004";// 变桨健康
+	public static final String ZKJKZT = "JKZT005";// 主控健康状态
 }

+ 273 - 0
src/main/java/com/gyee/frame/controller/recommen/RecommenController.java

@@ -0,0 +1,273 @@
+package com.gyee.frame.controller.recommen;
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.Recommenmain;
+import com.gyee.frame.model.custom.MainTrackVo;
+import com.gyee.frame.service.recommen.RecommenService;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/recommen")
+public class RecommenController {
+
+    @Autowired
+    private RecommenService recommenService;
+
+    /**
+     * 获得当日健康推荐检修风机
+     * @return
+     */
+    @PostMapping("/getRecommenmainDay1")
+    @ResponseBody
+    public AjaxResult getRecommenmainDay1() {
+
+        List<Recommenmain> vos=new ArrayList<>();
+
+        vos=recommenService.getRecommenmainDay1();
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+        }
+    }
+
+    /**
+     * 获得3日健康推荐检修风机
+     * @return
+     */
+    public AjaxResult getRecommenmainDay3() {
+
+        List<Recommenmain> vos=new ArrayList<>();
+
+        vos=recommenService.getRecommenmainDay3();
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+        }
+    }
+
+    /**
+     * 获得7日健康推荐检修风机
+     * @return
+     */
+    public AjaxResult getRecommenmainDay7() {
+
+        List<Recommenmain> vos=new ArrayList<>();
+
+        vos=recommenService.getRecommenmainDay7();
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+        }
+    }
+
+    /**
+     * 确认推荐检修风机,并添加记录到生产系统
+     * @param rid
+     */
+    public AjaxResult confirpush(String rid)
+    {
+        int result=0;
+        if(StringUtils.notEmp(rid))
+        {
+            result= recommenService.confirpush(rid);
+        }
+
+        return AjaxResult.successData(AjaxStatus.success.code, result);
+    }
+
+    /**
+     * 全部确认不同时间段的推荐检修风机
+     * @param typeid 1代表全部确认当日推荐  2 代表全部确认三天推荐 3 代表全部确认未来七天推荐
+     */
+    public AjaxResult confirpushAll(String typeid)
+    {
+
+        List<Recommenmain> vos=new ArrayList<>();
+
+        if (StringUtils.notEmp(typeid)) {
+            switch(typeid) {
+                case "1":
+                    vos=recommenService.getRecommenmainDay1();
+                    if(!vos.isEmpty())
+                    {
+                        for(Recommenmain vo:vos)
+                        {
+                            recommenService.confirpush(vo.getRid());
+                        }
+                    }
+                    break;
+                case "2":
+                    vos=recommenService.getRecommenmainDay3();
+                    if(!vos.isEmpty())
+                    {
+                        for(Recommenmain vo:vos)
+                        {
+                            recommenService.confirpush(vo.getRid());
+                        }
+                    }
+                    break;
+                case "3":
+                    vos=recommenService.getRecommenmainDay7();
+                    if(!vos.isEmpty())
+                    {
+                        for(Recommenmain vo:vos)
+                        {
+                            recommenService.confirpush(vo.getRid());
+                        }
+                    }
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        return AjaxResult.successData(AjaxStatus.success.code, 1);
+    }
+    /**
+     * 取消推荐检修风机
+     * @param rid
+     */
+    public AjaxResult ignorepush(String rid)
+    {
+        int result=0;
+        if(StringUtils.notEmp(rid))
+        {
+            result= recommenService.ignorepush(rid);
+        }
+
+        return AjaxResult.successData(AjaxStatus.success.code, result);
+    }
+
+    /**
+     * 全部取消不同时间段的推荐检修风机
+     * @param typeid 1代表全部取消当日推荐  2 代表全部取消三天推荐 3 代表全部取消未来七天推荐
+     */
+    public AjaxResult ignorepushAll(String typeid)
+    {
+
+        List<Recommenmain> vos=new ArrayList<>();
+
+        if (StringUtils.notEmp(typeid)) {
+            switch(typeid) {
+                case "1":
+                    vos=recommenService.getRecommenmainDay1();
+                    if(!vos.isEmpty())
+                    {
+                        for(Recommenmain vo:vos)
+                        {
+                            recommenService.ignorepush(vo.getRid());
+                        }
+                    }
+                    break;
+                case "2":
+                    vos=recommenService.getRecommenmainDay3();
+                    if(!vos.isEmpty())
+                    {
+                        for(Recommenmain vo:vos)
+                        {
+                            recommenService.ignorepush(vo.getRid());
+                        }
+                    }
+                    break;
+                case "3":
+                    vos=recommenService.getRecommenmainDay7();
+                    if(!vos.isEmpty())
+                    {
+                        for(Recommenmain vo:vos)
+                        {
+                            recommenService.ignorepush(vo.getRid());
+                        }
+                    }
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        return AjaxResult.successData(AjaxStatus.success.code, 1);
+    }
+
+    /**
+     * 获得已经确认检修风机
+     * @return
+     */
+    public AjaxResult recommenConfirmedList() {
+
+        List<Recommenmain> vos=new ArrayList<>();
+
+        vos=recommenService.recommenConfirmedList();
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+        }
+
+
+    }
+
+    /**
+     * 获得健康状态预测
+     * @param wpId
+     * @param type 1 表示24小时健康趋势,2 表示七天健康趋势 3 表示30天健康趋势,
+     * @return map.put(" yslchart ", yslchart); //优数量
+     *             map.put("lslchart", lslchart);//良数量
+     *             map.put("cslchart", cslchart);//差数量
+     *             map.put("lvchart", lvchart);//健康率
+     *             map.put("datechart", datechart);//日期
+     * @throws Exception
+     */
+    public AjaxResult findAllChartjz(String wpId,  String type) throws Exception {
+
+        Map<String, Object[]> map = new HashMap<String, Object[]>();
+
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(type) ) {
+
+            map=recommenService.findAllChartjz(wpId, type);
+
+        }
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, map);
+        }
+
+    }
+
+
+    /**
+     * 通过消缺单获得详细信息
+     * @param rid
+     * @return
+     */
+    public AjaxResult findMainTrack(String rid) {
+
+        MainTrackVo vo = new MainTrackVo();
+
+        if(StringUtils.notEmp(rid))
+        {
+            vo =recommenService.findMainTrack(rid);
+        }
+
+        return AjaxResult.successData(AjaxStatus.success.code, vo);
+
+    }
+
+}

+ 2 - 2
src/main/java/com/gyee/frame/controller/report/WtHealthReportMonthController.java

@@ -92,7 +92,7 @@ public class WtHealthReportMonthController extends BaseController {
 
 
 	/**
-	 * 查询生产系统月度风机检修情况
+	 * 查询推荐月度风机检修情况
 	 * @param wtId
 	 * @param recorddate
 	 * @return
@@ -120,7 +120,7 @@ public class WtHealthReportMonthController extends BaseController {
 
 
 	/**
-	 * 查询生产系统月度风机检修情况
+	 * 获得风机月度等级评估数据
 	 * @param wtId
 	 * @param recorddate
 	 * @return

+ 6 - 1
src/main/java/com/gyee/frame/mapper/auto/RecommenmainMapper.java

@@ -2,9 +2,11 @@ package com.gyee.frame.mapper.auto;
 
 import com.gyee.frame.model.auto.Recommenmain;
 import com.gyee.frame.model.auto.RecommenmainExample;
-import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Date;
+import java.util.List;
+
 public interface RecommenmainMapper {
     /**
      * This method was generated by MyBatis Generator.
@@ -93,4 +95,7 @@ public interface RecommenmainMapper {
      * @mbg.generated
      */
     int updateByPrimaryKey(Recommenmain record);
+
+    List<Recommenmain> getRecommenmainDay(@Param("ismain") String ismain,@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
+
 }

+ 103 - 0
src/main/java/com/gyee/frame/mapper/auto/RecommenmainMsSqlMapper.java

@@ -0,0 +1,103 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.RecommenmainMsSql;
+import com.gyee.frame.model.auto.RecommenmainMsSqlExample;
+import com.gyee.frame.model.custom.WoBugEqVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.util.List;
+
+public interface RecommenmainMsSqlMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    long countByExample(RecommenmainMsSqlExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(RecommenmainMsSqlExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(String rid);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    int insert(RecommenmainMsSql record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    int insertSelective(RecommenmainMsSql record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    List<RecommenmainMsSql> selectByExample(RecommenmainMsSqlExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    RecommenmainMsSql selectByPrimaryKey(String rid);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") RecommenmainMsSql record, @Param("example") RecommenmainMsSqlExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") RecommenmainMsSql record, @Param("example") RecommenmainMsSqlExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(RecommenmainMsSql record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(RecommenmainMsSql record);
+
+    List<WoBugEqVo> unfinishedList(@Param("wpId") String wpId, @Param("wtId") String wtId, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
+    List<WoBugEqVo> finishedList(@Param("wpId") String wpId, @Param("wtId") String wtId, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
+
+}

+ 5 - 0
src/main/java/com/gyee/frame/mapper/auto/WobugeqMapper.java

@@ -2,6 +2,7 @@ package com.gyee.frame.mapper.auto;
 
 import com.gyee.frame.model.auto.Wobugeq;
 import com.gyee.frame.model.auto.WobugeqExample;
+import com.gyee.frame.model.custom.MainTrackVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -98,4 +99,8 @@ public interface WobugeqMapper {
 
     List<Integer> getWtnum(@Param("wtId") String wtId);
 
+    List<MainTrackVo> findDuration();
+
+
+
 }

+ 3 - 4
src/main/java/com/gyee/frame/model/auto/Recommenmain.java

@@ -1,7 +1,6 @@
 package com.gyee.frame.model.auto;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 import java.util.Date;
 
 public class Recommenmain implements Serializable {
@@ -57,7 +56,7 @@ public class Recommenmain implements Serializable {
      *
      * @mbg.generated
      */
-    private BigDecimal speed;
+    private Double speed;
 
     /**
      *
@@ -294,7 +293,7 @@ public class Recommenmain implements Serializable {
      *
      * @mbg.generated
      */
-    public BigDecimal getSpeed() {
+    public Double getSpeed() {
         return speed;
     }
 
@@ -306,7 +305,7 @@ public class Recommenmain implements Serializable {
      *
      * @mbg.generated
      */
-    public void setSpeed(BigDecimal speed) {
+    public void setSpeed(Double speed) {
         this.speed = speed;
     }
 

+ 10 - 11
src/main/java/com/gyee/frame/model/auto/RecommenmainExample.java

@@ -1,6 +1,5 @@
 package com.gyee.frame.model.auto;
 
-import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -526,52 +525,52 @@ public class RecommenmainExample {
             return (Criteria) this;
         }
 
-        public Criteria andSpeedEqualTo(BigDecimal value) {
+        public Criteria andSpeedEqualTo(Double value) {
             addCriterion("SPEED =", value, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedNotEqualTo(BigDecimal value) {
+        public Criteria andSpeedNotEqualTo(Double value) {
             addCriterion("SPEED <>", value, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedGreaterThan(BigDecimal value) {
+        public Criteria andSpeedGreaterThan(Double value) {
             addCriterion("SPEED >", value, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andSpeedGreaterThanOrEqualTo(Double value) {
             addCriterion("SPEED >=", value, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedLessThan(BigDecimal value) {
+        public Criteria andSpeedLessThan(Double value) {
             addCriterion("SPEED <", value, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andSpeedLessThanOrEqualTo(Double value) {
             addCriterion("SPEED <=", value, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedIn(List<BigDecimal> values) {
+        public Criteria andSpeedIn(List<Double> values) {
             addCriterion("SPEED in", values, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedNotIn(List<BigDecimal> values) {
+        public Criteria andSpeedNotIn(List<Double> values) {
             addCriterion("SPEED not in", values, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andSpeedBetween(Double value1, Double value2) {
             addCriterion("SPEED between", value1, value2, "speed");
             return (Criteria) this;
         }
 
-        public Criteria andSpeedNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andSpeedNotBetween(Double value1, Double value2) {
             addCriterion("SPEED not between", value1, value2, "speed");
             return (Criteria) this;
         }

+ 575 - 0
src/main/java/com/gyee/frame/model/auto/RecommenmainMsSql.java

@@ -0,0 +1,575 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class RecommenmainMsSql implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.RID
+     *
+     * @mbg.generated
+     */
+    private String rid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.ID
+     *
+     * @mbg.generated
+     */
+    private Double id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WTID
+     *
+     * @mbg.generated
+     */
+    private String wtid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    private Date recodedate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    private Date createdate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.SPEED
+     *
+     * @mbg.generated
+     */
+    private Double speed;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.REASON
+     *
+     * @mbg.generated
+     */
+    private String reason;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.ISMAIN
+     *
+     * @mbg.generated
+     */
+    private String ismain;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WOBUGID
+     *
+     * @mbg.generated
+     */
+    private String wobugid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.OPERATION
+     *
+     * @mbg.generated
+     */
+    private String operation;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.OPERATIONDATE
+     *
+     * @mbg.generated
+     */
+    private Date operationdate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.REMARK
+     *
+     * @mbg.generated
+     */
+    private String remark;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.BAK1
+     *
+     * @mbg.generated
+     */
+    private String bak1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.BAK2
+     *
+     * @mbg.generated
+     */
+    private String bak2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WPID
+     *
+     * @mbg.generated
+     */
+    private String wpid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WTNUM
+     *
+     * @mbg.generated
+     */
+    private Double wtnum;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column RECOMMENMAIN.WPNUM
+     *
+     * @mbg.generated
+     */
+    private Double wpnum;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table RECOMMENMAIN
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.RID
+     *
+     * @return the value of RECOMMENMAIN.RID
+     *
+     * @mbg.generated
+     */
+    public String getRid() {
+        return rid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.RID
+     *
+     * @param rid the value for RECOMMENMAIN.RID
+     *
+     * @mbg.generated
+     */
+    public void setRid(String rid) {
+        this.rid = rid == null ? null : rid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.ID
+     *
+     * @return the value of RECOMMENMAIN.ID
+     *
+     * @mbg.generated
+     */
+    public Double getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.ID
+     *
+     * @param id the value for RECOMMENMAIN.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Double id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WTID
+     *
+     * @return the value of RECOMMENMAIN.WTID
+     *
+     * @mbg.generated
+     */
+    public String getWtid() {
+        return wtid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WTID
+     *
+     * @param wtid the value for RECOMMENMAIN.WTID
+     *
+     * @mbg.generated
+     */
+    public void setWtid(String wtid) {
+        this.wtid = wtid == null ? null : wtid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.RECODEDATE
+     *
+     * @return the value of RECOMMENMAIN.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    public Date getRecodedate() {
+        return recodedate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.RECODEDATE
+     *
+     * @param recodedate the value for RECOMMENMAIN.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    public void setRecodedate(Date recodedate) {
+        this.recodedate = recodedate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.CREATEDATE
+     *
+     * @return the value of RECOMMENMAIN.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    public Date getCreatedate() {
+        return createdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.CREATEDATE
+     *
+     * @param createdate the value for RECOMMENMAIN.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    public void setCreatedate(Date createdate) {
+        this.createdate = createdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.SPEED
+     *
+     * @return the value of RECOMMENMAIN.SPEED
+     *
+     * @mbg.generated
+     */
+    public Double getSpeed() {
+        return speed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.SPEED
+     *
+     * @param speed the value for RECOMMENMAIN.SPEED
+     *
+     * @mbg.generated
+     */
+    public void setSpeed(Double speed) {
+        this.speed = speed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.REASON
+     *
+     * @return the value of RECOMMENMAIN.REASON
+     *
+     * @mbg.generated
+     */
+    public String getReason() {
+        return reason;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.REASON
+     *
+     * @param reason the value for RECOMMENMAIN.REASON
+     *
+     * @mbg.generated
+     */
+    public void setReason(String reason) {
+        this.reason = reason == null ? null : reason.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.ISMAIN
+     *
+     * @return the value of RECOMMENMAIN.ISMAIN
+     *
+     * @mbg.generated
+     */
+    public String getIsmain() {
+        return ismain;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.ISMAIN
+     *
+     * @param ismain the value for RECOMMENMAIN.ISMAIN
+     *
+     * @mbg.generated
+     */
+    public void setIsmain(String ismain) {
+        this.ismain = ismain == null ? null : ismain.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WOBUGID
+     *
+     * @return the value of RECOMMENMAIN.WOBUGID
+     *
+     * @mbg.generated
+     */
+    public String getWobugid() {
+        return wobugid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WOBUGID
+     *
+     * @param wobugid the value for RECOMMENMAIN.WOBUGID
+     *
+     * @mbg.generated
+     */
+    public void setWobugid(String wobugid) {
+        this.wobugid = wobugid == null ? null : wobugid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.OPERATION
+     *
+     * @return the value of RECOMMENMAIN.OPERATION
+     *
+     * @mbg.generated
+     */
+    public String getOperation() {
+        return operation;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.OPERATION
+     *
+     * @param operation the value for RECOMMENMAIN.OPERATION
+     *
+     * @mbg.generated
+     */
+    public void setOperation(String operation) {
+        this.operation = operation == null ? null : operation.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.OPERATIONDATE
+     *
+     * @return the value of RECOMMENMAIN.OPERATIONDATE
+     *
+     * @mbg.generated
+     */
+    public Date getOperationdate() {
+        return operationdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.OPERATIONDATE
+     *
+     * @param operationdate the value for RECOMMENMAIN.OPERATIONDATE
+     *
+     * @mbg.generated
+     */
+    public void setOperationdate(Date operationdate) {
+        this.operationdate = operationdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.REMARK
+     *
+     * @return the value of RECOMMENMAIN.REMARK
+     *
+     * @mbg.generated
+     */
+    public String getRemark() {
+        return remark;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.REMARK
+     *
+     * @param remark the value for RECOMMENMAIN.REMARK
+     *
+     * @mbg.generated
+     */
+    public void setRemark(String remark) {
+        this.remark = remark == null ? null : remark.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.BAK1
+     *
+     * @return the value of RECOMMENMAIN.BAK1
+     *
+     * @mbg.generated
+     */
+    public String getBak1() {
+        return bak1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.BAK1
+     *
+     * @param bak1 the value for RECOMMENMAIN.BAK1
+     *
+     * @mbg.generated
+     */
+    public void setBak1(String bak1) {
+        this.bak1 = bak1 == null ? null : bak1.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.BAK2
+     *
+     * @return the value of RECOMMENMAIN.BAK2
+     *
+     * @mbg.generated
+     */
+    public String getBak2() {
+        return bak2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.BAK2
+     *
+     * @param bak2 the value for RECOMMENMAIN.BAK2
+     *
+     * @mbg.generated
+     */
+    public void setBak2(String bak2) {
+        this.bak2 = bak2 == null ? null : bak2.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WPID
+     *
+     * @return the value of RECOMMENMAIN.WPID
+     *
+     * @mbg.generated
+     */
+    public String getWpid() {
+        return wpid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WPID
+     *
+     * @param wpid the value for RECOMMENMAIN.WPID
+     *
+     * @mbg.generated
+     */
+    public void setWpid(String wpid) {
+        this.wpid = wpid == null ? null : wpid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WTNUM
+     *
+     * @return the value of RECOMMENMAIN.WTNUM
+     *
+     * @mbg.generated
+     */
+    public Double getWtnum() {
+        return wtnum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WTNUM
+     *
+     * @param wtnum the value for RECOMMENMAIN.WTNUM
+     *
+     * @mbg.generated
+     */
+    public void setWtnum(Double wtnum) {
+        this.wtnum = wtnum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column RECOMMENMAIN.WPNUM
+     *
+     * @return the value of RECOMMENMAIN.WPNUM
+     *
+     * @mbg.generated
+     */
+    public Double getWpnum() {
+        return wpnum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column RECOMMENMAIN.WPNUM
+     *
+     * @param wpnum the value for RECOMMENMAIN.WPNUM
+     *
+     * @mbg.generated
+     */
+    public void setWpnum(Double wpnum) {
+        this.wpnum = wpnum;
+    }
+}

文件差異過大導致無法顯示
+ 1424 - 0
src/main/java/com/gyee/frame/model/auto/RecommenmainMsSqlExample.java


+ 330 - 0
src/main/java/com/gyee/frame/model/custom/MainTrackVo.java

@@ -0,0 +1,330 @@
+package com.gyee.frame.model.custom;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MainTrackVo implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	private String wtId;
+	private String wpId;
+	private String wpName;
+	private String tjyy;// 推荐原因
+	private Date tjss;// 推荐时间
+	private Double tjfs;// 推荐风速
+	private String bugnum;// 缺陷单号
+	private String workgroup1;// 消缺类型
+	private String findlabornum;// 发现人
+	private String reportlabornum;// 汇报人
+	private String description;// 缺陷描述
+	private Date departuretime;// 出发时间
+	private Date arrivaltime;// 到达时间
+	private String prodtdeptopinion;// 故障等级
+	private String workleader;// 工作负责人
+	private Date repairedtime;// 启动完成时间
+	private String repairedcomment;// 消缺工艺
+	private String unresolvedbug;// 遗留问题
+	private Date checktime;// 验收时间
+	private String degradebugtype;// 累计停机小时
+	private String repairdeptbugtype1;// 预计损失电量
+	private String checkdeptlabornum;// 验收签字人
+	private String status;
+	private String gzpc;// 故障排查方法
+	private String gzjx;// 故障检修方法
+	private Date prodtdepttime;// 消缺通知时间
+	private String checkdeptopinion;// 验收意见
+
+	private Double rwfpsc;
+	private Double rwfppjsc;
+	private Double ddxcsc;
+	private Double ddxcpjsc;
+	private Double qxclsc;
+	private Double qxclpjsc;
+	private Double yssc;
+	private Double yspjsc;
+
+	public String getCheckdeptopinion() {
+		return checkdeptopinion;
+	}
+
+	public void setCheckdeptopinion(String checkdeptopinion) {
+		this.checkdeptopinion = checkdeptopinion;
+	}
+
+	public Date getProdtdepttime() {
+		return prodtdepttime;
+	}
+
+	public void setProdtdepttime(Date prodtdepttime) {
+		this.prodtdepttime = prodtdepttime;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getBugnum() {
+		return bugnum;
+	}
+
+	public void setBugnum(String bugnum) {
+		this.bugnum = bugnum;
+	}
+
+	public String getWorkgroup1() {
+		return workgroup1;
+	}
+
+	public void setWorkgroup1(String workgroup1) {
+		this.workgroup1 = workgroup1;
+	}
+
+	public String getFindlabornum() {
+		return findlabornum;
+	}
+
+	public void setFindlabornum(String findlabornum) {
+		this.findlabornum = findlabornum;
+	}
+
+	public String getReportlabornum() {
+		return reportlabornum;
+	}
+
+	public void setReportlabornum(String reportlabornum) {
+		this.reportlabornum = reportlabornum;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public Date getDeparturetime() {
+		return departuretime;
+	}
+
+	public void setDeparturetime(Date departuretime) {
+		this.departuretime = departuretime;
+	}
+
+	public Date getArrivaltime() {
+		return arrivaltime;
+	}
+
+	public void setArrivaltime(Date arrivaltime) {
+		this.arrivaltime = arrivaltime;
+	}
+
+	public String getProdtdeptopinion() {
+		return prodtdeptopinion;
+	}
+
+	public void setProdtdeptopinion(String prodtdeptopinion) {
+		this.prodtdeptopinion = prodtdeptopinion;
+	}
+
+	public String getWorkleader() {
+		return workleader;
+	}
+
+	public void setWorkleader(String workleader) {
+		this.workleader = workleader;
+	}
+
+	public Date getRepairedtime() {
+		return repairedtime;
+	}
+
+	public void setRepairedtime(Date repairedtime) {
+		this.repairedtime = repairedtime;
+	}
+
+	public String getRepairedcomment() {
+		return repairedcomment;
+	}
+
+	public void setRepairedcomment(String repairedcomment) {
+		this.repairedcomment = repairedcomment;
+	}
+
+	public String getUnresolvedbug() {
+		return unresolvedbug;
+	}
+
+	public void setUnresolvedbug(String unresolvedbug) {
+		this.unresolvedbug = unresolvedbug;
+	}
+
+	public Date getChecktime() {
+		return checktime;
+	}
+
+	public void setChecktime(Date checktime) {
+		this.checktime = checktime;
+	}
+
+	public String getDegradebugtype() {
+		return degradebugtype;
+	}
+
+	public void setDegradebugtype(String degradebugtype) {
+		this.degradebugtype = degradebugtype;
+	}
+
+	public String getRepairdeptbugtype1() {
+		return repairdeptbugtype1;
+	}
+
+	public void setRepairdeptbugtype1(String repairdeptbugtype1) {
+		this.repairdeptbugtype1 = repairdeptbugtype1;
+	}
+
+	public String getCheckdeptlabornum() {
+		return checkdeptlabornum;
+	}
+
+	public void setCheckdeptlabornum(String checkdeptlabornum) {
+		this.checkdeptlabornum = checkdeptlabornum;
+	}
+
+	public String getGzpc() {
+		return gzpc;
+	}
+
+	public void setGzpc(String gzpc) {
+		this.gzpc = gzpc;
+	}
+
+	public String getGzjx() {
+		return gzjx;
+	}
+
+	public void setGzjx(String gzjx) {
+		this.gzjx = gzjx;
+	}
+
+	public String getWtId() {
+		return wtId;
+	}
+
+	public void setWtId(String wtId) {
+		this.wtId = wtId;
+	}
+
+	public String getWpId() {
+		return wpId;
+	}
+
+	public void setWpId(String wpId) {
+		this.wpId = wpId;
+	}
+
+	public String getWpName() {
+		return wpName;
+	}
+
+	public void setWpName(String wpName) {
+		this.wpName = wpName;
+	}
+
+	public String getTjyy() {
+		return tjyy;
+	}
+
+	public void setTjyy(String tjyy) {
+		this.tjyy = tjyy;
+	}
+
+	public Date getTjss() {
+		return tjss;
+	}
+
+	public void setTjss(Date tjss) {
+		this.tjss = tjss;
+	}
+
+	public Double getTjfs() {
+		return tjfs;
+	}
+
+	public void setTjfs(Double tjfs) {
+		this.tjfs = tjfs;
+	}
+
+	public Double getRwfpsc() {
+		return rwfpsc;
+	}
+
+	public void setRwfpsc(Double rwfpsc) {
+		this.rwfpsc = rwfpsc;
+	}
+
+	public Double getRwfppjsc() {
+		return rwfppjsc;
+	}
+
+	public void setRwfppjsc(Double rwfppjsc) {
+		this.rwfppjsc = rwfppjsc;
+	}
+
+	public Double getDdxcsc() {
+		return ddxcsc;
+	}
+
+	public void setDdxcsc(Double ddxcsc) {
+		this.ddxcsc = ddxcsc;
+	}
+
+	public Double getDdxcpjsc() {
+		return ddxcpjsc;
+	}
+
+	public void setDdxcpjsc(Double ddxcpjsc) {
+		this.ddxcpjsc = ddxcpjsc;
+	}
+
+	public Double getQxclsc() {
+		return qxclsc;
+	}
+
+	public void setQxclsc(Double qxclsc) {
+		this.qxclsc = qxclsc;
+	}
+
+	public Double getQxclpjsc() {
+		return qxclpjsc;
+	}
+
+	public void setQxclpjsc(Double qxclpjsc) {
+		this.qxclpjsc = qxclpjsc;
+	}
+
+	public Double getYssc() {
+		return yssc;
+	}
+
+	public void setYssc(Double yssc) {
+		this.yssc = yssc;
+	}
+
+	public Double getYspjsc() {
+		return yspjsc;
+	}
+
+	public void setYspjsc(Double yspjsc) {
+		this.yspjsc = yspjsc;
+	}
+
+}

+ 106 - 0
src/main/java/com/gyee/frame/model/custom/WoBugEqVo.java

@@ -0,0 +1,106 @@
+package com.gyee.frame.model.custom;
+
+import java.util.Date;
+
+public class WoBugEqVo {
+
+    private String wfshortname;
+    private String wfname;
+    private String wtid;
+    private Date prodtdepttime;
+    private Date departuretime;
+    private String reason;
+    private String status;
+    private String rid;
+    private Date operationdate;
+    private String ismain;
+    private String repairedcomment;
+
+    public String getRepairedcomment() {
+        return repairedcomment;
+    }
+
+    public void setRepairedcomment(String repairedcomment) {
+        this.repairedcomment = repairedcomment;
+    }
+
+    public String getWfshortname() {
+        return wfshortname;
+    }
+
+    public void setWfshortname(String wfshortname) {
+        this.wfshortname = wfshortname;
+    }
+
+    public String getWfname() {
+        return wfname;
+    }
+
+    public void setWfname(String wfname) {
+        this.wfname = wfname;
+    }
+
+    public String getWtid() {
+        return wtid;
+    }
+
+    public void setWtid(String wtid) {
+        this.wtid = wtid;
+    }
+
+    public Date getProdtdepttime() {
+        return prodtdepttime;
+    }
+
+    public void setProdtdepttime(Date prodtdepttime) {
+        this.prodtdepttime = prodtdepttime;
+    }
+
+    public Date getDeparturetime() {
+        return departuretime;
+    }
+
+    public void setDeparturetime(Date departuretime) {
+        this.departuretime = departuretime;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getRid() {
+        return rid;
+    }
+
+    public void setRid(String rid) {
+        this.rid = rid;
+    }
+
+    public Date getOperationdate() {
+        return operationdate;
+    }
+
+    public void setOperationdate(Date operationdate) {
+        this.operationdate = operationdate;
+    }
+
+    public String getIsmain() {
+        return ismain;
+    }
+
+    public void setIsmain(String ismain) {
+        this.ismain = ismain;
+    }
+}

+ 166 - 0
src/main/java/com/gyee/frame/service/RecommenmainMsSqlService.java

@@ -0,0 +1,166 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.dataSources.DataSource;
+import com.gyee.frame.common.dataSources.DataSourceType;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.RecommenmainMsSqlMapper;
+import com.gyee.frame.model.auto.RecommenmainMsSql;
+import com.gyee.frame.model.auto.RecommenmainMsSqlExample;
+import com.gyee.frame.model.custom.WoBugEqVo;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 线路 RecommenmainMsSqlService
+ * @Title: RecommenmainMsSqlService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+
+public class RecommenmainMsSqlService implements BaseService<RecommenmainMsSql, RecommenmainMsSqlExample> {
+	@Autowired
+	private RecommenmainMsSqlMapper recommenmainMsSqlMapper;
+	
+
+
+	@Override
+	@DataSource(value = DataSourceType.TICKET)
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<Double> lista=Convert.toDoubleArrayList(ids);
+			RecommenmainMsSqlExample example=new RecommenmainMsSqlExample();
+			example.createCriteria().andIdIn(lista);
+			return recommenmainMsSqlMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	@DataSource(value = DataSourceType.TICKET)
+	public RecommenmainMsSql selectByPrimaryKey(String id) {
+				
+			return recommenmainMsSqlMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	@DataSource(value = DataSourceType.TICKET)
+	public int updateByPrimaryKeySelective(RecommenmainMsSql record) {
+		return recommenmainMsSqlMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	@DataSource(value = DataSourceType.TICKET)
+	public int insertSelective(RecommenmainMsSql record) {
+
+
+				
+		return recommenmainMsSqlMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(RecommenmainMsSql record, RecommenmainMsSqlExample example) {
+		
+		return recommenmainMsSqlMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(RecommenmainMsSql record, RecommenmainMsSqlExample example) {
+		
+		return recommenmainMsSqlMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<RecommenmainMsSql> selectByExample(RecommenmainMsSqlExample example) {
+		
+		return recommenmainMsSqlMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(RecommenmainMsSqlExample example) {
+		
+		return recommenmainMsSqlMapper.countByExample(example);
+	}
+
+	
+	@Override
+	@DataSource(value = DataSourceType.TICKET)
+	public int deleteByExample(RecommenmainMsSqlExample example) {
+		
+		return recommenmainMsSqlMapper.deleteByExample(example);
+	}
+
+	@DataSource(value = DataSourceType.TICKET)
+	public RecommenmainMsSql findRecommenmainById(String rId) {
+
+
+		RecommenmainMsSql po=new RecommenmainMsSql();
+
+		if (StringUtils.notEmp(rId) ) {
+
+			RecommenmainMsSqlExample example=new RecommenmainMsSqlExample();
+			example.setOrderByClause("recodedate asc");
+
+			RecommenmainMsSqlExample.Criteria criteria =example.createCriteria();
+
+			criteria.andRidEqualTo(rId);
+
+			List<RecommenmainMsSql> list= recommenmainMsSqlMapper.selectByExample(example);
+			if(!list.isEmpty())
+			{
+				po=list.get(0);
+			}
+
+		}
+		return po;
+
+	}
+	@DataSource(value = DataSourceType.TICKET)
+	public List<WoBugEqVo> unfinishedList(String wpId,String wtId, Date beginDate, Date endDate) {
+
+
+		List<WoBugEqVo> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(wpId) && StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+
+			list= recommenmainMsSqlMapper.unfinishedList(wpId,wtId, beginDate, endDate);
+
+		}
+		return list;
+
+	}
+	@DataSource(value = DataSourceType.TICKET)
+	public List<WoBugEqVo> finishedList(String wpId,String wtId, Date beginDate, Date endDate) {
+
+
+		List<WoBugEqVo> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(wpId) && StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+
+			list= recommenmainMsSqlMapper.finishedList(wpId,wtId, beginDate, endDate);
+
+		}
+		return list;
+
+	}
+}

+ 41 - 0
src/main/java/com/gyee/frame/service/RecommenmainService.java

@@ -121,4 +121,45 @@ public class RecommenmainService implements BaseService<Recommenmain, Recommenma
 
 	}
 
+
+	public List<Recommenmain> getRecommenmainListByStatus(String ismain,Date beginDate, Date endDate) {
+
+
+		List<Recommenmain> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(ismain) &&StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+			list=recommenmainMapper.getRecommenmainDay(ismain,beginDate,endDate);
+
+
+		}
+		return list;
+
+	}
+
+
+	public Recommenmain getRecommenmain(String rId) {
+
+		Recommenmain po=new Recommenmain();
+
+
+		if (StringUtils.notEmp(rId)) {
+
+			RecommenmainExample example=new RecommenmainExample();
+			example.setOrderByClause("recodedate asc");
+
+			RecommenmainExample.Criteria criteria =example.createCriteria();
+			criteria.andRidEqualTo(rId);
+
+			List<Recommenmain> list= recommenmainMapper.selectByExample(example);
+
+			if(!list.isEmpty())
+			{
+				po=list.get(0);
+			}
+		}
+
+		return po;
+
+	}
 }

+ 48 - 1
src/main/java/com/gyee/frame/service/WobugeqService.java

@@ -1,10 +1,13 @@
 package com.gyee.frame.service;
 
 import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.dataSources.DataSource;
+import com.gyee.frame.common.dataSources.DataSourceType;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.WobugeqMapper;
 import com.gyee.frame.model.auto.Wobugeq;
 import com.gyee.frame.model.auto.WobugeqExample;
+import com.gyee.frame.model.custom.MainTrackVo;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -98,7 +101,7 @@ public class WobugeqService implements BaseService<Wobugeq, WobugeqExample> {
 		
 		return wobugeqMapper.deleteByExample(example);
 	}
-
+	@DataSource(value = DataSourceType.TICKET)
 	public List<Wobugeq> getWobugeqList(String wtId,Date beginDate,Date endDate) {
 
 		List<Wobugeq> list=new ArrayList<>();
@@ -131,4 +134,48 @@ public class WobugeqService implements BaseService<Wobugeq, WobugeqExample> {
 
 	}
 
+	@DataSource(value = DataSourceType.TICKET)
+	public Wobugeq findRecommenmainById(String woId) {
+
+
+		Wobugeq po=new Wobugeq();
+
+		if(StringUtils.notEmp(woId) )
+		{
+			WobugeqExample example=new WobugeqExample();
+			example.setOrderByClause("transmittime asc");
+
+			WobugeqExample.Criteria criteria =example.createCriteria();
+
+			criteria.andBugnumEqualTo(woId);
+
+			List<Wobugeq> list= wobugeqMapper.selectByExample(example);
+
+			if(!list.isEmpty())
+			{
+				po=list.get(0);
+
+			}
+
+		}
+
+		return po;
+
+	}
+
+	@DataSource(value = DataSourceType.TICKET)
+	public MainTrackVo findDuration() {
+
+		MainTrackVo po=new MainTrackVo();
+
+		List<MainTrackVo> list=wobugeqMapper.findDuration();
+
+		if(!list.isEmpty())
+		{
+			po=list.get(0);
+		}
+		return po;
+
+	}
+
 }

+ 26 - 0
src/main/java/com/gyee/frame/service/WtReportMainService.java

@@ -116,4 +116,30 @@ public class WtReportMainService implements BaseService<WtReportMain, WtReportMa
 
 	}
 
+	public WtReportMain findWtReportMainById(String wtId, Date recorddate) {
+
+		WtReportMain po=new WtReportMain();
+
+
+		WtReportMainExample example=new WtReportMainExample();
+		example.setOrderByClause("recodedate asc");
+
+		WtReportMainExample.Criteria criteria =example.createCriteria();
+
+		criteria.andWtidEqualTo(wtId);
+
+		Date endDate= DateUtils.addDays(recorddate,1);
+		criteria.andRecodedateGreaterThanOrEqualTo(recorddate).andRecodedateLessThan(endDate);
+
+
+		List<WtReportMain>  list= wtReportMainMapper.selectByExample(example);
+
+		if(!list.isEmpty())
+		{
+			po=list.get(0);
+		}
+		return po;
+
+	}
+
 }

+ 450 - 0
src/main/java/com/gyee/frame/service/recommen/RecommenService.java

@@ -0,0 +1,450 @@
+package com.gyee.frame.service.recommen;
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.DNAVal;
+import com.gyee.frame.model.custom.MainTrackVo;
+import com.gyee.frame.service.*;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * RecommenService
+ * @Title: RecommenService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class RecommenService {
+
+	private final String XQQR = "是";
+	@Resource
+	private RecommenmainService recommenmainService;
+	@Resource
+	private RecommenmainMsSqlService recommenmainMsSqlService;
+	@Resource
+	private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+	@Resource
+	private WtReportMainService wtReportMainService;
+	@Resource
+	private WobugeqService wobugeqService;
+
+	IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+	/**
+	 * 获得当日健康推荐检修风机
+	 * @return
+	 */
+	public List<Recommenmain> getRecommenmainDay1() {
+
+		List<Recommenmain> list=new ArrayList<>();
+
+		Calendar cal = Calendar.getInstance();
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND,0);
+		cal.set(Calendar.MILLISECOND, 0);
+
+		Date beginDate = cal.getTime();
+		cal.add(Calendar.DAY_OF_MONTH, 1);
+		Date endDate = cal.getTime();
+
+		list=recommenmainService.getRecommenmainListByStatus("0",beginDate,endDate);
+
+		return list;
+	}
+
+	/**
+	 * 获得3日健康推荐检修风机
+	 * @return
+	 */
+	public List<Recommenmain> getRecommenmainDay3() {
+
+		List<Recommenmain> list=new ArrayList<>();
+
+		Calendar cal = Calendar.getInstance();
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND,0);
+		cal.set(Calendar.MILLISECOND, 0);
+		cal.add(Calendar.DAY_OF_MONTH, 1);
+		Date beginDate = cal.getTime();
+		cal.add(Calendar.DAY_OF_MONTH, 2);
+		Date endDate = cal.getTime();
+
+		list=recommenmainService.getRecommenmainListByStatus("0",beginDate,endDate);
+
+		return list;
+	}
+
+	/**
+	 * 获得7日健康推荐检修风机
+	 * @return
+	 */
+	public List<Recommenmain> getRecommenmainDay7() {
+
+		List<Recommenmain> list=new ArrayList<>();
+
+		Calendar cal = Calendar.getInstance();
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND,0);
+		cal.set(Calendar.MILLISECOND, 0);
+
+		cal.add(Calendar.DAY_OF_MONTH, 3);
+		Date beginDate = cal.getTime();
+		cal.add(Calendar.DAY_OF_MONTH, 7);
+		Date endDate = cal.getTime();
+
+		list=recommenmainService.getRecommenmainListByStatus("0",beginDate,endDate);
+
+		return list;
+	}
+
+	/**
+	 * 确认推荐检修风机,并添加记录到生产系统
+	 * @param rid
+	 */
+	public int confirpush(String rid)
+	{
+		int result=0;
+		if(StringUtils.notEmp(rid))
+		{
+			Recommenmain po=recommenmainService.getRecommenmain(rid);
+			if(StringUtils.notEmp(po) && StringUtils.notEmp(po.getCreatedate()))
+			{
+				RecommenmainExample example=new RecommenmainExample();
+
+				po.setIsmain("1");
+				recommenmainService.updateByPrimaryKeySelective(po);
+
+				RecommenmainMsSql repo=new RecommenmainMsSql();
+
+				repo.setWtid(po.getWtid());
+				repo.setRecodedate(po.getRecodedate());
+				repo.setCreatedate(po.getCreatedate());
+				repo.setSpeed(po.getSpeed());
+				repo.setReason(po.getReason());
+				repo.setIsmain(po.getIsmain());
+				repo.setRid(po.getRid());
+				repo.setWpid(po.getWpid());
+				repo.setWtnum(Double.valueOf(po.getWtnum()));
+				repo.setWpnum(Double.valueOf(po.getWpnum()));
+
+				result=recommenmainMsSqlService.insertSelective(repo);
+
+			}
+		}
+		return result;
+	}
+	/**
+	 * 取消推荐检修风机
+	 * @param rid
+	 */
+	public int ignorepush(String rid)
+	{
+		int result=0;
+		if(StringUtils.notEmp(rid))
+		{
+			Recommenmain po=recommenmainService.getRecommenmain(rid);
+			if(StringUtils.notEmp(po) && StringUtils.notEmp(po.getCreatedate()))
+			{
+				po.setIsmain("2");
+				result=recommenmainService.updateByPrimaryKeySelective(po);
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * 获得确认检修风机
+	 * @return
+	 */
+	public List<Recommenmain> recommenConfirmedList() {
+
+		List<Recommenmain> list=new ArrayList<>();
+
+		Calendar cal = Calendar.getInstance();
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND,0);
+		cal.set(Calendar.MILLISECOND, 0);
+
+		Date beginDate = cal.getTime();
+		cal.add(Calendar.DAY_OF_MONTH, 7);
+		Date endDate = cal.getTime();
+
+		list=recommenmainService.getRecommenmainListByStatus("1",beginDate,endDate);
+
+		return list;
+	}
+
+	/**
+	 * 获得健康状态预测
+	 * @param wpId
+	 * @param type 1 表示24小时健康趋势,2 表示七天健康趋势 3 表示30天健康趋势,
+	 * @return
+	 * @throws Exception
+	 */
+	public Map<String, Object[]> findAllChartjz(String wpId,  String type) throws Exception {
+
+		Map<String, Object[]> map = new HashMap<String, Object[]>();
+
+		if (StringUtils.notEmp(wpId) &&  StringUtils.notEmp(type)) {
+
+			int num=0;
+			String format1 = "yyyy-MM-dd HH点";
+			String format2 = "yyyy-MM-dd";
+			String format3 = "MM-dd";
+
+			SimpleDateFormat df1 = new SimpleDateFormat(format1);
+			SimpleDateFormat df2 = new SimpleDateFormat(format2);
+			SimpleDateFormat df3 = new SimpleDateFormat(format3);
+
+			Calendar cal = Calendar.getInstance();
+
+			String uniformcode = Constant.YCFJJKZT1DAY;
+			switch (type) {
+				case "1":
+					cal.add(Calendar.HOUR_OF_DAY, 2);
+					cal.set(Calendar.MINUTE, 0);
+					cal.set(Calendar.SECOND, 0);
+
+					uniformcode = Constant.YCFJJKZT1DAY;
+
+					num=12;
+					break;
+				case "2":
+					cal.add(Calendar.DAY_OF_MONTH, 0);
+					cal.set(Calendar.HOUR_OF_DAY, 0);
+					cal.set(Calendar.MINUTE, 0);
+					cal.set(Calendar.SECOND, 0);
+
+					//  uniformcode = Constant.YCFJJKZT7DAY;
+					uniformcode = Constant.YCFJJKZT1MONTH;
+					num=7;
+					break;
+
+				case "3":
+					cal.add(Calendar.DAY_OF_MONTH, 0);
+					cal.set(Calendar.HOUR_OF_DAY, 0);
+					cal.set(Calendar.MINUTE, 0);
+					cal.set(Calendar.SECOND, 0);
+					uniformcode = Constant.YCFJJKZT1MONTH;
+					num=30;
+					break;
+				default:
+					break;
+			}
+
+			int ysl = 0;// 优数量
+			int lsl = 0;// 良数量
+			int csl = 0;// 差数量
+			double jkd = 0.0;
+
+			Double[] yslchart = new Double[num];
+			Double[] lslchart = new Double[num];
+			Double[] cslchart = new Double[num];
+			Double[] lvchart = new Double[num];
+
+			String[] datechart = new String[num];
+			List<Windturbine> wtls = new ArrayList<Windturbine>();
+
+			if (InitialRunner.wpmap.containsKey(wpId)) {
+				wtls = InitialRunner.wp_wtmap.get(wpId);
+			} else {
+				for (Windturbine wt : InitialRunner.wtls) {
+					if (wt.getWindpowerstationid().endsWith("FDC")) {
+						wtls.add(wt);
+					}
+				}
+			}
+
+			List<String> wtidls = new ArrayList<String>();
+			List<String> codejkls = new ArrayList<String>();
+			List<String> codeztls = new ArrayList<String>();
+
+			for (Windturbine wt : wtls) {
+				wtidls.add(wt.getId());
+				codejkls.add(uniformcode);
+
+			}
+
+			String[] jkpoints = new String[wtidls.size()];
+
+			// 获得训练参数对象
+			for (int x = 0; x < wtidls.size(); x++) {
+
+				WindTurbineTestingPointAi2 ai = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x), codejkls.get(x));
+				if(StringUtils.notEmp(ai))
+				{
+					jkpoints[x] = ai.getId();
+				}
+
+			}
+
+			for (int i = 0; i < num; i++) {
+				ysl = 0;// 优数量
+				lsl = 0;// 良数量
+				csl = 0;// 差数量
+				jkd = 0.0;
+
+
+				int recodeDate = new BigDecimal(cal.getTime().getTime()).divide(new BigDecimal(1000), 0, RoundingMode.HALF_EVEN).intValue();
+
+				// 获得风机健康状态结果数组
+				DNAVal[] jkvalues = realApiUtil.getHistMatrix(jkpoints, recodeDate);
+
+				for (int x = 0; x < wtidls.size(); x++) {
+
+					double jk = jkvalues[x].DValue;
+
+					if (jk == 4.0) {
+
+						csl++;
+					} else if (jk == 3.0) {
+
+						lsl++;
+					} else if (jk == 2.0 || jk == 1.0) {
+
+						ysl++;
+					} else {
+
+						ysl++;
+					}
+				}
+				jkd = new BigDecimal(ysl + lsl).divide(new BigDecimal(wtidls.size()), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+				yslchart[i] = Double.valueOf(ysl);
+				lslchart[i] = Double.valueOf(lsl);
+				cslchart[i] = Double.valueOf(csl);
+				lvchart[i] = Double.valueOf(jkd);
+
+				switch (type) {
+					case "1":
+						datechart[i] = df1.format(cal.getTime());
+						cal.add(Calendar.HOUR_OF_DAY, 2);
+
+						break;
+					case "2":
+						datechart[i] = df2.format(cal.getTime());
+						cal.add(Calendar.DAY_OF_MONTH, 1);
+						break;
+					case "3":
+						datechart[i] = df3.format(cal.getTime());
+						cal.add(Calendar.DAY_OF_MONTH, 1);
+						break;
+					default:
+						break;
+				}
+
+			}
+
+			map.put("yslchart", yslchart);
+			map.put("lslchart", lslchart);
+			map.put("cslchart", cslchart);
+			map.put("lvchart", lvchart);
+			map.put("datechart", datechart);
+
+		}
+
+		return map;
+
+	}
+
+
+	/**
+	 * 通过消缺单获得详细信息
+	 * @param rid
+	 * @return
+	 */
+	public MainTrackVo findMainTrack(String rid) {
+
+		MainTrackVo vo = new MainTrackVo();
+		RecommenmainMsSql rm = recommenmainMsSqlService.findRecommenmainById(rid);
+
+		if (StringUtils.notEmp(rm)) {
+
+			vo.setWtId(rm.getWtid());
+			vo.setWpId(rm.getWpid());
+			vo.setWpName(InitialRunner.wpmap.get(rm.getWpid()).getName());
+			vo.setTjfs(rm.getSpeed());
+			vo.setTjss(rm.getRecodedate());
+			vo.setTjyy(rm.getReason());
+
+			WtReportMain wrm = wtReportMainService.findWtReportMainById(rm.getWtid(), rm.getCreatedate());
+			// 如果判定状态为下单,进入该判读
+			if (StringUtils.notEmp(rm.getIsmain()) && rm.getIsmain().equals(XQQR)
+					&& StringUtils.notEmp(rm.getWobugid())) {
+
+				Wobugeq wobugeq = wobugeqService.findRecommenmainById(rm.getWobugid());
+
+				if (StringUtils.notEmp(wobugeq)) {
+					vo.setBugnum(wobugeq.getBugnum());// 缺陷单号
+					vo.setWorkgroup1(wobugeq.getWorkgroup1());// 消缺类型
+					vo.setFindlabornum(wobugeq.getFindlabornum());// 发现人
+					vo.setReportlabornum(wobugeq.getReportlabornum());// 汇报人
+					vo.setDescription(wobugeq.getDescription());// 缺陷描述
+					vo.setDeparturetime(wobugeq.getDeparturetime());// 出发时间
+					vo.setArrivaltime(wobugeq.getArrivaltime());// 到达时间
+					vo.setProdtdeptopinion(wobugeq.getProdtdeptopinion());// 故障等级
+					vo.setWorkleader(wobugeq.getWorkleader());// 工作负责人
+					vo.setRepairedtime(wobugeq.getRepairedtime());// 启动完成时间
+					vo.setRepairedcomment(wobugeq.getRepairedcomment());// 消缺工艺
+					vo.setUnresolvedbug(wobugeq.getUnresolvedbug());// 遗留问题
+					vo.setChecktime(wobugeq.getChecktime());// 验收时间
+					vo.setDegradebugtype(wobugeq.getDegradebugtype());// 累计停机小时
+					vo.setRepairdeptbugtype1(wobugeq.getRepairdeptbugtype1());// 预计损失电量
+					vo.setCheckdeptlabornum(wobugeq.getCheckdeptlabornum());// 验收签字人
+					vo.setStatus(wobugeq.getStatus());
+					vo.setProdtdepttime(wobugeq.getProdtdepttime());
+					vo.setCheckdeptopinion(wobugeq.getCheckdeptopinion());
+
+					vo.setRwfpsc(
+							MathUtil.decimal((double) dateDiff(wobugeq.getProdtdepttime(), rm.getOperationdate()), 2));
+					vo.setDdxcsc(MathUtil
+							.decimal((double) dateDiff(wobugeq.getArrivaltime(), wobugeq.getDeparturetime()), 2));
+					vo.setQxclsc(
+							MathUtil.decimal((double) dateDiff(wobugeq.getGridtime(), wobugeq.getArrivaltime()), 2));
+					vo.setYssc(MathUtil.decimal((double) dateDiff(wobugeq.getChecktime(), wobugeq.getGridtime()), 2));
+				}
+
+				if (StringUtils.notEmp(wrm)) {
+					vo.setGzpc(wrm.getMainmethod());// 故障排查方法
+					vo.setGzjx(wrm.getApproach());// 故障检修方法
+				}
+				MainTrackVo vos = wobugeqService.findDuration();
+				if (vos != null) {
+					vo.setRwfppjsc(MathUtil.decimal(vos.getRwfppjsc(), 2));
+					vo.setDdxcpjsc(MathUtil.decimal(vos.getDdxcpjsc(), 2));
+					vo.setQxclpjsc(MathUtil.decimal(vos.getQxclpjsc(), 2));
+					vo.setYspjsc(MathUtil.decimal(vos.getYspjsc(), 2));
+				}
+			}
+		}
+
+		return vo;
+	}
+
+	private long dateDiff(Date a, Date b) {
+		long diff, minuts = 0;
+		if (a != null && b != null) {
+			diff = a.getTime() - b.getTime();// 这样得到的差值是毫秒级别
+			minuts = diff / (1000 * 60);
+		}
+
+		return minuts;
+	}
+}

+ 128 - 0
src/main/java/com/gyee/frame/util/MathUtil.java

@@ -0,0 +1,128 @@
+package com.gyee.frame.util;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author fhq
+ *
+ */
+public class MathUtil {
+
+	// 截取小数点后两位
+	public static Double twoBit(Double dd) {
+		if (dd == null) {
+			return dd;
+		} else {
+			BigDecimal decimal = new BigDecimal(dd);
+			decimal = decimal.setScale(2, BigDecimal.ROUND_HALF_UP);
+			return decimal.doubleValue();
+		}
+	}
+
+	/**
+	 * 格式化小数位数,四舍五入
+	 *
+	 * @param dd
+	 * @param Scale
+	 *            小数位数
+	 * @return
+	 */
+	public static Double decimal(Double dd, int Scale) {
+		return new BigDecimal(dd).setScale(Scale, BigDecimal.ROUND_HALF_UP)
+				.doubleValue();
+	}
+
+	/**
+	 * 格式化小数位数,四舍五入
+	 *
+	 * @param dd
+	 * @param Scale
+	 *            小数位数
+	 * @return 无格式字符串 ,末位去零
+	 */
+	public static String plain(Double dd, int Scale) {
+		if (dd == 0) {
+			return "0";
+		} else {
+			return new BigDecimal(dd).setScale(Scale, BigDecimal.ROUND_HALF_UP)
+					.stripTrailingZeros().toPlainString();
+		}
+	}
+
+	/**
+	 * 字符串转Double
+	 *
+	 * @param value
+	 * @return
+	 */
+	public static Double getDouble(String value) {
+		return new BigDecimal(value).doubleValue();
+	}
+
+	/**
+	 * 格式化小数位数,四舍五入
+	 *
+	 * @param dd
+	 * @param Scale
+	 *            小数位数
+	 * @return
+	 */
+	public static Float decimal(Float dd, int Scale) {
+		return new BigDecimal(dd).setScale(Scale, BigDecimal.ROUND_HALF_UP)
+				.floatValue();
+	}
+
+	/**
+	 * 格式化小数位数,四舍五入
+	 *
+	 * @param dd
+	 * @param Scale
+	 *            小数位数
+	 * @return 无格式字符串
+	 */
+	public static String plain(Float dd, int Scale) {
+		return new BigDecimal(dd).setScale(Scale, BigDecimal.ROUND_HALF_UP)
+				.toPlainString();
+	}
+
+	/**
+	 * 字符串转Float
+	 *
+	 * @param value
+	 * @return
+	 */
+	public static Float getFloat(String value) {
+		return new BigDecimal(value).floatValue();
+	}
+
+	/**
+	 * 将10进制数转换成二进制数
+	 */
+	public static String getBinaryString(Double value) {
+		return Integer.toBinaryString(value.intValue());
+	}
+
+	/**
+	 * 在指定时间上加指定的小时
+	 * @param date
+	 * @param hour
+	 * @return
+	 */
+	public static Date addHours(Date date, double hour) {
+		return new Date(date.getTime() + (long) (hour * 3600 * 1000));
+	}
+
+	public static Integer toInt(String str) {
+		return Integer.parseInt(str);
+	}
+
+	public static Float toFloat(String str) {
+		return Float.parseFloat(str);
+	}
+
+	public static Double toDouble(String str) {
+		return Double.parseDouble(str);
+	}
+
+}

+ 13 - 13
src/main/resources/mybatis-generator.xml

@@ -51,19 +51,19 @@
 <!--                userId="root"-->
 <!--                password="123456">-->
 <!--        </jdbcConnection>-->
-        <jdbcConnection
-                driverClass="oracle.jdbc.driver.OracleDriver"
-                connectionURL="jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd"
-                userId="nxfdprod"
-                password="gdnxfd123">
-        </jdbcConnection>
+<!--        <jdbcConnection-->
+<!--                driverClass="oracle.jdbc.driver.OracleDriver"-->
+<!--                connectionURL="jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd"-->
+<!--                userId="nxfdprod"-->
+<!--                password="gdnxfd123">-->
+<!--        </jdbcConnection>-->
 
-<!--                <jdbcConnection-->
-<!--                        driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"-->
-<!--                        connectionURL="jdbc:sqlserver://10.155.32.2:1433;DatabaseName=fdeam"-->
-<!--                        userId="sa"-->
-<!--                        password="Gyee@321#!">-->
-<!--                </jdbcConnection>-->
+                <jdbcConnection
+                        driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
+                        connectionURL="jdbc:sqlserver://10.155.32.2:1433;DatabaseName=fdeam"
+                        userId="sa"
+                        password="Gyee@321#!">
+                </jdbcConnection>
         <javaTypeResolver>
             <property name="forceBigDecimals" value="false"/>
         </javaTypeResolver>
@@ -102,7 +102,7 @@
         </table>-->
 
 
-        <table tableName='recommenmain' domainObjectName='Recommenmain'/>
+        <table tableName='Recommenmain' domainObjectName='RecommenmainMsSql'/>
 
     </context>
 </generatorConfiguration>

+ 10 - 0
src/main/resources/mybatis/auto/RecommenmainMapper.xml

@@ -457,4 +457,14 @@
       WPNUM = #{wpnum,jdbcType=DECIMAL}
     where RID = #{rid,jdbcType=VARCHAR}
   </update>
+
+
+  <select id="getRecommenmainDay"  resultType="com.gyee.frame.model.auto.Recommenmain">
+
+    select * from recommenmain t where t.rid in
+    (select max(rid) from recommenmain where ismain=#{ismain} and  recodedate >= #{beginDate} and recodedate &lt; #{endDate} group by wtid )
+    order by t.recodedate
+
+  </select>
+
 </mapper>

+ 478 - 0
src/main/resources/mybatis/auto/RecommenmainMsSqlMapper.xml

@@ -0,0 +1,478 @@
+<?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.RecommenmainMsSqlMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.RecommenmainMsSql">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="RID" jdbcType="NVARCHAR" property="rid" />
+    <result column="ID" jdbcType="NUMERIC" property="id" />
+    <result column="WTID" jdbcType="NVARCHAR" property="wtid" />
+    <result column="RECODEDATE" jdbcType="TIMESTAMP" property="recodedate" />
+    <result column="CREATEDATE" jdbcType="TIMESTAMP" property="createdate" />
+    <result column="SPEED" jdbcType="DECIMAL" property="speed" />
+    <result column="REASON" jdbcType="NVARCHAR" property="reason" />
+    <result column="ISMAIN" jdbcType="NVARCHAR" property="ismain" />
+    <result column="WOBUGID" jdbcType="NVARCHAR" property="wobugid" />
+    <result column="OPERATION" jdbcType="NVARCHAR" property="operation" />
+    <result column="OPERATIONDATE" jdbcType="TIMESTAMP" property="operationdate" />
+    <result column="REMARK" jdbcType="NVARCHAR" property="remark" />
+    <result column="BAK1" jdbcType="NVARCHAR" property="bak1" />
+    <result column="BAK2" jdbcType="NVARCHAR" property="bak2" />
+    <result column="WPID" jdbcType="NVARCHAR" property="wpid" />
+    <result column="WTNUM" jdbcType="NUMERIC" property="wtnum" />
+    <result column="WPNUM" jdbcType="NUMERIC" property="wpnum" />
+  </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>
+    </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>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    RID, ID, WTID, RECODEDATE, CREATEDATE, SPEED, REASON, ISMAIN, WOBUGID, OPERATION, 
+    OPERATIONDATE, REMARK, BAK1, BAK2, WPID, WTNUM, WPNUM
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.RecommenmainMsSqlExample" 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 RECOMMENMAIN
+    <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 RECOMMENMAIN
+    where RID = #{rid,jdbcType=NVARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from RECOMMENMAIN
+    where RID = #{rid,jdbcType=NVARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.RecommenmainMsSqlExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from RECOMMENMAIN
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.RecommenmainMsSql">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into RECOMMENMAIN (RID, ID, WTID, 
+      RECODEDATE, CREATEDATE, SPEED, 
+      REASON, ISMAIN, WOBUGID, 
+      OPERATION, OPERATIONDATE, REMARK, 
+      BAK1, BAK2, WPID, 
+      WTNUM, WPNUM)
+    values (#{rid,jdbcType=NVARCHAR}, #{id,jdbcType=NUMERIC}, #{wtid,jdbcType=NVARCHAR}, 
+      #{recodedate,jdbcType=TIMESTAMP}, #{createdate,jdbcType=TIMESTAMP}, #{speed,jdbcType=DECIMAL}, 
+      #{reason,jdbcType=NVARCHAR}, #{ismain,jdbcType=NVARCHAR}, #{wobugid,jdbcType=NVARCHAR}, 
+      #{operation,jdbcType=NVARCHAR}, #{operationdate,jdbcType=TIMESTAMP}, #{remark,jdbcType=NVARCHAR}, 
+      #{bak1,jdbcType=NVARCHAR}, #{bak2,jdbcType=NVARCHAR}, #{wpid,jdbcType=NVARCHAR}, 
+      #{wtnum,jdbcType=NUMERIC}, #{wpnum,jdbcType=NUMERIC})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.RecommenmainMsSql">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into RECOMMENMAIN
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="rid != null">
+        RID,
+      </if>
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="wtid != null">
+        WTID,
+      </if>
+      <if test="recodedate != null">
+        RECODEDATE,
+      </if>
+      <if test="createdate != null">
+        CREATEDATE,
+      </if>
+      <if test="speed != null">
+        SPEED,
+      </if>
+      <if test="reason != null">
+        REASON,
+      </if>
+      <if test="ismain != null">
+        ISMAIN,
+      </if>
+      <if test="wobugid != null">
+        WOBUGID,
+      </if>
+      <if test="operation != null">
+        OPERATION,
+      </if>
+      <if test="operationdate != null">
+        OPERATIONDATE,
+      </if>
+      <if test="remark != null">
+        REMARK,
+      </if>
+      <if test="bak1 != null">
+        BAK1,
+      </if>
+      <if test="bak2 != null">
+        BAK2,
+      </if>
+      <if test="wpid != null">
+        WPID,
+      </if>
+      <if test="wtnum != null">
+        WTNUM,
+      </if>
+      <if test="wpnum != null">
+        WPNUM,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="rid != null">
+        #{rid,jdbcType=NVARCHAR},
+      </if>
+      <if test="id != null">
+        #{id,jdbcType=NUMERIC},
+      </if>
+      <if test="wtid != null">
+        #{wtid,jdbcType=NVARCHAR},
+      </if>
+      <if test="recodedate != null">
+        #{recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdate != null">
+        #{createdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="speed != null">
+        #{speed,jdbcType=DECIMAL},
+      </if>
+      <if test="reason != null">
+        #{reason,jdbcType=NVARCHAR},
+      </if>
+      <if test="ismain != null">
+        #{ismain,jdbcType=NVARCHAR},
+      </if>
+      <if test="wobugid != null">
+        #{wobugid,jdbcType=NVARCHAR},
+      </if>
+      <if test="operation != null">
+        #{operation,jdbcType=NVARCHAR},
+      </if>
+      <if test="operationdate != null">
+        #{operationdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remark != null">
+        #{remark,jdbcType=NVARCHAR},
+      </if>
+      <if test="bak1 != null">
+        #{bak1,jdbcType=NVARCHAR},
+      </if>
+      <if test="bak2 != null">
+        #{bak2,jdbcType=NVARCHAR},
+      </if>
+      <if test="wpid != null">
+        #{wpid,jdbcType=NVARCHAR},
+      </if>
+      <if test="wtnum != null">
+        #{wtnum,jdbcType=NUMERIC},
+      </if>
+      <if test="wpnum != null">
+        #{wpnum,jdbcType=NUMERIC},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.RecommenmainMsSqlExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from RECOMMENMAIN
+    <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 RECOMMENMAIN
+    <set>
+      <if test="record.rid != null">
+        RID = #{record.rid,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=NUMERIC},
+      </if>
+      <if test="record.wtid != null">
+        WTID = #{record.wtid,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.recodedate != null">
+        RECODEDATE = #{record.recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.createdate != null">
+        CREATEDATE = #{record.createdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.speed != null">
+        SPEED = #{record.speed,jdbcType=DECIMAL},
+      </if>
+      <if test="record.reason != null">
+        REASON = #{record.reason,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.ismain != null">
+        ISMAIN = #{record.ismain,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.wobugid != null">
+        WOBUGID = #{record.wobugid,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.operation != null">
+        OPERATION = #{record.operation,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.operationdate != null">
+        OPERATIONDATE = #{record.operationdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.remark != null">
+        REMARK = #{record.remark,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.bak1 != null">
+        BAK1 = #{record.bak1,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.bak2 != null">
+        BAK2 = #{record.bak2,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.wpid != null">
+        WPID = #{record.wpid,jdbcType=NVARCHAR},
+      </if>
+      <if test="record.wtnum != null">
+        WTNUM = #{record.wtnum,jdbcType=NUMERIC},
+      </if>
+      <if test="record.wpnum != null">
+        WPNUM = #{record.wpnum,jdbcType=NUMERIC},
+      </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 RECOMMENMAIN
+    set RID = #{record.rid,jdbcType=NVARCHAR},
+      ID = #{record.id,jdbcType=NUMERIC},
+      WTID = #{record.wtid,jdbcType=NVARCHAR},
+      RECODEDATE = #{record.recodedate,jdbcType=TIMESTAMP},
+      CREATEDATE = #{record.createdate,jdbcType=TIMESTAMP},
+      SPEED = #{record.speed,jdbcType=DECIMAL},
+      REASON = #{record.reason,jdbcType=NVARCHAR},
+      ISMAIN = #{record.ismain,jdbcType=NVARCHAR},
+      WOBUGID = #{record.wobugid,jdbcType=NVARCHAR},
+      OPERATION = #{record.operation,jdbcType=NVARCHAR},
+      OPERATIONDATE = #{record.operationdate,jdbcType=TIMESTAMP},
+      REMARK = #{record.remark,jdbcType=NVARCHAR},
+      BAK1 = #{record.bak1,jdbcType=NVARCHAR},
+      BAK2 = #{record.bak2,jdbcType=NVARCHAR},
+      WPID = #{record.wpid,jdbcType=NVARCHAR},
+      WTNUM = #{record.wtnum,jdbcType=NUMERIC},
+      WPNUM = #{record.wpnum,jdbcType=NUMERIC}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.RecommenmainMsSql">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update RECOMMENMAIN
+    <set>
+      <if test="id != null">
+        ID = #{id,jdbcType=NUMERIC},
+      </if>
+      <if test="wtid != null">
+        WTID = #{wtid,jdbcType=NVARCHAR},
+      </if>
+      <if test="recodedate != null">
+        RECODEDATE = #{recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createdate != null">
+        CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="speed != null">
+        SPEED = #{speed,jdbcType=DECIMAL},
+      </if>
+      <if test="reason != null">
+        REASON = #{reason,jdbcType=NVARCHAR},
+      </if>
+      <if test="ismain != null">
+        ISMAIN = #{ismain,jdbcType=NVARCHAR},
+      </if>
+      <if test="wobugid != null">
+        WOBUGID = #{wobugid,jdbcType=NVARCHAR},
+      </if>
+      <if test="operation != null">
+        OPERATION = #{operation,jdbcType=NVARCHAR},
+      </if>
+      <if test="operationdate != null">
+        OPERATIONDATE = #{operationdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="remark != null">
+        REMARK = #{remark,jdbcType=NVARCHAR},
+      </if>
+      <if test="bak1 != null">
+        BAK1 = #{bak1,jdbcType=NVARCHAR},
+      </if>
+      <if test="bak2 != null">
+        BAK2 = #{bak2,jdbcType=NVARCHAR},
+      </if>
+      <if test="wpid != null">
+        WPID = #{wpid,jdbcType=NVARCHAR},
+      </if>
+      <if test="wtnum != null">
+        WTNUM = #{wtnum,jdbcType=NUMERIC},
+      </if>
+      <if test="wpnum != null">
+        WPNUM = #{wpnum,jdbcType=NUMERIC},
+      </if>
+    </set>
+    where RID = #{rid,jdbcType=NVARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.RecommenmainMsSql">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update RECOMMENMAIN
+    set ID = #{id,jdbcType=NUMERIC},
+      WTID = #{wtid,jdbcType=NVARCHAR},
+      RECODEDATE = #{recodedate,jdbcType=TIMESTAMP},
+      CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
+      SPEED = #{speed,jdbcType=DECIMAL},
+      REASON = #{reason,jdbcType=NVARCHAR},
+      ISMAIN = #{ismain,jdbcType=NVARCHAR},
+      WOBUGID = #{wobugid,jdbcType=NVARCHAR},
+      OPERATION = #{operation,jdbcType=NVARCHAR},
+      OPERATIONDATE = #{operationdate,jdbcType=TIMESTAMP},
+      REMARK = #{remark,jdbcType=NVARCHAR},
+      BAK1 = #{bak1,jdbcType=NVARCHAR},
+      BAK2 = #{bak2,jdbcType=NVARCHAR},
+      WPID = #{wpid,jdbcType=NVARCHAR},
+      WTNUM = #{wtnum,jdbcType=NUMERIC},
+      WPNUM = #{wpnum,jdbcType=NUMERIC}
+    where RID = #{rid,jdbcType=NVARCHAR}
+  </update>
+
+
+  <select id="unfinishedList"  resultType="com.gyee.frame.model.custom.WoBugEqVo">
+    SELECT c.WFSHORTNAME,c.WFNAME,a.WTID,b.PRODTDEPTTIME,b.DEPARTURETIME,a.REASON,b.STATUS,a.RID,a.OPERATIONDATE,a.ISMAIN
+    FROM  RECOMMENMAIN a left join WOBUGEQ b on a.wobugid=b.bugnum left join  WINDFARM c on a.wpnum=c.wfnum  where a.OPERATIONDATE IS NOT null
+    AND (b.STATUS!='流程关闭' OR b.STATUS IS NULL)
+    and c.WFSHORTNAME=#{wpId}
+    and a.WTID=#{wtId}
+    and a.OPERATIONDATE >= #{beginDate} and a.OPERATIONDATE &lt; #{endDate}
+  </select>
+
+  <select id="finishedList"  resultType="com.gyee.frame.model.custom.WoBugEqVo">
+    SELECT  c.WFSHORTNAME,c.WFNAME,a.WTID,b.PRODTDEPTTIME,b.DEPARTURETIME,a.REASON,b.REPAIREDCOMMENT,a.RID,a.OPERATIONDATE,a.ISMAIN
+    FROM  RECOMMENMAIN a left join WOBUGEQ b on a.wobugid=b.bugnum left join  WINDFARM c on a.wpnum=c.wfnum  where  a.ISMAIN='是' AND b.STATUS='流程关闭'
+    and c.WFSHORTNAME=#{wpId}
+    and a.WTID=#{wtId}
+    and a.OPERATIONDATE >= #{beginDate} and a.OPERATIONDATE &lt; #{endDate}
+  </select>
+</mapper>

+ 7 - 0
src/main/resources/mybatis/auto/WobugeqMapper.xml

@@ -1223,4 +1223,11 @@
     where   wtid = #{wtId}
   </select>
 
+  <select id="findDuration"  resultType="com.gyee.frame.model.custom.MainTrackVo">
+    SELECT avg(rwfpsc) rwfppjsc,avg(ddxcsc) ddxcpjsc,avg(qxclsc) qxclpjsc,avg(yssc) yspjsc FROM
+    (SELECT ABS(DATEDIFF(mi,a.Operationdate,b.Prodtdepttime)) rwfpsc,DATEDIFF(mi,b.Departuretime,b.Arrivaltime) ddxcsc,
+    DATEDIFF(mi,b.Arrivaltime,b.Gridtime) qxclsc,DATEDIFF(mi,b.Gridtime,b.Checktime) yssc  FROM RECOMMENMAIN a,WOBUGEQ b
+    WHERE a.WOBUGID=b.BUGNUM ) a
+  </select>
+
 </mapper>

+ 126 - 0
src/test/java/test/RecommenTest.java

@@ -0,0 +1,126 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.recommen.RecommenController;
+import com.gyee.frame.model.custom.MainTrackVo;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Map;
+
+public class RecommenTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+        Calendar c = Calendar.getInstance();
+
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+
+        c.set(Calendar.DAY_OF_MONTH,1);
+        c.set(Calendar.MONTH,0);
+        c.set(Calendar.YEAR,2021);
+
+        Date beginDate = c.getTime();
+
+        String wpid="MHS_FDC";
+
+        RecommenController recommenController= SpringUtils.getBean("recommenController");
+
+
+
+//        AjaxResult ajaxResult = recommenController.getRecommenmainDay1();
+//
+//        List<Recommenmain> test=(List<Recommenmain>)ajaxResult.get("data");
+//        for(Recommenmain wtd:test)
+//        {
+//            System.out.println(wtd.getRecodedate()+"----------------"+wtd.getReason()+"----------------"+wtd.getReason());
+//        }
+//        System.out.println("**********************************************************************************");
+//
+//        AjaxResult ajaxResult2 = recommenController.getRecommenmainDay3();
+//
+//        List<Recommenmain> test2=(List<Recommenmain>)ajaxResult2.get("data");
+//        for(Recommenmain wtd:test2)
+//        {
+//            System.out.println(wtd.getRecodedate()+"----------------"+wtd.getReason()+"----------------"+wtd.getReason());
+//        }
+//        System.out.println("**********************************************************************************");
+//
+//        AjaxResult ajaxResult3 = recommenController.getRecommenmainDay7();
+//
+//        List<Recommenmain> test3=(List<Recommenmain>)ajaxResult3.get("data");
+//        for(Recommenmain wtd:test3)
+//        {
+//            System.out.println(wtd.getRecodedate()+"----------------"+wtd.getReason()+"----------------"+wtd.getReason());
+//        }
+//        System.out.println("**********************************************************************************");
+
+//        AjaxResult ajaxResult = recommenController.getRecommenmainDay1();
+//
+//        List<Recommenmain> test=(List<Recommenmain>)ajaxResult.get("data");
+//        for(Recommenmain wtd:test)
+//        {
+//            System.out.println(wtd.getRecodedate()+"----------------"+wtd.getReason()+"----------------"+wtd.getReason());
+//        }
+//        System.out.println("**********************************************************************************");
+//
+//        recommenController.confirpush("0869af9c7f17468faecbeb3b96f21c87");
+//
+//        System.out.println("**********************************************************************************");
+//        recommenController.ignorepush("4749ad4f83114475a14fe43bdd293888");
+//
+//        System.out.println("**********************************************************************************");
+//        AjaxResult ajaxResult = recommenController.recommenConfirmedList();
+//
+//        List<Recommenmain> test=(List<Recommenmain>)ajaxResult.get("data");
+//        for(Recommenmain wtd:test)
+//        {
+//            System.out.println(wtd.getRecodedate()+"----------------"+wtd.getReason()+"----------------"+wtd.getReason());
+//        }
+//        System.out.println("**********************************************************************************");
+
+
+        System.out.println("**********************************************************************************");
+        AjaxResult ajaxResult = recommenController.findAllChartjz("MHS_FDC","2");
+
+//        map.put("yslchart", yslchart);
+//        map.put("lslchart", lslchart);
+//        map.put("cslchart", cslchart);
+//        map.put("lvchart", lvchart);
+//        map.put("datechart", datechart);
+        Map<String, Object[]> test=(Map<String, Object[]>)ajaxResult.get("data");
+        Double[] yslchart=(Double[])test.get("yslchart");
+        String[] datechart=(String[])test.get("datechart");
+        for(Double wtd:yslchart)
+        {
+            System.out.println(wtd);
+        }
+
+        for(String wtd:datechart)
+        {
+            System.out.println(wtd);
+        }
+        System.out.println("**********************************************************************************");
+
+
+        AjaxResult ajax=recommenController.findMainTrack("0869af9c7f17468faecbeb3b96f21c87");
+        MainTrackVo test4=(MainTrackVo)ajax.get("data");
+        System.out.println(test4.getDdxcpjsc()+"***************"+test4.getBugnum());
+        System.out.println("**********************************************************************************");
+
+    }
+
+
+
+
+}

+ 1 - 1
src/test/java/test/WtHealthReportTest.java

@@ -50,7 +50,7 @@ public class WtHealthReportTest {
 //        }
 //        System.out.println("***************************************************************************************");
 
-        AjaxResult ajaxResult =wtHealthReportController.healthReportChart(wtid,"zk","2021-03-24");
+        AjaxResult ajaxResult =wtHealthReportController.healthReportChart(wtid,"fdj","2021-03-24");
 
         List<WtTragetReportChart> test2=(List<WtTragetReportChart>)ajaxResult.get("data");