|
@@ -11,7 +11,6 @@ import com.slibra.business.mapper.*;
|
|
import com.slibra.common.core.domain.TXinyiDaily;
|
|
import com.slibra.common.core.domain.TXinyiDaily;
|
|
import com.slibra.common.core.controller.BaseController;
|
|
import com.slibra.common.core.controller.BaseController;
|
|
import com.slibra.common.utils.DateUtils;
|
|
import com.slibra.common.utils.DateUtils;
|
|
-import com.slibra.common.utils.StringUtils;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.ibatis.session.ExecutorType;
|
|
import org.apache.ibatis.session.ExecutorType;
|
|
import org.apache.ibatis.session.SqlSession;
|
|
import org.apache.ibatis.session.SqlSession;
|
|
@@ -27,7 +26,6 @@ import java.math.RoundingMode;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import static com.slibra.common.constant.MyConstants.*;
|
|
import static com.slibra.common.constant.MyConstants.*;
|
|
import static com.slibra.common.constant.MyConstants.BigDecimal_100;
|
|
import static com.slibra.common.constant.MyConstants.BigDecimal_100;
|
|
@@ -974,14 +972,13 @@ public class HandleDataController extends BaseController
|
|
log.info("进入了处理big_table_month历史数据");
|
|
log.info("进入了处理big_table_month历史数据");
|
|
long begin = System.currentTimeMillis();
|
|
long begin = System.currentTimeMillis();
|
|
|
|
|
|
- List<TXinyiBigTableDay> tXinyiBigTableDayList = tXinyiBigTableDayMapper.selectTXinyiBigTableDayByMonthAvg();
|
|
|
|
|
|
+ List<TXinyiBigTableMonth> tXinyiBigTableDayList = tXinyiBigTableDayMapper.selectTXinyiBigTableDayByMonthAvg();
|
|
|
|
|
|
if ( !CollectionUtils.isEmpty(tXinyiBigTableDayList) ) {
|
|
if ( !CollectionUtils.isEmpty(tXinyiBigTableDayList) ) {
|
|
|
|
|
|
for (int i = 0; i < tXinyiBigTableDayList.size(); i++) {
|
|
for (int i = 0; i < tXinyiBigTableDayList.size(); i++) {
|
|
- TXinyiBigTableDay tableDay = tXinyiBigTableDayList.get(i);
|
|
|
|
|
|
+ TXinyiBigTableMonth tableMonth = tXinyiBigTableDayList.get(i);
|
|
|
|
|
|
- TXinyiBigTableMonth tableMonth = new TXinyiBigTableMonth();
|
|
|
|
|
|
|
|
ArrayList<BigDecimal> gyHycRjyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> gyHycRjyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> gyHycRjyZdAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> gyHycRjyZdAll = new ArrayList<>();
|
|
@@ -1000,53 +997,52 @@ public class HandleDataController extends BaseController
|
|
ArrayList<BigDecimal> hyQyckxsyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> hyQyckxsyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> hyHyzlsyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> hyHyzlsyAll = new ArrayList<>();
|
|
|
|
|
|
- gyHycRjyAll.add(tableDay.getGyOneHymdDo());
|
|
|
|
- gyHycRjyAll.add(tableDay.getGyTwoHymdDo());
|
|
|
|
- gyHycRjyZdAll.add(tableDay.getGyOneHyzdDo());
|
|
|
|
- gyHycRjyZdAll.add(tableDay.getGyTwoHyzdDo());
|
|
|
|
- gyHycWnndAll.add(tableDay.getGyOneMlss());
|
|
|
|
- gyHycWnndAll.add(tableDay.getGyTwoMlss());
|
|
|
|
-
|
|
|
|
- rbHycRjyAll.add(tableDay.getRbShcHyOneDo());
|
|
|
|
- rbHycRjyAll.add(tableDay.getRbShcHyTwoDo());
|
|
|
|
- rbHycWnndAll.add(tableDay.getRbShcHyOneMlss());
|
|
|
|
- rbHycWnndAll.add(tableDay.getRbShcHyTwoMlss());
|
|
|
|
- rbYycRjyAll.add(tableDay.getRbShcYyOneDo());
|
|
|
|
- rbYycRjyAll.add(tableDay.getRbShcYyTwoDo());
|
|
|
|
- rbQycRjyAll.add(tableDay.getRbShcQyOneDo());
|
|
|
|
- rbQycRjyAll.add(tableDay.getRbShcQyTwoDo());
|
|
|
|
- rbWncjbAll.add(tableDay.getRbShcHyOneSv());
|
|
|
|
- rbWncjbAll.add(tableDay.getRbShcHyTwoSv());
|
|
|
|
- rbWntjzsAll.add(tableDay.getRbShcHyOneSvi());
|
|
|
|
- rbWntjzsAll.add(tableDay.getRbShcHyTwoSvi());
|
|
|
|
- rbHfxwnndAll.add(tableDay.getRbShcHyOneMlvss());
|
|
|
|
- rbHfxwnndAll.add(tableDay.getRbShcHyTwoMlvss());
|
|
|
|
-
|
|
|
|
- hyHycxsyAll.add(tableDay.getHyNo3Hlj1Jqr());
|
|
|
|
- hyHycxsyAll.add(tableDay.getHyNo3Hlj2Jqr());
|
|
|
|
- hyQyanAll.add(tableDay.getHyNh31Jqr());
|
|
|
|
- hyQyanAll.add(tableDay.getHyNh32Jqr());
|
|
|
|
- hyQyckxsyAll.add(tableDay.getHyNo3Qyc1Jqr());
|
|
|
|
- hyQyckxsyAll.add(tableDay.getHyNo3Qyc2Jqr());
|
|
|
|
- hyHyzlsyAll.add(tableDay.getHyTpHl1Jqr());
|
|
|
|
- hyHyzlsyAll.add(tableDay.getHyTpHl2Jqr());
|
|
|
|
-
|
|
|
|
- tableDay.setGyHycRjyAll(formatList(gyHycRjyAll));
|
|
|
|
- tableDay.setGyHycRjyZdAll(formatList(gyHycRjyZdAll));
|
|
|
|
- tableDay.setGyHycWnndAll(formatList(gyHycWnndAll));
|
|
|
|
- tableDay.setRbHycRjyAll(formatList(rbHycRjyAll));
|
|
|
|
- tableDay.setRbHycWnndAll(formatList(rbHycWnndAll));
|
|
|
|
- tableDay.setRbYycRjyAll(formatList(rbYycRjyAll));
|
|
|
|
- tableDay.setRbQycRjyAll(formatList(rbQycRjyAll));
|
|
|
|
- tableDay.setRbWncjbAll(formatList(rbWncjbAll));
|
|
|
|
- tableDay.setRbWntjzsAll(formatList(rbWntjzsAll));
|
|
|
|
- tableDay.setRbHfxwnndAll(formatList(rbHfxwnndAll));
|
|
|
|
- tableDay.setHyHycxsyAll(formatList(hyHycxsyAll));
|
|
|
|
- tableDay.setHyQyanAll(formatList(hyQyanAll));
|
|
|
|
- tableDay.setHyQyckxsyAll(formatList(hyQyckxsyAll));
|
|
|
|
- tableDay.setHyHyzlsyAll(formatList(hyHyzlsyAll));
|
|
|
|
-
|
|
|
|
- BeanUtils.copyProperties(tableDay, tableMonth);
|
|
|
|
|
|
+ gyHycRjyAll.add(tableMonth.getGyOneHymdDo());
|
|
|
|
+ gyHycRjyAll.add(tableMonth.getGyTwoHymdDo());
|
|
|
|
+ gyHycRjyZdAll.add(tableMonth.getGyOneHyzdDo());
|
|
|
|
+ gyHycRjyZdAll.add(tableMonth.getGyTwoHyzdDo());
|
|
|
|
+ gyHycWnndAll.add(tableMonth.getGyOneMlss());
|
|
|
|
+ gyHycWnndAll.add(tableMonth.getGyTwoMlss());
|
|
|
|
+
|
|
|
|
+ rbHycRjyAll.add(tableMonth.getRbShcHyOneDo());
|
|
|
|
+ rbHycRjyAll.add(tableMonth.getRbShcHyTwoDo());
|
|
|
|
+ rbHycWnndAll.add(tableMonth.getRbShcHyOneMlss());
|
|
|
|
+ rbHycWnndAll.add(tableMonth.getRbShcHyTwoMlss());
|
|
|
|
+ rbYycRjyAll.add(tableMonth.getRbShcYyOneDo());
|
|
|
|
+ rbYycRjyAll.add(tableMonth.getRbShcYyTwoDo());
|
|
|
|
+ rbQycRjyAll.add(tableMonth.getRbShcQyOneDo());
|
|
|
|
+ rbQycRjyAll.add(tableMonth.getRbShcQyTwoDo());
|
|
|
|
+ rbWncjbAll.add(tableMonth.getRbShcHyOneSv());
|
|
|
|
+ rbWncjbAll.add(tableMonth.getRbShcHyTwoSv());
|
|
|
|
+ rbWntjzsAll.add(tableMonth.getRbShcHyOneSvi());
|
|
|
|
+ rbWntjzsAll.add(tableMonth.getRbShcHyTwoSvi());
|
|
|
|
+ rbHfxwnndAll.add(tableMonth.getRbShcHyOneMlvss());
|
|
|
|
+ rbHfxwnndAll.add(tableMonth.getRbShcHyTwoMlvss());
|
|
|
|
+
|
|
|
|
+ hyHycxsyAll.add(tableMonth.getHyNo3Hlj1Jqr());
|
|
|
|
+ hyHycxsyAll.add(tableMonth.getHyNo3Hlj2Jqr());
|
|
|
|
+ hyQyanAll.add(tableMonth.getHyNh31Jqr());
|
|
|
|
+ hyQyanAll.add(tableMonth.getHyNh32Jqr());
|
|
|
|
+ hyQyckxsyAll.add(tableMonth.getHyNo3Qyc1Jqr());
|
|
|
|
+ hyQyckxsyAll.add(tableMonth.getHyNo3Qyc2Jqr());
|
|
|
|
+ hyHyzlsyAll.add(tableMonth.getHyTpHl1Jqr());
|
|
|
|
+ hyHyzlsyAll.add(tableMonth.getHyTpHl2Jqr());
|
|
|
|
+
|
|
|
|
+ tableMonth.setGyHycRjyAll(formatList(gyHycRjyAll));
|
|
|
|
+ tableMonth.setGyHycRjyZdAll(formatList(gyHycRjyZdAll));
|
|
|
|
+ tableMonth.setGyHycWnndAll(formatList(gyHycWnndAll));
|
|
|
|
+ tableMonth.setRbHycRjyAll(formatList(rbHycRjyAll));
|
|
|
|
+ tableMonth.setRbHycWnndAll(formatList(rbHycWnndAll));
|
|
|
|
+ tableMonth.setRbYycRjyAll(formatList(rbYycRjyAll));
|
|
|
|
+ tableMonth.setRbQycRjyAll(formatList(rbQycRjyAll));
|
|
|
|
+ tableMonth.setRbWncjbAll(formatList(rbWncjbAll));
|
|
|
|
+ tableMonth.setRbWntjzsAll(formatList(rbWntjzsAll));
|
|
|
|
+ tableMonth.setRbHfxwnndAll(formatList(rbHfxwnndAll));
|
|
|
|
+ tableMonth.setHyHycxsyAll(formatList(hyHycxsyAll));
|
|
|
|
+ tableMonth.setHyQyanAll(formatList(hyQyanAll));
|
|
|
|
+ tableMonth.setHyQyckxsyAll(formatList(hyQyckxsyAll));
|
|
|
|
+ tableMonth.setHyHyzlsyAll(formatList(hyHyzlsyAll));
|
|
|
|
+
|
|
|
|
|
|
tXinyiBigTableMonthMapper.insertTXinyiBigTableMonth(tableMonth);
|
|
tXinyiBigTableMonthMapper.insertTXinyiBigTableMonth(tableMonth);
|
|
}
|
|
}
|
|
@@ -1063,7 +1059,7 @@ public class HandleDataController extends BaseController
|
|
*/
|
|
*/
|
|
@GetMapping("/handleBigTableDayHistoryData")
|
|
@GetMapping("/handleBigTableDayHistoryData")
|
|
public String handleBigTableDayHistoryData() {
|
|
public String handleBigTableDayHistoryData() {
|
|
- log.info("进入了 处理big_table_hour历史数据");
|
|
|
|
|
|
+ log.info("进入了 处理big_table_day历史数据");
|
|
long begin = System.currentTimeMillis();
|
|
long begin = System.currentTimeMillis();
|
|
|
|
|
|
List<TXinyiBigTableHour> tXinyiBigTableHours = tXinyiBigTableHourMapper.selectTXinyiBigTableHourByTestDate();
|
|
List<TXinyiBigTableHour> tXinyiBigTableHours = tXinyiBigTableHourMapper.selectTXinyiBigTableHourByTestDate();
|
|
@@ -1075,12 +1071,8 @@ public class HandleDataController extends BaseController
|
|
TXinyiBigTableHour tXinyiBigTableHour = tXinyiBigTableHours.get(i);
|
|
TXinyiBigTableHour tXinyiBigTableHour = tXinyiBigTableHours.get(i);
|
|
String testDate = tXinyiBigTableHour.getTestDate();
|
|
String testDate = tXinyiBigTableHour.getTestDate();
|
|
|
|
|
|
- TXinyiBigTableHour tableHour = tXinyiBigTableHourMapper.selectTXinyiBigTableHourAvg(testDate);
|
|
|
|
-
|
|
|
|
- if (!Objects.isNull(tableHour)) {
|
|
|
|
- TXinyiBigTableDay tableDay = new TXinyiBigTableDay();
|
|
|
|
-
|
|
|
|
- BeanUtils.copyProperties(tableHour, tableDay);
|
|
|
|
|
|
+ TXinyiBigTableDay tableDay = tXinyiBigTableDayMapper.selectTXinyiBigTableHourAvg(testDate);
|
|
|
|
+ if (!Objects.isNull(tableDay)) {
|
|
|
|
|
|
ArrayList<BigDecimal> gyHycRjyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> gyHycRjyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> gyHycRjyZdAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> gyHycRjyZdAll = new ArrayList<>();
|
|
@@ -1099,36 +1091,36 @@ public class HandleDataController extends BaseController
|
|
ArrayList<BigDecimal> hyQyckxsyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> hyQyckxsyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> hyHyzlsyAll = new ArrayList<>();
|
|
ArrayList<BigDecimal> hyHyzlsyAll = new ArrayList<>();
|
|
|
|
|
|
- gyHycRjyAll.add(tableHour.getGyOneHymdDo());
|
|
|
|
- gyHycRjyAll.add(tableHour.getGyTwoHymdDo());
|
|
|
|
- gyHycRjyZdAll.add(tableHour.getGyOneHyzdDo());
|
|
|
|
- gyHycRjyZdAll.add(tableHour.getGyTwoHyzdDo());
|
|
|
|
- gyHycWnndAll.add(tableHour.getGyOneMlss());
|
|
|
|
- gyHycWnndAll.add(tableHour.getGyTwoMlss());
|
|
|
|
-
|
|
|
|
- rbHycRjyAll.add(tableHour.getRbShcHyOneDo());
|
|
|
|
- rbHycRjyAll.add(tableHour.getRbShcHyTwoDo());
|
|
|
|
- rbHycWnndAll.add(tableHour.getRbShcHyOneMlss());
|
|
|
|
- rbHycWnndAll.add(tableHour.getRbShcHyTwoMlss());
|
|
|
|
- rbYycRjyAll.add(tableHour.getRbShcYyOneDo());
|
|
|
|
- rbYycRjyAll.add(tableHour.getRbShcYyTwoDo());
|
|
|
|
- rbQycRjyAll.add(tableHour.getRbShcQyOneDo());
|
|
|
|
- rbQycRjyAll.add(tableHour.getRbShcQyTwoDo());
|
|
|
|
- rbWncjbAll.add(tableHour.getRbShcHyOneSv());
|
|
|
|
- rbWncjbAll.add(tableHour.getRbShcHyTwoSv());
|
|
|
|
- rbWntjzsAll.add(tableHour.getRbShcHyOneSvi());
|
|
|
|
- rbWntjzsAll.add(tableHour.getRbShcHyTwoSvi());
|
|
|
|
- rbHfxwnndAll.add(tableHour.getRbShcHyOneMlvss());
|
|
|
|
- rbHfxwnndAll.add(tableHour.getRbShcHyTwoMlvss());
|
|
|
|
-
|
|
|
|
- hyHycxsyAll.add(tableHour.getHyNo3Hlj1Jqr());
|
|
|
|
- hyHycxsyAll.add(tableHour.getHyNo3Hlj2Jqr());
|
|
|
|
- hyQyanAll.add(tableHour.getHyNh31Jqr());
|
|
|
|
- hyQyanAll.add(tableHour.getHyNh32Jqr());
|
|
|
|
- hyQyckxsyAll.add(tableHour.getHyNo3Qyc1Jqr());
|
|
|
|
- hyQyckxsyAll.add(tableHour.getHyNo3Qyc2Jqr());
|
|
|
|
- hyHyzlsyAll.add(tableHour.getHyTpHl1Jqr());
|
|
|
|
- hyHyzlsyAll.add(tableHour.getHyTpHl2Jqr());
|
|
|
|
|
|
+ gyHycRjyAll.add(tableDay.getGyOneHymdDo());
|
|
|
|
+ gyHycRjyAll.add(tableDay.getGyTwoHymdDo());
|
|
|
|
+ gyHycRjyZdAll.add(tableDay.getGyOneHyzdDo());
|
|
|
|
+ gyHycRjyZdAll.add(tableDay.getGyTwoHyzdDo());
|
|
|
|
+ gyHycWnndAll.add(tableDay.getGyOneMlss());
|
|
|
|
+ gyHycWnndAll.add(tableDay.getGyTwoMlss());
|
|
|
|
+
|
|
|
|
+ rbHycRjyAll.add(tableDay.getRbShcHyOneDo());
|
|
|
|
+ rbHycRjyAll.add(tableDay.getRbShcHyTwoDo());
|
|
|
|
+ rbHycWnndAll.add(tableDay.getRbShcHyOneMlss());
|
|
|
|
+ rbHycWnndAll.add(tableDay.getRbShcHyTwoMlss());
|
|
|
|
+ rbYycRjyAll.add(tableDay.getRbShcYyOneDo());
|
|
|
|
+ rbYycRjyAll.add(tableDay.getRbShcYyTwoDo());
|
|
|
|
+ rbQycRjyAll.add(tableDay.getRbShcQyOneDo());
|
|
|
|
+ rbQycRjyAll.add(tableDay.getRbShcQyTwoDo());
|
|
|
|
+ rbWncjbAll.add(tableDay.getRbShcHyOneSv());
|
|
|
|
+ rbWncjbAll.add(tableDay.getRbShcHyTwoSv());
|
|
|
|
+ rbWntjzsAll.add(tableDay.getRbShcHyOneSvi());
|
|
|
|
+ rbWntjzsAll.add(tableDay.getRbShcHyTwoSvi());
|
|
|
|
+ rbHfxwnndAll.add(tableDay.getRbShcHyOneMlvss());
|
|
|
|
+ rbHfxwnndAll.add(tableDay.getRbShcHyTwoMlvss());
|
|
|
|
+
|
|
|
|
+ hyHycxsyAll.add(tableDay.getHyNo3Hlj1Jqr());
|
|
|
|
+ hyHycxsyAll.add(tableDay.getHyNo3Hlj2Jqr());
|
|
|
|
+ hyQyanAll.add(tableDay.getHyNh31Jqr());
|
|
|
|
+ hyQyanAll.add(tableDay.getHyNh32Jqr());
|
|
|
|
+ hyQyckxsyAll.add(tableDay.getHyNo3Qyc1Jqr());
|
|
|
|
+ hyQyckxsyAll.add(tableDay.getHyNo3Qyc2Jqr());
|
|
|
|
+ hyHyzlsyAll.add(tableDay.getHyTpHl1Jqr());
|
|
|
|
+ hyHyzlsyAll.add(tableDay.getHyTpHl2Jqr());
|
|
|
|
|
|
tableDay.setGyHycRjyAll(formatList(gyHycRjyAll));
|
|
tableDay.setGyHycRjyAll(formatList(gyHycRjyAll));
|
|
tableDay.setGyHycRjyZdAll(formatList(gyHycRjyZdAll));
|
|
tableDay.setGyHycRjyZdAll(formatList(gyHycRjyZdAll));
|
|
@@ -1154,7 +1146,7 @@ public class HandleDataController extends BaseController
|
|
if (!CollectionUtils.isEmpty(bigTableDayList)) {
|
|
if (!CollectionUtils.isEmpty(bigTableDayList)) {
|
|
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
TXinyiBigTableDayMapper sqlSessionMapper = sqlSession.getMapper(TXinyiBigTableDayMapper.class);
|
|
TXinyiBigTableDayMapper sqlSessionMapper = sqlSession.getMapper(TXinyiBigTableDayMapper.class);
|
|
- bigTableDayList.stream().forEach(item -> sqlSessionMapper.insertTXinyiBigTableDay(item));
|
|
|
|
|
|
+ bigTableDayList.forEach(sqlSessionMapper::insertTXinyiBigTableDay);
|
|
sqlSession.commit();
|
|
sqlSession.commit();
|
|
sqlSession.close();
|
|
sqlSession.close();
|
|
}
|
|
}
|