Pārlūkot izejas kodu

经济运行首页和风机分析的设备利用小时

xushili 1 gadu atpakaļ
vecāks
revīzija
7ef1d7a565

+ 10 - 3
src/main/java/com/gyee/frame/common/spring/ConstantTR.java

@@ -314,11 +314,18 @@ public class ConstantTR {
 	/******************************************** 宣和风电场 *****************************************/
 
 	/******************************************** 海子井风电场 *****************************************/
-	public static final String HZJWD = "HZJGGL.NX_GD_HZJG_YC_P1_L1_001_QXZ005"; // 海子井测风塔温度
-	public static final String HZJPJFS = "HZJGGL.NX_GD_HZJG_YC_P1_L1_001_QXZ001"; // 海子井光照强度
-	public static final String HZJGL = "HZJDQ.NX_GD_HZJG_DQ_P1_L1_001_AI0052";//海子井功率(5号主变高压侧)
+	public static final String HZJWD = "AKDQ.NX_GD_AKG_DQ_P1_L1_001_AI0161"; // 海子井测风塔温度
+	public static final String HZJPJFS = "AKDQ.NX_GD_AKG_DQ_P1_L1_001_AI0157"; // 海子井光照强度
+	public static final String HZJGL = "AKDQ.NX_GD_AKG_DQ_P1_L1_001_AI0139";//海子井功率(5号主变高压侧)
 	/******************************************** 海子井风电场 *****************************************/
 
+
+	/******************************************** 艾肯风电场 *****************************************/
+	public static final String AKWD = "HZJGGL.NX_GD_HZJG_YC_P1_L1_001_QXZ005"; // 海子井测风塔温度
+	public static final String AKPJFS = "HZJGGL.NX_GD_HZJG_YC_P1_L1_001_QXZ001"; // 海子井光照强度
+	public static final String AKGL = "HZJDQ.NX_GD_HZJG_DQ_P1_L1_001_AI0052";//海子井功率(5号主变高压侧)
+	/******************************************** 艾肯风电场 *****************************************/
+
 	/******************************************** 香山风电场 *****************************************/
 	public static final String XSRFDL = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0088"; // 香山日发电量
 	public static final String XSYFDL = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0146"; // 香山月发电量

+ 2 - 1
src/main/java/com/gyee/frame/common/spring/WpEnum.java

@@ -11,7 +11,8 @@ public  enum  WpEnum {
     PL_GDC("PL_GDC"),
     XH_GDC("XH_GDC"),
     MCH_GDC("MCH_GDC"),
-    HZJ_GDC("HZJ_GDC");
+    HZJ_GDC("HZJ_GDC"),
+    AK_GDC("AK_GDC");
 
     public String id;
     WpEnum(final  String c) {

+ 15 - 9
src/main/java/com/gyee/frame/controller/singleanalysis/SingleAnalysisController.java

@@ -5,6 +5,7 @@ import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.model.custom.SingleAnalysisVo;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.service.singleanalysis.SingleAnalysisService;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -30,8 +31,6 @@ public class SingleAnalysisController {
      * 单机信息总览首页
      * @param tablepar
      * @param wpId
-     * @param year
-     * @param month
      * @return
      * @throws Exception
      */
@@ -41,16 +40,16 @@ public class SingleAnalysisController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "tablepar", value = "分页对象", required = true, dataType = "Tablepar", paramType = "query"),
             @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
-            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
-            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+            @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
 
-    public AjaxResult singleanalysisMain(Tablepar tablepar, String wpId, String year, String month) throws Exception {
+    public AjaxResult singleanalysisMain(Tablepar tablepar, String wpId, String beginDate, String endDate) throws Exception {
 
         List<SingleAnalysisVo> vos =new ArrayList<>();
 
-        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
 
-            Calendar cal = Calendar.getInstance();
+            /*Calendar cal = Calendar.getInstance();
             cal.set(Calendar.HOUR_OF_DAY, 0);
             cal.set(Calendar.MINUTE, 0);
             cal.set(Calendar.SECOND, 0);
@@ -61,9 +60,16 @@ public class SingleAnalysisController {
             cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
             Date beginDate = cal.getTime();
             cal.add(Calendar.MONTH, 1);
-            Date endDate = cal.getTime();
+            Date endDate = cal.getTime();*/
+            Date date1 = DateUtils.parseDate(beginDate);
+            Date date2 = DateUtils.parseDate(endDate);
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(date2);
+            cal.add(Calendar.DATE, 1);
+            cal.add(Calendar.MILLISECOND, -1);
+            date2 = cal.getTime();
 
-            vos =singleAnalysisService.SingleAnalysisList(tablepar, wpId,beginDate,endDate);
+            vos =singleAnalysisService.SingleAnalysisList(tablepar, wpId,date1,date2);
 
         }