|
|
@ -15,6 +15,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
|
import com.epmet.dto.ChangeRelocationDTO; |
|
|
|
import com.epmet.excel.ChangeRelocationExcel; |
|
|
|
import com.epmet.service.ChangeRelocationService; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
@ -79,7 +80,12 @@ public class ChangeRelocationController { |
|
|
|
@GetMapping("export") |
|
|
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|
|
|
List<ChangeRelocationDTO> list = changeRelocationService.list(params); |
|
|
|
ExcelUtils.exportExcelToTarget(response, null, list, ChangeRelocationExcel.class); |
|
|
|
if(CollectionUtils.isEmpty(list)){ |
|
|
|
ChangeRelocationDTO dto = new ChangeRelocationDTO(); |
|
|
|
dto.setId(""); |
|
|
|
list.add(dto); |
|
|
|
} |
|
|
|
ExcelUtils.exportEpmetExcel(response, null, list, ChangeRelocationExcel.class); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|