feat():枚举类报错修复,时间格式转换
This commit is contained in:
@@ -10,6 +10,7 @@ import lombok.Getter;
|
|||||||
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
public enum NextUnitEnum {
|
public enum NextUnitEnum {
|
||||||
|
|
||||||
|
|
||||||
COLD(1,"冷硬卷"),
|
COLD(1,"冷硬卷"),
|
||||||
HOT(2,"退火卷"),
|
HOT(2,"退火卷"),
|
||||||
OTHER(3,"其他");
|
OTHER(3,"其他");
|
||||||
@@ -25,6 +26,6 @@ public enum NextUnitEnum {
|
|||||||
return unit;
|
return unit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Invalid code: " + code);
|
return OTHER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import lombok.Getter;
|
|||||||
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
public enum OperModeEnum {
|
public enum OperModeEnum {
|
||||||
|
|
||||||
|
UNKNOWN(0,"未知"),
|
||||||
FORCE(1,"轧制力模式"),
|
FORCE(1,"轧制力模式"),
|
||||||
ELONG(2,"延伸率模式");
|
ELONG(2,"延伸率模式");
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ public enum OperModeEnum {
|
|||||||
return modeEnum;
|
return modeEnum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Invalid code: " + code);
|
return UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import lombok.Getter;
|
|||||||
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
public enum PlanStatusEnum {
|
public enum PlanStatusEnum {
|
||||||
|
|
||||||
|
UNKNOWN("UNKNOWN","未知状态"),
|
||||||
NEW("NEW","新计划"),
|
NEW("NEW","新计划"),
|
||||||
READY("READY","准备好"),
|
READY("READY","准备好"),
|
||||||
ONLINE("ONLINE","上线"),
|
ONLINE("ONLINE","上线"),
|
||||||
@@ -27,6 +28,6 @@ public enum PlanStatusEnum {
|
|||||||
return planStatus;
|
return planStatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Invalid status: " + status);
|
return UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.fizz.business.domain;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fizz.business.constants.enums.NextUnitEnum;
|
import com.fizz.business.constants.enums.NextUnitEnum;
|
||||||
import com.fizz.business.constants.enums.OperModeEnum;
|
import com.fizz.business.constants.enums.OperModeEnum;
|
||||||
import com.fizz.business.constants.enums.PlanStatusEnum;
|
import com.fizz.business.constants.enums.PlanStatusEnum;
|
||||||
@@ -128,18 +129,23 @@ public class CrmPdiPlan implements Serializable {
|
|||||||
@ApiModelProperty(value = "厚度正偏差")
|
@ApiModelProperty(value = "厚度正偏差")
|
||||||
private Float entryThickMintol;
|
private Float entryThickMintol;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "计划日期")
|
@ApiModelProperty(value = "计划日期")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "记录日期")
|
@ApiModelProperty(value = "记录日期")
|
||||||
private LocalDateTime insdate;
|
private LocalDateTime insdate;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "上线时间")
|
@ApiModelProperty(value = "上线时间")
|
||||||
private LocalDateTime onlineTime;
|
private LocalDateTime onlineTime;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "开始日期")
|
@ApiModelProperty(value = "开始日期")
|
||||||
private LocalDateTime startDate;
|
private LocalDateTime startDate;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "结束日期")
|
@ApiModelProperty(value = "结束日期")
|
||||||
private LocalDateTime endDate;
|
private LocalDateTime endDate;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.fizz.business.vo;
|
package com.fizz.business.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fizz.business.constants.enums.NextUnitEnum;
|
import com.fizz.business.constants.enums.NextUnitEnum;
|
||||||
import com.fizz.business.constants.enums.OperModeEnum;
|
import com.fizz.business.constants.enums.OperModeEnum;
|
||||||
import com.fizz.business.constants.enums.PlanStatusEnum;
|
import com.fizz.business.constants.enums.PlanStatusEnum;
|
||||||
@@ -123,18 +124,23 @@ public class CrmPdiPlanVO {
|
|||||||
@ApiModelProperty(value = "厚度正偏差")
|
@ApiModelProperty(value = "厚度正偏差")
|
||||||
private Float entryThickMintol;
|
private Float entryThickMintol;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "计划日期")
|
@ApiModelProperty(value = "计划日期")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "记录日期")
|
@ApiModelProperty(value = "记录日期")
|
||||||
private LocalDateTime insdate;
|
private LocalDateTime insdate;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "上线时间")
|
@ApiModelProperty(value = "上线时间")
|
||||||
private LocalDateTime onlineTime;
|
private LocalDateTime onlineTime;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "开始日期")
|
@ApiModelProperty(value = "开始日期")
|
||||||
private LocalDateTime startDate;
|
private LocalDateTime startDate;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "结束日期")
|
@ApiModelProperty(value = "结束日期")
|
||||||
private LocalDateTime endDate;
|
private LocalDateTime endDate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user