指挥中心预警发送接收功能测试
This commit is contained in:
parent
ef00e90cf2
commit
969842078a
|
|
@ -0,0 +1,158 @@
|
|||
package com.dkl.large.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.koal.kms.sdk.ed.KmsSdkException;
|
||||
import com.dkl.common.annotation.DataScope;
|
||||
import com.dkl.large.domain.DklActivity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.dkl.common.annotation.Log;
|
||||
import com.dkl.common.core.controller.BaseController;
|
||||
import com.dkl.common.core.domain.AjaxResult;
|
||||
import com.dkl.common.enums.BusinessType;
|
||||
import com.dkl.large.domain.DklMonitoringPoints;
|
||||
import com.dkl.large.service.IDklMonitoringPointsService;
|
||||
import com.dkl.common.utils.poi.ExcelUtil;
|
||||
import com.dkl.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 监控点信息Controller
|
||||
*
|
||||
* @author Dkl
|
||||
* @date 2025-06-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/large/points")
|
||||
public class DklMonitoringPointsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDklMonitoringPointsService dklMonitoringPointsService;
|
||||
|
||||
/**
|
||||
* 查询监控点信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('large:points:list')")
|
||||
@DataScope(deptAlias = "d")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException {
|
||||
startPage();
|
||||
List<DklMonitoringPoints> list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('large:points:list')")
|
||||
@DataScope(deptAlias = "d")
|
||||
@GetMapping("/listMessage")
|
||||
public AjaxResult listMessage(DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException {
|
||||
String message = dklMonitoringPointsService.selectDklMonitoringPointsListMeaasge(dklMonitoringPoints);
|
||||
return AjaxResult.success(message);
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('large:points:list')")
|
||||
@DataScope(deptAlias = "d")
|
||||
@GetMapping("/listAll")
|
||||
public TableDataInfo listAll(DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException {
|
||||
|
||||
dklMonitoringPoints.setDelFlag("0");
|
||||
List<DklMonitoringPoints> list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/listOutAll")
|
||||
public TableDataInfo listOutAll(DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException {
|
||||
startPage();
|
||||
List<DklMonitoringPoints> list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出监控点信息列表
|
||||
*/
|
||||
@Log(title = "监控点信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException {
|
||||
List<DklMonitoringPoints> list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints);
|
||||
ExcelUtil<DklMonitoringPoints> util = new ExcelUtil<DklMonitoringPoints>(DklMonitoringPoints.class);
|
||||
util.exportExcel(response, list, "监控点信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控点信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) throws KmsSdkException {
|
||||
return success(dklMonitoringPointsService.selectDklMonitoringPointsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控点信息
|
||||
*/
|
||||
@Log(title = "监控点信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException {
|
||||
if(!dklMonitoringPointsService.checkPointsNameUnique(dklMonitoringPoints)){
|
||||
return error("新增监控点信息'" + dklMonitoringPoints.getPointName() + "'失败,名称已存在");
|
||||
}
|
||||
//添加系统信息
|
||||
dklMonitoringPoints.setDelFlag("0");
|
||||
dklMonitoringPoints.setCreateTime(new Date());
|
||||
dklMonitoringPoints.setCreateBy(getUsername());
|
||||
dklMonitoringPoints.setDeptId(getDeptId());
|
||||
dklMonitoringPoints.setUpdateTime(new Date());
|
||||
dklMonitoringPoints.setUpdateBy(getUsername());
|
||||
return toAjax(dklMonitoringPointsService.insertDklMonitoringPoints(dklMonitoringPoints));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控点信息
|
||||
*/
|
||||
@Log(title = "监控点信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException {
|
||||
if (!dklMonitoringPointsService.checkPointsNameUnique(dklMonitoringPoints))
|
||||
{
|
||||
return error("修改监控点信息'" + dklMonitoringPoints.getPointName() + "'失败,名称已存在");
|
||||
}
|
||||
//添加系统信息
|
||||
dklMonitoringPoints.setUpdateTime(new Date());
|
||||
dklMonitoringPoints.setUpdateBy(getUsername());
|
||||
return toAjax(dklMonitoringPointsService.updateDklMonitoringPoints(dklMonitoringPoints));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控点信息
|
||||
*/
|
||||
@Log(title = "监控点信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable int[] ids)
|
||||
{
|
||||
return toAjax(dklMonitoringPointsService.deleteDklMonitoringPointsByIds(ids));
|
||||
}
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response)
|
||||
{
|
||||
ExcelUtil<DklMonitoringPoints> util = new ExcelUtil<DklMonitoringPoints>(DklMonitoringPoints.class);
|
||||
util.importTemplateExcel(response, "监控点信息数据");
|
||||
}
|
||||
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file) throws Exception
|
||||
{
|
||||
ExcelUtil<DklMonitoringPoints> util = new ExcelUtil<DklMonitoringPoints>(DklMonitoringPoints.class);
|
||||
List<DklMonitoringPoints> monitoringPointsList = util.importExcel(file.getInputStream());
|
||||
String operName = getUsername();
|
||||
String message = dklMonitoringPointsService.importDate(monitoringPointsList, operName);
|
||||
return success(message);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
package com.dkl.large.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.dkl.large.domain.DklWeather;
|
||||
import com.dkl.large.service.IDklWeatherService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.dkl.common.annotation.Log;
|
||||
import com.dkl.common.core.controller.BaseController;
|
||||
import com.dkl.common.core.domain.AjaxResult;
|
||||
import com.dkl.common.enums.BusinessType;
|
||||
import com.dkl.common.utils.poi.ExcelUtil;
|
||||
import com.dkl.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 天气信息Controller
|
||||
*
|
||||
* @author Dkl
|
||||
* @date 2025-11-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/large/weather")
|
||||
public class DklWeatherController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDklWeatherService dklWeatherService;
|
||||
|
||||
/**
|
||||
* 查询天气信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DklWeather dklWeather)
|
||||
{
|
||||
startPage();
|
||||
List<DklWeather> list = dklWeatherService.selectDklWeatherList(dklWeather);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出天气信息列表
|
||||
*/
|
||||
@Log(title = "天气信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DklWeather dklWeather)
|
||||
{
|
||||
List<DklWeather> list = dklWeatherService.selectDklWeatherList(dklWeather);
|
||||
ExcelUtil<DklWeather> util = new ExcelUtil<DklWeather>(DklWeather.class);
|
||||
util.exportExcel(response, list, "天气信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取天气信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(dklWeatherService.selectDklWeatherById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增天气信息
|
||||
*/
|
||||
@Log(title = "天气信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DklWeather dklWeather)
|
||||
{
|
||||
return toAjax(dklWeatherService.insertDklWeather(dklWeather));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改天气信息
|
||||
*/
|
||||
@Log(title = "天气信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DklWeather dklWeather)
|
||||
{
|
||||
return toAjax(dklWeatherService.updateDklWeather(dklWeather));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除天气信息
|
||||
*/
|
||||
@Log(title = "天气信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(dklWeatherService.deleteDklWeatherByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
package com.dkl.large.controller.screen;
|
||||
|
||||
import com.koal.kms.sdk.ed.KmsSdkException;
|
||||
import com.dkl.common.annotation.DataScope;
|
||||
import com.dkl.common.core.controller.BaseController;
|
||||
import com.dkl.common.core.page.TableDataInfo;
|
||||
import com.dkl.large.domain.*;
|
||||
import com.dkl.large.domain.vo.*;
|
||||
import com.dkl.large.service.*;
|
||||
import com.dkl.large.service.IDklActivityService;
|
||||
import com.dkl.large.service.IDklMonitoringPointsService;
|
||||
import com.dkl.large.service.IDklSecurityEquipmentService;
|
||||
import com.dkl.large.service.IDklSecurityPersonnelService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏Controller
|
||||
*
|
||||
* @author Dkl
|
||||
* @date 2025-05-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/large/screen")
|
||||
public class ScreenController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDklActivityService dklActivityService;
|
||||
|
||||
@Autowired
|
||||
private IDklSecurityEquipmentService dklSecurityEquipmentService;
|
||||
|
||||
@Autowired
|
||||
private IDklSecurityPersonnelService dklSecurityPersonnelService;
|
||||
|
||||
@Autowired
|
||||
private IDklMonitoringPointsService dklMonitoringPointsService;
|
||||
|
||||
@Autowired
|
||||
private IDklWarningInformationService iDklWarningInformationService;
|
||||
|
||||
@Autowired
|
||||
private IDklMonitoringCameraService dklMonitoringCameraService;
|
||||
/**
|
||||
* 获取所有活动点位
|
||||
*/
|
||||
@GetMapping("/ativityMap")
|
||||
public TableDataInfo list(DklActivity dklActivity) throws KmsSdkException {
|
||||
dklActivity.setDelFlag("0");
|
||||
List<DklActivity> list = dklActivityService.selectDklActivityList(dklActivity);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :大屏预警信息统计
|
||||
* @Date :2025/06/09 10:22
|
||||
* @Param :[]
|
||||
* @return :java.util.List<com.dkl.large.domain.DklActivity>
|
||||
**/
|
||||
@GetMapping("/ativityEarlyWarning")
|
||||
public TableDataInfo ativityEarlyWarning(DklActivity dklActivity)
|
||||
{
|
||||
List<DklActivity> list = dklActivityService.ativityEarlyWarning(dklActivity);
|
||||
return getDataTable(list);
|
||||
}
|
||||
// /**
|
||||
// * @Author :rq
|
||||
// * @Description :大屏重点场所热力图/景区热力图
|
||||
// * @Date :2025/06/09 10:22
|
||||
// * @Param :[]
|
||||
// * @return :java.util.List<com.dkl.large.domain.DklActivity>
|
||||
// **/
|
||||
// @GetMapping("/thermogramStatistics")
|
||||
// public TableDataInfo thermogramStatistics(DklActivity dklActivity)
|
||||
// {
|
||||
// List<DklActivity> list = dklActivityService.thermogramStatistics(dklActivity);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :预警信息点位
|
||||
* @Date :2025/06/18 09:35
|
||||
* @Param :[dklWarningInformation]
|
||||
* @return :com.dkl.common.core.page.TableDataInfo
|
||||
**/
|
||||
|
||||
@GetMapping("/warningMapList")
|
||||
public TableDataInfo warningMapList(DklWarningInformation dklWarningInformation)
|
||||
{
|
||||
dklWarningInformation.setDelFlag("0");
|
||||
dklWarningInformation.setWarningStatus("1");
|
||||
List<DklWarningInformation> list = iDklWarningInformationService.selectDklWarningInformationLists(dklWarningInformation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @Author :rq
|
||||
// * @Description :大客流总数区域展示
|
||||
// * @Date :2025/06/09 15:42
|
||||
// * @Param :[dklActivity]
|
||||
// * @return :java.util.List<com.dkl.large.domain.DklActivity>
|
||||
// **/
|
||||
// @GetMapping("/regionalStatistics")
|
||||
// public TableDataInfo regionalStatistics(DklActivity dklActivity)
|
||||
// {
|
||||
// List<DklActivity> list = dklActivityService.regionalStatistics(dklActivity);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
|
||||
/**
|
||||
* @Author :Falling
|
||||
* @Description :安保力量点位(物)
|
||||
* @Date :2025/06/16
|
||||
* @Param :[dklSecurityEquipment]
|
||||
* @return :java.util.List<com.dkl.large.domain.dklSecurityEquipment>
|
||||
**/
|
||||
@GetMapping("/equipmentList")
|
||||
public TableDataInfo equipmentMapList(DklSecurityEquipment dklSecurityEquipment) throws KmsSdkException {
|
||||
dklSecurityEquipment.setDelFlag("0");
|
||||
List<DklSecurityEquipment> list = dklSecurityEquipmentService.selectDklSecurityEquipmentList(dklSecurityEquipment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :Falling
|
||||
* @Description :安保力量点位(人员)
|
||||
* @Date :2025/06/16
|
||||
* @Param :[dklSecurityPersonnel]
|
||||
* @return :java.util.List<com.dkl.large.domain.dklSecurityPersonnel>
|
||||
**/
|
||||
@GetMapping("/personnelList")
|
||||
public TableDataInfo personnelMapList(DklSecurityPersonnel dklSecurityPersonnel) throws KmsSdkException {
|
||||
dklSecurityPersonnel.setDelFlag("0");
|
||||
List<DklSecurityPersonnel> list = dklSecurityPersonnelService.selectDklSecurityPersonnelList(dklSecurityPersonnel);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author :Falling
|
||||
* @Description :监控点点位
|
||||
* @Date :2025/06/16
|
||||
* @Param :[dklMonitoringPoints]
|
||||
* @return :java.util.List<com.dkl.large.domain.dklMonitoringPoints>
|
||||
**/
|
||||
@GetMapping("/pointsMap")
|
||||
public TableDataInfo pointsMapList(DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException {
|
||||
dklMonitoringPoints.setDelFlag("0");
|
||||
List<DklMonitoringPoints> list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author :Falling
|
||||
* @Description :热力图(重点场所/交通枢纽/景区)
|
||||
* @Date :2025/06/16
|
||||
* @Param :[dataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
@GetMapping("/heatMap")
|
||||
public TableDataInfo heatMap(HeatVo dataVo)
|
||||
{
|
||||
List<HeatVo> list = dklMonitoringPointsService.heatMap(dataVo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :Falling
|
||||
* @Description :大客流总数区域展示
|
||||
* @Date :2025/06/18
|
||||
* @Param :[RegionalVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.RegionalVo>
|
||||
**/
|
||||
@GetMapping("/regionalStatistics")
|
||||
public TableDataInfo regionalStatistics(RegionalVo regionalVo)
|
||||
{
|
||||
List<RegionalVo> list = dklMonitoringPointsService.regionalStatistics(regionalVo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author :Falling
|
||||
* @Description :大客流总数区域数据展示
|
||||
* @Date :2025/06/18
|
||||
* @Param :[RegionalVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.DklMonitoringCameraData>
|
||||
**/
|
||||
@GetMapping("/regionalDataList")
|
||||
public TableDataInfo regionalDataList(RegionalVo regionalVo) throws KmsSdkException {
|
||||
startPage();
|
||||
List<DklMonitoringPoints> list = dklMonitoringPointsService.regionalDataList(regionalVo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :Falling
|
||||
* @Description :大客流风险预警信息
|
||||
* @Date :2025/06/18
|
||||
* @Param :[RegionalVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.DklMonitoringCameraData>
|
||||
**/
|
||||
@GetMapping("/riskDataList")
|
||||
public TableDataInfo riskDataList(RiskVo riskVo)
|
||||
{
|
||||
List<RiskVo> list = dklMonitoringPointsService.riskDataList(riskVo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description : 大屏部门下拉框展示
|
||||
* @Date :2025/07/07 16:10
|
||||
* @Param :[DeptWwsVo]
|
||||
* @return :com.dkl.common.core.page.TableDataInfo
|
||||
**/
|
||||
@GetMapping("/getDeptOfWws")
|
||||
public TableDataInfo getDeptOfWws()
|
||||
{
|
||||
List<DeptWwsVo> list = dklMonitoringCameraService.getDeptOfWws();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description : 获取视频url
|
||||
* @Date :2025/07/07 16:17
|
||||
* @Param :[DeptWwsVo]
|
||||
* @return :com.dkl.common.core.page.TableDataInfo
|
||||
**/
|
||||
@GetMapping("/getDeptOfWwsUrl")
|
||||
public TableDataInfo getDeptOfWwsUrl(DeptWwsVo deptWwsVo) throws Exception {
|
||||
List<DeptWwsVo> list = dklMonitoringCameraService.getDeptOfWwsUrl(deptWwsVo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.dkl.large.controller.screen;
|
||||
|
||||
import com.dkl.common.core.controller.BaseController;
|
||||
import com.dkl.common.core.domain.AjaxResult;
|
||||
import com.dkl.common.core.page.TableDataInfo;
|
||||
import com.dkl.large.domain.*;
|
||||
import com.dkl.large.domain.vo.HeatVo;
|
||||
import com.dkl.large.domain.vo.RegionalVo;
|
||||
import com.dkl.large.domain.vo.RiskVo;
|
||||
import com.dkl.large.service.*;
|
||||
import com.dkl.large.utli.GetCameraPreviewURL;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏Controller
|
||||
*
|
||||
* @author Dkl
|
||||
* @date 2025-05-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/large/xlvideo")
|
||||
public class XueliangVideoController extends BaseController
|
||||
{
|
||||
|
||||
@GetMapping("/videoWws")
|
||||
public AjaxResult riskDataList(RegionalVo regionalVo) throws Exception {
|
||||
String wwsurl= GetCameraPreviewURL.GetCameraPreviewURL(regionalVo.getTypeinfo());
|
||||
return AjaxResult.success(wwsurl);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.dkl.large.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.dkl.common.annotation.Excel;
|
||||
import com.dkl.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 天气信息对象 dkl_weather
|
||||
*
|
||||
* @author Dkl
|
||||
* @date 2025-11-03
|
||||
*/
|
||||
@Data
|
||||
public class DklWeather extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 日期 */
|
||||
@Excel(name = "日期")
|
||||
private String weatherDate;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String weatherTypes;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package com.dkl.large.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.dkl.large.domain.DklMonitoringCamera;
|
||||
import com.dkl.large.domain.vo.DeptWwsVo;
|
||||
|
||||
/**
|
||||
* 监控点摄像头信息Mapper接口
|
||||
*
|
||||
* @author Dkl
|
||||
* @date 2025-06-10
|
||||
*/
|
||||
public interface DklMonitoringCameraMapper
|
||||
{
|
||||
/**
|
||||
* 查询监控点摄像头信息
|
||||
*
|
||||
* @param id 监控点摄像头信息主键
|
||||
* @return 监控点摄像头信息
|
||||
*/
|
||||
public DklMonitoringCamera selectDklMonitoringCameraById(Long id);
|
||||
|
||||
public DklMonitoringCamera selectDklMonitoringCameraByPath(String path); /**
|
||||
* 查询监控点摄像头信息列表
|
||||
*
|
||||
* @param dklMonitoringCamera 监控点摄像头信息
|
||||
* @return 监控点摄像头信息集合
|
||||
*/
|
||||
public List<DklMonitoringCamera> selectDklMonitoringCameraList(DklMonitoringCamera dklMonitoringCamera);
|
||||
|
||||
/**
|
||||
* 新增监控点摄像头信息
|
||||
*
|
||||
* @param dklMonitoringCamera 监控点摄像头信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDklMonitoringCamera(DklMonitoringCamera dklMonitoringCamera);
|
||||
|
||||
/**
|
||||
* 修改监控点摄像头信息
|
||||
*
|
||||
* @param dklMonitoringCamera 监控点摄像头信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDklMonitoringCamera(DklMonitoringCamera dklMonitoringCamera);
|
||||
|
||||
/**
|
||||
* 删除监控点摄像头信息
|
||||
*
|
||||
* @param id 监控点摄像头信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDklMonitoringCameraById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除监控点摄像头信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDklMonitoringCameraByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :监控点摄像头数量
|
||||
* @Date :2025/06/12 11:14
|
||||
* @Param :[]
|
||||
* @return :java.lang.String
|
||||
**/
|
||||
public String getDklMonitoringCameraCount();
|
||||
/**
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.RiskVo>
|
||||
* @Author :rq
|
||||
* @Description :大屏部门下拉框展示
|
||||
* @Date :2025/07/07 16:15
|
||||
* @Param :[]
|
||||
**/
|
||||
public List<DeptWwsVo> getDeptOfWws();
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取视频url
|
||||
* @Date :2025/07/07 16:15
|
||||
* @Param :[]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.RiskVo>
|
||||
**/
|
||||
public List<DeptWwsVo> getDeptOfWwsUrl(DeptWwsVo deptWwsVo);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.dkl.large.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.dkl.large.domain.DklSecurityPersonnel;
|
||||
|
||||
/**
|
||||
* 安保力量(人员)Mapper接口
|
||||
*
|
||||
* @author Falling
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
public interface DklSecurityPersonnelMapper
|
||||
{
|
||||
/**
|
||||
* 查询安保力量(人员)
|
||||
*
|
||||
* @param id 安保力量(人员)主键
|
||||
* @return 安保力量(人员)
|
||||
*/
|
||||
public DklSecurityPersonnel selectDklSecurityPersonnelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询安保力量(人员)列表
|
||||
*
|
||||
* @param dklSecurityPersonnel 安保力量(人员)
|
||||
* @return 安保力量(人员)集合
|
||||
*/
|
||||
public List<DklSecurityPersonnel> selectDklSecurityPersonnelList(DklSecurityPersonnel dklSecurityPersonnel);
|
||||
|
||||
/**
|
||||
* 新增安保力量(人员)
|
||||
*
|
||||
* @param dklSecurityPersonnel 安保力量(人员)
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDklSecurityPersonnel(DklSecurityPersonnel dklSecurityPersonnel);
|
||||
|
||||
/**
|
||||
* 修改安保力量(人员)
|
||||
*
|
||||
* @param dklSecurityPersonnel 安保力量(人员)
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDklSecurityPersonnel(DklSecurityPersonnel dklSecurityPersonnel);
|
||||
|
||||
/**
|
||||
* 删除安保力量(人员)
|
||||
*
|
||||
* @param id 安保力量(人员)主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDklSecurityPersonnelById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除安保力量(人员)
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDklSecurityPersonnelByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.dkl.large.mapper;
|
||||
|
||||
import com.dkl.large.domain.DklWeather;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 天气信息Mapper接口
|
||||
*
|
||||
* @author Dkl
|
||||
* @date 2025-11-03
|
||||
*/
|
||||
public interface DklWeatherMapper
|
||||
{
|
||||
/**
|
||||
* 查询天气信息
|
||||
*
|
||||
* @param id 天气信息主键
|
||||
* @return 天气信息
|
||||
*/
|
||||
public DklWeather selectDklWeatherById(Long id);
|
||||
|
||||
/**
|
||||
* 查询天气信息列表
|
||||
*
|
||||
* @param dklWeather 天气信息
|
||||
* @return 天气信息集合
|
||||
*/
|
||||
public List<DklWeather> selectDklWeatherList(DklWeather dklWeather);
|
||||
|
||||
/**
|
||||
* 新增天气信息
|
||||
*
|
||||
* @param dklWeather 天气信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDklWeather(DklWeather dklWeather);
|
||||
|
||||
/**
|
||||
* 修改天气信息
|
||||
*
|
||||
* @param dklWeather 天气信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDklWeather(DklWeather dklWeather);
|
||||
|
||||
/**
|
||||
* 删除天气信息
|
||||
*
|
||||
* @param id 天气信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDklWeatherById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除天气信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDklWeatherByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.dkl.large.mapper;
|
||||
|
||||
|
||||
import com.dkl.large.domain.KafkaMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author express
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface KafkaMessageMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public KafkaMessage selectKafkaMessageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param kafkaMessage 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<KafkaMessage> selectKafkaMessageList(KafkaMessage kafkaMessage);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param kafkaMessage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertKafkaMessage(KafkaMessage kafkaMessage);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param kafkaMessage 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateKafkaMessage(KafkaMessage kafkaMessage);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKafkaMessageById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKafkaMessageByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.dkl.large.mapper;
|
||||
|
||||
import com.dkl.large.domain.VideoStorageInformation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* VideoStorageInformationMapper接口
|
||||
*
|
||||
* @author JK
|
||||
* @date 2025-05-30
|
||||
*/
|
||||
public interface VideoStorageInformationMapper
|
||||
{
|
||||
/**
|
||||
* 查询VideoStorageInformation
|
||||
*
|
||||
* @param id VideoStorageInformation主键
|
||||
* @return VideoStorageInformation
|
||||
*/
|
||||
public VideoStorageInformation selectVideoStorageInformationById(int id);
|
||||
|
||||
/**
|
||||
* 查询VideoStorageInformation列表
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return VideoStorageInformation集合
|
||||
*/
|
||||
public List<VideoStorageInformation> selectVideoStorageInformationList(VideoStorageInformation videoStorageInformation);
|
||||
|
||||
/**
|
||||
* 新增VideoStorageInformation
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertVideoStorageInformation(VideoStorageInformation videoStorageInformation);
|
||||
|
||||
/**
|
||||
* 修改VideoStorageInformation
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateVideoStorageInformation(VideoStorageInformation videoStorageInformation);
|
||||
|
||||
/**
|
||||
* 删除VideoStorageInformation
|
||||
*
|
||||
* @param id VideoStorageInformation主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVideoStorageInformationById(int id);
|
||||
|
||||
/**
|
||||
* 批量删除VideoStorageInformation
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVideoStorageInformationByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :监控点摄像头数量
|
||||
* @Date :2025/06/13 11:14
|
||||
* @Param :[]
|
||||
* @return :java.lang.String
|
||||
**/
|
||||
public String getVideoStorageInformationCount();
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.dkl.large.service;
|
||||
|
||||
import com.dkl.large.domain.DklWeather;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 天气信息Service接口
|
||||
*
|
||||
* @author Dkl
|
||||
* @date 2025-11-03
|
||||
*/
|
||||
public interface IDklWeatherService
|
||||
{
|
||||
/**
|
||||
* 查询天气信息
|
||||
*
|
||||
* @param id 天气信息主键
|
||||
* @return 天气信息
|
||||
*/
|
||||
public DklWeather selectDklWeatherById(Long id);
|
||||
|
||||
/**
|
||||
* 查询天气信息列表
|
||||
*
|
||||
* @param dklWeather 天气信息
|
||||
* @return 天气信息集合
|
||||
*/
|
||||
public List<DklWeather> selectDklWeatherList(DklWeather dklWeather);
|
||||
|
||||
/**
|
||||
* 新增天气信息
|
||||
*
|
||||
* @param dklWeather 天气信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDklWeather(DklWeather dklWeather);
|
||||
|
||||
/**
|
||||
* 修改天气信息
|
||||
*
|
||||
* @param dklWeather 天气信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDklWeather(DklWeather dklWeather);
|
||||
|
||||
/**
|
||||
* 批量删除天气信息
|
||||
*
|
||||
* @param ids 需要删除的天气信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDklWeatherByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除天气信息信息
|
||||
*
|
||||
* @param id 天气信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDklWeatherById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.dkl.large.service;
|
||||
|
||||
import com.dkl.large.domain.DklMonitoringPoints;
|
||||
import com.dkl.large.domain.vo.DklMonitoringCameraDataVo;
|
||||
import com.dkl.large.mapper.DklMonitoringPointsMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IMonitoringStatisticsService {
|
||||
|
||||
|
||||
/*
|
||||
* 1.总监控点位 总摄像头 总检测数据条数 总捕获人次
|
||||
* 2.所有点位信息
|
||||
* 3.获取数据条数
|
||||
* 4.获取数据人数
|
||||
* */
|
||||
public Map amountStatistics();
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取数据人数 时间段内
|
||||
* @Date :2025/06/12 13:33
|
||||
* @Param :[dklMonitoringCameraDataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
List<DklMonitoringCameraDataVo> peopleDataStatistics (DklMonitoringCameraDataVo dklMonitoringCameraDataVo);
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取数据条数 时间段内
|
||||
* @Date :2025/06/1 13:33
|
||||
* @Param :[dklMonitoringCameraDataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
List<DklMonitoringCameraDataVo> itemsDataStatistics (DklMonitoringCameraDataVo dklMonitoringCameraDataVo);
|
||||
|
||||
|
||||
/*
|
||||
* 1.总监控点位 总摄像头 总检测数据条数 总捕获人次
|
||||
* 2.所有点位信息
|
||||
* 3.获取数据条数
|
||||
* 4.获取数据人数
|
||||
* */
|
||||
public Map amountStatisticsByActivity();
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取数据人数 时间段内
|
||||
* @Date :2025/06/13 13:33
|
||||
* @Param :[dklMonitoringCameraDataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
List<DklMonitoringCameraDataVo> peopleDataStatisticsByActivity (DklMonitoringCameraDataVo dklMonitoringCameraDataVo);
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取数据条数 时间段内
|
||||
* @Date :2025/06/13 13:33
|
||||
* @Param :[dklMonitoringCameraDataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
List<DklMonitoringCameraDataVo> itemsDataStatisticsByActivity (DklMonitoringCameraDataVo dklMonitoringCameraDataVo);
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.dkl.large.service;
|
||||
|
||||
import com.dkl.large.domain.DklActivity;
|
||||
import com.dkl.large.domain.VideoStorageInformation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* VideoStorageInformationService接口
|
||||
*
|
||||
* @author JK
|
||||
* @date 2025-05-30
|
||||
*/
|
||||
public interface IVideoStorageInformationService
|
||||
{
|
||||
/**
|
||||
* 查询VideoStorageInformation
|
||||
*
|
||||
* @param id VideoStorageInformation主键
|
||||
* @return VideoStorageInformation
|
||||
*/
|
||||
public VideoStorageInformation selectVideoStorageInformationById(int id);
|
||||
|
||||
/**
|
||||
* 查询VideoStorageInformation列表
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return VideoStorageInformation集合
|
||||
*/
|
||||
public List<VideoStorageInformation> selectVideoStorageInformationList(VideoStorageInformation videoStorageInformation);
|
||||
|
||||
/**
|
||||
* 新增VideoStorageInformation
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertVideoStorageInformation(VideoStorageInformation videoStorageInformation);
|
||||
|
||||
/**
|
||||
* 修改VideoStorageInformation
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateVideoStorageInformation(VideoStorageInformation videoStorageInformation);
|
||||
|
||||
/**
|
||||
* 批量删除VideoStorageInformation
|
||||
*
|
||||
* @param ids 需要删除的VideoStorageInformation主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVideoStorageInformationByIds(int[] ids);
|
||||
|
||||
/**
|
||||
* 删除VideoStorageInformation信息
|
||||
*
|
||||
* @param id VideoStorageInformation主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVideoStorageInformationById(int id);
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param videoStorageInformationList 数据列表
|
||||
* @param operName 操作用户
|
||||
* @return 结果
|
||||
*/
|
||||
public String importDate(List<VideoStorageInformation> videoStorageInformationList, String operName);
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
package com.dkl.large.service.impl;
|
||||
|
||||
import com.dkl.large.domain.DklActivity;
|
||||
import com.dkl.large.domain.vo.DklMonitoringCameraDataVo;
|
||||
import com.dkl.large.mapper.*;
|
||||
import com.dkl.large.service.IMonitoringStatisticsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class MonitoringStatisticsServiceImpl implements IMonitoringStatisticsService {
|
||||
|
||||
@Autowired
|
||||
private DklMonitoringPointsMapper dklMonitoringPointsMapper;
|
||||
@Autowired
|
||||
private DklMonitoringCameraMapper dklMonitoringCameraMapper;
|
||||
@Autowired
|
||||
private DklMonitoringCameraDataMapper dklMonitoringCameraDataMapper;
|
||||
|
||||
@Autowired
|
||||
private DklActivityMapper dklActivityMapper;
|
||||
@Autowired
|
||||
private VideoStorageInformationMapper videoStorageInformationMapper;
|
||||
@Autowired
|
||||
private DklVideoDataMapper dklVideoDataMapper;
|
||||
@Override
|
||||
public Map amountStatistics() {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
//获取所有监测点
|
||||
map.put("allPoint",dklMonitoringPointsMapper.getDklMonitoringPointsCount());
|
||||
//获取所有监测点摄像头
|
||||
map.put("allPointCamera",dklMonitoringCameraMapper.getDklMonitoringCameraCount());
|
||||
// //获取所有监测点摄像头数据
|
||||
// map.put("allPointCameraData",dklMonitoringCameraDataMapper.getDklMonitoringCameraDataCount());
|
||||
// //获取所有监测点摄像头数据
|
||||
// map.put("allNumberpeople",dklMonitoringCameraDataMapper.getDklMonitoringCameraDataPeopleCount());
|
||||
//获取活动数量
|
||||
map.put("allPointCameraData",dklActivityMapper.getActivityCount());
|
||||
//获取所活动监控数量
|
||||
map.put("allNumberpeople",videoStorageInformationMapper.getVideoStorageInformationCount());
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取数据人数 时间段内
|
||||
* @Date :2025/06/12 13:33
|
||||
* @Param :[dklMonitoringCameraDataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
@Override
|
||||
public List<DklMonitoringCameraDataVo> peopleDataStatistics(DklMonitoringCameraDataVo dklMonitoringCameraDataVo) {
|
||||
return dklMonitoringCameraDataMapper.peopleDataStatistics(dklMonitoringCameraDataVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取数据条数 时间段内
|
||||
* @Date :2025/06/12 13:33
|
||||
* @Param :[dklMonitoringCameraDataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
@Override
|
||||
public List<DklMonitoringCameraDataVo> itemsDataStatistics(DklMonitoringCameraDataVo dklMonitoringCameraDataVo) {
|
||||
return dklMonitoringCameraDataMapper.itemsDataStatistics(dklMonitoringCameraDataVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map amountStatisticsByActivity() {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
//获取所有监测点
|
||||
map.put("allPoint",dklActivityMapper.getActivityCount());
|
||||
//获取所有监测点摄像头
|
||||
map.put("allPointCamera",videoStorageInformationMapper.getVideoStorageInformationCount());
|
||||
//获取所有监测点摄像头数据
|
||||
map.put("allPointCameraData",dklVideoDataMapper.getDklVideoDataCount());
|
||||
//获取所有监测点摄像头数据
|
||||
map.put("allNumberpeople",dklVideoDataMapper.getDklVideoDataPeopleCount());
|
||||
//获取所有监测点摄像头检查的
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取数据人数 时间段内
|
||||
* @Date :2025/06/13 13:33
|
||||
* @Param :[dklMonitoringCameraDataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
@Override
|
||||
public List<DklMonitoringCameraDataVo> peopleDataStatisticsByActivity(DklMonitoringCameraDataVo dklMonitoringCameraDataVo) {
|
||||
return dklVideoDataMapper.peopleDataStatisticsByActivity(dklMonitoringCameraDataVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author :rq
|
||||
* @Description :获取数据条数 时间段内
|
||||
* @Date :2025/06/13 13:33
|
||||
* @Param :[dklMonitoringCameraDataVo]
|
||||
* @return :java.util.List<com.dkl.large.domain.vo.DklMonitoringCameraDataVo>
|
||||
**/
|
||||
@Override
|
||||
public List<DklMonitoringCameraDataVo> itemsDataStatisticsByActivity(DklMonitoringCameraDataVo dklMonitoringCameraDataVo) {
|
||||
return dklVideoDataMapper.itemsDataStatisticsByActivity(dklMonitoringCameraDataVo);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,275 @@
|
|||
package com.dkl.large.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.dkl.common.annotation.DataScope;
|
||||
import com.dkl.common.core.domain.entity.SysDictData;
|
||||
import com.dkl.common.exception.ServiceException;
|
||||
import com.dkl.common.utils.DateUtils;
|
||||
import com.dkl.common.utils.StringUtils;
|
||||
import com.dkl.large.domain.DklActivity;
|
||||
import com.dkl.large.domain.VideoStorageInformation;
|
||||
import com.dkl.large.mapper.DklActivityMapper;
|
||||
import com.dkl.large.mapper.VideoStorageInformationMapper;
|
||||
import com.dkl.large.service.IVideoStorageInformationService;
|
||||
import com.dkl.system.mapper.SysDictDataMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import static com.dkl.common.utils.SecurityUtils.getDeptId;
|
||||
import static com.dkl.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
|
||||
/**
|
||||
* VideoStorageInformationService业务层处理
|
||||
*
|
||||
* @author JK
|
||||
* @date 2025-05-30
|
||||
*/
|
||||
@Service
|
||||
public class VideoStorageInformationServiceImpl implements IVideoStorageInformationService
|
||||
{
|
||||
@Autowired
|
||||
private VideoStorageInformationMapper videoStorageInformationMapper;
|
||||
//经度
|
||||
private static final String LNG_REGEX = "^-?\\d{1,3}(\\.\\d+)?$";
|
||||
//维度
|
||||
private static final String LAT_REGEX = "^-?\\d{1,2}(\\.\\d+)?$";
|
||||
@Autowired
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
|
||||
@Autowired
|
||||
private DklActivityMapper dklActivityMapper;
|
||||
/**
|
||||
* 查询VideoStorageInformation
|
||||
*
|
||||
* @param id VideoStorageInformation主键
|
||||
* @return VideoStorageInformation
|
||||
*/
|
||||
@Override
|
||||
public VideoStorageInformation selectVideoStorageInformationById(int id)
|
||||
{
|
||||
return videoStorageInformationMapper.selectVideoStorageInformationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询VideoStorageInformation列表
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return VideoStorageInformation
|
||||
*/
|
||||
@Override
|
||||
public List<VideoStorageInformation> selectVideoStorageInformationList(VideoStorageInformation videoStorageInformation)
|
||||
{
|
||||
return videoStorageInformationMapper.selectVideoStorageInformationList(videoStorageInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增VideoStorageInformation
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertVideoStorageInformation(VideoStorageInformation videoStorageInformation)
|
||||
{
|
||||
return videoStorageInformationMapper.insertVideoStorageInformation(videoStorageInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改VideoStorageInformation
|
||||
*
|
||||
* @param videoStorageInformation VideoStorageInformation
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateVideoStorageInformation(VideoStorageInformation videoStorageInformation)
|
||||
{
|
||||
return videoStorageInformationMapper.updateVideoStorageInformation(videoStorageInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除VideoStorageInformation
|
||||
*
|
||||
* @param ids 需要删除的VideoStorageInformation主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteVideoStorageInformationByIds(int[] ids)
|
||||
{
|
||||
return videoStorageInformationMapper.deleteVideoStorageInformationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除VideoStorageInformation信息
|
||||
*
|
||||
* @param id VideoStorageInformation主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteVideoStorageInformationById(int id)
|
||||
{
|
||||
return videoStorageInformationMapper.deleteVideoStorageInformationById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importDate(List<VideoStorageInformation> videoStorageInformationList, String operName) {
|
||||
//类型集合
|
||||
List<SysDictData> areaDict=sysDictDataMapper.selectDictDataByType("monitoring_type");
|
||||
DklActivity dklActivity = new DklActivity();
|
||||
dklActivity.setDelFlag("0");
|
||||
//活动集合
|
||||
List<DklActivity> dklActivityList=dklActivityMapper.selectDklActivityList(dklActivity);
|
||||
if (StringUtils.isNull(videoStorageInformationList) || videoStorageInformationList.size() == 0) {
|
||||
throw new ServiceException("导入数据不能为空!");
|
||||
}
|
||||
int successNum = 0;
|
||||
int failureNum = 0;
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
for (int i = 0; i < videoStorageInformationList.size(); i++) {
|
||||
try
|
||||
{
|
||||
//活动名称
|
||||
if (StringUtils.isEmpty(videoStorageInformationList.get(i).getName())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据名称为空");
|
||||
}else{
|
||||
if (videoStorageInformationList.get(i).getName().length()>=30){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据名称长度过长");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//类型
|
||||
if (StringUtils.isEmpty(videoStorageInformationList.get(i).getTypesName())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1)+ "条数据类型为空");
|
||||
}else{
|
||||
if (videoStorageInformationList.get(i).getTypesName().length()>=30){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" +(i+1) + "条数据类型过长");
|
||||
}else{
|
||||
for (SysDictData sysDictData : areaDict) {
|
||||
if (sysDictData.getDictLabel().equals(videoStorageInformationList.get(i).getTypesName())) {
|
||||
videoStorageInformationList.get(i).setTypes(sysDictData.getDictValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(videoStorageInformationList.get(i).getTypes())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" +(i+1) + "条数据类型未找到");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//重点日标识
|
||||
if (StringUtils.isEmpty(videoStorageInformationList.get(i).getFilePath())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据文件地址为空");
|
||||
}else{
|
||||
if (videoStorageInformationList.get(i).getFilePath().length()>=30){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" +(i+1)+ "条数据文件地址长度过长");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//经度
|
||||
if (StringUtils.isEmpty(videoStorageInformationList.get(i).getLng())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据经度为空");
|
||||
}else{
|
||||
if (videoStorageInformationList.get(i).getLng().length()>=30){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据经度长度过长");
|
||||
}else if (!Pattern.matches(LNG_REGEX, videoStorageInformationList.get(i).getLng())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据值经度有误");
|
||||
}
|
||||
}
|
||||
|
||||
//纬度
|
||||
if (StringUtils.isEmpty(videoStorageInformationList.get(i).getLat())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据纬度为空");
|
||||
}else{
|
||||
if (videoStorageInformationList.get(i).getLat().length()>=30){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据纬度长度过长");
|
||||
}else if (!Pattern.matches(LAT_REGEX, videoStorageInformationList.get(i).getLat())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据值纬度有误");
|
||||
}
|
||||
}
|
||||
|
||||
//地址
|
||||
if (StringUtils.isEmpty(videoStorageInformationList.get(i).getAddress())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1)+ "条数据地址为空");
|
||||
}else{
|
||||
if (videoStorageInformationList.get(i).getAddress().length()>=30){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1) + "条数据地址长度过长");
|
||||
}
|
||||
}
|
||||
//活动
|
||||
if (StringUtils.isEmpty(videoStorageInformationList.get(i).getActivityName())){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" + (i+1)+ "条活动名称为空");
|
||||
}else{
|
||||
if (videoStorageInformationList.get(i).getActivityName().length()>=30){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" +(i+1) + "条活动名称过长");
|
||||
}else{
|
||||
for (DklActivity activity : dklActivityList) {
|
||||
if (activity.getActivityName().equals(videoStorageInformationList.get(i).getActivityName())) {
|
||||
videoStorageInformationList.get(i).setActivityId(activity.getId());
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(Collections.singleton(videoStorageInformationList.get(i).getActivityId()))){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/> 第" +(i+1) + "条活动名称未找到");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "导入失败:";
|
||||
failureMsg.append(msg + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
if (failureNum > 0)
|
||||
{
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
for (VideoStorageInformation videoStorageInformation :videoStorageInformationList){
|
||||
//添加系统信息
|
||||
videoStorageInformation.setDelFlag("0");
|
||||
videoStorageInformation.setCreateTime(new Date());
|
||||
videoStorageInformation.setCreateBy(getUsername());
|
||||
videoStorageInformation.setDeptId(getDeptId());
|
||||
videoStorageInformation.setUpdateTime(new Date());
|
||||
videoStorageInformation.setUpdateBy(getUsername());
|
||||
videoStorageInformationMapper.insertVideoStorageInformation(videoStorageInformation);
|
||||
}
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!");
|
||||
}
|
||||
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue