| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- package com.jeesite.modules.mes.entity;
- import com.jeesite.common.entity.TreeEntity;
- import com.jeesite.common.mybatis.annotation.Column;
- import com.jeesite.common.mybatis.annotation.JoinTable;
- import com.jeesite.common.mybatis.annotation.JoinTable.Type;
- import com.jeesite.common.mybatis.annotation.Table;
- import com.jeesite.common.mybatis.mapper.query.QueryType;
- import com.jeesite.common.utils.excel.annotation.ExcelField;
- import com.jeesite.common.utils.excel.annotation.ExcelFields;
- import javax.validation.constraints.NotBlank;
- import javax.validation.constraints.Size;
- /**
- * 设备Entity
- * @author mes
- * @version 2023-07-12
- */
- @Table(name="mes_device", alias="a", label="设备信息", columns={
- @Column(name="tree_code", attrName="treeCode", label="tree_code", isPK=true),
- @Column(includeEntity=TreeEntity.class),
- @Column(name="status", attrName="status", label="状态", isUpdate=false),
- @Column(name="remark", attrName="remark", label="备注"),
- @Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
- @Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false, isUpdateForce=true),
- @Column(name="tree_name", attrName="treeName", label="节点名称", queryType=QueryType.LIKE, isTreeName=true),
- @Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
- @Column(name="update_date", attrName="updateDate", label="更新时间", isQuery=false, isUpdateForce=true),
- @Column(name="sn", attrName="sn", label="唯一编号"),
- @Column(name="ip", attrName="ip", label="IP地址"),
- @Column(name="online", attrName="online", label="在线状态0在线1离线", isInsert=false, isUpdate=false, isQuery=false, isUpdateForce=true),
- @Column(name="gw", attrName="gw", label="工位"),
- @Column(name="line_sn", attrName="lineSn", label="产线编号"),
- @Column(name="bc", attrName="bc", label="班次"),
- @Column(name="cate_id", attrName="cateId", label="分类"),
- @Column(name="work_status", attrName="workStatus", label="设备工作状态"),
- @Column(name="work_time", attrName="workTime", label="状态时间"),
- @Column(name="device_type", attrName="deviceType", label="设备类型"),
- @Column(name="work_type", attrName="workType", label="工作类型"),
- @Column(name="interval", attrName="interval", label="生成时间(秒)"),
- @Column(name="product_sn", attrName="productSn", label="当前工件"),
- @Column(name="device_code", attrName="deviceCode", label="设备识别码"),
- }, joinTable={
- @JoinTable(type=Type.LEFT_JOIN, entity=MesDeviceCate.class, attrName="this", alias="b",
- on="a.cate_id = b.id", columns={
- @Column(name="title", attrName="cateName",label="设备分类" ),
- }),
- },orderBy="a.sn, a.tree_sorts, a.tree_code"
- )
- public class MesDevice extends TreeEntity<MesDevice> {
-
- private static final long serialVersionUID = 1L;
- private String treeCode; // tree_code
- private String remark; // 备注
- private String treeName; // 节点名称
- private String sn; // 唯一编号 (设备识别码)
- private String ip; // IP地址
- private Integer online; // 在线状态0在线1离线
- private String parentSn;
- private String gw;
- private String bc;
- private Integer interval;
- private String postion;
- private String workStatus;
- private String workTime;
- private String deviceType;
- private String workType;
- private String cateId;
- private String cateName;
- private String productSn;
- private String productCate;
- private String lineSn;
- private String deviceCode;
- @ExcelFields({
- @ExcelField(title="设备名称", attrName="treeName", align= ExcelField.Align.CENTER, sort=20),
- @ExcelField(title="唯一编号", attrName="sn", align= ExcelField.Align.CENTER, sort=30),
- @ExcelField(title="设备识别码", attrName="sn", align= ExcelField.Align.CENTER, sort=40),
- @ExcelField(title="分类", attrName="cateName", align= ExcelField.Align.CENTER, sort=50),
- @ExcelField(title="IP地址", attrName="ip", align= ExcelField.Align.CENTER, sort=60),
- @ExcelField(title="产线编号", attrName="lineSn", align= ExcelField.Align.CENTER, sort=70),
- @ExcelField(title="工位", attrName="gw", align= ExcelField.Align.CENTER, sort=80),
- @ExcelField(title="设备工作状态", attrName="workStatus",dictType="mes_device_work_status", align= ExcelField.Align.CENTER, sort=90),
- @ExcelField(title="状态", attrName="workStatus",dictType="mes_device_work_status", align= ExcelField.Align.CENTER, sort=100),
- @ExcelField(title="备注", attrName="remark", align= ExcelField.Align.CENTER, sort=110),
- })
- public String getPostion() {
- return postion;
- }
- public void setPostion(String postion) {
- this.postion = postion;
- }
- public String getWorkStatus() {
- return workStatus;
- }
- public void setWorkStatus(String workStatus) {
- this.workStatus = workStatus;
- }
- public String getWorkTime() {
- return workTime;
- }
- public void setWorkTime(String workTime) {
- this.workTime = workTime;
- }
- public String getDeviceType() {
- return deviceType;
- }
- public void setDeviceType(String deviceType) {
- this.deviceType = deviceType;
- }
- public String getWorkType() {
- return workType;
- }
- public void setWorkType(String workType) {
- this.workType = workType;
- }
- public String getGw() {
- return gw;
- }
- public void setGw(String gw) {
- this.gw = gw;
- }
- public String getBc() {
- return bc;
- }
- public void setBc(String bc) {
- this.bc = bc;
- }
- public String getCateId() {
- return cateId;
- }
- public void setCateId(String cateId) {
- this.cateId = cateId;
- }
- public String getCateName() {
- return cateName;
- }
- public void setCateName(String cateName) {
- this.cateName = cateName;
- }
- /* @ExcelFields({
- @ExcelField(title="规格型号", attrName="spec", align=Align.CENTER, sort=30),
- @ExcelField(title="制造商", attrName="company", align=Align.CENTER, sort=40),
- @ExcelField(title="出场日期", attrName="outdate", align=Align.CENTER, sort=50, dataFormat="yyyy-MM-dd"),
- })*/
- public MesDevice() {
- this(null);
- }
-
- public MesDevice(String id){
- super(id);
- }
-
- @Override
- public MesDevice getParent() {
- return parent;
- }
- @Override
- public void setParent(MesDevice parent) {
- this.parent = parent;
- }
-
- public String getTreeCode() {
- return treeCode;
- }
- public void setTreeCode(String treeCode) {
- this.treeCode = treeCode;
- }
-
- @Size(min=0, max=255, message="备注长度不能超过 255 个字符")
- public String getRemark() {
- return remark;
- }
- public void setRemark(String remark) {
- this.remark = remark;
- }
-
- @NotBlank(message="节点名称不能为空")
- @Size(min=0, max=200, message="节点名称长度不能超过 200 个字符")
- public String getTreeName() {
- return treeName;
- }
- public void setTreeName(String treeName) {
- this.treeName = treeName;
- }
-
- @Size(min=0, max=255, message="唯一编号长度不能超过 255 个字符")
- public String getSn() {
- return sn;
- }
- public void setSn(String sn) {
- this.sn = sn;
- }
-
- @Size(min=0, max=255, message="IP地址长度不能超过 255 个字符")
- public String getIp() {
- return ip;
- }
- public void setIp(String ip) {
- this.ip = ip;
- }
-
- public Integer getOnline() {
- return online;
- }
- public void setOnline(Integer online) {
- this.online = online;
- }
- public String getParentSn() {
- return parentSn;
- }
- public void setParentSn(String parentSn) {
- this.parentSn = parentSn;
- }
- public Integer getInterval() {
- return interval;
- }
- public void setInterval(Integer interval) {
- this.interval = interval;
- }
- public String getProductSn() {
- return productSn;
- }
- public void setProductSn(String productSn) {
- this.productSn = productSn;
- }
- public String getProductCate() {
- return productCate;
- }
- public void setProductCate(String productCate) {
- this.productCate = productCate;
- }
- public String getLineSn() {
- return lineSn;
- }
- public void setLineSn(String lineSn) {
- this.lineSn = lineSn;
- }
- public String getDeviceCode() {
- return deviceCode;
- }
- public void setDeviceCode(String deviceCode) {
- this.deviceCode = deviceCode;
- }
- }
|