Browse Source

数据导入

shilin 1 year ago
parent
commit
bbce9d2e5f

+ 11 - 0
web/gdsx-ghost/pom.xml

@@ -11,6 +11,17 @@
 
     <artifactId>gdsx-ghost</artifactId>
     <dependencies>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>3.2.0</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>

+ 172 - 4
web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ghost/GhostController.java

@@ -3,20 +3,34 @@ package com.gyee.ghost.controller.ghost;/*
 @date   2022/8/3-16:36
 */
 
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.common.config.R;
 import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
 import com.gyee.ghost.init.CacheContext;
 import com.gyee.ghost.model.auto.*;
+import com.gyee.ghost.model.auto.vo.FaultrecordCheckeVo;
+import com.gyee.ghost.model.auto.vo.FaultrecordVo;
 import com.gyee.ghost.service.auto.GhostService;
-import com.gyee.ghost.vo.FaultinputVo;
+import com.gyee.ghost.service.auto.IFaultrecordService;
+import com.gyee.ghost.service.auto.IWindturbineinfodayService;
+import com.gyee.ghost.util.realtimesource.ExcelUtils;
 import com.gyee.ghost.vo.InvolvedVo;
 import com.gyee.ghost.vo.NatureVo;
 import com.gyee.ghost.vo.WindturbineVo;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
-import java.util.List;
-import java.util.Map;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @RestController
@@ -25,7 +39,10 @@ public class GhostController {
 
     @Resource
     private GhostService ghostService;
-
+    @Resource
+    private IWindturbineinfodayService windturbineinfodayService;
+    @Resource
+    private IFaultrecordService faultrecordService;
     @GetMapping("/wplist")
     @ResponseBody
     @CrossOrigin(origins = "*", maxAge = 3600)
@@ -316,7 +333,158 @@ public class GhostController {
         }
     }
 
+    @GetMapping("/get-import-template")
+    @ApiOperation(value = "获得导入模板")
+    public void importTemplate(HttpServletResponse response) throws IOException, ParseException {
+        // 手动创建导出 demo
+
+        SimpleDateFormat sf= new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss");
+        List<FaultrecordVo> list = Arrays.asList(
+                FaultrecordVo.builder().wtname("").begindate(sf.parse("2023-09-09 00:00:00")).enddate(sf.parse("2023-09-09 00:03:00")).faulttype("").faultphenomenon("").defecteliminating("").processingresults("").faultduration(0.3).impactcapacity(0.3).type("").build(),
+
+                FaultrecordVo.builder().wtname("").enddate(sf.parse("2023-09-09 00:00:00")).enddate(sf.parse("2023-09-09 00:06:00")).faulttype("").faultphenomenon("").defecteliminating("").processingresults("").faultduration(0.5).impactcapacity(0.3).type("").build()
+
+        );
+
+        // 输出
+        ExcelUtils.write(response, "导入模板.xls", "导入模板", FaultrecordVo.class, list);
+    }
+
+    @PostMapping("/checking")
+    @ApiOperation(value = "验证", notes = "验证")
+    public R checking(@RequestParam("file") MultipartFile file) throws Exception {
+        List<FaultrecordVo> list = ExcelUtils.read(file, FaultrecordVo.class);
+        List<FaultrecordCheckeVo> vos = new ArrayList<>();
+        if (StringUtils.notEmp(list) && !list.isEmpty()) {
+            for (FaultrecordVo vo : list) {
+
+                FaultrecordCheckeVo po=new FaultrecordCheckeVo();
+                BeanUtil.copyProperties(vo, po);
+                if(!CacheContext.wtnamemap.containsKey(vo.getWtname()))
+                {
+
+                    StringBuilder sb=new StringBuilder();
+                    sb.append("风机名称错误——");
+                    sb.append(vo.getWtname());
+                    po.setChecke(false);
+                    po.setError(vo.getWtname());
+                }else if(StringUtils.empty(vo.getBegindate()))
+                {
+                    StringBuilder sb=new StringBuilder();
+                    sb.append("开始时间没有——");
+                    sb.append(vo.getBegindate());
+                    po.setChecke(false);
+                    po.setError(String.valueOf(vo.getBegindate()));
+
+                }else if(StringUtils.empty(vo.getEnddate()))
+                {
+                    StringBuilder sb=new StringBuilder();
+                    sb.append("结束时间没有——");
+                    sb.append(vo.getEnddate());
+                    po.setChecke(false);
+                    po.setError(String.valueOf(vo.getEnddate()));
+
+                }else
+                {
+                    po.setChecke(true);
+                }
+                vos.add(po);
+
+            }
+        }
+        if (StringUtils.isNotNull(vos)) {
+            return R.ok().data(vos);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    @PostMapping("/import")
+    @ApiOperation(value = "导入", notes = "导入")
+    public R importExcel(@RequestParam("file") MultipartFile file) throws Exception {
+        List<FaultrecordVo> list = ExcelUtils.read(file, FaultrecordVo.class);
+
+        if (StringUtils.notEmp(list) && !list.isEmpty()) {
+
+
+            Faultrecord po=new Faultrecord();
+            for (FaultrecordVo vo : list) {
+
+
+                BeanUtil.copyProperties(vo, po);
 
+                po.setId(StringUtils.getUUID());
+                if(CacheContext.wtnamemap.containsKey(vo.getWtname()))
+                {
+
+                    Windturbine wt=CacheContext.wtnamemap.get(vo.getWtname());
+                    po.setWtid(wt.getId());
+
+                    if(CacheContext.promap.containsKey(wt.getProjectid()))
+                    {
+                        Project pj=CacheContext.promap.get(wt.getProjectid());
+                        po.setProjectid(pj.getId());
+                        po.setProjectname(pj.getName());
+                    }
+
+                    if(CacheContext.wpmap.containsKey(wt.getWindpowerstationid()))
+                    {
+                        Windpowerstation wp=CacheContext.wpmap.get(wt.getWindpowerstationid());
+                        po.setWpid(wp.getId());
+                        po.setWpname(wp.getName());
+                    }
+
+                    if(StringUtils.notEmp(vo.getFaultduration()) && StringUtils.notEmp(vo.getBegindate()) && StringUtils.notEmp(vo.getEnddate()))
+                    {
+                      po.setFaultduration(DateUtils.hoursDiff1(vo.getBegindate(),vo.getEnddate()));
+
+
+                        List<Faultrecord> resultList = new ArrayList<>();
+
+                        Date begin =vo.getBegindate();
+
+
+                        QueryWrapper<Windturbineinfoday> windturbineinfodayQueryWrapper = new QueryWrapper<>();
+                        windturbineinfodayQueryWrapper.eq("recorddate",begin);
+                        List<Windturbineinfoday> windturbineinfodayList = windturbineinfodayService.list(windturbineinfodayQueryWrapper);
+
+                        Map<String,Windturbineinfoday> wtdaymap=new HashMap<>();
+                        if(!windturbineinfodayList.isEmpty())
+                        {
+                            for ( Windturbineinfoday wtday:windturbineinfodayList)
+                            {
+                                wtdaymap.put(wtday.getWindturbineid(),wtday);
+                            }
+                        }
+
+                        for(Faultrecord fr:resultList)
+                        {
+                            if(StringUtils.notEmp(fr.getFaultduration()))
+                            {
+                                double gzsc=fr.getFaultduration();
+
+                                if(wtdaymap.containsKey(fr.getWtid()))
+                                {
+                                    Windturbineinfoday wtday=wtdaymap.get(fr.getWtid());
+
+                                    double rfdl= wtday.getGeneratingcapacity();
+                                    double ssdl = new BigDecimal(rfdl).divide(new BigDecimal(24), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(gzsc)).doubleValue();
+                                    fr.setPowerloss(StringUtils.round(ssdl,2));
+
+                                    faultrecordService.saveOrUpdate(fr);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (StringUtils.isNotNull("ok")) {
+            return R.ok().data("ok");
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
 
     @GetMapping("/mainrecord")
     @ResponseBody

+ 3 - 4
web/gdsx-ghost/src/main/java/com/gyee/ghost/init/CacheContext.java

@@ -1,14 +1,10 @@
 package com.gyee.ghost.init;
 
 
-
 import com.gyee.common.model.StringUtils;
-import com.gyee.common.util.DateUtils;
 import com.gyee.ghost.model.auto.*;
 import com.gyee.ghost.service.RealtimeService;
 import com.gyee.ghost.service.auto.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.boot.CommandLineRunner;
 import org.springframework.stereotype.Component;
 
@@ -53,6 +49,7 @@ public class CacheContext implements CommandLineRunner {
     public static List<Windturbine> wtls = new ArrayList<>();
     public static List<Line> lines = new ArrayList<>();
     public static Map<String,Windturbine> wtmap = new HashMap<>();
+    public static Map<String,Windturbine> wtnamemap = new HashMap<>();
     public static Map<String,Project> promap = new HashMap<>();
     public static Map<String,Windpowerstation> wpmap = new HashMap<>();
     public static List<Windpowerstation> wpls = new ArrayList<>();
@@ -73,7 +70,9 @@ public class CacheContext implements CommandLineRunner {
 
         wtls = windturbineService.list();
         wtls.stream().forEach(wt->{
+
             wtmap.put(wt.getId(),wt);
+            wtnamemap.put(wt.getName(),wt);
             Double powerproduction = equipmentmodelList.stream().filter(e -> e.getId().equals(wt.getModelid())).findFirst().get().getPowerproduction();
             wtcap.put(wt.getId(),powerproduction);
         });

+ 23 - 18
web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/Faultrecord.java

@@ -1,10 +1,10 @@
 package com.gyee.ghost.model.auto;
 
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
+import lombok.*;
 
 import java.util.Date;
 
@@ -18,43 +18,48 @@ import java.util.Date;
  * @since 2022-08-29
  */
 @Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
 @EqualsAndHashCode(callSuper = true)
 public class Faultrecord extends Model {
 
     private static final long serialVersionUID = 1L;
     @TableId(value = "id",type = IdType.INPUT)
-    private String id;
 
+    @ExcelProperty("编号")
+    private String id;
+    @ExcelProperty("编号")
     private String projectid;
-
+    @ExcelProperty("编号")
     private String projectname;
-
+    @ExcelProperty("编号")
     private String wpid;
-
+    @ExcelProperty("场站名称")
     private String wpname;
-
+    @ExcelProperty("编号")
     private String wtid;
-
+    @ExcelProperty("编号")
     private String wtname;
-
+    @ExcelProperty("编号")
     private Date begindate;
-
+    @ExcelProperty("编号")
     private Date enddate;
-
+    @ExcelProperty("故障分类")
     private String faulttype;
-
+    @ExcelProperty("故障现象")
     private String faultphenomenon;
-
+    @ExcelProperty("编号")
     private String defecteliminating;
-
+    @ExcelProperty("编号")
     private String processingresults;
-
+    @ExcelProperty("编号")
     private Double powerloss;
-
+    @ExcelProperty("编号")
     private Double faultduration;
-
+    @ExcelProperty("编号")
     private Double impactcapacity;
-
+    @ExcelProperty("编号")
     private String type;
 
 

+ 52 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/vo/FaultrecordCheckeVo.java

@@ -0,0 +1,52 @@
+package com.gyee.ghost.model.auto.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.*;
+
+import java.util.Date;
+
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-08-29
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class FaultrecordCheckeVo extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @ExcelProperty("风机名称")
+    private String wtname;
+    @ExcelProperty("开始时间")
+    private Date begindate;
+    @ExcelProperty("结束时间")
+    private Date enddate;
+    @ExcelProperty("故障分类")
+    private String faulttype;
+    @ExcelProperty("故障现象")
+    private String faultphenomenon;
+    @ExcelProperty("消缺工艺")
+    private String defecteliminating;
+    @ExcelProperty("处理结果")
+    private String processingresults;
+    @ExcelProperty("故障时长")
+    private Double faultduration;
+    @ExcelProperty("时长影响容量")
+    private Double impactcapacity;
+    @ExcelProperty("内报/外报")
+    private String type;
+    @ExcelProperty("是否符合验证")
+    private Boolean checke;
+    @ExcelProperty("错误信息")
+    private String error;
+
+}

+ 49 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/vo/FaultrecordVo.java

@@ -0,0 +1,49 @@
+package com.gyee.ghost.model.auto.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.*;
+
+import java.util.Date;
+
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-08-29
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class FaultrecordVo extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @ExcelProperty("风机名称")
+    private String wtname;
+    @ExcelProperty("开始时间")
+    private Date begindate;
+    @ExcelProperty("结束时间")
+    private Date enddate;
+    @ExcelProperty("故障分类")
+    private String faulttype;
+    @ExcelProperty("故障现象")
+    private String faultphenomenon;
+    @ExcelProperty("消缺工艺")
+    private String defecteliminating;
+    @ExcelProperty("处理结果")
+    private String processingresults;
+    @ExcelProperty("故障时长")
+    private Double faultduration;
+    @ExcelProperty("时长影响容量")
+    private Double impactcapacity;
+    @ExcelProperty("内报/外报")
+    private String type;
+
+
+}

+ 68 - 10
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/GhostService.java

@@ -1,34 +1,29 @@
 package com.gyee.ghost.service.auto;
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 
-import com.google.common.collect.Lists;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.gyee.common.model.PointData;
 import com.gyee.common.model.StringUtils;
 import com.gyee.common.util.CommonUtils;
 import com.gyee.common.util.DateUtils;
 import com.gyee.common.util.DoubleUtils;
 import com.gyee.common.util.SortUtils;
-import com.gyee.common.vo.analysis.DeskObject;
-import com.gyee.ghost.config.ResultCode;
 import com.gyee.ghost.contant.Contant;
 import com.gyee.ghost.init.CacheContext;
 import com.gyee.ghost.model.auto.*;
 import com.gyee.ghost.util.realtimesource.ClassUtil;
 import com.gyee.ghost.util.realtimesource.IEdosUtil;
-import com.gyee.ghost.util.realtimesource.StringUtil;
 import com.gyee.ghost.vo.InitVo;
 import com.gyee.ghost.vo.InvolvedVo;
 import com.gyee.ghost.vo.NatureVo;
 import com.gyee.ghost.vo.WindturbineVo;
-import io.swagger.models.auth.In;
-import javafx.beans.binding.BooleanBinding;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
-import springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator;
 
 import javax.annotation.Resource;
-
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -63,6 +58,58 @@ public class GhostService {
     private IWindpowerinfodayService windpowerinfodayService;
     @Resource
     private IProjectService projectService;
+
+
+
+    /**
+     * 统计内报故障损失电量
+     */
+    public void saveFaultrecord(String day) throws ParseException {
+
+
+        SimpleDateFormat sf= new SimpleDateFormat( "yyyy-MM-dd");
+        List<Faultrecord> resultList = new ArrayList<>();
+        Date begin =sf.parse(day);
+        Date end = DateUtils.addDays(begin,1);
+        QueryWrapper<Faultrecord> listQw = new QueryWrapper<>();
+        listQw.ge("begindate",begin);
+        listQw.le("begindate",end);
+        resultList=faultrecordService.list(listQw);
+
+
+        QueryWrapper<Windturbineinfoday> windturbineinfodayQueryWrapper = new QueryWrapper<>();
+        windturbineinfodayQueryWrapper.eq("recorddate",begin);
+        List<Windturbineinfoday> windturbineinfodayList = windturbineinfodayService.list(windturbineinfodayQueryWrapper);
+
+        Map<String,Windturbineinfoday> wtdaymap=new HashMap<>();
+        if(!windturbineinfodayList.isEmpty())
+        {
+            for ( Windturbineinfoday wtday:windturbineinfodayList)
+            {
+                wtdaymap.put(wtday.getWindturbineid(),wtday);
+            }
+        }
+
+        for(Faultrecord fr:resultList)
+        {
+            if(StringUtils.notEmp(fr.getFaultduration()))
+            {
+                double gzsc=fr.getFaultduration();
+
+                if(wtdaymap.containsKey(fr.getWtid()))
+                {
+                    Windturbineinfoday wtday=wtdaymap.get(fr.getWtid());
+
+                   double rfdl= wtday.getGeneratingcapacity();
+                   double ssdl = new BigDecimal(rfdl).divide(new BigDecimal(24), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(gzsc)).doubleValue();
+                   fr.setPowerloss(StringUtils.round(ssdl,2));
+
+                    faultrecordService.saveOrUpdate(fr);
+                }
+            }
+        }
+
+    }
     /**
      * 存储fanoperation运行分析表
      */
@@ -431,6 +478,17 @@ public class GhostService {
         return volist;
     }
 
+    public List<Faultrecord> faultrecordlist( String wtid , Long begin, Long end) {
+        QueryWrapper<Faultrecord> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(wtid)){
+            qw.eq("wtid",wtid);
+        }
+        qw.eq("type","内报");
+        qw.ge("begindate",DateUtils.parseLongToDate(begin)).le("enddate",DateUtils.parseLongToDate(end));
+        List<Faultrecord> faultrecordList = faultrecordService.list(qw);
+
+        return faultrecordList;
+    }
     public List<Faultrecord> faultrecordlist(String wpid, String wtid, String faulttype, Long begin, Long end, String type) {
         QueryWrapper<Faultrecord> qw = new QueryWrapper<>();
 

+ 15 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/task/SaticScheduleTask.java

@@ -25,6 +25,21 @@ public class SaticScheduleTask {
     @Resource
     private RealtimeService realtimeService;
 
+
+    /**
+     * 统计内报故障损失电量
+     */
+    @Scheduled(cron = "0 50 0 * * ?")
+    //或直接指定时间间隔,例如:5秒
+    //@Scheduled(fixedRate=5000)
+    private void saveFaultrecord() {
+        String yesterday = DateUtils.getYesterdayStr("yyyy-MM-dd");
+        try {
+            ghostService.saveFaultrecord(yesterday);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
     /**
      * 风电统计分析
      */

+ 48 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/util/realtimesource/ExcelUtils.java

@@ -0,0 +1,48 @@
+package com.gyee.ghost.util.realtimesource;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.List;
+
+/**
+ * Excel 工具类
+ *
+ * @author 芋道源码
+ */
+public class ExcelUtils {
+
+    /**
+     * 将列表以 Excel 响应给前端
+     *
+     * @param response  响应
+     * @param filename  文件名
+     * @param sheetName Excel sheet 名
+     * @param head      Excel head 头
+     * @param data      数据列表哦
+     * @param <T>       泛型,保证 head 和 data 类型的一致性
+     * @throws IOException 写入失败的情况
+     */
+    public static <T> void write(HttpServletResponse response, String filename, String sheetName,
+                                 Class<T> head, List<T> data) throws IOException {
+        // 输出 Excel
+        EasyExcel.write(response.getOutputStream(), head)
+                .autoCloseStream(false) // 不要自动关闭,交给 Servlet 自己处理
+                .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // 基于 column 长度,自动适配。最大 255 宽度
+                .sheet(sheetName).doWrite(data);
+        // 设置 header 和 contentType。写在最后的原因是,避免报错时,响应 contentType 已经被修改了
+        response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8"));
+        response.setContentType("application/vnd.ms-excel;charset=UTF-8");
+    }
+
+    public static <T> List<T> read(MultipartFile file, Class<T> head) throws IOException {
+        return EasyExcel.read(file.getInputStream(), head, null)
+                .autoCloseStream(false)  // 不要自动关闭,交给 Servlet 自己处理
+                .doReadAllSync();
+    }
+
+}

+ 7 - 7
web/gdsx-ghost/src/main/java/com/gyee/ghost/util/realtimesource/MongoEdosUtil.java

@@ -59,7 +59,7 @@
 //    public List<PointData> getHistoryDatasSnap(Windpowerstationtestingpoint point, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
 //        Optional<String> tagName = Optional.ofNullable(point.getCode());
 //        Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationid());
-//        Optional<String> thingType = Optional.ofNullable(point.getModelid());
+//        Optional<String> thingType = Optional.ofNullable(point.getModelId());
 //        Optional<String> uniformCode = Optional.ofNullable(point.getUniformcode());
 //        Optional<Long> startTs = Optional.ofNullable(beginDate);
 //        Optional<Long> endTs = Optional.ofNullable(endDate);
@@ -108,7 +108,7 @@
 //    public List<PointData> getHistoryDatasRaw(Windpowerstationtestingpoint point, Long beginDate, Long endDate) throws Exception {
 //        Optional<String> tagName = Optional.ofNullable(point.getCode());
 //        Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationid());
-//        Optional<String> thingType = Optional.ofNullable(point.getModelid());
+//        Optional<String> thingType = Optional.ofNullable(point.getModelId());
 //        Optional<String> uniformCode = Optional.ofNullable(point.getUniformcode());
 //        Optional<Long> startTs = Optional.ofNullable(beginDate);
 //        Optional<Long> endTs = Optional.ofNullable(endDate);
@@ -142,7 +142,7 @@
 //    @Override
 //    public PointData getRealData(Windturbinetestingpointai point) throws Exception {
 //        Optional<String> keys = Optional.ofNullable(point.getId());
-//        Optional<String> thingType = Optional.ofNullable(point.getModelid());
+//        Optional<String> thingType = Optional.ofNullable(point.getModelId());
 //        Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationid());
 //        Optional<String> uniformCodes = Optional.ofNullable(point.getUniformcode());
 //
@@ -172,7 +172,7 @@
 //
 //        Optional<String> tagName = Optional.ofNullable(point.getId());
 //        Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationid());
-//        Optional<String> thingType = Optional.ofNullable(point.getModelid());
+//        Optional<String> thingType = Optional.ofNullable(point.getModelId());
 //        Optional<String> uniformCode = Optional.ofNullable(point.getUniformcode());
 //        Optional<Long> startTs = Optional.ofNullable(beginDate);
 //        Optional<Long> endTs = Optional.ofNullable(endDate);
@@ -213,7 +213,7 @@
 //    public List<PointData> getHistoryDatasRaw(Windturbinetestingpointai point, Long beginDate, Long endDate) throws Exception {
 //        Optional<String> tagName = Optional.ofNullable(point.getId());
 //        Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationid());
-//        Optional<String> thingType = Optional.ofNullable(point.getModelid());
+//        Optional<String> thingType = Optional.ofNullable(point.getModelId());
 //        Optional<String> uniformCode = Optional.ofNullable(point.getUniformcode());
 //        Optional<Long> startTs = Optional.ofNullable(beginDate);
 //        Optional<Long> endTs = Optional.ofNullable(endDate);
@@ -407,7 +407,7 @@
 //    public List<PointData> getHistStat(Windturbinetestingpointai point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
 //        Optional<String> tagName = Optional.ofNullable(point.getId());
 //        Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationid());
-//        Optional<String> thingType = Optional.ofNullable(point.getModelid());
+//        Optional<String> thingType = Optional.ofNullable(point.getModelId());
 //        Optional<String> uniformCode = Optional.ofNullable(point.getUniformcode());
 //        Optional<Long> startTs = Optional.ofNullable(beginDate);
 //        Optional<Long> endTs = Optional.ofNullable(endDate);
@@ -449,7 +449,7 @@
 //    public List<PointData> getHistStat(Windpowerstationtestingpoint point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception {
 //        Optional<String> tagName = Optional.ofNullable(point.getCode());
 //        Optional<String> thingId = Optional.ofNullable(point.getWindpowerstationid());
-//        Optional<String> thingType = Optional.ofNullable(point.getModelid());
+//        Optional<String> thingType = Optional.ofNullable(point.getModelId());
 //        Optional<String> uniformCode = Optional.ofNullable(point.getUniformcode());
 //        Optional<Long> startTs = Optional.ofNullable(beginDate * 1000);
 //        Optional<Long> endTs = Optional.ofNullable(endDate * 1000);