| | |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.utils.ExcelUtil; |
| | | import com.kidgrow.oprationcenter.model.DataNeed; |
| | | import com.kidgrow.oprationcenter.service.IDataNeedService; |
| | | import com.kidgrow.oprationcenter.vo.DataNeedExcel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | |
| | | dataNeedService.removeById(id); |
| | | return ResultBody.ok().msg("删除成功"); |
| | | } |
| | | /** |
| | | * 导出excel |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("/export") |
| | | public ResultBody exportUser(@RequestParam Map<String, Object> params, HttpServletResponse response) throws IOException { |
| | | List<DataNeedExcel> result = dataNeedService.findListExportByParam(params); |
| | | //导出操作 |
| | | ExcelUtil.exportExcel(result, null, "数据需求", DataNeedExcel.class, "DataNeed", response); |
| | | return ResultBody.ok().msg("导出数据成功"); |
| | | } |
| | | } |