设备功能新增
This commit is contained in:
1 parent
89bb6d9e83
commit
0280cf3f0b
10 files changed
+372
-33
No files matched your search
@@ -0,0 +1,43 @@
|
||||
package net.hzvtc.device.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.hzvtc.common.core.domain.BaseEntity;
|
||||
import org.apache.ibatis.type.Alias;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备日志对象 device_log
|
||||
*
|
||||
* @author admin
|
||||
* @date 2026-10-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Alias("DeviceLog")
|
||||
public class DeviceLog extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date time;
|
||||
|
||||
/**
|
||||
* 状态:1:未上线 2:未上传文件 3:相机故障 4:其他
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Long deviceId;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package net.hzvtc.device.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.hzvtc.common.core.domain.BaseEntity;
|
||||
import org.apache.ibatis.type.Alias;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备维护对象 device_maintaince
|
||||
*
|
||||
* @author admin
|
||||
* @date 2026-10-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Alias("DeviceMaintaince")
|
||||
public class DeviceMaintaince extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 维护时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date time;
|
||||
|
||||
/**
|
||||
* 维护记录
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 维护人姓名
|
||||
*/
|
||||
private String person;
|
||||
|
||||
/**
|
||||
* 设备
|
||||
*/
|
||||
private Long deviceId;
|
||||
}
|
||||
+2
-2
@@ -285,8 +285,8 @@ public class DeviceInfoServiceImpl implements DeviceInfoService {
|
||||
if (jsonObject != null) {
|
||||
Long deptId = jsonObject.getLong("deptId");
|
||||
if (deptId != null) {
|
||||
param.put("ancestors", getAncestorsById(deptId));
|
||||
param.put("deptId", deptId);
|
||||
List<Long> deptIds = sysDeptService.getDeptSubIdsById(deptId);
|
||||
param.put("deptIds", deptIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -200,8 +200,11 @@
|
||||
<if test="userId != null">
|
||||
and id in (select post_id from sys_user_post where user_id=#{userId})
|
||||
</if>
|
||||
<if test="ancestors != null and ancestors !=''">
|
||||
and (dept_id in (select dept_id from sys_dept where ancestors like concat(#{ancestors},'%')) or dept_id=#{deptId})
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
and dept_id in
|
||||
<foreach collection="deptIds" item="dId" open="(" separator="," close=")">
|
||||
#{dId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by id
|
||||
</select>
|
||||
|
||||
Reference in new issue
Block a user