Commit d13f0a47 authored by chenhao's avatar chenhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents 8c1d3976 c16a84c4
...@@ -261,9 +261,9 @@ public class RiskSourceSceneController extends AbstractBaseController { ...@@ -261,9 +261,9 @@ public class RiskSourceSceneController extends AbstractBaseController {
@RequestParam(value = "pageNumber") int pageNumber, @RequestParam(value = "pageNumber") int pageNumber,
@RequestParam(value = "pageSize") int pageSize, @RequestParam(value = "pageSize") int pageSize,
@RequestParam(value = "sourceId") String sourceId, @RequestParam(value = "sourceId") String sourceId,
@RequestParam(value = "categoryId") String categoryId, @RequestParam(value = "categoryId" ,required = false) String categoryId,
@RequestParam(value = "equipCode") String equipCode, @RequestParam(value = "equipCode",required = false) String equipCode,
@RequestParam(value = "equipName") String equipName @RequestParam(value = "equipName",required = false) String equipName
) { ) {
Page page = new Page(pageNumber, pageSize); Page page = new Page(pageNumber, pageSize);
return iRiskSourceSceneService.getEquipBySourceId(page, sourceId,categoryId,equipCode,equipName); return iRiskSourceSceneService.getEquipBySourceId(page, sourceId,categoryId,equipCode,equipName);
......
...@@ -16,4 +16,5 @@ public interface ISourceSceneService extends IService<SourceScene> { ...@@ -16,4 +16,5 @@ public interface ISourceSceneService extends IService<SourceScene> {
* @Date 2020/12/19 15:25 * @Date 2020/12/19 15:25
*/ */
List<SourceScene> findBySourceId(Long sourceId); List<SourceScene> findBySourceId(Long sourceId);
List<SourceScene> findByType(String type);
} }
...@@ -1295,18 +1295,38 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1295,18 +1295,38 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override @Override
public List<EquiplistSpecificBySystemVO> getPointInFloor(Long floorId) { public List<EquiplistSpecificBySystemVO> getPointInFloor(Long floorId) {
//0.查询画布信息,todo 建筑可标记点类型为装备、摄像头 //0.查询画布信息,todo 建筑可标记点类型为装备、摄像头
List<SourceScene> sourceScenes = sourceSceneService.findBySourceId(floorId); // List<SourceScene> sourceScenes = sourceSceneService.findBySourceId(floorId);
SourceScene sourceScene = sourceScenes.size() > 0 ? sourceScenes.get(0) : new SourceScene(); //查询所有画布
//0.1已标记装备点 List<SourceScene> sourceScenes = sourceSceneService.findByType("building");
String equipPointInScene = sourceScene.getPointInScene() != null ? sourceScene.getPointInScene() : "";
//0.2已标记视频点
String videoPointInScene = sourceScene.getVideoInScene() != null ? sourceScene.getVideoInScene() : ""; // SourceScene sourceScene = sourceScenes.size() > 0 ? sourceScenes.get(0) : new SourceScene();
//// //0.1已标记装备点
//// String equipPointInScene = sourceScene.getPointInScene() != null ? sourceScene.getPointInScene() : "";
//// //0.2已标记视频点
//// String videoPointInScene = sourceScene.getVideoInScene() != null ? sourceScene.getVideoInScene() : "";
//1.查询楼层下的所有装备list //1.查询楼层下的所有装备list
List<EquiplistSpecificBySystemVO> equipmentSpecifics = equipmentSpecificMapper.getListByWarehouseStructureId(floorId); List<EquiplistSpecificBySystemVO> equipmentSpecifics = equipmentSpecificMapper.getListByWarehouseStructureId(floorId);
equipmentSpecifics.forEach(e -> { equipmentSpecifics.forEach(e -> {
//已经标记则为已绑定 //已经标记则为已绑定
e.setIsBound(equipPointInScene.contains(e.getId().toString()));
if(sourceScenes!=null&&sourceScenes.size()>0){
Boolean isBound=false;
for (SourceScene sourceScene : sourceScenes) {
String equipPointInScene = sourceScene.getPointInScene() != null ? sourceScene.getPointInScene() : "";
isBound= equipPointInScene.contains(e.getId().toString());
if(isBound){
break;
}
}
e.setIsBound(isBound);
}
e.setType("装备点"); e.setType("装备点");
}); });
List<EquiplistSpecificBySystemVO> bySystemVOS = new ArrayList<>(equipmentSpecifics); List<EquiplistSpecificBySystemVO> bySystemVOS = new ArrayList<>(equipmentSpecifics);
...@@ -1321,7 +1341,18 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1321,7 +1341,18 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
vo.setEquipmentName(v.getName()); vo.setEquipmentName(v.getName());
vo.setType("视频点"); vo.setType("视频点");
//已经标记则为已绑定 //已经标记则为已绑定
vo.setIsBound(videoPointInScene.contains(v.getId().toString())); if(sourceScenes!=null&&sourceScenes.size()>0){
Boolean isBound=false;
for (SourceScene sourceScene : sourceScenes) {
String videoPointInScene = sourceScene.getVideoInScene() != null ? sourceScene.getVideoInScene() : "";
isBound= videoPointInScene.contains(v.getId().toString());
if(isBound){
break;
}
}
vo.setIsBound(isBound);
}
bySystemVOS.add(vo); bySystemVOS.add(vo);
}); });
return bySystemVOS; return bySystemVOS;
......
...@@ -673,7 +673,7 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe ...@@ -673,7 +673,7 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
categoryIdList = categorieChildren.stream().map(category -> category.getId()).collect(Collectors.toList()); categoryIdList = categorieChildren.stream().map(category -> category.getId()).collect(Collectors.toList());
categoryIdList.add(categoryRoot); categoryIdList.add(categoryRoot);
} }
List<HashMap<String,Object>> equipmentList = equipmentSpecificMapper.getEquipBySourceId(idsList, categoryIdList, equipCode.replace(" ", ""), equipName.replace(" ", "")); List<HashMap<String,Object>> equipmentList = equipmentSpecificMapper.getEquipBySourceId(idsList, categoryIdList,equipCode == null ?equipCode = " ".replace(" ", ""):null, equipName == null ? equipName = " ".replace(" ", ""): null);
page.setTotal(equipmentList.size()); page.setTotal(equipmentList.size());
page.setRecords(equipmentList); page.setRecords(equipmentList);
return page; return page;
......
...@@ -27,4 +27,10 @@ public class SourceSceneServiceImpl extends ServiceImpl<SourceSceneMapper, Sourc ...@@ -27,4 +27,10 @@ public class SourceSceneServiceImpl extends ServiceImpl<SourceSceneMapper, Sourc
Optional.ofNullable(sourceId).orElseThrow(() -> new BadRequest("sourceId为空")); Optional.ofNullable(sourceId).orElseThrow(() -> new BadRequest("sourceId为空"));
return this.list(new QueryWrapper<SourceScene>().lambda().eq(SourceScene::getSourceId,sourceId)); return this.list(new QueryWrapper<SourceScene>().lambda().eq(SourceScene::getSourceId,sourceId));
} }
@Override
public List<SourceScene> findByType(String type) {
Optional.ofNullable(type).orElseThrow(() -> new BadRequest("type为空"));
return this.list(new QueryWrapper<SourceScene>().lambda().eq(SourceScene::getSourceType,type));
}
} }
...@@ -661,7 +661,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -661,7 +661,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
public CylinderInfoDto getDetail(String sequenceCode) { public CylinderInfoDto getDetail(String sequenceCode) {
CylinderInfoDto dto = this.baseMapper.getDetail(sequenceCode); CylinderInfoDto dto = this.baseMapper.getDetail(sequenceCode);
dto.setInspectionStatusDesc(dto.getEarlyWarningLevel() != null ? EarlyWarningLevelEnum.getEumByLevel(dto.getEarlyWarningLevel()).getStatus() : ""); dto.setInspectionStatusDesc(StringUtils.isNotEmpty(dto.getEarlyWarningLevel()) ? EarlyWarningLevelEnum.getEumByLevel(dto.getEarlyWarningLevel()).getStatus() : "");
return dto; return dto;
} }
......
#DB properties: #DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:3306/xiy_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:mysql://36.46.151.113:13306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2020
...@@ -9,10 +10,10 @@ eureka.client.service-url.defaultZone =http://36.46.151.113:10001/eureka/ ...@@ -9,10 +10,10 @@ eureka.client.service-url.defaultZone =http://36.46.151.113:10001/eureka/
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://36.46.151.113:${server.port}${server.servlet.context-path}/actuator/health eureka.instance.health-check-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://36.46.151.113:${server.port}${server.servlet.context-path}/actuator/info eureka.instance.status-page-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://192.168.0.204:${server.port}${server.servlet.context-path}/swagger-ui.html eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
## ES properties: ## ES properties:
biz.elasticsearch.address=36.46.151.113 biz.elasticsearch.address=36.46.151.113
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment