--将单据生成的配送单明细与汇总删除
select t.,rowid from ps_zcd_mx t where t .djbh_sj ='XSGYMA00419243';
select t.
,rowid from ps_zcd_hz t where t .djbh in ('ZCD00071432',
'ZCD00071434',
'ZCD00071440')

---将OUT_PURCHASE_NOTICE_M中的sf_ps更新为否

update OUT_PURCHASE_NOTICE_M t set sf_ps ='是' where t .djbh in
(select djbh from V_PS_PSZC where RQ>=TO_DATE('2020-01-01','yyyy-mm-dd') and RQ <=TO_DATE('2020-02-07','yyyy-mm-dd') and psfx_name ='太原')

--注意查看sf_fhwh是否为是和pszt是否为0为1则可能出现异常
--看ps_sjtj 中是否有复核单生成

select t.*,rowid from ps_sjtj  t  where djbh  in ('XSGYMA00419252',

'XSGYMA00419321',
'XSGYMA00419333')