记得上下班打卡 | git大法好,push需谨慎

Commit cc290cf3 authored by 胡佳晨's avatar 胡佳晨

订单维度增加 erpHosting

parent 34ac0687
package com.liquidnet.service.goblin.dto.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.liquidnet.service.goblin.entity.GoblinOrderAttr;
import com.liquidnet.service.goblin.entity.GoblinStoreOrder;
import io.swagger.annotations.ApiModelProperty;
......@@ -21,6 +22,7 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode(callSuper = false)
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinStoreOrderVo implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
......@@ -127,6 +129,8 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
private String mixName;
@ApiModelProperty(value = "核销时间")
private String pushTime;
@ApiModelProperty(value = "ERP托管[0-否|1-是],默认0")
private Integer erpHosting;
public String getPushTime() {
return pushTime==null?"":pushTime;
......@@ -155,7 +159,7 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
}
public GoblinStoreOrderVo copy(GoblinStoreOrder source) {
public GoblinStoreOrderVo copy(GoblinStoreOrder source,int erpHosting) {
if (null == source) return this;
this.setOrderId(source.getOrderId());
this.setStoreId(source.getStoreId());
......@@ -202,6 +206,7 @@ public class GoblinStoreOrderVo implements Serializable, Cloneable {
this.setMarketId(source.getMarketId());
// this.setRandomKey(source.getrad());
this.setCreatedAt(source.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
this.setErpHosting(erpHosting);
return this;
}
......
......@@ -537,6 +537,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
for (GoblinOrderSqlParam item : sqlParams) {
List<String> goblinOrderSkuIdList = CollectionUtil.linkedListString();
BigDecimal restVoucherPrice = item.getStoreOrder().getPriceVoucher();
int erpHosting = 0;
for (int i = 0; i < item.getOrderSkuList().size(); i++) {
GoblinOrderSku orderSku = item.getOrderSkuList().get(i);
if (item.getStoreOrder().getPriceVoucher().compareTo(BigDecimal.ZERO) > 0) {
......@@ -593,6 +594,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
}
}
if(erpHosting == 0){
erpHosting = orderSku.getErpHosting();
}
sqlDataSku.add(new Object[]{
orderSku.getOrderSkuId(), orderSku.getOrderId(), orderSku.getSpuId(), orderSku.getSpuName(), orderSku.getSpuPic(), orderSku.getSkuId(), orderSku.getNum(), orderSku.getSkuPrice(), orderSku.getSkuPriceActual(), orderSku.getSkuName(),
orderSku.getSkuNo(), orderSku.getSkuImage(), orderSku.getSkuSpecs(), orderSku.getPriceVoucher(), orderSku.getSpuErpCode(), orderSku.getSkuErpCode(), orderSku.getErpType(), orderSku.getErpWarehouseNo(), orderSku.getErpHosting(), orderSku.getCreatedAt()
......@@ -615,7 +619,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
orderAttr.getOrderAttrId(), orderAttr.getOrderId(), orderAttr.getExpressContacts(), orderAttr.getExpressAddress(), orderAttr.getExpressAddressDetail(), orderAttr.getExpressPhone(), orderAttr.getExpressType(), orderAttr.getCreatedAt()
});
//订单vo
GoblinStoreOrderVo orderVo = GoblinStoreOrderVo.getNew().copy(storeOrder);
GoblinStoreOrderVo orderVo = GoblinStoreOrderVo.getNew().copy(storeOrder,erpHosting);
//订单attr vo
GoblinOrderAttrVo orderAttrVo = GoblinOrderAttrVo.getNew().copy(orderAttr);
......
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