订单发货卡单排查
2022-01-19 09:51:28 3 举报
AI智能生成
订单卡单排查
作者其他创作
大纲/内容
1、检查卡单站点有没订单
检查订单表最近10分钟有没订单导入
select count(*)
from ods_pck_info
where create_date > date_sub(now(), interval 10 minute)
and process_center_id=1111
from ods_pck_info
where create_date > date_sub(now(), interval 10 minute)
and process_center_id=1111
检查最近一个小时有没订单导入
select count(*)
from ods_pck_info opi
where opi.create_date > date_sub(now(), interval 1 hour)
and process_center_id=1111;
from ods_pck_info opi
where opi.create_date > date_sub(now(), interval 1 hour)
and process_center_id=1111;
检查最近一小时跟最近一周内的同小时区间单量对比
select count(*)
into @curCount
from ods_pck_info opi
where opi.create_date > date_sub(now(), interval 1 hour);
select min(t.hisCount) minWeekCount,
avg(t.hisCount) avgWeekCount,
@curCount,
(@curCount / min(t.hisCount)) < 0.8 as 最近一小时导入单量小于最近一周最小单量的百分值80
from (
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 1 day), interval 1 hour)
and date_sub(now(), interval 1 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 2 day), interval 1 hour)
and date_sub(now(), interval 2 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 3 day), interval 1 hour)
and date_sub(now(), interval 3 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 4 day), interval 1 hour)
and date_sub(now(), interval 4 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 5 day), interval 1 hour)
and date_sub(now(), interval 5 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 6 day), interval 1 hour)
and date_sub(now(), interval 6 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 7 day), interval 1 hour)
and date_sub(now(), interval 7 day)
) t;
into @curCount
from ods_pck_info opi
where opi.create_date > date_sub(now(), interval 1 hour);
select min(t.hisCount) minWeekCount,
avg(t.hisCount) avgWeekCount,
@curCount,
(@curCount / min(t.hisCount)) < 0.8 as 最近一小时导入单量小于最近一周最小单量的百分值80
from (
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 1 day), interval 1 hour)
and date_sub(now(), interval 1 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 2 day), interval 1 hour)
and date_sub(now(), interval 2 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 3 day), interval 1 hour)
and date_sub(now(), interval 3 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 4 day), interval 1 hour)
and date_sub(now(), interval 4 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 5 day), interval 1 hour)
and date_sub(now(), interval 5 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 6 day), interval 1 hour)
and date_sub(now(), interval 6 day)
union
select count(*) as hisCount
from ods_pck_info opi
where opi.create_date between date_sub(date_sub(now(), interval 7 day), interval 1 hour)
and date_sub(now(), interval 7 day)
) t;
2、检查wsp库有没订单
更上述检查语句是一样的
3、检查上游下来的单有没少
mongdb:192.168.1.110:37017
查询最近一定时间范围内下来的单量跟历史同期的对比
db.oaOrderInfoMq.find({processCenterId:{$in:[722,1067,1150]},createTime:{"$gt":ISODate("2021-11-01T08:00:00.000Z")}});
找订单组同事确认
常见卡单问题
上游下来的单比平时少
查询mongdb的订单信息最近一定时间范围内下来的单量跟历史同期的对比
预处理获取渠道面单异常
检查oa订单表的问题单状态数量和备注信息
select Id, confirmedremarks
from sq8flyt..orderParent
where state = '29';
from sq8flyt..orderParent
where state = '29';
仓库同步业务线异常
检查表ods_pck_info:wsp有单,wms没有单
0 条评论
下一页