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

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

订单维度增加 erpHosting

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