|
@@ -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())
|