web端控制中心4
This commit is contained in:
@ -29,4 +29,9 @@ public class InstructionRecordDto {
|
||||
* 操作时间-结束时间
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 分组id
|
||||
*/
|
||||
private Long groupId;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuyuanshen.equipment.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ -8,25 +9,31 @@ public class InstructionRecordVo {
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@ExcelProperty(value = "设备型号")
|
||||
private String deviceType;
|
||||
|
||||
/**
|
||||
* 操作模块
|
||||
*/
|
||||
@ExcelProperty(value = "操作模块")
|
||||
private String deviceAction;
|
||||
|
||||
/**
|
||||
* 操作内容
|
||||
*/
|
||||
@ExcelProperty(value = "操作内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@ExcelProperty(value = "操作时间")
|
||||
private String createTime;
|
||||
}
|
||||
|
@ -0,0 +1,41 @@
|
||||
package com.fuyuanshen.equipment.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class LocationHistoryDetailVo {
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@ExcelProperty(value = "日期")
|
||||
private String date;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 初始地点
|
||||
*/
|
||||
@ExcelProperty(value = "初始地点")
|
||||
private String startLocation;
|
||||
|
||||
/**
|
||||
* 结束地点
|
||||
*/
|
||||
@ExcelProperty(value = "结束地点")
|
||||
private String endLocation;
|
||||
|
||||
/**
|
||||
* 轨迹详情
|
||||
*/
|
||||
@ExcelProperty(value = "轨迹详情")
|
||||
private List<JSONObject> detailList;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.fuyuanshen.equipment.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LocationHistoryVo {
|
||||
private Long id;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String deviceType;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@ExcelProperty(value = "设备型号")
|
||||
private String deviceTypeName;
|
||||
|
||||
/**
|
||||
* 设备IMEI
|
||||
*/
|
||||
@ExcelProperty(value = "设备IMEI")
|
||||
private String deviceImei;
|
||||
|
||||
/**
|
||||
* 设备MAC
|
||||
*/
|
||||
@ExcelProperty(value = "设备MAC")
|
||||
private String deviceMac;
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.fuyuanshen.equipment.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuyuanshen.equipment.domain.Device;
|
||||
import com.fuyuanshen.equipment.domain.dto.InstructionRecordDto;
|
||||
import com.fuyuanshen.equipment.domain.query.DeviceQueryCriteria;
|
||||
import com.fuyuanshen.equipment.domain.vo.AppDeviceVo;
|
||||
import com.fuyuanshen.equipment.domain.vo.LocationHistoryVo;
|
||||
import com.fuyuanshen.equipment.domain.vo.WebDeviceVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -71,4 +73,6 @@ public interface DeviceMapper extends BaseMapper<Device> {
|
||||
AppDeviceVo getDeviceInfo(@Param("deviceMac") String deviceMac);
|
||||
|
||||
Page<WebDeviceVo> queryWebDeviceList(Page<Object> build,@Param("criteria") DeviceQueryCriteria criteria);
|
||||
|
||||
Page<LocationHistoryVo> getLocationHistory(Page<Object> build, @Param("bo") InstructionRecordDto criteria);
|
||||
}
|
||||
|
@ -29,10 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND b.device_imei = #{bo.deviceImei}
|
||||
</if>
|
||||
<if test="bo.startTime != null and bo.startTime != ''">
|
||||
AND create_time <![CDATA[>=]]> #{bo.startTime}
|
||||
AND a.create_time <![CDATA[>=]]> #{bo.startTime}
|
||||
</if>
|
||||
<if test="bo.endTime != null and bo.endTime != ''">
|
||||
AND create_time <![CDATA[<=]]> #{bo.startTime}
|
||||
AND a.create_time <![CDATA[<=]]> #{bo.endTime}
|
||||
</if>
|
||||
<if test="bo.groupId != null">
|
||||
and b.group_id = #{bo.groupId}
|
||||
</if>
|
||||
ORDER BY
|
||||
a.create_time DESC
|
||||
|
@ -257,11 +257,8 @@
|
||||
<if test="criteria.deviceName != null and criteria.deviceName != ''">
|
||||
and d.device_name like concat('%', #{criteria.deviceName}, '%')
|
||||
</if>
|
||||
<if test="criteria.deviceMac != null">
|
||||
and d.device_mac = #{criteria.deviceMac}
|
||||
</if>
|
||||
<if test="criteria.deviceImei != null">
|
||||
and d.device_imei = #{criteria.deviceImei}
|
||||
and (d.device_imei = #{criteria.deviceImei} or d.device_mac = #{criteria.deviceImei})
|
||||
</if>
|
||||
<if test="criteria.deviceStatus != null">
|
||||
and d.device_status = #{criteria.deviceStatus}
|
||||
@ -276,5 +273,33 @@
|
||||
and d.group_id = #{criteria.groupId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getLocationHistory" resultType="com.fuyuanshen.equipment.domain.vo.LocationHistoryVo">
|
||||
select a.id,a.device_name,a.device_type,b.type_name deviceTypeName,a.device_imei,a.device_mac from device a
|
||||
inner join device_type b on a.device_type = b.id
|
||||
|
||||
<if test="bo.deviceType != null">
|
||||
AND b.id = #{bo.deviceType}
|
||||
</if>
|
||||
<if test="bo.deviceName != null and bo.deviceName != ''">
|
||||
AND a.device_name like concat('%',#{bo.deviceName},'%')
|
||||
</if>
|
||||
<if test="bo.deviceMac != null and bo.deviceMac != ''">
|
||||
AND a.device_mac = #{bo.deviceMac}
|
||||
</if>
|
||||
<if test="bo.deviceImei != null and bo.deviceImei != ''">
|
||||
AND a.device_imei = #{bo.deviceImei}
|
||||
</if>
|
||||
<if test="bo.startTime != null and bo.startTime != ''">
|
||||
AND a.create_time <![CDATA[>=]]> #{bo.startTime}
|
||||
</if>
|
||||
<if test="bo.endTime != null and bo.endTime != ''">
|
||||
AND a.create_time <![CDATA[<=]]> #{bo.endTime}
|
||||
</if>
|
||||
<if test="bo.groupId != null">
|
||||
and a.group_id = #{bo.groupId}
|
||||
</if>
|
||||
ORDER BY
|
||||
a.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user