Commit a3fbe0eb by wutong

销售额改为考虑运费收入(非FBA); 物流支出cost_logistics替代cost_tail, 因为cost_tail是真实的费用,表里暂且保留,

parent 43afdd12
...@@ -6,4 +6,5 @@ import lombok.Data; ...@@ -6,4 +6,5 @@ import lombok.Data;
public class LogisticsItem { public class LogisticsItem {
private Warehouse warehouse; private Warehouse warehouse;
private Logistics logisticsMethod; private Logistics logisticsMethod;
private Currency logisticsCost;
} }
...@@ -122,7 +122,6 @@ public class OrderSyncJob extends PointJob { ...@@ -122,7 +122,6 @@ public class OrderSyncJob extends PointJob {
DcBaseOmsOrder dcBaseOmsOrder = new DcBaseOmsOrder(); DcBaseOmsOrder dcBaseOmsOrder = new DcBaseOmsOrder();
assignmentOrderInfo(omsResult, dcBaseOmsOrder); assignmentOrderInfo(omsResult, dcBaseOmsOrder);
deleteSku(dcBaseOmsOrder);//因为OMS可能改订单, 部分SKU有可能会被删除, 所以先删除, 再插入, 并且更新退款为未予订单关联 deleteSku(dcBaseOmsOrder);//因为OMS可能改订单, 部分SKU有可能会被删除, 所以先删除, 再插入, 并且更新退款为未予订单关联
log.warn(dcBaseOmsOrder.getOriginOrderId());
Boolean isFbaFeeException = false; Boolean isFbaFeeException = false;
// 百伦sku信息, 有销售员和采购价, bailun_sku_order根据sku找对应销售员和采购价 // 百伦sku信息, 有销售员和采购价, bailun_sku_order根据sku找对应销售员和采购价
HashMap<String, String> saleItemHashMap = putSellerNameInMap(omsResult.getSaleItem()); HashMap<String, String> saleItemHashMap = putSellerNameInMap(omsResult.getSaleItem());
...@@ -194,12 +193,15 @@ public class OrderSyncJob extends PointJob { ...@@ -194,12 +193,15 @@ public class OrderSyncJob extends PointJob {
*/ */
//促销费 //促销费
dcBaseOmsOrder.setCostPromotion((omsResult.getOrderCharge().getCostPromotion() != null && omsResult.getOrderCharge().getCostPromotion().getAmount() != null) ? omsResult.getOrderCharge().getCostPromotion().getAmount() : BigDecimal.ZERO); dcBaseOmsOrder.setCostPromotion((omsResult.getOrderCharge().getCostPromotion() != null && omsResult.getOrderCharge().getCostPromotion().getAmount() != null) ? omsResult.getOrderCharge().getCostPromotion().getAmount() : BigDecimal.ZERO);
//销售额 = 平台SKU产品总售价 - 促销费, 手工单没有SKU售价, 只能拿订单收入 //手工单销售额 = 平台SKU产品总售价 - 促销费, 手工单没有SKU售价, 只能拿订单收入
if (StringUtils.isNotBlank(omsResult.getPlatformOrderType()) && omsResult.getPlatformOrderType().equals(Constant.MANUAL_ORDER) && omsResult.getOrderCharge().getAmountTotal() != null) { if (StringUtils.isNotBlank(omsResult.getPlatformOrderType()) && omsResult.getPlatformOrderType().equals(Constant.MANUAL_ORDER) && omsResult.getOrderCharge().getAmountTotal() != null) {
totalAmountSale = omsResult.getOrderCharge().getAmountTotal().getAmount(); totalAmountSale = omsResult.getOrderCharge().getAmountTotal().getAmount();
dcBaseOmsOrder.setAmountProduct(omsResult.getOrderCharge().getAmountTotal().getAmount()); dcBaseOmsOrder.setAmountProduct(omsResult.getOrderCharge().getAmountTotal().getAmount());
} }
dcBaseOmsOrder.setAmountSales(totalAmountSale.subtract(dcBaseOmsOrder.getCostPromotion())); //由LMS线路计算的物流费
BigDecimal totalCostLogistics = getTotalCostLogistics(omsResult.getLogisticsItems());
//销售额
dcBaseOmsOrder.setAmountSales(totalAmountSale.add(dcBaseOmsOrder.getAmountShipping()).subtract(dcBaseOmsOrder.getCostPromotion()));
//平台渠道费 //平台渠道费
dcBaseOmsOrder.setCostPlatformFee((omsResult.getOrderCharge().getCostPlatformFee() != null && omsResult.getOrderCharge().getCostPlatformFee().getAmount() != null) ? omsResult.getOrderCharge().getCostPlatformFee().getAmount() : BigDecimal.ZERO); dcBaseOmsOrder.setCostPlatformFee((omsResult.getOrderCharge().getCostPlatformFee() != null && omsResult.getOrderCharge().getCostPlatformFee().getAmount() != null) ? omsResult.getOrderCharge().getCostPlatformFee().getAmount() : BigDecimal.ZERO);
//平台渠道费人民币 - Ebay的平台费币种不一样 //平台渠道费人民币 - Ebay的平台费币种不一样
...@@ -222,6 +224,7 @@ public class OrderSyncJob extends PointJob { ...@@ -222,6 +224,7 @@ public class OrderSyncJob extends PointJob {
BigDecimal totalCostPaypalFeeRMB = dcBaseOmsOrder.getCostPaypalFee().multiply(dcBaseOmsOrder.getSellerOrderExchangeRate()).setScale(3, RoundingMode.HALF_EVEN); BigDecimal totalCostPaypalFeeRMB = dcBaseOmsOrder.getCostPaypalFee().multiply(dcBaseOmsOrder.getSellerOrderExchangeRate()).setScale(3, RoundingMode.HALF_EVEN);
BigDecimal totalAmountPrepaid = BigDecimal.ZERO; BigDecimal totalAmountPrepaid = BigDecimal.ZERO;
BigDecimal totalProfit = BigDecimal.ZERO; BigDecimal totalProfit = BigDecimal.ZERO;
BigDecimal totalOrderCostLogistics = BigDecimal.ZERO;
try { try {
DcBaseOmsSkuMapper omsSkuMapper = SessionUtil.getSession().getMapper(DcBaseOmsSkuMapper.class); DcBaseOmsSkuMapper omsSkuMapper = SessionUtil.getSession().getMapper(DcBaseOmsSkuMapper.class);
if (bailunSkuInfoMap.size() > 0) { if (bailunSkuInfoMap.size() > 0) {
...@@ -247,8 +250,10 @@ public class OrderSyncJob extends PointJob { ...@@ -247,8 +250,10 @@ public class OrderSyncJob extends PointJob {
BigDecimal skuAmountAdjustment = bailunSkuStructure.getSkuCostRatio().multiply(dcBaseOmsOrder.getAmountAdjustment()).setScale(3, RoundingMode.HALF_EVEN); BigDecimal skuAmountAdjustment = bailunSkuStructure.getSkuCostRatio().multiply(dcBaseOmsOrder.getAmountAdjustment()).setScale(3, RoundingMode.HALF_EVEN);
//税费收入 //税费收入
BigDecimal skuAmountTax = bailunSkuStructure.getSkuCostRatio().multiply(dcBaseOmsOrder.getAmountTax()).setScale(3, RoundingMode.HALF_EVEN); BigDecimal skuAmountTax = bailunSkuStructure.getSkuCostRatio().multiply(dcBaseOmsOrder.getAmountTax()).setScale(3, RoundingMode.HALF_EVEN);
//运费收入
BigDecimal skuAmountShipping = bailunSkuStructure.getSkuWeightRatio().multiply(dcBaseOmsOrder.getAmountShipping()).setScale(3, RoundingMode.HALF_EVEN);
//将总销售额按比例摊分到SKU-原币种, SKU可能有多个 //将总销售额按比例摊分到SKU-原币种, SKU可能有多个
BigDecimal skuAmountSales = bailunSkuStructure.getSkuCostRatio().multiply(totalAmountSale).setScale(3, RoundingMode.HALF_EVEN); BigDecimal skuAmountSales = bailunSkuStructure.getSkuCostRatio().multiply(dcBaseOmsOrder.getAmountSales()).setScale(3, RoundingMode.HALF_EVEN);
//单个SKU售价-原币种 //单个SKU售价-原币种
BigDecimal skuSalesPrice = bailunSkuStructure.getSkuQuantityOrderd() > 0? skuAmountSales.divide(BigDecimal.valueOf(bailunSkuStructure.getSkuQuantityOrderd()), 3, RoundingMode.HALF_EVEN ): BigDecimal.ZERO; BigDecimal skuSalesPrice = bailunSkuStructure.getSkuQuantityOrderd() > 0? skuAmountSales.divide(BigDecimal.valueOf(bailunSkuStructure.getSkuQuantityOrderd()), 3, RoundingMode.HALF_EVEN ): BigDecimal.ZERO;
//平台费-原币种 //平台费-原币种
...@@ -277,22 +282,23 @@ public class OrderSyncJob extends PointJob { ...@@ -277,22 +282,23 @@ public class OrderSyncJob extends PointJob {
} }
//促销费-原币种 //促销费-原币种
BigDecimal skuCostPromotion = bailunSkuStructure.getSkuCostRatio().multiply(dcBaseOmsOrder.getCostPromotion()).setScale(3, RoundingMode.HALF_EVEN); BigDecimal skuCostPromotion = bailunSkuStructure.getSkuCostRatio().multiply(dcBaseOmsOrder.getCostPromotion()).setScale(3, RoundingMode.HALF_EVEN);
//销售额 = 平台SKU产品总售价 - 促销费 //销售额 = 平台SKU产品总售价 - 促销费(如果不是FBA, 还要加上运费收入),这个费用在订单维度已经算好,按比例摊到SKU
BigDecimal skuAmountSalesRMB = (skuAmountSales.subtract(skuCostPromotion)).multiply(dcBaseOmsOrder.getSellerOrderExchangeRate()).setScale(3, RoundingMode.HALF_EVEN); BigDecimal skuAmountSalesRMB = skuAmountSales.multiply(dcBaseOmsOrder.getSellerOrderExchangeRate()).setScale(3, RoundingMode.HALF_EVEN);
BigDecimal unitSkuAmountSalesRMB = BigDecimal.ZERO; BigDecimal unitSkuAmountSalesRMB = BigDecimal.ZERO;
//FBA费-人民币 //FBA费-人民币
BigDecimal skuCostFbaFeeRMB = dcBaseOmsSku.getCostFbaFee().multiply(dcBaseOmsOrder.getSellerOrderExchangeRate()).setScale(3, RoundingMode.HALF_EVEN); BigDecimal skuCostFbaFeeRMB = dcBaseOmsSku.getCostFbaFee().multiply(dcBaseOmsOrder.getSellerOrderExchangeRate()).setScale(3, RoundingMode.HALF_EVEN);
//百伦处理费 //百伦处理费
BigDecimal skuCostHandleBailun = bailunSkuStructure.getSkuWeightRatio().multiply(dcBaseOmsOrder.getCostHandleBailun()).setScale(3, RoundingMode.HALF_EVEN); BigDecimal skuCostHandleBailun = bailunSkuStructure.getSkuWeightRatio().multiply(dcBaseOmsOrder.getCostHandleBailun()).setScale(3, RoundingMode.HALF_EVEN);
//百伦LMS物流费-在CostTail(尾程费-真实费用)拿不到之前就用它
BigDecimal skuCostLogistics = bailunSkuStructure.getSkuWeightRatio().multiply(totalCostLogistics).setScale(3, RoundingMode.HALF_EVEN);
/* /*
* 将按比例摊分的费用算到单个SKU * 将按比例摊分的费用算到单个SKU
* 摊分方法: 除以下单数 * 摊分方法: 除以下单数
*/ */
BigDecimal quantityOrderdDecimal = BigDecimal.valueOf(bailunSkuStructure.getSkuQuantityOrderd()); BigDecimal quantityOrderdDecimal = BigDecimal.valueOf(bailunSkuStructure.getSkuQuantityOrderd());
BigDecimal rmbCost = BigDecimal.ZERO;;
BigDecimal rmbCost;
if (quantityOrderdDecimal.compareTo(BigDecimal.ZERO) == 1) { if (quantityOrderdDecimal.compareTo(BigDecimal.ZERO) == 1) {
dcBaseOmsSku.setCostLogistics(skuCostLogistics.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN));
dcBaseOmsSku.setAmountTotal(skuAmountTotal.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN)); dcBaseOmsSku.setAmountTotal(skuAmountTotal.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN));
dcBaseOmsSku.setAmountProduct(skuAmountProduct.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN)); dcBaseOmsSku.setAmountProduct(skuAmountProduct.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN));
dcBaseOmsSku.setAmountAdjustment(skuAmountAdjustment.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN)); dcBaseOmsSku.setAmountAdjustment(skuAmountAdjustment.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN));
...@@ -307,39 +313,28 @@ public class OrderSyncJob extends PointJob { ...@@ -307,39 +313,28 @@ public class OrderSyncJob extends PointJob {
dcBaseOmsSku.setCostProduct(bailunSkuStructure.getBailunSkuUnitPrice()); dcBaseOmsSku.setCostProduct(bailunSkuStructure.getBailunSkuUnitPrice());
dcBaseOmsSku.setCostPromotion(skuCostPromotion.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN)); dcBaseOmsSku.setCostPromotion(skuCostPromotion.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN));
dcBaseOmsSku.setAmountSales(skuAmountSales.subtract(skuCostPromotion).divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN)); dcBaseOmsSku.setAmountSales(skuAmountSales.subtract(skuCostPromotion).divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN));
dcBaseOmsSku.setAmountShipping(skuAmountShipping.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN));
//单个SKU的销售额 //单个SKU的销售额
unitSkuAmountSalesRMB = skuAmountSalesRMB.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN); unitSkuAmountSalesRMB = skuAmountSalesRMB.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN);
//单个SKU的支出
rmbCost = dcBaseOmsSku.getCostHandleBailun()//处理费 rmbCost = dcBaseOmsSku.getCostHandleBailun()//处理费
.add(skuCostPlatformFeeRMB.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN))//平台费 .add(skuCostPlatformFeeRMB.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN))//平台费
.add(dcBaseOmsSku.getCostHandlePlatform())//第三方仓操作费 .add(dcBaseOmsSku.getCostHandlePlatform())//第三方仓操作费
.add(skuCostFbaFeeRMB.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN))//FBA费 .add(skuCostFbaFeeRMB.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN))//FBA费
.add(dcBaseOmsSku.getCostFirst())//头程费 .add(dcBaseOmsSku.getCostFirst())//头程费
.add(dcBaseOmsSku.getCostTail())//尾程 .add(dcBaseOmsSku.getCostLogistics())//百伦LMS物流
.add(dcBaseOmsSku.getCostProduct())//采购成本 .add(dcBaseOmsSku.getCostProduct())//采购成本
.add(skuPaypalFeeRmb.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN))//Paypal费 .add(skuPaypalFeeRmb.divide(quantityOrderdDecimal, 3, RoundingMode.HALF_EVEN))//Paypal费
.setScale(3, RoundingMode.HALF_EVEN); .setScale(3, RoundingMode.HALF_EVEN);
} else {//除非发货了, 不然费用都是0
dcBaseOmsSku.setAmountAdjustment(BigDecimal.ZERO);
dcBaseOmsSku.setAmountTax(BigDecimal.ZERO);
dcBaseOmsSku.setCostPromotion(BigDecimal.ZERO);
dcBaseOmsSku.setAmountGiftWrap(BigDecimal.ZERO);
dcBaseOmsSku.setCostPaypalFee(BigDecimal.ZERO);
dcBaseOmsSku.setCostHandleBailun(BigDecimal.ZERO);
dcBaseOmsSku.setCostPlatformFee(BigDecimal.ZERO);
dcBaseOmsSku.setCostHandlePlatform(BigDecimal.ZERO);
dcBaseOmsSku.setCostFbaFee(BigDecimal.ZERO);
dcBaseOmsSku.setCostFirst(BigDecimal.ZERO);
dcBaseOmsSku.setCostTail(BigDecimal.ZERO);
dcBaseOmsSku.setCostProduct(BigDecimal.ZERO);
dcBaseOmsSku.setAmountSales(BigDecimal.ZERO);
rmbCost = BigDecimal.ZERO;
} }
//单个SKU的费用支出 //单个SKU的费用支出
dcBaseOmsSku.setCostTotal(rmbCost); dcBaseOmsSku.setCostTotal(rmbCost);
//利润都转为人民币计算 //利润都转为人民币计算
BigDecimal unitSkuProfit = unitSkuAmountSalesRMB.subtract(dcBaseOmsSku.getCostTotal()); BigDecimal unitSkuProfit = unitSkuAmountSalesRMB.subtract(dcBaseOmsSku.getCostTotal());
//只有发货的SKU才去算订单维度利润 //只有发货的SKU才去算订单维度利润
BigDecimal skuShippedProfit = unitSkuProfit.multiply(BigDecimal.valueOf(dcBaseOmsSku.getBailunSkuQuantityShipped())); BigDecimal bailunSkuQuantityShippedDecimal = BigDecimal.valueOf(dcBaseOmsSku.getBailunSkuQuantityShipped());
BigDecimal skuShippedProfit = unitSkuProfit.multiply(bailunSkuQuantityShippedDecimal);
totalOrderCostLogistics = totalOrderCostLogistics.add(dcBaseOmsSku.getCostLogistics().multiply(bailunSkuQuantityShippedDecimal));
totalProfit = totalProfit.add(skuShippedProfit); totalProfit = totalProfit.add(skuShippedProfit);
//SKU只放单个利润 //SKU只放单个利润
dcBaseOmsSku.setProfitTotal(unitSkuProfit); dcBaseOmsSku.setProfitTotal(unitSkuProfit);
...@@ -358,6 +353,7 @@ public class OrderSyncJob extends PointJob { ...@@ -358,6 +353,7 @@ public class OrderSyncJob extends PointJob {
//预付款-预收金额-人民币 //预付款-预收金额-人民币
dcBaseOmsOrder.setAmountPrepaid(totalAmountPrepaid); dcBaseOmsOrder.setAmountPrepaid(totalAmountPrepaid);
dcBaseOmsOrder.setCostFirst(totalCostFirst); dcBaseOmsOrder.setCostFirst(totalCostFirst);
dcBaseOmsOrder.setCostLogistics(totalOrderCostLogistics);
/* /*
* OMS过来的详细费用不用动 * OMS过来的详细费用不用动
* 这边处理新增了 * 这边处理新增了
...@@ -369,7 +365,7 @@ public class OrderSyncJob extends PointJob { ...@@ -369,7 +365,7 @@ public class OrderSyncJob extends PointJob {
.add(dcBaseOmsOrder.getCostHandlePlatform())//第三方仓操作费 .add(dcBaseOmsOrder.getCostHandlePlatform())//第三方仓操作费
.add(totalCostFbaFeeRMB)//FBA操作费 .add(totalCostFbaFeeRMB)//FBA操作费
.add(dcBaseOmsOrder.getCostFirst()) //头程费 .add(dcBaseOmsOrder.getCostFirst()) //头程费
.add(dcBaseOmsOrder.getCostTail()) //尾程费 .add(dcBaseOmsOrder.getCostLogistics())//LMS物流费用
.add(dcBaseOmsOrder.getCostProduct())//采购成本 .add(dcBaseOmsOrder.getCostProduct())//采购成本
.add(totalCostPaypalFeeRMB)//Paypal费 .add(totalCostPaypalFeeRMB)//Paypal费
.setScale(3, RoundingMode.HALF_EVEN); .setScale(3, RoundingMode.HALF_EVEN);
...@@ -397,6 +393,18 @@ public class OrderSyncJob extends PointJob { ...@@ -397,6 +393,18 @@ public class OrderSyncJob extends PointJob {
} }
} }
private BigDecimal getTotalCostLogistics(List<LogisticsItem> logisticsItems) {
BigDecimal totalCostLogistics = BigDecimal.ZERO;
if (logisticsItems != null && logisticsItems.size() > 0) {
for (LogisticsItem logisticsItem : logisticsItems) {
if (logisticsItem.getLogisticsCost() != null && logisticsItem.getLogisticsCost().getAmount() != null) {
totalCostLogistics = totalCostLogistics.add(logisticsItem.getLogisticsCost().getAmount());
}
}
}
return totalCostLogistics;
}
private void deleteSku(DcBaseOmsOrder dcBaseOmsOrder) { private void deleteSku(DcBaseOmsOrder dcBaseOmsOrder) {
try { try {
DcBaseOmsSkuMapper mapper = SessionUtil.getSession().getMapper(DcBaseOmsSkuMapper.class); DcBaseOmsSkuMapper mapper = SessionUtil.getSession().getMapper(DcBaseOmsSkuMapper.class);
...@@ -664,41 +672,6 @@ public class OrderSyncJob extends PointJob { ...@@ -664,41 +672,6 @@ public class OrderSyncJob extends PointJob {
return skuProductInfo; return skuProductInfo;
} }
/**
* SKU订单费用处理
*
* @param dcBaseOmsOrder
* @param dcBaseOmsSku costRatio 子SKU采购费用 与 订单所有SKU采购费用 比率
*/
public void skuOrderFeeHandle(DcBaseOmsOrder dcBaseOmsOrder, BigDecimal totalWeight, Map<String, BailunSkuStructure> skuStructureMap, DcBaseOmsSku dcBaseOmsSku, OmsResult omsResult) {
OrderCharge orderCharge = omsResult.getOrderCharge();
//--begin 将采购单价 * 数量 / 总采购价 & SKU单个重量 * 数量 / 总重量 计算出来, 传递进费用计算
BigDecimal costRatio = (orderCharge.getCostProduct() != null && orderCharge.getCostProduct().getAmount() != null && orderCharge.getCostProduct().getAmount().compareTo(BigDecimal.ZERO) != 0) ? dcBaseOmsSku.getBailunSkuUnitPrice().multiply(BigDecimal.valueOf(dcBaseOmsSku.getBailunSkuQuantityOrdered())).divide(orderCharge.getCostProduct().getAmount(), 4, RoundingMode.HALF_EVEN) : BigDecimal.ONE;
BigDecimal weightRatio = (dcBaseOmsSku.getBailunSkuWeight() != null && totalWeight.compareTo(BigDecimal.ZERO) != 0) ? dcBaseOmsSku.getBailunSkuWeight().multiply(BigDecimal.valueOf(dcBaseOmsSku.getBailunSkuQuantityOrdered())).divide(totalWeight, 4, RoundingMode.HALF_EVEN) : BigDecimal.ONE;
dcBaseOmsSku.setRatioPrice(costRatio);
dcBaseOmsSku.setRatioWeight(weightRatio);
skuStructureMap.put(dcBaseOmsSku.getBailunSku(), new BailunSkuStructure(dcBaseOmsSku.getBailunSku(), dcBaseOmsSku.getBailunSkuWeight(), dcBaseOmsSku.getBailunSkuUnitPrice() != null ? dcBaseOmsSku.getBailunSkuUnitPrice() : BigDecimal.ZERO, costRatio, weightRatio));
//--end 将采购单价 * 数量 / 总采购价 & SKU单个重量 * 数量 / 总重量计算出来, 传递进费用计算
//按重量比例摊分百伦处理费
dcBaseOmsSku.setCostHandleBailun(dcBaseOmsOrder.getCostHandleBailun() != null ? dcBaseOmsOrder.getCostHandleBailun().multiply(skuStructureMap.get(dcBaseOmsSku.getBailunSku()).getSkuWeightRatio()).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setCostHandlePlatform(BigDecimal.ZERO);
//按采购价比例摊分百伦费用
dcBaseOmsSku.setAmountTotal((orderCharge.getAmountTotal() != null && orderCharge.getAmountTotal().getAmount() != null) ? orderCharge.getAmountTotal().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setAmountProduct((orderCharge.getAmountProduct() != null && orderCharge.getAmountProduct().getAmount() != null) ? orderCharge.getAmountProduct().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setAmountTax((orderCharge.getAmountTax() != null && orderCharge.getAmountTax().getAmount() != null) ? orderCharge.getAmountTax().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setAmountShipping((orderCharge.getAmountShipping() != null && orderCharge.getAmountShipping().getAmount() != null) ? orderCharge.getAmountShipping().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setAmountAdjustment((orderCharge.getAmountAdjustment() != null && orderCharge.getAmountAdjustment().getAmount() != null) ? orderCharge.getAmountAdjustment().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setAmountGiftWrap((orderCharge.getAmountGiftWrap() != null && orderCharge.getAmountGiftWrap().getAmount() != null) ? orderCharge.getAmountGiftWrap().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
//产品成本 = 单价 * 数量
dcBaseOmsSku.setCostPromotion((orderCharge.getCostPromotion() != null && orderCharge.getCostPromotion().getAmount() != null) ? orderCharge.getCostPromotion().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setCostProduct(dcBaseOmsSku.getBailunSkuUnitPrice() != null && dcBaseOmsSku.getBailunSkuQuantityOrdered() != null ? dcBaseOmsSku.getBailunSkuUnitPrice().multiply(BigDecimal.valueOf(dcBaseOmsSku.getBailunSkuQuantityOrdered())).setScale(4, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
//平台费
dcBaseOmsSku.setCostPlatformFee((orderCharge.getCostPlatformFee() != null && orderCharge.getCostPlatformFee().getAmount() != null) ? orderCharge.getCostPlatformFee().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setCostShipping((orderCharge.getCostShipping() != null && orderCharge.getCostShipping().getAmount() != null) ? orderCharge.getCostShipping().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setCostPackage((orderCharge.getCostPackage() != null && orderCharge.getCostPackage().getAmount() != null) ? orderCharge.getCostPackage().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setCostFbaFee((orderCharge.getCostFbaFee() != null && orderCharge.getCostFbaFee().getAmount() != null) ? orderCharge.getCostFbaFee().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
dcBaseOmsSku.setCostPaypalFee((orderCharge.getCostPaypalFee() != null && orderCharge.getCostPaypalFee().getAmount() != null) ? orderCharge.getCostPaypalFee().getAmount().multiply(costRatio).setScale(3, RoundingMode.HALF_EVEN) : BigDecimal.ZERO);
}
/** /**
* 检查FBA费用是否异常 * 检查FBA费用是否异常
...@@ -793,10 +766,12 @@ public class OrderSyncJob extends PointJob { ...@@ -793,10 +766,12 @@ public class OrderSyncJob extends PointJob {
dcBaseOmsOrder.setOrderUpdateTime(omsResult.getOrderUpdateTime()); dcBaseOmsOrder.setOrderUpdateTime(omsResult.getOrderUpdateTime());
dcBaseOmsOrder.setBailunPickingStatus(omsResult.getBailunPickingStatus()); dcBaseOmsOrder.setBailunPickingStatus(omsResult.getBailunPickingStatus());
dcBaseOmsOrder.setBailunRequireLogistics(omsResult.getBailunRequireLogistics()); dcBaseOmsOrder.setBailunRequireLogistics(omsResult.getBailunRequireLogistics());
dcBaseOmsOrder.setAmountGiftWrap((omsResult.getOrderCharge().getAmountGiftWrap() != null && omsResult.getOrderCharge().getAmountGiftWrap().getAmount() != null) ? omsResult.getOrderCharge().getAmountGiftWrap().getAmount() : BigDecimal.ZERO); dcBaseOmsOrder.setAmountGiftWrap((omsResult.getOrderCharge().getAmountGiftWrap() != null && omsResult.getOrderCharge().getAmountGiftWrap().getAmount() != null) ? omsResult.getOrderCharge().getAmountGiftWrap().getAmount() : BigDecimal.ZERO);
dcBaseOmsOrder.setAmountTotal((omsResult.getOrderCharge().getAmountTotal() != null && omsResult.getOrderCharge().getAmountTotal().getAmount() != null) ? omsResult.getOrderCharge().getAmountTotal().getAmount() : BigDecimal.ZERO); dcBaseOmsOrder.setAmountTotal((omsResult.getOrderCharge().getAmountTotal() != null && omsResult.getOrderCharge().getAmountTotal().getAmount() != null) ? omsResult.getOrderCharge().getAmountTotal().getAmount() : BigDecimal.ZERO);
dcBaseOmsOrder.setAmountShipping(BigDecimal.ZERO);//FBA订单不考虑运费收入
if (omsResult.getPlatformType() != null && !omsResult.getPlatformType().equals(PlatformType.FBA.value())) {
dcBaseOmsOrder.setAmountShipping((omsResult.getOrderCharge().getAmountShipping() != null && omsResult.getOrderCharge().getAmountShipping().getAmount() != null) ? omsResult.getOrderCharge().getAmountShipping().getAmount() : BigDecimal.ZERO); dcBaseOmsOrder.setAmountShipping((omsResult.getOrderCharge().getAmountShipping() != null && omsResult.getOrderCharge().getAmountShipping().getAmount() != null) ? omsResult.getOrderCharge().getAmountShipping().getAmount() : BigDecimal.ZERO);
}
dcBaseOmsOrder.setAmountProduct((omsResult.getOrderCharge().getAmountProduct() != null && omsResult.getOrderCharge().getAmountProduct().getAmount() != null) ? omsResult.getOrderCharge().getAmountProduct().getAmount() : BigDecimal.ZERO); dcBaseOmsOrder.setAmountProduct((omsResult.getOrderCharge().getAmountProduct() != null && omsResult.getOrderCharge().getAmountProduct().getAmount() != null) ? omsResult.getOrderCharge().getAmountProduct().getAmount() : BigDecimal.ZERO);
dcBaseOmsOrder.setAmountTax((omsResult.getOrderCharge().getAmountTax() != null && omsResult.getOrderCharge().getAmountTax().getAmount() != null) ? omsResult.getOrderCharge().getAmountTax().getAmount() : BigDecimal.ZERO); dcBaseOmsOrder.setAmountTax((omsResult.getOrderCharge().getAmountTax() != null && omsResult.getOrderCharge().getAmountTax().getAmount() != null) ? omsResult.getOrderCharge().getAmountTax().getAmount() : BigDecimal.ZERO);
dcBaseOmsOrder.setAmountAdjustment((omsResult.getOrderCharge().getAmountAdjustment() != null && omsResult.getOrderCharge().getAmountAdjustment().getAmount() != null) ? omsResult.getOrderCharge().getAmountAdjustment().getAmount() : BigDecimal.ZERO); dcBaseOmsOrder.setAmountAdjustment((omsResult.getOrderCharge().getAmountAdjustment() != null && omsResult.getOrderCharge().getAmountAdjustment().getAmount() != null) ? omsResult.getOrderCharge().getAmountAdjustment().getAmount() : BigDecimal.ZERO);
...@@ -902,6 +877,7 @@ public class OrderSyncJob extends PointJob { ...@@ -902,6 +877,7 @@ public class OrderSyncJob extends PointJob {
dcBaseOmsSku.setCostFbaFee(BigDecimal.ZERO); dcBaseOmsSku.setCostFbaFee(BigDecimal.ZERO);
dcBaseOmsSku.setCostPaypalFee(BigDecimal.ZERO); dcBaseOmsSku.setCostPaypalFee(BigDecimal.ZERO);
dcBaseOmsSku.setAmountPrepaid(BigDecimal.ZERO);//更新旧数据中都已经发货,但是预付费>0的情况 dcBaseOmsSku.setAmountPrepaid(BigDecimal.ZERO);//更新旧数据中都已经发货,但是预付费>0的情况
dcBaseOmsSku.setCostLogistics(BigDecimal.ZERO);
//如果是 FBA订单1.检查FBA费用是否异常 2. //如果是 FBA订单1.检查FBA费用是否异常 2.
dcBaseOmsSku.setBailunSkuQuantityShipped(0); dcBaseOmsSku.setBailunSkuQuantityShipped(0);
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
<result column="cost_handle_platform" jdbcType="DECIMAL" property="costHandlePlatform" /> <result column="cost_handle_platform" jdbcType="DECIMAL" property="costHandlePlatform" />
<result column="cost_tail" jdbcType="DECIMAL" property="costTail" /> <result column="cost_tail" jdbcType="DECIMAL" property="costTail" />
<result column="cost_first" jdbcType="DECIMAL" property="costFirst" /> <result column="cost_first" jdbcType="DECIMAL" property="costFirst" />
<result column="cost_logistics" jdbcType="DECIMAL" property="costLogistics" />
<result column="profit_total" jdbcType="DECIMAL" property="profitTotal" /> <result column="profit_total" jdbcType="DECIMAL" property="profitTotal" />
<result column="profit_rate" jdbcType="DECIMAL" property="profitRate" /> <result column="profit_rate" jdbcType="DECIMAL" property="profitRate" />
<result column="receipt_country" jdbcType="VARCHAR" property="receiptCountry" /> <result column="receipt_country" jdbcType="VARCHAR" property="receiptCountry" />
...@@ -170,12 +171,12 @@ ...@@ -170,12 +171,12 @@
amount_shipping, amount_product, amount_tax, amount_adjustment, amount_gift_wrap, amount_shipping, amount_product, amount_tax, amount_adjustment, amount_gift_wrap,
amount_refund, amount_prepaid, cost_total, cost_promotion, cost_platform_fee, cost_product, amount_refund, amount_prepaid, cost_total, cost_promotion, cost_platform_fee, cost_product,
cost_shipping, cost_package, cost_fba_fee, cost_paypal_fee, cost_refund_commisson, cost_shipping, cost_package, cost_fba_fee, cost_paypal_fee, cost_refund_commisson,
cost_handle_bailun, cost_handle_platform, cost_tail, cost_first, profit_total, profit_rate, cost_handle_bailun, cost_handle_platform, cost_tail, cost_first, cost_logistics,
receipt_country, receipt_city, receipt_area, receipt_address, receipt_address_2, profit_total, profit_rate, receipt_country, receipt_city, receipt_area, receipt_address,
receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name, buyer_email, receipt_address_2, receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name,
has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create, gmt_modified, buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create,
quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name, logistics_method_code, gmt_modified, quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name,
logistics_method_name, bailun_picking_status, bailun_require_logistics logistics_method_code, logistics_method_name, bailun_picking_status, bailun_require_logistics
</sql> </sql>
<select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcBaseOmsOrderExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -256,16 +257,17 @@ ...@@ -256,16 +257,17 @@
cost_shipping, cost_package, cost_fba_fee, cost_shipping, cost_package, cost_fba_fee,
cost_paypal_fee, cost_refund_commisson, cost_handle_bailun, cost_paypal_fee, cost_refund_commisson, cost_handle_bailun,
cost_handle_platform, cost_tail, cost_first, cost_handle_platform, cost_tail, cost_first,
profit_total, profit_rate, receipt_country, cost_logistics, profit_total, profit_rate,
receipt_city, receipt_area, receipt_address, receipt_country, receipt_city, receipt_area,
receipt_address_2, receipt_postal_code, receiver, receipt_address, receipt_address_2, receipt_postal_code,
receiver_phone, buyer_id, buyer_name, receiver, receiver_phone, buyer_id,
buyer_email, has_fba_exception, has_platform_exception, buyer_name, buyer_email, has_fba_exception,
has_cancle, area_id, gmt_create, has_platform_exception, has_cancle, area_id,
gmt_modified, quantity_bailun_sku, logistics_warehouse_code, gmt_create, gmt_modified, quantity_bailun_sku,
logistics_warehouse_name, logistics_method_code, logistics_warehouse_code, logistics_warehouse_name,
logistics_method_name, bailun_picking_status, logistics_method_code, logistics_method_name,
bailun_require_logistics) bailun_picking_status, bailun_require_logistics
)
values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR},
#{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR}, #{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR},
...@@ -286,16 +288,17 @@ ...@@ -286,16 +288,17 @@
#{costShipping,jdbcType=DECIMAL}, #{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL}, #{costShipping,jdbcType=DECIMAL}, #{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL},
#{costPaypalFee,jdbcType=DECIMAL}, #{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL}, #{costPaypalFee,jdbcType=DECIMAL}, #{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL},
#{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL}, #{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL},
#{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL}, #{receiptCountry,jdbcType=VARCHAR}, #{costLogistics,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL},
#{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR}, #{receiptAddress,jdbcType=VARCHAR}, #{receiptCountry,jdbcType=VARCHAR}, #{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR},
#{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, #{receiptAddress,jdbcType=VARCHAR}, #{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR},
#{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, #{buyerName,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, #{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR},
#{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT}, #{hasPlatformException,jdbcType=BIT}, #{buyerName,jdbcType=VARCHAR}, #{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT},
#{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER}, #{gmtCreate,jdbcType=TIMESTAMP}, #{hasPlatformException,jdbcType=BIT}, #{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER},
#{gmtModified,jdbcType=TIMESTAMP}, #{quantityBailunSku,jdbcType=INTEGER}, #{logisticsWarehouseCode,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{quantityBailunSku,jdbcType=INTEGER},
#{logisticsWarehouseName,jdbcType=VARCHAR}, #{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsWarehouseCode,jdbcType=VARCHAR}, #{logisticsWarehouseName,jdbcType=VARCHAR},
#{logisticsMethodName,jdbcType=VARCHAR}, #{bailunPickingStatus,jdbcType=VARCHAR}, #{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR},
#{bailunRequireLogistics,jdbcType=VARCHAR}) #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsOrder">
<!-- <!--
...@@ -472,6 +475,9 @@ ...@@ -472,6 +475,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
cost_first, cost_first,
</if> </if>
<if test="costLogistics != null">
cost_logistics,
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
profit_total, profit_total,
</if> </if>
...@@ -720,6 +726,9 @@ ...@@ -720,6 +726,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
#{costFirst,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="costLogistics != null">
#{costLogistics,jdbcType=DECIMAL},
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
#{profitTotal,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -985,6 +994,9 @@ ...@@ -985,6 +994,9 @@
<if test="record.costFirst != null"> <if test="record.costFirst != null">
cost_first = #{record.costFirst,jdbcType=DECIMAL}, cost_first = #{record.costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="record.costLogistics != null">
cost_logistics = #{record.costLogistics,jdbcType=DECIMAL},
</if>
<if test="record.profitTotal != null"> <if test="record.profitTotal != null">
profit_total = #{record.profitTotal,jdbcType=DECIMAL}, profit_total = #{record.profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -1130,6 +1142,7 @@ ...@@ -1130,6 +1142,7 @@
cost_handle_platform = #{record.costHandlePlatform,jdbcType=DECIMAL}, cost_handle_platform = #{record.costHandlePlatform,jdbcType=DECIMAL},
cost_tail = #{record.costTail,jdbcType=DECIMAL}, cost_tail = #{record.costTail,jdbcType=DECIMAL},
cost_first = #{record.costFirst,jdbcType=DECIMAL}, cost_first = #{record.costFirst,jdbcType=DECIMAL},
cost_logistics = #{record.costLogistics,jdbcType=DECIMAL},
profit_total = #{record.profitTotal,jdbcType=DECIMAL}, profit_total = #{record.profitTotal,jdbcType=DECIMAL},
profit_rate = #{record.profitRate,jdbcType=DECIMAL}, profit_rate = #{record.profitRate,jdbcType=DECIMAL},
receipt_country = #{record.receiptCountry,jdbcType=VARCHAR}, receipt_country = #{record.receiptCountry,jdbcType=VARCHAR},
...@@ -1332,6 +1345,9 @@ ...@@ -1332,6 +1345,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="costLogistics != null">
cost_logistics = #{costLogistics,jdbcType=DECIMAL},
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
profit_total = #{profitTotal,jdbcType=DECIMAL}, profit_total = #{profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -1474,6 +1490,7 @@ ...@@ -1474,6 +1490,7 @@
cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL}, cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL},
cost_tail = #{costTail,jdbcType=DECIMAL}, cost_tail = #{costTail,jdbcType=DECIMAL},
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
cost_logistics = #{costLogistics,jdbcType=DECIMAL},
profit_total = #{profitTotal,jdbcType=DECIMAL}, profit_total = #{profitTotal,jdbcType=DECIMAL},
profit_rate = #{profitRate,jdbcType=DECIMAL}, profit_rate = #{profitRate,jdbcType=DECIMAL},
receipt_country = #{receiptCountry,jdbcType=VARCHAR}, receipt_country = #{receiptCountry,jdbcType=VARCHAR},
...@@ -1678,6 +1695,9 @@ ...@@ -1678,6 +1695,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
cost_first, cost_first,
</if> </if>
<if test="costLogistics != null">
cost_logistics,
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
profit_total, profit_total,
</if> </if>
...@@ -1927,6 +1947,9 @@ ...@@ -1927,6 +1947,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
#{costFirst,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="costLogistics != null">
#{costLogistics,jdbcType=DECIMAL},
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
#{profitTotal,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -2176,6 +2199,9 @@ ...@@ -2176,6 +2199,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="costLogistics != null">
cost_logistics = #{costLogistics,jdbcType=DECIMAL},
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
profit_total = #{profitTotal,jdbcType=DECIMAL}, profit_total = #{profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -2273,12 +2299,13 @@ ...@@ -2273,12 +2299,13 @@
amount_shipping, amount_product, amount_tax, amount_adjustment, amount_gift_wrap, amount_shipping, amount_product, amount_tax, amount_adjustment, amount_gift_wrap,
amount_refund, amount_prepaid, cost_total, cost_promotion, cost_platform_fee, cost_product, amount_refund, amount_prepaid, cost_total, cost_promotion, cost_platform_fee, cost_product,
cost_shipping, cost_package, cost_fba_fee, cost_paypal_fee, cost_refund_commisson, cost_shipping, cost_package, cost_fba_fee, cost_paypal_fee, cost_refund_commisson,
cost_handle_bailun, cost_handle_platform, cost_tail, cost_first, profit_total, cost_handle_bailun, cost_handle_platform, cost_tail, cost_first, cost_logistics,
profit_rate, receipt_country, receipt_city, receipt_area, receipt_address, receipt_address_2, profit_total, profit_rate, receipt_country, receipt_city, receipt_area, receipt_address,
receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name, buyer_email, receipt_address_2, receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name,
has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create, gmt_modified, buyer_email, has_fba_exception, has_platform_exception, has_cancle, area_id, gmt_create,
quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name, logistics_method_code, gmt_modified, quantity_bailun_sku, logistics_warehouse_code, logistics_warehouse_name,
logistics_method_name, bailun_picking_status, bailun_require_logistics) logistics_method_code, logistics_method_name, bailun_picking_status, bailun_require_logistics
)
values values
(#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR},
...@@ -2300,16 +2327,17 @@ ...@@ -2300,16 +2327,17 @@
#{costShipping,jdbcType=DECIMAL}, #{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL}, #{costShipping,jdbcType=DECIMAL}, #{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL},
#{costPaypalFee,jdbcType=DECIMAL}, #{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL}, #{costPaypalFee,jdbcType=DECIMAL}, #{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL},
#{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL}, #{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL},
#{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL}, #{receiptCountry,jdbcType=VARCHAR}, #{costLogistics,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL},
#{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR}, #{receiptAddress,jdbcType=VARCHAR}, #{receiptCountry,jdbcType=VARCHAR}, #{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR},
#{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, #{receiptAddress,jdbcType=VARCHAR}, #{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR},
#{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, #{buyerName,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, #{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR},
#{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT}, #{hasPlatformException,jdbcType=BIT}, #{buyerName,jdbcType=VARCHAR}, #{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT},
#{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER}, #{gmtCreate,jdbcType=TIMESTAMP}, #{hasPlatformException,jdbcType=BIT}, #{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER},
#{gmtModified,jdbcType=TIMESTAMP}, #{quantityBailunSku,jdbcType=INTEGER}, #{logisticsWarehouseCode,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{quantityBailunSku,jdbcType=INTEGER},
#{logisticsWarehouseName,jdbcType=VARCHAR}, #{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsWarehouseCode,jdbcType=VARCHAR}, #{logisticsWarehouseName,jdbcType=VARCHAR},
#{logisticsMethodName,jdbcType=VARCHAR}, #{bailunPickingStatus,jdbcType=VARCHAR}, #{logisticsMethodCode,jdbcType=VARCHAR}, #{logisticsMethodName,jdbcType=VARCHAR},
#{bailunRequireLogistics,jdbcType=VARCHAR}) #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}
)
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
origin_order_id = #{originOrderId,jdbcType=VARCHAR}, origin_order_id = #{originOrderId,jdbcType=VARCHAR},
...@@ -2367,6 +2395,7 @@ ...@@ -2367,6 +2395,7 @@
cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL}, cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL},
cost_tail = #{costTail,jdbcType=DECIMAL}, cost_tail = #{costTail,jdbcType=DECIMAL},
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
cost_logistics = #{costLogistics,jdbcType=DECIMAL},
profit_total = #{profitTotal,jdbcType=DECIMAL}, profit_total = #{profitTotal,jdbcType=DECIMAL},
profit_rate = #{profitRate,jdbcType=DECIMAL}, profit_rate = #{profitRate,jdbcType=DECIMAL},
receipt_country = #{receiptCountry,jdbcType=VARCHAR}, receipt_country = #{receiptCountry,jdbcType=VARCHAR},
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
<result column="cost_handle_platform" jdbcType="DECIMAL" property="costHandlePlatform" /> <result column="cost_handle_platform" jdbcType="DECIMAL" property="costHandlePlatform" />
<result column="cost_tail" jdbcType="DECIMAL" property="costTail" /> <result column="cost_tail" jdbcType="DECIMAL" property="costTail" />
<result column="cost_first" jdbcType="DECIMAL" property="costFirst" /> <result column="cost_first" jdbcType="DECIMAL" property="costFirst" />
<result column="cost_logistics" jdbcType="DECIMAL" property="costLogistics" />
<result column="profit_total" jdbcType="DECIMAL" property="profitTotal" /> <result column="profit_total" jdbcType="DECIMAL" property="profitTotal" />
<result column="profit_rate" jdbcType="DECIMAL" property="profitRate" /> <result column="profit_rate" jdbcType="DECIMAL" property="profitRate" />
<result column="receipt_country" jdbcType="VARCHAR" property="receiptCountry" /> <result column="receipt_country" jdbcType="VARCHAR" property="receiptCountry" />
...@@ -184,9 +185,9 @@ ...@@ -184,9 +185,9 @@
amount_product, amount_tax, amount_adjustment, amount_gift_wrap, amount_refund, amount_prepaid, amount_product, amount_tax, amount_adjustment, amount_gift_wrap, amount_refund, amount_prepaid,
cost_total, cost_promotion, cost_platform_fee, cost_product, cost_shipping, cost_package, cost_total, cost_promotion, cost_platform_fee, cost_product, cost_shipping, cost_package,
cost_fba_fee, cost_paypal_fee, cost_refund_commisson, cost_handle_bailun, cost_handle_platform, cost_fba_fee, cost_paypal_fee, cost_refund_commisson, cost_handle_bailun, cost_handle_platform,
cost_tail, cost_first, profit_total, profit_rate, receipt_country, receipt_city, cost_tail, cost_first, cost_logistics, profit_total, profit_rate, receipt_country,
receipt_area, receipt_address, receipt_address_2, receipt_postal_code, receiver, receipt_city, receipt_area, receipt_address, receipt_address_2, receipt_postal_code,
receiver_phone, buyer_id, buyer_name, buyer_email, has_fba_exception, has_platform_exception, receiver, receiver_phone, buyer_id, buyer_name, buyer_email, has_fba_exception, has_platform_exception,
has_cancle, area_id, bailun_category_id, bailun_category_name, gmt_create, gmt_modified, has_cancle, area_id, bailun_category_id, bailun_category_name, gmt_create, gmt_modified,
ratio_weight, ratio_price, bailun_picking_status, bailun_require_logistics ratio_weight, ratio_price, bailun_picking_status, bailun_require_logistics
</sql> </sql>
...@@ -274,15 +275,16 @@ ...@@ -274,15 +275,16 @@
cost_package, cost_fba_fee, cost_paypal_fee, cost_package, cost_fba_fee, cost_paypal_fee,
cost_refund_commisson, cost_handle_bailun, cost_refund_commisson, cost_handle_bailun,
cost_handle_platform, cost_tail, cost_first, cost_handle_platform, cost_tail, cost_first,
profit_total, profit_rate, receipt_country, cost_logistics, profit_total, profit_rate,
receipt_city, receipt_area, receipt_address, receipt_country, receipt_city, receipt_area,
receipt_address_2, receipt_postal_code, receiver, receipt_address, receipt_address_2, receipt_postal_code,
receiver_phone, buyer_id, buyer_name, receiver, receiver_phone, buyer_id,
buyer_email, has_fba_exception, has_platform_exception, buyer_name, buyer_email, has_fba_exception,
has_cancle, area_id, bailun_category_id, has_platform_exception, has_cancle, area_id,
bailun_category_name, gmt_create, gmt_modified, bailun_category_id, bailun_category_name, gmt_create,
ratio_weight, ratio_price, bailun_picking_status, gmt_modified, ratio_weight, ratio_price,
bailun_require_logistics) bailun_picking_status, bailun_require_logistics
)
values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR},
#{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR}, #{payAccount,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{collectionAccount,jdbcType=VARCHAR},
...@@ -308,15 +310,16 @@ ...@@ -308,15 +310,16 @@
#{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL}, #{costPaypalFee,jdbcType=DECIMAL}, #{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL}, #{costPaypalFee,jdbcType=DECIMAL},
#{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL}, #{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL},
#{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL}, #{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL},
#{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL}, #{receiptCountry,jdbcType=VARCHAR}, #{costLogistics,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL},
#{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR}, #{receiptAddress,jdbcType=VARCHAR}, #{receiptCountry,jdbcType=VARCHAR}, #{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR},
#{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, #{receiptAddress,jdbcType=VARCHAR}, #{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR},
#{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, #{buyerName,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, #{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR},
#{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT}, #{hasPlatformException,jdbcType=BIT}, #{buyerName,jdbcType=VARCHAR}, #{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT},
#{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER}, #{bailunCategoryId,jdbcType=INTEGER}, #{hasPlatformException,jdbcType=BIT}, #{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER},
#{bailunCategoryName,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{bailunCategoryId,jdbcType=INTEGER}, #{bailunCategoryName,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP},
#{ratioWeight,jdbcType=DECIMAL}, #{ratioPrice,jdbcType=DECIMAL}, #{bailunPickingStatus,jdbcType=VARCHAR}, #{gmtModified,jdbcType=TIMESTAMP}, #{ratioWeight,jdbcType=DECIMAL}, #{ratioPrice,jdbcType=DECIMAL},
#{bailunRequireLogistics,jdbcType=VARCHAR}) #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsSku"> <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcBaseOmsSku">
<!-- <!--
...@@ -529,6 +532,9 @@ ...@@ -529,6 +532,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
cost_first, cost_first,
</if> </if>
<if test="costLogistics != null">
cost_logistics,
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
profit_total, profit_total,
</if> </if>
...@@ -810,6 +816,9 @@ ...@@ -810,6 +816,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
#{costFirst,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="costLogistics != null">
#{costLogistics,jdbcType=DECIMAL},
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
#{profitTotal,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -1108,6 +1117,9 @@ ...@@ -1108,6 +1117,9 @@
<if test="record.costFirst != null"> <if test="record.costFirst != null">
cost_first = #{record.costFirst,jdbcType=DECIMAL}, cost_first = #{record.costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="record.costLogistics != null">
cost_logistics = #{record.costLogistics,jdbcType=DECIMAL},
</if>
<if test="record.profitTotal != null"> <if test="record.profitTotal != null">
profit_total = #{record.profitTotal,jdbcType=DECIMAL}, profit_total = #{record.profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -1262,6 +1274,7 @@ ...@@ -1262,6 +1274,7 @@
cost_handle_platform = #{record.costHandlePlatform,jdbcType=DECIMAL}, cost_handle_platform = #{record.costHandlePlatform,jdbcType=DECIMAL},
cost_tail = #{record.costTail,jdbcType=DECIMAL}, cost_tail = #{record.costTail,jdbcType=DECIMAL},
cost_first = #{record.costFirst,jdbcType=DECIMAL}, cost_first = #{record.costFirst,jdbcType=DECIMAL},
cost_logistics = #{record.costLogistics,jdbcType=DECIMAL},
profit_total = #{record.profitTotal,jdbcType=DECIMAL}, profit_total = #{record.profitTotal,jdbcType=DECIMAL},
profit_rate = #{record.profitRate,jdbcType=DECIMAL}, profit_rate = #{record.profitRate,jdbcType=DECIMAL},
receipt_country = #{record.receiptCountry,jdbcType=VARCHAR}, receipt_country = #{record.receiptCountry,jdbcType=VARCHAR},
...@@ -1499,6 +1512,9 @@ ...@@ -1499,6 +1512,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="costLogistics != null">
cost_logistics = #{costLogistics,jdbcType=DECIMAL},
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
profit_total = #{profitTotal,jdbcType=DECIMAL}, profit_total = #{profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -1650,6 +1666,7 @@ ...@@ -1650,6 +1666,7 @@
cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL}, cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL},
cost_tail = #{costTail,jdbcType=DECIMAL}, cost_tail = #{costTail,jdbcType=DECIMAL},
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
cost_logistics = #{costLogistics,jdbcType=DECIMAL},
profit_total = #{profitTotal,jdbcType=DECIMAL}, profit_total = #{profitTotal,jdbcType=DECIMAL},
profit_rate = #{profitRate,jdbcType=DECIMAL}, profit_rate = #{profitRate,jdbcType=DECIMAL},
receipt_country = #{receiptCountry,jdbcType=VARCHAR}, receipt_country = #{receiptCountry,jdbcType=VARCHAR},
...@@ -1889,6 +1906,9 @@ ...@@ -1889,6 +1906,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
cost_first, cost_first,
</if> </if>
<if test="costLogistics != null">
cost_logistics,
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
profit_total, profit_total,
</if> </if>
...@@ -2171,6 +2191,9 @@ ...@@ -2171,6 +2191,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
#{costFirst,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="costLogistics != null">
#{costLogistics,jdbcType=DECIMAL},
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
#{profitTotal,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -2453,6 +2476,9 @@ ...@@ -2453,6 +2476,9 @@
<if test="costFirst != null"> <if test="costFirst != null">
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
</if> </if>
<if test="costLogistics != null">
cost_logistics = #{costLogistics,jdbcType=DECIMAL},
</if>
<if test="profitTotal != null"> <if test="profitTotal != null">
profit_total = #{profitTotal,jdbcType=DECIMAL}, profit_total = #{profitTotal,jdbcType=DECIMAL},
</if> </if>
...@@ -2550,12 +2576,12 @@ ...@@ -2550,12 +2576,12 @@
amount_product, amount_tax, amount_adjustment, amount_gift_wrap, amount_refund, amount_product, amount_tax, amount_adjustment, amount_gift_wrap, amount_refund,
amount_prepaid, cost_total, cost_promotion, cost_platform_fee, cost_product, cost_shipping, amount_prepaid, cost_total, cost_promotion, cost_platform_fee, cost_product, cost_shipping,
cost_package, cost_fba_fee, cost_paypal_fee, cost_refund_commisson, cost_handle_bailun, cost_package, cost_fba_fee, cost_paypal_fee, cost_refund_commisson, cost_handle_bailun,
cost_handle_platform, cost_tail, cost_first, profit_total, profit_rate, receipt_country, cost_handle_platform, cost_tail, cost_first, cost_logistics, profit_total, profit_rate,
receipt_city, receipt_area, receipt_address, receipt_address_2, receipt_postal_code, receipt_country, receipt_city, receipt_area, receipt_address, receipt_address_2,
receiver, receiver_phone, buyer_id, buyer_name, buyer_email, has_fba_exception, receipt_postal_code, receiver, receiver_phone, buyer_id, buyer_name, buyer_email,
has_platform_exception, has_cancle, area_id, bailun_category_id, bailun_category_name, has_fba_exception, has_platform_exception, has_cancle, area_id, bailun_category_id,
gmt_create, gmt_modified, ratio_weight, ratio_price, bailun_picking_status, bailun_require_logistics bailun_category_name, gmt_create, gmt_modified, ratio_weight, ratio_price, bailun_picking_status,
) bailun_require_logistics)
values values
(#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR}, (#{id,jdbcType=INTEGER}, #{originOrderId,jdbcType=VARCHAR}, #{platformType,jdbcType=VARCHAR},
#{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMethod,jdbcType=VARCHAR},
...@@ -2582,15 +2608,16 @@ ...@@ -2582,15 +2608,16 @@
#{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL}, #{costPaypalFee,jdbcType=DECIMAL}, #{costPackage,jdbcType=DECIMAL}, #{costFbaFee,jdbcType=DECIMAL}, #{costPaypalFee,jdbcType=DECIMAL},
#{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL}, #{costRefundCommisson,jdbcType=DECIMAL}, #{costHandleBailun,jdbcType=DECIMAL},
#{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL}, #{costHandlePlatform,jdbcType=DECIMAL}, #{costTail,jdbcType=DECIMAL}, #{costFirst,jdbcType=DECIMAL},
#{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL}, #{receiptCountry,jdbcType=VARCHAR}, #{costLogistics,jdbcType=DECIMAL}, #{profitTotal,jdbcType=DECIMAL}, #{profitRate,jdbcType=DECIMAL},
#{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR}, #{receiptAddress,jdbcType=VARCHAR}, #{receiptCountry,jdbcType=VARCHAR}, #{receiptCity,jdbcType=VARCHAR}, #{receiptArea,jdbcType=VARCHAR},
#{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, #{receiptAddress,jdbcType=VARCHAR}, #{receiptAddress2,jdbcType=VARCHAR}, #{receiptPostalCode,jdbcType=VARCHAR},
#{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, #{buyerName,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, #{receiverPhone,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR},
#{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT}, #{hasPlatformException,jdbcType=BIT}, #{buyerName,jdbcType=VARCHAR}, #{buyerEmail,jdbcType=VARCHAR}, #{hasFbaException,jdbcType=BIT},
#{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER}, #{bailunCategoryId,jdbcType=INTEGER}, #{hasPlatformException,jdbcType=BIT}, #{hasCancle,jdbcType=BIT}, #{areaId,jdbcType=INTEGER},
#{bailunCategoryName,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}, #{bailunCategoryId,jdbcType=INTEGER}, #{bailunCategoryName,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP},
#{ratioWeight,jdbcType=DECIMAL}, #{ratioPrice,jdbcType=DECIMAL}, #{bailunPickingStatus,jdbcType=VARCHAR}, #{gmtModified,jdbcType=TIMESTAMP}, #{ratioWeight,jdbcType=DECIMAL}, #{ratioPrice,jdbcType=DECIMAL},
#{bailunRequireLogistics,jdbcType=VARCHAR}) #{bailunPickingStatus,jdbcType=VARCHAR}, #{bailunRequireLogistics,jdbcType=VARCHAR}
)
on duplicate key update on duplicate key update
id = #{id,jdbcType=INTEGER}, id = #{id,jdbcType=INTEGER},
origin_order_id = #{originOrderId,jdbcType=VARCHAR}, origin_order_id = #{originOrderId,jdbcType=VARCHAR},
...@@ -2660,6 +2687,7 @@ ...@@ -2660,6 +2687,7 @@
cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL}, cost_handle_platform = #{costHandlePlatform,jdbcType=DECIMAL},
cost_tail = #{costTail,jdbcType=DECIMAL}, cost_tail = #{costTail,jdbcType=DECIMAL},
cost_first = #{costFirst,jdbcType=DECIMAL}, cost_first = #{costFirst,jdbcType=DECIMAL},
cost_logistics = #{costLogistics,jdbcType=DECIMAL},
profit_total = #{profitTotal,jdbcType=DECIMAL}, profit_total = #{profitTotal,jdbcType=DECIMAL},
profit_rate = #{profitRate,jdbcType=DECIMAL}, profit_rate = #{profitRate,jdbcType=DECIMAL},
receipt_country = #{receiptCountry,jdbcType=VARCHAR}, receipt_country = #{receiptCountry,jdbcType=VARCHAR},
......
...@@ -25,8 +25,8 @@ public class OmsOrderTest { ...@@ -25,8 +25,8 @@ public class OmsOrderTest {
LinkedHashMap<String, String> map = new LinkedHashMap<>(4); LinkedHashMap<String, String> map = new LinkedHashMap<>(4);
map.put("pageIndex", "1"); map.put("pageIndex", "1");
map.put("pageCount", "100"); map.put("pageCount", "100");
map.put("BailunLastUpdateTimeFrom", "2019-02-28 13:38:02"); map.put("BailunLastUpdateTimeFrom", "2019-03-01 00:00:00");
map.put("BailunLastUpdateTimeTo", "2019-02-28 14:32:14"); map.put("BailunLastUpdateTimeTo", "2019-03-02 00:00:00");
Request request = new Request.Builder() Request request = new Request.Builder()
.get() .get()
.url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map)) .url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map))
...@@ -78,7 +78,7 @@ public class OmsOrderTest { ...@@ -78,7 +78,7 @@ public class OmsOrderTest {
LinkedHashMap<String, String> map = new LinkedHashMap<>(4); LinkedHashMap<String, String> map = new LinkedHashMap<>(4);
map.put("pageIndex", "1"); map.put("pageIndex", "1");
map.put("pageCount", "100"); map.put("pageCount", "100");
map.put("OriginOrderNo", "249457436016"); map.put("OriginOrderNo", "99429310429230");
Request request = new Request.Builder() Request request = new Request.Builder()
.get() .get()
.url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map)) .url(OkHttpUtil.attachHttpGetParams("http://oms.bailuntec.com/apiV2/bailunOrder/getBailunOrders", map))
......
...@@ -514,6 +514,15 @@ public class DcBaseOmsOrder { ...@@ -514,6 +514,15 @@ public class DcBaseOmsOrder {
/** /**
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_oms_order.cost_logistics
*
* @mbg.generated
*/
private BigDecimal costLogistics;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_oms_order.profit_total * This field corresponds to the database column dc_base_oms_order.profit_total
* *
* @mbg.generated * @mbg.generated
...@@ -813,6 +822,7 @@ public class DcBaseOmsOrder { ...@@ -813,6 +822,7 @@ public class DcBaseOmsOrder {
sb.append(", costHandlePlatform=").append(costHandlePlatform); sb.append(", costHandlePlatform=").append(costHandlePlatform);
sb.append(", costTail=").append(costTail); sb.append(", costTail=").append(costTail);
sb.append(", costFirst=").append(costFirst); sb.append(", costFirst=").append(costFirst);
sb.append(", costLogistics=").append(costLogistics);
sb.append(", profitTotal=").append(profitTotal); sb.append(", profitTotal=").append(profitTotal);
sb.append(", profitRate=").append(profitRate); sb.append(", profitRate=").append(profitRate);
sb.append(", receiptCountry=").append(receiptCountry); sb.append(", receiptCountry=").append(receiptCountry);
...@@ -917,6 +927,7 @@ public class DcBaseOmsOrder { ...@@ -917,6 +927,7 @@ public class DcBaseOmsOrder {
&& (this.getCostHandlePlatform() == null ? other.getCostHandlePlatform() == null : this.getCostHandlePlatform().equals(other.getCostHandlePlatform())) && (this.getCostHandlePlatform() == null ? other.getCostHandlePlatform() == null : this.getCostHandlePlatform().equals(other.getCostHandlePlatform()))
&& (this.getCostTail() == null ? other.getCostTail() == null : this.getCostTail().equals(other.getCostTail())) && (this.getCostTail() == null ? other.getCostTail() == null : this.getCostTail().equals(other.getCostTail()))
&& (this.getCostFirst() == null ? other.getCostFirst() == null : this.getCostFirst().equals(other.getCostFirst())) && (this.getCostFirst() == null ? other.getCostFirst() == null : this.getCostFirst().equals(other.getCostFirst()))
&& (this.getCostLogistics() == null ? other.getCostLogistics() == null : this.getCostLogistics().equals(other.getCostLogistics()))
&& (this.getProfitTotal() == null ? other.getProfitTotal() == null : this.getProfitTotal().equals(other.getProfitTotal())) && (this.getProfitTotal() == null ? other.getProfitTotal() == null : this.getProfitTotal().equals(other.getProfitTotal()))
&& (this.getProfitRate() == null ? other.getProfitRate() == null : this.getProfitRate().equals(other.getProfitRate())) && (this.getProfitRate() == null ? other.getProfitRate() == null : this.getProfitRate().equals(other.getProfitRate()))
&& (this.getReceiptCountry() == null ? other.getReceiptCountry() == null : this.getReceiptCountry().equals(other.getReceiptCountry())) && (this.getReceiptCountry() == null ? other.getReceiptCountry() == null : this.getReceiptCountry().equals(other.getReceiptCountry()))
...@@ -1011,6 +1022,7 @@ public class DcBaseOmsOrder { ...@@ -1011,6 +1022,7 @@ public class DcBaseOmsOrder {
result = prime * result + ((getCostHandlePlatform() == null) ? 0 : getCostHandlePlatform().hashCode()); result = prime * result + ((getCostHandlePlatform() == null) ? 0 : getCostHandlePlatform().hashCode());
result = prime * result + ((getCostTail() == null) ? 0 : getCostTail().hashCode()); result = prime * result + ((getCostTail() == null) ? 0 : getCostTail().hashCode());
result = prime * result + ((getCostFirst() == null) ? 0 : getCostFirst().hashCode()); result = prime * result + ((getCostFirst() == null) ? 0 : getCostFirst().hashCode());
result = prime * result + ((getCostLogistics() == null) ? 0 : getCostLogistics().hashCode());
result = prime * result + ((getProfitTotal() == null) ? 0 : getProfitTotal().hashCode()); result = prime * result + ((getProfitTotal() == null) ? 0 : getProfitTotal().hashCode());
result = prime * result + ((getProfitRate() == null) ? 0 : getProfitRate().hashCode()); result = prime * result + ((getProfitRate() == null) ? 0 : getProfitRate().hashCode());
result = prime * result + ((getReceiptCountry() == null) ? 0 : getReceiptCountry().hashCode()); result = prime * result + ((getReceiptCountry() == null) ? 0 : getReceiptCountry().hashCode());
......
...@@ -622,6 +622,15 @@ public class DcBaseOmsSku { ...@@ -622,6 +622,15 @@ public class DcBaseOmsSku {
/** /**
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_oms_sku.cost_logistics
*
* @mbg.generated
*/
private BigDecimal costLogistics;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_base_oms_sku.profit_total * This field corresponds to the database column dc_base_oms_sku.profit_total
* *
* @mbg.generated * @mbg.generated
...@@ -924,6 +933,7 @@ public class DcBaseOmsSku { ...@@ -924,6 +933,7 @@ public class DcBaseOmsSku {
sb.append(", costHandlePlatform=").append(costHandlePlatform); sb.append(", costHandlePlatform=").append(costHandlePlatform);
sb.append(", costTail=").append(costTail); sb.append(", costTail=").append(costTail);
sb.append(", costFirst=").append(costFirst); sb.append(", costFirst=").append(costFirst);
sb.append(", costLogistics=").append(costLogistics);
sb.append(", profitTotal=").append(profitTotal); sb.append(", profitTotal=").append(profitTotal);
sb.append(", profitRate=").append(profitRate); sb.append(", profitRate=").append(profitRate);
sb.append(", receiptCountry=").append(receiptCountry); sb.append(", receiptCountry=").append(receiptCountry);
...@@ -1039,6 +1049,7 @@ public class DcBaseOmsSku { ...@@ -1039,6 +1049,7 @@ public class DcBaseOmsSku {
&& (this.getCostHandlePlatform() == null ? other.getCostHandlePlatform() == null : this.getCostHandlePlatform().equals(other.getCostHandlePlatform())) && (this.getCostHandlePlatform() == null ? other.getCostHandlePlatform() == null : this.getCostHandlePlatform().equals(other.getCostHandlePlatform()))
&& (this.getCostTail() == null ? other.getCostTail() == null : this.getCostTail().equals(other.getCostTail())) && (this.getCostTail() == null ? other.getCostTail() == null : this.getCostTail().equals(other.getCostTail()))
&& (this.getCostFirst() == null ? other.getCostFirst() == null : this.getCostFirst().equals(other.getCostFirst())) && (this.getCostFirst() == null ? other.getCostFirst() == null : this.getCostFirst().equals(other.getCostFirst()))
&& (this.getCostLogistics() == null ? other.getCostLogistics() == null : this.getCostLogistics().equals(other.getCostLogistics()))
&& (this.getProfitTotal() == null ? other.getProfitTotal() == null : this.getProfitTotal().equals(other.getProfitTotal())) && (this.getProfitTotal() == null ? other.getProfitTotal() == null : this.getProfitTotal().equals(other.getProfitTotal()))
&& (this.getProfitRate() == null ? other.getProfitRate() == null : this.getProfitRate().equals(other.getProfitRate())) && (this.getProfitRate() == null ? other.getProfitRate() == null : this.getProfitRate().equals(other.getProfitRate()))
&& (this.getReceiptCountry() == null ? other.getReceiptCountry() == null : this.getReceiptCountry().equals(other.getReceiptCountry())) && (this.getReceiptCountry() == null ? other.getReceiptCountry() == null : this.getReceiptCountry().equals(other.getReceiptCountry()))
...@@ -1144,6 +1155,7 @@ public class DcBaseOmsSku { ...@@ -1144,6 +1155,7 @@ public class DcBaseOmsSku {
result = prime * result + ((getCostHandlePlatform() == null) ? 0 : getCostHandlePlatform().hashCode()); result = prime * result + ((getCostHandlePlatform() == null) ? 0 : getCostHandlePlatform().hashCode());
result = prime * result + ((getCostTail() == null) ? 0 : getCostTail().hashCode()); result = prime * result + ((getCostTail() == null) ? 0 : getCostTail().hashCode());
result = prime * result + ((getCostFirst() == null) ? 0 : getCostFirst().hashCode()); result = prime * result + ((getCostFirst() == null) ? 0 : getCostFirst().hashCode());
result = prime * result + ((getCostLogistics() == null) ? 0 : getCostLogistics().hashCode());
result = prime * result + ((getProfitTotal() == null) ? 0 : getProfitTotal().hashCode()); result = prime * result + ((getProfitTotal() == null) ? 0 : getProfitTotal().hashCode());
result = prime * result + ((getProfitRate() == null) ? 0 : getProfitRate().hashCode()); result = prime * result + ((getProfitRate() == null) ? 0 : getProfitRate().hashCode());
result = prime * result + ((getReceiptCountry() == null) ? 0 : getReceiptCountry().hashCode()); result = prime * result + ((getReceiptCountry() == null) ? 0 : getReceiptCountry().hashCode());
......
...@@ -3961,6 +3961,66 @@ public class DcBaseOmsOrderExample { ...@@ -3961,6 +3961,66 @@ public class DcBaseOmsOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCostLogisticsIsNull() {
addCriterion("cost_logistics is null");
return (Criteria) this;
}
public Criteria andCostLogisticsIsNotNull() {
addCriterion("cost_logistics is not null");
return (Criteria) this;
}
public Criteria andCostLogisticsEqualTo(BigDecimal value) {
addCriterion("cost_logistics =", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsNotEqualTo(BigDecimal value) {
addCriterion("cost_logistics <>", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsGreaterThan(BigDecimal value) {
addCriterion("cost_logistics >", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("cost_logistics >=", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsLessThan(BigDecimal value) {
addCriterion("cost_logistics <", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsLessThanOrEqualTo(BigDecimal value) {
addCriterion("cost_logistics <=", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsIn(List<BigDecimal> values) {
addCriterion("cost_logistics in", values, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsNotIn(List<BigDecimal> values) {
addCriterion("cost_logistics not in", values, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("cost_logistics between", value1, value2, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("cost_logistics not between", value1, value2, "costLogistics");
return (Criteria) this;
}
public Criteria andProfitTotalIsNull() { public Criteria andProfitTotalIsNull() {
addCriterion("profit_total is null"); addCriterion("profit_total is null");
return (Criteria) this; return (Criteria) this;
......
...@@ -4741,6 +4741,66 @@ public class DcBaseOmsSkuExample { ...@@ -4741,6 +4741,66 @@ public class DcBaseOmsSkuExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCostLogisticsIsNull() {
addCriterion("cost_logistics is null");
return (Criteria) this;
}
public Criteria andCostLogisticsIsNotNull() {
addCriterion("cost_logistics is not null");
return (Criteria) this;
}
public Criteria andCostLogisticsEqualTo(BigDecimal value) {
addCriterion("cost_logistics =", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsNotEqualTo(BigDecimal value) {
addCriterion("cost_logistics <>", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsGreaterThan(BigDecimal value) {
addCriterion("cost_logistics >", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("cost_logistics >=", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsLessThan(BigDecimal value) {
addCriterion("cost_logistics <", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsLessThanOrEqualTo(BigDecimal value) {
addCriterion("cost_logistics <=", value, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsIn(List<BigDecimal> values) {
addCriterion("cost_logistics in", values, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsNotIn(List<BigDecimal> values) {
addCriterion("cost_logistics not in", values, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("cost_logistics between", value1, value2, "costLogistics");
return (Criteria) this;
}
public Criteria andCostLogisticsNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("cost_logistics not between", value1, value2, "costLogistics");
return (Criteria) this;
}
public Criteria andProfitTotalIsNull() { public Criteria andProfitTotalIsNull() {
addCriterion("profit_total is null"); addCriterion("profit_total is null");
return (Criteria) this; return (Criteria) this;
......
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