Merge remote-tracking branch 'origin/dyf-device'

This commit is contained in:
2025-07-08 11:35:03 +08:00
46 changed files with 1419 additions and 181 deletions

View File

@ -1,7 +1,5 @@
package com.fuyuanshen.equipment.domain;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@ -55,6 +53,11 @@ public class Device extends TenantEntity {
@Schema(name = "原始所有者(创建者)")
private Long originalOwnerId;
/**
* 原始设备
*/
@Schema(name = "原始设备")
private Long originalDeviceId;
/*@Schema( name = "设备编号")
private String deviceNo;*/
@ -99,7 +102,6 @@ public class Device extends TenantEntity {
@Schema(name = "绑定状态")
private Integer bindingStatus;
/**
* 创建人名称
*/

View File

@ -27,6 +27,19 @@ public class DeviceType extends TenantEntity {
@Schema(name = "创建该类型的客户")
private Long ownerCustomerId;
/**
* 原始所有者(创建者)
* original_owner_id
*/
@Schema(name = "原始所有者(创建者)")
private Long originalOwnerId;
/**
* 原始设备
*/
@Schema(name = "原始设备类型")
private Long originalDeviceId;
@NotBlank(message = "设备类型名称不能为空")
@Schema(name = "类型名称", required = true)
private String typeName;

View File

@ -0,0 +1,99 @@
package com.fuyuanshen.equipment.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuyuanshen.common.tenant.core.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
import java.util.Date;
/**
* APP用户信息对象 app_user
*
* @author Lion Li
* @date 2025-06-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("app_user")
public class UserApp extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L;
/**
* 用户ID
*/
@TableId(value = "user_id")
private Long userId;
/**
* 用户账号
*/
private String userName;
/**
* 用户昵称
*/
private String nickName;
/**
* 用户类型app_user系统用户
*/
private String userType;
/**
* 用户邮箱
*/
private String email;
/**
* 手机号码
*/
private String phonenumber;
/**
* 用户性别0男 1女 2未知
*/
private String sex;
/**
* 头像地址
*/
private Long avatar;
/**
* 密码
*/
private String password;
/**
* 帐号状态0正常 1停用
*/
private String status;
/**
* 删除标志0代表存在 1代表删除
*/
@TableLogic
private String delFlag;
/**
* 最后登录IP
*/
private String loginIp;
/**
* 最后登录时间
*/
private Date loginDate;
/**
* 备注
*/
private String remark;
}

View File

@ -0,0 +1,95 @@
package com.fuyuanshen.equipment.domain.bo;
import com.fuyuanshen.common.core.validate.AddGroup;
import com.fuyuanshen.common.core.validate.EditGroup;
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
import com.fuyuanshen.equipment.domain.UserApp;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* APP用户信息业务对象 app_user
*
* @author Lion Li
* @date 2025-06-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = UserApp.class, reverseConvertGenerate = false)
public class UserAppBo extends BaseEntity {
/**
* 用户ID
*/
@NotNull(message = "用户ID不能为空", groups = { EditGroup.class })
private Long userId;
/**
* 用户账号
*/
@NotBlank(message = "用户账号不能为空", groups = { AddGroup.class, EditGroup.class })
private String userName;
/**
* 用户昵称
*/
// @NotBlank(message = "用户昵称不能为空", groups = { AddGroup.class, EditGroup.class })
private String nickName;
/**
* 用户类型app_user系统用户
*/
private String userType;
/**
* 用户邮箱
*/
private String email;
/**
* 手机号码
*/
private String phonenumber;
/**
* 用户性别0男 1女 2未知
*/
private String sex;
/**
* 头像地址
*/
private Long avatar;
/**
* 密码
*/
private String password;
/**
* 帐号状态0正常 1停用
*/
private String status;
/**
* 最后登录IP
*/
private String loginIp;
/**
* 最后登录时间
*/
private Date loginDate;
/**
* 备注
*/
private String remark;
}

View File

@ -26,7 +26,6 @@ public class DeviceExcelImportDTO {
@ColumnWidth(20)
private String deviceName;
@ExcelProperty(value = "设备图片", converter = ByteArrayImageConverter.class)
@ColumnWidth(15)
private byte[] devicePic;

View File

@ -21,7 +21,7 @@ public class DeviceForm {
private Long assignId;
@Schema(title = "设备类型")
private Long deviceTypeId;
private Long deviceType;
@Schema(title = "客户号")
private Long customerId;

View File

@ -1,5 +1,6 @@
package com.fuyuanshen.equipment.domain.query;
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@ -15,7 +16,7 @@ import java.util.Set;
* @Date: 2025/5/16
**/
@Data
public class DeviceQueryCriteria {
public class DeviceQueryCriteria extends BaseEntity {
@Schema(name = "设备id")
private Long deviceId;
@ -24,7 +25,7 @@ public class DeviceQueryCriteria {
private String deviceName;
@Schema(name = "设备类型")
private Long deviceTypeId;
private Long deviceType;
@Schema(name = "设备MAC")
private String deviceMac;
@ -43,14 +44,11 @@ public class DeviceQueryCriteria {
@Schema(name = "设备状态 0 失效 1 正常 ")
private Integer deviceStatus;
@Schema(name = "创建时间")
private List<Timestamp> createTime;
@Schema(name = "页码", example = "1")
private Integer page = 1;
private Integer pageNum = 1;
@Schema(name = "每页数据量", example = "10")
private Integer size = 10;
private Integer pageSize = 10;
@Schema(name = "客户id")
private Long customerId;

View File

@ -31,9 +31,8 @@ public class DeviceTypeQueryCriteria extends BaseEntity implements Serializable
private Long tenantId;
@Schema(name = "页码", example = "1")
private Integer page = 1;
private Integer pageNum = 1;
@Schema(name = "每页数据量", example = "10")
private Integer size = 10;
private Integer pageSize = 10;
}

View File

@ -0,0 +1,120 @@
package com.fuyuanshen.equipment.domain.vo;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.fuyuanshen.common.excel.annotation.ExcelDictFormat;
import com.fuyuanshen.common.excel.convert.ExcelDictConvert;
import com.fuyuanshen.equipment.domain.UserApp;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
/**
* APP用户信息视图对象 app_user
*
* @author Lion Li
* @date 2025-06-27
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = UserApp.class)
public class UserAppVo implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 用户ID
*/
@ExcelProperty(value = "用户ID")
private Long userId;
/**
* 用户账号
*/
@ExcelProperty(value = "用户账号")
private String userName;
/**
* 用户昵称
*/
@ExcelProperty(value = "用户昵称")
private String nickName;
/**
* 用户类型app_user系统用户
*/
@ExcelProperty(value = "用户类型", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "a=pp_user系统用户")
private String userType;
/**
* 用户邮箱
*/
@ExcelProperty(value = "用户邮箱")
private String email;
/**
* 手机号码
*/
@ExcelProperty(value = "手机号码")
private String phonenumber;
/**
* 用户性别0男 1女 2未知
*/
@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "0=男,1=女,2=未知")
private String sex;
/**
* 头像地址
*/
@ExcelProperty(value = "头像地址")
private Long avatar;
/**
* 密码
*/
@ExcelProperty(value = "密码")
private String password;
/**
* 帐号状态0正常 1停用
*/
@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
@ExcelDictFormat(readConverterExp = "0=正常,1=停用")
private String status;
/**
* 最后登录IP
*/
@ExcelProperty(value = "最后登录IP")
private String loginIp;
/**
* 最后登录时间
*/
@ExcelProperty(value = "最后登录时间")
private Date loginDate;
/**
* 备注
*/
@ExcelProperty(value = "备注")
private String remark;
/**
* 租户编号
*/
private String tenantId;
/**
* 部门ID
*/
private Long deptId;
}