|
|
@@ -0,0 +1,181 @@
|
|
|
+package com.jeesite.modules.mes.entity;
|
|
|
+
|
|
|
+import com.jeesite.common.entity.DataEntity;
|
|
|
+import com.jeesite.common.mybatis.annotation.Column;
|
|
|
+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;
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 硬度检测Entity
|
|
|
+ * @author hzd
|
|
|
+ * @version 2026-07-14
|
|
|
+ */
|
|
|
+@Table(name="mes_hardness", alias="a", label="硬度检测", columns={
|
|
|
+ @Column(name="id", attrName="id", label="id", isPK=true),
|
|
|
+ @Column(name="sn", attrName="sn", label="工件码"),
|
|
|
+ @Column(name="standard_value", attrName="standardValue", label="标准值"),
|
|
|
+ @Column(name="actual_value1", attrName="actualValue1", label="实测值1"),
|
|
|
+ @Column(name="actual_value2", attrName="actualValue2", label="实测值2"),
|
|
|
+ @Column(name="actual_value3", attrName="actualValue3", label="实测值3"),
|
|
|
+ @Column(name="avg_value", attrName="avgValue", label="平均值"),
|
|
|
+ @Column(name="result", attrName="result", label="判定结果"),
|
|
|
+ @Column(name="type", attrName="type", label="类型"),
|
|
|
+ @Column(name="unit", attrName="unit", label="测量单位"),
|
|
|
+ @Column(name="measure_date", attrName="measureDate", label="测量日期"),
|
|
|
+ @Column(name="remark", attrName="remark", label="备注"),
|
|
|
+ @Column(name="create_by", attrName="createBy", label="创建人", isUpdate=false, isQuery=false),
|
|
|
+ @Column(name="create_date", attrName="createDate", label="创建日期", isUpdate=false, isQuery=false, isUpdateForce=true),
|
|
|
+ @Column(name="update_by", attrName="updateBy", label="更新人", isQuery=false),
|
|
|
+ @Column(name="update_date", attrName="updateDate", label="更新日期", isUpdateForce=true),
|
|
|
+ }, orderBy="a.measure_date DESC"
|
|
|
+)
|
|
|
+public class MesHardness extends DataEntity<MesHardness> {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+ private String sn; // 工件码
|
|
|
+ private String standardValue; // 标准值
|
|
|
+ private Integer actualValue1; // 实测值1
|
|
|
+ private Integer actualValue2; // 实测值2
|
|
|
+ private Integer actualValue3; // 实测值3
|
|
|
+ private Integer avgValue; // 平均值
|
|
|
+ private String result; // 判定结果
|
|
|
+ private String type; // 类型
|
|
|
+ private String unit; // 测量单位
|
|
|
+ private Date measureDate; // 测量日期
|
|
|
+ private String remark; // 备注
|
|
|
+
|
|
|
+ @ExcelFields({
|
|
|
+ @ExcelField(title="工件码", attrName="sn", align= ExcelField.Align.CENTER, sort=10),
|
|
|
+ @ExcelField(title="标准值", attrName="standardValue", align= ExcelField.Align.CENTER, sort=20),
|
|
|
+ @ExcelField(title="实测值1", attrName="actualValue1", align= ExcelField.Align.CENTER, sort=30),
|
|
|
+ @ExcelField(title="实测值2", attrName="actualValue2", align= ExcelField.Align.CENTER, sort=40),
|
|
|
+ @ExcelField(title="实测值3", attrName="actualValue3", align= ExcelField.Align.CENTER, sort=50),
|
|
|
+ @ExcelField(title="平均值", attrName="avgValue", align= ExcelField.Align.CENTER, sort=60),
|
|
|
+ @ExcelField(title="判定结果", attrName="result", align= ExcelField.Align.CENTER, sort=70),
|
|
|
+ @ExcelField(title="类型", attrName="type", align= ExcelField.Align.CENTER, sort=80),
|
|
|
+ @ExcelField(title="测量单位", attrName="unit", align= ExcelField.Align.CENTER, sort=90),
|
|
|
+ @ExcelField(title="备注", attrName="remark", align= ExcelField.Align.CENTER, sort=100),
|
|
|
+ @ExcelField(title="测量日期", attrName="measureDate", align= ExcelField.Align.CENTER, sort=110, dataFormat="yyyy-MM-dd"),
|
|
|
+ })
|
|
|
+
|
|
|
+ public MesHardness() {
|
|
|
+ this(null);
|
|
|
+ }
|
|
|
+
|
|
|
+ public MesHardness(String id){
|
|
|
+ super(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @NotBlank(message="工件码不能为空")
|
|
|
+ @Size(min=0, max=100, message="工件码长度不能超过 100 个字符")
|
|
|
+ public String getSn() {
|
|
|
+ return sn;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSn(String sn) {
|
|
|
+ this.sn = sn;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getStandardValue() {
|
|
|
+ return standardValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setStandardValue(String standardValue) {
|
|
|
+ this.standardValue = standardValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getActualValue1() {
|
|
|
+ return actualValue1;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setActualValue1(Integer actualValue1) {
|
|
|
+ this.actualValue1 = actualValue1;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getActualValue2() {
|
|
|
+ return actualValue2;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setActualValue2(Integer actualValue2) {
|
|
|
+ this.actualValue2 = actualValue2;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getActualValue3() {
|
|
|
+ return actualValue3;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setActualValue3(Integer actualValue3) {
|
|
|
+ this.actualValue3 = actualValue3;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getAvgValue() {
|
|
|
+ return avgValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAvgValue(Integer avgValue) {
|
|
|
+ this.avgValue = avgValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getResult() {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setResult(String result) {
|
|
|
+ this.result = result;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getType() {
|
|
|
+ return type;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setType(String type) {
|
|
|
+ this.type = type;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getUnit() {
|
|
|
+ return unit;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setUnit(String unit) {
|
|
|
+ this.unit = unit;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getMeasureDate() {
|
|
|
+ return measureDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMeasureDate(Date measureDate) {
|
|
|
+ this.measureDate = measureDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min=0, max=255, message="备注长度不能超过 255 个字符")
|
|
|
+ public String getRemark() {
|
|
|
+ return remark;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setRemark(String remark) {
|
|
|
+ this.remark = remark;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getMeasureDate_gte() {
|
|
|
+ return sqlMap.getWhere().getValue("measure_date", QueryType.GTE);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMeasureDate_gte(Date measureDate) {
|
|
|
+ sqlMap.getWhere().and("measure_date", QueryType.GTE, measureDate);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getMeasureDate_lte() {
|
|
|
+ return sqlMap.getWhere().getValue("measure_date", QueryType.LTE);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMeasureDate_lte(Date measureDate) {
|
|
|
+ sqlMap.getWhere().and("measure_date", QueryType.LTE, measureDate);
|
|
|
+ }
|
|
|
+}
|