Browse Source

迁入管理

master
sunyuchao 3 years ago
parent
commit
0c6a90e47a
  1. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java

16
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java

@ -89,23 +89,19 @@ public class IcMoveInRecordController {
}
@PostMapping("export")
public void export(@RequestBody IcMoveInListFormDTO formDTO, HttpServletResponse response) throws Exception {
formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc");
public void export(@LoginUser TokenDto tokenDto, @RequestBody IcMoveInListFormDTO formDTO, HttpServletResponse response) throws Exception {
formDTO.setCustomerId(tokenDto.getCustomerId());
/* formDTO.setIsPage(true);
IcMoveInListResultDTO resultDTO = icMoveInRecordService.list(formDTO);
List<IcMoveInRecordExcel> list = ConvertUtils.sourceToTarget(resultDTO.getList(), IcMoveInRecordExcel.class);
ExcelUtils.exportExcelToTarget(response, null, list, IcMoveInRecordExcel.class);*/
ExcelWriter excelWriter = null;
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
int pageNo = NumConstant.ONE;
try {
String fileName = "迁入管理"+DateUtils.format(new Date())+".xlsx";
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcMoveInRecordExcel.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
List<IcMoveInRecordExcel> list = null;
do {
@ -121,14 +117,6 @@ public class IcMoveInRecordController {
excelWriter.finish();
}
}
}
@RequestMapping("detail")

Loading…
Cancel
Save