| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.github.pagehelper.PageHelper;
|
| | | import com.moral.common.bean.Constants;
|
| | | import com.moral.common.bean.PageBean;
|
| | | import com.moral.common.util.*;
|
| | | import com.moral.entity.Device;
|
| | | import com.moral.mapper.DeviceMapper;
|
| | | import org.apache.commons.collections.CollectionUtils;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.github.pagehelper.PageHelper;
|
| | | import com.moral.common.bean.Constants;
|
| | | import com.moral.common.bean.PageBean;
|
| | | import com.moral.common.util.ExampleUtil;
|
| | | import com.moral.common.util.RedisUtils;
|
| | | import com.moral.common.util.StringUtils;
|
| | | import com.moral.common.util.ValidateUtil;
|
| | | import com.moral.entity.Device;
|
| | | import com.moral.entity.MonitorPoint;
|
| | | import com.moral.mapper.DeviceMapper;
|
| | | import com.moral.mapper.MonitorPointMapper;
|
| | | import com.moral.service.MonitorPointService;
|
| | |
|
| | | import tk.mybatis.mapper.entity.Example;
|
| | | import tk.mybatis.mapper.entity.Example.Criteria;
|
| | |
|
| | |
| | |
|
| | | @Override
|
| | | public List<MonitorPoint> getMonitorPointsByOrganizationId(Integer orgId) {
|
| | | MonitorPoint monitorPoint = new MonitorPoint();
|
| | | monitorPoint.setIsDelete(Constants.IS_DELETE_FALSE);
|
| | | Example example = new Example(MonitorPoint.class);
|
| | | Criteria criteria = example.createCriteria();
|
| | | |
| | | criteria.andEqualTo("isDelete", Constants.IS_DELETE_FALSE);
|
| | | if (Constants.isNotSpecialOrgId(orgId)) {
|
| | | monitorPoint.setOrganizationId(orgId);
|
| | | criteria.andEqualTo("organizationId", orgId);
|
| | | }
|
| | | return monitorPointMapper.select(monitorPoint);
|
| | | example.orderBy("name").asc();
|
| | | return monitorPointMapper.selectByExample(example);
|
| | | }
|
| | | }
|