xsr 1 yıl önce
ebeveyn
işleme
2b4eb15216
21 değiştirilmiş dosya ile 339 ekleme ve 1065 silme
  1. 6 0
      pom.xml
  2. 1 16
      src/main/Test/MyTest.java
  3. 0 2
      src/main/java/com/gct/tool/DataAnalyseToolApplication.java
  4. 0 273
      src/main/java/com/gct/tool/entity/aoid/AoidDailyYield.java
  5. 0 205
      src/main/java/com/gct/tool/entity/aoid/AoidSinglegtYield.java
  6. 105 0
      src/main/java/com/gct/tool/entity/centralbase/CbPcProWellboreStatusDaily.java
  7. 95 0
      src/main/java/com/gct/tool/entity/centralbase/CbPcProWellboreVolDaily.java
  8. 122 0
      src/main/java/com/gct/tool/entity/centralbase/CbTempWellMechRuntime.java
  9. 0 68
      src/main/java/com/gct/tool/entity/excel/LiqAnalyseData.java
  10. 0 38
      src/main/java/com/gct/tool/entity/excel/SingleGtData.java
  11. 0 24
      src/main/java/com/gct/tool/mapper/aoid/AoidDailyYieldMapper.java
  12. 0 55
      src/main/java/com/gct/tool/mapper/aoid/AoidDailyYieldMapper.xml
  13. 0 17
      src/main/java/com/gct/tool/mapper/aoid/AoidSinglegtYieldMapper.java
  14. 0 63
      src/main/java/com/gct/tool/mapper/aoid/AoidSinglegtYieldMapper.xml
  15. 0 8
      src/main/java/com/gct/tool/service/aoid/AoidDailyYieldService.java
  16. 0 14
      src/main/java/com/gct/tool/service/aoid/AoidDailyYieldServiceImpl.java
  17. 0 8
      src/main/java/com/gct/tool/service/aoid/AoidSinglegtYieldService.java
  18. 0 19
      src/main/java/com/gct/tool/service/aoid/AoidSinglegtYieldServiceImpl.java
  19. 0 145
      src/main/java/com/gct/tool/service/impl/DataAnalyseService.java
  20. 10 10
      src/main/resources/application-pro.yml
  21. 0 100
      src/main/resources/wellIds.txt

+ 6 - 0
pom.xml

@@ -66,6 +66,12 @@
66 66
             <artifactId>common-security</artifactId>
67 67
             <version>2.0-SNAPSHOT</version>
68 68
         </dependency>
69
+        <dependency>
70
+            <groupId>com.oracle.database.jdbc</groupId>
71
+            <artifactId>ojdbc8</artifactId>
72
+            <version>19.3.0.0</version>
73
+        </dependency>
74
+
69 75
 
70 76
         <!--nocas 注册中心依赖-->
71 77
         <dependency>

+ 1 - 16
src/main/Test/MyTest.java

@@ -1,18 +1,9 @@
1
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
2 1
 import com.gct.tool.DataAnalyseToolApplication;
3
-import com.gct.tool.entity.aoid.AoidDailyYield;
4
-import com.gct.tool.service.aoid.AoidDailyYieldService;
5
-import com.gct.tool.service.impl.DataAnalyseService;
6
-import org.checkerframework.checker.units.qual.A;
7 2
 import org.junit.Test;
8 3
 import org.junit.runner.RunWith;
9
-import org.springframework.beans.factory.annotation.Autowired;
10 4
 import org.springframework.boot.test.context.SpringBootTest;
11
-import org.springframework.test.context.ContextConfiguration;
12 5
 import org.springframework.test.context.junit4.SpringRunner;
13 6
 
14
-import java.time.LocalDate;
15
-
16 7
 /**
17 8
  * @author xusirui 2022/9/28
18 9
  */
@@ -20,16 +11,10 @@ import java.time.LocalDate;
20 11
 @RunWith(SpringRunner.class)
21 12
 public class MyTest {
22 13
 
23
-    @Autowired
24
-    DataAnalyseService dataAnalyseService;
25
-
26
-    @Autowired
27
-    AoidDailyYieldService aoidDailyYieldServicel;
28
-
29 14
     @Test
30 15
     public void test() {
31 16
 //        aoidDailyYieldServicel.list(new QueryWrapper<AoidDailyYield>().eq("prod_date::date",LocalDate.parse("2022-09-27")));
32
-//        dataAnalyseService.produceLiqAnalyse();
17
+//        dataAnalyseService.produceLiqAnalyse();n
33 18
 
34 19
     }
35 20
 }

+ 0 - 2
src/main/java/com/gct/tool/DataAnalyseToolApplication.java

@@ -1,9 +1,7 @@
1 1
 package com.gct.tool;
2 2
 
3
-import com.gct.tool.service.impl.DataAnalyseService;
4 3
 import com.spring4all.swagger.EnableSwagger2Doc;
5 4
 import org.mybatis.spring.annotation.MapperScan;
6
-import org.springframework.beans.factory.annotation.Autowired;
7 5
 import org.springframework.boot.SpringApplication;
8 6
 import org.springframework.boot.autoconfigure.SpringBootApplication;
9 7
 import org.springframework.boot.context.properties.EnableConfigurationProperties;

+ 0 - 273
src/main/java/com/gct/tool/entity/aoid/AoidDailyYield.java

@@ -1,273 +0,0 @@
1
-package com.gct.tool.entity.aoid;
2
-
3
-import com.baomidou.mybatisplus.annotation.TableField;
4
-import com.baomidou.mybatisplus.annotation.TableName;
5
-import com.fasterxml.jackson.annotation.JsonFormat;
6
-import com.fasterxml.jackson.core.JsonGenerator;
7
-import com.fasterxml.jackson.databind.JsonSerializer;
8
-import com.fasterxml.jackson.databind.SerializerProvider;
9
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
10
-import io.swagger.annotations.ApiModel;
11
-import io.swagger.annotations.ApiModelProperty;
12
-import lombok.Data;
13
-import org.springframework.stereotype.Component;
14
-
15
-import java.io.IOException;
16
-import java.time.LocalDateTime;
17
-
18
-/**
19
- * @Author: Jyx
20
- * @Since: 2021/1/28 17:52
21
- */
22
-@Data
23
-@ApiModel(value = "AoidDailyYield对象", description = "量液日产量存储数据")
24
-@TableName("aoid.aoid_daily_yield")
25
-public class AoidDailyYield {
26
-
27
-    @Component
28
-    public static class DoubleSerialize extends JsonSerializer {
29
-        @Override
30
-        public void serialize(Object o, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
31
-            if (o != null && o instanceof Double) {
32
-                jsonGenerator.writeNumber(Math.round((Double) o * 100) / 100.0);
33
-            }
34
-        }
35
-    }
36
-
37
-    @ApiModelProperty(value = "井号")
38
-    private String wellCommonName;
39
-
40
-    @ApiModelProperty(value = "井Id")
41
-    private String wellId;
42
-
43
-   
44
-    @ApiModelProperty(value = "日期")
45
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
46
-    private LocalDateTime prodDate;
47
-
48
-    @ApiModelProperty(value = "日期")
49
-    @TableField(exist = false)
50
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
51
-    private LocalDateTime prodDateYesterday;
52
-
53
-    //@JsonSerialize(using = DoubleSerialize.class)
54
-   
55
-    @ApiModelProperty(value = "日产液量 t(实际产量)")
56
-    private Double liqProdDaily;
57
-
58
-    //@JsonSerialize(using = DoubleSerialize.class)
59
-   
60
-    @ApiModelProperty(value = "日产油量 t")
61
-    private Double oilProdDaily;
62
-
63
-    //@JsonSerialize(using = DoubleSerialize.class)
64
-   
65
-    @ApiModelProperty(value = "日产水量 t")
66
-    private Double waterProdDaily;
67
-
68
-//    @JsonSerialize(using = DoubleSerialize.class)
69
-   
70
-    @ApiModelProperty(value = "日产气量 m^3")
71
-    private Double gasProdDaily;
72
-
73
-//    @JsonSerialize(using = DoubleSerialize.class)
74
-   
75
-    @ApiModelProperty(value = "泵效")
76
-    private Double bx;
77
-
78
-   
79
-    @ApiModelProperty(value = "理论排量")
80
-    private Double llpl;
81
-
82
-   
83
-    @ApiModelProperty(value = "生产时间")
84
-    private Integer prodTime;
85
-
86
-
87
-    @ApiModelProperty(value = "产量系数")
88
-    private Double clxs;
89
-
90
-   
91
-    @JsonSerialize(using = DoubleSerialize.class)
92
-    @ApiModelProperty(value = "冲程")
93
-    private Double stroke;
94
-
95
-   
96
-    @JsonSerialize(using = DoubleSerialize.class)
97
-    @ApiModelProperty(value = "冲次")
98
-    private Double frequence;
99
-
100
-   
101
-    @ApiModelProperty(value = "含水率 %")
102
-    private Double waterCut;
103
-
104
-   
105
-    @ApiModelProperty(value = "泵径")
106
-    private Double bj;
107
-
108
-   
109
-    @ApiModelProperty(value = "泵深")
110
-    private Double bs;
111
-
112
-   
113
-    @ApiModelProperty(value = "沉没度")
114
-    private Double cmd;
115
-
116
-
117
-    @ApiModelProperty(value = "油嘴直径")
118
-    private Double yz;
119
-
120
-    @ApiModelProperty(value = "生产时间")
121
-    private Double scsj;
122
-
123
-    @ApiModelProperty(value = "油压")
124
-    private Double yy;
125
-
126
-    @ApiModelProperty(value = "回压")
127
-    private Double hy;
128
-
129
-    @ApiModelProperty(value = "套压")
130
-    private Double ty;
131
-
132
-    @ApiModelProperty(value = "备注")
133
-    private String bz;
134
-
135
-    @ApiModelProperty(value = "是否异常")
136
-    private Double sfyc;
137
-
138
-    @ApiModelProperty(value = "动液面")
139
-    private Double dym;
140
-
141
-    @ApiModelProperty(value = "日志动液面")
142
-    private Double a2Dym;
143
-
144
-    @ApiModelProperty(value = "24小时产液量")
145
-    private Double rcy2;
146
-
147
-    private Double rcu2;
148
-
149
-    private Double rcs2;
150
-
151
-    @ApiModelProperty(value = "日志产液量")
152
-    private Double a2LiqProdDaily;
153
-
154
-    @ApiModelProperty(value = "日志产油量")
155
-    private Double a2OilProdDaily;
156
-
157
-    @ApiModelProperty(value = "日志产水量")
158
-    private Double a2WaterProdDaily;
159
-
160
-    @ApiModelProperty(value = "计量产液量")
161
-    private Double testLiquVolDaily;
162
-
163
-    private Double a2GasProdDaily;
164
-
165
-    private Integer a2ProdTime;
166
-
167
-    @ApiModelProperty(value = "日志含水率 %")
168
-    private Double a2WaterCut;
169
-
170
-    @ApiModelProperty(value = "有效功图数")
171
-    private Integer yxgts;
172
-
173
-    @ApiModelProperty(value = "错误功图数")
174
-    private Integer errorgts;
175
-
176
-    private String zdjg;
177
-
178
-    @ApiModelProperty(value = "最小电压")
179
-    private Double djdy;
180
-
181
-    @ApiModelProperty(value = "作业区")
182
-    private String zyq;
183
-
184
-    @ApiModelProperty(value = "计量站")
185
-    private String jlz;
186
-
187
-    @ApiModelProperty(value = "平均环境温度")
188
-    private Double hjwd;
189
-
190
-    @ApiModelProperty(value = "仪表电流")
191
-    private Double ybdl;
192
-
193
-    @ApiModelProperty(value = "设备号")
194
-    private String sbh;
195
-
196
-    @ApiModelProperty(value = "信号强度")
197
-    private Double xhqd;
198
-
199
-    @ApiModelProperty(value = "压力仪表的今日压力平均值")
200
-    private Double yl;
201
-
202
-    @ApiModelProperty(value = "日志备注")
203
-    private String rzbz;
204
-
205
-    @ApiModelProperty(value = "水密度")
206
-    private Double smd;
207
-
208
-    @ApiModelProperty(value = "油密度")
209
-    private Double ymd;
210
-
211
-    @ApiModelProperty(value = "汽油比")
212
-    private Double qyb;
213
-
214
-    @ApiModelProperty(value = "无参数配置井")
215
-    private String notConfigure;
216
-
217
-
218
-    @ApiModelProperty(value = "汇总说明")
219
-    private String summaryDescription;
220
-
221
-
222
-
223
-    @TableField(exist = false)
224
-    private String jq;
225
-
226
-    @TableField(exist = false)
227
-    private String zd;
228
-
229
-    @TableField(exist = false)
230
-    private Double wc;
231
-
232
-    @TableField(exist = false)
233
-    private Double LiqProdDailyYesterday;
234
-
235
-    @TableField(exist = false)
236
-    private String LiqProdDailyQs;
237
-
238
-    @TableField(exist = false)
239
-    private Double A2LiqProdDailyYesterday;
240
-
241
-    @TableField(exist = false)
242
-    private String A2LiqProdDailyQs;
243
-
244
-    @TableField(exist = false)
245
-    private Double wcYesterday;
246
-
247
-    @TableField(exist = false)
248
-    private Double yyYesterday;
249
-
250
-    @TableField(exist = false)
251
-    private String YyQs;
252
-
253
-    @TableField(exist = false)
254
-    private Double tyYesterday;
255
-
256
-    @TableField(exist = false)
257
-    private String TyQs;
258
-
259
-    @TableField(exist = false)
260
-    private String rzbzYesterday;
261
-
262
-    @TableField(exist = false)
263
-    private String wcQs;
264
-
265
-    @TableField(exist = false)
266
-    private String Yesterday;
267
-
268
-
269
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
270
-    private LocalDateTime createTime;
271
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
272
-    private LocalDateTime updateTime;
273
-}

+ 0 - 205
src/main/java/com/gct/tool/entity/aoid/AoidSinglegtYield.java

@@ -1,205 +0,0 @@
1
-package com.gct.tool.entity.aoid;
2
-
3
-import com.baomidou.mybatisplus.annotation.TableField;
4
-import com.baomidou.mybatisplus.annotation.TableName;
5
-import com.baomidou.mybatisplus.extension.activerecord.Model;
6
-import com.fasterxml.jackson.annotation.JsonFormat;
7
-import io.swagger.annotations.ApiModel;
8
-import io.swagger.annotations.ApiModelProperty;
9
-import lombok.Data;
10
-import lombok.EqualsAndHashCode;
11
-import lombok.experimental.Accessors;
12
-
13
-import java.io.Serializable;
14
-import java.time.LocalDateTime;
15
-import java.util.List;
16
-
17
-/**
18
- * <p>
19
- *
20
- * </p>
21
- *
22
- * @author 王森玉
23
- * @since 2021-01-31
24
- */
25
-@Data
26
-@EqualsAndHashCode(callSuper = false)
27
-@Accessors(chain = true)
28
-@ApiModel(value = "AoidSinglegtYield对象", description = "")
29
-@TableName(schema = "aoid", value = "aoid_singlegt_yield")
30
-public class AoidSinglegtYield extends Model<AoidSinglegtYield> {
31
-
32
-    private static final long serialVersionUID = 1L;
33
-
34
-    private String wellId;
35
-
36
-    private String wellCommonName;
37
-
38
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
39
-    private LocalDateTime prodDate;
40
-
41
-    private Double stroke;
42
-
43
-    private Double frequence;
44
-
45
-    private Double bj;
46
-
47
-    private Double bs;
48
-
49
-    private Double cmd;
50
-
51
-    private Double yzzj;
52
-
53
-    private Double sxzh;
54
-
55
-    private Double xxzh;
56
-
57
-    private String sgt;
58
-
59
-    private String bgt;
60
-
61
-    private String zdjg;
62
-
63
-    private Double a2LiqProdDaily;
64
-    private Double a2OilProdDaily;
65
-    private Double a2WaterProdDaily;
66
-
67
-    private Integer sgtIsLegal;
68
-    private Integer calIsNormal;
69
-    private Double liqProdDaily;
70
-    private Double a2GasProdDaily;
71
-    private Double a2WaterCut;
72
-    private String a2Remark;
73
-    private Integer a2ProdTime;
74
-
75
-    private Double oilProdDaily;
76
-
77
-    private Double gasProdDaily;
78
-
79
-    private Double testLiquVolDaily;
80
-
81
-    private String eczdjg;
82
-
83
-    private Double bx;
84
-
85
-    private Double hsl;
86
-
87
-    private Double flag;
88
-
89
-    private Double bdxs;
90
-
91
-    private Double llpl;
92
-
93
-    private Double zcc;
94
-
95
-    private Double ycc;
96
-
97
-    private Double sjcc;
98
-
99
-    private Double yxcc;
100
-
101
-    private Double ccss;
102
-
103
-    private Double lsss;
104
-
105
-    private Double gyss;
106
-
107
-    private Double pumpdepth;
108
-
109
-    private Double hy;
110
-
111
-    private Double yy;
112
-
113
-    private Double ty;
114
-
115
-    private Double waterProdDaily;
116
-
117
-    private Double scsj;
118
-
119
-    private Double qyb;
120
-
121
-    private Double strokeRatio;
122
-
123
-    private Double djdy;
124
-
125
-    private Double hjwd;
126
-
127
-    private Double ybdl;
128
-
129
-    private Double xhqd;
130
-
131
-    private String sbh;
132
-    private Double smd;
133
-    private Double ymd;
134
-
135
-    private Double dym;
136
-
137
-    private Double a2Dym;
138
-
139
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
140
-    private LocalDateTime createTime;
141
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
142
-    private LocalDateTime updateTime;
143
-
144
-    @ApiModelProperty(value = "remark")
145
-    private String remark;
146
-
147
-    @TableField(exist = false)
148
-    private String zdjgfx;
149
-
150
-
151
-    @ApiModelProperty(value = "'实时载荷差'")
152
-    private Double loadDifference;
153
-
154
-    @ApiModelProperty(value = "实时面积")
155
-    private String area;
156
-
157
-    @ApiModelProperty(value = "比对日期")
158
-    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
159
-    private LocalDateTime comparisonProdDate;
160
-
161
-    @ApiModelProperty(value = "比对系数")
162
-    private Double comparisonCoefficient;
163
-
164
-    @ApiModelProperty(value = "比对产量")
165
-    private Double comparisonYield;
166
-
167
-    @ApiModelProperty(value = "比对有效冲程")
168
-    private String comparisonYxcc;
169
-
170
-
171
-    @ApiModelProperty(value = "比对载荷差")
172
-    private String comparisonLoadDifference;
173
-
174
-    @ApiModelProperty(value = "比对面积")
175
-    private String comparisonArea;
176
-
177
-    @ApiModelProperty(value = "有效冲程差率")
178
-    private String yxccRate;
179
-
180
-    @ApiModelProperty(value = "载荷差率")
181
-    private String loadDifferenceRate;
182
-
183
-    @ApiModelProperty(value = "面积差率")
184
-    private String areaRate;
185
-
186
-    private String measureFlag;
187
-
188
-    @ApiModelProperty(value = "是否停井")
189
-    private String isStopWell;
190
-
191
-
192
-    @ApiModelProperty(value = "参数说明")
193
-    private String parmExplain;
194
-
195
-    @ApiModelProperty(value = "参数标识")
196
-    private String parmFlag;
197
-
198
-    @TableField(exist = false)
199
-    private List<List<Double>> sgtUp;
200
-    @Override
201
-    protected Serializable pkVal() {
202
-        return this.wellId;
203
-    }
204
-
205
-}

+ 105 - 0
src/main/java/com/gct/tool/entity/centralbase/CbPcProWellboreStatusDaily.java

@@ -0,0 +1,105 @@
1
+package com.gct.centralbase.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import com.baomidou.mybatisplus.extension.activerecord.Model;
5
+
6
+import java.lang.reflect.Field;
7
+import java.time.LocalDateTime;
8
+import java.io.Serializable;
9
+import io.swagger.annotations.ApiModel;
10
+import io.swagger.annotations.ApiModelProperty;
11
+import lombok.Data;
12
+import lombok.EqualsAndHashCode;
13
+import lombok.experimental.Accessors;
14
+
15
+/**
16
+ * <p>
17
+ * 采出井井筒状态日数据
18
+ * </p>
19
+ *
20
+ * @author wsy
21
+ * @since 2021-01-19
22
+ */
23
+@Data
24
+@EqualsAndHashCode(callSuper = false)
25
+@Accessors(chain = true)
26
+@ApiModel(value="CbPcProWellboreStatusDaily对象", description="采出井井筒状态日数据")
27
+@TableName("centralbase.cb_pc_pro_wellbore_status_daily")
28
+public class CbPcProWellboreStatusDaily extends Model<CbPcProWellboreStatusDaily> {
29
+
30
+    private static final long serialVersionUID=1L;
31
+
32
+    private String wellId;
33
+
34
+    @ApiModelProperty(value = "日期")
35
+    private LocalDateTime prodDate;
36
+
37
+    @ApiModelProperty(value = "采出方式")
38
+    private String oilProdMethod;
39
+
40
+    @ApiModelProperty(value = "油嘴 mm")
41
+    private Double oilNozzle;
42
+
43
+    @ApiModelProperty(value = "回压  Mpa")
44
+    private Double backPres;
45
+
46
+    @ApiModelProperty(value = "上行电流")
47
+    private Double upCurrent;
48
+
49
+    @ApiModelProperty(value = "下行电流  A")
50
+    private Double downCurrent;
51
+
52
+    @ApiModelProperty(value = "电泵的三相电流之一 A")
53
+    private Double elecPumpCurrentA;
54
+
55
+    @ApiModelProperty(value = "电泵的三相电流之一")
56
+    private Double elecPumpCurrentB;
57
+
58
+    @ApiModelProperty(value = "电泵的三相电流之一")
59
+    private Double elecPumpCurrentC;
60
+
61
+    @ApiModelProperty(value = "电泵的电压  V")
62
+    private Double elecPumpVoltage;
63
+
64
+    @ApiModelProperty(value = "热采:油气通过油嘴降压后的井口温度 ℃")
65
+    private Double whTemp;
66
+
67
+    @ApiModelProperty(value = "计量站输气干线压力 MPa")
68
+    private Double mainLinePres;
69
+
70
+    @ApiModelProperty(value = " 平均油压 MPa")
71
+    private Double avgOilPres;
72
+
73
+    @ApiModelProperty(value = "平均套压")
74
+    private Double avgCasingPres;
75
+
76
+    @ApiModelProperty(value = "油压")
77
+    private Double tubingPres;
78
+
79
+    @ApiModelProperty(value = "套压")
80
+    private Double casingPres;
81
+
82
+    @ApiModelProperty(value = "抽油杆下深 m")
83
+    private Double cableSettingDepth;
84
+
85
+    @ApiModelProperty(value = "泵深 m")
86
+    private Double pumpDepth;
87
+
88
+    @ApiModelProperty(value = "套管内径 mm")
89
+    private Double casingInnerDiameter;
90
+
91
+    @ApiModelProperty(value = "动液面深度  m")
92
+    private Double startPumpLiqLevel;
93
+
94
+    @ApiModelProperty(value = "抽油井停抽时的液面深度 m")
95
+    private Double endPumpLiqLevel;
96
+
97
+    @ApiModelProperty(value = "沉没度 m")
98
+    private Double  submergenceDepth;
99
+
100
+    @Override
101
+    protected Serializable pkVal() {
102
+        return null;
103
+    }
104
+
105
+}

+ 95 - 0
src/main/java/com/gct/tool/entity/centralbase/CbPcProWellboreVolDaily.java

@@ -0,0 +1,95 @@
1
+package com.gct.centralbase.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableId;
4
+import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.baomidou.mybatisplus.extension.activerecord.Model;
6
+
7
+import java.lang.reflect.Field;
8
+import java.time.LocalDateTime;
9
+import java.io.Serializable;
10
+
11
+import com.fasterxml.jackson.annotation.JsonFormat;
12
+import io.swagger.annotations.ApiModel;
13
+import io.swagger.annotations.ApiModelProperty;
14
+import lombok.Data;
15
+import lombok.EqualsAndHashCode;
16
+import lombok.experimental.Accessors;
17
+
18
+/**
19
+ * <p>
20
+ * 采出井井筒生产日数据
21
+ * </p>
22
+ *
23
+ * @author wsy
24
+ * @since 2021-01-19
25
+ */
26
+@Data
27
+@EqualsAndHashCode(callSuper = false)
28
+@Accessors(chain = true)
29
+@ApiModel(value="CbPcProWellboreVolDaily对象", description="采出井井筒生产日数据")
30
+@TableName("centralbase.cb_pc_pro_wellbore_vol_daily")
31
+public class CbPcProWellboreVolDaily extends Model<CbPcProWellboreVolDaily> {
32
+
33
+    private static final long serialVersionUID=1L;
34
+
35
+    private String wellId;
36
+
37
+    @ApiModelProperty(value = "日期")
38
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" , timezone = "GMT+8")
39
+    private LocalDateTime prodDate;
40
+
41
+    @ApiModelProperty(value = "采出井开井生产小时数 h")
42
+    private Double prodTime;
43
+
44
+    @ApiModelProperty(value = "日产液量 t")
45
+    private Double liqProdDaily;
46
+
47
+    @ApiModelProperty(value = "日产油量 t")
48
+    private Double oilProdDaily;
49
+
50
+    @ApiModelProperty(value = "日产水量 t")
51
+    private Double waterProdDaily;
52
+
53
+    @ApiModelProperty(value = "日产气量 m^3")
54
+    private Double gasProdDaily;
55
+
56
+    @ApiModelProperty(value = "含水率 %")
57
+    private Double waterCut;
58
+
59
+    @ApiModelProperty(value = "含砂率 %")
60
+    private Double sandContentRatio;
61
+
62
+    @ApiModelProperty(value = "气油比 m^3/t")
63
+    private Double gasOilRatio;
64
+
65
+    @ApiModelProperty(value = "气体含硫物量  mg/m^3")
66
+    private Double gasFluidContent;
67
+
68
+    @ApiModelProperty(value = "气体含氯根量mg/L")
69
+    private Double gasChlorideContent;
70
+
71
+    @ApiModelProperty(value = "措施类别")
72
+    private String stimKeyId;
73
+
74
+    @ApiModelProperty(value = "水气比 t/10^4m^3")
75
+    private Double waterGasRatio;
76
+
77
+    @ApiModelProperty(value = "备注")
78
+    private String remarks;
79
+
80
+    @ApiModelProperty(value = "六小措施")
81
+    private String stimContent;
82
+
83
+    @ApiModelProperty(value = "水密度")
84
+    private Double surfaceCrudeWaterDensity;
85
+
86
+    @ApiModelProperty(value = "油密度")
87
+    private Double surfaceCrudeOilDensity;
88
+
89
+    @Override
90
+    protected Serializable pkVal() {
91
+        return null;
92
+    }
93
+
94
+
95
+}

+ 122 - 0
src/main/java/com/gct/tool/entity/centralbase/CbTempWellMechRuntime.java

@@ -0,0 +1,122 @@
1
+package com.gct.centralbase.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableName;
4
+import com.baomidou.mybatisplus.extension.activerecord.Model;
5
+
6
+import java.lang.reflect.Field;
7
+import java.time.LocalDateTime;
8
+import java.io.Serializable;
9
+
10
+import com.fasterxml.jackson.annotation.JsonFormat;
11
+import io.swagger.annotations.ApiModel;
12
+import io.swagger.annotations.ApiModelProperty;
13
+import lombok.Data;
14
+import lombok.EqualsAndHashCode;
15
+import lombok.experimental.Accessors;
16
+
17
+/**
18
+ * <p>
19
+ * 机采数据 runtime
20
+ * </p>
21
+ *
22
+ * @author wsy
23
+ * @since 2021-01-19
24
+ */
25
+@Data
26
+@EqualsAndHashCode(callSuper = false)
27
+@Accessors(chain = true)
28
+@ApiModel(value="CbTempWellMechRuntime对象", description="机采数据 runtime")
29
+@TableName("centralbase.cb_temp_well_mech_runtime")
30
+//@ShardingJDBCAnnotation()
31
+public class CbTempWellMechRuntime extends Model<CbTempWellMechRuntime> {
32
+
33
+    private static final long serialVersionUID=1L;
34
+
35
+    private String wellId;
36
+
37
+    @ApiModelProperty(value = "采集日期")
38
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
39
+    private LocalDateTime prodDate;
40
+
41
+
42
+    @ApiModelProperty(value = "理论排量")
43
+    private Double theoDischarge;
44
+
45
+    @ApiModelProperty(value = "示功图解释代码 区别定义厂家,型号,解码方式等")
46
+    private String indiDiagramInterpCode;
47
+
48
+    @ApiModelProperty(value = "动液面 m")
49
+    private Double dynamicLiqLevel;
50
+
51
+    @ApiModelProperty(value = "静液面 m")
52
+    private Double staticLiqLev;
53
+
54
+    @ApiModelProperty(value = "静压 Mpa")
55
+    private Double staticPressure;
56
+
57
+    @ApiModelProperty(value = "流压 MPa")
58
+    private Double flowPres;
59
+
60
+    @ApiModelProperty(value = "泵径;抽油泵的活塞直径 mm")
61
+    private Double pumpDiameter;
62
+
63
+    @ApiModelProperty(value = "泵深;抽油泵下入深度 m")
64
+    private Double pumpDepth;
65
+
66
+    @ApiModelProperty(value = "泵效;抽油泵的抽油效率 %")
67
+    private Double pumpEfficiency;
68
+
69
+    @ApiModelProperty(value = "转速;螺杆泵的转子每分钟旋转的圈数 rpm")
70
+    private Double rotateFrequency;
71
+
72
+    @ApiModelProperty(value = "冲程;抽油机的冲程 m")
73
+    private Double strokeLength;
74
+
75
+    @ApiModelProperty(value = "冲次;抽油机的冲次 次/min")
76
+    private Double strokeFrequency;
77
+
78
+    @ApiModelProperty(value = "悬点最大载荷;抽油机井悬点承受的最大载荷包括液体重量、杆柱重量等 KN")
79
+    private Double suspMaxLoad;
80
+
81
+    @ApiModelProperty(value = "悬点最小载荷;抽油机井悬点承受的最小载荷,出现在下冲程")
82
+    private Double suspMinLoad;
83
+
84
+    @ApiModelProperty(value = "螺杆泵铭牌排量;螺杆泵每转的理论排量")
85
+    private Double pumpTagDischarge;
86
+
87
+    @ApiModelProperty(value = "代表流压梯度 MPa/m")
88
+    private Double repPressureGradientFlow;
89
+
90
+    @ApiModelProperty(value = "泵型")
91
+    private String pumpType;
92
+
93
+    @ApiModelProperty(value = "电机功率 kw")
94
+    private Double electromotorPower;
95
+
96
+    @ApiModelProperty(value = "电流频率")
97
+    private Double elecFrequency;
98
+
99
+    private LocalDateTime diagramInterpCodeTime;
100
+
101
+    @ApiModelProperty(value = "示功图内容")
102
+    private String sgt;
103
+
104
+    @ApiModelProperty(value = "电流 A   A")
105
+    private Double elecPumpCurrentA;
106
+
107
+    private Double elecPumpCurrentB;
108
+
109
+    private Double elecPumpCurrentC;
110
+
111
+    @ApiModelProperty(value = "电功图")
112
+    private String dgt;
113
+
114
+
115
+    @Override
116
+    protected Serializable pkVal() {
117
+        return null;
118
+    }
119
+
120
+
121
+
122
+}

+ 0 - 68
src/main/java/com/gct/tool/entity/excel/LiqAnalyseData.java

@@ -1,68 +0,0 @@
1
-package com.gct.tool.entity.excel;
2
-
3
-import com.alibaba.excel.annotation.ExcelIgnore;
4
-import com.alibaba.excel.annotation.ExcelProperty;
5
-import com.gct.tool.entity.aoid.AoidDailyYield;
6
-import com.gct.tool.entity.aoid.AoidSinglegtYield;
7
-import lombok.AllArgsConstructor;
8
-import lombok.Data;
9
-import lombok.NoArgsConstructor;
10
-
11
-import java.util.List;
12
-
13
-/**
14
- * @author xusirui 2022/9/28
15
- */
16
-@Data
17
-@AllArgsConstructor
18
-@NoArgsConstructor
19
-public class LiqAnalyseData {
20
-
21
-    @ExcelProperty("井号")
22
-    public String wellId;
23
-
24
-    @ExcelProperty("生产日期")
25
-    public String prodDate;
26
-
27
-    @ExcelProperty("日产液")
28
-    public Double liqProd;
29
-
30
-    @ExcelProperty("a2日产液")
31
-    public Double liqProd2;
32
-
33
-    @ExcelProperty("理论日产液")
34
-    public Double theoryLiqProd;
35
-
36
-    @ExcelProperty("误差率")
37
-    public Double errorRate;
38
-
39
-    @ExcelProperty("最大载荷")
40
-    public Double maxLoadDiff;
41
-
42
-    @ExcelProperty("最大理论载荷")
43
-    public Double maxTheoryLoadDiff;
44
-
45
-    @ExcelProperty("最小理论载荷")
46
-    public Double minTheoryLoadDiff;
47
-
48
-    @ExcelProperty("泵深")
49
-    public Double pumpDepth;
50
-
51
-    @ExcelProperty("沉没度")
52
-    public Double submergenceDegree;
53
-
54
-    @ExcelProperty("载荷方差(归一化10处理后计算)")
55
-    public Double loadDifferenceVariance;
56
-
57
-    @ExcelProperty("有效冲程方差(归一化10处理后计算)")
58
-    public Double effectStrokeVariance;
59
-
60
-    @ExcelProperty("分析结果")
61
-    public String analyseResult;
62
-
63
-    @ExcelIgnore
64
-    AoidDailyYield aoidDailyYield;
65
-
66
-    @ExcelIgnore
67
-    List<AoidSinglegtYield> aoidSinglegtYieldList;
68
-}

+ 0 - 38
src/main/java/com/gct/tool/entity/excel/SingleGtData.java

@@ -1,38 +0,0 @@
1
-package com.gct.tool.entity.excel;
2
-
3
-import com.alibaba.excel.annotation.ExcelProperty;
4
-import lombok.AllArgsConstructor;
5
-import lombok.Data;
6
-import lombok.NoArgsConstructor;
7
-
8
-import java.time.LocalDateTime;
9
-
10
-/**
11
- * @author xusirui 2022/11/3
12
- */
13
-@Data
14
-@AllArgsConstructor
15
-@NoArgsConstructor
16
-public class SingleGtData {
17
-
18
-    @ExcelProperty("井号")
19
-    public String wellId;
20
-
21
-    @ExcelProperty("生产日期")
22
-    public String prodDate;
23
-
24
-    @ExcelProperty("最大载荷")
25
-    public Double maxLoad;
26
-
27
-    @ExcelProperty("最小载荷")
28
-    public Double minLoad;
29
-
30
-    @ExcelProperty("功图")
31
-    public String workDiagram;
32
-
33
-    @ExcelProperty("功图面积")
34
-    public Double workDiagramArea;
35
-
36
-    @ExcelProperty("分析结果")
37
-    public String analyseResult;
38
-}

+ 0 - 24
src/main/java/com/gct/tool/mapper/aoid/AoidDailyYieldMapper.java

@@ -1,24 +0,0 @@
1
-package com.gct.tool.mapper.aoid;
2
-
3
-import com.baomidou.dynamic.datasource.annotation.DS;
4
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
-import com.baomidou.mybatisplus.core.metadata.IPage;
6
-import com.gct.tool.entity.aoid.AoidDailyYield;
7
-import org.apache.ibatis.annotations.Mapper;
8
-import org.apache.ibatis.annotations.Param;
9
-
10
-import java.time.LocalDateTime;
11
-import java.util.List;
12
-import java.util.Map;
13
-
14
-
15
-/**
16
- * @Author: Jyx
17
- * @Since: 2021/1/28 22:23
18
- */
19
-@Mapper
20
-@DS("aoid")
21
-public interface AoidDailyYieldMapper extends BaseMapper<AoidDailyYield> {
22
-
23
-
24
-}

+ 0 - 55
src/main/java/com/gct/tool/mapper/aoid/AoidDailyYieldMapper.xml

@@ -1,55 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.gct.tool.mapper.aoid.AoidDailyYieldMapper">
4
-
5
-    <!-- 通用查询映射结果 -->
6
-    <resultMap id="BaseResultMap" type="com.gct.tool.entity.aoid.AoidDailyYield">
7
-        <result column="well_common_name" property="wellCommonName" />
8
-        <result column="well_id" property="wellId" />
9
-        <result column="prod_date" property="prodDate" />
10
-        <result column="liq_prod_daily" property="liqProdDaily" />
11
-        <result column="oil_prod_daily" property="oilProdDaily" />
12
-        <result column="water_prod_daily" property="waterProdDaily" />
13
-        <result column="gas_prod_daily" property="gasProdDaily" />
14
-        <result column="bx" property="bx" />
15
-        <result column="llpl" property="llpl" />
16
-        <result column="prod_time" property="prodTime" />
17
-        <result column="clxs" property="clxs" />
18
-        <result column="stroke" property="stroke" />
19
-        <result column="frequence" property="frequence" />
20
-        <result column="water_cut" property="waterCut" />
21
-        <result column="bj" property="bj" />
22
-        <result column="bs" property="bs" />
23
-        <result column="cmd" property="cmd" />
24
-        <result column="yz" property="yz" />
25
-        <result column="scsj" property="scsj" />
26
-        <result column="yy" property="yy" />
27
-        <result column="hy" property="hy" />
28
-        <result column="ty" property="ty" />
29
-        <result column="bz" property="bz" />
30
-        <result column="sfyc" property="sfyc" />
31
-        <result column="dym" property="dym" />
32
-        <result column="rcy2" property="rcy2" />
33
-        <result column="rcu2" property="rcu2" />
34
-        <result column="rcs2" property="rcs2" />
35
-        <result column="a2_liq_prod_daily" property="a2LiqProdDaily" />
36
-        <result column="a2_oil_prod_daily" property="a2OilProdDaily" />
37
-        <result column="a2_water_prod_daily" property="a2WaterProdDaily" />
38
-        <result column="a2_gas_prod_daily" property="a2GasProdDaily" />
39
-        <result column="a2_water_cut" property="a2WaterCut" />
40
-        <result column="a2_prod_time" property="a2ProdTime" />
41
-        <result column="yxgts" property="yxgts" />
42
-        <result column="errorgts" property="errorgts" />
43
-        <result column="zdjg" property="zdjg" />
44
-        <result column="djdy" property="djdy" />
45
-        <result column="zyq" property="zyq" />
46
-        <result column="jlz" property="jlz" />
47
-        <result column="hjwd" property="hjwd" />
48
-        <result column="ybdl" property="ybdl" />
49
-        <result column="sbh" property="sbh" />
50
-        <result column="xhqd" property="xhqd" />
51
-        <result column="yl" property="yl" />
52
-        <result column="rzbz" property="rzbz" />
53
-    </resultMap>
54
-
55
-</mapper>

+ 0 - 17
src/main/java/com/gct/tool/mapper/aoid/AoidSinglegtYieldMapper.java

@@ -1,17 +0,0 @@
1
-package com.gct.tool.mapper.aoid;
2
-
3
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
-import com.gct.tool.entity.aoid.AoidSinglegtYield;
5
-import org.apache.ibatis.annotations.Mapper;
6
-
7
-/**
8
- * <p>
9
- *  Mapper 接口
10
- * </p>
11
- *
12
- * @author Lloyd
13
- * @since 2021-01-31
14
- */
15
-@Mapper
16
-public interface AoidSinglegtYieldMapper extends BaseMapper<AoidSinglegtYield> {
17
-}

+ 0 - 63
src/main/java/com/gct/tool/mapper/aoid/AoidSinglegtYieldMapper.xml

@@ -1,63 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.gct.tool.mapper.aoid.AoidSinglegtYieldMapper">
4
-
5
-    <!-- 通用查询映射结果 -->
6
-    <resultMap id="BaseResultMap" type="com.gct.tool.entity.aoid.AoidSinglegtYield">
7
-        <id column="well_id" property="wellId" />
8
-        <result column="well_common_name" property="wellCommonName" />
9
-        <result column="prod_date" property="prodDate" />
10
-        <result column="stroke" property="stroke" />
11
-        <result column="frequence" property="frequence" />
12
-        <result column="bj" property="bj" />
13
-        <result column="bs" property="bs" />
14
-        <result column="cmd" property="cmd" />
15
-        <result column="yzzj" property="yzzj" />
16
-        <result column="sxzh" property="sxzh" />
17
-        <result column="xxzh" property="xxzh" />
18
-        <result column="sgt" property="sgt" />
19
-        <result column="bgt" property="bgt" />
20
-        <result column="zdjg" property="zdjg" />
21
-        <result column="liq_prod_daily" property="liqProdDaily" />
22
-        <result column="oil_prod_daily" property="oilProdDaily" />
23
-        <result column="gas_prod_daily" property="gasProdDaily" />
24
-        <result column="eczdjg" property="eczdjg" />
25
-        <result column="bx" property="bx" />
26
-        <result column="hsl" property="hsl" />
27
-        <result column="flag" property="flag" />
28
-        <result column="bdxs" property="bdxs" />
29
-        <result column="llpl" property="llpl" />
30
-        <result column="zcc" property="zcc" />
31
-        <result column="ycc" property="ycc" />
32
-        <result column="sjcc" property="sjcc" />
33
-        <result column="yxcc" property="yxcc" />
34
-        <result column="ccss" property="ccss" />
35
-        <result column="lsss" property="lsss" />
36
-        <result column="gyss" property="gyss" />
37
-        <result column="pumpdepth" property="pumpdepth" />
38
-        <result column="hy" property="hy" />
39
-        <result column="yy" property="yy" />
40
-        <result column="ty" property="ty" />
41
-        <result column="water_prod_daily" property="waterProdDaily" />
42
-        <result column="scsj" property="scsj" />
43
-        <result column="qyb" property="qyb" />
44
-        <result column="stroke_ratio" property="strokeRatio" />
45
-        <result column="djdy" property="djdy" />
46
-        <result column="hjwd" property="hjwd" />
47
-        <result column="ybdl" property="ybdl" />
48
-        <result column="xhqd" property="xhqd" />
49
-        <result column="sbh" property="sbh" />
50
-        <result column="a2_liq_prod_daily" property="a2LiqProdDaily" />
51
-        <result column="a2_oil_prod_daily" property="a2OilProdDaily" />
52
-        <result column="a2_water_prod_daily" property="a2WaterProdDaily" />
53
-        <result column="a2_gas_prod_daily" property="a2GasProdDaily" />
54
-        <result column="a2_remark" property="a2Remark" />
55
-        <result column="a2_prod_time" property="a2ProdTime" />
56
-        <result column="a2_water_cut" property="a2WaterCut" />
57
-        <result column="sgt_is_legal" property="sgtIsLegal" />
58
-        <result column="cal_is_normal" property="calIsNormal" />
59
-        <result column="create_time" property="createTime" />
60
-        <result column="update_time" property="updateTime" />
61
-    </resultMap>
62
-
63
-</mapper>

+ 0 - 8
src/main/java/com/gct/tool/service/aoid/AoidDailyYieldService.java

@@ -1,8 +0,0 @@
1
-package com.gct.tool.service.aoid;
2
-
3
-import com.baomidou.mybatisplus.extension.service.IService;
4
-import com.gct.tool.entity.aoid.AoidDailyYield;
5
-
6
-public interface AoidDailyYieldService extends IService<AoidDailyYield> {
7
-
8
-}

+ 0 - 14
src/main/java/com/gct/tool/service/aoid/AoidDailyYieldServiceImpl.java

@@ -1,14 +0,0 @@
1
-package com.gct.tool.service.aoid;
2
-
3
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
-import com.gct.tool.entity.aoid.AoidDailyYield;
5
-import com.gct.tool.mapper.aoid.AoidDailyYieldMapper;
6
-import lombok.extern.slf4j.Slf4j;
7
-import org.springframework.stereotype.Service;
8
-
9
-@Service
10
-@Slf4j
11
-public class AoidDailyYieldServiceImpl extends ServiceImpl<AoidDailyYieldMapper, AoidDailyYield> implements AoidDailyYieldService{
12
-
13
-
14
-}

+ 0 - 8
src/main/java/com/gct/tool/service/aoid/AoidSinglegtYieldService.java

@@ -1,8 +0,0 @@
1
-package com.gct.tool.service.aoid;
2
-
3
-import com.baomidou.mybatisplus.extension.service.IService;
4
-import com.gct.tool.entity.aoid.AoidSinglegtYield;
5
-
6
-public interface AoidSinglegtYieldService extends IService<AoidSinglegtYield> {
7
-
8
-}

+ 0 - 19
src/main/java/com/gct/tool/service/aoid/AoidSinglegtYieldServiceImpl.java

@@ -1,19 +0,0 @@
1
-package com.gct.tool.service.aoid;
2
-
3
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
-import com.gct.tool.entity.aoid.AoidSinglegtYield;
5
-import com.gct.tool.mapper.aoid.AoidSinglegtYieldMapper;
6
-import org.springframework.stereotype.Service;
7
-
8
-/**
9
- * <p>
10
- * 服务实现类
11
- * </p>
12
- *
13
- * @author 王森玉
14
- * @since 2021-01-31
15
- */
16
-@Service
17
-public class AoidSinglegtYieldServiceImpl extends ServiceImpl<AoidSinglegtYieldMapper, AoidSinglegtYield> implements AoidSinglegtYieldService {
18
-
19
-}

+ 0 - 145
src/main/java/com/gct/tool/service/impl/DataAnalyseService.java

@@ -1,145 +0,0 @@
1
-package com.gct.tool.service.impl;
2
-
3
-import com.alibaba.excel.EasyExcel;
4
-import com.alibaba.excel.ExcelWriter;
5
-import com.alibaba.excel.write.metadata.WriteSheet;
6
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
7
-import com.gct.common.util.SGTUtil;
8
-import com.gct.tool.entity.aoid.AoidSinglegtYield;
9
-import com.gct.tool.entity.excel.LiqAnalyseData;
10
-import com.gct.tool.entity.excel.SingleGtData;
11
-import com.gct.tool.service.aoid.AoidDailyYieldService;
12
-import com.gct.tool.service.aoid.AoidSinglegtYieldService;
13
-import com.gct.tool.service.centralbase.CbCdWellSourceService;
14
-import org.springframework.beans.factory.annotation.Autowired;
15
-import org.springframework.beans.factory.annotation.Value;
16
-import org.springframework.boot.ApplicationArguments;
17
-import org.springframework.boot.ApplicationRunner;
18
-import org.springframework.core.io.ClassPathResource;
19
-import org.springframework.stereotype.Service;
20
-
21
-import java.io.BufferedReader;
22
-import java.io.File;
23
-import java.io.IOException;
24
-import java.io.InputStreamReader;
25
-import java.time.LocalDate;
26
-import java.time.format.DateTimeFormatter;
27
-import java.util.ArrayList;
28
-import java.util.Arrays;
29
-import java.util.Comparator;
30
-import java.util.List;
31
-import java.util.stream.Collectors;
32
-
33
-/**
34
- * @author xusirui 2022/9/28
35
- */
36
-@Service
37
-public class DataAnalyseService implements ApplicationRunner {
38
-
39
-    @Value("${gt-total}")
40
-    Integer gtTotal;
41
-
42
-    @Value("${begin-date}")
43
-    String beginDate;
44
-
45
-    @Value("${end-date}")
46
-    String endDate;
47
-
48
-    @Autowired
49
-    AoidDailyYieldService aoidDailyYieldService;
50
-
51
-    @Autowired
52
-    CbCdWellSourceService cbCdWellSourceService;
53
-
54
-    @Autowired
55
-    AoidSinglegtYieldService aoidSinglegtYieldService;
56
-
57
-    private final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
58
-
59
-    private final String excelFileBasePath = System.getProperty("user.dir") + "/.excel/";
60
-
61
-    public DataAnalyseService() {
62
-        File file = new File(excelFileBasePath);
63
-        if (!file.exists()) file.mkdirs();
64
-    }
65
-
66
-    public void produceLiqAnalyseTotal(){
67
-        for(LocalDate date = LocalDate.parse(beginDate);date.isBefore(LocalDate.parse(endDate));date = date.plusMonths(1)){
68
-            produceLiqAnalyseMonth(date);
69
-        }
70
-    }
71
-
72
-    public List<String> readWellIds(){
73
-        try{
74
-            ClassPathResource resource = new ClassPathResource("wellIds.txt");
75
-            BufferedReader br = new BufferedReader(new InputStreamReader(resource.getInputStream()));
76
-            String wellId;
77
-            List<String> wellIds = new ArrayList<>();
78
-            while ((wellId = br.readLine())!=null){
79
-                wellIds.add(wellId);
80
-            }
81
-            return wellIds;
82
-        }catch (Exception e){
83
-            e.printStackTrace();
84
-        }
85
-        return new ArrayList<>();
86
-    }
87
-
88
-    public void produceLiqAnalyseMonth(LocalDate beginDate) {
89
-        String fileName = excelFileBasePath + "功图数据-" + beginDate.format(DateTimeFormatter.ofPattern("yyyy-MM")) + ".xlsx";
90
-        File file = new File(fileName);
91
-        if (!file.exists()) {
92
-            try {
93
-                file.createNewFile();
94
-            } catch (IOException e) {
95
-                e.printStackTrace();
96
-            }
97
-        }
98
-        ExcelWriter excelWriter = EasyExcel.write(fileName, SingleGtData.class).build();
99
-        List<String> wellIds = readWellIds();
100
-        for (LocalDate date = beginDate;date.isBefore(beginDate.plusMonths(1));date = date.plusDays(1)){
101
-            System.out.println(date.format(DateTimeFormatter.ISO_LOCAL_DATE));
102
-            final LocalDate produceDate = date;
103
-                WriteSheet writeSheet = EasyExcel.writerSheet("第二采油作业区").build();
104
-                List<SingleGtData> singleGtDatas = aoidSinglegtYieldService.list(new QueryWrapper<AoidSinglegtYield>()
105
-                        .eq("prod_date::date", produceDate)
106
-                        .in("well_id",wellIds))
107
-                        .stream()
108
-                        .filter(aoidSinglegtYield -> aoidSinglegtYield.getSgtIsLegal() == 1)
109
-                        .map(aoidSinglegtYield -> {
110
-                            SingleGtData singleGtData = new SingleGtData();
111
-                            singleGtData.setProdDate(aoidSinglegtYield.getProdDate().format(formatter));
112
-                            singleGtData.setWorkDiagram(aoidSinglegtYield.getSgt());
113
-                            double[][] sgt = SGTUtil.encodeToUseArray(aoidSinglegtYield.getSgt());
114
-                            double[] maxLoadP = Arrays.stream(sgt).max(Comparator.comparingDouble(x -> x[1])).get();
115
-                            double[] minLoadP = Arrays.stream(sgt).min(Comparator.comparingDouble(x -> x[1])).get();
116
-                            singleGtData.setMaxLoad(maxLoadP[1]);
117
-                            singleGtData.setMinLoad(minLoadP[1]);
118
-                            singleGtData.setWellId(aoidSinglegtYield.getWellId());
119
-                            singleGtData.setAnalyseResult(aoidSinglegtYield.getEczdjg());
120
-                            double s = 0;
121
-                            for (int i = 0; i < sgt.length / 2 - 1; i++) {
122
-                                double h = Math.abs(sgt[i][0] - sgt[i + 1][0]);
123
-                                double Si = (sgt[i][1] + sgt[i + 1][1]) * h / 2.0;
124
-                                s += Si;
125
-                            }
126
-                            for (int i = sgt.length / 2 - 1; i < sgt.length - 1; i++) {
127
-                                double h = Math.abs(sgt[i][0] - sgt[i + 1][0]);
128
-                                double Si = (sgt[i][1] + sgt[i + 1][1]) * h / 2.0;
129
-                                s -= Si;
130
-                            }
131
-                            singleGtData.setWorkDiagramArea(s);
132
-                            return singleGtData;
133
-                        }).collect(Collectors.toList());
134
-                excelWriter.write(singleGtDatas, writeSheet);
135
-        }
136
-        excelWriter.finish();
137
-    }
138
-
139
-
140
-    @Override
141
-    public void run(ApplicationArguments args) throws Exception {
142
-        produceLiqAnalyseTotal();
143
-        System.exit(0);
144
-    }
145
-}

+ 10 - 10
src/main/resources/application-pro.yml

@@ -18,22 +18,22 @@ spring:
18 18
     ## 指定nacos server地址
19 19
     nacos:
20 20
       discovery:
21
-        server-addr: 11.72.128.68
21
+        server-addr: 10.79.32.183
22 22
 
23 23
   datasource:
24 24
     dynamic:
25 25
       primary: aoid
26 26
       strict: true
27 27
       datasource:
28
-        aoid:
29
-          type: com.zaxxer.hikari.HikariDataSource
30
-          url: jdbc:postgresql://11.72.128.68:54321/calliquid
31
-          username: root
32
-          password: 123456
33
-          driver-class-name: org.postgresql.Driver
28
+#        a2:
29
+#          type: com.zaxxer.hikari.HikariDataSource
30
+#          url: jdbc:postgresql://10.79.32.183:54321/calliquid
31
+#          username: root
32
+#          password: 123456
33
+#          driver-class-name: oracle.jdbc.driver.OracleDriver
34 34
         centralbase:
35 35
           type: com.zaxxer.hikari.HikariDataSource
36
-          url: jdbc:postgresql://11.72.128.68:54321/database
36
+          url: jdbc:postgresql://10.79.32.183:54321/database
37 37
           username: root
38 38
           password: 123456
39 39
           driver-class-name: org.postgresql.Driver
@@ -56,5 +56,5 @@ swagger:
56 56
   enabled: true
57 57
 
58 58
 gt-total: 24
59
-begin-date: 2022-05-01
60
-end-date: 2022-11-01
59
+begin-date: 2022-11-28
60
+end-date: 2022-12-08

+ 0 - 100
src/main/resources/wellIds.txt

@@ -1,100 +0,0 @@
1
-0004
2
-0010
3
-0016A
4
-0023
5
-00251
6
-00252
7
-0028
8
-0030
9
-0031
10
-0035
11
-0036
12
-0037
13
-0039
14
-0041
15
-00453
16
-0047
17
-0051
18
-0055
19
-0059
20
-0064
21
-0068
22
-0070
23
-0073
24
-0079
25
-0083
26
-0084
27
-0089
28
-0090
29
-0095
30
-0207
31
-0208
32
-0209
33
-0211
34
-0213
35
-0218
36
-0605
37
-0608
38
-0616
39
-0617
40
-0706
41
-0708
42
-0709
43
-0781
44
-0912
45
-0913
46
-0914
47
-7601
48
-7603
49
-7608
50
-CH0405
51
-CH0507
52
-CH0509
53
-CH21008
54
-CH21076
55
-CH21077
56
-CH35001
57
-CH35004
58
-CH35014
59
-CH35015
60
-CH35026
61
-CH35027
62
-CH3505
63
-CH3507
64
-CH3508
65
-CH3516
66
-CH7209
67
-CH7244
68
-CHD35007
69
-h0113
70
-h0115
71
-h0117
72
-h0118
73
-h0120
74
-h0124
75
-h0126
76
-h0127
77
-h0128
78
-h0131
79
-h0133
80
-h0143
81
-h0145
82
-h0155
83
-h0156
84
-h0161
85
-h0164
86
-h0169
87
-h0174
88
-h0203
89
-h0225
90
-h0226
91
-h0229
92
-h0239
93
-h0542
94
-h0546
95
-h0549
96
-h0552
97
-h0554
98
-h0558
99
-h0559
100
-h0570