Pārlūkot izejas kodu

材料缴交bug修复

dzx 2 mēneši atpakaļ
vecāks
revīzija
2871c9b2e3

+ 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);