20 files modified
1 files added
| | |
| | | import org.sxkj.fw.area.dto.FwAreaDivideDTO; |
| | | import org.sxkj.fw.area.dto.FwAreaDivideStatisticsDTO; |
| | | import org.sxkj.fw.area.entity.FwAreaDivideEntity; |
| | | import org.sxkj.fw.area.param.FwAreaDivideListParam; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideVO; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideStatisticsVO; |
| | | import org.sxkj.fw.area.vo.FwDefenseSceneVO; |
| | |
| | | /** |
| | | * 列表 |
| | | * |
| | | * @param filterSelected |
| | | * @param sceneId |
| | | * @param param |
| | | * @return |
| | | */ |
| | | List<FwAreaDivideVO> selectFwAreaDivideList(@Param("filterSelected") Integer filterSelected, |
| | | @Param("sceneId") Long sceneId, |
| | | @Param("areaTypeKeyList") List<String> areaTypeKeyList, |
| | | @Param("isSetSceneManage") Integer isSetSceneManage, |
| | | @Param("flyTime") java.time.LocalDateTime flyTime); |
| | | List<FwAreaDivideVO> selectFwAreaDivideList(FwAreaDivideListParam param); |
| | | |
| | | /** |
| | | * 根据设备ID获取区域 |
| | |
| | | */ |
| | | List<FwAreaDivideExcel> exportFwAreaDivide(@Param("ew") Wrapper<FwAreaDivideEntity> queryWrapper); |
| | | |
| | | /** |
| | | * |
| | | * @param param |
| | | * @return |
| | | */ |
| | | List<FwAreaDivideVO> selectFwAreaDivideListCockpit(FwAreaDivideListParam param); |
| | | } |
| | |
| | | FROM ja_fw_area_divide ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <select id="selectFwAreaDivideListCockpit" resultType="org.sxkj.fw.area.vo.FwAreaDivideVO"> |
| | | select |
| | | ad.*, |
| | | ps.station_name as police_station_name, |
| | | ps.contact_person as police_station_contact_person, |
| | | ps.contact_phone as police_station_contact_phone |
| | | from ja_fw_area_divide ad |
| | | left join ja_fw_police_station ps on ps.id = ad.police_station_id and ps.is_deleted = 0 |
| | | inner join ( |
| | | SELECT |
| | | d.id |
| | | FROM |
| | | ja_fw_device d |
| | | WHERE |
| | | d.is_deleted = 0 |
| | | AND d.is_enabled = 1 |
| | | AND d.final_outbound_area IS NOT NULL |
| | | <if test="regionCode != null and regionCode != ''"> |
| | | and ( d.final_outbound_area_code like concat(#{regionCode},'%') |
| | | <if test="currentDeptId != null and currentDeptId != '' "> |
| | | or d.id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{currentDeptId} |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | GROUP BY |
| | | d.id |
| | | ) dd on find_in_set(dd.id, ad.device_ids) |
| | | </select> |
| | | |
| | | <insert id="insertWithGeom" parameterType="org.sxkj.fw.area.entity.FwAreaDivideEntity" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into ja_fw_area_divide ( |
| | | id, |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @throws Exception 数据库查询异常 |
| | | */ |
| | | List<Long> selectDeviceId(Long id); |
| | | |
| | | /** |
| | | * |
| | | * @param fwBaseInfo |
| | | * @return |
| | | */ |
| | | List<FwDefenseSceneManageVO> selectFwDefenseSceneManageCockpitList(FwBaseInfo fwBaseInfo); |
| | | } |
| | |
| | | <if test="param2.name != null and param2.name != ''"> |
| | | and dsm.scene_name like concat('%', #{param2.name}, '%') |
| | | </if> |
| | | <if test="param2.deptList != null and param2.deptList.size > 0"> |
| | | and dsm.create_dept in |
| | | <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | WHERE ad.device_ids IS NOT NULL AND ad.device_ids != '' |
| | | </select> |
| | | |
| | | <select id="selectFwDefenseSceneManageCockpitList" resultType="org.sxkj.fw.area.vo.FwDefenseSceneManageVO"> |
| | | select |
| | | dsm.*, |
| | | ds.scene_name as defense_scene_name |
| | | from ja_fw_defense_scene_manage dsm |
| | | left join ja_fw_defense_scene ds on ds.id = dsm.defense_scene_id and ds.is_deleted = 0 |
| | | left join ja_fw_area_divide ad on FIND_IN_SET(ad.id, ds.area_divide_ids) > 0 and ad.is_deleted = 0 |
| | | inner join ( |
| | | SELECT |
| | | d.id |
| | | FROM |
| | | ja_fw_device d |
| | | WHERE |
| | | d.is_deleted = 0 |
| | | AND d.is_enabled = 1 |
| | | AND d.final_outbound_area IS NOT NULL |
| | | <if test="regionCode != null and regionCode != ''"> |
| | | and ( d.final_outbound_area_code like concat(#{regionCode},'%') |
| | | <if test="currentDeptId != null and currentDeptId != '' "> |
| | | or d.id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{currentDeptId} |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | GROUP BY |
| | | d.id |
| | | ) dd on find_in_set(dd.id, ad.device_ids) |
| | | <where> |
| | | dsm.is_deleted = 0 |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.sxkj.fw.area.param; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 区域划分列表查询参数 |
| | | * |
| | | * @author Aix |
| | | * @since 2026-02-04 |
| | | */ |
| | | @Data |
| | | public class FwAreaDivideListParam extends FwBaseInfo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 筛选条件 |
| | | */ |
| | | @ApiModelProperty(value = "筛选条件") |
| | | private Integer filterSelected; |
| | | |
| | | /** |
| | | * 场景ID |
| | | */ |
| | | @ApiModelProperty(value = "场景ID") |
| | | private Long sceneId; |
| | | |
| | | /** |
| | | * 区域类型键值(逗号分隔) |
| | | */ |
| | | @ApiModelProperty(value = "区域类型键值(逗号分隔)") |
| | | private String areaTypeKeys; |
| | | |
| | | /** |
| | | * 是否设置场景管理 |
| | | */ |
| | | @ApiModelProperty(value = "是否设置场景管理") |
| | | private Integer isSetSceneManage; |
| | | |
| | | /** |
| | | * 飞行时间 |
| | | */ |
| | | @ApiModelProperty(value = "飞行时间") |
| | | private LocalDateTime flyTime; |
| | | |
| | | /** |
| | | * 区域类型键值列表 |
| | | */ |
| | | private List<String> areaTypeKeyList; |
| | | |
| | | } |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | |
| | | * @since 2026-01-30 |
| | | */ |
| | | @Data |
| | | public class FwDefenseSceneManagePageParam implements Serializable { |
| | | public class FwDefenseSceneManagePageParam extends FwBaseInfo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | import org.sxkj.fw.area.dto.FwAreaDivideStatisticsDTO; |
| | | import org.sxkj.fw.area.entity.FwAreaDivideEntity; |
| | | import org.sxkj.fw.area.entity.FwAreaDivideExtEntity; |
| | | import org.sxkj.fw.area.param.FwAreaDivideListParam; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideVO; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideStatisticsVO; |
| | | import org.sxkj.fw.area.excel.FwAreaDivideExcel; |
| | |
| | | */ |
| | | boolean saveOrUpdateWithExt(FwAreaDivideEntity fwAreaDivide, List<FwAreaDivideExtEntity> fwAreaDivideExtList); |
| | | |
| | | /** |
| | | * |
| | | * @param param |
| | | * @return |
| | | */ |
| | | List<FwAreaDivideVO> selectFwAreaDivideList(FwAreaDivideListParam param); |
| | | |
| | | } |
| | |
| | | import org.sxkj.fw.area.excel.FwDefenseSceneManageExcel; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | List<Long> selectDeviceId(Long sceneManageId); |
| | | |
| | | /** |
| | | * |
| | | * @param fwBaseInfo |
| | | * @return |
| | | */ |
| | | List<FwDefenseSceneManageVO> selectFwDefenseSceneManageCockpitList(FwBaseInfo fwBaseInfo); |
| | | } |
| | |
| | | import org.sxkj.fw.area.entity.FwAreaDivideExtEntity; |
| | | import org.sxkj.fw.area.excel.FwAreaDivideExcel; |
| | | import org.sxkj.fw.area.mapper.FwAreaDivideMapper; |
| | | import org.sxkj.fw.area.param.FwAreaDivideListParam; |
| | | import org.sxkj.fw.area.service.IFwAreaDivideExtService; |
| | | import org.sxkj.fw.area.service.IFwAreaDivideService; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideExtVO; |
| | |
| | | |
| | | @Override |
| | | public List<FwAreaDivideVO> selectFwAreaDivideList(Integer filterSelected, Long sceneId, String areaTypeKeys, Integer isSetSceneManage, java.time.LocalDateTime flyTime) { |
| | | List<String> areaTypeKeyList = parseAreaTypeKeyList(areaTypeKeys); |
| | | List<FwAreaDivideVO> areaDivideList = baseMapper.selectFwAreaDivideList(filterSelected, sceneId, areaTypeKeyList, isSetSceneManage, flyTime); |
| | | // 创建参数对象 |
| | | FwAreaDivideListParam param = new FwAreaDivideListParam(); |
| | | param.setFilterSelected(filterSelected); |
| | | param.setSceneId(sceneId); |
| | | param.setAreaTypeKeys(areaTypeKeys); |
| | | param.setIsSetSceneManage(isSetSceneManage); |
| | | param.setFlyTime(flyTime); |
| | | // 解析区域类型键值列表 |
| | | param.setAreaTypeKeyList(parseAreaTypeKeyList(areaTypeKeys)); |
| | | |
| | | // 调用Mapper方法,传入参数对象 |
| | | List<FwAreaDivideVO> areaDivideList = baseMapper.selectFwAreaDivideList(param); |
| | | // 获取面数据 |
| | | if (areaDivideList != null && !areaDivideList.isEmpty()) { |
| | | enrichWithExtensionData(areaDivideList); |
| | | } |
| | | return areaDivideList; |
| | | } |
| | | |
| | | /** |
| | | * 区域划分列表查询(对象参数版本) |
| | | * |
| | | * @param param 区域划分列表查询参数 |
| | | * @return 区域划分列表 |
| | | */ |
| | | @Override |
| | | public List<FwAreaDivideVO> selectFwAreaDivideList(FwAreaDivideListParam param) { |
| | | // 调用Mapper方法,传入参数对象 |
| | | List<FwAreaDivideVO> areaDivideList = baseMapper.selectFwAreaDivideListCockpit(param); |
| | | // 获取面数据 |
| | | if (areaDivideList != null && !areaDivideList.isEmpty()) { |
| | | enrichWithExtensionData(areaDivideList); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.sxkj.fw.area.param.FwDefenseSceneManagePageParam; |
| | | import org.sxkj.fw.area.entity.FwDefenseSceneManageEntity; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | import org.sxkj.fw.device.entity.FwDeviceEntity; |
| | | import org.sxkj.fw.device.service.IFwDeviceService; |
| | | import org.sxkj.system.cache.SysCache; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public IPage<FwDefenseSceneManageVO> selectFwDefenseSceneManagePage(IPage<FwDefenseSceneManageVO> page, FwDefenseSceneManagePageParam fwDefenseSceneManagePageParam) { |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | fwDefenseSceneManagePageParam.setDeptList(deptList); |
| | | return page.setRecords(baseMapper.selectFwDefenseSceneManagePage(page, fwDefenseSceneManagePageParam)); |
| | | } |
| | | |
| | |
| | | public List<Long> selectDeviceId(Long sceneManageId) { |
| | | return baseMapper.selectDeviceId(sceneManageId); |
| | | } |
| | | |
| | | @Override |
| | | public List<FwDefenseSceneManageVO> selectFwDefenseSceneManageCockpitList(FwBaseInfo fwBaseInfo) { |
| | | return baseMapper.selectFwDefenseSceneManageCockpitList(fwBaseInfo); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.stereotype.Service; |
| | | import org.sxkj.common.utils.HeaderUtils; |
| | | import org.sxkj.fw.area.param.FwAreaDivideListParam; |
| | | import org.sxkj.fw.area.service.IFwAreaDivideService; |
| | | import org.sxkj.fw.area.service.IFwDefenseSceneManageService; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideVO; |
| | |
| | | import org.sxkj.fw.cockpit.service.ICockpitService; |
| | | import org.sxkj.fw.cockpit.vo.AlarmStatisticsVO; |
| | | import org.sxkj.fw.cockpit.vo.DeviceStatisticsVO; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | import org.sxkj.fw.detection.entity.FwEffectEvalEntity; |
| | | import org.sxkj.fw.detection.param.FwEffectEvalParam; |
| | | import org.sxkj.fw.detection.service.IFwEffectEvalService; |
| | |
| | | */ |
| | | @Override |
| | | public List<FwDefenseSceneManageVO> selectFwDefenseSceneManageList(Date filterTime) { |
| | | return iFwDefenseSceneManageService.selectFwDefenseSceneManageList(filterTime); |
| | | FwBaseInfo fwBaseInfo = new FwBaseInfo(); |
| | | Dept dept = SysCache.getDept(Long.valueOf(AuthUtil.getDeptId())); |
| | | Region byCode = RegionCache.getByCode(dept.getAreaCode()); |
| | | fwBaseInfo.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | fwBaseInfo.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode())); |
| | | return iFwDefenseSceneManageService.selectFwDefenseSceneManageCockpitList(fwBaseInfo); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public List<FwAreaDivideVO> selectFwAreaDivideList(Integer filterSelected, Long sceneId, String areaTypeKeys, Integer isSetSceneManage, LocalDateTime flyTime) { |
| | | return iFwAreaDivideService.selectFwAreaDivideList(filterSelected, sceneId, areaTypeKeys, isSetSceneManage, flyTime); |
| | | FwAreaDivideListParam fwAreaDivideListParam = new FwAreaDivideListParam(); |
| | | fwAreaDivideListParam.setFilterSelected(filterSelected); |
| | | fwAreaDivideListParam.setSceneId(sceneId); |
| | | fwAreaDivideListParam.setAreaTypeKeys(areaTypeKeys); |
| | | fwAreaDivideListParam.setIsSetSceneManage(isSetSceneManage); |
| | | fwAreaDivideListParam.setFlyTime(flyTime); |
| | | // 解析区域类型键值列表 |
| | | fwAreaDivideListParam.setAreaTypeKeyList(Func.toStrList(areaTypeKeys)); |
| | | Dept dept = SysCache.getDept(Long.valueOf(AuthUtil.getDeptId())); |
| | | Region byCode = RegionCache.getByCode(dept.getAreaCode()); |
| | | fwAreaDivideListParam.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | fwAreaDivideListParam.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode())); |
| | | return iFwAreaDivideService.selectFwAreaDivideList(fwAreaDivideListParam); |
| | | } |
| | | } |
| | |
| | | and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) = 0 |
| | | </if> |
| | | <if test="param2.deptList != null and param2.deptList.size > 0"> |
| | | and create_dept in |
| | | and ( create_dept in |
| | | <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | <!-- 或者设备是共享给当前部门的 --> |
| | | <if test="param2.currentDeptId != null and param2.currentDeptId != '' "> |
| | | or id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{param2.currentDeptId} |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | package org.sxkj.fw.device.service.impl; |
| | | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.sxkj.common.utils.HeaderUtils; |
| | | import org.sxkj.fw.cockpit.vo.AlarmStatisticsVO; |
| | | import org.sxkj.fw.cockpit.vo.DeviceStatisticsVO; |
| | | import org.sxkj.fw.common.GenericConverter; |
| | |
| | | // 按当前部门及下级部门范围过滤数据 |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | fwDeviceDTO.setDeptList(deptList); |
| | | IPage<FwDeviceEntity> pages = selectFwDevicePage(Condition.getPage(query), fwDeviceDTO); |
| | | fwDeviceDTO.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | // 按区域范围过滤数据 |
| | | IPage<FwDeviceEntity> pages = selectFwDevicePage(Condition.getPage(query), fwDeviceDTO); |
| | | IPage<FwDeviceVO> result = FwDeviceWrapper.build().pageVO(pages); |
| | | List<FwDeviceVO> records = result.getRecords(); |
| | | if (records != null && !records.isEmpty()) { |
| | |
| | | @ApiModelProperty(value = "共享记录ID") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long shareId; |
| | | |
| | | @ApiModelProperty(value = "最终出库区域") |
| | | private String finalOutboundArea; |
| | | } |
| | |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | |
| | | /** |
| | | * 无人机飞行记录表 数据传输对象实体类 |
| | |
| | | * @since 2026-01-08 |
| | | */ |
| | | @Data |
| | | public class FwDroneFlightRecordDTO implements Serializable { |
| | | public class FwDroneFlightRecordDTO extends FwBaseInfo implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("主键id") |
| | |
| | | |
| | | @ApiModelProperty(value = "区域名称") |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty(value = "部门集合",hidden = true) |
| | | private List<Long> deptList; |
| | | |
| | | @ApiModelProperty(value = "部门id",hidden = true) |
| | | private String currentDeptId; |
| | | // setRegionName |
| | | @ApiModelProperty(value = "区域名称",hidden = true) |
| | | private String regionName; |
| | | |
| | | } |
| | |
| | | <if test="param2.areaName != null and param2.areaName != ''"> |
| | | and dar.area_name like CONCAT('%', #{param2.areaName}, '%') |
| | | </if> |
| | | <!-- <if test="param2.deptList != null and param2.deptList.size > 0"> --> |
| | | <!-- and (dar.create_dept in --> |
| | | <!-- <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> --> |
| | | <!-- #{deptId} --> |
| | | <!-- </foreach> --> |
| | | <!-- ) --> |
| | | <!-- </if> --> |
| | | </where> |
| | | order by favorited desc |
| | | </select> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="regionCode != null and regionCode != ''"> |
| | | and (d.final_outbound_area_code like CONCAT(#{regionCode}, '%') |
| | | <!-- 或者设备是共享给当前部门的 --> |
| | | <if test="currentDeptId != null and currentDeptId != '' "> |
| | | or dar.device_id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{currentDeptId} |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | dfr.is_deleted = 0 |
| | | and d.track_status = 1 |
| | | and d.is_enabled = 1 |
| | | <if test="param2.regionName != null and param2.regionName != ''"> |
| | | and (d.final_outbound_area = #{param2.regionName} |
| | | <if test="param2.regionCode != null and param2.regionCode != ''"> |
| | | and (d.final_outbound_area_code like CONCAT(#{param2.regionCode}, '%') |
| | | <!-- 或者设备是共享给当前部门的 --> |
| | | <if test="param2.currentDeptId != null and param2.currentDeptId != '' "> |
| | | or dfr.device_id in ( |
| | |
| | | <if test="param2.areaName != null and param2.areaName != ''"> |
| | | and dfr.area_name like CONCAT('%', #{param2.areaName}, '%') |
| | | </if> |
| | | <!-- <if test="param2.deptList != null and param2.deptList.size > 0"> --> |
| | | <!-- and (dfr.create_dept in --> |
| | | <!-- <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> --> |
| | | <!-- #{deptId} --> |
| | | <!-- </foreach> --> |
| | | <!-- ) --> |
| | | <!-- </if> --> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | FROM |
| | | ja_fw_drone_flight_record dfr |
| | | left join |
| | | ja_fw_device d on dfr.device_id = d.id |
| | | left join |
| | | ja_fw_drone_flight_record_detail dfrd on dfr.id = dfrd.flight_record_id |
| | | <where> |
| | | dfr.is_deleted = 0 |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="regionCode != null and regionCode != ''"> |
| | | and (d.final_outbound_area_code like CONCAT(#{regionCode}, '%') |
| | | <!-- 或者设备是共享给当前部门的 --> |
| | | <if test="currentDeptId != null and currentDeptId != '' "> |
| | | or dfr.device_id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{currentDeptId} |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FwDroneAlarmRecordExportParam { |
| | | public class FwDroneAlarmRecordExportParam extends FwBaseInfo { |
| | | @ApiModelProperty("主键id,逗号分隔") |
| | | private List<String> ids; |
| | | } |
| | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.sxkj.fw.common.FwBaseInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FwDroneFlightRecordExportParam { |
| | | public class FwDroneFlightRecordExportParam extends FwBaseInfo { |
| | | @ApiModelProperty("主键id,逗号分隔") |
| | | private List<String> ids; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<FwDroneAlarmRecordExcel> exportFwDroneAlarmRecord(FwDroneAlarmRecordExportParam fwDroneAlarmRecord) { |
| | | Dept dept = SysCache.getDept(Long.valueOf(AuthUtil.getDeptId())); |
| | | Region byCode = RegionCache.getByCode(dept.getAreaCode()); |
| | | fwDroneAlarmRecord.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode())); |
| | | fwDroneAlarmRecord.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | List<FwDroneAlarmRecordExcel> fwDroneAlarmRecordList = baseMapper.exportFwDroneAlarmRecord(fwDroneAlarmRecord); |
| | | return fwDroneAlarmRecordList; |
| | | } |
| | |
| | | package org.sxkj.fw.record.service.impl; |
| | | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.sxkj.common.utils.HeaderUtils; |
| | | import org.sxkj.fw.record.dto.FwDroneFlightRecordDTO; |
| | | import org.sxkj.fw.record.entity.FwDroneFlightRecordEntity; |
| | | import org.sxkj.fw.record.param.FwDroneFlightRecordExportParam; |
| | |
| | | |
| | | @Override |
| | | public IPage<FwDroneFlightRecordVO> selectFwDroneFlightRecordPage(IPage<FwDroneFlightRecordVO> page, FwDroneFlightRecordDTO fwDroneFlightRecord) { |
| | | // List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | // fwDroneFlightRecord.setDeptList(deptList); |
| | | // fwDroneFlightRecord.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | Dept dept = SysCache.getDept(Long.valueOf(AuthUtil.getDeptId())); |
| | | // 3. 查询不在这些部门区域内的设备 |
| | | Region byCode = RegionCache.getByCode(dept.getAreaCode()); |
| | | String regionName = byCode.getName(); |
| | | fwDroneFlightRecord.setRegionName(regionName); |
| | | fwDroneFlightRecord.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode())); |
| | | fwDroneFlightRecord.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | return page.setRecords(baseMapper.selectFwDroneFlightRecordPage(page, fwDroneFlightRecord)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<String, List<FwDroneFlightRecordExcel>> exportFwDroneFlightRecord(FwDroneFlightRecordExportParam fwDroneFlightRecord) { |
| | | Dept dept = SysCache.getDept(Long.valueOf(AuthUtil.getDeptId())); |
| | | Region byCode = RegionCache.getByCode(dept.getAreaCode()); |
| | | fwDroneFlightRecord.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode())); |
| | | fwDroneFlightRecord.setCurrentDeptId(AuthUtil.getDeptId()); |
| | | List<FwDroneFlightRecordExcel> fwDroneFlightRecordList = baseMapper.exportFwDroneFlightRecord(fwDroneFlightRecord); |
| | | // 按照 无人机名称 和 序列号 组合进行分组,键格式为 "id_serialNo" |
| | | Map<String, List<FwDroneFlightRecordExcel>> groupedMap = fwDroneFlightRecordList.stream() |