|
@@ -15,6 +15,7 @@ import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
import org.jeecg.modules.detail.dto.InterlockDetailQueryDTO;
|
|
import org.jeecg.modules.detail.dto.InterlockDetailQueryDTO;
|
|
|
|
+import org.jeecg.modules.detail.mapper.InterlockDetailMapper;
|
|
import org.jeecg.modules.history.dto.InterlockHistoryQueryDTO;
|
|
import org.jeecg.modules.history.dto.InterlockHistoryQueryDTO;
|
|
import org.jeecg.modules.history.entity.InterlockDetailHistory;
|
|
import org.jeecg.modules.history.entity.InterlockDetailHistory;
|
|
import org.jeecg.modules.history.mapper.InterlockSummaryHistoryMapper;
|
|
import org.jeecg.modules.history.mapper.InterlockSummaryHistoryMapper;
|
|
@@ -64,6 +65,9 @@ public class InterlockDetailHistoryController extends JeecgController<InterlockD
|
|
@Autowired
|
|
@Autowired
|
|
@SuppressWarnings("all")
|
|
@SuppressWarnings("all")
|
|
private InterlockSummaryHistoryMapper summaryHistoryMapper;
|
|
private InterlockSummaryHistoryMapper summaryHistoryMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ @SuppressWarnings("all")
|
|
|
|
+ private InterlockDetailMapper interlockDetailMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -79,6 +83,7 @@ public class InterlockDetailHistoryController extends JeecgController<InterlockD
|
|
@GetMapping(value = "/sdexportLS")
|
|
@GetMapping(value = "/sdexportLS")
|
|
@ApiOperation("..............测试手动导出excel")
|
|
@ApiOperation("..............测试手动导出excel")
|
|
public void downloadExcel(HttpServletRequest request, HttpServletResponse response, InterlockHistoryQueryDTO dto) {
|
|
public void downloadExcel(HttpServletRequest request, HttpServletResponse response, InterlockHistoryQueryDTO dto) {
|
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
String timestamp = dateFormat.format(new Date());
|
|
String timestamp = dateFormat.format(new Date());
|
|
@@ -95,7 +100,7 @@ public class InterlockDetailHistoryController extends JeecgController<InterlockD
|
|
|
|
|
|
// 设置响应头使浏览器能够下载文件
|
|
// 设置响应头使浏览器能够下载文件
|
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
|
- response.setHeader("Content-Disposition", "attachment; filename=sample.xlsx");
|
|
|
|
|
|
+ response.setHeader("Content-Disposition", "attachment; filename="+fileName);
|
|
|
|
|
|
// 将Excel文件写入响应输出流
|
|
// 将Excel文件写入响应输出流
|
|
try {
|
|
try {
|
|
@@ -105,6 +110,11 @@ public class InterlockDetailHistoryController extends JeecgController<InterlockD
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ long endTime = System.currentTimeMillis();
|
|
|
|
+ long duration = endTime - startTime;
|
|
|
|
+ String log = "手动导出Excel程序运行时间(毫秒):" + duration;
|
|
|
|
+ System.out.println(log);
|
|
|
|
+// interlockDetailMapper.insertIntoTimeTestLog("手动导出",duration);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -117,8 +127,14 @@ public class InterlockDetailHistoryController extends JeecgController<InterlockD
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
HttpServletRequest req){
|
|
HttpServletRequest req){
|
|
|
|
+ long startTime = System.currentTimeMillis();
|
|
Page<InterlockSummaryHistoryVO> page = new Page<>(pageNo,pageSize);
|
|
Page<InterlockSummaryHistoryVO> page = new Page<>(pageNo,pageSize);
|
|
IPage<InterlockSummaryHistoryVO> pageList = interlockDetailHistoryService.getPage(page, dto);
|
|
IPage<InterlockSummaryHistoryVO> pageList = interlockDetailHistoryService.getPage(page, dto);
|
|
|
|
+ long endTime = System.currentTimeMillis();
|
|
|
|
+ long duration = endTime - startTime;
|
|
|
|
+ String log = "联锁历史数据各种逻辑状态程序运行时间(毫秒):" + duration;
|
|
|
|
+ System.out.println(log);
|
|
|
|
+// interlockDetailMapper.insertIntoTimeTestLog("联锁历史数据逻辑状态",duration);
|
|
return Result.OK(pageList);
|
|
return Result.OK(pageList);
|
|
}
|
|
}
|
|
|
|
|