|
@@ -15,6 +15,7 @@ import com.gct.aoid.service.AoidDailyYieldService;
|
15
|
15
|
import com.gct.aoid.service.AoidSinglegtYieldService;
|
16
|
16
|
import com.gct.aoid.service.EnableOrPauseService;
|
17
|
17
|
import com.gct.aoid.service.LiqProdDailyCalService;
|
|
18
|
+import com.gct.aoid.service.impl.AoidDailyYieldServiceImpl;
|
18
|
19
|
import com.gct.aoid.service.impl.CalDiagramProductionService;
|
19
|
20
|
import com.gct.aoid.service.impl.CalibrationParameterService;
|
20
|
21
|
import com.gct.common.util.DateTimeUtil;
|
|
@@ -46,92 +47,13 @@ import java.util.stream.Collectors;
|
46
|
47
|
@RunWith(SpringRunner.class)
|
47
|
48
|
@ContextConfiguration
|
48
|
49
|
public class MyTest {
|
49
|
|
- @Autowired
|
50
|
|
- CalDiagramProductionService calDiagramProductionService ;
|
51
|
|
- @Autowired
|
52
|
|
- BaseDataClient client;
|
53
|
|
- @Autowired
|
54
|
|
- DiagnoseClient diagnoseClient;
|
55
|
|
- @Autowired
|
56
|
|
- AoidSinglegtYieldService aoidSinglegtYieldService;
|
57
|
|
- @Autowired
|
58
|
|
- AoidDailyYieldService aoidDailyYieldService;
|
59
|
|
- @Autowired
|
60
|
|
- AoidSinglegtYieldController aoidSinglegtYieldController;
|
61
|
|
- @Autowired
|
62
|
|
- AoidSinglegtYieldMapper aoidSinglegtYieldMapper;
|
63
|
|
- @Autowired
|
64
|
|
- LiqProdDailyCalService liqProdDailyCalService;
|
65
|
|
-// @Autowired
|
66
|
|
-// SumDataTaskMapper sumDataTaskMapper;
|
67
|
|
-// @Autowired
|
68
|
|
-// AoidParamSettingService aoidParamSettingService;
|
69
|
|
-// @Autowired
|
70
|
|
-// AoidLiquidAbnormalService aoidLiquidAbnormalService;
|
71
|
|
-// private static final Logger reload = (Logger) LoggerFactory.getLogger("reload");
|
72
|
|
-// @Test
|
73
|
|
-// public void test() {
|
74
|
|
-// List<AoidParamSetting> aoidParamSetting = aoidParamSettingService.getAoidParamSetting();
|
75
|
|
-// aoidLiquidAbnormalService.addAoidLiquidAbnormalNew(DateTimeUtil.formatDateTime("2021-08-18 00:00:00"),aoidParamSetting);
|
76
|
|
-// }
|
77
|
|
-@Autowired
|
78
|
|
- EnableOrPauseService enableOrPauseService;
|
79
|
|
-
|
80
|
|
- @Test
|
81
|
|
- public void test1() throws InvocationTargetException, IllegalAccessException, InstantiationException, NoSuchMethodException {
|
82
|
|
- String[] x = {"27"};
|
83
|
|
- String starDate = "2022-07-05";
|
84
|
|
- String time = "16:00:00";
|
85
|
|
- liqProdDailyCalService.calculate(x,starDate,time);
|
86
|
|
- }
|
87
|
50
|
|
88
|
51
|
@Autowired
|
89
|
|
- AoidSinglegtYieldMapper singlegtYieldMapper;
|
90
|
|
- @Test
|
91
|
|
- //@Scheduled
|
92
|
|
- public void test2(){
|
93
|
|
- LiqWarringVo liqWarringVo = new LiqWarringVo()
|
94
|
|
- .setWellId("CHW04").setPordDate("2021-08-17 00:00:00");
|
95
|
|
-
|
96
|
|
- System.out.println(aoidDailyYieldService.getLiqWarring(liqWarringVo));
|
97
|
|
- }
|
98
|
|
-
|
|
52
|
+ AoidDailyYieldServiceImpl aoidDailyYieldService;
|
99
|
53
|
|
100
|
54
|
@Autowired
|
101
|
|
- CalibrationParameterService calibrationParameterService;
|
102
|
|
-
|
103
|
|
- @Test
|
104
|
|
- public void testXs(){
|
105
|
|
- double sumArea = 0;
|
106
|
|
- DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
107
|
|
- List<AoidSinglegtYield> results = aoidSinglegtYieldService.list(new QueryWrapper<AoidSinglegtYield>().eq("well_id", "车峰15")
|
108
|
|
- .between("prod_date", LocalDateTime.parse("2022-10-03 16:00:00",df)
|
109
|
|
- , LocalDateTime.parse("2022-10-04 16:00:00",df)));
|
110
|
|
- String[] sgts = results.stream().map(AoidSinglegtYield::getSgt).collect(Collectors.toList()).toArray(new String[]{});
|
111
|
|
-
|
112
|
|
- for (int y = 0; y < sgts.length; y++) {
|
|
55
|
+ AoidSinglegtYieldService aoidSinglegtYieldService;
|
113
|
56
|
|
114
|
|
- List<List<Double>> sgtList = new ArrayList<>();
|
115
|
|
- if (Objects.nonNull(sgts[y])) {
|
116
|
|
- sgtList = SGTUtil.encodeToUseList(sgts[y]);
|
117
|
|
- if (Objects.nonNull(sgtList) && sgtList.size() > 1) {
|
118
|
|
- sgtList.remove(sgtList.size() - 1);
|
119
|
|
- sgtList.add(sgtList.get(0));
|
120
|
|
- }
|
121
|
|
- Double[][] sgtValue = JSONObject.parseObject(sgtList.toString(), Double[][].class);
|
122
|
|
- double areaReal = CardAreaAlgorithm.calArea(sgtValue);
|
123
|
|
- if (areaReal>0)
|
124
|
|
- {
|
125
|
|
- sumArea += areaReal;
|
126
|
|
- }
|
127
|
|
- }
|
128
|
57
|
|
129
|
|
- }
|
130
|
|
- double areaAvg = sumArea/sgts.length;
|
131
|
|
- if (areaAvg<200)
|
132
|
|
- {
|
133
|
|
- System.out.println(calibrationParameterService.coefficientValue(0,results));
|
134
|
|
- }
|
135
|
|
- }
|
136
|
58
|
|
137
|
59
|
}
|