From 05ce271bb9b9b1302fb0bd8c8031fa5d3df9886b Mon Sep 17 00:00:00 2001 From: 79493 <794930212@qq.com> Date: Tue, 18 Oct 2022 17:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AB=AF=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3,=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E7=AB=AF=E8=AE=BE=E5=A4=87=E7=94=9F=E5=91=BD=E5=91=A8=E6=9C=9F?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3=20redis=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=88=86=E7=B1=BBkey=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/rzyc/enums/RedisKeys.java | 32 +++ .../java/com/rzyc/mapper/EntDeviceMapper.java | 38 +++ .../com/rzyc/mapper/EntDeviceTypeMapper.java | 28 ++ .../main/java/com/rzyc/model/EntDevice.java | 259 ++++++++++++++++++ .../java/com/rzyc/model/EntDeviceType.java | 187 +++++++++++++ .../main/resources/mapper/EntDeviceMapper.xml | 41 +++ .../resources/mapper/EntDeviceTypeMapper.xml | 34 +++ .../EnterpriseEquipmentController.java | 105 +++++++ .../com/rzyc/service/PcBusinessService.java | 72 ++++- 9 files changed, 782 insertions(+), 14 deletions(-) create mode 100644 inventory-dao/src/main/java/com/rzyc/enums/RedisKeys.java create mode 100644 inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java create mode 100644 inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceTypeMapper.java create mode 100644 inventory-dao/src/main/java/com/rzyc/model/EntDevice.java create mode 100644 inventory-dao/src/main/java/com/rzyc/model/EntDeviceType.java create mode 100644 inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml create mode 100644 inventory-dao/src/main/resources/mapper/EntDeviceTypeMapper.xml create mode 100644 inventory-ent/src/main/java/com/rzyc/controller/EnterpriseEquipmentController.java diff --git a/inventory-dao/src/main/java/com/rzyc/enums/RedisKeys.java b/inventory-dao/src/main/java/com/rzyc/enums/RedisKeys.java new file mode 100644 index 0000000..f8397aa --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/enums/RedisKeys.java @@ -0,0 +1,32 @@ +package com.rzyc.enums; + + +/** + * Redis key 分类包 + * @author Xuwanxin + * @date 2022/10/18 + * */ + +public enum RedisKeys { + //企业岗位 + POST("entPost"), + + //企业设备 + DEVICE("entDevice"); + + /*******分界线********/ + + private String key; + + RedisKeys(String key) { + this.key = key; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java new file mode 100644 index 0000000..246b391 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java @@ -0,0 +1,38 @@ +package com.rzyc.mapper; + +import com.rzyc.model.EntDevice; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *
+ * 设备 Mapper 接口 + *
+ * + * @author + * @since 2022-10-18 + */ +@Repository +public interface EntDeviceMapper extends BaseMapper+ * 设备分类 Mapper 接口 + *
+ * + * @author + * @since 2022-10-18 + */ +@Repository +public interface EntDeviceTypeMapper extends BaseMapper+ * 设备 + *
+ * + * @author + * @since 2022-10-18 + */ +@TableName("ent_device") +@ApiModel(value="EntDevice对象", description="设备") +public class EntDevice implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "设备id") + @TableId("device_id") + private String deviceId; + + @ApiModelProperty(value = "设备名称") + @TableField("name") + private String name; + + @ApiModelProperty(value = "设备编号") + @TableField("number") + private String number; + + @ApiModelProperty(value = "规格型号") + @TableField("model_num") + private String modelNum; + + @ApiModelProperty(value = "设备状态") + @TableField("model_state") + private Integer modelState; + + @ApiModelProperty(value = "购买时间") + @TableField("buy_time") + private Date buyTime; + + @ApiModelProperty(value = "出厂日期") + @TableField("date_production") + private Date dateProduction; + + @ApiModelProperty(value = "安装时间") + @TableField("installation_production") + private Date installationTime; + + @ApiModelProperty(value = "启用时间") + @TableField("enable_time") + private Date enableTime; + + @ApiModelProperty(value = "报废时间") + @TableField("scrap_time") + private Date scrapTime; + + @ApiModelProperty(value = "设备分类id") + @TableField("type_id") + private String typeId; + + @ApiModelProperty(value = "设备分类路径") + @TableField("type_path") + private String typePath; + + @ApiModelProperty(value = "企业id") + @TableField("enterprise_id") + private String enterpriseId; + + @ApiModelProperty(value = "二维码地址") + @TableField("qr_code") + private String qrCode; + + @ApiModelProperty(value = "删除状态 1:正常 2:已删除") + @TableField("del_state") + private Integer delState; + + @ApiModelProperty(value = "创建时间") + @TableField("create_time") + private Date createTime; + + @ApiModelProperty(value = "创建人") + @TableField("create_by") + private String createBy; + + @ApiModelProperty(value = "修改时间") + @TableField("modify_time") + private Date modifyTime; + + @ApiModelProperty(value = "修改人") + @TableField("modify_by") + private String modifyBy; + + public Date getInstallationTime() { + return installationTime; + } + + public void setInstallationTime(Date installationTime) { + this.installationTime = installationTime; + } + + public Date getEnableTime() { + return enableTime; + } + + public void setEnableTime(Date enableTime) { + this.enableTime = enableTime; + } + + public Date getScrapTime() { + return scrapTime; + } + + public void setScrapTime(Date scrapTime) { + this.scrapTime = scrapTime; + } + + public Date getDateProduction() { + return dateProduction; + } + + public void setDateProduction(Date dateProduction) { + this.dateProduction = dateProduction; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + public String getModelNum() { + return modelNum; + } + + public void setModelNum(String modelNum) { + this.modelNum = modelNum; + } + public Integer getModelState() { + return modelState; + } + + public void setModelState(Integer modelState) { + this.modelState = modelState; + } + public Date getBuyTime() { + return buyTime; + } + + public void setBuyTime(Date buyTime) { + this.buyTime = buyTime; + } + public String getTypeId() { + return typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + public String getTypePath() { + return typePath; + } + + public void setTypePath(String typePath) { + this.typePath = typePath; + } + public String getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(String enterpriseId) { + this.enterpriseId = enterpriseId; + } + public String getQrCode() { + return qrCode; + } + + public void setQrCode(String qrCode) { + this.qrCode = qrCode; + } + public Integer getDelState() { + return delState; + } + + public void setDelState(Integer delState) { + this.delState = delState; + } + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + public String getModifyBy() { + return modifyBy; + } + + public void setModifyBy(String modifyBy) { + this.modifyBy = modifyBy; + } + + @Override + public String toString() { + return "EntDevice{" + + "deviceId=" + deviceId + + ", name=" + name + + ", number=" + number + + ", modelNum=" + modelNum + + ", modelState=" + modelState + + ", buyTime=" + buyTime + + ", typeId=" + typeId + + ", typePath=" + typePath + + ", enterpriseId=" + enterpriseId + + ", qrCode=" + qrCode + + ", delState=" + delState + + ", createTime=" + createTime + + ", createBy=" + createBy + + ", modifyTime=" + modifyTime + + ", modifyBy=" + modifyBy + + "}"; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntDeviceType.java b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceType.java new file mode 100644 index 0000000..89878de --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceType.java @@ -0,0 +1,187 @@ +package com.rzyc.model; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + *+ * 设备分类 + *
+ * + * @author + * @since 2022-10-18 + */ +@TableName("ent_device_type") +@ApiModel(value="EntDeviceType对象", description="设备分类") +public class EntDeviceType implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "设备分类id") + @TableId("type_id") + private String typeId; + + @ApiModelProperty(value = "企业id") + @TableField("enterprise_id") + private String enterpriseId; + + @ApiModelProperty(value = "分类名") + @TableField("name") + private String name; + + @ApiModelProperty(value = "分类logo") + @TableField("logo") + private String logo; + + @ApiModelProperty(value = "父级分类") + @TableField("parent_id") + private String parentId; + + @ApiModelProperty(value = "所有父级分类") + @TableField("parent_path") + private String parentPath; + + @ApiModelProperty(value = "父级分类名") + @TableField("parent_name") + private String parentName; + + @ApiModelProperty(value = "排序") + @TableField("sort_id") + private Integer sortId; + + @ApiModelProperty(value = "删除状态 1:正常 2:已删除") + @TableField("del_state") + private Integer delState; + + @ApiModelProperty(value = "创建时间") + @TableField("create_time") + private Date createTime; + + @ApiModelProperty(value = "创建人") + @TableField("create_by") + private String createBy; + + @ApiModelProperty(value = "修改时间") + @TableField("modify_time") + private Date modifyTime; + + @ApiModelProperty(value = "修改人") + @TableField("modify_by") + private String modifyBy; + + public String getTypeId() { + return typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + public String getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(String enterpriseId) { + this.enterpriseId = enterpriseId; + } + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getLogo() { + return logo; + } + + public void setLogo(String logo) { + this.logo = logo; + } + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + public String getParentPath() { + return parentPath; + } + + public void setParentPath(String parentPath) { + this.parentPath = parentPath; + } + public String getParentName() { + return parentName; + } + + public void setParentName(String parentName) { + this.parentName = parentName; + } + public Integer getSortId() { + return sortId; + } + + public void setSortId(Integer sortId) { + this.sortId = sortId; + } + public Integer getDelState() { + return delState; + } + + public void setDelState(Integer delState) { + this.delState = delState; + } + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + public String getModifyBy() { + return modifyBy; + } + + public void setModifyBy(String modifyBy) { + this.modifyBy = modifyBy; + } + + @Override + public String toString() { + return "EntDeviceType{" + + "typeId=" + typeId + + ", enterpriseId=" + enterpriseId + + ", name=" + name + + ", logo=" + logo + + ", parentId=" + parentId + + ", parentPath=" + parentPath + + ", parentName=" + parentName + + ", sortId=" + sortId + + ", delState=" + delState + + ", createTime=" + createTime + + ", createBy=" + createBy + + ", modifyTime=" + modifyTime + + ", modifyBy=" + modifyBy + + "}"; + } +} diff --git a/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml b/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml new file mode 100644 index 0000000..7aeded4 --- /dev/null +++ b/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml @@ -0,0 +1,41 @@ + + +