package com.ycl.platform.controller; import com.ycl.platform.service.IMonitorConstructionService; import com.ycl.system.Result; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; /** * zgyw * * @author : zxl * @date : 2025-10-20 13:55 **/ @RestController @RequestMapping("/monitorConstruction") @RequiredArgsConstructor public class MonitorConstructionController { private final IMonitorConstructionService monitorConstructionService; @PostMapping("/import") public Result importExcel(@RequestBody MultipartFile file) { return monitorConstructionService.importExcel(file); } @PostMapping("/importTemplate") public void importTemplate(HttpServletResponse httpServletResponse) { monitorConstructionService.getImportTemplate(httpServletResponse); } }