Forráskód Böngészése

新增存储公司表,调度将风场与光伏分开

xieshengjie 4 éve
szülő
commit
134774175e

+ 20 - 0
src/main/java/cn/gyee/tamplate/controller/AnalysissubcompanyController.java

@@ -0,0 +1,20 @@
+package cn.gyee.tamplate.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2021-04-15
+ */
+@RestController
+@RequestMapping("//analysissubcompany")
+public class AnalysissubcompanyController {
+
+}

+ 16 - 0
src/main/java/cn/gyee/tamplate/mapper/auto/AnalysissubcompanyMapper.java

@@ -0,0 +1,16 @@
+package cn.gyee.tamplate.mapper.auto;
+
+import cn.gyee.tamplate.model.auto.Analysissubcompany;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2021-04-15
+ */
+public interface AnalysissubcompanyMapper extends BaseMapper<Analysissubcompany> {
+
+}

+ 106 - 0
src/main/java/cn/gyee/tamplate/model/auto/Analysissubcompany.java

@@ -0,0 +1,106 @@
+package cn.gyee.tamplate.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2021-04-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("ANALYSISSUBCOMPANY")
+public class Analysissubcompany extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private long id;
+
+    @TableField("TID")
+    private long tid;
+
+    @TableField("FOREIGNKEY")
+    private Integer foreignkey;
+
+    @TableField("RECORDDATE")
+    private Date recorddate;
+
+    @TableField("FDLSCADA")
+    private Double fdlscada;
+
+    @TableField("FDL")
+    private Double fdl;
+
+    @TableField("SWDL")
+    private Double swdl;
+
+    @TableField("GWDL")
+    private Double gwdl;
+
+    @TableField("ZHCYDL")
+    private Double zhcydl;
+
+    @TableField("ZHCYDLSCADA")
+    private Double zhcydlscada;
+
+    @TableField("ZHCYDLL")
+    private Double zhcydll;
+
+    @TableField("ZHCYDLLSCADA")
+    private Double zhcydllscada;
+
+    @TableField("CYDL")
+    private Double cydl;
+
+    @TableField("CYDLL")
+    private Double cydll;
+
+    @TableField("LYXS")
+    private Double lyxs;
+
+    @TableField("LYXSSCADA")
+    private Double lyxsscada;
+
+    @TableField("XDDL")
+    private Double xddl;
+
+    @TableField("FJGZDL")
+    private Double fjgzdl;
+
+    @TableField("FJJXDL")
+    private Double fjjxdl;
+
+    @TableField("XDSJ")
+    private Double xdsj;
+
+    @TableField("FJGZSJ")
+    private Double fjgzsj;
+
+    @TableField("FJJXSJ")
+    private Double fjjxsj;
+
+    @TableField("QPJFX")
+    private Double qpjfx;
+
+    @TableField("LLFDL")
+    private Double llfdl;
+
+    @TableField("LLFDLSCADA")
+    private Double llfdlscada;
+
+    @TableField("YJHFDL")
+    private Double yjhfdl;
+
+
+}

+ 16 - 0
src/main/java/cn/gyee/tamplate/service/IAnalysissubcompanyService.java

@@ -0,0 +1,16 @@
+package cn.gyee.tamplate.service;
+
+import cn.gyee.tamplate.model.auto.Analysissubcompany;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2021-04-15
+ */
+public interface IAnalysissubcompanyService extends IService<Analysissubcompany> {
+
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 472 - 242
src/main/java/cn/gyee/tamplate/service/analysis/AnalysisNewService.java


+ 20 - 0
src/main/java/cn/gyee/tamplate/service/impl/AnalysissubcompanyServiceImpl.java

@@ -0,0 +1,20 @@
+package cn.gyee.tamplate.service.impl;
+
+import cn.gyee.tamplate.model.auto.Analysissubcompany;
+import cn.gyee.tamplate.mapper.auto.AnalysissubcompanyMapper;
+import cn.gyee.tamplate.service.IAnalysissubcompanyService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2021-04-15
+ */
+@Service
+public class AnalysissubcompanyServiceImpl extends ServiceImpl<AnalysissubcompanyMapper, Analysissubcompany> implements IAnalysissubcompanyService {
+
+}

+ 31 - 6
src/main/java/cn/gyee/tamplate/task/SaticScheduleTask.java

@@ -68,12 +68,37 @@ public class SaticScheduleTask {
 //            analysisService.analysiswindstationtask(yesterday,yesterday);
 //            analysisService.analysispvstationtask(yesterday,yesterday);
 
-            analysisNewService.savaAnalysismain(yesterday,yesterday);
-            analysisNewService.saveAnalysisTableBottom(yesterday,yesterday);
-            analysisNewService.saveWindProject(yesterday,yesterday);
-            analysisNewService.savePvProject(yesterday,yesterday);
-            analysisNewService.saveWindStation(yesterday,yesterday);
-            analysisNewService.savePvStation(yesterday,yesterday);
+            analysisNewService.savaAnalysismain(yesterday, yesterday);
+            analysisNewService.saveAnalysisTableBottom(yesterday, yesterday);
+            analysisNewService.saveWindProject(yesterday, yesterday);
+//            analysisNewService.savePvProject(yesterday,yesterday);
+            analysisNewService.saveWindStation(yesterday, yesterday);
+//            analysisNewService.savePvStation(yesterday,yesterday);
+            analysisNewService.saveCompany(yesterday, yesterday);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Scheduled(cron = "0 0 20 * * ?")
+    //或直接指定时间间隔,例如:5秒
+    //@Scheduled(fixedRate=5000)
+    private void analysisGfTasks() {
+//        String yesterday = DateUtils.getYesterdayStr("yyyy-MM-dd");
+        String yesterday = DateUtils.toDate1(DateUtils.today());
+        try {
+//            analysisService.toblebottomtask(yesterday,yesterday);
+//            analysisService.analysiswindprojecttask(yesterday,yesterday);
+//            analysisService.analysispvprojecttask(yesterday,yesterday);
+//            analysisService.analysiswindstationtask(yesterday,yesterday);
+//            analysisService.analysispvstationtask(yesterday,yesterday);
+
+            analysisNewService.savaAnalysisGfmain(yesterday, yesterday);
+            analysisNewService.saveAnalysisGfTableBottom(yesterday, yesterday);
+//            analysisNewService.saveWindProject(yesterday,yesterday);
+            analysisNewService.savePvProject(yesterday, yesterday);
+//            analysisNewService.saveWindStation(yesterday,yesterday);
+            analysisNewService.savePvStation(yesterday, yesterday);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 46 - 0
src/test/java/cn/gyee/tamplate/AnalysisTest.java

@@ -0,0 +1,46 @@
+package cn.gyee.tamplate;
+
+import cn.gyee.tamplate.service.analysis.AnalysisNewService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+
+/**
+ * @ClassName : AnalysisTest
+ * @Author : xieshengjie
+ * @Date: 2021/4/16 10:34
+ * @Description :
+ */
+@RunWith(SpringRunner.class)
+@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class AnalysisTest {
+    @Resource
+    private AnalysisNewService analysisNewService;
+
+    @Test
+    public void test3() throws  Exception{
+
+
+//       analysisNewService.savaAnalysisGfmain("2021-04-01", "2021-04-22");
+//        analysisNewService.saveAnalysisGfTableBottom("2021-04-01", "2021-04-22");
+//        analysisNewService.savePvProject("2021-04-01", "2021-04-22");
+//        analysisNewService.savePvStation("2021-04-01", "2021-04-22");
+
+
+//                analysisNewService.savaAnalysismain("2021-04-01", "2021-04-22");
+//        analysisNewService.saveAnalysisTableBottom("2021-03-31", "2021-04-22");
+//        analysisNewService.saveWindProject("2021-04-01", "2021-04-05");
+//        analysisNewService.saveWindStation("2021-04-01", "2021-04-05");
+//        analysisNewService.saveCompany("2021-04-01", "2021-04-05");
+
+
+
+    }
+
+}

+ 0 - 80
src/test/java/cn/gyee/tamplate/TamplateApplicationTests.java

@@ -1,80 +0,0 @@
-package cn.gyee.tamplate;
-
-
-import cn.gyee.tamplate.model.custom.PointData;
-import cn.gyee.tamplate.service.analysis.AnalysisNewService;
-import cn.gyee.tamplate.service.analysis.AnalysisService;
-import cn.gyee.tamplate.service.benchmark.BenchmarkService;
-import cn.gyee.tamplate.service.operation.OperationService;
-import cn.gyee.tamplate.util.golden.EdosUtil;
-import cn.gyee.tamplate.util.golden.IEdosUtil;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-import javax.annotation.Resource;
-import java.text.ParseException;
-
-@RunWith(SpringRunner.class)
-@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-public class TamplateApplicationTests {
-
-    @Resource
-    private OperationService operationService;
-
-    @Resource
-    private BenchmarkService benchmarkService;
-
-    @Resource
-    private AnalysisService analysisService;
-    @Resource
-    private AnalysisNewService analysisNewService;
-
-//    @Test
-//    public void test(){
-//        try {
-//            operationService.opeMapTask();
-//        } catch (ParseException e) {
-//            e.printStackTrace();
-//        }
-//    }
-//
-//    @Test
-//    public void test1() throws  Exception{
-//        try {
-//            benchmarkService.createBeanchmarkList();
-//        } catch (ParseException e) {
-//            e.printStackTrace();
-//        }
-//    }
-
-//    @Test
-//    public void test2() throws  Exception{
-//        //analysisService.toblebottomtask("2021-03-01","2021-03-13");
-//        //analysisService.analysiswindprojecttask("2021-03-01","2021-03-13");
-//        //analysisService.analysispvprojecttask("2021-03-01","2021-03-13");
-////        analysisService.analysiswindstationtask("2021-03-01","2021-03-13");
-//        analysisService.analysispvstationtask("2021-03-01","2021-03-13");
-//    }
-
-    @Test
-    public void test3() throws  Exception{
-//        analysisNewService.savaAnalysismain("2021-03-30","2021-03-30");
-//       analysisNewService.saveAnalysisTableBottom("2021-03-30","2021-03-30");
-//       analysisNewService.saveWindProject("2021-03-30","2021-03-30");
-//        analysisNewService.savePvProject("2021-03-30","2021-03-30");
-//        analysisNewService.saveWindStation("2021-03-30","2021-03-30");
-//        analysisNewService.savePvStation("2021-03-30","2021-03-30");
-
-
-
-    }
-
-
-
-
-}