| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | |
| | | import java.util.Set; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class CockpitServiceImpl implements ICockpitService { |
| | | |
| | | @Resource |
| | |
| | | Region byCode = RegionCache.getByCode(dept.getAreaCode()); |
| | | fwDevice.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode())); |
| | | fwDevice.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | fwDevice.setFlyTime(new Date()); |
| | | IPage<CockpitFwDeviceVO> cockpitFwDeviceVOIPage = fwDeviceService.selectCockpitDevicePage(page, fwDevice); |
| | | return cockpitFwDeviceVOIPage; |
| | | } |
| | |
| | | @Override |
| | | public List<DeviceStatisticsVO> getDeviceOutStatistics(String effectiveRangeKmIsNotNull) { |
| | | FwDeviceDTO fwDeviceDTO = new FwDeviceDTO(); |
| | | // 打印用户信息 |
| | | log.info("用户信息:{}", AuthUtil.getUser()); |
| | | // 获取部门信息 |
| | | Dept dept = SysCache.getDept(Long.valueOf(AuthUtil.getDeptId())); |
| | | log.info("部门信息:{}", dept); |
| | | Region byCode = RegionCache.getByCode(dept.getAreaCode()); |
| | | log.info("区域信息:{}", byCode); |
| | | fwDeviceDTO.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | fwDeviceDTO.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode())); |
| | | fwDeviceDTO.setFlyTime(new Date()); |
| | | return fwDeviceService.getDeviceStatistics(fwDeviceDTO); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public SceneManageStatisticsVO statisticsSceneManageAndArea() { |
| | | List<FwDefenseSceneManageVO> sceneManageList = iFwDefenseSceneManageService.selectFwDefenseSceneManageCockpitList(buildFwBaseInfo()); |
| | | public SceneManageStatisticsVO statisticsSceneManageAndArea(Date filterTime) { |
| | | List<FwDefenseSceneManageVO> sceneManageList = iFwDefenseSceneManageService.selectFwDefenseSceneManageCockpitList(buildFwBaseInfo(), filterTime); |
| | | SceneManageStatisticsVO statisticsVO = new SceneManageStatisticsVO(); |
| | | if (sceneManageList == null || sceneManageList.isEmpty()) { |
| | | statisticsVO.setSceneManageCount(0); |