diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklMonitoringPointsController.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklMonitoringPointsController.java new file mode 100644 index 0000000..b9c8892 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklMonitoringPointsController.java @@ -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 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 list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints); + return getDataTable(list); + } + + @GetMapping("/listOutAll") + public TableDataInfo listOutAll(DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException { + startPage(); + List list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints); + return getDataTable(list); + } + /** + * 导出监控点信息列表 + */ + @Log(title = "监控点信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException { + List list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints); + ExcelUtil util = new ExcelUtil(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 util = new ExcelUtil(DklMonitoringPoints.class); + util.importTemplateExcel(response, "监控点信息数据"); + } + + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file) throws Exception + { + ExcelUtil util = new ExcelUtil(DklMonitoringPoints.class); + List monitoringPointsList = util.importExcel(file.getInputStream()); + String operName = getUsername(); + String message = dklMonitoringPointsService.importDate(monitoringPointsList, operName); + return success(message); + } +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklWeatherController.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklWeatherController.java new file mode 100644 index 0000000..00d298b --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/DklWeatherController.java @@ -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 list = dklWeatherService.selectDklWeatherList(dklWeather); + return getDataTable(list); + } + + /** + * 导出天气信息列表 + */ + @Log(title = "天气信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DklWeather dklWeather) + { + List list = dklWeatherService.selectDklWeatherList(dklWeather); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/screen/ScreenController.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/screen/ScreenController.java new file mode 100644 index 0000000..d9ef9e1 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/screen/ScreenController.java @@ -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 list = dklActivityService.selectDklActivityList(dklActivity); + return getDataTable(list); + } + + /** + * @Author :rq + * @Description :大屏预警信息统计 + * @Date :2025/06/09 10:22 + * @Param :[] + * @return :java.util.List + **/ + @GetMapping("/ativityEarlyWarning") + public TableDataInfo ativityEarlyWarning(DklActivity dklActivity) + { + List list = dklActivityService.ativityEarlyWarning(dklActivity); + return getDataTable(list); + } +// /** +// * @Author :rq +// * @Description :大屏重点场所热力图/景区热力图 +// * @Date :2025/06/09 10:22 +// * @Param :[] +// * @return :java.util.List +// **/ +// @GetMapping("/thermogramStatistics") +// public TableDataInfo thermogramStatistics(DklActivity dklActivity) +// { +// List 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 list = iDklWarningInformationService.selectDklWarningInformationLists(dklWarningInformation); + return getDataTable(list); + } + +// /** +// * @Author :rq +// * @Description :大客流总数区域展示 +// * @Date :2025/06/09 15:42 +// * @Param :[dklActivity] +// * @return :java.util.List +// **/ +// @GetMapping("/regionalStatistics") +// public TableDataInfo regionalStatistics(DklActivity dklActivity) +// { +// List list = dklActivityService.regionalStatistics(dklActivity); +// return getDataTable(list); +// } + + /** + * @Author :Falling + * @Description :安保力量点位(物) + * @Date :2025/06/16 + * @Param :[dklSecurityEquipment] + * @return :java.util.List + **/ + @GetMapping("/equipmentList") + public TableDataInfo equipmentMapList(DklSecurityEquipment dklSecurityEquipment) throws KmsSdkException { + dklSecurityEquipment.setDelFlag("0"); + List list = dklSecurityEquipmentService.selectDklSecurityEquipmentList(dklSecurityEquipment); + return getDataTable(list); + } + + /** + * @Author :Falling + * @Description :安保力量点位(人员) + * @Date :2025/06/16 + * @Param :[dklSecurityPersonnel] + * @return :java.util.List + **/ + @GetMapping("/personnelList") + public TableDataInfo personnelMapList(DklSecurityPersonnel dklSecurityPersonnel) throws KmsSdkException { + dklSecurityPersonnel.setDelFlag("0"); + List list = dklSecurityPersonnelService.selectDklSecurityPersonnelList(dklSecurityPersonnel); + return getDataTable(list); + } + + + /** + * @Author :Falling + * @Description :监控点点位 + * @Date :2025/06/16 + * @Param :[dklMonitoringPoints] + * @return :java.util.List + **/ + @GetMapping("/pointsMap") + public TableDataInfo pointsMapList(DklMonitoringPoints dklMonitoringPoints) throws KmsSdkException { + dklMonitoringPoints.setDelFlag("0"); + List list = dklMonitoringPointsService.selectDklMonitoringPointsList(dklMonitoringPoints); + return getDataTable(list); + } + + + /** + * @Author :Falling + * @Description :热力图(重点场所/交通枢纽/景区) + * @Date :2025/06/16 + * @Param :[dataVo] + * @return :java.util.List + **/ + @GetMapping("/heatMap") + public TableDataInfo heatMap(HeatVo dataVo) + { + List list = dklMonitoringPointsService.heatMap(dataVo); + return getDataTable(list); + } + + /** + * @Author :Falling + * @Description :大客流总数区域展示 + * @Date :2025/06/18 + * @Param :[RegionalVo] + * @return :java.util.List + **/ + @GetMapping("/regionalStatistics") + public TableDataInfo regionalStatistics(RegionalVo regionalVo) + { + List list = dklMonitoringPointsService.regionalStatistics(regionalVo); + return getDataTable(list); + } + + + /** + * @Author :Falling + * @Description :大客流总数区域数据展示 + * @Date :2025/06/18 + * @Param :[RegionalVo] + * @return :java.util.List + **/ + @GetMapping("/regionalDataList") + public TableDataInfo regionalDataList(RegionalVo regionalVo) throws KmsSdkException { + startPage(); + List list = dklMonitoringPointsService.regionalDataList(regionalVo); + return getDataTable(list); + } + + /** + * @Author :Falling + * @Description :大客流风险预警信息 + * @Date :2025/06/18 + * @Param :[RegionalVo] + * @return :java.util.List + **/ + @GetMapping("/riskDataList") + public TableDataInfo riskDataList(RiskVo riskVo) + { + List 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 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 list = dklMonitoringCameraService.getDeptOfWwsUrl(deptWwsVo); + return getDataTable(list); + } + +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/screen/XueliangVideoController.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/screen/XueliangVideoController.java new file mode 100644 index 0000000..1f2bf48 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/controller/screen/XueliangVideoController.java @@ -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); + } + +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/domain/DklWeather.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/domain/DklWeather.java new file mode 100644 index 0000000..6932d1b --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/domain/DklWeather.java @@ -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; + +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklMonitoringCameraMapper.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklMonitoringCameraMapper.java new file mode 100644 index 0000000..ba03e9a --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklMonitoringCameraMapper.java @@ -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 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 + * @Author :rq + * @Description :大屏部门下拉框展示 + * @Date :2025/07/07 16:15 + * @Param :[] + **/ + public List getDeptOfWws(); + /** + * @Author :rq + * @Description :获取视频url + * @Date :2025/07/07 16:15 + * @Param :[] + * @return :java.util.List + **/ + public List getDeptOfWwsUrl(DeptWwsVo deptWwsVo); +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklSecurityPersonnelMapper.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklSecurityPersonnelMapper.java new file mode 100644 index 0000000..c29821e --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklSecurityPersonnelMapper.java @@ -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 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); +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklWeatherMapper.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklWeatherMapper.java new file mode 100644 index 0000000..0c168d5 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/DklWeatherMapper.java @@ -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 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); +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/KafkaMessageMapper.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/KafkaMessageMapper.java new file mode 100644 index 0000000..17c3de9 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/KafkaMessageMapper.java @@ -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 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); +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/VideoStorageInformationMapper.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/VideoStorageInformationMapper.java new file mode 100644 index 0000000..fb0d120 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/mapper/VideoStorageInformationMapper.java @@ -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 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(); +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IDklWeatherService.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IDklWeatherService.java new file mode 100644 index 0000000..f9d6156 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IDklWeatherService.java @@ -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 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); +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IMonitoringStatisticsService.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IMonitoringStatisticsService.java new file mode 100644 index 0000000..9e9e7f4 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IMonitoringStatisticsService.java @@ -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 + **/ + List peopleDataStatistics (DklMonitoringCameraDataVo dklMonitoringCameraDataVo); + + /** + * @Author :rq + * @Description :获取数据条数 时间段内 + * @Date :2025/06/1 13:33 + * @Param :[dklMonitoringCameraDataVo] + * @return :java.util.List + **/ + List 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 + **/ + List peopleDataStatisticsByActivity (DklMonitoringCameraDataVo dklMonitoringCameraDataVo); + + /** + * @Author :rq + * @Description :获取数据条数 时间段内 + * @Date :2025/06/13 13:33 + * @Param :[dklMonitoringCameraDataVo] + * @return :java.util.List + **/ + List itemsDataStatisticsByActivity (DklMonitoringCameraDataVo dklMonitoringCameraDataVo); +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IVideoStorageInformationService.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IVideoStorageInformationService.java new file mode 100644 index 0000000..0a2d806 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/IVideoStorageInformationService.java @@ -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 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 videoStorageInformationList, String operName); +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/impl/MonitoringStatisticsServiceImpl.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/impl/MonitoringStatisticsServiceImpl.java new file mode 100644 index 0000000..e5ccbc0 --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/impl/MonitoringStatisticsServiceImpl.java @@ -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 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 + **/ + @Override + public List peopleDataStatistics(DklMonitoringCameraDataVo dklMonitoringCameraDataVo) { + return dklMonitoringCameraDataMapper.peopleDataStatistics(dklMonitoringCameraDataVo); + } + + /** + * @Author :rq + * @Description :获取数据条数 时间段内 + * @Date :2025/06/12 13:33 + * @Param :[dklMonitoringCameraDataVo] + * @return :java.util.List + **/ + @Override + public List itemsDataStatistics(DklMonitoringCameraDataVo dklMonitoringCameraDataVo) { + return dklMonitoringCameraDataMapper.itemsDataStatistics(dklMonitoringCameraDataVo); + } + + @Override + public Map amountStatisticsByActivity() { + Map 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 + **/ + @Override + public List peopleDataStatisticsByActivity(DklMonitoringCameraDataVo dklMonitoringCameraDataVo) { + return dklVideoDataMapper.peopleDataStatisticsByActivity(dklMonitoringCameraDataVo); + } + + /** + * @Author :rq + * @Description :获取数据条数 时间段内 + * @Date :2025/06/13 13:33 + * @Param :[dklMonitoringCameraDataVo] + * @return :java.util.List + **/ + @Override + public List itemsDataStatisticsByActivity(DklMonitoringCameraDataVo dklMonitoringCameraDataVo) { + return dklVideoDataMapper.itemsDataStatisticsByActivity(dklMonitoringCameraDataVo); + } +} diff --git a/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/impl/VideoStorageInformationServiceImpl.java b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/impl/VideoStorageInformationServiceImpl.java new file mode 100644 index 0000000..0b54f1f --- /dev/null +++ b/Dkl-Vue-master/dkl-large/src/main/java/com/dkl/large/service/impl/VideoStorageInformationServiceImpl.java @@ -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 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 videoStorageInformationList, String operName) { + //类型集合 + List areaDict=sysDictDataMapper.selectDictDataByType("monitoring_type"); + DklActivity dklActivity = new DklActivity(); + dklActivity.setDelFlag("0"); + //活动集合 + List 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("
第" + (i+1) + "条数据名称为空"); + }else{ + if (videoStorageInformationList.get(i).getName().length()>=30){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据名称长度过长"); + } + } + + + //类型 + if (StringUtils.isEmpty(videoStorageInformationList.get(i).getTypesName())){ + failureNum++; + failureMsg.append("
第" + (i+1)+ "条数据类型为空"); + }else{ + if (videoStorageInformationList.get(i).getTypesName().length()>=30){ + failureNum++; + failureMsg.append("
第" +(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("
第" +(i+1) + "条数据类型未找到"); + } + + } + } + + //重点日标识 + if (StringUtils.isEmpty(videoStorageInformationList.get(i).getFilePath())){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据文件地址为空"); + }else{ + if (videoStorageInformationList.get(i).getFilePath().length()>=30){ + failureNum++; + failureMsg.append("
第" +(i+1)+ "条数据文件地址长度过长"); + } + } + + + //经度 + if (StringUtils.isEmpty(videoStorageInformationList.get(i).getLng())){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据经度为空"); + }else{ + if (videoStorageInformationList.get(i).getLng().length()>=30){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据经度长度过长"); + }else if (!Pattern.matches(LNG_REGEX, videoStorageInformationList.get(i).getLng())){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据值经度有误"); + } + } + + //纬度 + if (StringUtils.isEmpty(videoStorageInformationList.get(i).getLat())){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据纬度为空"); + }else{ + if (videoStorageInformationList.get(i).getLat().length()>=30){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据纬度长度过长"); + }else if (!Pattern.matches(LAT_REGEX, videoStorageInformationList.get(i).getLat())){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据值纬度有误"); + } + } + + //地址 + if (StringUtils.isEmpty(videoStorageInformationList.get(i).getAddress())){ + failureNum++; + failureMsg.append("
第" + (i+1)+ "条数据地址为空"); + }else{ + if (videoStorageInformationList.get(i).getAddress().length()>=30){ + failureNum++; + failureMsg.append("
第" + (i+1) + "条数据地址长度过长"); + } + } + //活动 + if (StringUtils.isEmpty(videoStorageInformationList.get(i).getActivityName())){ + failureNum++; + failureMsg.append("
第" + (i+1)+ "条活动名称为空"); + }else{ + if (videoStorageInformationList.get(i).getActivityName().length()>=30){ + failureNum++; + failureMsg.append("
第" +(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("
第" +(i+1) + "条活动名称未找到"); + } + } + } + + } + catch (Exception e) + { + failureNum++; + String msg = "
" + 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(); + } + + +}