| | |
| | | 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 org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | 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; |
| | |
| | | public void exportAttResBaseUser(@RequestParam Map<String, Object> params, HttpServletResponse response) { |
| | | |
| | | List<AttResBaseUserExcel> list = attResBaseService.exportAttResBaseUser(params); |
| | | |
| | | /** |
| | | * 如果不是超级管理员数据需要处理 处理逻辑如下 |
| | | * (1)大中型水库的行政责任人电话都不显示。 |
| | | * (2)省直管且是大中型的6座水库(漳河、高关、富水、王英、吴岭、蔡贤水库)的主管部门负责人手机号不显示。 |
| | | * (3)三峡、葛洲坝、隔河岩、高坝州、丹江口(以后可以手动加)除了巡查责任人外的责任人的手机号码不显示。 |
| | | */ |
| | | if (!AuthUtil.isAdministrator()) { |
| | | for (AttResBaseUserExcel excel:list) { |
| | | if (excel.getEngScal().equals("大(1)型") || excel.getEngScal().equals("大(2)型") || excel.getEngScal().equals("中型")) { |
| | | excel.setAreaPhone(""); |
| | | } |
| | | if (excel.getName().equals("漳河水库") || excel.getName().equals("高关水库") || excel.getName().equals("富水漳河水库") |
| | | || excel.getName().equals("王英水库") || excel.getName().equals("吴岭水库") || excel.getName().equals("蔡贤水库")) { |
| | | excel.setCustomsPhone(""); |
| | | } |
| | | if (excel.getName().equals("三峡") || excel.getName().equals("葛洲坝") || excel.getName().equals("隔河岩") |
| | | || excel.getName().equals("高坝州") || excel.getName().equals("丹江口")) { |
| | | excel.setAreaPhone("");//行政 |
| | | excel.setCustomsPhone("");//主管 |
| | | excel.setManageUnitPhone("");//管理单位 |
| | | excel.setTechnologyPhone("");//技术 |
| | | } |
| | | } |
| | | } |
| | | |
| | | ExcelUtil.export(response, "水库责任人数据数据" + DateUtil.time(), "水库责任人数据表", list, AttResBaseUserExcel.class); |
| | | } |
| | | |
| | |
| | | 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)); |
| | | } |
| | | } |