Commit c1f9347c authored by liao_ds's avatar liao_ds

Merge remote-tracking branch 'origin/v2' into v2

parents be49f401 c752fab4
......@@ -97,4 +97,13 @@ public enum OrderTypeEnum {
OrderTypeEnum typeEnum = Arrays.stream(OrderTypeEnum.values()).filter(e -> e.getCode().equals(code)).findFirst().orElse(null);
return typeEnum == null ? "未知" : typeEnum.getName();
}
/**
* 根据类型枚举值获取枚举
* @param code 类型枚举值
* @return 枚举
*/
public static OrderTypeEnum parse(Integer code) {
return Arrays.stream(OrderTypeEnum.values()).filter(e -> e.getCode().equals(code)).findFirst().orElse(null);
}
}
......@@ -1291,6 +1291,7 @@ public enum ResponseCode {
ORDER_STATUS_IS_NOT_MATCHED(37158, "订单状态不正确,不允许操作"),
ORDER_CONTRACT_CAN_NOT_BE_EMPTY(37159, "请选择合同"),
ORDER_INVOICE_CAN_NOT_BE_EMPTY(37160, "请选择发票"),
ORDER_TYPE_DOES_NOT_EXIST(37161, "订单类型参数错误"),
//****************************************
......
package com.ssy.lingxi.order.model.vo.common.request;
import com.ssy.lingxi.common.model.vo.PageVO;
import com.ssy.lingxi.order.handler.annotation.DateStringFormatAnnotation;
import com.ssy.lingxi.order.handler.annotation.OrderTypeAnnotation;
import javax.validation.constraints.NotNull;
......@@ -50,11 +51,13 @@ public class OrderAfterSalePageVO extends PageVO implements Serializable {
/**
* 下单起始日期,格式为yyyy-MM-dd
*/
@DateStringFormatAnnotation
private String startDate;
/**
* 下单结束日期,格式为yyyy-MM-dd
*/
@DateStringFormatAnnotation
private String endDate;
public Long getVendorMemberId() {
......
package com.ssy.lingxi.order.model.vo.common.response;
import com.ssy.lingxi.common.constant.order.OrderTypeEnum;
import com.ssy.lingxi.order.model.constant.OrderOuterStatusEnum;
import com.ssy.lingxi.order.model.constant.OrderServiceContants;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -12,6 +20,20 @@ import java.util.List;
public class OrderAfterSalePageQueryVO implements Serializable {
private static final long serialVersionUID = -1429417821303763899L;
public OrderAfterSalePageQueryVO(Long orderId, String orderNo, String vendorMemberName, Integer orderType, LocalDateTime createTime, Integer outerStatus, Long contractId, String contractNo, List<OrderAfterSaleProductDetailVO> products) {
this.orderId = orderId;
this.orderNo = orderNo;
this.vendorMemberName = vendorMemberName;
this.orderType = orderType;
this.orderTypeName = OrderTypeEnum.getNameByCode(this.orderType);
this.createTime = createTime.format(OrderServiceContants.DEFAULT_TIME_FORMATTER);
this.outerStatus = outerStatus;
this.outerStatusName = OrderOuterStatusEnum.getNameByCode(this.getOuterStatus());
this.contractId = contractId == null ? 0L : contractId;
this.contractNo = StringUtils.hasLength(contractNo) ? contractNo : "";
this.products = CollectionUtils.isEmpty(products) ? new ArrayList<>() : products;
}
/**
* 订单Id
*/
......@@ -53,6 +75,11 @@ public class OrderAfterSalePageQueryVO implements Serializable {
private String outerStatusName;
/**
* 合同Id
*/
private Long contractId;
/**
* 合同编号
*/
private String contractNo;
......@@ -126,6 +153,14 @@ public class OrderAfterSalePageQueryVO implements Serializable {
this.outerStatusName = outerStatusName;
}
public Long getContractId() {
return contractId;
}
public void setContractId(Long contractId) {
this.contractId = contractId;
}
public String getContractNo() {
return contractNo;
}
......
package com.ssy.lingxi.order.model.vo.common.response;
import com.ssy.lingxi.order.utils.NumberUtil;
import org.springframework.util.StringUtils;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 售后能力 - 退货换货 - 查询订单商品
......@@ -11,6 +15,25 @@ import java.io.Serializable;
public class OrderAfterSaleProductDetailVO implements Serializable {
private static final long serialVersionUID = -2975506613066526558L;
public OrderAfterSaleProductDetailVO(String processKey, Long skuId, String productNo, String name, String category, String brand, String unit, String spec, BigDecimal quantity, BigDecimal price, BigDecimal amount, BigDecimal exchangeCount, BigDecimal returnCount) {
this.processKey = StringUtils.hasLength(processKey) ? processKey : "";
this.productId = StringUtils.hasLength(productNo) ? productNo : String.valueOf(skuId);
this.name = StringUtils.hasLength(spec) ? name.concat("/").concat(spec) : name;
this.category = category;
this.brand = brand;
this.unit = unit;
this.quantity = NumberUtil.formatToInteger(quantity);
this.price = NumberUtil.formatAmount(price);
this.amount = NumberUtil.formatAmount(amount);
this.exchangeCount = NumberUtil.formatToInteger(exchangeCount);
this.returnCount = NumberUtil.formatToInteger(returnCount);
}
/**
* 工作流的ProcessKey
*/
private String processKey;
/**
* 商品SkuId,或物料编号
*/
......@@ -61,6 +84,14 @@ public class OrderAfterSaleProductDetailVO implements Serializable {
*/
private String returnCount;
public String getProcessKey() {
return processKey;
}
public void setProcessKey(String processKey) {
this.processKey = processKey;
}
public String getProductId() {
return productId;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment