|
|
|
@ -89,25 +89,29 @@ public class BasedataPatrolPointServiceImpl implements IBasedataPatrolPointServi |
|
|
|
public List<BasedataPatrolPoint> selectBasedataMonitorList(BasedataPatrolPoint basedataPatrolpoint) { |
|
|
|
List<BasedataPatrolPoint> pointList = basedataPatrolpointMapper.selectBasedataMonitorList(basedataPatrolpoint); |
|
|
|
logger.info("[META] pointList size: {},pointList: {}", pointList.size(), pointList); |
|
|
|
if (null != basedataPatrolpoint.getDeviceId()) { |
|
|
|
BasedataDevice basedataDevice = basedataDeviceMapper.selectBasedataDeviceByDeviceId(basedataPatrolpoint.getDeviceId()); |
|
|
|
if(basedataDevice != null) { |
|
|
|
basedataPatrolpoint.setDeviceTypeId(basedataDevice.getDeviceTypeId()); |
|
|
|
List<BasedataPatrolPoint> stdPointList = basedataPatrolpointMapper.selectBasedataMonitorUnionList(basedataPatrolpoint); |
|
|
|
logger.info("[META] stdPointList cnt: {}", stdPointList.size()); |
|
|
|
for (BasedataPatrolPoint stdPoint : stdPointList) { |
|
|
|
if (!pointList.isEmpty()) { |
|
|
|
if (pointList.stream().filter((item) -> stdPoint.getStdParolPointId().equals(item.getStdParolPointId())).count() == 0) { |
|
|
|
pointList.add(stdPoint); |
|
|
|
} |
|
|
|
} else { |
|
|
|
pointList.add(stdPoint); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
logger.warn(Color.RED + "[META] basedataDevice deviceId: {} not exist!" + Color.END, basedataPatrolpoint.getDeviceId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// NOTE std_patrol_point_id关联匹配会导致点位管理查询出异常点位,暂时注释 |
|
|
|
// if (null != basedataPatrolpoint.getDeviceId()) { |
|
|
|
// BasedataDevice basedataDevice = basedataDeviceMapper.selectBasedataDeviceByDeviceId(basedataPatrolpoint.getDeviceId()); |
|
|
|
// if(basedataDevice != null) { |
|
|
|
// logger.info("before pointList size: {}", pointList.size()); |
|
|
|
// basedataPatrolpoint.setDeviceTypeId(basedataDevice.getDeviceTypeId()); |
|
|
|
// List<BasedataPatrolPoint> stdPointList = basedataPatrolpointMapper.selectBasedataMonitorUnionList(basedataPatrolpoint); |
|
|
|
// logger.info("[META] stdPointList cnt: {}", stdPointList.size()); |
|
|
|
// for (BasedataPatrolPoint stdPoint : stdPointList) { |
|
|
|
// if (!pointList.isEmpty()) { |
|
|
|
// if (pointList.stream().filter((item) -> stdPoint.getStdParolPointId().equals(item.getStdParolPointId())).count() == 0) { |
|
|
|
// pointList.add(stdPoint); |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// pointList.add(stdPoint); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// logger.warn(Color.RED + "[META] basedataDevice deviceId: {} not exist!" + Color.END, basedataPatrolpoint.getDeviceId()); |
|
|
|
// } |
|
|
|
// logger.info("after pointList size: {}, pointList: {}", pointList.size(), pointList); |
|
|
|
// } |
|
|
|
|
|
|
|
List<BasedataAlgSubtype> basedataAlgSubtypes = basedataAlgSubtypeMapper.selectBasedataAlgSubtypeList(new BasedataAlgSubtype()); |
|
|
|
logger.info("[META] basedataAlgSubtypes cnt: {}", basedataAlgSubtypes.size()); |
|
|
|
@ -134,26 +138,30 @@ public class BasedataPatrolPointServiceImpl implements IBasedataPatrolPointServi |
|
|
|
|
|
|
|
public List<BasedataPatrolPoint> selectBasedataMonitorRelationList(BasedataPatrolPoint basedataPatrolpoint) { |
|
|
|
List<BasedataPatrolPoint> pointList = basedataPatrolpointMapper.selectBasedataMonitorRelationList(basedataPatrolpoint); |
|
|
|
logger.info("[META] pointList size: {},pointList: {}", pointList.size(), pointList); |
|
|
|
if (null != basedataPatrolpoint.getRelationDeviceId()) { |
|
|
|
BasedataDevice basedataDevice = basedataDeviceMapper.selectBasedataDeviceRelationByDeviceId(basedataPatrolpoint.getRelationDeviceId()); |
|
|
|
if(basedataDevice != null) { |
|
|
|
basedataPatrolpoint.setDeviceTypeId(basedataDevice.getDeviceTypeId()); |
|
|
|
List<BasedataPatrolPoint> stdPointList = basedataPatrolpointMapper.selectBasedataMonitorUnionList(basedataPatrolpoint); |
|
|
|
logger.info("[META] stdPointList cnt: {}", stdPointList.size()); |
|
|
|
for (BasedataPatrolPoint stdPoint : stdPointList) { |
|
|
|
if (!pointList.isEmpty()) { |
|
|
|
if (pointList.stream().filter((item) -> stdPoint.getStdParolPointId().equals(item.getStdParolPointId())).count() == 0) { |
|
|
|
pointList.add(stdPoint); |
|
|
|
} |
|
|
|
} else { |
|
|
|
pointList.add(stdPoint); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
logger.warn(Color.RED + "[META] basedataDevice deviceId: {} not exist!" + Color.END, basedataPatrolpoint.getDeviceId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// NOTE std_patrol_point_id关联匹配会导致点位管理查询出异常点位,暂时注释 |
|
|
|
// if (null != basedataPatrolpoint.getRelationDeviceId()) { |
|
|
|
// BasedataDevice basedataDevice = basedataDeviceMapper.selectBasedataDeviceRelationByDeviceId(basedataPatrolpoint.getRelationDeviceId()); |
|
|
|
// |
|
|
|
// if(basedataDevice != null) { |
|
|
|
// logger.info("[META] before pointList size: {}", pointList.size()); |
|
|
|
// basedataPatrolpoint.setDeviceTypeId(basedataDevice.getDeviceTypeId()); |
|
|
|
// List<BasedataPatrolPoint> stdPointList = basedataPatrolpointMapper.selectBasedataMonitorUnionList(basedataPatrolpoint); |
|
|
|
// logger.info("[META] stdPointList cnt: {}", stdPointList.size()); |
|
|
|
// for (BasedataPatrolPoint stdPoint : stdPointList) { |
|
|
|
// if (!pointList.isEmpty()) { |
|
|
|
// if (pointList.stream().filter((item) -> stdPoint.getStdParolPointId().equals(item.getStdParolPointId())).count() == 0) { |
|
|
|
//// pointList.add(stdPoint); |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// pointList.add(stdPoint); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// logger.warn(Color.RED + "[META] basedataDevice deviceId: {} not exist!" + Color.END, basedataPatrolpoint.getDeviceId()); |
|
|
|
// } |
|
|
|
// logger.info("[META] after pointList size: {},pointList: {}", pointList.size(), pointList); |
|
|
|
// } |
|
|
|
|
|
|
|
List<BasedataAlgSubtype> basedataAlgSubtypes = basedataAlgSubtypeMapper.selectBasedataAlgSubtypeList(new BasedataAlgSubtype()); |
|
|
|
logger.info("[META] basedataAlgSubtypes cnt: {}", basedataAlgSubtypes.size()); |
|
|
|
|