提交 98219fc7 authored 作者: aiqingguo's avatar aiqingguo

积分优化

上级 dcb3735b
package com.clx.performance.enums.collect;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.Optional;
public enum CollectLineReportEnum {
;
@Getter
@AllArgsConstructor
public enum Type {
SEND(1, "发货地"),
RECEIVE(2, "目的地");
private final Integer code;
private final String msg;
public static Optional<Type> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
}
//1:无法到达货源地 2:无法装货 3:无法到达目的地 4:运单取消 5:装车卸车异常 6:没有接单 7:货源地情况 8:其它上报 9:煤炭质量上报
@Getter
@AllArgsConstructor
public enum ReportType {
UNABLE_TO_SEND_ADDRESS(1, "无法到达货源地"),
UNABLE_LOAD(2, "无法装货"),
UNABLE_TO_RECEIVE_ADDRESS(3, "无法到达目的地"),
LOAD_UNLOAD(4, "装车卸车异常"),
NO_TAKE_ORDER(6, "没有接单"),
SEND_ADDRESS(7, "货源地情况"),
OTHER(8, "其它上报"),
QUALITY(9, "煤炭质量上报"),
;
private final Integer code;
private final String msg;
public static Optional<ReportType> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
}
@Getter
@AllArgsConstructor
public enum ReportStatus {
NORMAL(1, "正常"),
ABNORMAL(2, "异常");
private final Integer code;
private final String msg;
public static Optional<ReportStatus> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
}
@Getter
@AllArgsConstructor
public enum AuditStatus {
UNAUDIT(0, "待审核"),
AUDIT(1, "已审核");
private final Integer code;
private final String msg;
public static Optional<AuditStatus> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
}
}
package com.clx.performance.enums.collect;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.Optional;
public enum CollectTruckWaitEnum {
;
@Getter
@AllArgsConstructor
public enum ReportType {
LOAD(1, "装车类型"),
UNLOAD(2, "卸车类型");
private final Integer code;
private final String msg;
public static Optional<ReportType> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
}
@Getter
@AllArgsConstructor
public enum waitType {
LOAD(1, "装车类型"),
UNLOAD(2, "卸车类型");
private final Integer code;
private final String msg;
public static Optional<waitType> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
}
@Getter
@AllArgsConstructor
public enum AuditStatus {
UNAUDIT(0, "待审核"),
AUDIT(1, "已审核");
private final Integer code;
private final String msg;
public static Optional<AuditStatus> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
}
}
package com.clx.performance.vo.pc.collect;
import com.alibaba.fastjson.JSON;
import com.clx.performance.enums.collect.CollectLineReportEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......@@ -52,8 +53,20 @@ public class CollectLineReportVO {
private Integer type;
@ApiModelProperty(value = "上报类型(1~4异常上报):1:无法到达货源地 2:无法装货 3:无法到达目的地 4:装车卸车异常 6:没有接单 7:货源地情况 8:其它上报 9:煤炭质量上报", example = "")
private Integer reportType;
@ApiModelProperty(value = "上报类型(1~4异常上报):1:无法到达货源地 2:无法装货 3:无法到达目的地 4:装车卸车异常 6:没有接单 7:货源地情况 8:其它上报 9:煤炭质量上报", example = "")
private String reportTypeMsg;
public String getReportTypeMsg() {
return CollectLineReportEnum.ReportType.getByCode(reportType).get().getMsg();
}
@ApiModelProperty(value = "拉运状态 1: 正常 2:异常", example = "")
private Integer reportStatus;
@ApiModelProperty(value = "拉运状态 1: 正常 2:异常", example = "")
private String reportStatusMsg;
public String getReportStatusMsg() {
return CollectLineReportEnum.ReportStatus.getByCode(reportStatus).get().getMsg();
}
@ApiModelProperty(value = "状态描述", example = "")
private String remark;
@ApiModelProperty(value = "上报图片", example = "", hidden = true)
......@@ -68,6 +81,12 @@ public class CollectLineReportVO {
private String reportTime;
@ApiModelProperty(value = "审核状态:0待审核 1已审核", example = "")
private Integer auditStatus;
@ApiModelProperty(value = "审核状态:0待审核 1已审核", example = "")
private String auditStatusMsg;
public String getAuditStatusMsg() {
return CollectLineReportEnum.AuditStatus.getByCode(auditStatus).get().getMsg();
}
@ApiModelProperty(value = "创建时间", example = "")
private String createTime;
@ApiModelProperty(value = "修改时间", example = "")
......
package com.clx.performance.vo.pc.collect;
import com.alibaba.fastjson.JSON;
import com.clx.performance.enums.collect.CollectLineReportEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......@@ -10,7 +11,6 @@ import lombok.ToString;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
......@@ -68,6 +68,11 @@ public class CollectTrafficCongestionVO {
private String reportTime;
@ApiModelProperty(value = "审核状态:0待审核 1已审核", example = "")
private Integer auditStatus;
@ApiModelProperty(value = "审核状态:0待审核 1已审核", example = "")
private String auditStatusMsg;
public String getAuditStatusMsg() {
return CollectLineReportEnum.AuditStatus.getByCode(auditStatus).get().getMsg();
}
@ApiModelProperty(value = "创建时间", example = "")
private String createTime;
......
package com.clx.performance.vo.pc.collect;
import com.clx.performance.enums.collect.CollectTruckWaitEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......@@ -8,7 +9,6 @@ import lombok.Setter;
import lombok.ToString;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @Author: aiqinguo
......@@ -42,8 +42,21 @@ public class CollectTruckWaitVO {
private String address;
@ApiModelProperty(value = "上报类型:1 装车类型 2卸车类型", example = "")
private Integer reportType;
@ApiModelProperty(value = "上报类型:1 装车类型 2卸车类型", example = "")
private String reportTypeMsg;
public String getReportTypeMsg() {
return CollectTruckWaitEnum.ReportType.getByCode(reportType).get().getMsg();
}
@ApiModelProperty(value = "上报类型:1 需要排队 ", example = "")
private Integer waitType;
@ApiModelProperty(value = "上报类型:1 需要排队 ", example = "")
private String waitTypeMsg;
public String getWaitTypeMsg() {
return CollectTruckWaitEnum.waitType.getByCode(waitType).get().getMsg();
}
@ApiModelProperty(value = "预计站内等待时长", example = "")
private BigDecimal stationInTime;
@ApiModelProperty(value = "预计站内等待时长图片", example = "")
......@@ -54,6 +67,13 @@ public class CollectTruckWaitVO {
private String stationOutImage;
@ApiModelProperty(value = "上报时间", example = "")
private String reportTime;
@ApiModelProperty(value = "审核状态:0待审核 1已审核", example = "")
private Integer auditStatus;
@ApiModelProperty(value = "审核状态:0待审核 1已审核", example = "")
private String auditStatusMsg;
public String getAuditStatusMsg() {
return CollectTruckWaitEnum.AuditStatus.getByCode(auditStatus).get().getMsg();
}
@ApiModelProperty(value = "创建时间", example = "")
private String createTime;
@ApiModelProperty(value = "修改时间", example = "")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论