| | |
| | | import com.project.common.annotation.RepeatSubmit; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | 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.bind.annotation.*; |
| | | import com.project.common.annotation.Log; |
| | | import com.project.common.core.controller.BaseController; |
| | | import com.project.common.core.domain.AjaxResult; |
| | |
| | | import com.project.common.core.page.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * 企业信息Controller |
| | |
| | | { |
| | | return toAjax(iSysCompanyService.deleteByIds(Arrays.asList(companyIds)) ? 1 : 0); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("企业信息模板下载") |
| | | @GetMapping("/exportTemplate") |
| | | public AjaxResult exportTemplate() |
| | | { |
| | | ExcelUtil<SysCompanyVo> util = new ExcelUtil<>(SysCompanyVo.class); |
| | | return util.exportExcel(null, "企业信息模板"); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入活动指标") |
| | | @PostMapping("/import") |
| | | public AjaxResult importList(@RequestParam MultipartFile file) throws Exception |
| | | { |
| | | ExcelUtil<SysCompanyVo> util = new ExcelUtil<>(SysCompanyVo.class); |
| | | List<SysCompanyVo> list = util.importExcel(file.getInputStream()); |
| | | return toAjax(iSysCompanyService.importList(list) ? 1 : 0); |
| | | } |
| | | } |