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 {
@RequestParam(value = "pageNumber") int pageNumber,
@RequestParam(value = "pageSize") int pageSize,
@RequestParam(value = "sourceId") String sourceId,
@RequestParam(value = "categoryId") String categoryId,
@RequestParam(value = "equipCode") String equipCode,
@RequestParam(value = "equipName") String equipName
@RequestParam(value = "categoryId" ,required = false) String categoryId,
@RequestParam(value = "equipCode",required = false) String equipCode,
@RequestParam(value = "equipName",required = false) String equipName
) {
Page page = new Page(pageNumber, pageSize);
return iRiskSourceSceneService.getEquipBySourceId(page, sourceId,categoryId,equipCode,equipName);
......
......@@ -16,4 +16,5 @@ public interface ISourceSceneService extends IService<SourceScene> {
* @Date 2020/12/19 15:25
*/
List<SourceScene> findBySourceId(Long sourceId);
List<SourceScene> findByType(String type);
}
......@@ -1295,18 +1295,38 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
public List<EquiplistSpecificBySystemVO> getPointInFloor(Long floorId) {
//0.查询画布信息,todo 建筑可标记点类型为装备、摄像头
List<SourceScene> sourceScenes = sourceSceneService.findBySourceId(floorId);
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() : "";
// List<SourceScene> sourceScenes = sourceSceneService.findBySourceId(floorId);
//查询所有画布
List<SourceScene> sourceScenes = sourceSceneService.findByType("building");
// 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
List<EquiplistSpecificBySystemVO> equipmentSpecifics = equipmentSpecificMapper.getListByWarehouseStructureId(floorId);
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("装备点");
});
List<EquiplistSpecificBySystemVO> bySystemVOS = new ArrayList<>(equipmentSpecifics);
......@@ -1321,7 +1341,18 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
vo.setEquipmentName(v.getName());
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);
});
return bySystemVOS;
......
......@@ -673,7 +673,7 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
categoryIdList = categorieChildren.stream().map(category -> category.getId()).collect(Collectors.toList());
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.setRecords(equipmentList);
return page;
......
......@@ -27,4 +27,10 @@ public class SourceSceneServiceImpl extends ServiceImpl<SourceSceneMapper, Sourc
Optional.ofNullable(sourceId).orElseThrow(() -> new BadRequest("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
public CylinderInfoDto getDetail(String 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;
}
......
#DB properties:
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.password=Yeejoin@2020
......@@ -9,10 +10,10 @@ eureka.client.service-url.defaultZone =http://36.46.151.113:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
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.status-page-url=http://36.46.151.113:${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.status-page-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
## ES properties:
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