Merge remote-tracking branch 'origin/jtdev' into jtdev
| | |
| | | } |
| | | |
| | | //拼接用户所属行政区划、责任人需要返回水库ids |
| | | userInfo.getDetail().set("resIds",""); |
| | | if (StringUtil.isNotBlank(user.getPhone())) { |
| | | R<AttResManagePerson> attRes = attResManagePersonClient.queryListByPhone(user.getPhone()); |
| | | userInfo.getDetail().set("resIds",attRes.getData()); |
| | | } |
| | | // userInfo.getDetail().set("resIds",""); |
| | | // if (StringUtil.isNotBlank(user.getPhone())) { |
| | | // R<AttResManagePerson> attRes = attResManagePersonClient.queryListByPhone(user.getPhone()); |
| | | // userInfo.getDetail().set("resIds",attRes.getData()); |
| | | // } |
| | | |
| | | //返回手机号 |
| | | userInfo.getDetail().set("phone",Base64Utils.getBase64Encode(user.getPhone())); |
| | |
| | | |
| | | User loginUserInfo = userInfo.getUser(); |
| | | |
| | | // 获取解密后的Base64字符串 |
| | | //获取解密后的Base64字符串 |
| | | R<ResultDTO> encryptRes = pwdClient.getDecrypt(loginUserInfo.getSm4iv(), loginUserInfo.getKeyindexs(),loginUserInfo.getEncdata()); |
| | | |
| | | if (encryptRes.getCode() != 200){ |
| | |
| | | /** |
| | | * 渗压 |
| | | */ |
| | | SY("1","seepage","/services/1234567890ABCDEFGHIJKLMN/realtime/op/sy/api"), |
| | | SY("1","seepage","/services/1234567890ABCDEFGHIJKLMN/sy/realtime/v2/api"), |
| | | |
| | | /** |
| | | * 渗流 |
| | | */ |
| | | SL("2","lsy" ,"/services/1234567890ABCDEFGHIJKLMN/realtime/op/sl/api"), |
| | | SL("2","lsy" ,"/services/1234567890ABCDEFGHIJKLMN/sl/realtime/v2/api"), |
| | | |
| | | /** |
| | | * x 位移 |
| | | * 位移_x 上下游 |
| | | */ |
| | | X("3","deform_x","/services/1234567890ABCDEFGHIJKLMN/"), |
| | | X("3","deform_x","/services/1234567890ABCDEFGHIJKLMN/wy/realtime/v2/api"), |
| | | |
| | | /** |
| | | * y 位移 |
| | | * 位移_y 左右岸 |
| | | */ |
| | | Y("4","deform_y","/services/1234567890ABCDEFGHIJKLMN/"), |
| | | Y("4","deform_y","/services/1234567890ABCDEFGHIJKLMN/wy/realtime/v2/api"), |
| | | |
| | | /** |
| | | * z 位移 |
| | | * 位移_z 垂直 |
| | | */ |
| | | Z("5","deform_z","/services/1234567890ABCDEFGHIJKLMN/"), |
| | | Z("5","deform_z","/services/1234567890ABCDEFGHIJKLMN/wy/realtime/v2/api"), |
| | | ; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<SgGxDO> sgGxDOS; |
| | | |
| | | /** |
| | | *是否重新提交 0是 ,1否 |
| | | */ |
| | | private Integer resubmit; |
| | | } |
| | |
| | | private String expTime; |
| | | |
| | | /** |
| | | * 总承包 |
| | | * 省厅建办 |
| | | */ |
| | | private String generalContract; |
| | | |
| | | /** |
| | | * 总承包责任人 |
| | | * 省厅建办责任人 |
| | | */ |
| | | private String generalPerson; |
| | | |
| | |
| | | private String controlPerson; |
| | | |
| | | /** |
| | | * 施工单位 |
| | | * 土建施工单位 |
| | | */ |
| | | private String constructionUnit; |
| | | |
| | | /** |
| | | * 施工单位责任人 |
| | | * 土建施工单位责任人 |
| | | */ |
| | | private String constructionPerson; |
| | | |
| | | /** |
| | | * 施工自检单位 |
| | | * 设备施工单位 |
| | | */ |
| | | private String selfUnit; |
| | | |
| | | /** |
| | | * 施工自检单位责任人 |
| | | * 设备施工单位责任人 |
| | | */ |
| | | private String selfPerson; |
| | | |
| | | /** |
| | | * 竣工验收检测单位 |
| | | * 检测单位 |
| | | */ |
| | | private String acceptanceUnit; |
| | | |
| | | /** |
| | | * 竣工验收检测单位责任人 |
| | | * 检测单位责任人 |
| | | */ |
| | | private String acceptancePerson; |
| | | |
| | |
| | | private String engScal; //工程规模 |
| | | @TableField(exist = false) |
| | | private String basGuid; //片区 |
| | | |
| | | /** |
| | | * 标段 |
| | | */ |
| | | private String lot; |
| | | |
| | | } |
| | |
| | | /** |
| | | * 基础url |
| | | */ |
| | | public static final String BASE_URL = "http://42.194.236.87:9607"; |
| | | public static final String BASE_URL = "http://101.34.90.224:9607"; |
| | | |
| | | /** |
| | | * 水库信息注册接口 |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.*; |
| | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * 南科院水库预警算法api调用服务接口 |
| | |
| | | // 获取当前时间 |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | // 减去一个小时 |
| | | LocalDateTime oneHourAgo = now.minusHours(1); |
| | | LocalDateTime oneHourAgo = now.minusHours(8); |
| | | // 格式化时间 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); |
| | | String oneHour = oneHourAgo.format(formatter) + ":00"; |
| | | String nowHour = now.format(formatter) + ":00"; |
| | | // 调用中台接口获取实时测点数据 |
| | | JSONArray ztData = getZtData("", |
| | | ZtConfigConstant.url_prefix + DamEnum.ofType(type).getApiUrl() + "?tm_list=" + "'" + oneHour + "'," + "'" + nowHour + "'"); |
| | | ZtConfigConstant.url_prefix + DamEnum.ofType(type).getApiUrl() + "?start_tm=" + oneHour + "&end_tm=" + nowHour + ""); |
| | | // 解析数据 |
| | | for (int i = 0; i < ztData.size(); i++) { |
| | | JSONObject jsonObject = ztData.getJSONObject(i); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("batchId",UUID.randomUUID()); |
| | | map.put("serialNo",getSerialNo()); |
| | | // 水库信息设置 |
| | | waterInfoSet(jsonObject, map); |
| | | // 测点信息设置 |
| | | pointValueInfoSet(jsonObject,map, DamEnum.ofType(type).getName()); |
| | | // 发送请求 |
| | | // String response = sendPostJsonRequest(OpenApiConstant.POINT_VALUE_INLET_URL, map); |
| | | // JSONObject parseObject = JSON.parseObject(response); |
| | | // Integer status = parseObject.getInteger("status"); |
| | | // flag = status==200?true:false; |
| | | log.info("测点输入结果:" + flag); |
| | | flag = waterInfoSet(jsonObject, map,flag); |
| | | if (flag) { |
| | | // 测点信息设置 |
| | | flag = pointValueInfoSet(jsonObject, map, type,flag); |
| | | } |
| | | if (flag) { |
| | | map.put("batchId",UUID.randomUUID()); |
| | | map.put("serialNo",getSerialNo()); |
| | | // 发送请求 |
| | | String response = sendPostJsonRequest(OpenApiConstant.POINT_VALUE_INLET_URL, map); |
| | | JSONObject parseObject = JSON.parseObject(response); |
| | | Integer status = parseObject.getInteger("status"); |
| | | flag = status==200?true:false; |
| | | log.info("测点输入结果:" + flag); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | * @param jsonObject |
| | | * @param map |
| | | */ |
| | | private void waterInfoSet(JSONObject jsonObject, Map<String, Object> map) { |
| | | List<Map<String,Object>> waterLevelInfoList = new ArrayList<>(); |
| | | Map<String, Object> waterLevelInfoMap = new HashMap<>(); |
| | | waterLevelInfoMap.put("damCode",jsonObject.getString("res_cd")); |
| | | waterLevelInfoMap.put("waterLevel",jsonObject.getString("res_cd")); |
| | | waterLevelInfoMap.put("waterLevelTime",jsonObject.getString("res_cd")); |
| | | waterLevelInfoMap.put("rainCondition",jsonObject.getString("res_cd")); |
| | | waterLevelInfoMap.put("rainConditionTime",jsonObject.getString("res_cd")); |
| | | waterLevelInfoList.add(waterLevelInfoMap); |
| | | map.put("waterLevelInfo",waterLevelInfoList); |
| | | private boolean waterInfoSet(JSONObject jsonObject, Map<String, Object> map,boolean flag) { |
| | | String rz = jsonObject.getString("rz"); |
| | | flag = false; |
| | | if (!Strings.isBlank(rz)) { |
| | | flag = true; |
| | | String res_cd = replaceSpecialStr(jsonObject.getString("res_cd")); |
| | | List<Map<String, Object>> waterLevelInfoList = new ArrayList<>(); |
| | | Map<String, Object> waterLevelInfoMap = new HashMap<>(); |
| | | waterLevelInfoMap.put("damCode", res_cd); |
| | | waterLevelInfoMap.put("waterLevel", jsonObject.getString("rz")); |
| | | waterLevelInfoMap.put("waterLevelTime", jsonObject.getString("rz_tm")); |
| | | waterLevelInfoMap.put("rainCondition", jsonObject.getString("drp")); |
| | | waterLevelInfoMap.put("rainConditionTime", jsonObject.getString("drp_tm")); |
| | | waterLevelInfoList.add(waterLevelInfoMap); |
| | | map.put("waterLevelInfo", waterLevelInfoList); |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | /** |
| | | * 测点信息设置 |
| | | * @param map |
| | | */ |
| | | private void pointValueInfoSet(JSONObject jsonObject,Map<String, Object> map,String type) { |
| | | private boolean pointValueInfoSet(JSONObject jsonObject,Map<String, Object> map,String type,boolean flag) { |
| | | flag = false; |
| | | int num = 0; |
| | | List<Map<String,Object>> pointValueInfoList = new ArrayList<>(); |
| | | JSONArray childArray = jsonObject.getJSONArray("child"); |
| | | //遍历处理 |
| | | for (int i = 0; i < childArray.size(); i++) { |
| | | JSONObject childArrayJSONObject = childArray.getJSONObject(i); |
| | | String pointCodeTemp = jsonObject.getString("res_cd") + "_" |
| | | + childArrayJSONObject.getString("cd") |
| | | + "_" + type; |
| | | Map<String, Object> pointValueInfoMap = new HashMap<>(); |
| | | pointValueInfoMap.put("damCode",jsonObject.getString("res_cd")); |
| | | pointValueInfoMap.put("pointCode",pointCodeTemp); |
| | | pointValueInfoMap.put("type",type); |
| | | pointValueInfoMap.put("value",childArrayJSONObject.getString("sy_val")); |
| | | pointValueInfoMap.put("time",childArrayJSONObject.getString("tm")); |
| | | pointValueInfoList.add(pointValueInfoMap); |
| | | String sy_val = childArrayJSONObject.getString("sy_val"); |
| | | // type 为3 时为位移,位移返回数据格式不一致 |
| | | if (type.equals("3")){ |
| | | // 获取-位移_z 垂直 du是数值位移(垂直),de向东位移(上下游),dn向北位移(左右岸) |
| | | String du = childArrayJSONObject.getString("du"); |
| | | String de = childArrayJSONObject.getString("de"); |
| | | String dn = childArrayJSONObject.getString("dn"); |
| | | if (!Strings.isBlank(du)){ |
| | | num = setPointValue(jsonObject, DamEnum.ofType("5").getName(), num, pointValueInfoList, childArrayJSONObject, du); |
| | | } |
| | | if (!Strings.isBlank(dn)){ |
| | | num = setPointValue(jsonObject, DamEnum.ofType("4").getName(), num, pointValueInfoList, childArrayJSONObject, dn); |
| | | } |
| | | if (!Strings.isBlank(de)){ |
| | | num = setPointValue(jsonObject, DamEnum.ofType("3").getName(), num, pointValueInfoList, childArrayJSONObject, de); |
| | | } |
| | | }else { |
| | | // 有测点值才加入 |
| | | if (!Strings.isBlank(sy_val)) { |
| | | // 设置测点信息 |
| | | num = setPointValue(jsonObject, DamEnum.ofType(type).getName(), num, pointValueInfoList, childArrayJSONObject, sy_val); |
| | | } |
| | | } |
| | | } |
| | | map.put("pointValueInfo",pointValueInfoList); |
| | | // 只要有一个测点值设置 |
| | | if (num>0) { |
| | | flag = true; |
| | | map.put("pointValueInfo", pointValueInfoList); |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | /** |
| | | * 设置测点数据 |
| | | * @param jsonObject |
| | | * @param type |
| | | * @param num |
| | | * @param pointValueInfoList |
| | | * @param childArrayJSONObject |
| | | * @param sy_val |
| | | * @return |
| | | */ |
| | | private int setPointValue(JSONObject jsonObject, String type, int num, List<Map<String, Object>> pointValueInfoList, JSONObject childArrayJSONObject, String sy_val) { |
| | | num++; |
| | | String res_cd = replaceSpecialStr(jsonObject.getString("res_cd")); |
| | | // 测点编码:水库GUID+测点编码+类型 |
| | | String pointCodeTemp = res_cd + "_" |
| | | + childArrayJSONObject.getString("cd") |
| | | + "_" + type; |
| | | Map<String, Object> pointValueInfoMap = new HashMap<>(); |
| | | pointValueInfoMap.put("damCode", res_cd); |
| | | pointValueInfoMap.put("pointCode", pointCodeTemp); |
| | | pointValueInfoMap.put("type", type); |
| | | pointValueInfoMap.put("value", sy_val); |
| | | pointValueInfoMap.put("time", childArrayJSONObject.getString("tm")); |
| | | pointValueInfoList.add(pointValueInfoMap); |
| | | return num; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | /** |
| | | * 去除字符串中的空格、回车、换行符、制表符等 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static String replaceSpecialStr(String str) { |
| | | String repl = ""; |
| | | if (str!=null) { |
| | | Pattern p = Pattern.compile("\\s*|\t|\r|\n"); |
| | | Matcher m = p.matcher(str); |
| | | repl = m.replaceAll(""); |
| | | } |
| | | return repl; |
| | | } |
| | | } |
| | |
| | | List<SgStatistccVO> sgStatisProVOS = sgProjectInfoService.getsgStatisticscc(code); |
| | | return R.data(sgStatisProVOS); |
| | | } |
| | | |
| | | /** |
| | | * 新增项目 |
| | | */ |
| | | @PostMapping("add") |
| | | public R add(@RequestBody SgProjectInfoDO sgProjectInfoDO) { |
| | | sgProjectInfoService.save(sgProjectInfoDO); |
| | | return R.success("新增成功"); |
| | | } |
| | | |
| | | /** |
| | | * 新增项目 |
| | | */ |
| | | @PostMapping("update") |
| | | public R update(@RequestBody SgProjectInfoDO sgProjectInfoDO) { |
| | | sgProjectInfoService.updateById(sgProjectInfoDO); |
| | | return R.success("修改成功"); |
| | | } |
| | | } |
| | |
| | | and de.device_name like CONCAT(CONCAT('%', #{dto.deviceName}), '%') |
| | | </if> |
| | | <if test="dto.userId != null and dto.userId != ''"> |
| | | and userR.user_id = #{dto.userId} |
| | | and userR.user_id = #{dto.userId} and userR.approval_order != 0 |
| | | </if> |
| | | <if test="dto.approvalStatus != null and dto.approvalStatus != 3"> |
| | | <if test="dto.approvalStatus != null and dto.approvalStatus ==0"> |
| | | and userR.approval_status = 0 |
| | | and userR.approval_status = 0 and report.audit_person = #{dto.userId} and (report."STATUS" = 0 or report."STATUS" = 1) |
| | | </if> |
| | | <if test="dto.approvalStatus != null and dto.approvalStatus ==1"> |
| | | and userR.approval_status != 0 |
| | | and userR.approval_status = 1 |
| | | </if> |
| | | AND userR.approval_order != 0 |
| | | <if test="dto.approvalStatus != null and dto.approvalStatus ==2"> |
| | | AND userR.approval_order = 2 |
| | | </if> |
| | | <if test="dto.startTime != null and dto.startTime !='' "> |
| | | and report.report_time >= #{dto.startTime} |
| | |
| | | <if test="dto.endTime != null and dto.endTime !='' "> |
| | | and report.report_time <= #{dto.endTime} |
| | | </if> |
| | | <choose > |
| | | <!--<choose > |
| | | <when test="dto.approvalStatus != null and dto.approvalStatus == 0"> |
| | | and report.audit_person = #{dto.userId} and (report."STATUS" = 0 or report."STATUS" = 1) |
| | | </when> |
| | | <when test="dto.approvalStatus != null and dto.approvalStatus == 1"> |
| | | and report."STATUS" != 0 |
| | | and report."STATUS" != 1 |
| | | </when> |
| | | <when test="dto.approvalStatus != null and dto.approvalStatus == 3"> |
| | | and report.report_user = #{dto.userId} |
| | | </when> |
| | | </choose> |
| | | </choose>--> |
| | | </select> |
| | | <select id="countList" resultType="java.lang.Long"> |
| | | select count(1) from ywxt.SG_PROGRESS_REPORT report |
| | |
| | | |
| | | List<SgProjectInfoVO> queryStepByProject1(@Param("dto") ProjectSearchDTO searchDTO); |
| | | |
| | | SgProjectInfoVO selectVOById(@Param("proframId") Long proframId); |
| | | |
| | | //List<String> getProjectIds(String code,@Param("grad") String grad ); |
| | | } |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="dto.projectSort == null or dto.projectSort ==0"> |
| | | ORDER BY info.status desc |
| | | ORDER BY info.status desc ,info.project_progress desc |
| | | </if> |
| | | <if test="dto.projectSort ==1"> |
| | | ORDER BY info.project_progress desc |
| | | </if> |
| | | <if test="dto.projectSort != null and dto.projectSort ==2"> |
| | | ORDER BY info.sk_id asc |
| | |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="selectVOById" resultType="cn.gistack.sm.sg.VO.SgProjectInfoVO"> |
| | | select * from ywxt.sg_project_info pro where pro.id = #{proframId} |
| | | </select> |
| | | <!-- <select id="getProjectIds" resultType="java.lang.String">--> |
| | | |
| | | <!-- </select>--> |
| | |
| | | import cn.gistack.sm.sg.VO.SgStepReportVO; |
| | | import cn.gistack.sm.sg.mapper.*; |
| | | import cn.gistack.sm.sg.service.SgProgressReportService; |
| | | import cn.gistack.sm.sg.service.SgProjectInfoService; |
| | | import cn.hutool.http.useragent.UserAgentUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | |
| | | @Autowired |
| | | private SgProjectInfoMapper sgProjectInfoMapper; |
| | | |
| | | @Autowired |
| | | private SgProjectInfoServiceImpl sgProjectInfoService; |
| | | |
| | | ExecutorService cachedThreadPool = Executors.newCachedThreadPool(); |
| | | @Override |
| | |
| | | updateChainWrapper.set(SgProgressReportDO::getStatus,1).set(SgProgressReportDO::getAuditPerson,nextUser.getUserId()).update(); |
| | | }else { |
| | | updateChainWrapper.set(SgProgressReportDO::getStatus,2).set(SgProgressReportDO::getAuditPerson,null).update(); |
| | | Long proframId = sgProgressReportMapper.selectById(approvalDTO.getId()).getProframId(); |
| | | //工序审核完成后 进行项目和设备状态的判断 |
| | | cachedThreadPool.execute(new Runnable(){ |
| | | @Override |
| | | public void run(){ |
| | | setProgramAndDeviceStatus(sgProgressReportMapper.selectById(approvalDTO.getId()).getProframId()); |
| | | setProgramAndDeviceStatus(proframId); |
| | | |
| | | } |
| | | }); |
| | | cachedThreadPool.execute(new Runnable(){ |
| | | @Override |
| | | public void run(){ |
| | | Long proframId = sgProgressReportMapper.selectById(approvalDTO.getId()).getProframId(); |
| | | setProgramProgress(proframId); |
| | | } |
| | | }); |
| | | } |
| | | }else { |
| | | updateChainWrapper.set(SgProgressReportDO::getStatus,3); |
| | | updateChainWrapper.set(SgProgressReportDO::getResubmit,0); |
| | | userUpdate.set(SgReportUserDO::getApprovalStatus,2); |
| | | if (isReject==1){ |
| | | /*if (isReject==1){ |
| | | userUpdate.set(SgReportUserDO::getUserId,userId); |
| | | } |
| | | }*/ |
| | | userUpdate.update(); |
| | | for (SgReportUserDO reportUserDO : sgReportUserDOS) { |
| | | /*for (SgReportUserDO reportUserDO : sgReportUserDOS) { |
| | | if (reportUserDO.getApprovalOrder()<=sgReportUserDO.getApprovalOrder()&&reportUserDO.getApprovalOrder()!=0){ |
| | | //更新为历史数据 |
| | | new LambdaUpdateChainWrapper<>(sgReportUserMapper).eq(SgReportUserDO::getId,reportUserDO.getId()).set(SgReportUserDO::getIsHis,1).update(); |
| | |
| | | if (reportUserDO.getApprovalOrder()==1){ |
| | | updateChainWrapper.set(SgProgressReportDO::getAuditPerson,reportUserDO.getUserId()); |
| | | } |
| | | } |
| | | }*/ |
| | | updateChainWrapper.update(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 审批通过更新项目进度 |
| | | * @param proframId |
| | | */ |
| | | public void setProgramProgress(Long proframId) { |
| | | SgProjectInfoVO sgProjectInfoVO = sgProjectInfoMapper.selectVOById(proframId); |
| | | List<SgProjectInfoDO> progress = sgProjectInfoService.getProjectProgress(Collections.singletonList(sgProjectInfoVO)); |
| | | String projectProgress = progress.get(0).getProjectProgress(); |
| | | if (StringUtils.isNotBlank(projectProgress)){ |
| | | String s = projectProgress.substring(0, projectProgress.length() - 1); |
| | | new LambdaUpdateChainWrapper<>(sgProjectInfoMapper).set(SgProjectInfoDO::getProjectProgress,s).update() ; |
| | | } |
| | | } |
| | | private void setReportUser(Date date, SgReportUserDO reportUserDO) { |
| | | reportUserDO.setId(null); |
| | | reportUserDO.setApprovalStatus(0); |
| | |
| | | public Map<String, Long> countList(ProjectSearchDTO searchDTO) { |
| | | Long userId = AuthUtil.getUserId(); |
| | | searchDTO.setUserId(userId); |
| | | List<SgProgressReportVO> all = sgProgressReportMapper.queryList(searchDTO); |
| | | searchDTO.setApprovalStatus(0); |
| | | List<SgProgressReportVO> pending = sgProgressReportMapper.queryList(searchDTO); |
| | | searchDTO.setApprovalStatus(1); |
| | | List<SgProgressReportVO> over= sgProgressReportMapper.queryList(searchDTO); |
| | | searchDTO.setApprovalStatus(2); |
| | | List<SgProgressReportVO> reject= sgProgressReportMapper.queryList(searchDTO); |
| | | Map<String, Long> map = new HashMap<>(); |
| | | map.put("pending", Long.valueOf(pending.size())); |
| | | map.put("over",Long.valueOf(over.size())); |
| | | map.put("pending", (long) pending.size()); |
| | | map.put("over", (long) over.size()); |
| | | map.put("all", (long) all.size()); |
| | | map.put("reject", (long) reject.size()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public IPage<SgProjectInfoDO> queryPageList(IPage<SgProjectInfoDO> page, ProjectSearchDTO searchDTO) { |
| | | List<SgProjectInfoDO> sgProjectInfoDOS = baseMapper.queryPageList(page,searchDTO); |
| | | List<SgProjectInfoDO> projectProgress = getProjectProgress(sgProjectInfoMapper.queryStepByProject(searchDTO)); |
| | | /*List<SgProjectInfoDO> projectProgress = getProjectProgress(sgProjectInfoMapper.queryStepByProject(searchDTO)); |
| | | if (CollectionUtils.isNotEmpty(projectProgress)){ |
| | | Map<Long, String> progressMap = projectProgress.stream().filter(s->s.getProjectProgress()!=null).collect(Collectors.toMap(SgProjectInfoDO::getId, SgProjectInfoDO::getProjectProgress)); |
| | | sgProjectInfoDOS.forEach(s->{ |
| | | s.setProjectProgress(progressMap.get(s.getId())); |
| | | }); |
| | | } |
| | | }*/ |
| | | return page.setRecords(sgProjectInfoDOS); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @NotNull |
| | | private List<SgProjectInfoDO> getProjectProgress(List<SgProjectInfoVO> list) { |
| | | public List<SgProjectInfoDO> getProjectProgress(List<SgProjectInfoVO> list) { |
| | | //项目分组 |
| | | Map<Long, List<SgProjectInfoVO>> projectMap = list.stream().collect(Collectors.groupingBy(SgProjectInfoVO::getId)); |
| | | List<SgProjectInfoDO> result = new ArrayList<>(); |
| | |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | 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.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return R.data(attResManagePersonService.getCityCountyPersonListByResGuid(resCd)); |
| | | } |
| | | |
| | | @GetMapping("/getResGuidList") |
| | | public R queryListByPhone() { |
| | | AttResManagePerson attResManagePerson = new AttResManagePerson(); |
| | | attResManagePerson.setUserPhone(AuthUtil.getUserAccount()); |
| | | List<AttResManagePerson> list = attResManagePersonService.list(Condition.getQueryWrapper(attResManagePerson)); |
| | | List<String> reslist = new ArrayList<>(); |
| | | list.forEach(item->{ |
| | | reslist.add(item.getResGuid()); |
| | | }); |
| | | return R.data(StringUtil.join(reslist,",")); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | |
| | | PBZM("1","平板闸门"), |
| | | PBZM2("平板闸门","平板闸门"), |
| | | |
| | | HXZM("2","弧形闸门"), |
| | | HXZM2("弧形闸门","弧形闸门"), |
| | | QI_TA("9","其他"), |
| | | QI_TA2("其他","其他"), |
| | | |
| | | NULL_ABLE("",""); |
| | | |
| | |
| | | */ |
| | | |
| | | FIRST("1","一类坝"), |
| | | FIRST2("一类坝","一类坝"), |
| | | |
| | | SECOND("2","二类坝"), |
| | | SECOND2("二类坝","二类坝"), |
| | | |
| | | THIRD("3","三类坝"), |
| | | THIRD2("三类坝","三类坝"), |
| | | NULL_ABLE("",""); |
| | | |
| | | |
| | |
| | | |
| | | HX("4","虹吸式溢洪道"), |
| | | |
| | | YLB("5","溢流坝段坝顶溢流"), |
| | | YLB("5","表孔溢流"), |
| | | |
| | | |
| | | QI_TA("9","其他"), |
| | |
| | | import cn.gistack.sm.sjztmd.word.vo.*; |
| | | import cn.gistack.sm.sjztods.constant.ZtApiUrlConstant; |
| | | import cn.gistack.sm.sjztods.constant.ZtConfigConstant; |
| | | import com.alibaba.excel.util.StringUtils; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | |
| | | tableMap.put("totalCap", tbAttResStagChar==null || tbAttResStagChar.getTotalCap()==null?"":WordUtil.removeTrailingZero(tbAttResStagChar.getTotalCap().toString())); |
| | | tableMap.put("desFlStag", tbAttResStagChar==null || tbAttResStagChar.getDesFlStag()==null?"":tbAttResStagChar.getDesFlStag()); |
| | | tableMap.put("flprCap", tbAttResStagChar==null || tbAttResStagChar.getFlprCap()==null?"":WordUtil.removeTrailingZero(tbAttResStagChar.getFlprCap().toString())); |
| | | tableMap.put("flConTopStag", tbAttResStagChar==null || tbAttResStagChar.getFlConTopStag()==null?"":tbAttResStagChar.getFlConTopStag()); |
| | | tableMap.put("flConTopStag", tbAttResStagChar==null || tbAttResStagChar.getFlConTopStag()==null?"":String.format("%.2f",tbAttResStagChar.getFlConTopStag())); |
| | | tableMap.put("flSortCap", tbAttResStagChar==null || tbAttResStagChar.getFlStorCap()==null?"":tbAttResStagChar.getFlStorCap()); |
| | | tableMap.put("corNormStag", tbAttResStagChar==null || tbAttResStagChar.getCorNormStag()==null?"":String.format("%.2f",tbAttResStagChar.getCorNormStag())); |
| | | tableMap.put("adjustStorCap", tbAttResStagChar==null || tbAttResStagChar.getAdjustStorCap()==null?"":WordUtil.removeTrailingZero(tbAttResStagChar.getAdjustStorCap().toString())); |
| | |
| | | String afe = tbAttResStagChar==null?"":tbAttResStagChar.getAfterFloodEnd() != null ? new SimpleDateFormat("M月dd日").format(tbAttResStagChar.getAfterFloodEnd()) : ""; |
| | | tableMap.put("beforeFloodStart", bfs); |
| | | tableMap.put("beforeFloodEnd", bfe); |
| | | if (!StringUtils.isEmpty(bfs) && !StringUtils.isEmpty(bfe)) { |
| | | tableMap.put("beforeFloodDataInfo", bfs + "-" + bfe); |
| | | } |
| | | tableMap.put("midFloodStart", mfs); |
| | | tableMap.put("midFloodEnd", mfe); |
| | | if (!StringUtils.isEmpty(mfs) && !StringUtils.isEmpty(mfe)) { |
| | | tableMap.put("midFloodDataInfo", mfs + "-" + mfe); |
| | | } |
| | | tableMap.put("afterFloodStart", afs); |
| | | tableMap.put("afterFloodEnd", afe); |
| | | tableMap.put("desFloodFlowMax", tbAttResStagChar==null || tbAttResStagChar.getDesFloodFlowMax()==null?"":tbAttResStagChar.getDesFloodFlowMax()); |
| | | tableMap.put("checFloodFlowMax", tbAttResStagChar==null || tbAttResStagChar.getChecFloodFlowMax()==null?"":tbAttResStagChar.getChecFloodFlowMax()); |
| | | if (!StringUtils.isEmpty(afs) && !StringUtils.isEmpty(afe)) { |
| | | tableMap.put("afterFloodDataInfo", afs + "-" + afe); |
| | | } |
| | | tableMap.put("desFloodFlowMax", tbAttResStagChar==null || tbAttResStagChar.getDesFloodFlowMax()==null?"":WordUtil.removeTrailingZero(tbAttResStagChar.getDesFloodFlowMax().toString())); |
| | | tableMap.put("checFloodFlowMax", tbAttResStagChar==null || tbAttResStagChar.getChecFloodFlowMax()==null?"":WordUtil.removeTrailingZero(tbAttResStagChar.getChecFloodFlowMax().toString()));; |
| | | |
| | | String mainDamType = ""; |
| | | String mainDamMainFoundation = ""; |
| | |
| | | tableMap.put("mainUpDamProtectType", mainUpDamProtectType); |
| | | tableMap.put("mainDownDamProtectType", mainDownDamProtectType); |
| | | tableMap.put("damMainBodyType", damMainBodyType); |
| | | tableMap.put("damMainBodyTopElevation", damMainBodyTopElevation); |
| | | tableMap.put("damMainBodyTopElevation", StringUtil.isNotBlank(damMainBodyTopElevation)?String.format("%.2f",Double.parseDouble(damMainBodyTopElevation)):""); |
| | | tableMap.put("damMainDrainType", damMainDrainType); |
| | | tableMap.put("mainDamBodyType", mainDamBodyType); |
| | | int subDamNumNew = tbAttResWaterBlockList.size() - 1; |
| | |
| | | if (tbAttResRsbNorspiList != null && tbAttResRsbNorspiList.size() > 0 && tbAttResRsbNorspiList.get(0).getNum() != null && tbAttResRsbNorspiList.get(0).getNum() > 0) { |
| | | TbAttResRsbNorspi tbAttResRsbNorspi = tbAttResRsbNorspiList.get(0); |
| | | |
| | | norSpillwayType = SpillwayTypeEnum.find(tbAttResRsbNorspi.getSpillwayType()).getLabel(); |
| | | if (tbAttResRsbNorspi.getSpillwayType().indexOf("9") > -1) { |
| | | String [] spillwayTypeStrs = tbAttResRsbNorspi.getSpillwayType().split(","); |
| | | if (spillwayTypeStrs.length > 1) { |
| | | norSpillwayType = spillwayTypeStrs[1]; |
| | | } else { |
| | | norSpillwayType = SpillwayTypeEnum.find(tbAttResRsbNorspi.getSpillwayType()).getLabel(); |
| | | } |
| | | |
| | | } else { |
| | | norSpillwayType = SpillwayTypeEnum.find(tbAttResRsbNorspi.getSpillwayType()).getLabel(); |
| | | } |
| | | |
| | | isLocDamBody = tbAttResRsbNorspi.getIsLocDamBody(); |
| | | norWeirTopElevation = isNullObject(tbAttResRsbNorspi.getWeirTopElevation()); |
| | | norWeirTopWidth = isNullObject(tbAttResRsbNorspi.getWeirTopWidth()); |
| | | |
| | | if (tbAttResRsbNorspi.getIsGate() == "否") { |
| | | if (null != tbAttResRsbNorspi.getIsGate() && tbAttResRsbNorspi.getIsGate().equals("否")) { |
| | | norWorkingGateType = "无闸控制"; |
| | | } else if (tbAttResRsbNorspi.getIsGate() == "是") { |
| | | } else if (null != tbAttResRsbNorspi.getIsGate() && tbAttResRsbNorspi.getIsGate().equals("是")) { |
| | | // 平板闸门,3X3 |
| | | String typeName = RsbWorkingGateEnum.find(tbAttResRsbNorspi.getWorkingGateType().toString()).getLabel(); |
| | | String norwgtStr = ""; |
| | |
| | | } |
| | | if (null != tbAttResRsbNorspi.getGateWide()) { |
| | | if (StringUtil.isNotBlank(typeName)) { |
| | | norwgtStr += "," + tbAttResRsbNorspi.getGateWide() + "×" + tbAttResRsbNorspi.getGateLength(); |
| | | norwgtStr += "," + tbAttResRsbNorspi.getGateNum() + "-" + tbAttResRsbNorspi.getGateWide() + "×" + tbAttResRsbNorspi.getGateLength(); |
| | | } else { |
| | | norwgtStr += tbAttResRsbNorspi.getGateWide() + "×" + tbAttResRsbNorspi.getGateLength(); |
| | | norwgtStr += tbAttResRsbNorspi.getGateNum() + "-" + tbAttResRsbNorspi.getGateWide() + "×" + tbAttResRsbNorspi.getGateLength(); |
| | | } |
| | | } |
| | | // norWorkingGateType = StringUtil.format("{},{}X{}", typeName, tbAttResRsbNorspi.getGateWide(), tbAttResRsbNorspi.getGateLength()); |
| | |
| | | if (StringUtil.isNotBlank(tbAttResRsbNorspi.getOcPower())) { |
| | | list.add(tbAttResRsbNorspi.getOcPower()); |
| | | } |
| | | norOc = String.join(",", list); |
| | | norOc = String.join(",", list); |
| | | } |
| | | |
| | | tableMap.put("norSpillwayType", norSpillwayType); |
| | | tableMap.put("isLocDamBody", isLocDamBody); |
| | | tableMap.put("norWeirTopElevation", norWeirTopElevation); |
| | | tableMap.put("norWeirTopElevation", StringUtils.isEmpty(norWeirTopElevation)?norWeirTopElevation:String.format("%.2f", Double.parseDouble(norWeirTopElevation))); |
| | | tableMap.put("norWeirTopWidth", norWeirTopWidth); |
| | | tableMap.put("norWorkingGateType", norWorkingGateType); |
| | | tableMap.put("norCheckingFloodDischarge", norCheckingFloodDischarge); |
| | |
| | | String rsbWorkingGateType = ""; |
| | | String rsbOc = ""; |
| | | |
| | | if (tbAttResRsbSpillwayList != null && tbAttResRsbSpillwayList.size() > 0 && tbAttResRsbSpillwayList.get(0).getNum() > 0) { |
| | | if (tbAttResRsbSpillwayList != null && tbAttResRsbSpillwayList.size() > 0) { |
| | | TbAttResRsbSpillway tbAttResRsbSpillway = tbAttResRsbSpillwayList.get(0); |
| | | |
| | | //类型为其他,有补充说明 |
| | |
| | | coveLength = isNullObject(tbAttResRsbSpillway.getCoveLength()); |
| | | rsbThresholdElevation = isNullObject(tbAttResRsbSpillway.getThresholdElevation()); |
| | | rsbExportElevation = isNullObject(tbAttResRsbSpillway.getExportElevation()); |
| | | rsbSection = StringUtil.format("{}×{}", tbAttResRsbSpillway.getSectionWide(), tbAttResRsbSpillway.getSectionLength()); |
| | | ; |
| | | if (null != tbAttResRsbSpillway.getSectionWide() && null != tbAttResRsbSpillway.getSectionLength()) |
| | | rsbSection = StringUtil.format("{}×{}", tbAttResRsbSpillway.getSectionWide(), tbAttResRsbSpillway.getSectionLength()); |
| | | |
| | | checkFlDisCharge = isNullObject(tbAttResRsbSpillway.getCheckFlDisCharge()); |
| | | |
| | | |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(convertType(tbAttResRsbSpillway.getOcType(), "OcTypeEnum")); |
| | | list.add(tbAttResRsbSpillway.getOcPower()); |
| | | rsbOc = String.join(",", list); |
| | | if (StringUtil.isNotBlank(convertType(tbAttResRsbSpillway.getOcType(), "OcTypeEnum")) && |
| | | StringUtil.isNotBlank(tbAttResRsbSpillway.getOcPower())) { |
| | | rsbOc = String.join(",", list); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | tableMap.put("rsbSpillwayType", rsbSpillwayType); |
| | | tableMap.put("coveLength", coveLength); |
| | | tableMap.put("rsbThresholdElevation", rsbThresholdElevation); |
| | | tableMap.put("rsbThresholdElevation", StringUtils.isEmpty(rsbThresholdElevation)?rsbThresholdElevation:String.format("%.2f",Double.parseDouble(rsbThresholdElevation))); |
| | | tableMap.put("rsbExportElevation", rsbExportElevation); |
| | | tableMap.put("rsbSection", rsbSection); |
| | | tableMap.put("checkFlDisCharge", checkFlDisCharge); |
| | |
| | | else |
| | | deliverSection = StringUtil.format("φ{}", tbAttResWaterDelivery.getSectionWide()); |
| | | designFlow = isNullObject(tbAttResWaterDelivery.getDesignFlow()); |
| | | workingGateType = tbAttResWaterDelivery.getWorkingGateType(); |
| | | workingGateType = convertType(tbAttResWaterDelivery.getWorkingGateType(), "RsbWorkingGateEnum"); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(tbAttResWaterDelivery.getOcType()); |
| | | list.add(tbAttResWaterDelivery.getOcPower()); |
| | | deliverOc = String.join(",", list); |
| | | list.add(convertType(tbAttResWaterDelivery.getOcType(), "SpillwayHoleType")); |
| | | list.add(convertType(tbAttResWaterDelivery.getOcPower(), "SpillwayHoleType")); |
| | | deliverOc = String.join(",", list); |
| | | |
| | | if (i == 0) { |
| | | tableMap.put("输水建筑物名称1", StringUtil.isBlank(tbAttResWaterDelivery.getName())?"输水建筑物":tbAttResWaterDelivery.getName()); |
| | | tableMap.put("aqueductType1", aqueductType); |
| | | tableMap.put("aqueductLength1", aqueductLength); |
| | | tableMap.put("thresholdElevation1", thresholdElevation); |
| | | tableMap.put("thresholdElevation1", StringUtils.isEmpty(thresholdElevation)?thresholdElevation:String.format("%.2f",Double.parseDouble(thresholdElevation))); |
| | | tableMap.put("exportElevation1", exportElevation); |
| | | tableMap.put("deliverSection1", deliverSection); |
| | | tableMap.put("designFlow1", designFlow); |
| | |
| | | tableMap.put("输水建筑物名称2", StringUtil.isBlank(tbAttResWaterDelivery.getName())?"输水建筑物":tbAttResWaterDelivery.getName()); |
| | | tableMap.put("aqueductType2", aqueductType); |
| | | tableMap.put("aqueductLength2", aqueductLength); |
| | | tableMap.put("thresholdElevation2", thresholdElevation); |
| | | tableMap.put("thresholdElevation2", StringUtils.isEmpty(thresholdElevation)?thresholdElevation:String.format("%.2f",Double.parseDouble(thresholdElevation))); |
| | | tableMap.put("exportElevation2", exportElevation); |
| | | tableMap.put("deliverSection2", deliverSection); |
| | | tableMap.put("designFlow2", designFlow); |
| | |
| | | tableMap.put("输水建筑物名称3", StringUtil.isBlank(tbAttResWaterDelivery.getName())?"输水建筑物":tbAttResWaterDelivery.getName()); |
| | | tableMap.put("aqueductType3", aqueductType); |
| | | tableMap.put("aqueductLength3", aqueductLength); |
| | | tableMap.put("thresholdElevation3", thresholdElevation); |
| | | tableMap.put("thresholdElevation3", StringUtils.isEmpty(thresholdElevation)?thresholdElevation:String.format("%.2f",Double.parseDouble(thresholdElevation))); |
| | | tableMap.put("exportElevation3", exportElevation); |
| | | tableMap.put("deliverSection3", deliverSection); |
| | | tableMap.put("designFlow3", designFlow); |
| | | tableMap.put("workingGateType3", workingGateType); |
| | | tableMap.put("deliverOc", deliverOc); |
| | | tableMap.put("deliverOc3", deliverOc); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | //水电站 |
| | | String plantLayoutType = ""; |
| | | double installedCapacity = 0d; |
| | | String installedCapacity = ""; |
| | | String yearAvgHour = ""; |
| | | //当电站列表不为空 且 电站列表数量大于0 且num大于0 -- 2024-07-18修改,展示多个 |
| | | // if (tbAttResPowerStationList != null && tbAttResPowerStationList.size() > 0 && tbAttResPowerStationList.get(0).getNum()!=null && tbAttResPowerStationList.get(0).getNum() > 0) { |
| | |
| | | plantLayoutType = plantLayoutType + "、" + PlantLayoutTypeEnum.find(tbAttResPowerStation.getPlantLayoutType()).getLabel(); |
| | | } |
| | | |
| | | installedCapacity = installedCapacity + tbAttResPowerStation.getInstalledCapacity(); |
| | | if (StringUtil.isBlank(installedCapacity)) { |
| | | installedCapacity = WordUtil.removeTrailingZero(isNullObject(tbAttResPowerStation.getInstalledCapacity())); |
| | | } else { |
| | | installedCapacity = installedCapacity + "+" + WordUtil.removeTrailingZero(isNullObject(tbAttResPowerStation.getInstalledCapacity())); |
| | | } |
| | | |
| | | if (StringUtil.isBlank(yearAvgHour)) { |
| | | yearAvgHour = WordUtil.removeTrailingZero(isNullObject(tbAttResPowerStation.getYearAvgHour())); |
| | |
| | | } |
| | | |
| | | tableMap.put("plantLayoutType", plantLayoutType); |
| | | tableMap.put("installedCapacity", WordUtil.removeTrailingZero(installedCapacity + "")); |
| | | tableMap.put("yearAvgHour", yearAvgHour); |
| | | tableMap.put("installedCapacity", !installedCapacity.equals("0")?installedCapacity:""); |
| | | tableMap.put("yearAvgHour", !yearAvgHour.equals("0")?yearAvgHour:""); |
| | | |
| | | //水库效益 |
| | | List<String> protectList = new ArrayList<>(); |
| | |
| | | tableMap.put("protect", String.join("、", protectList)); |
| | | } |
| | | double person = 0; |
| | | if (tbAttResEngBene !=null && tbAttResEngBene.getFlControlPerson() != null) { |
| | | if (tbAttResEngBene !=null && tbAttResEngBene.getFlControlPerson() != null && tbAttResEngBene.getFlControlPerson() > 0 ) { |
| | | person = tbAttResEngBene.getFlControlPerson() / 10000.0; |
| | | tableMap.put("flControlPerson", WordUtil.removeTrailingZero(String.format("%.2f", person))); |
| | | } else { |
| | | tableMap.put("flControlPerson", ""); |
| | | } |
| | | tableMap.put("flControlLand", tbAttResEngBene==null?"":tbAttResEngBene.getFlControlLand()==null?"": |
| | | tableMap.put("flControlLand", tbAttResEngBene==null?"":tbAttResEngBene.getFlControlLand()==null || tbAttResEngBene.getFlControlLand() <= 0?"": |
| | | WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand() / 10000))); |
| | | tableMap.put("irrObject", tbAttResEngBene==null?"":tbAttResEngBene.getIrrObject()==null?"":tbAttResEngBene.getIrrObject()); |
| | | tableMap.put("moyearIrrAvg", tbAttResEngBene==null?"":tbAttResEngBene.getMoyearIrrAvg() == null?"": |
| | |
| | | // } |
| | | |
| | | |
| | | tableMap.put("supplyPopulation", tbAttResEngBene.getSupplyPopulation()); |
| | | tableMap.put("supplyPopulation", tbAttResEngBene==null?"":tbAttResEngBene.getSupplyPopulation()==null?"":tbAttResEngBene.getSupplyPopulation()); |
| | | tableMap.put("moyearSupplyAvg", tbAttResEngBene==null?"":tbAttResEngBene.getMoyearSupplyAvg()==null?"":tbAttResEngBene.getMoyearSupplyAvg()); |
| | | tableMap.put("moyearPowerAvg", tbAttResEngBene==null?"":tbAttResEngBene.getMoyearPowerAvg()==null?"":tbAttResEngBene.getMoyearPowerAvg()); |
| | | tableMap.put("ecologicalFlow", tbAttResEngBene==null?"":tbAttResEngBene.getEcologicalFlow()==null?"":tbAttResEngBene.getEcologicalFlow()); |
| | |
| | | |
| | | |
| | | private String convertType(String type, String enumName) { |
| | | if (StringUtil.isBlank(type)) { |
| | | return ""; |
| | | } |
| | | |
| | | String text = ""; |
| | | |
| | | List<String> typeList = Arrays.asList(type.split(",")); |
| | |
| | | params.put("挡水建筑物泄洪建筑物正常溢洪道", tbWordVO.getBuildingText()); |
| | | params.put("主坝信息", tbWordVO.getMainDamInfo()); |
| | | params.put("挡水建筑物泄洪建筑物正常溢洪道等详情", tbWordVO.getBuildingInfo()); |
| | | params.put("输水建筑物输水道形式", tbWordVO.getAqueductType());//若有两个以上输水建筑物,则描述设计流量较大的,若只有一个输水建筑物则去掉“主要” |
| | | params.put("输水建筑物输水道形式", StringUtil.isNotBlank(tbWordVO.getAqueductType())?tbWordVO.getAqueductType().trim():"");//若有两个以上输水建筑物,则描述设计流量较大的,若只有一个输水建筑物则去掉“主要” |
| | | params.put("断面尺寸", tbWordVO.getSection()); |
| | | params.put("进口底槛高程", tbWordVO.getThresholdElevation()); |
| | | params.put("设计流量", tbWordVO.getDesignFlow()); |
| | |
| | | if (StringUtil.isNotBlank(flse_lim_stag)) { |
| | | detailList.add(StringUtil.format("汛限水位{}米", flse_lim_stag)); |
| | | } |
| | | if (StringUtil.isNotBlank(flse_lim_stag)) { |
| | | detailList.add(StringUtil.format("汛限水位{}米", flse_lim_stag)); |
| | | } |
| | | if (StringUtil.isNotBlank(control_z)) { |
| | | detailList.add(StringUtil.format("控制运用水位{}米", control_z)); |
| | | } |
| | |
| | | List<AttResManagePerson> attResManagePeople) { |
| | | |
| | | //取设计流量大的进行描述 |
| | | List<TbAttResWaterDelivery> sortList = |
| | | tbAttResWaterDeliveryList.stream() |
| | | .sorted((a, b) -> { |
| | | Optional<Double> flowA = Optional.ofNullable(a.getDesignFlow()); |
| | | Optional<Double> flowB = Optional.ofNullable(b.getDesignFlow()); |
| | | return flowA.isPresent() && flowB.isPresent() ? flowA.get().compareTo(flowB.get()) : (flowA.isPresent() ? 1 : (flowB.isPresent() ? -1 : 0)); |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | // List<TbAttResWaterDelivery> sortList = |
| | | // tbAttResWaterDeliveryList.stream() |
| | | // .sorted((a, b) -> { |
| | | // Optional<Double> flowA = Optional.ofNullable(a.getDesignFlow()); |
| | | // Optional<Double> flowB = Optional.ofNullable(b.getDesignFlow()); |
| | | // return flowA.isPresent() && flowB.isPresent() ? flowA.get().compareTo(flowB.get()) : (flowA.isPresent() ? 1 : (flowB.isPresent() ? -1 : 0)); |
| | | // }) |
| | | // .collect(Collectors.toList()); |
| | | |
| | | List<TbAttResWaterDelivery> sortList = tbAttResWaterDeliveryList.stream() |
| | | .sorted(Comparator.nullsLast( |
| | | Comparator.comparingDouble(a -> a.getDesignFlow() == null ? Double.POSITIVE_INFINITY : a.getDesignFlow()) |
| | | )) |
| | | .collect(Collectors.toList()); |
| | | |
| | | formatTbAttResBase(tbAttResBase); |
| | | formatTbAttResStagChar(tbAttResStagChar); |
| | |
| | | //大坝数量 |
| | | int damCount = tbAttResWaterBlockList.size(); |
| | | if (damCount > 1) { |
| | | buildingList.add(StringUtil.format("副坝({}座)", damCount - 1)); |
| | | buildingList.add(StringUtil.format("副坝({}座)", damCount - 1)); |
| | | |
| | | //根据名字判断主坝 |
| | | List<TbAttResWaterBlock> mainDamList = tbAttResWaterBlockList.stream().filter(tbAttResWaterBlock -> tbAttResWaterBlock.getName().indexOf("主坝") > -1).collect(Collectors.toList()); |
| | |
| | | |
| | | //输水建筑物 |
| | | if (tbAttResWaterDeliveryList.size()>0&&tbAttResWaterDeliveryList.get(0).getNum() != null && tbAttResWaterDeliveryList.get(0).getNum() > 0) { |
| | | tbAttResWaterDeliveryList.forEach(tbAttResWaterDelivery -> { |
| | | // buildingList.add( convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum")); |
| | | // tbAttResWaterDeliveryList.forEach(tbAttResWaterDelivery -> { |
| | | //// buildingList.add( convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum")); |
| | | // buildingList.add("输水建筑物"); |
| | | // }); |
| | | if (tbAttResWaterDeliveryList.size() > 1) { |
| | | buildingList.add(StringUtil.format("输水建筑物({}座)",tbAttResWaterDeliveryList.size())); |
| | | } else { |
| | | buildingList.add("输水建筑物"); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //电站 |
| | |
| | | * @return |
| | | */ |
| | | private String GenerateNorspiInfo(TbAttResRsbNorspi norspi) { |
| | | if(null == norspi || StringUtil.isBlank(norspi.getName())) { |
| | | return ""; |
| | | } |
| | | /** |
| | | * 溢洪道(第一座泄水建筑物为溢洪道)为正槽式溢洪道(溢洪道型式), |
| | | * 有闸控制(溢洪道根据是否有闸控制确定,填有闸控制、无闸控制),堰顶高程XXm,堰顶净宽XXm, |
| | |
| | | */ |
| | | |
| | | String typeName = SpillwayTypeEnum.find(norspi.getSpillwayType()).getLabel(); |
| | | // String typeName = norspi.getName(); |
| | | if (StringUtil.isBlank(typeName) && norspi.getSpillwayType().indexOf(",") > -1) { |
| | | String [] tmpSt = norspi.getSpillwayType().split(","); |
| | | if (tmpSt[0].equals("9")) { |
| | |
| | | if (norspi.getIsGate().equals("是")) { |
| | | gateText = "有闸控制"; |
| | | String hole = norspi.getGateNum() == 1 ? "单" : String.valueOf(norspi.getGateNum()); |
| | | holeText = StringUtil.format(",设{}孔", hole); |
| | | holeText = StringUtil.format(",{}孔", hole); |
| | | } else { |
| | | gateText = "无闸控制"; |
| | | } |
| | |
| | | hydrologicalCharacteristicsList.add(StringUtil.format("死库容{}万m³", WordUtil.removeTrailingZero(tbAttResStagChar.getDeadCap().toString()))); |
| | | } |
| | | if (tbAttResStagChar.getChecFlStag() != null) { |
| | | hydrologicalCharacteristicsList2.add(StringUtil.format("校核洪水位{}m", String.format("%.2f",tbAttResStagChar.getChecFlStag()))); |
| | | hydrologicalCharacteristicsList2.add(StringUtil.format("水库校核洪水位{}m", String.format("%.2f",tbAttResStagChar.getChecFlStag()))); |
| | | } |
| | | if (tbAttResStagChar.getDesFlStag() != null) { |
| | | hydrologicalCharacteristicsList2.add(StringUtil.format("设计洪水位{}m", String.format("%.2f",tbAttResStagChar.getDesFlStag()))); |
| | |
| | | this.aqueductType = "水库采用"; |
| | | } |
| | | |
| | | |
| | | this.aqueductType = this.aqueductType + convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum") + "输水"; |
| | | |
| | | this.section = isNull(tbAttResWaterDelivery.getSectionWide()) + "×" + isNull(tbAttResWaterDelivery.getSectionHigh()); |
| | | |
| | | this.thresholdElevation = String.format("%.2f",tbAttResWaterDelivery.getThresholdElevation()); |
| | | if (StringUtil.isNotBlank(tbAttResWaterDelivery.getAqueductType())) { |
| | | this.aqueductType = this.aqueductType + convertType(tbAttResWaterDelivery.getAqueductType(),"AqueductTypeEnum") + "输水"; |
| | | } else { |
| | | this.aqueductType = ""; |
| | | } |
| | | |
| | | |
| | | this.designFlow = WordUtil.removeTrailingZero(isNull(tbAttResWaterDelivery.getDesignFlow())); |
| | | |
| | | if (null != tbAttResWaterDelivery.getSectionWide() && null != tbAttResWaterDelivery.getSectionHigh()) { |
| | | if (StringUtil.isNotBlank(this.aqueductType)) { |
| | | this.section = ",断面尺寸"; |
| | | } |
| | | this.section = this.section + isNull(tbAttResWaterDelivery.getSectionWide()) + "×" + isNull(tbAttResWaterDelivery.getSectionHigh()) + "m"; |
| | | } else { |
| | | if (null != tbAttResWaterDelivery.getSectionWide()) { |
| | | if (StringUtil.isNotBlank(this.aqueductType)) { |
| | | this.section = ",断面尺寸"; |
| | | } |
| | | this.section = this.section + isNull(tbAttResWaterDelivery.getSectionWide()) + "m"; |
| | | } else { |
| | | this.section = ""; |
| | | } |
| | | } |
| | | |
| | | if (null != tbAttResWaterDelivery.getThresholdElevation()) { |
| | | if (StringUtil.isNotBlank(this.aqueductType) || StringUtil.isNotBlank(this.section)) { |
| | | this.thresholdElevation = ",进口底槛高程"; |
| | | } |
| | | this.thresholdElevation = this.thresholdElevation + String.format("%.2f",tbAttResWaterDelivery.getThresholdElevation()) + "m"; |
| | | } |
| | | |
| | | |
| | | if (null != tbAttResWaterDelivery.getDesignFlow()) { |
| | | if (StringUtil.isNotBlank(this.aqueductType) || StringUtil.isNotBlank(this.section) || StringUtil.isNotBlank(this.thresholdElevation)) { |
| | | this.designFlow = ",设计流量"; |
| | | } |
| | | this.designFlow = this.designFlow + WordUtil.removeTrailingZero(isNull(tbAttResWaterDelivery.getDesignFlow())) + "m³/s。"; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | this.protectCity = tbAttResEngBene.getCity().equals("无")?tbAttResEngBene.getTown():tbAttResEngBene.getCity(); |
| | | this.protectCity = tbAttResEngBene.getCity().equals("无")?"保护下游" + tbAttResEngBene.getTown():"保护下游" + tbAttResEngBene.getCity(); |
| | | if (StringUtil.isBlank(this.protectCity)) { |
| | | this.protectCity = tbAttResEngBene.getTown().equals("无")?"":tbAttResEngBene.getTown(); |
| | | this.protectCity = tbAttResEngBene.getTown().equals("无")?"":"保护下游" + tbAttResEngBene.getTown(); |
| | | } |
| | | |
| | | double person = tbAttResEngBene.getFlControlPerson() / 10000.0; |
| | |
| | | |
| | | if (tbAttResEngBene.getFlControlLand() > 0) { |
| | | if (StringUtil.isBlank(this.protectPersonLand)) { |
| | | this.protectPersonLand = WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand())) + "万亩耕地"; |
| | | this.protectPersonLand = WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand()/ 10000.0)) + "万亩耕地"; |
| | | } else { |
| | | this.protectPersonLand = this.protectPersonLand + "、" + WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand())) + "万亩耕地"; |
| | | this.protectPersonLand = this.protectPersonLand + "、" + WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand()/ 10000.0)) + "万亩耕地"; |
| | | } |
| | | } |
| | | |
| | | this.protectPersonLand = |
| | | StringUtil.format("{}万人口、{}万亩耕地", WordUtil.removeTrailingZero(String.format("%.2f",person)) , WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand() / 1000))); |
| | | // this.protectPersonLand = |
| | | // StringUtil.format("{}万人口、{}万亩耕地", WordUtil.removeTrailingZero(String.format("%.2f",person)) , WordUtil.removeTrailingZero(String.format("%.2f", tbAttResEngBene.getFlControlLand() / 1000))); |
| | | |
| | | ////铁路、公路、管线、企业几个依次罗列,超过三个列出第二个后为“XX等”,后面不需罗列 |
| | | |
| | | String railway = tbAttResEngBene.getRailway(); |
| | |
| | | //超过三个列出第二个后为“XX等”,后面不需罗列 |
| | | if (protectList.size() > 3) { |
| | | List<String> sublist = protectList.subList(0, 2); |
| | | this.protectThings = String.join(";", sublist) + "等"; |
| | | this.protectThings = "及" + String.join("、", sublist) + "等"; |
| | | } else if(protectList.size() >= 1 ){ |
| | | this.protectThings = "及" + String.join("、", protectList); |
| | | } else { |
| | | this.protectThings = String.join(";", protectList); |
| | | this.protectThings = ""; |
| | | } |
| | | |
| | | if ((this.protectCity.equals("无") || StringUtil.isBlank(this.protectCity) || this.protectCity.equals("保护下游无")) && |
| | | StringUtil.isBlank(this.protectPersonLand) && |
| | | StringUtil.isBlank(this.protectThings)) { |
| | | this.protectCity = "无防洪保护对象"; |
| | | } else { |
| | | this.protectThings = this.protectThings + "的防洪安全"; |
| | | } |
| | | |
| | | this.economicBenefit = ""; |
| | |
| | | if (StringUtils.isNotBlank(this.economicBenefit)) { |
| | | this.economicBenefit = this.economicBenefit + |
| | | StringUtil.format("此外,水库为{}{}万人提供生活用水,年均供水量{}万m³。", |
| | | tbAttResEngBene.getSupplyObject(),StringUtil.isBlank(tbAttResEngBene.getSupplyPopulation())?"":String.format("%.2f", Double.parseDouble(tbAttResEngBene.getSupplyPopulation())), tbAttResEngBene.getMoyearSupplyAvg()); |
| | | tbAttResEngBene.getSupplyObject(), |
| | | StringUtil.isBlank(tbAttResEngBene.getSupplyPopulation())?"":String.format("%.2f", Double.parseDouble(tbAttResEngBene.getSupplyPopulation())), |
| | | tbAttResEngBene.getMoyearSupplyAvg()); |
| | | } else { |
| | | //无灌溉有供水直接介绍供水 |
| | | this.economicBenefit = |
| | | StringUtil.format("水库为{}{}万人提供生活用水,年均供水量{}万m³。", |
| | | tbAttResEngBene.getSupplyObject(),String.format("%.2f", StringUtil.isBlank(tbAttResEngBene.getSupplyPopulation())?"":Double.parseDouble(tbAttResEngBene.getSupplyPopulation())/ 10000), tbAttResEngBene.getMoyearSupplyAvg()); |
| | | tbAttResEngBene.getSupplyObject(), |
| | | String.format("%.2f", StringUtil.isBlank(tbAttResEngBene.getSupplyPopulation())?"":Double.parseDouble(tbAttResEngBene.getSupplyPopulation())), |
| | | tbAttResEngBene.getMoyearSupplyAvg()); |
| | | } |
| | | } |
| | | |
| | |
| | | //(若一类坝,不介绍问题,二、三类坝介绍) |
| | | if (tbAttResSafetyMonitor.getSafetyAppraisalResult().equals("1")) { |
| | | this.safetyMonitorText = StringUtil.format("{},水库进行安全鉴定,鉴定结果为“{}”。", |
| | | time, type); |
| | | } else { |
| | | this.safetyMonitorText = StringUtil.format("{},水库进行安全鉴定,鉴定结果为“{}”,工程主要存在问题为{}", |
| | | time, type, surveyProblem); |
| | | time, type).replaceAll("。。","。"); |
| | | } else if (tbAttResSafetyMonitor.getSafetyAppraisalResult().equals("2") || tbAttResSafetyMonitor.getSafetyAppraisalResult().equals("3")) { |
| | | this.safetyMonitorText = StringUtil.format("{},水库进行安全鉴定,鉴定结果为“{}”,工程主要存在问题为{}。", |
| | | time, type, surveyProblem).replaceAll("。。","。"); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | this.mUnitName = tbAttResMgrSysB.getMUnitName(); |
| | | this.mUnitNature = tbAttResMgrSysB.getMUnitNature().replace("公益类","事业单位"); |
| | | this.mUnitPersonNumber = tbAttResMgrSysB.getMUnitPersonNumber().toString(); |
| | | this.mUnitPersonNumber = tbAttResMgrSysB.getMUnitPersonNumber() + ""; |
| | | } |
| | | |
| | | //对有补充说明的选项进行转换 |
| | |
| | | //key值表示其他 |
| | | if (StringUtil.isNotBlank(typeKey)) { |
| | | if (typeKey.equals("9") || typeKey.equals("其他") || Integer.parseInt(typeKey) == 9 ) { |
| | | text = explain; |
| | | text = explain.trim(); |
| | | }else{ |
| | | switch (enumName) { |
| | | case "AqueductTypeEnum": |
| | |
| | | nkyClient.pointValueInlet(SY); |
| | | nkyClient.pointValueInlet(SL); |
| | | nkyClient.pointValueInlet(X); |
| | | nkyClient.pointValueInlet(Y); |
| | | nkyClient.pointValueInlet(Z); |
| | | // nkyClient.pointValueInlet(Y); |
| | | // nkyClient.pointValueInlet(Z); |
| | | }); |
| | | XxlJobLogger.log("实时测点测值输入结束"); |
| | | return ReturnT.SUCCESS; |