|
@@ -185,7 +185,7 @@ public class MaterialTaskController {
|
|
|
|
|
|
@PostMapping("/export-query")
|
|
@PostMapping("/export-query")
|
|
@ApiOperation(value = "导出")
|
|
@ApiOperation(value = "导出")
|
|
- public ResponseEntity<byte[]> exportData(@Valid MaterialTaskPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
|
|
|
|
|
|
+ public ResponseEntity<byte[]> exportData(@Valid @RequestBody MaterialTaskPageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
|
|
List<MaterialTaskPageVo> customerList = isTemplate != null && isTemplate ? new ArrayList<>() : ((PageOutput<MaterialTaskPageVo>) page(dto).getData()).getList();
|
|
List<MaterialTaskPageVo> customerList = isTemplate != null && isTemplate ? new ArrayList<>() : ((PageOutput<MaterialTaskPageVo>) page(dto).getData()).getList();
|
|
ByteArrayOutputStream bot = new ByteArrayOutputStream();
|
|
ByteArrayOutputStream bot = new ByteArrayOutputStream();
|
|
EasyExcel.write(bot, MaterialTaskPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
|
|
EasyExcel.write(bot, MaterialTaskPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
|
|
@@ -277,7 +277,7 @@ public class MaterialTaskController {
|
|
|
|
|
|
@PostMapping("/download-file")
|
|
@PostMapping("/download-file")
|
|
@ApiOperation(value = "下载附件(zip压缩包)")
|
|
@ApiOperation(value = "下载附件(zip压缩包)")
|
|
- public ResponseEntity<byte[]> downloadFile(@Valid MaterialTaskAssignListDto dto) {
|
|
|
|
|
|
+ public ResponseEntity<byte[]> downloadFile(@Valid @RequestBody MaterialTaskAssignListDto dto) {
|
|
MaterialTask materialTask = materialTaskService.getById(dto.getMaterialTaskId());
|
|
MaterialTask materialTask = materialTaskService.getById(dto.getMaterialTaskId());
|
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
|