Merge remote-tracking branch 'origin/jtdev' into jtdev
| | |
| | | |
| | | String GENERATE_DAY_REPORT_FLOOD = API_PREFIX + "generateDayReportFlood"; |
| | | |
| | | String GET_RESERVOIR_RAINFALL_FORECAST = API_PREFIX + "getReservoirRainfallForecast"; |
| | | String GET_RESERVOIR_RAINFALL_FORECAST = API_PREFIX + "/getReservoirRainfallForecast"; |
| | | |
| | | @GetMapping(GENERATE_DAY_REPORT_FLOOD) |
| | | String generateDayReportFlood(@RequestParam("isShow") String isShow) throws Exception; |
| | |
| | | // 查询当前策略对应的告警规则信息 |
| | | AlarmRule alarmRule = alarmRuleService.getOne(new QueryWrapper<AlarmRule>().eq("rule_name", arg1)); |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.over_des_rz_warn_api); |
| | | JSONArray ztData = noticeHandle.getZtData("?is_show=1", ZtApiUrlConstant.over_des_rz_warn_api); |
| | | // 获取告警规则详情,判断告警类型(短信,电话,站内信) |
| | | if (null != alarmRule) { |
| | | // 查询告警详情信息 |
| | |
| | | // 查询当前策略对应的告警规则信息 |
| | | AlarmRule alarmRule = alarmRuleService.getOne(new QueryWrapper<AlarmRule>().eq("rule_name", arg1)); |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.res_over_chec_api); |
| | | JSONArray ztData = noticeHandle.getZtData("?is_show=1", ZtApiUrlConstant.res_over_chec_api); |
| | | // 获取告警规则详情,判断告警类型(短信,电话,站内信) |
| | | if (null != alarmRule) { |
| | | // 查询告警详情信息 |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "海康设备-海康摄像头云台的控制", notes = "海康设备-海康摄像头云台的控制") |
| | | @GetMapping(value = "/handleCameraPosition") |
| | | @GetMapping(value = "/handleCameraPosition2") |
| | | public R handleCameraPosition(HkVO hk) { |
| | | // 获取海康播放url |
| | | String result = controlling(null==hk.getType()?1:hk.getType(),HkConstant.controllingURLs, |
| | |
| | | @ApiModelProperty("今日降雨(毫米)") |
| | | private String curDrp; |
| | | |
| | | private String daysw;//当日水位 |
| | | |
| | | private String daykr;//当日库容 |
| | | |
| | | private String rkll;//入库流量 |
| | | |
| | | private String ckllgg;//出库流量-灌溉 |
| | | private String ckllfd;//出库流量-发电 |
| | | private String ckllxth;//出库流量-泄调洪 |
| | | private String ckllqt;//出库流量-其它 |
| | | |
| | | /** |
| | | * 老站监测水位(米) |
| | | */ |
| | |
| | | <result property="images" column="images" typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> |
| | | <result property="videos" column="videos" typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> |
| | | <result property="curDrp" column="cur_drp"/> |
| | | <result property="daysw" column="daysw"/> |
| | | <result property="daykr" column="daykr"/> |
| | | <result property="rkll" column="rkll"/> |
| | | <result property="ckllgg" column="ckllgg"/> |
| | | <result property="ckllfd" column="ckllfd"/> |
| | | <result property="ckllxth" column="ckllxth"/> |
| | | <result property="ckllqt" column="ckllqt"/> |
| | | <result property="gateStatus" column="gate_status"/> |
| | | <result property="isOver" column="is_over"/> |
| | | <result property="lkOverZ" column="lk_over_z"/> |
| | |
| | | <select id="queryStepList" resultType="cn.gistack.sm.sg.DO.SgGxStepDO"> |
| | | select step.* from YWXT.SG_GX_STEP step inner join YWXT.SG_GX sg on sg.id=step.gx_info_id |
| | | left join YWXT.SG_DEVICE sd on sd.device_type=sg.gx_type |
| | | where sd.id= #{deviceId} |
| | | where sd.id= #{deviceId} order by id asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package cn.gistack.sm.sjztmd.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("\"st_res_rainfall\"") |
| | |
| | | * id |
| | | */ |
| | | @ApiModelProperty(value = "id") |
| | | @TableField("\"id\"") |
| | | @TableId(value = "\"id\"",type = IdType.NONE) |
| | | private String id; |
| | | |
| | | |
| | | /** |
| | | * 水库编码 |
| | |
| | | */ |
| | | @ApiModelProperty(value = "入库时间") |
| | | @TableField("\"create_time\"") |
| | | private Long createTime; |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 预报的时段 |
| | |
| | | } |
| | | |
| | | @Override |
| | | @GetMapping(ISjztMdClient.GET_RESERVOIR_RAINFALL_FORECAST) |
| | | public void getReservoirRainfallForecast(List<String> dayIndexList) { |
| | | sjztmdService.getReservoirRainfallForecast(dayIndexList); |
| | | } |
| | |
| | | left join YWXT.blade_dept bd on locate(bd.id,bu.dept_id)>0 and bd.is_deleted = 0 |
| | | left join YWXT.blade_role br on locate(br.id,bu.role_id)>0 and br.is_deleted = 0 |
| | | where bu.is_deleted = 0 |
| | | and br.role_alias = #{roleAlias} |
| | | <if test="roleAlias != null and roleAlias == 'qxglywuser'"> |
| | | and (br.role_alias = #{roleAlias} or br.role_alias = 'qxswjgly') |
| | | </if> |
| | | <if test="roleAlias != null and roleAlias == 'sdglywuser'"> |
| | | and (br.role_alias = #{roleAlias} or br.role_alias = 'dsswjgly') |
| | | </if> |
| | | and bd.ad_code = #{adCode} |
| | | limit 3 |
| | | and bu.TYPE is null order by role_name desc,name asc |
| | | limit 1 |
| | | </select> |
| | | <select id="getPatrolResponsiblePersonByResCdList" |
| | | resultType="cn.gistack.sm.sjztmd.entity.PatrolResponsiblePerson"> |
| | |
| | | List<AttResWithRainfall> attResWithRainfallList = new ArrayList<>(); |
| | | |
| | | for (AttResBase attResBase : attResBases) { |
| | | if (null == attResBase.getCenterLat() || attResBase.getCenterLong() == null) { |
| | | log.warn("过滤掉经度或者纬度为空的水库,水库名称:{}", attResBase.getName()); |
| | | continue; |
| | | } |
| | | // 横向索引(lonIndex):(站点的经度 - 网格最小经度) / 每个网格单元的经度跨度 |
| | | int lonIndex = (int) ((Double.parseDouble(attResBase.getCenterLong()) - lonMin) / lonSpan); |
| | | // 纵向索引(latIndex):(站点的纬度 - 网格最小纬度) / 每个网格单元的纬度跨度 |
| | |
| | | attResWithRainfall.setFileName(fileName); |
| | | attResWithRainfallList.add(attResWithRainfall); |
| | | } else { |
| | | log.warn("AttRes {} is out of the grid range. centerLong: {}, centerLat: {}", attResBase.getName(), |
| | | log.warn("水库 {} 超出栅格范围. 中心点经度: {}, 中心点纬度: {}", attResBase.getName(), |
| | | attResBase.getCenterLong(), attResBase.getCenterLat()); |
| | | } |
| | | } |
| | |
| | | // 查询当前水库对应的市级编号和县区编号 |
| | | AttResBaseVO attResBaseVO = attResBaseService.getCityCountyCodeByResGuid(res_cd); |
| | | if (null!= attResBaseVO) { |
| | | // 通过编号查询对应的人员 |
| | | List<PersonVO> cityPerson = baseMapper.getCityCountyPersonListByResGuid(attResBaseVO.getCityCode(), "sdglywuser", "市州水库管理业务人员"); |
| | | // 通过编号查询对应的人员 先区县后市州 |
| | | List<PersonVO> countyPerson = baseMapper.getCityCountyPersonListByResGuid(attResBaseVO.getCountyCode(), "qxglywuser", "区县水库管理业务人员"); |
| | | List<PersonVO> cityPerson = baseMapper.getCityCountyPersonListByResGuid(attResBaseVO.getCityCode(), "sdglywuser", "市州水库管理业务人员"); |
| | | |
| | | // 和 |
| | | personVOList.addAll(cityPerson); |
| | | personVOList.addAll(countyPerson); |
| | |
| | | stResRainfall.setDrp(attResWithRainfall.getRainfall()); |
| | | stResRainfall.setFileName(attResWithRainfall.getFileName()); |
| | | stResRainfall.setDayIndex(dayIndex); |
| | | stResRainfall.setCreateTime(System.currentTimeMillis()); |
| | | stResRainfall.setCreateTime(new Date()); |
| | | stResRainfalls.add(stResRainfall); |
| | | } |
| | | } |
| | |
| | | double whtjCount = whtjList.size() > 0 ? whtjList.size() : 1; |
| | | double jtl = Double.valueOf(jtCount) / whtjCount * 100; |
| | | String str = StringUtil.format("过去24小时内,发送水库短信预警{}条,抽查{}等水库防汛责任人{}人次,应答率{},责任人履职情况总体较好。", |
| | | dxyjCount, cityNames, whtjList.size(), String.format("%.2f", jtl) + "%"); |
| | | dxyjCount, cityNames.replace("恩施土家族苗族自治州","恩施州"), whtjList.size(), String.format("%.2f", jtl) + "%"); |
| | | this.smsResultInfo = str; |
| | | } |
| | | |