| | |
| | | package com.gkhy.exam.admin.controller.web; |
| | | |
| | | import com.gkhy.exam.common.annotation.Log; |
| | | import com.gkhy.exam.common.annotation.RepeatSubmit; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.enums.BusinessType; |
| | | import com.gkhy.exam.system.domain.*; |
| | | import com.gkhy.exam.system.service.*; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | @Api(tags = "企业基础信息管理") |
| | | @RestController |
| | |
| | | |
| | | @Autowired |
| | | private CompanyRosterService companyRosterService; |
| | | |
| | | @Autowired |
| | | private CompanyIndustryTemplateService companyIndustryTemplateService; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 行业模版 |
| | | * @param companyIndustryTemplate |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "行业模版(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | @GetMapping("/industryTemplate/list") |
| | | public CommonResult selectCompanyIndustryTemplateList(CompanyIndustryTemplate companyIndustryTemplate){ |
| | | return CommonResult.success(companyIndustryTemplateService.selectCompanyIndustryTemplateList(companyIndustryTemplate)); |
| | | } |
| | | |
| | | /** |
| | | * 行业模版新增 |
| | | * @param companyRoster |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "行业模版新增") |
| | | @PostMapping("/industryTemplate/insert") |
| | | public CommonResult insertCompanyIndustryTemplate(@Validated @RequestBody CompanyIndustryTemplate companyRoster){ |
| | | return companyIndustryTemplateService.insertCompanyIndustryTemplate(companyRoster); |
| | | } |
| | | |
| | | /** |
| | | * 企业花名册修改 |
| | | * @param companyIndustryTemplate |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "行业模版修改") |
| | | @PostMapping("/industryTemplate/update") |
| | | public CommonResult updateCompanyIndustryTemplate(@Validated @RequestBody CompanyIndustryTemplate companyIndustryTemplate){ |
| | | return companyIndustryTemplateService.updateCompanyIndustryTemplate(companyIndustryTemplate); |
| | | } |
| | | |
| | | /** |
| | | * 行业模版删除 |
| | | * @param industryTemplateId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "行业模版删除") |
| | | @GetMapping("/industryTemplate/deleted") |
| | | public CommonResult deletedCompanyIndustryTemplate(@RequestParam("companyRosterId") Integer industryTemplateId){ |
| | | return companyIndustryTemplateService.deletedCompanyIndustryTemplate(industryTemplateId); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "行业管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "导入行业") |
| | | @PostMapping("/industryTemplate/upload") |
| | | public CommonResult uploadQuestion(@RequestParam("file") MultipartFile file) throws IOException { |
| | | return companyIndustryTemplateService.uploadQuestion(file); |
| | | } |
| | | |
| | | |
| | | |
| | | |