| | |
| | | import cn.gistack.sm.sjztmd.entity.AttAdBase; |
| | | import cn.gistack.sm.sjztmd.entity.AttResBase; |
| | | import cn.gistack.sm.sjztmd.entity.AttResStagChar; |
| | | import cn.gistack.sm.sjztmd.excel.AttResBaseUserExcel; |
| | | import cn.gistack.sm.sjztmd.service.IAttAdBaseService; |
| | | import cn.gistack.sm.sjztmd.service.IAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.vo.AttAdBaseVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResWithRainfall; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | 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.node.ForestNodeMerger; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @ApiOperation(value = "中台水库-查询该行政区下的水库", notes = "中台水库-查询该行政区下的水库") |
| | | @GetMapping(value = "/getListByRegion") |
| | | public R getListByRegion(@ApiIgnore @RequestParam Map<String, Object> obj,Query query) { |
| | | IPage<AttResBase> pageList = attResBaseService.getListByRegion(Condition.getPage(query),obj); |
| | | IPage<AttResBaseVO> pageList = attResBaseService.getListByRegion(Condition.getPage(query),obj); |
| | | return R.data(pageList); |
| | | } |
| | | |
| | |
| | | public R getAttResBaseUserPage(@RequestParam Map<String, Object> params,Query query) { |
| | | return R.data(attResBaseService.getAttResBaseUserPage(Condition.getPage(query),params)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出责任人数据 |
| | | * @param params 条件查询参数对象 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-导出责任人数据", notes = "中台水库-导出责任人数据") |
| | | @GetMapping(value = "/exportAttResBaseUser") |
| | | public void exportAttResBaseUser(@RequestParam Map<String, Object> params, HttpServletResponse response) { |
| | | |
| | | List<AttResBaseUserExcel> list = attResBaseService.exportAttResBaseUser(params); |
| | | ExcelUtil.export(response, "水库责任人数据数据" + DateUtil.time(), "水库责任人数据表", list, AttResBaseUserExcel.class); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | |
| | | return R.data(attResBaseService.getWaterRegionInfoByResGuid(guid)); |
| | | } |
| | | |
| | | /** |
| | | * 更新报汛状态 |
| | | * @param ids |
| | | * @param status |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/updateIsShowStatus") |
| | | public R updateIsShowStatus(String ids,Integer status){ |
| | | return R.status(attResBaseService.updateIsShowStatus(ids,status)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据预报降雨等值面图,识别出雨量范围内的水库清单 |
| | | * @param minRainfall 最小降雨量 |
| | | * @param maxRainfall 最大降雨量 |
| | | * @param dayIndex 预报的时段,0-2代表未来3天 |
| | | * @return 水库对象列表 |
| | | */ |
| | | @ApiOperation(value = "根据预报降雨等值面图,识别出雨量范围内的水库清单", notes = "根据预报降雨等值面图,识别出雨量范围内的水库清单") |
| | | @PostMapping(value = "/getAttResByRainfall") |
| | | public R<List<AttResWithRainfall>> getAttResByRainfall( |
| | | @ApiParam(value = "最小降雨量") @RequestParam String minRainfall, |
| | | @ApiParam(value = "最大降雨量") @RequestParam String maxRainfall, |
| | | @ApiParam(value = "预报的时段,0-2代表未来3天") @RequestParam String dayIndex) { |
| | | return R.data(attResBaseService.getAttResByRainfall(minRainfall, maxRainfall, dayIndex)); |
| | | } |
| | | |
| | | /** |
| | | * 统计不同日降水量范围下的站点个数 |
| | | * @param dayIndex 预报的时段,0-2代表未来3天 |
| | | * @return 站点个数列表 |
| | | */ |
| | | @ApiOperation(value = "统计不同日降水量范围的站点个数", notes = "统计不同日降水量范围的站点个数") |
| | | @PostMapping(value = "/getAttResNumByRainfall") |
| | | public R<int[]> getAttResNumByRainfall(@ApiParam(value = "预报的时段,0-2代表未来3天") @RequestParam String dayIndex) { |
| | | return R.data(attResBaseService.getAttResNumByRainfall(dayIndex)); |
| | | } |
| | | } |