74 lines
2.2 KiB
Java
74 lines
2.2 KiB
Java
|
|
package com.gunshi.project.ss.service;
|
||
|
|
|
||
|
|
|
||
|
|
import com.gunshi.project.ss.entity.vo.ScreenEquipmentVo;
|
||
|
|
import com.gunshi.project.ss.model.AttResBase;
|
||
|
|
import com.gunshi.project.ss.model.AttResBuilding;
|
||
|
|
import lombok.extern.slf4j.Slf4j;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
|
||
|
|
@Slf4j
|
||
|
|
@Service
|
||
|
|
public class ScreenMechanismsService {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private AttResBuildingService attResBuildingService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private AttResBaseService attResBaseService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private StStbprpBElemService stStbprpBElemService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private JcskSyBService jcskSyBService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private JcskSlBService jcskSlBService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private JcskGnssBService jcskGnssBService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private AttCctvBaseService attCctvBaseService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private RescueGoodsService rescueGoodsService;
|
||
|
|
|
||
|
|
public ScreenEquipmentVo getScreenEquipment() {
|
||
|
|
ScreenEquipmentVo res = new ScreenEquipmentVo();
|
||
|
|
|
||
|
|
//管理用房
|
||
|
|
AttResBase one = attResBaseService.lambdaQuery().one();
|
||
|
|
if(one != null){
|
||
|
|
res.setManagementHousing(one.getManagementHousing());
|
||
|
|
}
|
||
|
|
|
||
|
|
//雨晴、水情、流量站总数量
|
||
|
|
Long count = stStbprpBElemService.lambdaQuery().count();
|
||
|
|
res.setRainWaterCount(count);
|
||
|
|
|
||
|
|
//安全监测设备
|
||
|
|
Long jcskSyCount = jcskSyBService.lambdaQuery().count();
|
||
|
|
Long jcskSlCount = jcskSlBService.lambdaQuery().count();
|
||
|
|
Long jcskGnssCount = jcskGnssBService.lambdaQuery().count();
|
||
|
|
res.setSafeCheckCount(jcskSyCount + jcskSlCount + jcskGnssCount);
|
||
|
|
|
||
|
|
//视频监控设施
|
||
|
|
Long attCctvCount = attCctvBaseService.lambdaQuery().count();
|
||
|
|
res.setCctvCount(attCctvCount);
|
||
|
|
|
||
|
|
//防汛物质总类
|
||
|
|
Long goodsTypeCount = rescueGoodsService.queryTypeCount();
|
||
|
|
res.setGoodsTypeCount(goodsTypeCount);
|
||
|
|
|
||
|
|
//防汛道路
|
||
|
|
AttResBuilding attResBuilding = attResBuildingService.lambdaQuery().one();
|
||
|
|
if(attResBuilding != null){
|
||
|
|
res.setRoadLength(attResBuilding.getRoadLength());
|
||
|
|
}
|
||
|
|
return res;
|
||
|
|
}
|
||
|
|
}
|