|
@@ -12,7 +12,9 @@ import org.apache.poi.ss.usermodel.*;
|
|
|
import org.apache.poi.ss.util.CellRangeAddress;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
@@ -23,7 +25,6 @@ import java.io.OutputStream;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.net.URLEncoder;
|
|
|
-import java.text.ParseException;
|
|
|
import java.time.LocalDate;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.LinkedHashMap;
|
|
@@ -36,7 +37,7 @@ import java.util.stream.Collectors;
|
|
|
*
|
|
|
* @author ruoyi
|
|
|
*/
|
|
|
-@Api("数据导出接口--绩效")
|
|
|
+@Api(tags = "数据导出接口--绩效")
|
|
|
@RestController
|
|
|
@Slf4j
|
|
|
public class ApiProductivityExportController extends BaseController {
|
|
@@ -100,7 +101,7 @@ public class ApiProductivityExportController extends BaseController {
|
|
|
@ApiOperation("导出绩效月报")
|
|
|
@RequestMapping("/api/export/productivity-month")
|
|
|
@CrossOrigin(origins = "*")
|
|
|
- public void productivityMonthExport(String date, HttpServletResponse response) {
|
|
|
+ public void productivityMonthExport(String date, HttpServletResponse response) {
|
|
|
date = date.substring(0, 7);
|
|
|
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream("tpl/productivity-month.xlsx"); XSSFWorkbook wb = new XSSFWorkbook(inputStream); OutputStream outputStream = new BufferedOutputStream(response.getOutputStream())) {
|
|
|
CreationHelper creationHelper = wb.getCreationHelper();
|