|  |  |  | 
|---|
|  |  |  | int totalNumber = monitorPointMapper.selectCount(wrapper); | 
|---|
|  |  |  | String orderType = map.get("orderType").toString(); | 
|---|
|  |  |  | if (orderType.equals(Constants.ORDER_ASC)){ | 
|---|
|  |  |  | wrapper.orderByAsc("create_time"); | 
|---|
|  |  |  | wrapper.orderByAsc("update_time"); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | wrapper.orderByDesc("create_time"); | 
|---|
|  |  |  | wrapper.orderByDesc("update_time"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Page resultPage = monitorPointMapper.selectPage(page,wrapper); | 
|---|
|  |  |  | List<MonitorPoint> monitorPoints = resultPage.getRecords(); | 
|---|
|  |  |  | 
|---|
|  |  |  | monitorPointMap.put("createTime",createTime); | 
|---|
|  |  |  | monitorPointMap.put("updateTime",updateTime); | 
|---|
|  |  |  | monitorPointMap.put("key",monitorPoint.getId()); | 
|---|
|  |  |  | monitorPointMap.put("provinceCode",getAreaArr(monitorPointMap.get("provinceCode").toString())); | 
|---|
|  |  |  | monitorPointMap.put("cityCode",getAreaArr(monitorPointMap.get("cityCode").toString())); | 
|---|
|  |  |  | monitorPointMap.put("areaCode",getAreaArr(monitorPointMap.get("areaCode").toString())); | 
|---|
|  |  |  | Organization organization = organizationMapper.selectById(Integer.parseInt(monitorPointMap.get("organizationId").toString())); | 
|---|
|  |  |  | if (!ObjectUtils.isEmpty(organization)) { | 
|---|
|  |  |  | String[] organizationArr = {monitorPointMap.get("organizationId").toString(),organization.getName()}; | 
|---|
|  |  |  | monitorPointMap.put("organizationId",organizationArr); | 
|---|
|  |  |  | if (monitorPointMap.get("provinceCode")!=null&&monitorPointMap.get("provinceCode")!=""){ | 
|---|
|  |  |  | monitorPointMap.put("provinceCode",getAreaArr(monitorPointMap.get("provinceCode").toString())); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | String[] arr = {null,null}; | 
|---|
|  |  |  | monitorPointMap.put("provinceCode",arr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (monitorPointMap.get("cityCode")!=null&&monitorPointMap.get("cityCode")!=""){ | 
|---|
|  |  |  | monitorPointMap.put("cityCode",getAreaArr(monitorPointMap.get("cityCode").toString())); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | String[] arr = {null,null}; | 
|---|
|  |  |  | monitorPointMap.put("cityCode",arr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (monitorPointMap.get("areaCode")!=null&&monitorPointMap.get("areaCode")!=""){ | 
|---|
|  |  |  | monitorPointMap.put("areaCode",getAreaArr(monitorPointMap.get("areaCode").toString())); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | String[] arr = {null,null}; | 
|---|
|  |  |  | monitorPointMap.put("areaCode",arr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (monitorPointMap.get("organizationId")!=null&&monitorPointMap.get("organizationId")!=""){ | 
|---|
|  |  |  | Organization organization = organizationMapper.selectById(Integer.parseInt(monitorPointMap.get("organizationId").toString())); | 
|---|
|  |  |  | if (!ObjectUtils.isEmpty(organization)) { | 
|---|
|  |  |  | String[] organizationArr = {monitorPointMap.get("organizationId").toString(),organization.getName()}; | 
|---|
|  |  |  | monitorPointMap.put("organizationId",organizationArr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | String[] arr = {null,null}; | 
|---|
|  |  |  | monitorPointMap.put("organizationId",arr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | monitorPointtList.add(monitorPointMap); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | int totalNumber = monitorPointMapper.selectCount(wrapper); | 
|---|
|  |  |  | String orderType = map.get("orderType").toString(); | 
|---|
|  |  |  | if (orderType.equals(Constants.ORDER_ASC)){ | 
|---|
|  |  |  | wrapper.orderByAsc("create_time"); | 
|---|
|  |  |  | wrapper.orderByAsc("update_time"); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | wrapper.orderByDesc("create_time"); | 
|---|
|  |  |  | wrapper.orderByDesc("update_time"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Page resultPage = monitorPointMapper.selectPage(page,wrapper); | 
|---|
|  |  |  | List<MonitorPoint> monitorPoints = resultPage.getRecords(); | 
|---|
|  |  |  | 
|---|
|  |  |  | monitorPointMap.put("createTime",createTime); | 
|---|
|  |  |  | monitorPointMap.put("updateTime",updateTime); | 
|---|
|  |  |  | monitorPointMap.put("key",monitorPoint.getId()); | 
|---|
|  |  |  | Organization organization = organizationMapper.selectById(Integer.parseInt(monitorPointMap.get("organizationId").toString())); | 
|---|
|  |  |  | if (monitorPointMap.get("provinceCode")!=null&&monitorPointMap.get("provinceCode")!=""){ | 
|---|
|  |  |  | monitorPointMap.put("provinceCode",getAreaArr(monitorPointMap.get("provinceCode").toString())); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | String[] arr = {null,null}; | 
|---|
|  |  |  | monitorPointMap.put("provinceCode",arr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (monitorPointMap.get("cityCode")!=null&&monitorPointMap.get("cityCode")!=""){ | 
|---|
|  |  |  | monitorPointMap.put("cityCode",getAreaArr(monitorPointMap.get("cityCode").toString())); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | String[] arr = {null,null}; | 
|---|
|  |  |  | monitorPointMap.put("cityCode",arr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (monitorPointMap.get("areaCode")!=null&&monitorPointMap.get("areaCode")!=""){ | 
|---|
|  |  |  | monitorPointMap.put("areaCode",getAreaArr(monitorPointMap.get("areaCode").toString())); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | String[] arr = {null,null}; | 
|---|
|  |  |  | monitorPointMap.put("areaCode",arr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /*Organization organization = organizationMapper.selectById(Integer.parseInt(monitorPointMap.get("organizationId").toString())); | 
|---|
|  |  |  | if (!ObjectUtils.isEmpty(organization)) { | 
|---|
|  |  |  | String[] organizationArr = {monitorPointMap.get("organizationId").toString(),organization.getName()}; | 
|---|
|  |  |  | monitorPointMap.put("organizationId",organizationArr); | 
|---|
|  |  |  | }*/ | 
|---|
|  |  |  | if (monitorPointMap.get("organizationId")!=null&&monitorPointMap.get("organizationId")!=""){ | 
|---|
|  |  |  | Organization organization = organizationMapper.selectById(Integer.parseInt(monitorPointMap.get("organizationId").toString())); | 
|---|
|  |  |  | if (!ObjectUtils.isEmpty(organization)) { | 
|---|
|  |  |  | String[] organizationArr = {monitorPointMap.get("organizationId").toString(),organization.getName()}; | 
|---|
|  |  |  | monitorPointMap.put("organizationId",organizationArr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | String[] arr = {null,null}; | 
|---|
|  |  |  | monitorPointMap.put("organizationId",arr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | monitorPointtList.add(monitorPointMap); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | return resultMap; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<MonitorPoint> getMonitorPointsByOrganizationId(Integer organizationId) { | 
|---|
|  |  |  | QueryWrapper<MonitorPoint> monitorPointQueryWrapper = new QueryWrapper<>(); | 
|---|
|  |  |  | MonitorPoint monitorPoint = new MonitorPoint(); | 
|---|
|  |  |  | monitorPoint.setOrganizationId(organizationId); | 
|---|
|  |  |  | monitorPoint.setIsDelete(Constants.NOT_DELETE); | 
|---|
|  |  |  | monitorPointQueryWrapper.setEntity(monitorPoint); | 
|---|
|  |  |  | List<MonitorPoint> monitorPoints = monitorPointMapper.selectList(monitorPointQueryWrapper); | 
|---|
|  |  |  | return monitorPoints; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Description: 获取地区名 | 
|---|
|  |  |  | * @Param: [areaArr, menu]menuMap:key为menuid,value为menu | 
|---|