Parcourir la source

Merge remote-tracking branch 'origin/data-fix' into data-fix

lloyd il y a 3 mois
Parent
commit
8d479cb779

+ 0 - 4
pom.xml

@@ -68,10 +68,6 @@
68 68
              <artifactId>sentinel-datasource-nacos</artifactId>
69 69
          </dependency>-->
70 70
         <dependency>
71
-            <groupId>com.alibaba.cloud</groupId>
72
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
73
-        </dependency>
74
-        <dependency>
75 71
             <groupId>com.baomidou</groupId>
76 72
             <artifactId>mybatis-plus-boot-starter</artifactId>
77 73
             <version>3.3.1</version>

+ 3 - 2
src/main/java/com/gct/edge/actuator/controller/DiagnoseController.java

@@ -76,10 +76,11 @@ public class DiagnoseController {
76 76
     public Result getGtOverlayDataLazy(@RequestParam String moduleKey, @RequestParam String wellId,
77 77
                                        @RequestParam String beginDate, @RequestParam String endDate,
78 78
                                        @ApiParam("叠加数,也就相当于pageSize") @RequestParam Integer splitCount,
79
-                                       @ApiParam("当前第几个叠加图,也就相当于curPage") @RequestParam Integer curIndex) {
79
+                                       @ApiParam("当前第几个叠加图,也就相当于curPage") @RequestParam Integer curIndex,
80
+                                       @RequestParam(required = false) String dilutionCount) {
80 81
         if (StringUtil.isBlankOrEmpty(moduleKey)) return Result.error("参数条件不足");
81 82
         if (splitCount != null && splitCount >= 20000) return Result.error("超过叠加上限");
82
-        JSONObject ja = diagnoseService.getGtOverlayDataLazy(moduleKey, wellId, beginDate, endDate, splitCount,curIndex);
83
+        JSONObject ja = diagnoseService.getGtOverlayDataLazy(moduleKey, wellId, beginDate, endDate, splitCount,curIndex,dilutionCount);
83 84
         return Result.ok(ja);
84 85
     }
85 86
 

+ 0 - 9
src/main/java/com/gct/edge/actuator/controller/YieldController.java

@@ -30,15 +30,6 @@ public class YieldController {
30 30
     @Autowired
31 31
     YieldService yieldService;
32 32
 
33
-    @PreAuthorize("hasAuthority('module:view:read')")
34
-    @GetMapping("/getYieldResultDisperse")
35
-    public Result getYieldResultDisperse(@RequestParam String moduleKey,@RequestParam String wellId,
36
-                                         @RequestParam String beginDateTime,
37
-                                         @RequestParam String endDateTime,@RequestParam Integer total) {
38
-        return yieldService.getYieldResultDisperse(moduleKey,wellId,beginDateTime,endDateTime,total);
39
-    }
40
-
41
-
42 33
     @PreAuthorize("hasAuthority('module:view:write')")
43 34
     @PostMapping("/uploadYieldReuslt")
44 35
     public Result uploadDiagnoseReuslt(@RequestParam MultipartFile file, @RequestParam String moduleKey) {

Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
src/main/java/com/gct/edge/actuator/mapper/YieldRealTimeMapper.xml


+ 1 - 1
src/main/java/com/gct/edge/actuator/service/DiagnoseService.java

@@ -40,5 +40,5 @@ public interface DiagnoseService extends IService<DiagnoseResultRealTime> {
40 40
 
41 41
     Page<DiagnoseResultRealTime> selectPageByCondition(String moduleKey, String wellId, LocalDateTime start, LocalDateTime end, Integer curPage, Integer pageSize);
42 42
 
43
-    JSONObject getGtOverlayDataLazy(String moduleKey, String wellId, String beginDate, String endDate, Integer splitCount, Integer curIndex);
43
+    JSONObject getGtOverlayDataLazy(String moduleKey, String wellId, String beginDate, String endDate, Integer splitCount, Integer curIndex, String dilutionCount);
44 44
 }

+ 1 - 1
src/main/java/com/gct/edge/actuator/service/impl/DiagnoseServiceImpl.java

@@ -209,7 +209,7 @@ public class DiagnoseServiceImpl extends ServicePlusImpl<DiagnoseResultRealTimeM
209 209
     }
210 210
 
211 211
     @Override
212
-    public JSONObject getGtOverlayDataLazy(String moduleKey, String wellId, String beginDate, String endDate, Integer splitCount, Integer curIndex) {
212
+    public JSONObject getGtOverlayDataLazy(String moduleKey, String wellId, String beginDate, String endDate, Integer splitCount, Integer curIndex, String dilutionCount) {
213 213
         Page<DiagnoseResultRealTime> data = selectPageToObject(
214 214
                 new Page<DiagnoseResultRealTime>(curIndex, splitCount).
215 215
                         setSearchCount(false),

+ 2 - 0
src/main/java/com/gct/edge/actuator/service/impl/YieldServiceImpl.java

@@ -28,6 +28,7 @@ import java.util.ArrayList;
28 28
 import java.util.Collections;
29 29
 import java.util.List;
30 30
 import java.util.Objects;
31
+import java.util.UUID;
31 32
 import java.util.stream.Collectors;
32 33
 
33 34
 /**
@@ -53,6 +54,7 @@ public class YieldServiceImpl extends ServicePlusImpl<YieldRealTimeMapper, Yield
53 54
         List<YieldRealTime> data = DataTranslator.transFileToFileParseObject(file, YieldRealTime.class);
54 55
         data.forEach(x -> {
55 56
             x.setModuleKey(moduleKey);
57
+            x.setId(UUID.randomUUID().toString());
56 58
         });
57 59
         int sus = saveOnConflictDoNothingBatch(data);
58 60
 //        int failed = 0;

+ 6 - 40
src/main/resources/application-dev.yml

@@ -8,8 +8,8 @@ server:
8 8
 logging:
9 9
   level:
10 10
     root: info
11
-    com.gct.edge.actuator.mapper: debug
12
-    com.gct.edge.actuator.service: debug
11
+    com.gct.edge.actuator.mapper: off
12
+    com.gct.edge.actuator.service: off
13 13
 
14 14
 management:
15 15
   endpoints:
@@ -21,17 +21,8 @@ spring:
21 21
     ## 指定nacos server地址
22 22
     nacos:
23 23
       ## 指定nacos server地址
24
-      server-addr: 192.168.31.167:8848
25
-      discovery:
26
-        namespace: 6ff57726-5b12-4ffe-a0dc-b1e67168ffe5
27
-        group: DEV_GROUP
28
-      #指定sentinel地址
29
-  #    sentinel:
30
-  #      transport:
31
-  #        dashboard: 101.200.219.190:8858
32
-  #        port: 8722 #端口会自动向下获取 8720 8721...
33
-  #        #默认locahost 然而对容器、云主机不友好,明确地址,sentinel没有实现打洞
34
-  #        client-ip: 101.200.219.190
24
+      server-addr: 192.168.31.252:8848
25
+
35 26
   ## 本服务名称
36 27
   application:
37 28
     name: edge-actuator
@@ -62,7 +53,7 @@ spring:
62 53
     edge:
63 54
       base:
64 55
         enabled: true
65
-        jdbc-url: jdbc:postgresql://geo-cruiser.com:54324/central
56
+        jdbc-url: jdbc:postgresql://192.168.31.252:54322/central
66 57
         username: root
67 58
         password: 123456
68 59
         driver-class-name: org.postgresql.Driver
@@ -103,22 +94,6 @@ swagger:
103 94
   authorization:
104 95
     key-name: token
105 96
   enabled: true
106
-gct:
107
-  thrift:
108
-    provider:
109
-      port: 9091
110
-      host: 192.168.1.50
111
-
112
-      timeout: 3000
113
-    pool:
114
-      maxTotal: 20
115
-      maxIdle: 20
116
-      minIdle: 0
117
-      test-on-return: off
118
-      test-on-borrow: on
119
-      test-while-idle: off
120
-
121
-
122 97
 
123 98
 feign:
124 99
   client:
@@ -131,16 +106,7 @@ feign:
131 106
 
132 107
 #token 认证中心主机地址
133 108
 auth:
134
-  hostList: 192.168.31.167:9001
135
-
136
-#mybatis-plus:
137
-#  global-config:
138
-#    db-config:
139
-#      logic-delete-value: 1
140
-#      logic-not-delete-value: 0
141
-#  configuration:
142
-#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
143
-
109
+  hostList: 192.168.31.252:9001
144 110
 
145 111
 sample-source-path: ${user.home}/dl/samplesource/
146 112
 

+ 1 - 9
src/main/resources/bootstrap.yml

@@ -1,14 +1,6 @@
1 1
 spring:
2 2
   ## 切换配置文件
3 3
   profiles:
4
-    active: pro   # dev 开发环境    /   pro  生产环境    / test   测试环境
5
-#  cloud:
6
-#    nacos:
7
-#      config:
8
-#        server-addr: 101.200.219.190:8848 #Nacos作为配置中心地址
9
-#        file-extension: yaml #指定yaml格式配置
10
-#        group: DEV_GROUP
11
-#        namespace: 75b6372b-5e8b-4698-840c-66add07e147f
12
-#        refresh-enabled: false
4
+    active: dev   # dev 开发环境    /   pro  生产环境    / test   测试环境
13 5
   application:
14 6
     name: edge-actuator