| | |
| | | hollowState:'中空当天运行情况', |
| | | switch:'切换', |
| | | running:'运行中', |
| | | stopping:'停止中', |
| | | stopping:'停止', |
| | | diffMinutes:'分钟', |
| | | loadstart:'切割开始时间', |
| | | loadend:'切割结束时间', |
| | |
| | | let myChartHollow = null; |
| | | const socketUrl1 = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/largenScreen`; |
| | | const handleMessage1 = (data) => { |
| | | edgOneTasks.value = data.edgOneTasks[0]; |
| | | edgTwoTasks.value = data.edgTwoTasks[0]; |
| | | edgOneTasks.value = data.edgOneCount[0]; |
| | | edgTwoTasks.value = data.edgOneCount[0]; |
| | | engineeringOne.value = data.engineeringOne[0]; |
| | | engineeringTwo.value = data.engineeringTwo[0]; |
| | | if (numBoxes.value != edgOneTasks.value.length) { |
| | | numBoxes.value = edgOneTasks.value.length; |
| | | if (numBoxes.value != edgOneTasks.value) { |
| | | numBoxes.value = edgOneTasks.value; |
| | | initBoxes(boxes, numBoxes, 'firstup'); |
| | | |
| | | } |
| | | if (numBoxes2.value != edgTwoTasks.value.length) { |
| | | numBoxes2.value = edgTwoTasks.value.length; |
| | | if (numBoxes2.value != edgTwoTasks.value) { |
| | | numBoxes2.value = edgTwoTasks.value; |
| | | initBoxes(boxes2, numBoxes2, 'firstup'); |
| | | } |
| | | timeAxisCreate(t('large.cuttingState'), chartLoad.value, myChartLoad, tableDataTime(false, data.loadRunTimes[0])); |
| | |
| | | const tableData = []; |
| | | if (tableDatax.length > 0) { |
| | | tableDatax.forEach((item, index) => { |
| | | const time1 = new Date(index == 0 ? item.startTimestamp : tableDatax[index - 1].secondTimestamp); |
| | | const time2 = new Date(index == tableDatax.length - 1 ? item.endTimestamp : item.firstTimestamp); |
| | | |
| | | const diffInSeconds = Math.abs(time2 - time1) / 1000; |
| | | if (diffInSeconds > 60) { |
| | | tableData.push({ |
| | | firstTimestamp: index == 0 ? item.startTimestamp : tableDatax[index - 1].secondTimestamp, |
| | | secondTimestamp: index == tableDatax.length - 1 ? item.endTimestamp : item.firstTimestamp, |
| | |
| | | state: 2 |
| | | }); |
| | | } |
| | | // console.log("间隔超过60秒", diffInSeconds, time1, time2); |
| | | } else { |
| | | if(index>0){ |
| | | // console.log(tableData,index); |
| | | } |
| | | // console.log("间隔不超过60秒", diffInSeconds, time1, time2); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | |
| | | ] |
| | | }; |
| | | |
| | | mychart.setOption(optionOne); |
| | | mychart.setOption(optionOne,true); |
| | | }; |
| | | |
| | | let socket4 = null; |
| | |
| | | ] |
| | | }; |
| | | |
| | | myChart.setOption(option); |
| | | myChart.setOption(option,true); |
| | | |
| | | |
| | | const chartDom2 = chartRef2.value; |
| | |
| | | ] |
| | | }; |
| | | |
| | | myChart2.setOption(option2); |
| | | myChart2.setOption(option2,true); |
| | | }; |
| | | // 将原始数据转换为 ECharts 图表所需格式 |
| | | let categories = ref([]); // 获取日期作为 x 轴 |
| | |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.get("/cacheGlass/edgStorageDeviceTaskHistory/queryRunTimes?days=" + timeRange.value[1]) |
| | | let response; |
| | | if (key == "1" || key == "2") { |
| | | response = await request.get("/cacheGlass/edgStorageDeviceTaskHistory/queryRunTimes?days=" + timeRange.value[1]) |
| | | } else if (key == "3") { |
| | | response = await request.get("/cacheVerticalGlass/bigStorageCageHistoryTask/queryRunTimes?days=" + timeRange.value[1]) |
| | | } else { |
| | | response = await request.get("/hollowGlass/hollowBigStorageCageHistoryTask/queryRunTimes?days=" + timeRange.value[1]) |
| | | } |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | // const formattedData = response.data.records.map(record => ({ |
| | |
| | | const tableData = []; |
| | | if (tableDatax.value.length > 0) { |
| | | tableDatax.value.forEach((item, index) => { |
| | | const time1 = new Date(index == 0 ? item.startTimestamp : tableDatax.value[index - 1].secondTimestamp); |
| | | const time2 = new Date(index == tableDatax.length - 1 ? item.endTimestamp : item.firstTimestamp); |
| | | |
| | | const diffInSeconds = Math.abs(time2 - time1) / 1000; |
| | | if (diffInSeconds > 60) { |
| | | tableData.push({ |
| | | firstTimestamp: index == 0 ? item.startTimestamp : tableDatax.value[index - 1].secondTimestamp, |
| | | secondTimestamp: index == tableDatax.length - 1 ? item.endTimestamp : item.firstTimestamp, |
| | |
| | | endTimestamp: item.endTimestamp, |
| | | state: 1 |
| | | }); |
| | | console.log("间隔超过60秒", diffInSeconds, time1, time2); |
| | | } else { |
| | | console.log("间隔不超过60秒", diffInSeconds, time1, time2); |
| | | } |
| | | |
| | | if (result) { |
| | | tableData.push({ |
| | | firstTimestamp: item.firstTimestamp, |
| | |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.get("/cacheGlass/edgStorageDeviceTaskHistory/queryRunTimes?days=" + timeRange.value[1]) |
| | | let response; |
| | | if (key == "1" || key == "2") { |
| | | response = await request.get("/cacheGlass/edgStorageDeviceTaskHistory/queryRunTimes?days=" + timeRange.value[1]) |
| | | } else if (key == "3") { |
| | | response = await request.get("/cacheVerticalGlass/bigStorageCageHistoryTask/queryRunTimes?days=" + timeRange.value[1]) |
| | | } else { |
| | | response = await request.get("/hollowGlass/hollowBigStorageCageHistoryTask/queryRunTimes?days=" + timeRange.value[1]) |
| | | } |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | // const formattedData = response.data.records.map(record => ({ |
| | |
| | | } |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.get("/cacheGlass/edgStorageDeviceTaskHistory/queryRunTimes?days=" + timeRange.value[1]) |
| | | let response; |
| | | if (key == "1" || key == "2") { |
| | | response = await request.get("/cacheGlass/edgStorageDeviceTaskHistory/queryRunTimes?days=" + timeRange.value[1]) |
| | | } else if (key == "3") { |
| | | response = await request.get("/cacheVerticalGlass/bigStorageCageHistoryTask/queryRunTimes?days=" + timeRange.value[1]) |
| | | } else { |
| | | response = await request.get("/hollowGlass/hollowBigStorageCageHistoryTask/queryRunTimes?days=" + timeRange.value[1]) |
| | | } |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1 |
| | | ElMessage.success(response.message); |
| | |
| | | let myChart = null; |
| | | const chart = ref(null) |
| | | const timeAxisCreate = (title, chartDom, mychart, RunTimes) => { |
| | | if (mychart) { |
| | | mychart.clear(); |
| | | // 如果需要,可以重新初始化图表 |
| | | } |
| | | if (!chartDom) { |
| | | console.error('图表容器未找到'); |
| | | return; |
| | |
| | | }, |
| | | z: 1 |
| | | })); |
| | | |
| | | |
| | | console.log("segments", RunTimes.length, segments); |
| | | const optionOne = { |
| | | title: { |
| | | text: title, |
| | |
| | | ] |
| | | }; |
| | | |
| | | mychart.setOption(optionOne); |
| | | mychart.setOption(optionOne, true); |
| | | }; |
| | | |
| | | </script> |
| | |
| | | <java.run.main.class>com.mes.CacheGlassModuleApplication</java.run.main.class> |
| | | </properties> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-jar-plugin</artifactId> |
| | | <version>3.2.0</version> |
| | | <configuration> |
| | | <archive> |
| | | <manifest> |
| | | <addClasspath>true</addClasspath> |
| | | <classpathPrefix>lib/</classpathPrefix> |
| | | <mainClass>com.mes.CacheGlassModuleApplication</mainClass> |
| | | </manifest> |
| | | <manifestEntries> |
| | | <Class-Path>resources/</Class-Path> |
| | | </manifestEntries> |
| | | </archive> |
| | | <outputDirectory>${project.build.directory}</outputDirectory> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | |
| | | </project> |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("largenScreen"); |
| | | if (sendwServer != null) { |
| | | Date startOfToday = new Date(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli()); |
| | | |
| | | List<EdgGlassTaskInfo> edgOneTasks = edgGlassTaskInfoService.list( |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String formatted = sdf.format(startOfToday); |
| | | LocalDate date = LocalDate.parse(formatted); // formatted = "2025-05-23" |
| | | LocalDateTime start = date.atStartOfDay(); // 2025-05-23 00:00:00 |
| | | LocalDateTime end = date.plusDays(1).atStartOfDay(); |
| | | int edgOneCount = edgGlassTaskInfoService.count( |
| | | new LambdaQueryWrapper<EdgGlassTaskInfo>() |
| | | .lt(EdgGlassTaskInfo::getState, 2) |
| | | .eq(EdgGlassTaskInfo::getLine, 1) |
| | | .ge(EdgGlassTaskInfo::getCreateTime, startOfToday) |
| | | .between(EdgGlassTaskInfo::getCreateTime, start, end) |
| | | ); |
| | | List<EdgGlassTaskInfo> edgTwoTasks = edgGlassTaskInfoService.list( |
| | | edgOneCount = edgOneCount >= 6 ? 6 : edgOneCount; |
| | | int edgTwoCount = edgGlassTaskInfoService.count( |
| | | new LambdaQueryWrapper<EdgGlassTaskInfo>() |
| | | .lt(EdgGlassTaskInfo::getState, 2) |
| | | .eq(EdgGlassTaskInfo::getLine, 2) |
| | | .ge(EdgGlassTaskInfo::getCreateTime, startOfToday) |
| | | .between(EdgGlassTaskInfo::getCreateTime, start, end) |
| | | ); |
| | | jsonObject.append("edgOneTasks", edgOneTasks); |
| | | jsonObject.append("edgTwoTasks", edgTwoTasks); |
| | | edgTwoCount = edgTwoCount >= 6 ? 6 : edgTwoCount; |
| | | jsonObject.append("edgOneCount", edgOneCount); |
| | | jsonObject.append("edgTwoCount", edgTwoCount); |
| | | List<Engineering> engineeringOne = engineeringService.list( |
| | | new LambdaQueryWrapper<Engineering>() |
| | | .eq(Engineering::getStationCell, 5) |
| | |
| | | jsonObject.append("engineeringTwo", engineeringTow); |
| | | List<PieChartVO> pieChartVOS = edgStorageCageDetailsService.queryPieChart(); |
| | | jsonObject.append("pieChartVOS", pieChartVOS); |
| | | List<RunTime> loadRunTimes = edgStorageDeviceTaskHistoryService.queryRunTimes(); |
| | | List<RunTime> loadRunTimes = edgStorageDeviceTaskHistoryService.queryRunTimes(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | jsonObject.append("loadRunTimes", loadRunTimes); |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import com.mes.largenscreen.entity.RunTime; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.entity.request.TaskHistoryRequest; |
| | | import com.mes.opctask.service.EdgStorageDeviceTaskHistoryService; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (EdgStorageDeviceTaskHistory)表控制层 |
| | |
| | | return Result.success(edgStorageDeviceTaskHistoryService.queryEdgDailyProduction(request)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询生产线运行情况", notes = "查询生产线运行情况") |
| | | @GetMapping("/queryRunTimes") |
| | | public Result<List<RunTime>> queryRunTimes(String days) { |
| | | return Result.success(edgStorageDeviceTaskHistoryService.queryRunTimes(days)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | DailyProductionVO queryEdgDailyProduction(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("deviceId") Integer deviceId); |
| | | |
| | | List<RunTime> queryRunTimes(); |
| | | List<RunTime> queryRunTimes(@Param("days") String days); |
| | | } |
| | | |
| | |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.entity.request.TaskHistoryRequest; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | DailyProductionVO queryEdgDailyProduction(TaskHistoryRequest request); |
| | | |
| | | List<RunTime> queryRunTimes(); |
| | | List<RunTime> queryRunTimes(String days); |
| | | } |
| | | |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<RunTime> queryRunTimes(){ |
| | | return baseMapper.queryRunTimes(); |
| | | public List<RunTime> queryRunTimes(String days){ |
| | | return baseMapper.queryRunTimes(days); |
| | | } |
| | | } |
| | | |
| | |
| | | <select id="queryRunTimes" resultType="com.mes.largenscreen.entity.RunTime"> |
| | | with edg_storage_cage_history_task_temp as ( |
| | | select distinct create_time from edg_storage_device_task_history where task_type in (1,3) and |
| | | create_time BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 1 DAY) |
| | | create_time LIKE '%${days}%' |
| | | ) |
| | | SELECT |
| | | t1.create_time AS first_timestamp, |
| | |
| | | import com.mes.bigstoragecagetask.entity.request.BigStorageCageHistoryRequest; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageHistoryTaskService; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import com.mes.largenscreen.entity.RunTime; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | public Result<DailyProductionVO> queryBigDailyProduction(@RequestBody BigStorageCageHistoryRequest request) { |
| | | return Result.success(bigStorageCageHistoryTaskService.queryBigDailyProduction(request)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询生产线运行情况", notes = "查询生产线运行情况") |
| | | @GetMapping("/queryRunTimes") |
| | | public Result<List<RunTime>> queryRunTimes(String days) { |
| | | return Result.success(bigStorageCageHistoryTaskService.queryRunTimes(days)); |
| | | } |
| | | } |
| | |
| | | |
| | | DailyProductionVO queryBigDailyProduction(@Param("beginDate") String beginDate, @Param("endDate") String endDate); |
| | | |
| | | List<RunTime> queryRunTimes(); |
| | | List<RunTime> queryRunTimes(@Param("days") String days); |
| | | } |
| | | |
| | |
| | | |
| | | DailyProductionVO queryBigDailyProduction(BigStorageCageHistoryRequest request); |
| | | |
| | | List<RunTime> queryRunTimes(); |
| | | List<RunTime> queryRunTimes(String days); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<RunTime> queryRunTimes(){ |
| | | return baseMapper.queryRunTimes(); |
| | | public List<RunTime> queryRunTimes(String days){ |
| | | return baseMapper.queryRunTimes(days); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | jsonObject.append("bigStorageCageUsage", bigStorageCageUsage); |
| | | List<PieChartVO> pieChartVOS = bigStorageCageService.queryPieChart(); |
| | | jsonObject.append("pieChartVOS", pieChartVOS); |
| | | List<RunTime> tempRunTimes = bigStorageCageHistoryTaskService.queryRunTimes(); |
| | | List<RunTime> tempRunTimes = bigStorageCageHistoryTaskService.queryRunTimes(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | jsonObject.append("tempRunTimes", tempRunTimes); |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | |
| | | select distinct create_time |
| | | from big_storage_cage_history_task |
| | | where task_type = 2 |
| | | and create_time BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 1 DAY) |
| | | and create_time LIKE '%${days}%' |
| | | ) |
| | | SELECT t1.create_time AS first_timestamp, |
| | | t2.create_time AS second_timestamp, |
| | |
| | | import com.mes.hollowtask.entity.request.HollowBigStorageCageHistoryRequest; |
| | | import com.mes.hollowtask.service.HollowBigStorageCageHistoryTaskService; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import com.mes.largenscreen.entity.RunTime; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (HollowBigStorageCageHistoryTask)表控制层 |
| | |
| | | public Result<DailyProductionVO> queryHollowDailyProduction(@RequestBody HollowBigStorageCageHistoryRequest request) { |
| | | return Result.success(hollowBigStorageCageHistoryTaskService.queryHollowDailyProduction(request)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询生产线运行情况", notes = "查询生产线运行情况") |
| | | @GetMapping("/queryRunTimes") |
| | | public Result<List<RunTime>> queryRunTimes(String days) { |
| | | return Result.success(hollowBigStorageCageHistoryTaskService.queryRunTimes(days)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | DailyProductionVO queryHollowDailyProduction(@Param("beginDate") String beginDate, @Param("endDate") String endDate); |
| | | |
| | | List<RunTime> queryRunTimes(); |
| | | List<RunTime> queryRunTimes(@Param("days") String days); |
| | | } |
| | | |
| | |
| | | |
| | | DailyProductionVO queryHollowDailyProduction(HollowBigStorageCageHistoryRequest request); |
| | | |
| | | List<RunTime> queryRunTimes(); |
| | | List<RunTime> queryRunTimes(String days); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<RunTime> queryRunTimes(){ |
| | | return baseMapper.queryRunTimes(); |
| | | public List<RunTime> queryRunTimes(String days){ |
| | | return baseMapper.queryRunTimes(days); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | //钢化饼图数据 |
| | | List<PieChartVO> pieChartVOS = hollowGlassOutRelationInfoService.queryPieChart(); |
| | | jsonObject.append("pieChartVOS", pieChartVOS); |
| | | List<RunTime> hollowRunTimes = hollowBigStorageCageHistoryTaskService.queryRunTimes(); |
| | | List<RunTime> hollowRunTimes = hollowBigStorageCageHistoryTaskService.queryRunTimes(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | jsonObject.append("hollowRunTimes", hollowRunTimes); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("largenScreen"); |
| | | if (sendwServer != null) { |
| | |
| | | <select id="queryRunTimes" resultType="com.mes.largenscreen.entity.RunTime"> |
| | | with big_storage_cage_history_task_temp as ( |
| | | select distinct create_time from hollow_big_storage_cage_history_task where task_type = 5 and |
| | | create_time BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 1 DAY) |
| | | create_time LIKE '%${days}%' |
| | | ) |
| | | SELECT |
| | | t1.create_time AS first_timestamp, |
| | | t2.create_time AS second_timestamp, |
| | | TIMESTAMPDIFF(MINUTE, t1.create_time, t2.create_time) as diff_minutes |
| | | TIMESTAMPDIFF(MINUTE, t1.create_time, t2.create_time) as diff_minutes, |
| | | (select min(create_time) from big_storage_cage_history_task_temp) as start_timestamp |
| | | ,(select max(create_time) from big_storage_cage_history_task_temp) as end_timestamp |
| | | FROM |
| | | (SELECT |
| | | create_time, |