|
|
@@ -731,7 +731,28 @@ public class WaybillOrderService {
|
|
|
|
|
|
//状态
|
|
|
wbOrderResp.setStatus(wbOrder.getStatus());
|
|
|
- wbOrderResp.setStatusDesc(CarWaybillV1Enum.geDesc(wbOrder.getStatus()));
|
|
|
+ // 使用已定义的常量集合来判断状态
|
|
|
+ List<Integer> statusList = Arrays.asList(
|
|
|
+ CarWaybillV1Enum.PENDING_VEHICLE.getCode(),
|
|
|
+ CarWaybillV1Enum.REFUSE_TRAFFIC.getCode(),
|
|
|
+ CarWaybillV1Enum.EXIT_COMPLETED.getCode(),
|
|
|
+ CarWaybillV1Enum.WAIT_LOADING.getCode(),
|
|
|
+ CarWaybillV1Enum.WEIGHT_TRAFFIC.getCode(),
|
|
|
+ CarWaybillV1Enum.WAIT_LOADING.getCode());
|
|
|
+ if (statusList.contains(wbOrder.getStatus())) {
|
|
|
+ wbOrderResp.setStatusDesc("进行中");
|
|
|
+ } else if (Objects.equals(wbOrder.getStatus(), CarWaybillV1Enum.COMPLETION_LOADING.getCode())) {
|
|
|
+ wbOrderResp.setStatusDesc("待审核");
|
|
|
+ } else if (Objects.equals(wbOrder.getStatus(), CarWaybillV1Enum.WAIT_UNLOADING.getCode())) {
|
|
|
+ wbOrderResp.setStatusDesc("已完成");
|
|
|
+ } else if (Objects.equals(wbOrder.getStatus(), CarWaybillV1Enum.COMPLETION_UNLOADING.getCode())) {
|
|
|
+ wbOrderResp.setStatusDesc("待修改");
|
|
|
+ } else if (Objects.equals(wbOrder.getStatus(), CarWaybillV1Enum.APPROVAL_TREAT.getCode())) {
|
|
|
+ wbOrderResp.setStatusDesc("已取消");
|
|
|
+ } else {
|
|
|
+ wbOrderResp.setStatusDesc("未知状态");
|
|
|
+ }
|
|
|
+
|
|
|
return wbOrderResp;
|
|
|
|
|
|
}
|