提交 f4ff121e authored 作者: aiqingguo's avatar aiqingguo

车辆层级配置

上级 34ab3c4b
......@@ -59,6 +59,20 @@ public enum CollectLineReportEnum {
}
}
@Getter
@AllArgsConstructor
public enum CoalStatus {
NO(1, "否"),
EXIST(2, "有存煤"),
PRODUCTION(3, "现产现装");
private final Integer code;
private final String msg;
public static Optional<CoalStatus> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
}
@Getter
@AllArgsConstructor
public enum AuditStatus {
......
......@@ -18,7 +18,7 @@ public class CarrierPageCollectSendAddressReportParam extends PageParam {
private String mobile;
@ApiModelProperty(value = "车牌号", example = "")
private String truckNo;
@ApiModelProperty(value = "是否可拉运:1可以拉运 2不可用拉运", example = "1")
@ApiModelProperty(value = "是否可拉运:1否 2有存煤 3现产现装", example = "1")
private Integer reportStatus;
@ApiModelProperty(value = "货源地", example = "")
private String sendAddress;
......
......@@ -12,6 +12,7 @@ import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* @Author: aiqinguo
......@@ -66,7 +67,9 @@ public class CollectLineReportVO {
@ApiModelProperty(value = "拉运状态 1: 正常 2:异常", example = "")
private String reportStatusMsg;
public String getReportStatusMsg() {
return CollectLineReportEnum.ReportStatus.getByCode(reportStatus).get().getMsg();
return Objects.equals(CollectLineReportEnum.ReportType.SEND_ADDRESS.getCode(), reportType)?
CollectLineReportEnum.CoalStatus.getByCode(reportStatus).get().getMsg() :
CollectLineReportEnum.ReportStatus.getByCode(reportStatus).get().getMsg();
}
@ApiModelProperty(value = "状态描述", example = "")
......
......@@ -65,8 +65,17 @@ public class CollectLineReportServiceImpl implements CollectLineReportService {
collectLineReport.setType(CollectLineReport.Type.SEND.getCode());
collectLineReport.setReportType(CollectLineReport.ReportType.SEND_ADDRESS.getCode());
collectLineReport.setReportStatus(param.getReportStatus());
collectLineReport.setRemark(param.getStatus()==1? "有存煤" : "现产现装");
Integer reportStatus;
if (param.getReportStatus() == 2){
reportStatus = 1;
}
else {
if (param.getStatus() == 1){reportStatus = 2;}
else {reportStatus = 3;}
}
collectLineReport.setReportStatus(reportStatus);
collectLineReport.setRemark(reportStatus==1? "否" : (reportStatus==2? "有存煤" : "现产现装"));
collectLineReport.setReportTime(LocalDateTime.now());
collectLineReport.setCreateTime(collectLineReport.getReportTime());
collectLineReportDao.saveEntity(collectLineReport);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论