任务描述

数据导出:

抛率=体积重/包裹重(PackageWeight);

包裹重(kg)=PackageWeight / 1000;(没有包裹重,则取产品毛重GrossWeight)

先用包裹重查一遍,为0的sku,用毛重填充;


kogan:查询在线状态SKU,且抛率>3

体积重(kg)=(长*宽*高) /6000;

(长宽高优先取包裹长宽高,单位是cm;为0的数据再取产品长宽高计算结果)


Allegro:查询在线状态SKU,且抛率>2

体积重(kg)=(长*宽*高) /8000;

(长宽高优先取包裹长宽高,单位是cm;为0的数据再取产品长宽高计算结果)


shopee/lazada:查询在线状态SKU,且抛率>2

体积重(kg)=(长*宽*高) /6000;

(长宽高优先取包裹长宽高,单位是cm;为0的数据再取产品长宽高计算结果)


速卖通:查询在线状态SKU,单边长:>60 或者 三边之和:>90;单边和三边之和 只要满足其中一个条件就统计出来;

单边长(cm):包裹长(PackageLength);(为0的数据再取产品长Length)

三边之和(cm)=包裹长+包裹宽+包裹高;

(PackageLength+PackageWidth+PackageHeight;为0的数据再取产品三边之和:Length+Width+Height)


导出字段:

平台,渠道ID,店铺渠道,平台ID,系统SKU,渠道SKU,抛率,销量,体积重,长宽高,包裹重,单边长,三边之和

历史记录  
  1. 2023-11-09 18:56:12, 由 曾翔 创建。
  2. 2023-11-09 21:23:35, 由 韦思成 记录工时,消耗 2.5 小时。
    修改了 总计消耗,旧值为 "0",新值为 "2.5"。
    修改了 预计剩余,旧值为 "8",新值为 "5.5"。
    修改了 任务状态,旧值为 "wait",新值为 "doing"。
    修改了 指派给 ,旧值为 "wangxiangyu",新值为 "weisicheng"。
    修改了 实际开始,旧值为 "0000-00-00 00:00:00",新值为 "2023-11-09"。

    计算基础数据及kogan,待验证数据


    # 建产品相关信息临时表
    CREATE TABLE `p_product_newbak20231110` (
      `Id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
      `CustomerId` int NOT NULL COMMENT '商户号',
      `Sku` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '系统SKU',
        `PackageWeight1` decimal(18,2) NOT NULL COMMENT '包裹重',
        `PackageVolume1` decimal(18,2) NOT NULL COMMENT '体积',    
        `Length1` decimal(18,2) NOT NULL COMMENT '长',
      `Width1` decimal(18,2) NOT NULL COMMENT '宽',
      `Height1` decimal(18,2) NOT NULL COMMENT '高',
      `PackageWeight` decimal(18,2) NOT NULL COMMENT '包裹重',
      `GrossWeight` decimal(18,2) NOT NULL COMMENT '毛重',
      `PackageLength` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '包裹长',
      `PackageWidth` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '包裹宽',
      `PackageHeight` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '包裹高',
         `Length` decimal(18,2) NOT NULL COMMENT '长',
      `Width` decimal(18,2) NOT NULL COMMENT '宽',
      `Height` decimal(18,2) NOT NULL COMMENT '高',
      PRIMARY KEY (`Id`),
      UNIQUE KEY `uidx_customerid_sku` (`Sku`,`CustomerId`) USING BTREE,
    ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='产品临时表';

    # 计算产品信息
    INSERT INTO p_product_newbak20231110 (CustomerId,sku,PackageWeight1,PackageVolume1,Length1,Width1,Height1,PackageWeight ,GrossWeight,PackageLength,PackageWidth,PackageHeight,
    Length,Width,Height)
    select CustomerId,sku,
    case when PackageWeight >0 then PackageWeight else GrossWeight end as PackageWeight1,
    case when (PackageLength*PackageWidth*PackageHeight)>0 then (PackageLength*PackageWidth*PackageHeight) else (Length*Width*Height) end as PackageVolume1,
    case when (PackageLength*PackageWidth*PackageHeight) >0 then PackageLength else Length end as Length1,
    case when (PackageLength*PackageWidth*PackageHeight) >0 then PackageWidth else Width end as Width1,
    case when (PackageLength*PackageWidth*PackageHeight) >0 then PackageHeight else Height end as Height1,
    PackageWeight ,GrossWeight,
    PackageLength,PackageWidth,PackageHeight,
    Length,Width,Height
    from p_product;


    # kogan平台汇总
    select 'kogan' as marketname,a.OrderSourceId,c.OrderSourceName,a.ProductId,a.sku,a.SellerSKU,
    case when b.PackageWeight1> 0 then (PackageVolume1/(b.PackageWeight1*6)) else 0 end as '抛率' ,d.sales as '销量', (PackageVolume1/6000) as '体积重',b.Length1 as '长',b.Width1 as '宽',b.Height1 as '高',
    (b.PackageWeight1/1000) as '包裹重',b.Length1 as '单边长',(b.Length1+b.Width1+b.Height1) as '三边和'
    from m_kogan_listing a  
    inner join p_product_newbak20231110 b on a.CustomerId=b.CustomerId and a.sku=b.sku
    inner join sys_ordersource c on a.CustomerId=c.CustomerId and a.OrderSourceId=c.OrderSourceId
    left join ( select CustomerId,OrderSourceId,SellerSku,Sku,SUM(sales) as sales from m_kogan_sale_year_summary GROUP BY CustomerId,OrderSourceId,SellerSku,Sku) d on a.CustomerId=d.CustomerId and a.OrderSourceId=d.OrderSourceId and a.SellerSku=d.SellerSku
    where a.CustomerId=1 and a.OnlineStatus=1

  3. 2023-11-10 14:53:44, 由 刘瀚泽 编辑。
    修改了 所属模块,旧值为 "0",新值为 "1659"。
  4. 2023-11-10 15:19:03, 由 韦思成 完成。
    修改了 总计消耗,旧值为 "2.5",新值为 "4.5"。
    修改了 指派给 ,旧值为 "weisicheng",新值为 "ZengXiang"。
    修改了 实际完成,旧值为 "",新值为 "2023-11-10 15:16:05"。
    修改了 任务状态,旧值为 "doing",新值为 "done"。
    修改了 预计剩余,旧值为 "5.5",新值为 "0"。
    修改了 由谁完成,旧值为 "",新值为 "weisicheng"。

    其它平台统计SQL如下:



    # shopee平台汇总
    select a.OrderSourceId,c.OrderSourceName,a.ProductId,a.SubProductId,a.sku,a.SellerSKU,
    case when b.PackageWeight1> 0 then (PackageVolume1/(b.PackageWeight1*6)) else 0 end as '抛率' ,d.sales as '销量',
    (PackageVolume1/6000) as '体积重',b.Length1 as '长',b.Width1 as '宽',b.Height1 as '高',
    (b.PackageWeight1/1000) as '包裹重',b.Length1 as '单边长',(b.Length1+b.Width1+b.Height1) as '三边和'
    from m_shopeev2_listing_sub a  
    inner join p_product_newbak20231110 b on a.CustomerId=b.CustomerId and a.sku=b.sku
    inner join sys_ordersource c on a.CustomerId=c.CustomerId and a.OrderSourceId=c.OrderSourceId
    inner join ( select CustomerId,OrderSourceId,SellerSku,Sku,SUM(sales) as sales from m_shopeev2_sale_year_summary where Date=2023 GROUP BY CustomerId,OrderSourceId,SellerSku,Sku) d on a.CustomerId=d.CustomerId and a.OrderSourceId=d.OrderSourceId and a.SellerSku=d.SellerSku
    where a.CustomerId=1 and a.EditStatus=1 and (b.PackageVolume1>0 or PackageWeight1>0)
    and (case when b.PackageWeight1> 0 then (PackageVolume1/(b.PackageWeight1*6)) else 0 end)>2 and d.sales>0


    # lazada平台汇总
    select a.OrderSourceId,c.OrderSourceName,a.ProductId,a.SubProductId,a.sku,a.SellerSKU,
    case when b.PackageWeight1> 0 then (PackageVolume1/(b.PackageWeight1*6)) else 0 end as '抛率' ,d.sales as '销量',
    (PackageVolume1/6000) as '体积重',b.Length1 as '长',b.Width1 as '宽',b.Height1 as '高',
    (b.PackageWeight1/1000) as '包裹重',b.Length1 as '单边长',(b.Length1+b.Width1+b.Height1) as '三边和'
    from m_lazada_listing_sub a  
    inner join p_product_newbak20231110 b on a.CustomerId=b.CustomerId and a.sku=b.sku
    inner join sys_ordersource c on a.CustomerId=c.CustomerId and a.OrderSourceId=c.OrderSourceId
    left join ( select CustomerId,OrderSourceId,SellerSku,Sku,SUM(sales) as sales from m_lazada_sale_year_summary where Date=2023 GROUP BY CustomerId,OrderSourceId,SellerSku,Sku) d on a.CustomerId=d.CustomerId and a.OrderSourceId=d.OrderSourceId and a.SellerSku=d.SellerSku
    where a.CustomerId=1 and a.EditStatus=1 and (b.PackageVolume1>0 or PackageWeight1>0)
    and (case when b.PackageWeight1> 0 then (PackageVolume1/(b.PackageWeight1*6)) else 0 end)>2;


    # Allegro平台汇总
    select a.OrderSourceId,c.OrderSourceName,a.ProductId,a.sku,a.SellerSKU,
    case when b.PackageWeight1> 0 then (PackageVolume1/(b.PackageWeight1*6)) else 0 end as '抛率' ,d.sales as '销量',
    (PackageVolume1/8000) as '体积重',b.Length1 as '长',b.Width1 as '宽',b.Height1 as '高',
    (b.PackageWeight1/1000) as '包裹重',b.Length1 as '单边长',(b.Length1+b.Width1+b.Height1) as '三边和'
    from m_allegro_listing a  
    inner join p_product_newbak20231110 b on a.CustomerId=b.CustomerId and a.sku=b.sku
    inner join sys_ordersource c on a.CustomerId=c.CustomerId and a.OrderSourceId=c.OrderSourceId
    inner join ( select CustomerId,OrderSourceId,SellerSku,Sku,SUM(sales) as sales from m_allegro_sale_year_summary where Date=2023 GROUP BY CustomerId,OrderSourceId,SellerSku,Sku) d on a.CustomerId=d.CustomerId and a.OrderSourceId=d.OrderSourceId and a.SellerSku=d.SellerSku
    where a.CustomerId=1 and a.OnlineStatus=1 and (b.PackageVolume1>0 or PackageWeight1>0)
    and (case when b.PackageWeight1> 0 then (PackageVolume1/(b.PackageWeight1*8)) else 0 end)>2 and d.sales>0;


    # aliexpress平台汇总
    select a.OrderSourceId,c.OrderSourceName,a.ProductId,a.SubProductId,a.sku,a.SellerSKU,
    case when b.PackageWeight1> 0 then (PackageVolume1/(b.PackageWeight1*6)) else 0 end as '抛率' ,d.sales as '销量',
    (PackageVolume1/6000) as '体积重',b.Length1 as '长',b.Width1 as '宽',b.Height1 as '高',
    (b.PackageWeight1/1000) as '包裹重',b.Length1 as '单边长',(b.Length1+b.Width1+b.Height1) as '三边和'
    from m_aliexpress_listing_sub a  
    inner join p_product_newbak20231110 b on a.CustomerId=b.CustomerId and a.sku=b.sku
    inner join sys_ordersource c on a.CustomerId=c.CustomerId and a.OrderSourceId=c.OrderSourceId
    left join ( select CustomerId,OrderSourceId,SellerSku,Sku,SUM(sales) as sales from m_aliexpress_sale_year_summary where Date=2023 GROUP BY CustomerId,OrderSourceId,SellerSku,Sku) d on a.CustomerId=d.CustomerId and a.OrderSourceId=d.OrderSourceId and a.SellerSku=d.SellerSku
    where a.CustomerId=1 and a.EditStatus=1 and (b.PackageVolume1>0 or PackageWeight1>0)
    and (b.Length1>60 or (b.Length1+b.Width1+b.Height1)>90);


    -------------------------------------


    各平台导出记录数据如下:
    kogan : 22万+
    shopee : 880万+ (有销量的:15461)
    lazada: 21万+
    aliexpress: 1866
    allegro: 384万+ (有销量的:19784)

  5. 2023-11-16 20:55:09, 由 周杰 关闭。
    修改了 任务状态,旧值为 "done",新值为 "closed"。
    修改了 指派给 ,旧值为 "ZengXiang",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "zhoujie"。
    修改了 关闭时间,旧值为 "0000-00-00 00:00:00",新值为 "2023-11-16 20:55:09"。
    修改了 关闭原因,旧值为 "",新值为 "done"。
所属迭代 技术研发中心 11月运维事项(2023年)
所属模块 /
相关需求 暂无
指派给 Closed 于 2023-11-16 20:55:09
任务类型 运维
任务标签 初始
开发组 运营开发组
任务状态 已关闭
进度 100%
优先级 P0
关键词
抄送给
由谁创建 曾翔 于 2023-11-09 18:56:12
由谁完成 韦思成 于 2023-11-10 15:16:05
由谁取消 暂无
由谁关闭 周杰 于 2023-11-16 20:55:09
关闭原因 已完成
最后编辑 周杰 于 2023-11-16 20:55:09
团队 最初预计 总计消耗 预计剩余
工时信息
最初预计 8工时
总计消耗 4.5工时
预计剩余 0工时
预计开始 2023-11-09
实际开始 2023-11-09
截止日期 2023-11-10