Browse Source

值际对标功能修改

shilin 4 years ago
parent
commit
c32b58c68c

+ 2 - 2
src/main/java/com/gyee/frame/controller/contrast/ContrastController.java

@@ -397,8 +397,8 @@ public class ContrastController {
             for (ConditionVo ct : ctvos) {
 
                 String wpId = ct.getWpId();
-                String beginDate = DateUtils.format(ct.getBeginDate());
-                String endDate =DateUtils.format(ct.getEndDate());
+                String beginDate = ct.getBeginDate();
+                String endDate =ct.getEndDate();
 
                 bmmap=contrastWtService.benchmarkZjInWtList(wpId,null,beginDate,endDate);
             }

+ 2 - 1
src/main/java/com/gyee/frame/controller/goodness/WindturbineDetailLineChartController.java

@@ -1,5 +1,6 @@
 package com.gyee.frame.controller.goodness;
 
+import com.alibaba.fastjson.JSONArray;
 import com.github.pagehelper.PageInfo;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
@@ -90,7 +91,7 @@ public class WindturbineDetailLineChartController {
         List<List<EchartDataVo>> result = windturbinegoodnessService.getplotBands(wtId, date);
 
 //
-//        System.out.println( JSONArray.toJSON(result));
+       System.out.println( JSONArray.toJSON(result));
 
         if (result != null) {
             return AjaxResult.successData(AjaxStatus.success.code, result);

+ 6 - 6
src/main/java/com/gyee/frame/controller/powercompare/PowerCompareController.java

@@ -369,8 +369,8 @@ public class PowerCompareController {
                 {
                     Map<String,Object> data=new LinkedHashMap<>();
                     data.put("yAxis",i);
-                    data.put("xAxis",xAxis+10);
-                    data.put("symbolSize",18);
+                    data.put("xAxis",xAxis);
+                    data.put("symbolSize",1);
                     data.put("symbol","circle");
 
                     Map<String,Object> itemStyle=new LinkedHashMap<>();
@@ -386,7 +386,7 @@ public class PowerCompareController {
                     normal2.put("position","right");
                     normal2.put("distance",12);
                     normal2.put("show",true);
-                    normal2.put("formatter","风能利用率"+wi.getLyl());
+                    normal2.put("formatter","利用率"+wi.getLyl());
 
                     label.put("normal",normal2);
                     data.put("label",label);
@@ -462,8 +462,8 @@ public class PowerCompareController {
                 {
                     Map<String,Object> data=new LinkedHashMap<>();
                     data.put("yAxis",i);
-                    data.put("xAxis",xAxis+10);
-                    data.put("symbolSize",18);
+                    data.put("xAxis",xAxis);
+                    data.put("symbolSize",1);
                     data.put("symbol","circle");
 
                     Map<String,Object> itemStyle=new LinkedHashMap<>();
@@ -479,7 +479,7 @@ public class PowerCompareController {
                     normal2.put("position","right");
                     normal2.put("distance",12);
                     normal2.put("show",true);
-                    normal2.put("formatter","风能利用率"+wi.getLyl());
+                    normal2.put("formatter","利用率"+wi.getLyl());
 
                     label.put("normal",normal2);
                     data.put("label",label);

+ 6 - 8
src/main/java/com/gyee/frame/model/custom/ConditionVo.java

@@ -1,11 +1,9 @@
 package com.gyee.frame.model.custom;
 
-import java.util.Date;
-
 public class ConditionVo {
 
-	private Date beginDate;
-	private Date endDate;
+	private String beginDate;
+	private String endDate;
 	String wpId;
 
 	public String getWpId() {
@@ -14,16 +12,16 @@ public class ConditionVo {
 	public void setWpId(String wpId) {
 		this.wpId = wpId;
 	}
-	public Date getBeginDate() {
+	public String getBeginDate() {
 		return beginDate;
 	}
-	public void setBeginDate(Date beginDate) {
+	public void setBeginDate(String beginDate) {
 		this.beginDate = beginDate;
 	}
-	public Date getEndDate() {
+	public String getEndDate() {
 		return endDate;
 	}
-	public void setEndDate(Date endDate) {
+	public void setEndDate(String endDate) {
 		this.endDate = endDate;
 	}
 	

+ 4 - 4
src/main/java/com/gyee/frame/service/contrast/ContrastZjService.java

@@ -106,8 +106,8 @@ public class ContrastZjService {
                     }
 
                     ConditionVo vo = new ConditionVo();
-                    vo.setBeginDate(beginDate);
-                    vo.setEndDate(endDate);
+                    vo.setBeginDate(DateUtils.format(beginDate,"yyyy-MM-dd"));
+                    vo.setEndDate(DateUtils.format(endDate,"yyyy-MM-dd"));
                     vo.setWpId(wpId);
 
 
@@ -174,8 +174,8 @@ public class ContrastZjService {
                         break;
                 }
                 ConditionVo vo = new ConditionVo();
-                vo.setBeginDate(beginDate);
-                vo.setEndDate(endDate);
+                vo.setBeginDate(DateUtils.format(beginDate,"yyyy-MM-dd"));
+                vo.setEndDate(DateUtils.format(endDate,"yyyy-MM-dd"));
                 vo.setWpId(wpId);
 
 

+ 14 - 0
src/main/java/com/gyee/frame/service/goodness/WindturbinegoodnessService.java

@@ -300,6 +300,20 @@ public class WindturbinegoodnessService {
                                     vo.setItemStyle(item);
                                     vos.add(vo);
                                 }
+                            }else if(i==fjztls.size()-1)
+                            {
+                                zt = zttemp;
+                                c = Calendar.getInstance();
+                                c.setTime(resultDate);
+//                                c.add(Calendar.MINUTE, -6);
+                                endTime = sdf.format(c.getTime());
+                                time=sdf2.format(c.getTime());
+
+                                vos.get(0).setTime2(time);
+                                EchartDataVo vo = new EchartDataVo();
+                                vo.setxAxis(endTime);
+                                vos.add(vo);
+                                resultvos.add(vos);
                             }
 
                         }

+ 6 - 6
src/main/resources/mybatis/auto/WindTurbineInfoDayMapper.xml

@@ -2,12 +2,12 @@
 <!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.WindTurbineInfoDayMapper">
 <!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
-<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
-<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
-<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
-<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
-<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
-<!--  </cache>-->
+  <!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+  <!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+  <!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+  <!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+  <!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+  <!--  </cache>-->
    <!--<cache type="com.gyee.frame.common.cache.MybatisRedisCache"/>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.WindTurbineInfoDay">
     <!--