| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.sun.corba.se.spi.presentation.rmi.PresentationManager; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.result.SystemGrdoupBatt; |
| | | import com.whyc.mapper.*; |
| | |
| | | mapper.insertBatchSomeColumn(stationListToBeAdded); |
| | | } |
| | | |
| | | /** |
| | | * 按省份查询数量 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | public Response getProvinceCountMap(int userId) { |
| | | try { |
| | | //所有站点的省份 |
| | | List<String> stationName1List = mapper.getProvinceCountMap(userId); |
| | | Map<String, Integer> resMap = new HashMap<>(); |
| | | for (String stationName1 : stationName1List) { |
| | | Integer count = resMap.get(stationName1); |
| | | if (count == null) { |
| | | resMap.put(stationName1, 1); |
| | | } else { |
| | | resMap.put(stationName1, count + 1); |
| | | } |
| | | } |
| | | return new Response().setII(1, true,resMap,null); |
| | | }catch (Exception e){ |
| | | return new Response().set(1, false,"发生异常:"+e.getCause()); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |