| | |
| | | import java.util.stream.Collectors;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.validation.constraints.NotNull;
|
| | |
|
| | | import com.moral.mapper.DictionaryDataMapper;
|
| | | import com.moral.mapper.OrganizationMapper;
|
| | | import org.apache.commons.collections.CollectionUtils;
|
| | |
| | | public PageBean queryByPageBean(PageBean pageBean) {
|
| | | Example example = ExampleUtil.generateExample(ENTITY_CLASS,pageBean);
|
| | | List<Example.Criteria> criteriaList = example.getOredCriteria();
|
| | | if(criteriaList!=null&&criteriaList.size()>0){
|
| | | for(Example.Criteria cri : criteriaList){
|
| | | cri.andNotEqualTo("isDelete", Constants.IS_DELETE_TRUE);
|
| | | }
|
| | | }else {
|
| | | example.or().andNotEqualTo("isDelete",Constants.IS_DELETE_TRUE);
|
| | | }
|
| | | PageHelper.startPage(pageBean.getPageIndex(),pageBean.getPageSize());
|
| | | List<MonitorPoint> monitorPointList = monitorPointMapper.selectWithAreaNameByExample(example);
|
| | | return new PageBean(monitorPointList);
|
| | |
| | | return list;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取所属组织的监控点总数
|
| | | * @param orgId
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public Integer countOfSubOrgs(@NotNull Integer orgId){
|
| | | Example example = new Example(ENTITY_CLASS);
|
| | | //过滤超级管理员账号
|
| | | if(!dictionaryDataMapper.isSupperOrgId(orgId)){
|
| | | List<Integer> orgIds = orgMapper.selectLowerOrgIds(orgId);
|
| | | example.or().andIn("organizationId",orgIds);
|
| | | }
|
| | | return monitorPointMapper.selectCountByExample(example);
|
| | | }
|
| | | @Override
|
| | | public List<MonitorPoint> getMonitorPointsByOrganizationId(Integer orgId) {
|
| | | Example example = new Example(MonitorPoint.class);
|