wcs_stockout4df_start 代表需要处理的任务

[PROCFLAG] 0:正待处理的业务,1:已经回库。
这个表,查询出来的结果,不应该出现 不在当天,还等于0 的任务,说明是以前的任务未处理完
--立体库状态,保证没有相应的任务 ,【】
SELECT A.*, A.rowid
  FROM wcs_stockout4df_start A
 where a.barcode = 'T79223'
   and a.PROCFLAG <> '1'
 order by createdate desc;

–检查是否有释放状态下的拣选任务
SELECT A.*, A.rowid
FROM OUTSTOCKPICKTBL A
WHERE 1 = 1
AND A.Relacontainerno = ‘T79223’
and a.status = ‘2’
order by a.creattime desc;

–检查是否有释放状态下的移库、补货任务
SELECT B., A., A.rowid
FROM movestockdttbl A, movestocktbl B
WHERE 1 = 1
AND A.Containerid = ‘T79223’
and a.taskid = b.taskid
and b.status in (2, 3);

–检查是否有执行中的判断任务
SELECT A.*, A.rowid
FROM STOCKCHKDTTBL A
WHERE A.BOXID = ‘T79223’
AND A.STATUS = ‘2’; –盘点单明细

/SELECT A.,A.rowid FROM STOCKGOODSTBL A WHERE 1=1 AND A.GOODSID=’1110273646’ AND A.GOODSBATCH=’289210401’ ; –总库存
SELECT A.,A.rowid FROM STOCKGOODSTBL_COMPANY A WHERE 1=1 AND A.GOODSID=’1110273646’ AND A.GOODSBATCH=’289210401’ ; –分公司库存
SELECT A.
,A.rowid FROM GOODSBATCHMST A WHERE 1=1 AND A.GOODSID=’1110273646’ AND A.GOODSBATCH=’289210401’; –批号主表*/

–根据任务号查询对应的任务
SELECT A.*, A.rowid
FROM wcs_stockout4df_task A
where 1 = 1
–and a.taskid = ‘MO8021121005000’
and a.barcode = ‘T79223’
order by a.createdate desc;

–根据托盘号查最新的出库开始
SELECT A.*, A.rowid
FROM wcs_stockout4df_start A
where 1 = 1
and a.barcode = ‘T79223’
and a.procflag <> ‘1’
order by a.createdate desc;

–根据任务号查询对应的到站 (到达变为2出签)
SELECT A.*, A.rowid
FROM wcs_stockout4df_arrival A
where 1 = 1
–and a.taskid = ‘MO8021110600196’
and a.barcode = ‘T79223’
–and a.station=’7306’
–and a.procflag=1
order by a.createdate desc;

–根据任务号查询对应的完成
SELECT A.*, A.rowid
FROM wcs_stockout4df_complete A
where 1 = 1
–and a.taskid = ‘OL8021122105836’
and a.barcode = ‘T79223’
order by a.createdate desc;

–LED显示(到达变为2时写入)
SELECT a.procflag, A.*, A.rowid
FROM wcs_led4df_message A
WHERE 1 = 1
and a.ledno = ‘7301’
order by a.createdate desc;

–根据托盘号查最新的入库任务
SELECT A.*, A.rowid
FROM wcs_stockin4df_task A
where 1 = 1
and a.barcode = ‘T79223’
–and a.taskid=’MO8022032000699’
order by a.createdate desc;

SELECT A.*
FROM goodsposmst A
WHERE a.agc_goodsposid in (‘’, ‘’);

–根据托盘号查最新的入库完成
SELECT A.*, A.rowid
FROM wcs_stockin4df_complete A
where 1 = 1
and a.barcode = ‘T79223’
–and a.taskid=’MO8022032100973’
and a.createdate>=’2023-01-01’
order by a.createdate desc;

–站对站任务,站对站任务没动的时候,如果wcs_stockout_arrival没数据,且wcs没任务(设备组删了,如果有数据就让设备组先看一下),直接把procflag改为0重做。
SELECT A.*, A.rowid
FROM WCS_STATION4df_TASK A
WHERE 1 = 1
and a.barcode = ‘T79223’
–and a.station = ‘2310’
order by a.createdate desc;

SELECT A.*, A.rowid
FROM WCS_STATION4df_COMPLETE A
WHERE 1 = 1
and a.barcode = ‘T79223’
–and a.station = ‘2310’
order by a.createdate desc;

–补写整托出库到达
/*
INSERT INTO wcs_stockout4df_arrival O
(TASKID, BARCODE, STATION, STATUS, CREATEDATE, PROCFLAG, REMARK)
SELECT I.TASKID,
I.BARCODE,
i.station,
‘0’ STATUS,
CREATEDATE,
‘0’ PROCFLAG,
‘手工添加’ REMARK
FROM WCS_STOCKIN4df_TASK I
WHERE I.TASKID = ‘OL8022051207570’;
*/

–补写整托出库完成
/*
INSERT INTO WCS_STOCKOUT4df_COMPLETE O
(TASKID, BARCODE, STATION, STATUS, CREATEDATE, PROCFLAG, REMARK)
SELECT I.TASKID,
I.BARCODE,
i.station,
‘0’ STATUS,
CREATEDATE,
‘0’ PROCFLAG,
‘手工添加’ REMARK
FROM WCS_STOCKOUT4df_TASK I
WHERE I.TASKID = ‘OL8022111036061’;
*/

–补写入库完成
/*
INSERT INTO WCS_STOCKIN4df_COMPLETE O
(TASKID, BARCODE, LOCATION, STATUS, CREATEDATE, PROCFLAG, REMARK)
SELECT I.TASKID,
I.BARCODE,
i.location,
‘0’ STATUS,
CREATEDATE,
‘0’ PROCFLAG,
‘手工添加’ REMARK
FROM WCS_STOCKIN4df_TASK I
WHERE I.TASKID in (‘W8020220727001865’);
*/

文档更新时间: 2024-03-25 13:34   作者:周骏