| | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | 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.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.yw.excel.ProTarExcel; |
| | | import org.springblade.modules.yw.excel.RiskSourceExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.yw.entity.RiskSourceEntity; |
| | | import org.springblade.modules.yw.vo.RiskSourceVO; |
| | | import org.springblade.modules.yw.service.IRiskSourceService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-riskSource/riskSource") |
| | | @RequestMapping("yw/riskSource") |
| | | @Api(value = "风险源表", tags = "风险源表接口") |
| | | public class RiskSourceController { |
| | | |
| | |
| | | return R.status(riskSourceService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导入风险源信息 |
| | | */ |
| | | @PostMapping("import-riskSource") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "导入风险源信息", notes = "传入excel") |
| | | public R importRiskSource(MultipartFile file, Integer isCovered) { |
| | | String data = riskSourceService.importRiskSource(ExcelUtil.read(file, RiskSourceExcel.class),isCovered == 1); |
| | | return R.data(200, data, data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 风险源统计查询 |
| | | * @param riskSource |
| | | * @return |
| | | */ |
| | | @GetMapping("/getStatisticData") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "风险源统计查询", notes = "") |
| | | public R getStatisticData(RiskSourceVO riskSource) { |
| | | return R.data(riskSourceService.getStatisticData(riskSource)); |
| | | } |
| | | |
| | | } |