doum
2025-09-15 82735e4d46ac7b9969facef2acc8f8e793b68f71
server/services/src/main/java/com/doumee/core/constants/Constants.java
@@ -1,5 +1,6 @@
package com.doumee.core.constants;
import com.doumee.dao.business.model.Orders;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -56,6 +57,7 @@
    public static final String AUTO_DISPATCH ="AUTO_DISPATCH" ;
    public static final String AUTO_DISPATCH_DISTANCE ="AUTO_DISPATCH_DISTANCE" ;
    public static final String AUTO_CONFIRM ="AUTO_CONFIRM" ;
    public static final String AUTO_CANCEL_WAIT_PAY ="AUTO_CANCEL_WAIT_PAY" ;
    public static final String QYWX = "QYWX";
    public static final  Integer ONE = 1;
@@ -561,22 +563,23 @@
    public  enum ordersStatus {
        waitPay(0, "待支付"),
        wait(1, "待接单"),
        accept(2, "已接单"),
        doing(3, "进行中"),
        done(4, "已完成"),
        feeconfirm(5, "已确认费用"),
        cancel(99, "已取消"),
        waitPay(0, "待支付","待支付"),
        wait(1, "待接单","待接单"),
        accept(2, "已接单","已接单"),
        doing(3, "进行中","进行中"),
        done(4, "已完成","已完成"),
        feeconfirm(5, "待支付","待发单方支付"),//金额已确认
        cancel(99, "已取消","已取消"),
        ;
        // 成员变量
        private int key;
        private String name;
        private String name; //接单方文案
        private String info; //发单方文案
        // 构造方法
        ordersStatus(int key, String name) {
        ordersStatus(int key, String name,String info) {
            this.name = name;
            this.key = key;
            this.info = info;
        }
        // 普通方法
@@ -584,6 +587,15 @@
            for (ordersStatus c : ordersStatus.values()) {
                if (c.getKey() == index) {
                    return c.name;
                }
            }
            return null;
        }
        public static String getInfo(int index) {
            for (ordersStatus c : ordersStatus.values()) {
                if (c.getKey() == index) {
                    return c.info;
                }
            }
            return null;
@@ -603,6 +615,14 @@
        public void setKey(int key) {
            this.key = key;
        }
        public String getInfo() {
            return info;
        }
        public void setInfo(String info) {
            this.info = info;
        }
    }
@@ -717,6 +737,21 @@
    }
    public static  String getOrderInfo(Orders orders){
        String orderTypeInfo = "用工单";
        if(!Constants.equalsInteger(orders.getType(),Constants.ZERO)){
            orderTypeInfo =   Constants.equalsInteger(orders.getType(),Constants.ONE)?"用车单":"送餐单";
        }else{
            if(Constants.equalsInteger(orders.getWorkType(),Constants.ZERO)){
                orderTypeInfo = orderTypeInfo + "-采摘工";
            }else{
                orderTypeInfo = orderTypeInfo + (Constants.equalsInteger(orders.getWorkType(),Constants.ONE)?"-分拣工":"-包装工");
            }
        }
        return orderTypeInfo;
    }
}