Browse Source

接入天气预测数据(sis电量预测 weatherfd表)

chenminghua 3 years ago
parent
commit
acc94eb3af

+ 10 - 1
src/main/java/com/gyee/frame/common/conf/MybatisConfig.java

@@ -54,14 +54,23 @@ public class MybatisConfig {
         return DruidDataSourceBuilder.create().build();
     }
 
+    @Bean(name = "predict")
+    @ConfigurationProperties("spring.datasource.druid.predict")
+    public DataSource predictDataSource()
+    {
+        return DruidDataSourceBuilder.create().build();
+    }
+
     @Bean(name = "dynamicDataSource")
     @Primary
-    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource, @Qualifier("ticket")DataSource ticketDataSource)
+    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource,
+                                        @Qualifier("ticket")DataSource ticketDataSource, @Qualifier("predict")DataSource predictDataSource)
     {
         Map<Object, Object> targetDataSources = new HashMap<>();
         targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
     	targetDataSources.put(DataSourceType.SLAVE.name(),slaveDataSource);
         targetDataSources.put(DataSourceType.TICKET.name(),ticketDataSource);
+        targetDataSources.put(DataSourceType.PREDICT.name(),predictDataSource);
         return new DynamicDataSource(masterDataSource(), targetDataSources);
     }
 

+ 2 - 1
src/main/java/com/gyee/frame/common/dataSources/DataSourceType.java

@@ -9,5 +9,6 @@ package com.gyee.frame.common.dataSources;
 public enum DataSourceType {
 	MASTER,
 	SLAVE,
-	TICKET
+	TICKET,
+	PREDICT
 }

+ 97 - 0
src/main/java/com/gyee/frame/mapper/auto/WfnwpdataMapper.java

@@ -0,0 +1,97 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.Wfnwpdata;
+import com.gyee.frame.model.auto.WfnwpdataExample;
+import java.util.Date;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface WfnwpdataMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    long countByExample(WfnwpdataExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(WfnwpdataExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(@Param("windplantNo") Short windplantNo, @Param("nwpType") Short nwpType, @Param("fileTime") Long fileTime, @Param("dataTime") Date dataTime);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    int insert(Wfnwpdata record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    int insertSelective(Wfnwpdata record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    List<Wfnwpdata> selectByExample(WfnwpdataExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    Wfnwpdata selectByPrimaryKey(@Param("windplantNo") Short windplantNo, @Param("nwpType") Short nwpType, @Param("fileTime") Long fileTime, @Param("dataTime") Date dataTime);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") Wfnwpdata record, @Param("example") WfnwpdataExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") Wfnwpdata record, @Param("example") WfnwpdataExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(Wfnwpdata record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(Wfnwpdata record);
+}

+ 311 - 0
src/main/java/com/gyee/frame/model/auto/Wfnwpdata.java

@@ -0,0 +1,311 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Wfnwpdata implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.WINDPLANT_NO
+     *
+     * @mbg.generated
+     */
+    private Short windplantNo;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.NWP_TYPE
+     *
+     * @mbg.generated
+     */
+    private Short nwpType;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.FILE_TIME
+     *
+     * @mbg.generated
+     */
+    private Long fileTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.DATA_TIME
+     *
+     * @mbg.generated
+     */
+    private Date dataTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.WIND_SPEED
+     *
+     * @mbg.generated
+     */
+    private Double windSpeed;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.TEMPERATURE
+     *
+     * @mbg.generated
+     */
+    private Double temperature;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.WIND_DIR
+     *
+     * @mbg.generated
+     */
+    private Double windDir;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.HUMIDITY
+     *
+     * @mbg.generated
+     */
+    private Double humidity;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WF_NWP_DATA.AIR_PRESSURE
+     *
+     * @mbg.generated
+     */
+    private Double airPressure;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.WINDPLANT_NO
+     *
+     * @return the value of WF_NWP_DATA.WINDPLANT_NO
+     *
+     * @mbg.generated
+     */
+    public Short getWindplantNo() {
+        return windplantNo;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.WINDPLANT_NO
+     *
+     * @param windplantNo the value for WF_NWP_DATA.WINDPLANT_NO
+     *
+     * @mbg.generated
+     */
+    public void setWindplantNo(Short windplantNo) {
+        this.windplantNo = windplantNo;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.NWP_TYPE
+     *
+     * @return the value of WF_NWP_DATA.NWP_TYPE
+     *
+     * @mbg.generated
+     */
+    public Short getNwpType() {
+        return nwpType;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.NWP_TYPE
+     *
+     * @param nwpType the value for WF_NWP_DATA.NWP_TYPE
+     *
+     * @mbg.generated
+     */
+    public void setNwpType(Short nwpType) {
+        this.nwpType = nwpType;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.FILE_TIME
+     *
+     * @return the value of WF_NWP_DATA.FILE_TIME
+     *
+     * @mbg.generated
+     */
+    public Long getFileTime() {
+        return fileTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.FILE_TIME
+     *
+     * @param fileTime the value for WF_NWP_DATA.FILE_TIME
+     *
+     * @mbg.generated
+     */
+    public void setFileTime(Long fileTime) {
+        this.fileTime = fileTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.DATA_TIME
+     *
+     * @return the value of WF_NWP_DATA.DATA_TIME
+     *
+     * @mbg.generated
+     */
+    public Date getDataTime() {
+        return dataTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.DATA_TIME
+     *
+     * @param dataTime the value for WF_NWP_DATA.DATA_TIME
+     *
+     * @mbg.generated
+     */
+    public void setDataTime(Date dataTime) {
+        this.dataTime = dataTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.WIND_SPEED
+     *
+     * @return the value of WF_NWP_DATA.WIND_SPEED
+     *
+     * @mbg.generated
+     */
+    public Double getWindSpeed() {
+        return windSpeed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.WIND_SPEED
+     *
+     * @param windSpeed the value for WF_NWP_DATA.WIND_SPEED
+     *
+     * @mbg.generated
+     */
+    public void setWindSpeed(Double windSpeed) {
+        this.windSpeed = windSpeed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.TEMPERATURE
+     *
+     * @return the value of WF_NWP_DATA.TEMPERATURE
+     *
+     * @mbg.generated
+     */
+    public Double getTemperature() {
+        return temperature;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.TEMPERATURE
+     *
+     * @param temperature the value for WF_NWP_DATA.TEMPERATURE
+     *
+     * @mbg.generated
+     */
+    public void setTemperature(Double temperature) {
+        this.temperature = temperature;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.WIND_DIR
+     *
+     * @return the value of WF_NWP_DATA.WIND_DIR
+     *
+     * @mbg.generated
+     */
+    public Double getWindDir() {
+        return windDir;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.WIND_DIR
+     *
+     * @param windDir the value for WF_NWP_DATA.WIND_DIR
+     *
+     * @mbg.generated
+     */
+    public void setWindDir(Double windDir) {
+        this.windDir = windDir;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.HUMIDITY
+     *
+     * @return the value of WF_NWP_DATA.HUMIDITY
+     *
+     * @mbg.generated
+     */
+    public Double getHumidity() {
+        return humidity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.HUMIDITY
+     *
+     * @param humidity the value for WF_NWP_DATA.HUMIDITY
+     *
+     * @mbg.generated
+     */
+    public void setHumidity(Double humidity) {
+        this.humidity = humidity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WF_NWP_DATA.AIR_PRESSURE
+     *
+     * @return the value of WF_NWP_DATA.AIR_PRESSURE
+     *
+     * @mbg.generated
+     */
+    public Double getAirPressure() {
+        return airPressure;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WF_NWP_DATA.AIR_PRESSURE
+     *
+     * @param airPressure the value for WF_NWP_DATA.AIR_PRESSURE
+     *
+     * @mbg.generated
+     */
+    public void setAirPressure(Double airPressure) {
+        this.airPressure = airPressure;
+    }
+}

+ 843 - 0
src/main/java/com/gyee/frame/model/auto/WfnwpdataExample.java

@@ -0,0 +1,843 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class WfnwpdataExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public WfnwpdataExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andWindplantNoIsNull() {
+            addCriterion("WINDPLANT_NO is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoIsNotNull() {
+            addCriterion("WINDPLANT_NO is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoEqualTo(Short value) {
+            addCriterion("WINDPLANT_NO =", value, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoNotEqualTo(Short value) {
+            addCriterion("WINDPLANT_NO <>", value, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoGreaterThan(Short value) {
+            addCriterion("WINDPLANT_NO >", value, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoGreaterThanOrEqualTo(Short value) {
+            addCriterion("WINDPLANT_NO >=", value, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoLessThan(Short value) {
+            addCriterion("WINDPLANT_NO <", value, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoLessThanOrEqualTo(Short value) {
+            addCriterion("WINDPLANT_NO <=", value, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoIn(List<Short> values) {
+            addCriterion("WINDPLANT_NO in", values, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoNotIn(List<Short> values) {
+            addCriterion("WINDPLANT_NO not in", values, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoBetween(Short value1, Short value2) {
+            addCriterion("WINDPLANT_NO between", value1, value2, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindplantNoNotBetween(Short value1, Short value2) {
+            addCriterion("WINDPLANT_NO not between", value1, value2, "windplantNo");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeIsNull() {
+            addCriterion("NWP_TYPE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeIsNotNull() {
+            addCriterion("NWP_TYPE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeEqualTo(Short value) {
+            addCriterion("NWP_TYPE =", value, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeNotEqualTo(Short value) {
+            addCriterion("NWP_TYPE <>", value, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeGreaterThan(Short value) {
+            addCriterion("NWP_TYPE >", value, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeGreaterThanOrEqualTo(Short value) {
+            addCriterion("NWP_TYPE >=", value, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeLessThan(Short value) {
+            addCriterion("NWP_TYPE <", value, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeLessThanOrEqualTo(Short value) {
+            addCriterion("NWP_TYPE <=", value, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeIn(List<Short> values) {
+            addCriterion("NWP_TYPE in", values, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeNotIn(List<Short> values) {
+            addCriterion("NWP_TYPE not in", values, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeBetween(Short value1, Short value2) {
+            addCriterion("NWP_TYPE between", value1, value2, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andNwpTypeNotBetween(Short value1, Short value2) {
+            addCriterion("NWP_TYPE not between", value1, value2, "nwpType");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeIsNull() {
+            addCriterion("FILE_TIME is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeIsNotNull() {
+            addCriterion("FILE_TIME is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeEqualTo(Long value) {
+            addCriterion("FILE_TIME =", value, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeNotEqualTo(Long value) {
+            addCriterion("FILE_TIME <>", value, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeGreaterThan(Long value) {
+            addCriterion("FILE_TIME >", value, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeGreaterThanOrEqualTo(Long value) {
+            addCriterion("FILE_TIME >=", value, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeLessThan(Long value) {
+            addCriterion("FILE_TIME <", value, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeLessThanOrEqualTo(Long value) {
+            addCriterion("FILE_TIME <=", value, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeIn(List<Long> values) {
+            addCriterion("FILE_TIME in", values, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeNotIn(List<Long> values) {
+            addCriterion("FILE_TIME not in", values, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeBetween(Long value1, Long value2) {
+            addCriterion("FILE_TIME between", value1, value2, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileTimeNotBetween(Long value1, Long value2) {
+            addCriterion("FILE_TIME not between", value1, value2, "fileTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeIsNull() {
+            addCriterion("DATA_TIME is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeIsNotNull() {
+            addCriterion("DATA_TIME is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeEqualTo(Date value) {
+            addCriterion("DATA_TIME =", value, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeNotEqualTo(Date value) {
+            addCriterion("DATA_TIME <>", value, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeGreaterThan(Date value) {
+            addCriterion("DATA_TIME >", value, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("DATA_TIME >=", value, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeLessThan(Date value) {
+            addCriterion("DATA_TIME <", value, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeLessThanOrEqualTo(Date value) {
+            addCriterion("DATA_TIME <=", value, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeIn(List<Date> values) {
+            addCriterion("DATA_TIME in", values, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeNotIn(List<Date> values) {
+            addCriterion("DATA_TIME not in", values, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeBetween(Date value1, Date value2) {
+            addCriterion("DATA_TIME between", value1, value2, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andDataTimeNotBetween(Date value1, Date value2) {
+            addCriterion("DATA_TIME not between", value1, value2, "dataTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedIsNull() {
+            addCriterion("WIND_SPEED is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedIsNotNull() {
+            addCriterion("WIND_SPEED is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedEqualTo(Double value) {
+            addCriterion("WIND_SPEED =", value, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedNotEqualTo(Double value) {
+            addCriterion("WIND_SPEED <>", value, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedGreaterThan(Double value) {
+            addCriterion("WIND_SPEED >", value, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedGreaterThanOrEqualTo(Double value) {
+            addCriterion("WIND_SPEED >=", value, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedLessThan(Double value) {
+            addCriterion("WIND_SPEED <", value, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedLessThanOrEqualTo(Double value) {
+            addCriterion("WIND_SPEED <=", value, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedIn(List<Double> values) {
+            addCriterion("WIND_SPEED in", values, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedNotIn(List<Double> values) {
+            addCriterion("WIND_SPEED not in", values, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedBetween(Double value1, Double value2) {
+            addCriterion("WIND_SPEED between", value1, value2, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindSpeedNotBetween(Double value1, Double value2) {
+            addCriterion("WIND_SPEED not between", value1, value2, "windSpeed");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureIsNull() {
+            addCriterion("TEMPERATURE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureIsNotNull() {
+            addCriterion("TEMPERATURE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureEqualTo(Double value) {
+            addCriterion("TEMPERATURE =", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureNotEqualTo(Double value) {
+            addCriterion("TEMPERATURE <>", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureGreaterThan(Double value) {
+            addCriterion("TEMPERATURE >", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureGreaterThanOrEqualTo(Double value) {
+            addCriterion("TEMPERATURE >=", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureLessThan(Double value) {
+            addCriterion("TEMPERATURE <", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureLessThanOrEqualTo(Double value) {
+            addCriterion("TEMPERATURE <=", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureIn(List<Double> values) {
+            addCriterion("TEMPERATURE in", values, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureNotIn(List<Double> values) {
+            addCriterion("TEMPERATURE not in", values, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureBetween(Double value1, Double value2) {
+            addCriterion("TEMPERATURE between", value1, value2, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureNotBetween(Double value1, Double value2) {
+            addCriterion("TEMPERATURE not between", value1, value2, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirIsNull() {
+            addCriterion("WIND_DIR is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirIsNotNull() {
+            addCriterion("WIND_DIR is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirEqualTo(Double value) {
+            addCriterion("WIND_DIR =", value, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirNotEqualTo(Double value) {
+            addCriterion("WIND_DIR <>", value, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirGreaterThan(Double value) {
+            addCriterion("WIND_DIR >", value, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirGreaterThanOrEqualTo(Double value) {
+            addCriterion("WIND_DIR >=", value, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirLessThan(Double value) {
+            addCriterion("WIND_DIR <", value, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirLessThanOrEqualTo(Double value) {
+            addCriterion("WIND_DIR <=", value, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirIn(List<Double> values) {
+            addCriterion("WIND_DIR in", values, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirNotIn(List<Double> values) {
+            addCriterion("WIND_DIR not in", values, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirBetween(Double value1, Double value2) {
+            addCriterion("WIND_DIR between", value1, value2, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindDirNotBetween(Double value1, Double value2) {
+            addCriterion("WIND_DIR not between", value1, value2, "windDir");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityIsNull() {
+            addCriterion("HUMIDITY is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityIsNotNull() {
+            addCriterion("HUMIDITY is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityEqualTo(Double value) {
+            addCriterion("HUMIDITY =", value, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityNotEqualTo(Double value) {
+            addCriterion("HUMIDITY <>", value, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityGreaterThan(Double value) {
+            addCriterion("HUMIDITY >", value, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityGreaterThanOrEqualTo(Double value) {
+            addCriterion("HUMIDITY >=", value, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityLessThan(Double value) {
+            addCriterion("HUMIDITY <", value, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityLessThanOrEqualTo(Double value) {
+            addCriterion("HUMIDITY <=", value, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityIn(List<Double> values) {
+            addCriterion("HUMIDITY in", values, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityNotIn(List<Double> values) {
+            addCriterion("HUMIDITY not in", values, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityBetween(Double value1, Double value2) {
+            addCriterion("HUMIDITY between", value1, value2, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andHumidityNotBetween(Double value1, Double value2) {
+            addCriterion("HUMIDITY not between", value1, value2, "humidity");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureIsNull() {
+            addCriterion("AIR_PRESSURE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureIsNotNull() {
+            addCriterion("AIR_PRESSURE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureEqualTo(Double value) {
+            addCriterion("AIR_PRESSURE =", value, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureNotEqualTo(Double value) {
+            addCriterion("AIR_PRESSURE <>", value, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureGreaterThan(Double value) {
+            addCriterion("AIR_PRESSURE >", value, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureGreaterThanOrEqualTo(Double value) {
+            addCriterion("AIR_PRESSURE >=", value, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureLessThan(Double value) {
+            addCriterion("AIR_PRESSURE <", value, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureLessThanOrEqualTo(Double value) {
+            addCriterion("AIR_PRESSURE <=", value, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureIn(List<Double> values) {
+            addCriterion("AIR_PRESSURE in", values, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureNotIn(List<Double> values) {
+            addCriterion("AIR_PRESSURE not in", values, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureBetween(Double value1, Double value2) {
+            addCriterion("AIR_PRESSURE between", value1, value2, "airPressure");
+            return (Criteria) this;
+        }
+
+        public Criteria andAirPressureNotBetween(Double value1, Double value2) {
+            addCriterion("AIR_PRESSURE not between", value1, value2, "airPressure");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated do_not_delete_during_merge
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table WF_NWP_DATA
+     *
+     * @mbg.generated
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 130 - 0
src/main/java/com/gyee/frame/schdule/weather/TaskWeatherGather.java

@@ -0,0 +1,130 @@
+package com.gyee.frame.schdule.weather;
+
+import com.gyee.frame.model.auto.Weatherfd;
+import com.gyee.frame.model.auto.WeatherfdExample;
+import com.gyee.frame.model.auto.Wfnwpdata;
+import com.gyee.frame.service.WeatherfdService;
+import com.gyee.frame.service.weather.WfnwpdataService;
+import com.gyee.frame.util.DateUtils;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+
+
+/**
+ * 采集风速到weatherfd表
+ */
+@Component
+public class TaskWeatherGather {
+
+    //默认预测数据 40 天
+    private int days = 40;
+    public static Map<Integer, String> wp_map = new HashMap<>();
+
+    @Resource
+    WfnwpdataService wfnwpdataService;
+    @Resource
+    WeatherfdService weatherfdService;
+
+    static {
+        // 网源事业部的风场序号
+        wp_map.put(1, "NSS_FDC#牛首山风电场");
+        wp_map.put(2, "QS_FDC#青山山风电场");
+        wp_map.put(3, "SBQ_FDC#石板泉风电场");
+        wp_map.put(4, "XS_FDC#香山风电场");
+        wp_map.put(5, "MHS_FDC#麻黄山风电场");
+    }
+
+    /**
+     * 延时1分钟  每天凌晨1点执行一次
+     */
+    @Scheduled(initialDelay = 60 * 1000, cron = "0 0 1 * * ")
+    public void gatherTask() {
+        for (int key : wp_map.keySet()) {
+            String[] value = wp_map.get(key).split("#");
+            for (int i = 0; i < days; i++) {
+                Calendar cal = Calendar.getInstance();
+                cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH) + i);
+                cal.set(Calendar.HOUR_OF_DAY, 12);
+                cal.set(Calendar.MINUTE, 0);
+                cal.set(Calendar.SECOND, 0);
+                Date beginDate = cal.getTime();
+                cal.set(Calendar.HOUR_OF_DAY, 23);
+                Date endDate = cal.getTime();
+                try{
+                    List<Wfnwpdata> list = wfnwpdataService.findAll((short) key, beginDate, endDate);
+                    if (list != null && list.size() > 0) {
+                        Weatherfd weatherfd = new Weatherfd();
+                        weatherfd.setRecodedata(DateUtils.parseStrtoDate(DateUtils.format(cal.getTime(), DateUtils.DATE_TIME_PATTERN)));
+                        weatherfd.setRegion(value[1]);
+                        weatherfd.setWindpowerstationid(value[0]);
+                        //白天
+                        weatherfd.setMaximumtem(new BigDecimal(list.get(0).getTemperature()).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        weatherfd.setMinimumtem(new BigDecimal(list.get(0).getTemperature() - Math.random() * 8).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        weatherfd.setTemperature1(new BigDecimal(list.get(0).getTemperature()).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        weatherfd.setRealfeel1(new BigDecimal(list.get(0).getTemperature()).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        weatherfd.setPrecipitation1(0.0);
+                        weatherfd.setWinddirection1(String.valueOf(new BigDecimal(list.get(0).getWindDir()).setScale(2, RoundingMode.HALF_EVEN).doubleValue()));
+                        weatherfd.setSpeed1(new BigDecimal(list.get(0).getWindSpeed() * 3.6).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        weatherfd.setGust1(new BigDecimal(list.get(0).getWindSpeed() * 3.6).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        //夜间
+                        weatherfd.setTemperature2(new BigDecimal(list.get(list.size() - 1).getTemperature()).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        weatherfd.setRealfeel2(new BigDecimal(list.get(list.size() - 1).getTemperature()).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        weatherfd.setPrecipitation2(0.0);
+                        weatherfd.setWinddirection2(String.valueOf(new BigDecimal(list.get(list.size() - 1).getWindDir()).setScale(2, RoundingMode.HALF_EVEN).doubleValue()));
+                        weatherfd.setSpeed2(new BigDecimal(list.get(list.size() - 1).getWindSpeed() * 3.6).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+                        weatherfd.setGust2(new BigDecimal(list.get(list.size() - 1).getWindSpeed() * 3.6).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
+
+                        WeatherfdExample example = new WeatherfdExample();
+                        example.createCriteria().andRecodedataEqualTo(DateUtils.parseStrtoDate(DateUtils.format(cal.getTime(), DateUtils.DATE_PATTERN)))
+                                .andWindpowerstationidEqualTo(value[0]);
+                        List<Weatherfd> weatherfds = weatherfdService.selectByExample(example);
+                        if (weatherfds != null && weatherfds.size() > 0){
+                            weatherfd.setId(weatherfds.get(0).getId());
+                            weatherfdService.updateByPrimaryKeySelective(weatherfd);
+                        }else
+                            weatherfdService.insertSelective(weatherfd);
+
+                    } else {
+                        cal.add(Calendar.YEAR, -1);
+//                        System.out.println(DateUtils.format(cal.getTime(), DateUtils.DATE_PATTERN));
+                        WeatherfdExample example = new WeatherfdExample();
+                        example.createCriteria().andRecodedataEqualTo(DateUtils.parseStrtoDate(DateUtils.format(cal.getTime(), DateUtils.DATE_PATTERN)))
+                                .andWindpowerstationidEqualTo(value[0]);
+                        List<Weatherfd> weatherfds = weatherfdService.selectByExample(example);
+                        cal.add(Calendar.YEAR, 1);
+                        if (weatherfds != null && weatherfds.size() > 0) {
+                            Weatherfd weatherfd = weatherfds.get(0);
+                            weatherfd.setRecodedata(DateUtils.parseStrtoDate(DateUtils.format(cal.getTime(), DateUtils.DATE_PATTERN)));
+                            weatherfdService.insertSelective(weatherfd);
+                        }
+                    }
+                }catch (Exception e){
+                    System.out.println(e.getMessage());
+                } finally {
+                    continue;
+                }
+            }
+        }
+
+    }
+
+
+    public static void main(String[] args) {
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH) + 40);
+        cal.set(Calendar.HOUR_OF_DAY, 12);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+        Date beginDate = cal.getTime();
+        cal.set(Calendar.HOUR_OF_DAY, 23);
+        Date endDate = cal.getTime();
+
+        System.out.println(DateUtils.format(cal.getTime(), DateUtils.DATE_PATTERN));
+    }
+}

+ 45 - 0
src/main/java/com/gyee/frame/service/weather/WfnwpdataService.java

@@ -0,0 +1,45 @@
+package com.gyee.frame.service.weather;
+
+import com.gyee.frame.common.dataSources.DataSource;
+import com.gyee.frame.common.dataSources.DataSourceType;
+import com.gyee.frame.mapper.auto.WfnwpdataMapper;
+import com.gyee.frame.model.auto.Wfnwpdata;
+import com.gyee.frame.model.auto.WfnwpdataExample;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 使用功率预测采集的天气数据(网源事业部)
+ * 添加到Weatherfd表,进行电量预测
+ */
+@Service
+public class WfnwpdataService {
+
+    @Resource
+    private WfnwpdataMapper wfnwpdataMapper;
+
+    /**
+     * * NwpType==7   表示大陆天气预报
+     *
+     * @param wpId 风场
+     * @param beginDate  开始时间   12点
+     * @param endDate    结束时间   24点
+     * @return
+     */
+    @DataSource(DataSourceType.PREDICT)
+    public List<Wfnwpdata> findAll(Short wpId, Date beginDate, Date endDate) {
+        WfnwpdataExample example = new WfnwpdataExample();
+        example.createCriteria().andNwpTypeEqualTo((short) 7)
+                .andWindplantNoEqualTo(wpId)
+                .andDataTimeBetween(beginDate, endDate);
+
+        List<Wfnwpdata> list = wfnwpdataMapper.selectByExample(example);
+
+        return list;
+    }
+
+
+}

+ 10 - 2
src/main/resources/application-dev.yml

@@ -22,14 +22,22 @@ spring:
         url: jdbc:mysql://localhost:3306/springbootv3?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
         username: root
         password: root
-      #两票数据源
+     #两票数据源
      ticket:
        #url: jdbc:sqlserver://123.60.213.70:1433;DatabaseName=fdeam
        url: jdbc:sqlserver://10.155.32.2:1433;DatabaseName=fdeam
        username: sa
        password: Gyee@321#!
        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-      #配置初始化连接数大小
+
+     #采集天气数据源 --网源事业部
+     predict:
+       url: jdbc:oracle:thin:@10.155.32.7:1521:ORCL
+       username: gyee
+       password: FRWIND
+       driver-class-name: oracle.jdbc.driver.OracleDriver
+
+     #配置初始化连接数大小
      initial-size: 10
      # 最大连接数
      max-active: 50

+ 336 - 0
src/main/resources/mybatis/auto/WfnwpdataMapper.xml

@@ -0,0 +1,336 @@
+<?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.WfnwpdataMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Wfnwpdata">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="WINDPLANT_NO" jdbcType="DECIMAL" property="windplantNo" />
+    <id column="NWP_TYPE" jdbcType="DECIMAL" property="nwpType" />
+    <id column="FILE_TIME" jdbcType="DECIMAL" property="fileTime" />
+    <id column="DATA_TIME" jdbcType="TIMESTAMP" property="dataTime" />
+    <result column="WIND_SPEED" jdbcType="FLOAT" property="windSpeed" />
+    <result column="TEMPERATURE" jdbcType="FLOAT" property="temperature" />
+    <result column="WIND_DIR" jdbcType="FLOAT" property="windDir" />
+    <result column="HUMIDITY" jdbcType="FLOAT" property="humidity" />
+    <result column="AIR_PRESSURE" jdbcType="FLOAT" property="airPressure" />
+  </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.
+    -->
+    WINDPLANT_NO, NWP_TYPE, FILE_TIME, DATA_TIME, WIND_SPEED, TEMPERATURE, WIND_DIR, 
+    HUMIDITY, AIR_PRESSURE
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WfnwpdataExample" 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 WF_NWP_DATA
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from WF_NWP_DATA
+    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
+      and NWP_TYPE = #{nwpType,jdbcType=DECIMAL}
+      and FILE_TIME = #{fileTime,jdbcType=DECIMAL}
+      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from WF_NWP_DATA
+    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
+      and NWP_TYPE = #{nwpType,jdbcType=DECIMAL}
+      and FILE_TIME = #{fileTime,jdbcType=DECIMAL}
+      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WfnwpdataExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from WF_NWP_DATA
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Wfnwpdata">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WF_NWP_DATA (WINDPLANT_NO, NWP_TYPE, FILE_TIME, 
+      DATA_TIME, WIND_SPEED, TEMPERATURE, 
+      WIND_DIR, HUMIDITY, AIR_PRESSURE
+      )
+    values (#{windplantNo,jdbcType=DECIMAL}, #{nwpType,jdbcType=DECIMAL}, #{fileTime,jdbcType=DECIMAL}, 
+      #{dataTime,jdbcType=TIMESTAMP}, #{windSpeed,jdbcType=FLOAT}, #{temperature,jdbcType=FLOAT}, 
+      #{windDir,jdbcType=FLOAT}, #{humidity,jdbcType=FLOAT}, #{airPressure,jdbcType=FLOAT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Wfnwpdata">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WF_NWP_DATA
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="windplantNo != null">
+        WINDPLANT_NO,
+      </if>
+      <if test="nwpType != null">
+        NWP_TYPE,
+      </if>
+      <if test="fileTime != null">
+        FILE_TIME,
+      </if>
+      <if test="dataTime != null">
+        DATA_TIME,
+      </if>
+      <if test="windSpeed != null">
+        WIND_SPEED,
+      </if>
+      <if test="temperature != null">
+        TEMPERATURE,
+      </if>
+      <if test="windDir != null">
+        WIND_DIR,
+      </if>
+      <if test="humidity != null">
+        HUMIDITY,
+      </if>
+      <if test="airPressure != null">
+        AIR_PRESSURE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="windplantNo != null">
+        #{windplantNo,jdbcType=DECIMAL},
+      </if>
+      <if test="nwpType != null">
+        #{nwpType,jdbcType=DECIMAL},
+      </if>
+      <if test="fileTime != null">
+        #{fileTime,jdbcType=DECIMAL},
+      </if>
+      <if test="dataTime != null">
+        #{dataTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="windSpeed != null">
+        #{windSpeed,jdbcType=FLOAT},
+      </if>
+      <if test="temperature != null">
+        #{temperature,jdbcType=FLOAT},
+      </if>
+      <if test="windDir != null">
+        #{windDir,jdbcType=FLOAT},
+      </if>
+      <if test="humidity != null">
+        #{humidity,jdbcType=FLOAT},
+      </if>
+      <if test="airPressure != null">
+        #{airPressure,jdbcType=FLOAT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WfnwpdataExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from WF_NWP_DATA
+    <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 WF_NWP_DATA
+    <set>
+      <if test="record.windplantNo != null">
+        WINDPLANT_NO = #{record.windplantNo,jdbcType=DECIMAL},
+      </if>
+      <if test="record.nwpType != null">
+        NWP_TYPE = #{record.nwpType,jdbcType=DECIMAL},
+      </if>
+      <if test="record.fileTime != null">
+        FILE_TIME = #{record.fileTime,jdbcType=DECIMAL},
+      </if>
+      <if test="record.dataTime != null">
+        DATA_TIME = #{record.dataTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.windSpeed != null">
+        WIND_SPEED = #{record.windSpeed,jdbcType=FLOAT},
+      </if>
+      <if test="record.temperature != null">
+        TEMPERATURE = #{record.temperature,jdbcType=FLOAT},
+      </if>
+      <if test="record.windDir != null">
+        WIND_DIR = #{record.windDir,jdbcType=FLOAT},
+      </if>
+      <if test="record.humidity != null">
+        HUMIDITY = #{record.humidity,jdbcType=FLOAT},
+      </if>
+      <if test="record.airPressure != null">
+        AIR_PRESSURE = #{record.airPressure,jdbcType=FLOAT},
+      </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 WF_NWP_DATA
+    set WINDPLANT_NO = #{record.windplantNo,jdbcType=DECIMAL},
+      NWP_TYPE = #{record.nwpType,jdbcType=DECIMAL},
+      FILE_TIME = #{record.fileTime,jdbcType=DECIMAL},
+      DATA_TIME = #{record.dataTime,jdbcType=TIMESTAMP},
+      WIND_SPEED = #{record.windSpeed,jdbcType=FLOAT},
+      TEMPERATURE = #{record.temperature,jdbcType=FLOAT},
+      WIND_DIR = #{record.windDir,jdbcType=FLOAT},
+      HUMIDITY = #{record.humidity,jdbcType=FLOAT},
+      AIR_PRESSURE = #{record.airPressure,jdbcType=FLOAT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Wfnwpdata">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WF_NWP_DATA
+    <set>
+      <if test="windSpeed != null">
+        WIND_SPEED = #{windSpeed,jdbcType=FLOAT},
+      </if>
+      <if test="temperature != null">
+        TEMPERATURE = #{temperature,jdbcType=FLOAT},
+      </if>
+      <if test="windDir != null">
+        WIND_DIR = #{windDir,jdbcType=FLOAT},
+      </if>
+      <if test="humidity != null">
+        HUMIDITY = #{humidity,jdbcType=FLOAT},
+      </if>
+      <if test="airPressure != null">
+        AIR_PRESSURE = #{airPressure,jdbcType=FLOAT},
+      </if>
+    </set>
+    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
+      and NWP_TYPE = #{nwpType,jdbcType=DECIMAL}
+      and FILE_TIME = #{fileTime,jdbcType=DECIMAL}
+      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Wfnwpdata">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WF_NWP_DATA
+    set WIND_SPEED = #{windSpeed,jdbcType=FLOAT},
+      TEMPERATURE = #{temperature,jdbcType=FLOAT},
+      WIND_DIR = #{windDir,jdbcType=FLOAT},
+      HUMIDITY = #{humidity,jdbcType=FLOAT},
+      AIR_PRESSURE = #{airPressure,jdbcType=FLOAT}
+    where WINDPLANT_NO = #{windplantNo,jdbcType=DECIMAL}
+      and NWP_TYPE = #{nwpType,jdbcType=DECIMAL}
+      and FILE_TIME = #{fileTime,jdbcType=DECIMAL}
+      and DATA_TIME = #{dataTime,jdbcType=TIMESTAMP}
+  </update>
+</mapper>