Przeglądaj źródła

冲程显示bug

gxt_xa_000000 3 lat temu
rodzic
commit
d87a863084

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

@@ -40,6 +40,7 @@ public class DiagramCardBaseParam {
40 40
     //计算出来的冲程
41 41
     double s;
42 42
     //读过来的冲程 一手源数据
43
+    @TableField("spre")
43 44
     double s_pre;
44 45
     //冲次
45 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 18
 import org.springframework.stereotype.Component;
19 19
 
20 20
 
21
+import java.lang.reflect.InvocationTargetException;
21 22
 import java.time.LocalDateTime;
22 23
 import java.time.format.DateTimeFormatter;
23 24
 import java.util.Objects;
@@ -51,7 +52,7 @@ public class CalDiagramProductionService {
51 52
 
52 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 56
         //if (message !=null ) return;
56 57
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
57 58
         AoidCalprotaskqueue aoidCalprotaskqueue = JSONObject.parseObject(message, AoidCalprotaskqueue.class);
@@ -60,7 +61,7 @@ public class CalDiagramProductionService {
60 61
         SingleDiagramDiagnoseResult sddr;
61 62
         ProDataForCalProduction a2data;
62 63
         ProDataForCalProduction a2dataVol;
63
-        try {
64
+        //try {
64 65
 //            System.out.println("aoidCalprotaskqueue .getSgtbaseparamId= " + aoidCalprotaskqueue.getSgtbaseparamId());
65 66
             dcbpStr = diagnoseClient.getDiagramCardBaseParamByID(aoidCalprotaskqueue.getSgtbaseparamId());
66 67
 //            System.out.println("dcbp json:" + JSONObject.parseObject(dcbpStr, Result.class).toString());
@@ -76,9 +77,9 @@ public class CalDiagramProductionService {
76 77
             String a2dataStrVol = baseDataClient.getA2DataForCalVolDaily(dcbp.getWellName(), dcbp.getProdDate().substring(0, 10));
77 78
             a2dataVol = (ProDataForCalProduction) JSONObject.parseObject(a2dataStrVol, Result.class).toFiguredOutObject(ProDataForCalProduction.class);
78 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 83
         AoidGkModel model = aoidGkModelService.getGKModelByResultType(sddr.getResult1());
83 84
         AoidSinglewellConfig effectStrockModel = aoidSinglewellConfigService.getConfigOneObjByID(1);
84 85
         Double[][] bgt = calPumpCard.cal_bgt(dcbp, sddr);
@@ -122,7 +123,7 @@ public class CalDiagramProductionService {
122 123
                 } catch (Exception e) {
123 124
                     System.out.println("dcbp.getProdDate() ERROR= " + dcbp.getProdDate());
124 125
                 }
125
-            aoidSinglegtYield.setStroke(dcbp.getS());
126
+            aoidSinglegtYield.setStroke(dcbp.getS_pre());
126 127
             aoidSinglegtYield.setFrequence(dcbp.getN());
127 128
             aoidSinglegtYield.setSxzh(dcbp.getL_max());
128 129
             aoidSinglegtYield.setXxzh(dcbp.getL_min());
@@ -177,7 +178,6 @@ public class CalDiagramProductionService {
177 178
             aoidSinglegtYield.setXhqd();
178 179
             aoidSinglegtYield.setSbh();*/
179 180
 
180
-        System.out.println("aoidSinglegtYield = " + aoidSinglegtYield);
181 181
         aoidSinglegtYieldService.saveOrUpdate(aoidSinglegtYield,
182 182
                 new LambdaQueryWrapper<AoidSinglegtYield>()
183 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 7
 import org.springframework.beans.factory.annotation.Autowired;
8 8
 import org.springframework.stereotype.Service;
9 9
 
10
+import java.lang.reflect.InvocationTargetException;
11
+
10 12
 @Slf4j
11 13
 @Service
12 14
 @RocketMQMessageListener(
@@ -28,6 +30,10 @@ public class TaskConsumerServiceImpl implements TaskConsumerService {
28 30
             e.printStackTrace();
29 31
         } catch (IllegalAccessException e) {
30 32
             e.printStackTrace();
33
+        } catch (InvocationTargetException e) {
34
+            e.printStackTrace();
35
+        } catch (NoSuchMethodException e) {
36
+            e.printStackTrace();
31 37
         }
32 38
     }
33 39
 }