| | |
| | | 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.EmergencySpaceExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.yw.entity.EmergencySpaceEntity; |
| | | import org.springblade.modules.yw.vo.EmergencySpaceVO; |
| | | import org.springblade.modules.yw.service.IEmergencySpaceService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-emergencySpace/emergencySpace") |
| | | @RequestMapping("yw/emergencySpace") |
| | | @Api(value = "应急空间表", tags = "应急空间表接口") |
| | | public class EmergencySpaceController { |
| | | |
| | |
| | | return R.status(emergencySpaceService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导入应急空间信息 |
| | | */ |
| | | @PostMapping("import-emergencySpace") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "导入应急空间信息", notes = "传入excel") |
| | | public R importEmergencySpace(MultipartFile file, Integer isCovered) { |
| | | String data = emergencySpaceService.importEmergencySpace(ExcelUtil.read(file, EmergencySpaceExcel.class),isCovered == 1); |
| | | return R.data(200, data, data); |
| | | } |
| | | |
| | | /** |
| | | * 获取应急空间统计数据 |
| | | * @param emergencySpace |
| | | * @return |
| | | */ |
| | | @GetMapping("getStatisticData") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "获取应急空间统计数据", notes = "") |
| | | public R getStatisticData(EmergencySpaceVO emergencySpace) { |
| | | return R.data(emergencySpaceService.getStatisticData(emergencySpace)); |
| | | } |
| | | } |