3 Commits ab4d69b762 ... 9fe71a3273

Author SHA1 Message Date
  lloyd 9fe71a3273 抽稀计算液量对比完成 5 months ago
  lloyd 8d479cb779 Merge remote-tracking branch 'origin/data-fix' into data-fix 5 months ago
  lloyd 49f752e98e 11 5 months ago

+ 25 - 28
src/main/java/com/gct/edge/actuator/config/FeignConfig.java

@@ -1,14 +1,14 @@
1 1
 package com.gct.edge.actuator.config;
2 2
 
3 3
 
4
+import com.gct.common.util.StringUtil;
4 5
 import feign.RequestInterceptor;
5 6
 import feign.RequestTemplate;
6 7
 import lombok.extern.slf4j.Slf4j;
7
-import org.springframework.context.EnvironmentAware;
8
+import org.springframework.beans.factory.annotation.Value;
8 9
 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
9 10
 import org.springframework.context.annotation.Bean;
10 11
 import org.springframework.context.annotation.Configuration;
11
-import org.springframework.core.env.Environment;
12 12
 import org.springframework.web.client.RestTemplate;
13 13
 
14 14
 import java.util.Arrays;
@@ -16,43 +16,40 @@ import java.util.List;
16 16
 import java.util.concurrent.ThreadLocalRandom;
17 17
 
18 18
 
19
-/**
20
- * feign 调用配置,统一添加token请求头
21
- * @author: NewMeanning
22
- * @create: 2021-01-29 00:10
23
- **/
24 19
 @Slf4j
25 20
 @Configuration
26
-public class FeignConfig implements RequestInterceptor, EnvironmentAware {
21
+public class FeignConfig implements RequestInterceptor {
27 22
 
23
+    @Value("${auth.hostList}")
24
+    private String tokeAuthUrl;
28 25
     private static String token;
29 26
 
30
-    private static Environment env;
27
+    private final static String lockStr = "token";
31 28
 
32 29
     @Bean(name = "restTemplate")
33
-    RestTemplate getRestTemplate(){
30
+    RestTemplate getRestTemplate() {
34 31
         return new RestTemplate();
35 32
     }
36 33
 
37 34
     @Override
38 35
     public void apply(RequestTemplate requestTemplate) {
39
-        requestTemplate.header("token",token);//请求头添加token
40
-    }
41
-
42
-    @Override
43
-    public void setEnvironment(Environment environment) {
44
-        //获取配置的认证中心主机地址  todo 升级为自动从Nacos中读取,目前这里读取不到
45
-        this.env = environment;
46
-        List<String> hostList = Arrays.asList(this.env.getProperty("auth.hostList").split(","));
47
-        //手动获取RestTemplate 实例
48
-        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
49
-        applicationContext.register(RestTemplate.class);
50
-        applicationContext.refresh();
51
-        RestTemplate restTemplate= (RestTemplate) applicationContext.getBean("restTemplate");
52
-        //自定义轮询方式负载
53
-        int index = ThreadLocalRandom.current().nextInt(hostList.size());
54
-        String url = "http://"+hostList.get(index)+"/token";
55
-        token = restTemplate.getForObject(url,String.class);
56
-        log.info("token:{}",token);
36
+        if (StringUtil.isBlankOrEmpty(token)) {
37
+            synchronized (lockStr) {
38
+                if (StringUtil.isBlankOrEmpty(token)) {
39
+                    List<String> hostList = Arrays.asList(tokeAuthUrl.split(","));
40
+                    //手动获取RestTemplate 实例
41
+                    AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
42
+                    applicationContext.register(RestTemplate.class);
43
+                    applicationContext.refresh();
44
+                    RestTemplate restTemplate = (RestTemplate) applicationContext.getBean("restTemplate");
45
+                    //自定义轮询方式负载
46
+                    int index = ThreadLocalRandom.current().nextInt(hostList.size());
47
+                    String url = "http://" + hostList.get(index) + "/token";
48
+                    token = restTemplate.getForObject(url, String.class);
49
+                    log.info("token:{}", token);
50
+                }
51
+            }
52
+        }
53
+        requestTemplate.header("token", token);//请求头添加token
57 54
     }
58 55
 }

+ 30 - 9
src/main/java/com/gct/edge/actuator/controller/YieldDailyController.java

@@ -8,6 +8,7 @@ import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
8 8
 import com.alibaba.fastjson.JSON;
9 9
 import com.alibaba.fastjson.JSONObject;
10 10
 import com.gct.common.core.result.Result;
11
+import com.gct.common.util.DateTimeUtil;
11 12
 import com.gct.common.util.StringUtil;
12 13
 import com.gct.edge.actuator.entity.YieldDaily;
13 14
 import com.gct.edge.actuator.entity.excel.YieldDailyExcelObj;
@@ -36,25 +37,25 @@ public class YieldDailyController {
36 37
     public Result getWellProdData(@RequestParam String moduleKey, @RequestParam String wellId,
37 38
                                   @RequestParam String beginDate, @RequestParam String endDate,
38 39
                                   @RequestParam Integer curPage, @RequestParam Integer pageSize) {
39
-        return Result.ok(yieldDailyService.getWellProdData(moduleKey,wellId,beginDate,endDate,curPage,pageSize));
40
+        return Result.ok(yieldDailyService.getWellProdData(moduleKey, wellId, beginDate, endDate, curPage, pageSize));
40 41
     }
41 42
 
42 43
     @GetMapping("/getWellProdGraph")
43 44
     public Result getWellProdGraph(@RequestParam String moduleKey, @RequestParam String wellId,
44
-                                   @RequestParam String beginDate, @RequestParam String endDate){
45
+                                   @RequestParam String beginDate, @RequestParam String endDate) {
45 46
         if (StringUtil.isBlankOrEmpty(moduleKey)) return Result.error("参数条件不足");
46
-        return Result.ok(yieldDailyService.getWellProdGraph(moduleKey,wellId,beginDate,endDate));
47
+        return Result.ok(yieldDailyService.getWellProdGraph(moduleKey, wellId, beginDate, endDate));
47 48
     }
48 49
 
49 50
     @PostMapping("/exportWellProdData")
50
-    public void exportWellProdData(@RequestBody JSONObject param, HttpServletResponse response) throws IOException{
51
+    public void exportWellProdData(@RequestBody JSONObject param, HttpServletResponse response) throws IOException {
51 52
         String moduleKey = param.getString("moduleKey");
52
-        String wellId  = param.getString("wellId");
53
+        String wellId = param.getString("wellId");
53 54
         String beginDate = param.getString("beginDate");
54 55
         String endDate = param.getString("endDate");
55 56
         List<YieldDaily> list = yieldDailyService.getWellProdData(moduleKey, wellId, beginDate, endDate);
56 57
         List<YieldDailyExcelObj> collect = list.stream().map(
57
-                x-> {
58
+                x -> {
58 59
                     //大转小
59 60
                     YieldDailyExcelObj excelObj = ((JSONObject) JSON.toJSON(x)).toJavaObject(YieldDailyExcelObj.class);
60 61
                     excelObj.setProTimeStr(excelObj.getProTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
@@ -67,15 +68,35 @@ public class YieldDailyController {
67 68
                 .registerWriteHandler(new AbstractColumnWidthStyleStrategy() {
68 69
                     @Override
69 70
                     protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<CellData> list, Cell cell, Head head, Integer integer, Boolean aBoolean) {
70
-                        writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(),3500);
71
+                        writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), 3500);
71 72
                     }
72 73
                 }).sheet("sheet1").doWrite(collect);
73 74
     }
74 75
 
75 76
     @GetMapping("/calculate")
76 77
     public Result calculate(@RequestParam String moduleKey,
77
-                               @RequestParam String wellIdList,
78
-                               @RequestParam String startTime) {
78
+                            @RequestParam String wellIdList,
79
+                            @RequestParam String startTime) {
79 80
         return yieldDailyService.calculate(moduleKey, wellIdList, startTime);
80 81
     }
82
+
83
+    @GetMapping("/calculate/daily-yield/dilution")
84
+    public Result calDailyYieldWithDilution(@RequestParam String moduleKey,
85
+                                            @RequestParam String wellId,
86
+                                            @RequestParam String wellName,
87
+                                            @RequestParam int dilution,
88
+                                            @RequestParam String date) {
89
+        if (StringUtil.isBlankOrEmpty(moduleKey) || StringUtil.isBlankOrEmpty(wellId) || StringUtil.isBlankOrEmpty(wellName) || StringUtil.isBlankOrEmpty(date))
90
+            return Result.error("请求参数不合法");
91
+        return yieldDailyService.calDailyYieldWithDilution(moduleKey, wellId, date, dilution, wellName);
92
+    }
93
+    @GetMapping("/daily-yield/one")
94
+    public Result selectOne(@RequestParam String moduleKey,
95
+                                            @RequestParam String wellId,
96
+                                            @RequestParam String date) {
97
+        if (StringUtil.isBlankOrEmpty(moduleKey) || StringUtil.isBlankOrEmpty(wellId) ||  StringUtil.isBlankOrEmpty(date))
98
+            return Result.error("请求参数不合法");
99
+        return yieldDailyService.selectOne(moduleKey, wellId, date);
100
+    }
101
+
81 102
 }

+ 12 - 0
src/main/java/com/gct/edge/actuator/entity/Date2.java

@@ -0,0 +1,12 @@
1
+package com.gct.edge.actuator.entity;
2
+
3
+@Deprecated
4
+public class Date2 {
5
+    public String start;
6
+    public String end;
7
+
8
+    public Date2(String start, String end) {
9
+        this.start = start;
10
+        this.end = end;
11
+    }
12
+}

+ 6 - 0
src/main/java/com/gct/edge/actuator/mapper/YieldRealTimeMapper.java

@@ -1,10 +1,14 @@
1 1
 package com.gct.edge.actuator.mapper;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.gct.edge.actuator.entity.Date2;
4 5
 import com.gct.edge.actuator.entity.YieldRealTime;
5 6
 import org.apache.ibatis.annotations.Mapper;
6 7
 import org.apache.ibatis.annotations.Param;
7 8
 
9
+import java.util.ArrayList;
10
+import java.util.List;
11
+
8 12
 /**
9 13
  * @author xusirui 2021/10/26
10 14
  */
@@ -12,4 +16,6 @@ import org.apache.ibatis.annotations.Param;
12 16
 public interface YieldRealTimeMapper extends BaseMapper<YieldRealTime> {
13 17
 
14 18
     int insertOneOnConflictDoNothing(@Param("one") YieldRealTime one);
19
+
20
+//    List<YieldRealTime> queryRangeFirst(String moduleKey, String wellId, ArrayList<Date2> dateList);
15 21
 }

File diff suppressed because it is too large
+ 53 - 1
src/main/java/com/gct/edge/actuator/mapper/YieldRealTimeMapper.xml


+ 4 - 0
src/main/java/com/gct/edge/actuator/service/YieldDailyService.java

@@ -21,4 +21,8 @@ public interface YieldDailyService extends IService<YieldDaily> {
21 21
     Result calculate(String moduleKey, String wellIdList, String startTime);
22 22
 
23 23
     List<YieldDaily> getAoidDailyYieldInfoByWellId(String moduleKey,String wellName, String startDate);
24
+
25
+    Result calDailyYieldWithDilution(String moduleKey, String wellId, String date,int dilution,String wellName);
26
+
27
+    Result selectOne(String moduleKey, String wellId, String date);
24 28
 }

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

@@ -23,6 +23,7 @@ public interface YieldService {
23 23
     Result getWellIdsByNew(String moduleKey, String startDate);
24 24
 
25 25
     List<YieldRealTime> getYieldRealTimeInfoByWellId(String moduleKey,String wellId, String startdate);
26
+    List<YieldRealTime> getRealYieldWithDilution(String moduleKey,String wellId, String date,int dilutionVal);
26 27
 
27 28
     JSONArray getWellInfo(String moduleKey, String wellId, String prodTime);
28 29
 

+ 33 - 4
src/main/java/com/gct/edge/actuator/service/impl/YieldDailyServiceImpl.java

@@ -100,6 +100,29 @@ public class YieldDailyServiceImpl extends ServicePlusImpl<YieldDailyMapper, Yie
100 100
         return openTotalTime;//h
101 101
     }
102 102
 
103
+    @Override
104
+    public Result selectOne(String moduleKey, String wellId, String date) {
105
+        LambdaQueryWrapper<YieldDaily> queryWrapper = new LambdaQueryWrapper<YieldDaily>()
106
+                .eq(YieldDaily::getModuleKey, moduleKey)
107
+                .eq(YieldDaily::getWellId, wellId)
108
+                .eq(YieldDaily::getProTime, DateTimeUtil.formatDateTime(date+" 00:00:00"));
109
+        YieldDaily one = yieldDailyMapper.selectOne(queryWrapper);
110
+        if (Objects.isNull(one)) return Result.error("查无数据");
111
+        return Result.ok(one);
112
+    }
113
+
114
+    @Override
115
+    public Result calDailyYieldWithDilution(String moduleKey, String wellId, String date, int dilution, String wellName) {
116
+        List<YieldRealTime> lis = yieldService.getRealYieldWithDilution(moduleKey, wellId, date, dilution);
117
+        List<AoidProdState> states = aoidProdStateService.getAoidProdStateList(moduleKey, wellId, date);
118
+        double prodTotalTime = calProdTime(states);
119
+        try {
120
+            return Result.ok(calculate_yield(lis, date, wellName, moduleKey, wellId, prodTotalTime));
121
+        } catch (Exception e) {
122
+            return Result.error(e.getMessage());
123
+        }
124
+    }
125
+
103 126
     private boolean calculate_yield_cal(String moduleKey, String wellIdList, String startTime) {
104 127
         JSONArray wells = JSON.parseArray(wellIdList);
105 128
         for (Object well : wells) {
@@ -108,7 +131,7 @@ public class YieldDailyServiceImpl extends ServicePlusImpl<YieldDailyMapper, Yie
108 131
             List<YieldRealTime> lis = yieldService.getYieldRealTimeInfoByWellId(moduleKey, wellId, startTime);
109 132
             List<AoidProdState> states = aoidProdStateService.getAoidProdStateList(moduleKey, wellId, startTime);
110 133
             double prodTotalTime = calProdTime(states);
111
-            calculate_yield(lis, startTime, wellName, moduleKey, wellId, prodTotalTime);
134
+            saveDailyYieldResult(calculate_yield(lis, startTime, wellName, moduleKey, wellId, prodTotalTime));
112 135
 
113 136
 
114 137
         }
@@ -119,7 +142,7 @@ public class YieldDailyServiceImpl extends ServicePlusImpl<YieldDailyMapper, Yie
119 142
         re.setBz((StringUtil.isBlankOrEmpty(re.getBz()) ? "" : re.getBz() + ";") + newRemark);
120 143
     }
121 144
 
122
-    private void calculate_yield(List<YieldRealTime> lis, String startTime, String wellName, String moduleKey, String wellId, Double prodTime) {
145
+    private YieldDaily calculate_yield(List<YieldRealTime> lis, String startTime, String wellName, String moduleKey, String wellId, Double prodTime) {
123 146
         //必要的初始化
124 147
         YieldDaily re = new YieldDaily() {
125 148
             {
@@ -243,7 +266,15 @@ public class YieldDailyServiceImpl extends ServicePlusImpl<YieldDailyMapper, Yie
243 266
         if (Objects.nonNull(re.getBx())) re.setBx(Math.round(re.getBx() * 10) / 10d);
244 267
         if (Objects.nonNull(re.getLlpl())) re.setLlpl(Math.round(re.getLlpl() * 10) / 10d);
245 268
         if (Objects.nonNull(re.getWaterCut())) re.setWaterCut(Math.round(re.getWaterCut() * 10) / 10d);
269
+        re.setYxgts(calNormalCount);
270
+        re.setErrorgts(lis.size() - calNormalCount);
246 271
         //endregion
272
+
273
+
274
+        return re;
275
+    }
276
+
277
+    private void saveDailyYieldResult(YieldDaily re) {
247 278
         YieldDaily one = baseMapper.selectOne(new LambdaQueryWrapper<YieldDaily>()
248 279
                 .eq(YieldDaily::getModuleKey, re.getModuleKey())
249 280
                 .eq(YieldDaily::getWellId, re.getWellId())
@@ -253,8 +284,6 @@ public class YieldDailyServiceImpl extends ServicePlusImpl<YieldDailyMapper, Yie
253 284
                 .eq(YieldDaily::getModuleKey, re.getModuleKey())
254 285
                 .eq(YieldDaily::getWellId, re.getWellId())
255 286
                 .eq(YieldDaily::getProTime, re.getProTime()));
256
-
257
-
258 287
     }
259 288
 
260 289
     @Override

+ 55 - 21
src/main/java/com/gct/edge/actuator/service/impl/YieldServiceImpl.java

@@ -8,6 +8,7 @@ import com.gct.common.core.result.Result;
8 8
 import com.gct.common.util.DateTimeUtil;
9 9
 import com.gct.common.util.StringUtil;
10 10
 import com.gct.edge.actuator.algorithm.CalIntegral;
11
+import com.gct.edge.actuator.entity.Date2;
11 12
 import com.gct.edge.actuator.entity.YieldRealTime;
12 13
 import com.gct.edge.actuator.mapper.YieldRealTimeMapper;
13 14
 import com.gct.edge.actuator.service.ServicePlusImpl;
@@ -17,11 +18,15 @@ import com.gct.edge.base.entity.TableNameEnum;
17 18
 import org.springframework.beans.factory.annotation.Autowired;
18 19
 import org.springframework.stereotype.Service;
19 20
 
21
+import javax.jws.Oneway;
20 22
 import java.io.IOException;
21 23
 import java.io.InputStream;
24
+import java.time.Duration;
22 25
 import java.time.LocalDateTime;
23 26
 import java.time.ZoneOffset;
24 27
 import java.time.format.DateTimeFormatter;
28
+import java.util.ArrayList;
29
+import java.util.Collections;
25 30
 import java.util.List;
26 31
 import java.util.Objects;
27 32
 import java.util.UUID;
@@ -95,36 +100,65 @@ public class YieldServiceImpl extends ServicePlusImpl<YieldRealTimeMapper, Yield
95 100
     @Override
96 101
     public Result getWellIdsByNew(String moduleKey, String startDate) {
97 102
 
98
-        LocalDateTime start = DateTimeUtil.formatDateTime(startDate +" 00:00:00");
99
-        LocalDateTime end = DateTimeUtil.formatDateTime(startDate +" 23:59:59");
103
+        LocalDateTime start = DateTimeUtil.formatDateTime(startDate + " 00:00:00");
104
+        LocalDateTime end = DateTimeUtil.formatDateTime(startDate + " 23:59:59");
100 105
 
101 106
         QueryWrapper<YieldRealTime> queryWrapper = new QueryWrapper<>();
102
-        queryWrapper.eq("module_key",moduleKey);
103
-        queryWrapper.gt("pro_time",start);
104
-        queryWrapper.lt("pro_time",end);
105
-        return Result.ok( baseMapper.selectList(queryWrapper));
107
+        queryWrapper.eq("module_key", moduleKey);
108
+        queryWrapper.gt("pro_time", start);
109
+        queryWrapper.lt("pro_time", end);
110
+        return Result.ok(baseMapper.selectList(queryWrapper));
106 111
 
107 112
     }
108 113
 
114
+    @Override
115
+    public List<YieldRealTime> getRealYieldWithDilution(String moduleKey, String wellId, String date, int dilutionVal) {
116
+        int interval = 24 * 60;
117
+        if (dilutionVal <= 0 || dilutionVal >= interval) return getYieldRealTimeInfoByWellId(moduleKey, wellId, date);
118
+        LocalDateTime start = DateTimeUtil.formatDateTime(date + " 00:00:00");
119
+        LocalDateTime end = DateTimeUtil.formatDateTime(date + " 23:59:59");
120
+        interval = interval / dilutionVal;
121
+        ArrayList<LocalDateTime[]> dateList = new ArrayList<>();
122
+        while (Duration.between(start.plusMinutes(interval), end).getSeconds() > 0) {
123
+            dateList.add(new LocalDateTime[]{start, start.plusMinutes(interval)});
124
+            start = start.plusMinutes(interval);
125
+        }
126
+        //最多只能补一个,够数了就不用补
127
+        if (dateList.size() < dilutionVal)
128
+            dateList.add(new LocalDateTime[]{start, end});
129
+
130
+        List<YieldRealTime> lis = new ArrayList<>();
131
+        for (LocalDateTime[] item : dateList) {
132
+            LambdaQueryWrapper<YieldRealTime> wrapper = new LambdaQueryWrapper<YieldRealTime>()
133
+                    .eq(YieldRealTime::getModuleKey, moduleKey)
134
+                    .eq(YieldRealTime::getWellId, wellId)
135
+                    .between(YieldRealTime::getProTime, item[0], item[1])
136
+                    .last(" limit 1 ");
137
+            YieldRealTime one = yieldRealTimeMapper.selectOne(wrapper);
138
+            if (Objects.nonNull(one)) lis.add(one);
139
+        }
140
+
141
+        return lis;
142
+    }
109 143
 
110 144
     @Override
111 145
     public List<YieldRealTime> getYieldRealTimeInfoByWellId(String moduleKey, String wellId, String startdate) {
112 146
 
113
-        LocalDateTime start = DateTimeUtil.formatDateTime(startdate +" 00:00:00");
114
-        LocalDateTime end = DateTimeUtil.formatDateTime(startdate +" 23:59:59");
147
+        LocalDateTime start = DateTimeUtil.formatDateTime(startdate + " 00:00:00");
148
+        LocalDateTime end = DateTimeUtil.formatDateTime(startdate + " 23:59:59");
115 149
 
116 150
         LambdaQueryWrapper<YieldRealTime> queryWrapper = new LambdaQueryWrapper<YieldRealTime>()
117
-                .eq(YieldRealTime::getModuleKey,moduleKey)
118
-                .between(YieldRealTime::getProTime,start,end)
119
-                .eq(YieldRealTime::getWellId,wellId)
151
+                .eq(YieldRealTime::getModuleKey, moduleKey)
152
+                .between(YieldRealTime::getProTime, start, end)
153
+                .eq(YieldRealTime::getWellId, wellId)
120 154
                 .orderByAsc(YieldRealTime::getProTime);
121 155
         List<YieldRealTime> maps = yieldRealTimeMapper.selectList(queryWrapper);
122 156
 
123 157
         return maps;
124 158
     }
125 159
 
126
-    private Double makeEffectiveMath(Double num,int effect){
127
-        return Math.ceil(num*Math.pow(10,effect))/(int)Math.pow(10,effect);
160
+    private Double makeEffectiveMath(Double num, int effect) {
161
+        return Math.ceil(num * Math.pow(10, effect)) / (int) Math.pow(10, effect);
128 162
     }
129 163
 
130 164
     @Override
@@ -132,23 +166,23 @@ public class YieldServiceImpl extends ServicePlusImpl<YieldRealTimeMapper, Yield
132 166
         YieldRealTime yieldRealTime = baseMapper.selectOne(new QueryWrapper<YieldRealTime>()
133 167
                 .eq("module_key", moduleKey)
134 168
                 .eq("well_id", wellId)
135
-                .between("pro_time", DateTimeUtil.formatDate(prodTime).atTime(0,0,0),
136
-                        DateTimeUtil.formatDate(prodTime).atTime(23,59,59)
169
+                .between("pro_time", DateTimeUtil.formatDate(prodTime).atTime(0, 0, 0),
170
+                        DateTimeUtil.formatDate(prodTime).atTime(23, 59, 59)
137 171
                 )
138 172
                 .orderByDesc("pro_time")
139 173
                 .last("limit 1")
140 174
         );
141 175
         JSONArray ja = new JSONArray();
142 176
         if (!Objects.isNull(yieldRealTime)) {
143
-            ja.add(infoObj("冲程:", makeEffectiveMath(yieldRealTime.getStroke(),2)+" m","冲次:", makeEffectiveMath(yieldRealTime.getFrequence(),2)));
144
-            ja.add(infoObj("泵深:", makeEffectiveMath(yieldRealTime.getPumpDepth(),1)+" m","泵径:", makeEffectiveMath(yieldRealTime.getPumpDiameter(),1)+" mm"));
145
-            ja.add(infoObj("动液面:", makeEffectiveMath((yieldRealTime.getPumpDepth() - yieldRealTime.getSubmergence()),1)+" m","含水率:", makeEffectiveMath(yieldRealTime.getMoistureContent(),1) + " %"));
146
-            ja.add(infoObj("沉没度:", makeEffectiveMath(yieldRealTime.getSubmergence(),1)+" m","气液比:", makeEffectiveMath(yieldRealTime.getGasLiqRatio(),1)));
177
+            ja.add(infoObj("冲程:", makeEffectiveMath(yieldRealTime.getStroke(), 2) + " m", "冲次:", makeEffectiveMath(yieldRealTime.getFrequence(), 2)));
178
+            ja.add(infoObj("泵深:", makeEffectiveMath(yieldRealTime.getPumpDepth(), 1) + " m", "泵径:", makeEffectiveMath(yieldRealTime.getPumpDiameter(), 1) + " mm"));
179
+            ja.add(infoObj("动液面:", makeEffectiveMath((yieldRealTime.getPumpDepth() - yieldRealTime.getSubmergence()), 1) + " m", "含水率:", makeEffectiveMath(yieldRealTime.getMoistureContent(), 1) + " %"));
180
+            ja.add(infoObj("沉没度:", makeEffectiveMath(yieldRealTime.getSubmergence(), 1) + " m", "气液比:", makeEffectiveMath(yieldRealTime.getGasLiqRatio(), 1)));
147 181
         }
148 182
         return ja;
149 183
     }
150 184
 
151
-    private JSONObject infoObj(String name, Object val,String name2,Object val2) {
185
+    private JSONObject infoObj(String name, Object val, String name2, Object val2) {
152 186
         JSONObject obj = new JSONObject();
153 187
         obj.put("name", name);
154 188
         obj.put("value", val);
@@ -158,7 +192,7 @@ public class YieldServiceImpl extends ServicePlusImpl<YieldRealTimeMapper, Yield
158 192
     }
159 193
 
160 194
     @Override
161
-    public Result getYieldResultDisperse(String moduleKey,String wellId, String beginDateTime, String endDateTime, Integer total) {
195
+    public Result getYieldResultDisperse(String moduleKey, String wellId, String beginDateTime, String endDateTime, Integer total) {
162 196
         YieldRealTime yieldRealTime = baseMapper.selectOne(new QueryWrapper<YieldRealTime>()
163 197
                 .eq("module_key", moduleKey)
164 198
                 .eq("well_id", wellId)

+ 6 - 2
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: off
12
-    com.gct.edge.actuator.service: off
11
+    com.gct.edge.actuator.mapper: debug
12
+    com.gct.edge.actuator.service: debug
13 13
 
14 14
 management:
15 15
   endpoints:
@@ -110,3 +110,7 @@ auth:
110 110
 
111 111
 sample-source-path: ${user.home}/dl/samplesource/
112 112
 
113
+mybatis-plus:
114
+  configuration:
115
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
116
+    default-statement-timeout: