| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.yw.entity.FirmInfo; |
| | | import org.springblade.modules.yw.excel.FirmInfoExcel; |
| | | import org.springblade.modules.yw.excel.FirmInfoImporter; |
| | | import org.springblade.modules.yw.service.IFirmInfoService; |
| | | import org.springblade.modules.yw.vo.FirmInfoVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 企业信息控制层 |
| | |
| | | return R.status(firmInfoService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导入企业信息 |
| | | */ |
| | | @PostMapping("import-firmInfo") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "导入企业信息", notes = "传入excel") |
| | | public R importFirmInfo(MultipartFile file, Integer isCovered) { |
| | | String data = firmInfoService.importFirmInfo(ExcelUtil.read(file, FirmInfoExcel.class),isCovered == 1); |
| | | return R.data(200, data, data); |
| | | } |
| | | |
| | | /** |
| | | * 自定义详情查询 |
| | | * @param firmInfo |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDetail") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "详情", notes = "传入firmInfo") |
| | | public R getDetail(FirmInfoVO firmInfo) { |
| | | FirmInfoVO detail = firmInfoService.getDetail(firmInfo); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 模糊查询企业名称、应急空间名称、风险源名称 |
| | | * @param firmInfo |
| | | * @return |
| | | */ |
| | | @GetMapping("/fuzzyQuery") |
| | | @ApiOperationSupport(order = 10) |
| | | @ApiOperation(value = "模糊查询企业名称、应急空间名称、风险源名称", notes = "传入firmInfo") |
| | | public R fuzzyQuery(FirmInfoVO firmInfo) { |
| | | return R.data(firmInfoService.fuzzyQuery(firmInfo)); |
| | | } |
| | | } |