## bug425 物流管理菜单下订单类型转枚举
This commit is contained in:
parent
715f7ed3dc
commit
4f168e9a14
|
@ -126,6 +126,20 @@ public class SaDeliverUnhandledController extends BaseController {
|
|||
OrderUtil.handleOrderAddress(areaMap, deliverUnhandled);
|
||||
// 订单类型枚举转换
|
||||
deliverUnhandled.setOrderTypeVal(EOrderType.getLabelByValue(deliverUnhandled.getOrderType()));
|
||||
// 销售类型
|
||||
deliverUnhandled.setIsGiftVal(ESaleType.getLabelByValue(deliverUnhandled.getIsGift()));
|
||||
// 发货类型
|
||||
deliverUnhandled.setShippingChannelVal(EShippingChannel.getLabelByValue(deliverUnhandled.getShippingChannel()));
|
||||
// 订单状态
|
||||
deliverUnhandled.setOrderStatusVal(EOrderStatus.getLabelByValue(deliverUnhandled.getOrderStatus()));
|
||||
// 发货方式
|
||||
deliverUnhandled.setDeliveryWayVal(EDelivery.getLabelByValue(deliverUnhandled.getDeliveryWay()));
|
||||
// 供应方式
|
||||
deliverUnhandled.setOperateScopeVal(ESupplyWay.getLabelByVal(deliverUnhandled.getOperateScope()));
|
||||
// 运输方式
|
||||
deliverUnhandled.setTranTypeVal(ETransportType.getLabelByValue(deliverUnhandled.getTranType()));
|
||||
// 预售状态
|
||||
deliverUnhandled.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(deliverUnhandled.getPreSaleStatus()));
|
||||
}
|
||||
}
|
||||
return getDataTable(resultList);
|
||||
|
@ -176,14 +190,22 @@ public class SaDeliverUnhandledController extends BaseController {
|
|||
// 省市区处理
|
||||
OrderUtil.handleOrderAddress(areaMap, deliverUnhandled);
|
||||
|
||||
deliverUnhandled.setIsGiftVal(transactionMap.get(EnumsPrefixConstants.E_SALE_TYPE + deliverUnhandled.getIsGift()));
|
||||
deliverUnhandled.setDeliveryWayVal(transactionMap.get(EnumsPrefixConstants.DELIVERY + deliverUnhandled.getDeliveryWay()));
|
||||
deliverUnhandled.setOperateScopeVal(transactionMap.get(EnumsPrefixConstants.SUPPLY_WAY + deliverUnhandled.getOperateScope()));
|
||||
deliverUnhandled.setShippingChannelVal(transactionMap.get(EnumsPrefixConstants.E_SHIPPING_CHANNEL + deliverUnhandled.getShippingChannel()));
|
||||
deliverUnhandled.setTranTypeVal(transactionMap.get(EnumsPrefixConstants.ENU_TRA + deliverUnhandled.getTranType()));
|
||||
deliverUnhandled.setPreSaleStatusVal(transactionMap.get(EnumsPrefixConstants.PRESALE_STATUS + deliverUnhandled.getPreSaleStatus()));
|
||||
deliverUnhandled.setOrderTypeVal(transactionMap.get(EnumsPrefixConstants.ORDER_TYPE + deliverUnhandled.getOrderType()));
|
||||
deliverUnhandled.setOrderStatusVal(transactionMap.get(EnumsPrefixConstants.ORDER_STATUS + deliverUnhandled.getOrderStatus()));
|
||||
// 订单类型枚举转换
|
||||
deliverUnhandled.setOrderTypeVal(EOrderType.getLabelByValue(deliverUnhandled.getOrderType()));
|
||||
// 销售类型
|
||||
deliverUnhandled.setIsGiftVal(ESaleType.getLabelByValue(deliverUnhandled.getIsGift()));
|
||||
// 发货类型
|
||||
deliverUnhandled.setShippingChannelVal(EShippingChannel.getLabelByValue(deliverUnhandled.getShippingChannel()));
|
||||
// 订单状态
|
||||
deliverUnhandled.setOrderStatusVal(EOrderStatus.getLabelByValue(deliverUnhandled.getOrderStatus()));
|
||||
// 发货方式
|
||||
deliverUnhandled.setDeliveryWayVal(EDelivery.getLabelByValue(deliverUnhandled.getDeliveryWay()));
|
||||
// 供应方式
|
||||
deliverUnhandled.setOperateScopeVal(ESupplyWay.getLabelByVal(deliverUnhandled.getOperateScope()));
|
||||
// 运输方式
|
||||
deliverUnhandled.setTranTypeVal(ETransportType.getLabelByValue(deliverUnhandled.getTranType()));
|
||||
// 预售状态
|
||||
deliverUnhandled.setPreSaleStatusVal(EPresaleStatus.getLabelByValue(deliverUnhandled.getPreSaleStatus()));
|
||||
}
|
||||
}
|
||||
ExcelUtil<DeliverUnhandledVO> util = new ExcelUtil<>(DeliverUnhandledVO.class);
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.hzs.common.core.annotation.Excel;
|
|||
import com.hzs.common.core.annotation.Transaction;
|
||||
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||
import lombok.Data;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
@ -89,7 +90,6 @@ public class DeliverUnhandledVO {
|
|||
/**
|
||||
* 销售类型
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.E_SALE_TYPE)
|
||||
@JsonIgnore
|
||||
private Integer isGift;
|
||||
/**
|
||||
|
@ -153,7 +153,6 @@ public class DeliverUnhandledVO {
|
|||
/**
|
||||
* 发货类型
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.E_SHIPPING_CHANNEL)
|
||||
@JsonIgnore
|
||||
private Integer shippingChannel;
|
||||
/**
|
||||
|
@ -178,7 +177,6 @@ public class DeliverUnhandledVO {
|
|||
/**
|
||||
* 订单状态(EOrderStatus)
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.ORDER_STATUS)
|
||||
private Integer orderStatus;
|
||||
/**
|
||||
* 订单状态显示
|
||||
|
@ -190,7 +188,6 @@ public class DeliverUnhandledVO {
|
|||
* 发货方式(EDelivery)
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.DELIVERY)
|
||||
private Integer deliveryWay;
|
||||
/**
|
||||
* 发货方式显示
|
||||
|
@ -202,7 +199,6 @@ public class DeliverUnhandledVO {
|
|||
* 供应方式(ESupplyWay)
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.SUPPLY_WAY)
|
||||
private Integer operateScope;
|
||||
/**
|
||||
* 供应方式显示
|
||||
|
@ -214,7 +210,6 @@ public class DeliverUnhandledVO {
|
|||
* 运输方式(ETransportType)
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.ENU_TRA)
|
||||
private Integer tranType;
|
||||
/**
|
||||
* 运输方式显示
|
||||
|
@ -226,7 +221,6 @@ public class DeliverUnhandledVO {
|
|||
* 预售状态(EPresaleStatus)
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.PRESALE_STATUS)
|
||||
private Integer preSaleStatus;
|
||||
/**
|
||||
* 预售状态显示
|
||||
|
|
|
@ -624,6 +624,10 @@ public class SaOrderController extends ParentOrderController {
|
|||
}
|
||||
// 订单类型枚举转换
|
||||
vo.setOrderTypeVal(EOrderType.getLabelByValue(vo.getOrderType()));
|
||||
// 发货方式
|
||||
vo.setDeliveryWayVal(EDelivery.getLabelByValue(vo.getDeliveryWay()));
|
||||
// 供应方式
|
||||
vo.setPayTypeVal(EPayType.getEnumByValue(vo.getPayType()).getLabel());
|
||||
}
|
||||
return getDataTable(resultList);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,6 @@ public class OrderInvoicingVO implements Serializable {
|
|||
/**
|
||||
* 发货方式
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.DELIVERY)
|
||||
private Integer deliveryWay;
|
||||
/**
|
||||
* 发货方式显示
|
||||
|
@ -131,7 +130,6 @@ public class OrderInvoicingVO implements Serializable {
|
|||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
@Transaction(transactionKey = EnumsPrefixConstants.ORDER_PAY_TYPE)
|
||||
private Integer payType;
|
||||
/**
|
||||
* 支付方式显示
|
||||
|
|
|
@ -34,4 +34,16 @@ public enum ESaleType {
|
|||
*/
|
||||
private final String key;
|
||||
|
||||
public static String getLabelByValue(Integer value) {
|
||||
if (null == value) {
|
||||
return "";
|
||||
}
|
||||
for (ESaleType enums : ESaleType.values()) {
|
||||
if (enums.getValue() == value) {
|
||||
return enums.getLabel();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue