系统常见问题排查脚本

1、相同任务解析多条

select count(*),EOWO_WORK_TYPE_CODE,EOWO_ORDER_NO from eo_c_work_order 
where CREATE_TIME >'2023-06-25' and REC_STATUS = 0
group by EOWO_WORK_TYPE_CODE,EOWO_ORDER_NO
HAVING count(*)>1

2、查询OT状态不同步脚本

select eoor.EOOR_ORDER_NO,eoor.EOOR_LOGISTIC_NO,EOOR_STATUS_CODE,eoor.ORDER_TMS_STATUS from jrwl_tms.et_task etta
left join  eo_c_order eoor on eoor.EOOR_ORDER_NO = etta.ETTA_EXTERNAL_ORDER_NO
where 
etta.ETTA_STATUS = 90
and eoor.EOOR_ORDER_TYPE_CODE in (select EBCD_CODE from eb_code_master where EBCD_DICTIONARY_TYPE = 'OMS_NEW_OUT_ORDER_TYPE') 
and eoor.CREATE_TIME >'2023-06-14'
and etta.CREATE_TIME >'2023-06-14'
and eoor.REC_STATUS = 0
and eoor.EOOR_STATUS_CODE not in ('500','00')
and eoor.ORDER_TMS_STATUS <> '55'

3、查询OW状态不一致脚本(入库)

-- 入库单已关闭
-- 订单仓储状态不为 orderWmsStatus <> 15 入库完成
select LOGISTIC_NO,`STATUS` from jrwl_wms.wm_asn_header  wah
left join  eo_c_order eoor on eoor.EOOR_ORDER_NO = wah.LOGISTIC_NO
where wah.create_time>'2023-06-01'
and eoor.create_time >'2023-06-01'
and eoor.REC_STATUS = 0
and eoor.EOOR_STATUS_CODE  not in ('500','00')
and wah.status = '99'
and eoor.ORDER_WMS_STATUS <> '15'

4、查询OW状态不一致脚本(出库)

-- 出库单已关闭
-- 订单仓储状态不为 orderWmsStatus <> 25 出库完成
select LOGISTIC_NO,`STATUS` from jrwl_wms.wm_so_header wsh
left join  eo_c_order eoor on eoor.EOOR_ORDER_NO = wsh.LOGISTIC_NO
where wsh.create_time>'2023-06-01'
and eoor.create_time >'2023-06-01'
and eoor.REC_STATUS = 0
and eoor.EOOR_STATUS_CODE  not in ('500','00')
and wsh.status = '99'
and eoor.ORDER_WMS_STATUS <> '25'

5、查询OD入库状态不一致脚本

select eoor.EOOR_ORDER_NO,eoor.EOOR_LOGISTIC_NO,EOOR_STATUS_CODE,eoor.ORDER_DMS_STATUS from jrwl_dms.et_hd_task etht
left join  eo_c_order eoor on eoor.EOOR_ORDER_NO = etht.ETHT_EXTERNAL_ORDER_NO
where 
etht.ETHT_STATUS = 90
-- and eoor.EOOR_ORDER_TYPE_CODE in (select EBCD_CODE from eb_code_master where EBCD_DICTIONARY_TYPE = 'OMS_NEW_OUT_ORDER_TYPE') 
and eoor.CREATE_TIME >'2023-06-14'
and etht.CREATE_TIME >'2023-06-14'
and eoor.REC_STATUS = 0
and eoor.EOOR_STATUS_CODE not in ('500','00')
and eoor.ORDER_DMS_STATUS <> '75'
-- and EOOR_STATUS_CODE = '120'

你可能感兴趣的:(数学建模,java,python)