吉安感知网项目-后端
linwei
2026-01-26 f7cf57b99def748f2981ff4811b9ab435b5df856
Merge remote-tracking branch 'origin/master'
7 files modified
48 ■■■■ changed files
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceController.java 13 ●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceDTO.java 6 ●●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.java 2 ●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml 15 ●●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/param/FwDevicePageParam.java 6 ●●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceService.java 2 ●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceServiceImpl.java 4 ●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceController.java
@@ -19,9 +19,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
@@ -138,14 +136,17 @@
    }
    /**
     * 设备类型统计
     * 设备出库去向统计
     * @return 统计数据
     */
    @GetMapping("/statisticalDeviceOut")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "设备出库去向统计", notes = "设备出库去向统计")
    public R<List<DeviceStatisticsVO>> statisticalDeviceOut() {
        return R.data(fwDeviceService.getDeviceOutStatistics());
    @ApiImplicitParams({
        @ApiImplicitParam(name = "effectiveRangeKmIsNotNull", value = "有效范围是否为空:0-不处理 1-不为空 2-为空", paramType = "query", dataType = "string")
    })
    public R<List<DeviceStatisticsVO>> statisticalDeviceOut(String effectiveRangeKmIsNotNull) {
        return R.data(fwDeviceService.getDeviceOutStatistics(effectiveRangeKmIsNotNull));
    }
    /**
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceDTO.java
@@ -116,6 +116,12 @@
    private int effectiveRangeKmIsNotNull ;
    /**
     * 是否出库
     */
    @ApiModelProperty(value = "是否出库 0不过滤 1是 2否")
    private int isTrack;
    /**
     * 设备状态,多个状态用逗号隔
     */
    @ApiModelProperty(value = "设备状态,多个状态用逗号隔开")
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.java
@@ -81,7 +81,7 @@
     * 设备出库去向统计
     * @return 统计数据
     */
    List<DeviceStatisticsVO> getDeviceOutStatistics();
    List<DeviceStatisticsVO> getDeviceOutStatistics(String effectiveRangeKmIsNotNull);
    /**
     * 设备生产厂商统计
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
@@ -38,7 +38,7 @@
    <select id="selectFwDevicePage" resultMap="fwDeviceResultMap">
        select * from ja_fw_device
        select *, (select count(*) from ja_fw_device_track tmp where ja_fw_device.id = tmp.device_id) out_count from ja_fw_device
        <where>
            is_deleted = 0
            <if test="param2.id != null and param2.id != ''">
@@ -80,6 +80,12 @@
            </if>
            <if test="param2.status != null">
                and status = #{param2.status}
            </if>
            <if test="param2.isTrack != null and param2.isTrack == 1">
                and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) > 0
            </if>
            <if test="param2.isTrack != null and param2.isTrack == 2">
                and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) = 0
            </if>
        </where>
    </select>
@@ -225,6 +231,13 @@
        WHERE
            d.is_deleted = 0
          AND t.out_target IS NOT NULL
        <if test="effectiveRangeKmIsNotNull != null and effectiveRangeKmIsNotNull == 1">
            and d.effective_range_km is not null
            and d.effective_range_km > 0
        </if>
        <if test="effectiveRangeKmIsNotNull != null and effectiveRangeKmIsNotNull == 2">
            and (d.effective_range_km is null or d.effective_range_km = 0)
        </if>
        GROUP BY
            t.out_target;
    </select>
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/param/FwDevicePageParam.java
@@ -38,6 +38,12 @@
    private int effectiveRangeKmIsNotNull;
    /**
     * 是否出库
     */
    @ApiModelProperty(value = "是否出库 0不过滤 1是 2否")
    private int isTrack;
    /**
     * 运行状态(0:在线/1:离线/2:故障/3:报废)
     */
    @ApiModelProperty(value = "运行状态(0:在线/1:离线/2:故障/3:报废)")
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceService.java
@@ -92,7 +92,7 @@
     * 设备出库去向统计
     * @return 统计数据
     */
    List<DeviceStatisticsVO> getDeviceOutStatistics();
    List<DeviceStatisticsVO> getDeviceOutStatistics(String effectiveRangeKmIsNotNull);
    /**
     * 设备生产厂商统计
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceServiceImpl.java
@@ -123,8 +123,8 @@
    }
    @Override
    public List<DeviceStatisticsVO> getDeviceOutStatistics() {
        return baseMapper.getDeviceOutStatistics();
    public List<DeviceStatisticsVO> getDeviceOutStatistics(String effectiveRangeKmIsNotNull) {
        return baseMapper.getDeviceOutStatistics(effectiveRangeKmIsNotNull);
    }
    @Override