|
@@ -11,6 +11,7 @@ import com.tofly.xrtygis.custom.mapper.CustomTheMapMapper;
|
|
|
import com.tofly.xrtygis.custom.service.CustomTheMapService;
|
|
|
import com.tofly.xrtygis.custom.util.CallAPIUtil;
|
|
|
import com.tofly.xrtygis.custom.util.CommonMethod;
|
|
|
+import com.tofly.xrtygis.em.IndexTypeInfoEnum;
|
|
|
import com.tofly.xrtygis.entity.Itemtyperato;
|
|
|
import com.tofly.xrtygis.entity.Scadastaitem;
|
|
|
import com.tofly.xrtygis.entity.Scadastation;
|
|
@@ -252,32 +253,32 @@ public class CustomTheMapServiceImpl implements CustomTheMapService {
|
|
|
@Override
|
|
|
public Map<Long, Object> getAreaWater(String level, String year, String month) {
|
|
|
List<Map> partitions = customTheMapMapper.getPartition(level);
|
|
|
- String[] years = year.split(",");
|
|
|
- List<String> collect = Arrays.stream(month.split(",")).sorted().collect(Collectors.toList());
|
|
|
- if (collect.size() < 2) {
|
|
|
- collect.add(collect.get(0));
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Map<Long, Object> result = new HashMap<>();
|
|
|
|
|
|
- StringBuilder sb;
|
|
|
+
|
|
|
for (Map p : partitions) {
|
|
|
- sb = new StringBuilder();
|
|
|
- for (int i = 0; i < years.length; i++) {
|
|
|
- String sql = " select cwyf, sum(ysl) ysl\n" +
|
|
|
- " from TF_YWPN_DMAUSERTABLE_W a,\n" +
|
|
|
- " TF_YWPN_DMAUSERWATER_W b\n" +
|
|
|
- " where a.yhbh = b.yhbh\n" +
|
|
|
- " and CWYF between '" + years[i] + collect.get(0) + "' and '" + years[i] + collect.get(1) + "'\n" +
|
|
|
- " and instr(dma_ids,'" + p.get("dmaGid").toString() + "') > 0\n" +
|
|
|
- " group by cwyf ";
|
|
|
-
|
|
|
- if (i == years.length - 1) {
|
|
|
- sb.append(sql);
|
|
|
- } else {
|
|
|
- sb.append(sql).append(" union all ");
|
|
|
- }
|
|
|
- }
|
|
|
- result.put(Long.parseLong(p.get("id").toString()), customTheMapMapper.getAllUseWater(sb.toString()));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ result.put(Long.parseLong(p.get("id").toString()), customTheMapMapper.getRegionWater(Long.parseLong(p.get("id").toString()), IndexTypeInfoEnum.CUM_FLOW.getId(), year, month));
|
|
|
}
|
|
|
return result;
|
|
|
}
|