forked from dyf/fys-Multi-tenant
web端控制中心2
This commit is contained in:
@ -66,8 +66,14 @@ public class DeviceQueryCriteria extends BaseEntity {
|
||||
/* app绑定用户id */
|
||||
private Long bindingUserId;
|
||||
|
||||
/**
|
||||
* 使用人员
|
||||
*/
|
||||
private String personnelBy;
|
||||
|
||||
/* 是否为管理员 */
|
||||
private Boolean isAdmin = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,95 @@
|
||||
package com.fuyuanshen.equipment.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class WebDeviceVo implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备IMEI
|
||||
*/
|
||||
private String deviceImei;
|
||||
|
||||
/**
|
||||
* 设备MAC
|
||||
*/
|
||||
private String deviceMac;
|
||||
|
||||
/**
|
||||
* 通讯方式 0:4G;1:蓝牙
|
||||
*/
|
||||
private Integer communicationMode;
|
||||
|
||||
/**
|
||||
* 设备图片
|
||||
*/
|
||||
private String devicePic;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 蓝牙名称
|
||||
*/
|
||||
private String bluetoothName;
|
||||
|
||||
/**
|
||||
* 使用人员
|
||||
*/
|
||||
private String personnelBy;
|
||||
|
||||
/**
|
||||
* 设备状态
|
||||
* 0 失效
|
||||
* 1 正常
|
||||
*/
|
||||
private Integer deviceStatus;
|
||||
|
||||
/**
|
||||
* 绑定时间
|
||||
*/
|
||||
private Date bindingTime;
|
||||
|
||||
/**
|
||||
* 在线状态(0离线,1在线)
|
||||
*/
|
||||
private Integer onlineStatus;
|
||||
|
||||
/**
|
||||
* 电量 百分比
|
||||
*/
|
||||
private String battery;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String latitude;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 告警状态(0解除告警,1告警)
|
||||
*/
|
||||
private String alarmStatus;
|
||||
|
||||
/**
|
||||
* 设备详情页面
|
||||
*/
|
||||
private String detailPageUrl;
|
||||
|
||||
}
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuyuanshen.equipment.domain.Device;
|
||||
import com.fuyuanshen.equipment.domain.query.DeviceQueryCriteria;
|
||||
import com.fuyuanshen.equipment.domain.vo.AppDeviceVo;
|
||||
import com.fuyuanshen.equipment.domain.vo.WebDeviceVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -68,4 +69,6 @@ public interface DeviceMapper extends BaseMapper<Device> {
|
||||
List<Device> findByOriginalDeviceId(Long originalDeviceId);
|
||||
|
||||
AppDeviceVo getDeviceInfo(@Param("deviceMac") String deviceMac);
|
||||
|
||||
Page<WebDeviceVo> queryWebDeviceList(Page<Object> build, DeviceQueryCriteria bo);
|
||||
}
|
||||
|
@ -232,5 +232,46 @@
|
||||
inner join device_type dt on d.device_type = dt.id
|
||||
where d.device_mac = #{deviceMac}
|
||||
</select>
|
||||
<select id="queryWebDeviceList" resultType="com.fuyuanshen.equipment.domain.vo.WebDeviceVo">
|
||||
select d.id, d.device_name, d.device_name,
|
||||
d.device_name,
|
||||
d.device_mac,
|
||||
d.device_sn,
|
||||
d.device_imei,
|
||||
d.device_pic,
|
||||
dt.type_name,
|
||||
dt.communication_mode,
|
||||
d.bluetooth_name,
|
||||
dt.model_dictionary detailPageUrl,
|
||||
ap.name personnelBy,
|
||||
d.device_status,
|
||||
c.binding_time
|
||||
from device d
|
||||
inner join device_type dt on d.device_type = dt.id
|
||||
inner join app_device_bind_record c on d.id = c.device_id
|
||||
left join app_personnel_info ap on ap.device_id = d.id
|
||||
where dt.communication_mode = 0
|
||||
<if test="criteria.deviceType != null">
|
||||
and d.device_type = #{criteria.deviceType}
|
||||
</if>
|
||||
<if test="criteria.deviceName != null">
|
||||
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}
|
||||
</if>
|
||||
<if test="criteria.deviceStatus != null">
|
||||
and d.device_status = #{criteria.deviceStatus}
|
||||
</if>
|
||||
<if test="criteria.personnelBy != null and criteria.personnelBy != ''">
|
||||
and ap.name like concat('%', #{criteria.personnelBy}, '%')
|
||||
</if>
|
||||
<if test="criteria.communicationMode != null">
|
||||
and dt.communication_mode, = #{criteria.communicationMode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user