| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- package com.jeesite.modules.mes.entity;
- import javax.validation.constraints.NotBlank;
- import javax.validation.constraints.Size;
- import com.jeesite.common.entity.DataEntity;
- import com.jeesite.common.mybatis.annotation.Column;
- import com.jeesite.common.mybatis.annotation.JoinTable;
- 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.ExcelField.Align;
- import com.jeesite.common.utils.excel.annotation.ExcelFields;
- import java.util.Date;
- /**
- * 工位设备信息记录Entity
- * @author mes
- * @version 2024-08-17
- */
- @Table(name="mes_device_client", alias="a", label="工位设备信息记录信息", columns={
- @Column(name="id", attrName="id", label="id", isPK=true),
- @Column(name="tree_name", attrName="treeName", label="设备名称", queryType=QueryType.LIKE),
- @Column(name="sn", attrName="sn", label="唯一编号"),
- @Column(name="cate_id", attrName="cateId", label="分类"),
- @Column(name="line_sn", attrName="lineSn", label="产线编号"),
- @Column(name="oprno", attrName="oprno", label="工位"),
- @Column(name="remark", attrName="remark", label="备注", isQuery=false),
- @Column(name="device_code", attrName="deviceCode", label="设备识别码"),
- @Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
- @Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false, isUpdateForce=true),
- @Column(name="update_by", attrName="updateBy", label="更新人"),
- @Column(name="update_date", attrName="updateDate", label="更新日期", isUpdateForce=true),
- }, joinTable={
- @JoinTable(type= JoinTable.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.update_date DESC"
- )
- public class MesDeviceClient extends DataEntity<MesDeviceClient> {
-
- private static final long serialVersionUID = 1L;
- private String treeName; // 设备名称
- private String sn; // 唯一编号
- private String cateId; // 分类
- private String cateName; // 分类名称
- private String lineSn; // 产线编号
- private String oprno; // 工位
- private String remark; // 备注
- private String deviceCode; // 设备识别码
- @ExcelFields({
- @ExcelField(title="设备名称", attrName="treeName", align=Align.CENTER, sort=20),
- @ExcelField(title="唯一编号", attrName="sn", align=Align.CENTER, sort=30),
- @ExcelField(title="分类", attrName="cateId", align=Align.CENTER, sort=40),
- @ExcelField(title="产线编号", attrName="lineSn", align=Align.CENTER, sort=50),
- @ExcelField(title="工位", attrName="oprno", align=Align.CENTER, sort=60),
- @ExcelField(title="备注", attrName="remark", align=Align.CENTER, sort=70),
- @ExcelField(title="更新人", attrName="updateBy", align=Align.CENTER, sort=100),
- @ExcelField(title="更新日期", attrName="updateDate", align=Align.CENTER, sort=110, dataFormat="yyyy-MM-dd hh:mm"),
- })
- public MesDeviceClient() {
- this(null);
- }
-
- public MesDeviceClient(String id){
- super(id);
- }
-
- @NotBlank(message="设备名称不能为空")
- @Size(min=0, max=200, message="设备名称长度不能超过 200 个字符")
- public String getTreeName() {
- return treeName;
- }
- public void setTreeName(String treeName) {
- this.treeName = treeName;
- }
-
- @NotBlank(message="唯一编号不能为空")
- @Size(min=0, max=255, message="唯一编号长度不能超过 255 个字符")
- public String getSn() {
- return sn;
- }
- public void setSn(String sn) {
- this.sn = sn;
- }
-
- @NotBlank(message="分类不能为空")
- @Size(min=0, max=64, message="分类长度不能超过 64 个字符")
- public String getCateId() {
- return cateId;
- }
- public void setCateId(String cateId) {
- this.cateId = cateId;
- }
-
- @NotBlank(message="产线编号不能为空")
- @Size(min=0, max=100, message="产线编号长度不能超过 100 个字符")
- public String getLineSn() {
- return lineSn;
- }
- public void setLineSn(String lineSn) {
- this.lineSn = lineSn;
- }
-
- @NotBlank(message="工位不能为空")
- @Size(min=0, max=255, message="工位长度不能超过 255 个字符")
- public String getOprno() {
- return oprno;
- }
- public void setOprno(String oprno) {
- this.oprno = oprno;
- }
-
- @Size(min=0, max=255, message="备注长度不能超过 255 个字符")
- public String getRemark() {
- return remark;
- }
- public void setRemark(String remark) {
- this.remark = remark;
- }
-
- public Date getUpdateDate_gte() {
- return sqlMap.getWhere().getValue("update_date", QueryType.GTE);
- }
- public void setUpdateDate_gte(Date updateDate) {
- sqlMap.getWhere().and("update_date", QueryType.GTE, updateDate);
- }
-
- public Date getUpdateDate_lte() {
- return sqlMap.getWhere().getValue("update_date", QueryType.LTE);
- }
- public void setUpdateDate_lte(Date updateDate) {
- sqlMap.getWhere().and("update_date", QueryType.LTE, updateDate);
- }
- public String getCateName() {
- return cateName;
- }
- public void setCateName(String cateName) {
- this.cateName = cateName;
- }
- public String getDeviceCode() {
- return deviceCode;
- }
- public void setDeviceCode(String deviceCode) {
- this.deviceCode = deviceCode;
- }
- }
|