Browse Source

太旗电量录入功能,但由于之前代码版本问题,没法部署

xieshengjie 2 years ago
parent
commit
842bd330a9

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/WindpowerinfodayController.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2023-02-19
+ */
+@RestController
+@RequestMapping("//windpowerinfoday")
+public class WindpowerinfodayController {
+
+}

+ 41 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ghost/GhostController.java

@@ -472,6 +472,47 @@ public class GhostController {
     }
 
 
+    @GetMapping("/windpowerinfoddy")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R findWindpowerinfoddy(@RequestParam(value = "date",required = true)String date) throws Exception {
+        List<Windpowerinfoday> resultList = ghostService.findWindpowerinfoddy(date);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok().data(resultList);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    @PutMapping("/windpowerinfoddy")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R updateWindpowerinfoddy(@RequestBody Windpowerinfoday windpowerinfoday) throws Exception {
+        boolean b = ghostService.updateWindpowerinfoddy(windpowerinfoday);
+        if (StringUtils.isNotNull(b)) {
+            return R.ok().data(b);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    @GetMapping("/prolist")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R projects() throws Exception {
+        List<Project> resultList = ghostService.projects();
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok().data(resultList);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+
+
+
+
+
 
 
 

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/mapper/auto/WindpowerinfodayMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.mapper.auto;
+
+import com.gyee.ghost.model.auto.Windpowerinfoday;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2023-02-19
+ */
+public interface WindpowerinfodayMapper extends BaseMapper<Windpowerinfoday> {
+
+}

+ 308 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/Windpowerinfoday.java

@@ -0,0 +1,308 @@
+package com.gyee.ghost.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2023-02-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Windpowerinfoday extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private BigDecimal id;
+
+    @TableField("FOREIGNKEYID")
+    private String foreignkeyid;
+
+    @TableField("RUNHOURS")
+    private BigDecimal runhours;
+
+    @TableField("STOPHOURS")
+    private BigDecimal stophours;
+
+    @TableField("FAULTHOURS")
+    private BigDecimal faulthours;
+
+    @TableField("MAINTAINHOURS")
+    private BigDecimal maintainhours;
+
+    @TableField("INTERRUPTHOURS")
+    private BigDecimal interrupthours;
+
+    @TableField("GENERATINGCAPACITY")
+    private BigDecimal generatingcapacity;
+
+    @TableField("SPEED")
+    private BigDecimal speed;
+
+    @TableField("POWER")
+    private BigDecimal power;
+
+    @TableField("RECORDDATE")
+    private LocalDate recorddate;
+
+    @TableField("GRIDELECTRICITY")
+    private BigDecimal gridelectricity;
+
+    @TableField("BUYELECTRICITY")
+    private BigDecimal buyelectricity;
+
+    @TableField("INSTOP")
+    private BigDecimal instop;
+
+    @TableField("OUTSTOP")
+    private BigDecimal outstop;
+
+    @TableField("RUNTIME")
+    private BigDecimal runtime;
+
+    @TableField("STOPTIME")
+    private BigDecimal stoptime;
+
+    @TableField("FAULTTIME")
+    private BigDecimal faulttime;
+
+    @TableField("MAINTAINTIME")
+    private BigDecimal maintaintime;
+
+    @TableField("INTERRUPTTIME")
+    private BigDecimal interrupttime;
+
+    @TableField("MONTHGC")
+    private BigDecimal monthgc;
+
+    @TableField("YEARGC")
+    private BigDecimal yeargc;
+
+    @TableField("THEORYGENERATION")
+    private BigDecimal theorygeneration;
+
+    @TableField("LOSSOFPOWER")
+    private BigDecimal lossofpower;
+
+    @TableField("FIELDELECTRICITY")
+    private BigDecimal fieldelectricity;
+
+    @TableField("GENERATINGCAPACITY2")
+    private BigDecimal generatingcapacity2;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("PROJECTID")
+    private String projectid;
+
+    @TableField("LINEID")
+    private String lineid;
+
+    @TableField("LOCATION")
+    private String location;
+
+    @TableField("BUYAGRICULTUREELECTRICITY")
+    private BigDecimal buyagricultureelectricity;
+
+    @TableField("MONTHGC2")
+    private BigDecimal monthgc2;
+
+    @TableField("YEARGC2")
+    private BigDecimal yeargc2;
+
+    @TableField("SPEED2")
+    private BigDecimal speed2;
+
+    @TableField("MAXSPEED")
+    private BigDecimal maxspeed;
+
+    @TableField("MINSPEED")
+    private BigDecimal minspeed;
+
+    @TableField("LIMITPOWER")
+    private BigDecimal limitpower;
+
+    @TableField("TOTALGC")
+    private BigDecimal totalgc;
+
+    @TableField("TOTALGC2")
+    private BigDecimal totalgc2;
+
+    @TableField("THEORYGENERATIONZS")
+    private BigDecimal theorygenerationzs;
+
+    @TableField("WINDHOURS")
+    private BigDecimal windhours;
+
+    @TableField("MAXPOWER")
+    private BigDecimal maxpower;
+
+    @TableField("MINPOWER")
+    private BigDecimal minpower;
+
+    @TableField("MONTHGE")
+    private BigDecimal monthge;
+
+    @TableField("YEARGE")
+    private BigDecimal yearge;
+
+    @TableField("MONTHBE")
+    private BigDecimal monthbe;
+
+    @TableField("YEARBE")
+    private BigDecimal yearbe;
+
+    @TableField("MONTHAE")
+    private BigDecimal monthae;
+
+    @TableField("YEARAE")
+    private BigDecimal yearae;
+
+    @TableField("GENERATINGCAPACITY4")
+    private BigDecimal generatingcapacity4;
+
+    @TableField("GRIDELECTRICITY4")
+    private BigDecimal gridelectricity4;
+
+    @TableField("BUYELECTRICITY4")
+    private BigDecimal buyelectricity4;
+
+    @TableField("BUYAGRICULTUREELECTRICITY4")
+    private BigDecimal buyagricultureelectricity4;
+
+    @TableField("DAYLYXS")
+    private BigDecimal daylyxs;
+
+    @TableField("MONTHLYXS")
+    private BigDecimal monthlyxs;
+
+    @TableField("YEARLYXS")
+    private BigDecimal yearlyxs;
+
+    @TableField("DAYZHCYDL")
+    private BigDecimal dayzhcydl;
+
+    @TableField("MONTHZHCYDL")
+    private BigDecimal monthzhcydl;
+
+    @TableField("YEARZHCYDL")
+    private BigDecimal yearzhcydl;
+
+    @TableField("DAYSBKLYL")
+    private BigDecimal daysbklyl;
+
+    @TableField("MONTHSBKLYL")
+    private BigDecimal monthsbklyl;
+
+    @TableField("YEARSBKLYL")
+    private BigDecimal yearsbklyl;
+
+    @TableField("DAYDXKYXS")
+    private BigDecimal daydxkyxs;
+
+    @TableField("MONTHDXKYXS")
+    private BigDecimal monthdxkyxs;
+
+    @TableField("YEARDXKYXS")
+    private BigDecimal yeardxkyxs;
+
+    @TableField("MONTHSPEED")
+    private BigDecimal monthspeed;
+
+    @TableField("YEARSPEED")
+    private BigDecimal yearspeed;
+
+    @TableField("MONTHRUNTIME")
+    private BigDecimal monthruntime;
+
+    @TableField("MONHTSTOPTIME")
+    private BigDecimal monhtstoptime;
+
+    @TableField("MONTHFAULTTIME")
+    private BigDecimal monthfaulttime;
+
+    @TableField("MONTHMAINTAINTIME")
+    private BigDecimal monthmaintaintime;
+
+    @TableField("MONTHINTERRUPTTIME")
+    private BigDecimal monthinterrupttime;
+
+    @TableField("YEARRUNTIME")
+    private BigDecimal yearruntime;
+
+    @TableField("YEARSTOPTIME")
+    private BigDecimal yearstoptime;
+
+    @TableField("YEARFAULTTIME")
+    private BigDecimal yearfaulttime;
+
+    @TableField("YEARMAINTAINTIME")
+    private BigDecimal yearmaintaintime;
+
+    @TableField("YEARINTERRUPTTIME")
+    private BigDecimal yearinterrupttime;
+
+    @TableField("DAYCALENDARHOURS")
+    private BigDecimal daycalendarhours;
+
+    @TableField("MONTHCALENDARHOURS")
+    private BigDecimal monthcalendarhours;
+
+    @TableField("YEARCALENDARHOURS")
+    private BigDecimal yearcalendarhours;
+
+    @TableField("LOSSOFPOWER1")
+    private BigDecimal lossofpower1;
+
+    @TableField("LOSSOFPOWER2")
+    private BigDecimal lossofpower2;
+
+    @TableField("LOSSOFPOWER3")
+    private BigDecimal lossofpower3;
+
+    @TableField("LOSSOFPOWER4")
+    private BigDecimal lossofpower4;
+
+    @TableField("MONTHWINDHOURS")
+    private BigDecimal monthwindhours;
+
+    @TableField("YEARWINDHOURS")
+    private BigDecimal yearwindhours;
+
+    @TableField("BROWNOUTSTIME")
+    private BigDecimal brownoutstime;
+
+    @TableField("MONTHBROWNOUTSTIME")
+    private BigDecimal monthbrownoutstime;
+
+    @TableField("YEARBROWNOUTSTIME")
+    private BigDecimal yearbrownoutstime;
+
+    @TableField("MAINLOSSIN")
+    private BigDecimal mainlossin;
+
+    @TableField("FAULTLOSSIN")
+    private BigDecimal faultlossin;
+
+    @TableField("ELECTRICLOSSOUT")
+    private BigDecimal electriclossout;
+
+    @TableField("WEATHERLOSSOUT")
+    private BigDecimal weatherlossout;
+
+    @TableField("TEST1")
+    private BigDecimal test1;
+
+
+}

+ 25 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/GhostService.java

@@ -59,6 +59,10 @@ public class GhostService {
     private IInvolvedService involvedService;
     @Resource
     private IInvolvedstatusService involvedstatusService;
+    @Resource
+    private IWindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private IProjectService projectService;
     /**
      * 存储fanoperation运行分析表
      */
@@ -628,6 +632,27 @@ public class GhostService {
         return list;
     }
 
+    public List<Windpowerinfoday> findWindpowerinfoddy(String date) {
+        QueryWrapper<Windpowerinfoday> qw = new QueryWrapper<>();
+        Date date1 = DateUtils.parseDate(date);
+        qw.eq("windpowerstationid","WNS_FDC");
+        qw.in("location","project","windpower");
+        qw.eq("recorddate",date1);
+        List<Windpowerinfoday> list = windpowerinfodayService.list(qw);
+        return list;
+    }
+
+    public boolean updateWindpowerinfoddy(Windpowerinfoday windpowerinfoday) {
+        boolean b = windpowerinfodayService.saveOrUpdate(windpowerinfoday);
+        return b;
+    }
+
+    public List<Project> projects() {
+        List<Project> list = projectService.list();
+        return list;
+    }
+
+
 
 //    public List<Shutdownevent> stoplist(String wpid, String wtid, String stoptypeid, Long begin, Long end, Integer type) {
 //        Date begindate = DateUtils.parseLongToDate(begin);

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/IWindpowerinfodayService.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.service.auto;
+
+import com.gyee.ghost.model.auto.Windpowerinfoday;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2023-02-19
+ */
+public interface IWindpowerinfodayService extends IService<Windpowerinfoday> {
+
+}

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/impl/WindpowerinfodayServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.service.auto.impl;
+
+import com.gyee.ghost.model.auto.Windpowerinfoday;
+import com.gyee.ghost.mapper.auto.WindpowerinfodayMapper;
+import com.gyee.ghost.service.auto.IWindpowerinfodayService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2023-02-19
+ */
+@Service
+public class WindpowerinfodayServiceImpl extends ServiceImpl<WindpowerinfodayMapper, Windpowerinfoday> implements IWindpowerinfodayService {
+
+}