瀏覽代碼

材料缴交bug修复

dzx 2 月之前
父節點
當前提交
2871c9b2e3
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/main/java/com/xjrsoft/module/material/controller/MaterialTaskController.java

+ 2 - 3
src/main/java/com/xjrsoft/module/material/controller/MaterialTaskController.java

@@ -51,7 +51,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -185,8 +184,8 @@ public class MaterialTaskController {
 
     @PostMapping("/export-query")
     @ApiOperation(value = "导出")
-    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();
+    public ResponseEntity<byte[]> exportData(@Valid @RequestBody MaterialTaskPageDto dto) {
+        List<MaterialTaskPageVo> customerList = ((PageOutput<MaterialTaskPageVo>) page(dto).getData()).getList();
         ByteArrayOutputStream bot = new ByteArrayOutputStream();
         EasyExcel.write(bot, MaterialTaskPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);