Browse Source

冲程显示bug

gxt_xa_000000 3 years ago
parent
commit
d87a863084

+ 1 - 0
src/main/java/com/gct/aoid/entity/DiagramCardBaseParam.java

@@ -40,6 +40,7 @@ public class DiagramCardBaseParam {
40
     //计算出来的冲程
40
     //计算出来的冲程
41
     double s;
41
     double s;
42
     //读过来的冲程 一手源数据
42
     //读过来的冲程 一手源数据
43
+    @TableField("spre")
43
     double s_pre;
44
     double s_pre;
44
     //冲次
45
     //冲次
45
     double n;
46
     double n;

+ 7 - 7
src/main/java/com/gct/aoid/service/impl/CalDiagramProductionService.java

@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
18
 import org.springframework.stereotype.Component;
18
 import org.springframework.stereotype.Component;
19
 
19
 
20
 
20
 
21
+import java.lang.reflect.InvocationTargetException;
21
 import java.time.LocalDateTime;
22
 import java.time.LocalDateTime;
22
 import java.time.format.DateTimeFormatter;
23
 import java.time.format.DateTimeFormatter;
23
 import java.util.Objects;
24
 import java.util.Objects;
@@ -51,7 +52,7 @@ public class CalDiagramProductionService {
51
 
52
 
52
     public int sus = 0;
53
     public int sus = 0;
53
 
54
 
54
-    public void cal(String message) throws InstantiationException, IllegalAccessException {
55
+    public void cal(String message) throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
55
         //if (message !=null ) return;
56
         //if (message !=null ) return;
56
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
57
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
57
         AoidCalprotaskqueue aoidCalprotaskqueue = JSONObject.parseObject(message, AoidCalprotaskqueue.class);
58
         AoidCalprotaskqueue aoidCalprotaskqueue = JSONObject.parseObject(message, AoidCalprotaskqueue.class);
@@ -60,7 +61,7 @@ public class CalDiagramProductionService {
60
         SingleDiagramDiagnoseResult sddr;
61
         SingleDiagramDiagnoseResult sddr;
61
         ProDataForCalProduction a2data;
62
         ProDataForCalProduction a2data;
62
         ProDataForCalProduction a2dataVol;
63
         ProDataForCalProduction a2dataVol;
63
-        try {
64
+        //try {
64
 //            System.out.println("aoidCalprotaskqueue .getSgtbaseparamId= " + aoidCalprotaskqueue.getSgtbaseparamId());
65
 //            System.out.println("aoidCalprotaskqueue .getSgtbaseparamId= " + aoidCalprotaskqueue.getSgtbaseparamId());
65
             dcbpStr = diagnoseClient.getDiagramCardBaseParamByID(aoidCalprotaskqueue.getSgtbaseparamId());
66
             dcbpStr = diagnoseClient.getDiagramCardBaseParamByID(aoidCalprotaskqueue.getSgtbaseparamId());
66
 //            System.out.println("dcbp json:" + JSONObject.parseObject(dcbpStr, Result.class).toString());
67
 //            System.out.println("dcbp json:" + JSONObject.parseObject(dcbpStr, Result.class).toString());
@@ -76,9 +77,9 @@ public class CalDiagramProductionService {
76
             String a2dataStrVol = baseDataClient.getA2DataForCalVolDaily(dcbp.getWellName(), dcbp.getProdDate().substring(0, 10));
77
             String a2dataStrVol = baseDataClient.getA2DataForCalVolDaily(dcbp.getWellName(), dcbp.getProdDate().substring(0, 10));
77
             a2dataVol = (ProDataForCalProduction) JSONObject.parseObject(a2dataStrVol, Result.class).toFiguredOutObject(ProDataForCalProduction.class);
78
             a2dataVol = (ProDataForCalProduction) JSONObject.parseObject(a2dataStrVol, Result.class).toFiguredOutObject(ProDataForCalProduction.class);
78
            // if (a2dataVol != null) System.out.println("a2dataStrVol = " + a2dataVol);
79
            // if (a2dataVol != null) System.out.println("a2dataStrVol = " + a2dataVol);
79
-        } catch (Exception e) {
80
-            throw new RuntimeException("[aoid->CalDiagramProductionService->cal:] fegin error ");
81
-        }
80
+       // } catch (Exception e) {
81
+         //   throw new RuntimeException("[aoid->CalDiagramProductionService->cal:] fegin error ");
82
+        //}
82
         AoidGkModel model = aoidGkModelService.getGKModelByResultType(sddr.getResult1());
83
         AoidGkModel model = aoidGkModelService.getGKModelByResultType(sddr.getResult1());
83
         AoidSinglewellConfig effectStrockModel = aoidSinglewellConfigService.getConfigOneObjByID(1);
84
         AoidSinglewellConfig effectStrockModel = aoidSinglewellConfigService.getConfigOneObjByID(1);
84
         Double[][] bgt = calPumpCard.cal_bgt(dcbp, sddr);
85
         Double[][] bgt = calPumpCard.cal_bgt(dcbp, sddr);
@@ -122,7 +123,7 @@ public class CalDiagramProductionService {
122
                 } catch (Exception e) {
123
                 } catch (Exception e) {
123
                     System.out.println("dcbp.getProdDate() ERROR= " + dcbp.getProdDate());
124
                     System.out.println("dcbp.getProdDate() ERROR= " + dcbp.getProdDate());
124
                 }
125
                 }
125
-            aoidSinglegtYield.setStroke(dcbp.getS());
126
+            aoidSinglegtYield.setStroke(dcbp.getS_pre());
126
             aoidSinglegtYield.setFrequence(dcbp.getN());
127
             aoidSinglegtYield.setFrequence(dcbp.getN());
127
             aoidSinglegtYield.setSxzh(dcbp.getL_max());
128
             aoidSinglegtYield.setSxzh(dcbp.getL_max());
128
             aoidSinglegtYield.setXxzh(dcbp.getL_min());
129
             aoidSinglegtYield.setXxzh(dcbp.getL_min());
@@ -177,7 +178,6 @@ public class CalDiagramProductionService {
177
             aoidSinglegtYield.setXhqd();
178
             aoidSinglegtYield.setXhqd();
178
             aoidSinglegtYield.setSbh();*/
179
             aoidSinglegtYield.setSbh();*/
179
 
180
 
180
-        System.out.println("aoidSinglegtYield = " + aoidSinglegtYield);
181
         aoidSinglegtYieldService.saveOrUpdate(aoidSinglegtYield,
181
         aoidSinglegtYieldService.saveOrUpdate(aoidSinglegtYield,
182
                 new LambdaQueryWrapper<AoidSinglegtYield>()
182
                 new LambdaQueryWrapper<AoidSinglegtYield>()
183
                         .eq(AoidSinglegtYield::getWellId, aoidSinglegtYield.getWellId())
183
                         .eq(AoidSinglegtYield::getWellId, aoidSinglegtYield.getWellId())

+ 6 - 0
src/main/java/com/gct/aoid/service/impl/TaskConsumerServiceImpl.java

@@ -7,6 +7,8 @@ import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
7
 import org.springframework.beans.factory.annotation.Autowired;
7
 import org.springframework.beans.factory.annotation.Autowired;
8
 import org.springframework.stereotype.Service;
8
 import org.springframework.stereotype.Service;
9
 
9
 
10
+import java.lang.reflect.InvocationTargetException;
11
+
10
 @Slf4j
12
 @Slf4j
11
 @Service
13
 @Service
12
 @RocketMQMessageListener(
14
 @RocketMQMessageListener(
@@ -28,6 +30,10 @@ public class TaskConsumerServiceImpl implements TaskConsumerService {
28
             e.printStackTrace();
30
             e.printStackTrace();
29
         } catch (IllegalAccessException e) {
31
         } catch (IllegalAccessException e) {
30
             e.printStackTrace();
32
             e.printStackTrace();
33
+        } catch (InvocationTargetException e) {
34
+            e.printStackTrace();
35
+        } catch (NoSuchMethodException e) {
36
+            e.printStackTrace();
31
         }
37
         }
32
     }
38
     }
33
 }
39
 }