|
Messenger的取法:
select FSTATE, FGUID, FPRIORITY, FSPERSONNAME, FSUBJECT, FCREATETIME, FLASTCHANGETIME, FLIMITTIME, FTYPENAME
from TTASK where TTASK.FCLIENTACCOUNT = 'KYERP'
and TTASK.FGUID in
(select TTASKMESSAGE.FTASKGUID from TTASKMESSAGE
where TTASKMESSAGE.FCLIENTACCOUNT = 'KYERP'
and TTASKMESSAGE.FSTATE in ('tmsSend', 'tmsReceived', 'tmsProcessing')
and ( [B]TTASKMESSAGE.FRPERSON = '0201' [/B]
or TTASKMESSAGE.FRORGURL in ('\ROOT\NJKY.OGN',
'\ROOT\NJKY.OGN\GSLD.DPT',
'\ROOT\NJKY.OGN\GSLD.DPT\XSZJ.PTM',
'\ROOT\NJKY.OGN\GSLD.DPT\XSZJ.PTM\0201.psm') ) )
order by FCREATETIME desc
平台的取法:
SELECT TASK.* FROM TTASK TASK
WHERE (TASK.FCLIENTACCOUNT = 'KYERP')
AND (TASK.FGROUPGUID IN('-1'))
AND (TASK.FSTARTTIME >= '1899-12-31 00:00:00'
AND TASK.FSTARTTIME <= '3001-01-01 00:00:00')
AND TASK.FGUID IN
(SELECT DISTINCT(TMS.FTASKGUID) FROM TTASKMESSAGE TMS
WHERE (TMS.FSTATE IN ('tmsSend','tmsReceived','tmsProcessing'))
AND ((TMS.FRORGURL) IN ('\ROOT\NJKY.OGN\GSLD.DPT\XSZJ.PTM\0201.PSM' ,
'\ROOT\NJKY.OGN\GSLD.DPT\XSZJ.PTM' , '\POSITION\XSZJ.PTN' , '\ROOT\NJKY.OGN\GSLD.DPT' , '\ROOT\NJKY.OGN'))
AND (TMS.FCLIENTACCOUNT = 'KYERP') )
主要区别在于Messenger 多了句 TTASKMESSAGE.FRPERSON = '0201'
当人员调岗后,Messenger会把以把调岗前的任务也取过来(应该这样的),但平台却没有取,感觉平台的取应该把TTASKMESSAGE.FRPERSON = '0201' 这句加上。 |
|