Просмотр исходного кода

Merge branch 'master' of http://49.4.49.126:3000/GYEE_R.D/Gyee_Frame_NX

maxiaoxia 4 лет назад
Родитель
Сommit
21ea767305

+ 9 - 9
pom.xml

@@ -276,19 +276,19 @@
 					<configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>
 				</configuration>
 				<dependencies>
-					<!--<dependency>
+					<dependency>
 						<groupId>mysql</groupId>
 						<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>
-				</dependencies>
-			</plugin>
-			<!-- jar运行配置 -->
+			<!--<dependency>
+                <groupId>com.oracle</groupId>
+                <artifactId>ojdbc6</artifactId>
+                <version>11.2.0.3</version>
+            </dependency>-->
+        </dependencies>
+    </plugin>
+    <!-- jar运行配置 -->
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>

+ 11 - 0
src/main/java/com/gyee/frame/common/conf/AjaxStatus.java

@@ -0,0 +1,11 @@
+package com.gyee.frame.common.conf;
+
+public enum  AjaxStatus {
+    success(200),
+    error(500),
+    emptyresultset(300);
+    public int code;
+    AjaxStatus(int c) {
+        code = c;
+    }
+}

+ 153 - 154
src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -2,7 +2,6 @@ package com.gyee.frame.common.spring;
 
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.service.*;
-import com.gyee.frame.util.StringUtils;
 import org.springframework.boot.CommandLineRunner;
 import org.springframework.stereotype.Component;
 
@@ -57,56 +56,56 @@ public class InitialRunner implements CommandLineRunner {
     public void run(String... args) throws Exception {
         //System.out.println(">>>>>>>>>>>>>>>服务启动执行,换成测点关联数据 <<<<<<<<<<<<<");
 
-        List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
-
-        if(!quartzJobs.isEmpty())
-        {
-            for(SysQuartzJob sysQuartzJob:quartzJobs){
-
-                jobsmap.put(sysQuartzJob.getId(),sysQuartzJob);
-            }
-
-        }
-
-        WindpowerstationExample windpowerstationExample=new WindpowerstationExample();
-        windpowerstationExample.setOrderByClause("ordernum ASC");
-//        windpowerstationExample.createCriteria().andIdNotLike("%MCH%");
-        wpallls= windpowerstationService.selectByExample(windpowerstationExample);
-        if(!wpallls.isEmpty())
-        {
-            for(Windpowerstation wp:wpallls)
-            {
-                wpmap.put(wp.getId(),wp);
-            }
-        }
-
-        windpowerstationExample=new WindpowerstationExample();
-        windpowerstationExample.setOrderByClause("ordernum ASC");
-        windpowerstationExample.createCriteria().andIdNotLike("%GDC");
-        wpls= windpowerstationService.selectByExample(windpowerstationExample);
-
-        ProjectExample projectExample=new ProjectExample();
-        projectExample.setOrderByClause("ordernum ASC");
-        projectExample.createCriteria().andWindpowerstationidNotLike("%GDC");
-        pjls= projectService.selectByExample(projectExample);
-
-        LineExample lineExample=new LineExample();
-        lineExample.setOrderByClause("ordernum ASC");
-        lineExample.createCriteria().getAllCriteria();
-        lnls= lineService.selectByExample(lineExample);
-
-        WindturbineExample windturbineExample=new WindturbineExample();
-        windturbineExample.setOrderByClause("id ASC");
-        windturbineExample.createCriteria().andWindpowerstationidNotLike("%GDC");
-        wtls= windturbineService.selectByExample(windturbineExample);
-
-        if(!wtls.isEmpty())
-        {
-            for(Windturbine wt:wtls)
-            {
-                wtmap.put(wt.getId(),wt);
-            }
-        }
+//        List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
+//
+//        if(!quartzJobs.isEmpty())
+//        {
+//            for(SysQuartzJob sysQuartzJob:quartzJobs){
+//
+//                jobsmap.put(sysQuartzJob.getId(),sysQuartzJob);
+//            }
+//
+//        }
+//
+//        WindpowerstationExample windpowerstationExample=new WindpowerstationExample();
+//        windpowerstationExample.setOrderByClause("ordernum ASC");
+////        windpowerstationExample.createCriteria().andIdNotLike("%MCH%");
+//        wpallls= windpowerstationService.selectByExample(windpowerstationExample);
+//        if(!wpallls.isEmpty())
+//        {
+//            for(Windpowerstation wp:wpallls)
+//            {
+//                wpmap.put(wp.getId(),wp);
+//            }
+//        }
+//
+//        windpowerstationExample=new WindpowerstationExample();
+//        windpowerstationExample.setOrderByClause("ordernum ASC");
+//        windpowerstationExample.createCriteria().andIdNotLike("%GDC");
+//        wpls= windpowerstationService.selectByExample(windpowerstationExample);
+//
+//        ProjectExample projectExample=new ProjectExample();
+//        projectExample.setOrderByClause("ordernum ASC");
+//        projectExample.createCriteria().andWindpowerstationidNotLike("%GDC");
+//        pjls= projectService.selectByExample(projectExample);
+//
+//        LineExample lineExample=new LineExample();
+//        lineExample.setOrderByClause("ordernum ASC");
+//        lineExample.createCriteria().getAllCriteria();
+//        lnls= lineService.selectByExample(lineExample);
+//
+//        WindturbineExample windturbineExample=new WindturbineExample();
+//        windturbineExample.setOrderByClause("id ASC");
+//        windturbineExample.createCriteria().andWindpowerstationidNotLike("%GDC");
+//        wtls= windturbineService.selectByExample(windturbineExample);
+//
+//        if(!wtls.isEmpty())
+//        {
+//            for(Windturbine wt:wtls)
+//            {
+//                wtmap.put(wt.getId(),wt);
+//            }
+//        }
 
 //        WindturbinepowercurvefittingExample windturbinepowercurvefittingExample=new WindturbinepowercurvefittingExample();
 //        windturbinepowercurvefittingExample.setOrderByClause("WINDTURBINEID ASC,speed ASC");
@@ -126,109 +125,109 @@ public class InitialRunner implements CommandLineRunner {
 //        }
 
 
-        if(wtls!=null && !wtls.isEmpty()){
-
-            for(int i=0;i<wtls.size();i++){
-
-                Windturbine point=wtls.get(i);
-                if(wp_wtmap.containsKey(point.getWindpowerstationid())){
-                    List<Windturbine> ls=wp_wtmap.get(point.getWindpowerstationid());
-                    ls.add(point);
-                    wp_wtmap.put(point.getWindpowerstationid(),ls);
-                }
-                else{
-                    List<Windturbine> ls =new ArrayList();
-                    ls.add(point);
-                    wp_wtmap.put(point.getWindpowerstationid(),ls);
-                }
-
-                if(pj_wtmap.containsKey(point.getProjectid())){
-                    List<Windturbine> ls=pj_wtmap.get(point.getProjectid());
-                    ls.add(point);
-                    pj_wtmap.put(point.getProjectid(),ls);
-                }
-                else{
-                    List<Windturbine> ls =new ArrayList();
-                    ls.add(point);
-                    pj_wtmap.put(point.getProjectid(),ls);
-                }
-
-
-                if(ln_wtmap.containsKey(point.getLineid())){
-                    List<Windturbine> ls=ln_wtmap.get(point.getLineid());
-                    ls.add(point);
-                    ln_wtmap.put(point.getLineid(),ls);
-                }
-                else{
-                    List<Windturbine> ls =new ArrayList();
-                    ls.add(point);
-                    ln_wtmap.put(point.getLineid(),ls);
-                }
-
-            }
-
-
-            List<Windturbine> ls=wp_wtmap.get("SBQ_FDC");
-            List<Windturbine> temp1=new ArrayList<>();
-            List<Windturbine> temp2=new ArrayList<>();
-            for(Windturbine wt:ls)
-            {
-                String str=wt.getId().substring(wt.getId().length()-3,wt.getId().length());
-                if(StringUtils.isNumeric(str))
-                {
-                    temp2.add(wt);
-                }else
-                {
-                    temp1.add(wt);
-                }
-            }
-
-            ls.clear();
-            ls.addAll(temp1);
-            ls.addAll(temp2);
-            wp_wtmap.put("SBQ_FDC",ls);
-        }
-
-
-        WindPowerStationTestingPoint2Example windPowerstationTestingPointExample=new WindPowerStationTestingPoint2Example();
-        windPowerstationTestingPointExample.createCriteria().getAllCriteria();
-        List<WindPowerStationTestingPoint2> wpPointlist= windPowerstationTestingPointService.selectByExample(windPowerstationTestingPointExample);
-
-        Map<String,WindPowerStationTestingPoint2> items=null;
-        if(wpPointlist!=null && !wpPointlist.isEmpty()){
-            for(int i=0;i<wpPointlist.size();i++){
-                WindPowerStationTestingPoint2 point=wpPointlist.get(i);
-                if(stationPointmap.containsKey(point.getWindpowerstationid())){
-                    items=stationPointmap.get(point.getWindpowerstationid());
-                    items.put(point.getUniformcode(), point);
-                }
-                else{
-                    items=new HashMap<String,WindPowerStationTestingPoint2>();
-                    stationPointmap.put(point.getWindpowerstationid(), items);
-                    items.put(point.getUniformcode(), point);
-                }
-
-            }
-        }
-
-        WindTurbineTestingPointAi2Example windTurbineTestingPointAiExample=new WindTurbineTestingPointAi2Example();
-        windTurbineTestingPointAiExample.createCriteria().getAllCriteria();
-        List<WindTurbineTestingPointAi2> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
-
-        Map<String, WindTurbineTestingPointAi2> map = null;
-
-        if(wtAilist != null && !wtAilist.isEmpty()){
-            for(WindTurbineTestingPointAi2 mp : wtAilist){
-                if(wtpAimap.containsKey(mp.getWindturbineid())){
-                    map = wtpAimap.get(mp.getWindturbineid());
-                    map.put(mp.getUniformcode(), mp);
-                }else{
-                    map = new HashMap<String, WindTurbineTestingPointAi2>();
-                    map.put(mp.getUniformcode(), mp);
-                    wtpAimap.put(mp.getWindturbineid(), map);
-                }
-            }
-        }
+//        if(wtls!=null && !wtls.isEmpty()){
+//
+//            for(int i=0;i<wtls.size();i++){
+//
+//                Windturbine point=wtls.get(i);
+//                if(wp_wtmap.containsKey(point.getWindpowerstationid())){
+//                    List<Windturbine> ls=wp_wtmap.get(point.getWindpowerstationid());
+//                    ls.add(point);
+//                    wp_wtmap.put(point.getWindpowerstationid(),ls);
+//                }
+//                else{
+//                    List<Windturbine> ls =new ArrayList();
+//                    ls.add(point);
+//                    wp_wtmap.put(point.getWindpowerstationid(),ls);
+//                }
+//
+//                if(pj_wtmap.containsKey(point.getProjectid())){
+//                    List<Windturbine> ls=pj_wtmap.get(point.getProjectid());
+//                    ls.add(point);
+//                    pj_wtmap.put(point.getProjectid(),ls);
+//                }
+//                else{
+//                    List<Windturbine> ls =new ArrayList();
+//                    ls.add(point);
+//                    pj_wtmap.put(point.getProjectid(),ls);
+//                }
+//
+//
+//                if(ln_wtmap.containsKey(point.getLineid())){
+//                    List<Windturbine> ls=ln_wtmap.get(point.getLineid());
+//                    ls.add(point);
+//                    ln_wtmap.put(point.getLineid(),ls);
+//                }
+//                else{
+//                    List<Windturbine> ls =new ArrayList();
+//                    ls.add(point);
+//                    ln_wtmap.put(point.getLineid(),ls);
+//                }
+//
+//            }
+//
+//
+//            List<Windturbine> ls=wp_wtmap.get("SBQ_FDC");
+//            List<Windturbine> temp1=new ArrayList<>();
+//            List<Windturbine> temp2=new ArrayList<>();
+//            for(Windturbine wt:ls)
+//            {
+//                String str=wt.getId().substring(wt.getId().length()-3,wt.getId().length());
+//                if(StringUtils.isNumeric(str))
+//                {
+//                    temp2.add(wt);
+//                }else
+//                {
+//                    temp1.add(wt);
+//                }
+//            }
+//
+//            ls.clear();
+//            ls.addAll(temp1);
+//            ls.addAll(temp2);
+//            wp_wtmap.put("SBQ_FDC",ls);
+//        }
+//
+//
+//        WindPowerStationTestingPoint2Example windPowerstationTestingPointExample=new WindPowerStationTestingPoint2Example();
+//        windPowerstationTestingPointExample.createCriteria().getAllCriteria();
+//        List<WindPowerStationTestingPoint2> wpPointlist= windPowerstationTestingPointService.selectByExample(windPowerstationTestingPointExample);
+//
+//        Map<String,WindPowerStationTestingPoint2> items=null;
+//        if(wpPointlist!=null && !wpPointlist.isEmpty()){
+//            for(int i=0;i<wpPointlist.size();i++){
+//                WindPowerStationTestingPoint2 point=wpPointlist.get(i);
+//                if(stationPointmap.containsKey(point.getWindpowerstationid())){
+//                    items=stationPointmap.get(point.getWindpowerstationid());
+//                    items.put(point.getUniformcode(), point);
+//                }
+//                else{
+//                    items=new HashMap<String,WindPowerStationTestingPoint2>();
+//                    stationPointmap.put(point.getWindpowerstationid(), items);
+//                    items.put(point.getUniformcode(), point);
+//                }
+//
+//            }
+//        }
+//
+//        WindTurbineTestingPointAi2Example windTurbineTestingPointAiExample=new WindTurbineTestingPointAi2Example();
+//        windTurbineTestingPointAiExample.createCriteria().getAllCriteria();
+//        List<WindTurbineTestingPointAi2> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
+//
+//        Map<String, WindTurbineTestingPointAi2> map = null;
+//
+//        if(wtAilist != null && !wtAilist.isEmpty()){
+//            for(WindTurbineTestingPointAi2 mp : wtAilist){
+//                if(wtpAimap.containsKey(mp.getWindturbineid())){
+//                    map = wtpAimap.get(mp.getWindturbineid());
+//                    map.put(mp.getUniformcode(), mp);
+//                }else{
+//                    map = new HashMap<String, WindTurbineTestingPointAi2>();
+//                    map.put(mp.getUniformcode(), mp);
+//                    wtpAimap.put(mp.getWindturbineid(), map);
+//                }
+//            }
+//        }
 
     }
 

+ 129 - 0
src/main/java/com/gyee/frame/controller/benchmarking/BenchmarkingController.java

@@ -0,0 +1,129 @@
+package com.gyee.frame.controller.benchmarking;
+
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.Windturbineinfodaytop3;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.custom.ValueVo;
+import com.gyee.frame.service.Windturbineinfodaytop3Service;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.Date;
+import java.util.List;
+
+@Controller
+@RequestMapping("/benchmarking")
+public class BenchmarkingController {
+    @Autowired
+    private Windturbineinfodaytop3Service windturbineinfodaytop3Service;
+
+    /**查询等级评估日所有信息**/
+    @GetMapping("/gadaylist")
+    @ResponseBody
+    public AjaxResult gadaylist(String wpId, String recorddate) {
+
+        Date tempDate=null;
+        if (StringUtils.isNotEmpty(recorddate))
+        {
+            tempDate=DateUtils.parseDate(recorddate);
+        }
+        List<Windturbineinfodaytop3> ls=windturbineinfodaytop3Service.gadaylist(wpId,tempDate);
+
+        if(ls !=null && !ls.isEmpty())
+        {
+            return	AjaxResult.successData(AjaxStatus.success.code,ls);
+        }else
+        {
+            return	AjaxResult.successData(AjaxStatus.emptyresultset.code,ls);
+        }
+
+    }
+    /**按页查询等级评估日所有信息**/
+    @PostMapping("/gadaylistByPage")
+    @ResponseBody
+    public AjaxResult gadaylistByPage(Tablepar tablepar,String wpId, String recorddate) {
+
+        Date tempDate=null;
+        if (StringUtils.isNotEmpty(recorddate))
+        {
+            tempDate=DateUtils.parseDate(recorddate);
+        }
+        PageInfo<Windturbineinfodaytop3> ls=windturbineinfodaytop3Service.gadaylistByPage(tablepar,wpId,tempDate);
+
+        return	AjaxResult.successData(AjaxStatus.success.code,ls);
+
+    }
+    /**按页查询等级评估月所有信息**/
+    @PostMapping("/gamonthlistByPage")
+    @ResponseBody
+    public AjaxResult gamonthlistByPage(Tablepar tablepar,String wpId, String year,String month) {
+
+
+        PageInfo<Windturbineinfodaytop3> ls=windturbineinfodaytop3Service.gamonthlistByPage(tablepar,wpId,year,month);
+
+        return	AjaxResult.successData(AjaxStatus.success.code,ls);
+
+    }
+    /**按页查询等级评估年所有信息**/
+    @PostMapping("/gayearlistByPage")
+    @ResponseBody
+    public AjaxResult gayearlistByPage(Tablepar tablepar,String wpId, String year) {
+
+
+        PageInfo<Windturbineinfodaytop3> ls=windturbineinfodaytop3Service.gayearlistByPage(tablepar,wpId,year);
+
+        return	AjaxResult.successData(AjaxStatus.success.code,ls);
+
+    }
+    /**按等级评估ID查询相应信息返回玫瑰图**/
+    @GetMapping("/wtchart")
+    @ResponseBody
+    public AjaxResult wtchart(String gaid) {
+
+
+        if (StringUtils.isNotEmpty(gaid))
+        {
+            List<ValueVo> ls=windturbineinfodaytop3Service.wtchart(gaid);
+
+            if( !ls.isEmpty())
+            {
+                return	AjaxResult.successData(AjaxStatus.success.code,ls);
+            }else
+            {
+                return	AjaxResult.successData(AjaxStatus.emptyresultset.code,ls);
+            }
+        }
+
+         return	AjaxResult.error(AjaxStatus.error.code,null);
+    }
+
+    /**按等级评估ID查询相应详细信息**/
+    @GetMapping("/wtinfo")
+    @ResponseBody
+    public AjaxResult wtinfo(String gaid) {
+
+
+        if (StringUtils.isNotEmpty(gaid))
+        {
+            Windturbineinfodaytop3 wtd=windturbineinfodaytop3Service.selectByPrimaryKey(gaid);
+
+            if( null!=wtd)
+            {
+                return	AjaxResult.successData(AjaxStatus.success.code,wtd);
+            }else
+            {
+                return	AjaxResult.successData(AjaxStatus.emptyresultset.code,wtd);
+            }
+        }
+
+        return	AjaxResult.error(AjaxStatus.error.code,null);
+    }
+}

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

@@ -0,0 +1,97 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.Windturbineinfodaytop3;
+import com.gyee.frame.model.auto.Windturbineinfodaytop3Example;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface Windturbineinfodaytop3Mapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    long countByExample(Windturbineinfodaytop3Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(Windturbineinfodaytop3Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    int insert(Windturbineinfodaytop3 record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    int insertSelective(Windturbineinfodaytop3 record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    List<Windturbineinfodaytop3> selectByExample(Windturbineinfodaytop3Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    Windturbineinfodaytop3 selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") Windturbineinfodaytop3 record, @Param("example") Windturbineinfodaytop3Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") Windturbineinfodaytop3 record, @Param("example") Windturbineinfodaytop3Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(Windturbineinfodaytop3 record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table windturbineinfodaytop3
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(Windturbineinfodaytop3 record);
+}

Разница между файлами не показана из-за своего большого размера
+ 2456 - 0
src/main/java/com/gyee/frame/model/auto/Windturbineinfodaytop3.java


Разница между файлами не показана из-за своего большого размера
+ 4794 - 0
src/main/java/com/gyee/frame/model/auto/Windturbineinfodaytop3Example.java


+ 70 - 0
src/main/java/com/gyee/frame/model/custom/ValueVo.java

@@ -0,0 +1,70 @@
+package com.gyee.frame.model.custom;
+
+public class ValueVo {
+	private String name;
+	private String value;
+	private Double data1;
+
+	private String warningId;
+	private String shutdowneventId;
+	private String wpId;
+	private String wtId;
+
+	public String getValue() {
+		return value;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Double getData1() {
+		return data1;
+	}
+
+	public void setData1(Double data1) {
+		this.data1 = data1;
+	}
+
+	public String getWarningId() {
+		return warningId;
+	}
+
+	public void setWarningId(String warningId) {
+		this.warningId = warningId;
+	}
+
+	public String getShutdowneventId() {
+		return shutdowneventId;
+	}
+
+	public void setShutdowneventId(String shutdowneventId) {
+		this.shutdowneventId = shutdowneventId;
+	}
+
+	public String getWpId() {
+		return wpId;
+	}
+
+	public void setWpId(String wpId) {
+		this.wpId = wpId;
+	}
+
+	public String getWtId() {
+		return wtId;
+	}
+
+	public void setWtId(String wtId) {
+		this.wtId = wtId;
+	}
+
+	
+}

+ 349 - 0
src/main/java/com/gyee/frame/service/Windturbineinfodaytop3Service.java

@@ -0,0 +1,349 @@
+package com.gyee.frame.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.Windturbineinfodaytop3Mapper;
+import com.gyee.frame.model.auto.Windturbineinfodaytop3;
+import com.gyee.frame.model.auto.Windturbineinfodaytop3Example;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.custom.ValueVo;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 风机信息表 Windturbineinfodaytop3Service
+ * @Title: Windturbineinfodaytop3Service.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-30 17:00:04  
+ **/
+@Service
+public class Windturbineinfodaytop3Service implements BaseService<Windturbineinfodaytop3, Windturbineinfodaytop3Example> {
+	@Resource
+	private Windturbineinfodaytop3Mapper windturbineinfodaytop3Mapper;
+
+
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param name
+	 * @return
+	 */
+	 public PageInfo<Windturbineinfodaytop3> list(Tablepar tablepar, String name){
+	        Windturbineinfodaytop3Example testExample=new Windturbineinfodaytop3Example();
+	        testExample.setOrderByClause("id ASC");
+	        if(name!=null&&!"".equals(name)){
+//	        	testExample.createCriteria().and.andCodeLike("%"+name+"%");
+	        }
+
+	        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+	        List<Windturbineinfodaytop3> list= windturbineinfodaytop3Mapper.selectByExample(testExample);
+	        PageInfo<Windturbineinfodaytop3> pageInfo = new PageInfo<Windturbineinfodaytop3>(list);
+	        return  pageInfo;
+	 }
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+
+			List<Integer> lista=Convert.toIntArrayList(ids);
+			Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
+			example.createCriteria().andIdIn(lista);
+			return windturbineinfodaytop3Mapper.deleteByExample(example);
+
+
+	}
+
+
+	@Override
+	public Windturbineinfodaytop3 selectByPrimaryKey(String id) {
+
+	 	if(StringUtils.isNotEmpty(id))
+		{
+			return windturbineinfodaytop3Mapper.selectByPrimaryKey(Integer.valueOf(id));
+
+		}
+	 	return new Windturbineinfodaytop3();
+
+	}
+
+
+	@Override
+	public int updateByPrimaryKeySelective(Windturbineinfodaytop3 record) {
+		return windturbineinfodaytop3Mapper.updateByPrimaryKeySelective(record);
+	}
+
+
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Windturbineinfodaytop3 record) {
+
+//		//添加雪花主键id
+//		record.setId(SnowflakeIdWorker.getUUID());
+
+
+		return windturbineinfodaytop3Mapper.insertSelective(record);
+	}
+
+
+	@Override
+	public int updateByExampleSelective(Windturbineinfodaytop3 record, Windturbineinfodaytop3Example example) {
+
+		return windturbineinfodaytop3Mapper.updateByExampleSelective(record, example);
+	}
+
+
+	@Override
+	public int updateByExample(Windturbineinfodaytop3 record, Windturbineinfodaytop3Example example) {
+
+		return windturbineinfodaytop3Mapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Windturbineinfodaytop3> selectByExample(Windturbineinfodaytop3Example example) {
+
+		return windturbineinfodaytop3Mapper.selectByExample(example);
+	}
+
+
+	@Override
+	public long countByExample(Windturbineinfodaytop3Example example) {
+
+		return windturbineinfodaytop3Mapper.countByExample(example);
+	}
+
+
+	@Override
+	public int deleteByExample(Windturbineinfodaytop3Example example) {
+
+		return windturbineinfodaytop3Mapper.deleteByExample(example);
+	}
+
+
+	public PageInfo<Windturbineinfodaytop3> gadaylistByPage(Tablepar tablepar,String wpId, Date recorddate)  {
+		List<Windturbineinfodaytop3> list=null;
+
+		Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
+		example.setOrderByClause("windturbineid ASC");
+
+		PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+
+		if(recorddate!=null &&  StringUtils.isNotEmpty(wpId)){
+
+
+			example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(1).andRecorddateGreaterThanOrEqualTo(recorddate).andRecorddateLessThan(DateUtils.addDays(recorddate,1));
+			list= windturbineinfodaytop3Mapper.selectByExample(example);
+		}else
+		{
+			list=new ArrayList<>();
+		}
+		PageInfo<Windturbineinfodaytop3> pageInfo = new PageInfo<Windturbineinfodaytop3>(list);
+
+		return pageInfo;
+	}
+
+
+	public PageInfo<Windturbineinfodaytop3> gamonthlistByPage(Tablepar tablepar,String wpId, String year,String month)  {
+		List<Windturbineinfodaytop3> list=null;
+
+		Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
+		example.setOrderByClause("windturbineid ASC");
+
+		PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+
+		if(StringUtils.isNotEmpty(year) && StringUtils.isNotEmpty(month) &&  StringUtils.isNotEmpty(wpId)){
+
+
+			example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(2).andYearEqualTo(Integer.valueOf(year)).andMonthEqualTo(Integer.valueOf(month));
+			list= windturbineinfodaytop3Mapper.selectByExample(example);
+		}else
+		{
+			list=new ArrayList<>();
+		}
+		PageInfo<Windturbineinfodaytop3> pageInfo = new PageInfo<Windturbineinfodaytop3>(list);
+
+		return pageInfo;
+	}
+
+
+	public PageInfo<Windturbineinfodaytop3> gayearlistByPage(Tablepar tablepar,String wpId,String year)  {
+		List<Windturbineinfodaytop3> list=null;
+
+		Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
+		example.setOrderByClause("windturbineid ASC");
+
+		PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+
+		if(StringUtils.isNotEmpty(wpId) &&  StringUtils.isNotEmpty(year)){
+
+
+			example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(3).andYearEqualTo(Integer.valueOf(year));
+			list= windturbineinfodaytop3Mapper.selectByExample(example);
+		}else
+		{
+			list=new ArrayList<>();
+		}
+		PageInfo<Windturbineinfodaytop3> pageInfo = new PageInfo<Windturbineinfodaytop3>(list);
+
+		return pageInfo;
+	}
+	/******************************************************************************************************************/
+	public List<Windturbineinfodaytop3> gadaylist(String wpId, Date recorddate)  {
+		List<Windturbineinfodaytop3> list=null;
+
+		Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
+		example.setOrderByClause("windturbineid ASC");
+
+		if(recorddate!=null &&  StringUtils.isNotEmpty(wpId)){
+
+
+			example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(1).andRecorddateGreaterThanOrEqualTo(recorddate).andRecorddateLessThan(DateUtils.addDays(recorddate,1));
+			list= windturbineinfodaytop3Mapper.selectByExample(example);
+		}else
+		{
+			list=new ArrayList<>();
+		}
+
+
+		return list;
+	}
+
+	public List<Windturbineinfodaytop3> gamonthlist(String wpId, String year,String month)  {
+		List<Windturbineinfodaytop3> list=null;
+
+		Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
+		example.setOrderByClause("windturbineid ASC");
+
+		if(StringUtils.isNotEmpty(year) && StringUtils.isNotEmpty(month) &&  StringUtils.isNotEmpty(wpId)){
+
+
+			example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(2).andYearEqualTo(Integer.valueOf(year)).andMonthEqualTo(Integer.valueOf(month));
+			list= windturbineinfodaytop3Mapper.selectByExample(example);
+		}else
+		{
+			list=new ArrayList<>();
+		}
+
+
+		return list;
+	}
+
+	public List<Windturbineinfodaytop3> gayearlist(String wpId, String year)  {
+		List<Windturbineinfodaytop3> list=null;
+
+		Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
+		example.setOrderByClause("windturbineid ASC");
+
+		if(StringUtils.isNotEmpty(wpId) &&  StringUtils.isNotEmpty(year)){
+
+
+			example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(3).andYearEqualTo(Integer.valueOf(year));
+			list= windturbineinfodaytop3Mapper.selectByExample(example);
+		}else
+		{
+			list=new ArrayList<>();
+		}
+
+
+		return list;
+	}
+	/******************************************************************************************************************/
+	public List<ValueVo> wtchart(String gaid) {
+
+
+		if (StringUtils.isNotEmpty(gaid)) {
+			List<ValueVo> vos = new ArrayList<ValueVo>();
+
+			Windturbineinfodaytop3 wtd = windturbineinfodaytop3Mapper.selectByPrimaryKey(Integer.valueOf(gaid));
+
+			for (int i = 0; i < 10; i++) {
+				ValueVo vo = new ValueVo();
+
+				switch (i) {
+					case 0:
+						// vo.setName("N("+winfo.getN4()+"/"+winfo.getN()+")");
+						vo.setName("平均切入风速");
+						// vo.setData1(wtd.getMonthxfqr());
+						vo.setData1(wtd.getYearxfqr());
+						break;
+					case 1:
+						// vo.setName("NNE("+winfo.getNne4()+"/"+winfo.getNne()+")");
+						vo.setName("性能损失电量");
+						// vo.setData1(wtd.getMonthxnssdl());
+						vo.setData1(wtd.getYearxnssdl());
+						break;
+					case 2:
+						// vo.setName("NE("+winfo.getNe4()+"/"+winfo.getNe()+")");
+						vo.setName("拟合优度");
+						// vo.setData1(wtd.getMonthnhyd());
+						vo.setData1(wtd.getYearnhyd());
+						break;
+					case 3:
+						// vo.setName("ENE("+winfo.getEne4()+"/"+winfo.getEne()+")");
+						vo.setName("功率一致性系数");
+						// vo.setData1(wtd.getMonthglyzxxs());
+						vo.setData1(wtd.getYearglyzxxs());
+						break;
+					case 4:
+						// vo.setName("E("+winfo.getE4()+"/"+winfo.getE()+")");
+						vo.setName("利用小时");
+						// vo.setData1(wtd.getMonthlyxs());
+						vo.setData1(wtd.getYearlyxs());
+						break;
+					case 5:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("设备可利用率");
+						// vo.setData1(wtd.getMonthsbklyl());
+						vo.setData1(wtd.getYearsbklyl());
+						break;
+					case 6:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("等效可利用系数");
+						// vo.setData1(wtd.getMonthdxkyxs());
+						vo.setData1(wtd.getYeardxkyxs());
+						break;
+					case 7:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("有效风时数");
+						// vo.setData1(wtd.getMonthyxfss());
+						vo.setData1(wtd.getYearyxfss());
+						break;
+					case 8:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("平均风速");
+						// vo.setData1(wtd.getMonthdxkyxs());
+						vo.setData1(wtd.getYeardxkyxs());
+						break;
+					case 9:
+						// vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+						vo.setName("静风频率");
+						// vo.setData1(wtd.getMonthdxkyxs());
+						vo.setData1(wtd.getYeardxkyxs());
+						break;
+					default:
+						break;
+				}
+
+				vos.add(vo);
+
+			}
+
+		return	vos;
+
+		}
+
+		return new ArrayList<>();
+	}
+
+	
+}

+ 7 - 7
src/main/resources/application-dev.yml

@@ -7,13 +7,13 @@ spring:
     druid:
      #主库数据源
      master:
-#        url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
-#        username: root
-#        password: 123456
-        url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd
-        username: nxfdprod
-        password: gdnxfd123
-        driver-class-name: oracle.jdbc.driver.OracleDriver
+        url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        username: root
+        password: 123456
+#        url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd
+#        username: nxfdprod
+#        password: gdnxfd123
+#        driver-class-name: oracle.jdbc.driver.OracleDriver
 
      #备数据源 #关闭
      slave:

+ 11 - 5
src/main/resources/mybatis-generator.xml

@@ -46,11 +46,17 @@
         </commentGenerator>
         <!-- 数据库链接地址账号密码 -->
         <jdbcConnection
-                driverClass="oracle.jdbc.driver.OracleDriver"
-                connectionURL="jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd"
-                userId="nxfdprod"
-                password="gdnxfd123">
+                driverClass="com.mysql.jdbc.Driver"
+                connectionURL="jdbc:mysql://localhost:3306/springbootv2?serverTimezone=UTC"
+                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="com.microsoft.sqlserver.jdbc.SQLServerDriver"-->
@@ -95,8 +101,8 @@
             <generatedKey column="id" sqlStatement="Mysql" identity="true"/>
         </table>-->
 
-        <table tableName='Windturbinepowercurvefitting' domainObjectName='Windturbinepowercurvefitting'/>
 
+        <table tableName='windturbineinfodaytop3' domainObjectName='Windturbineinfodaytop3'/>
 
     </context>
 </generatorConfiguration>

Разница между файлами не показана из-за своего большого размера
+ 1361 - 0
src/main/resources/mybatis/auto/Windturbineinfodaytop3Mapper.xml


+ 61 - 0
src/test/java/test/BenchmarkingTest.java

@@ -0,0 +1,61 @@
+package test;
+
+import com.github.pagehelper.PageInfo;
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.benchmarking.BenchmarkingController;
+import com.gyee.frame.model.auto.Windturbineinfodaytop3;
+import com.gyee.frame.model.custom.Tablepar;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Calendar;
+import java.util.Date;
+
+public class BenchmarkingTest {
+
+    @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";
+
+        BenchmarkingController dayBenchmarkingController= SpringUtils.getBean("dayBenchmarkingController");
+//
+//        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
+//
+//        List<Windturbineinfodaytop3> test=(List<Windturbineinfodaytop3>)ajaxResult.get("data");
+
+        Tablepar tablepar=new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+
+        AjaxResult ajaxResult = dayBenchmarkingController.gadaylistByPage(tablepar,wpid,"2021-01-01");
+
+        PageInfo<Windturbineinfodaytop3> test=(PageInfo<Windturbineinfodaytop3>)ajaxResult.get("data");
+        for(Windturbineinfodaytop3 wtd:test.getList())
+        {
+            System.out.println(wtd.getWindturbineid()+"----------------"+wtd.getDayfdl());
+        }
+        //System.out.println(test);
+    }
+
+
+
+
+}