| | |
| | | package com.lf.server.service.show; |
| | | |
| | | import com.lf.server.entity.bs.MpipelineEntity; |
| | | import com.lf.server.entity.show.OneMapEntity; |
| | | import com.lf.server.mapper.show.OneMapMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 管网一张图Service |
| | | * |
| | | * @author 邢锦双 |
| | | */ |
| | | @Service |
| | | public class OneMapService implements OneMapMapper { |
| | | |
| | | @Autowired |
| | | OneMapMapper aMapOfPipelineMapper; |
| | | |
| | | /** |
| | | * 项目类别conut |
| | | */ |
| | | public List<String> projectCategoryConut() { |
| | | return aMapOfPipelineMapper.projectCategoryConut(); |
| | | @Override |
| | | public List<String> projectCategoryCount() { |
| | | return aMapOfPipelineMapper.projectCategoryCount(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | public List<String> projectLocationConut() { |
| | | return aMapOfPipelineMapper.projectLocationConut(); |
| | | @Override |
| | | public List<String> projectLocationCount() { |
| | | return aMapOfPipelineMapper.projectLocationCount(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 国家维度conut |
| | | */ |
| | | public List<String> countryDimensionConut() { |
| | | return aMapOfPipelineMapper.countryDimensionConut(); |
| | | @Override |
| | | public List<String> countryDimensionCount() { |
| | | return aMapOfPipelineMapper.countryDimensionCount(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 省维conut |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | public List<String> provinceDimensionConut() { |
| | | return aMapOfPipelineMapper.provinceDimensionConut(); |
| | | @Override |
| | | public List<String> provinceDimensionCount() { |
| | | return aMapOfPipelineMapper.provinceDimensionCount(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | public List<String> dataStorageConut() { |
| | | return aMapOfPipelineMapper.dataStorageConut(); |
| | | @Override |
| | | public List<String> dataStorageCount() { |
| | | return aMapOfPipelineMapper.dataStorageCount(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | public List<String> fileFormatConut() { |
| | | return aMapOfPipelineMapper.fileFormatConut(); |
| | | @Override |
| | | public List<String> fileFormatCount() { |
| | | return aMapOfPipelineMapper.fileFormatCount(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | public List<String> dataApplyConut() { |
| | | return aMapOfPipelineMapper.dataApplyConut(); |
| | | @Override |
| | | public List<String> dataApplyCount() { |
| | | return aMapOfPipelineMapper.dataApplyCount(); |
| | | } |
| | | |
| | | public List<String> dataVisitConut() { |
| | | return aMapOfPipelineMapper.dataVisitConut(); |
| | | /** |
| | | * 数据访问数 |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | @Override |
| | | public List<String> dataVisitCount() { |
| | | return aMapOfPipelineMapper.dataVisitCount(); |
| | | } |
| | | |
| | | /** |
| | | * 下载数统计 |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | @Override |
| | | public List<String> countDownloads() { |
| | | return aMapOfPipelineMapper.countDownloads(); |
| | | } |
| | | |
| | | /** |
| | | * 统计项目显示 |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | @Override |
| | | public List<String> countProjectDisplay() { |
| | | return aMapOfPipelineMapper.countProjectDisplay(); |
| | | } |
| | | |
| | | /** |
| | | * 统计项目参观 |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | @Override |
| | | public List<String> countProjectTour(MpipelineEntity mpipelineEntity) { |
| | | return aMapOfPipelineMapper.countProjectTour(mpipelineEntity); |
| | | } |
| | | |
| | | /** |
| | | * 选择项目参观列表 |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | @Override |
| | | public List<String> selectProjectTour() { |
| | | return aMapOfPipelineMapper.selectProjectTour(); |
| | | } |
| | | |
| | | /** |
| | | * 统计项目类型 |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | public List<OneMapEntity> selectProjectType1() { |
| | | |
| | | |
| | | List<OneMapEntity> resList = new ArrayList<>(); |
| | | |
| | | List<OneMapEntity> resInfo = aMapOfPipelineMapper.selectProjectType1(); |
| | | for (int i = 0; i < resInfo.size(); i++) { |
| | | if (resInfo.get(i).getValue().equals("测量(ESV)")) { |
| | | |
| | | String valueStr = resInfo.get(i).getKey(); |
| | | System.out.println("测量(ESV)== valueStr == " + valueStr); |
| | | String endSql = null; |
| | | String sqlQur = ""; |
| | | if (valueStr.length() > 0) { |
| | | String[] arrStr = valueStr.split(","); |
| | | StringBuilder one = new StringBuilder(); |
| | | if (arrStr.length > 0) { |
| | | System.out.println("arrStr = " + arrStr.length); |
| | | } |
| | | for (int j = 0; j < arrStr.length; j++) { |
| | | sqlQur = "\'" + arrStr[j] + "%\' " + "or dircode like"; |
| | | one.append(sqlQur); |
| | | } |
| | | endSql = " where dircode like " + one.substring(0, one.toString().length() - 15); |
| | | System.out.println("endSql = " + endSql); |
| | | } |
| | | resList.addAll(aMapOfPipelineMapper.selectProjectTypeOne(endSql)); |
| | | |
| | | } else if (resInfo.get(i).getValue().equals("勘察(EGE)")) { |
| | | |
| | | String valueStr = resInfo.get(i).getKey(); |
| | | System.out.println("勘察(EGE)== valueStr == " + valueStr); |
| | | String endSql1 = null; |
| | | String sqlQur = ""; |
| | | if (valueStr.length() > 0) { |
| | | String[] arrStr1 = valueStr.split(","); |
| | | StringBuilder one = new StringBuilder(); |
| | | if (arrStr1.length > 0) { |
| | | System.out.println("arrStr = " + arrStr1.length); |
| | | } |
| | | for (int j = 0; j < arrStr1.length; j++) { |
| | | sqlQur = "\'" + arrStr1[j] + "%\' " + "or dircode like"; |
| | | one.append(sqlQur); |
| | | } |
| | | endSql1 = " where dircode like " + one.substring(0, one.toString().length() - 15); |
| | | System.out.println("endSql1 = " + endSql1); |
| | | } |
| | | resList.addAll(aMapOfPipelineMapper.selectProjectTypeOne(endSql1)); |
| | | |
| | | |
| | | } else if (resInfo.get(i).getValue().equals("地灾(EGD)")) { |
| | | String valueStr = resInfo.get(i).getKey(); |
| | | System.out.println("地灾(EGD)== valueStr == " + valueStr); |
| | | String endSql2 = null; |
| | | String sqlQur = ""; |
| | | if (valueStr.length() > 0) { |
| | | String[] arrStr2 = valueStr.split(","); |
| | | StringBuilder one = new StringBuilder(); |
| | | if (arrStr2.length > 0) { |
| | | System.out.println("arrStr = " + arrStr2.length); |
| | | } |
| | | for (int j = 0; j < arrStr2.length; j++) { |
| | | sqlQur = "\'" + arrStr2[j] + "%\' " + "or dircode like"; |
| | | one.append(sqlQur); |
| | | } |
| | | endSql2 = " where dircode like " + one.substring(0, one.toString().length() - 15); |
| | | System.out.println("endSql2 = " + endSql2); |
| | | } |
| | | resList.addAll(aMapOfPipelineMapper.selectProjectTypeOne(endSql2)); |
| | | |
| | | } else if (resInfo.get(i).getValue().equals("洞库(EGD)")) { |
| | | String valueStr = resInfo.get(i).getKey(); |
| | | System.out.println("洞库(EGD)== valueStr == " + valueStr); |
| | | String endSql3 = null; |
| | | String sqlQur = ""; |
| | | if (valueStr.length() > 0) { |
| | | String[] arrStr3 = valueStr.split(","); |
| | | StringBuilder one = new StringBuilder(); |
| | | if (arrStr3.length > 0) { |
| | | System.out.println("arrStr = " + arrStr3.length); |
| | | } |
| | | for (int j = 0; j < arrStr3.length; j++) { |
| | | sqlQur = "\'" + arrStr3[j] + "%\' " + "or dircode like"; |
| | | one.append(sqlQur); |
| | | } |
| | | endSql3 = " where dircode like " + one.substring(0, one.toString().length() - 15); |
| | | System.out.println("endSql3 = " + endSql3); |
| | | } |
| | | resList.addAll(aMapOfPipelineMapper.selectProjectTypeOne(endSql3)); |
| | | } |
| | | } |
| | | return resList; |
| | | } |
| | | |
| | | @Override |
| | | public List<OneMapEntity> selectProjectTypeOne(String sqlQur) { |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询表信息 |
| | | * |
| | | * @return {@link List}<{@link String}> |
| | | */ |
| | | @Override |
| | | public List<String> queryTableInfo(String tableName) { |
| | | return aMapOfPipelineMapper.queryTableInfo(tableName); |
| | | } |
| | | } |