| | |
| | | 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.EmergencySuppliesExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.yw.entity.EmergencySuppliesEntity; |
| | | import org.springblade.modules.yw.vo.EmergencySuppliesVO; |
| | | import org.springblade.modules.yw.service.IEmergencySuppliesService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-emergencySupplies/emergencySupplies") |
| | | @RequestMapping("yw/emergencySupplies") |
| | | @Api(value = "应急物资表", tags = "应急物资表接口") |
| | | public class EmergencySuppliesController{ |
| | | |
| | |
| | | return R.status(emergencySuppliesService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导入应急物资信息 |
| | | */ |
| | | @PostMapping("import-emergencySupplies") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "导入应急物资信息", notes = "传入excel") |
| | | public R importEmergencySupplies(MultipartFile file, Integer isCovered) { |
| | | String data = emergencySuppliesService.importEmergencySupplies(ExcelUtil.read(file, EmergencySuppliesExcel.class),isCovered == 1); |
| | | return R.data(200, data, data); |
| | | } |
| | | |
| | | /** |
| | | * 获取应急物资信息 |
| | | * @param emergencySupplies |
| | | * @return |
| | | */ |
| | | @GetMapping("/getEmergencySuppliesList") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "获取应急物资信息", notes = "传入emergencySupplies") |
| | | public R getEmergencySuppliesList(EmergencySuppliesVO emergencySupplies) { |
| | | return R.data(emergencySuppliesService.getEmergencySuppliesList(emergencySupplies)); |
| | | } |
| | | } |