起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2682|回复: 3

[处理中3] 代理人显示委托人待办任务问题

[复制链接]

50

主题

188

帖子

734

积分

高级会员

Rank: 4

积分
734
QQ
发表于 2019-11-7 16:48:08 | 显示全部楼层 |阅读模式
问题描述:    需求是:代理人的待办任务列表显示<委托人的待办任务>和<自己的待办任务>,我在SA/task/taskView/waitActivity.w页面进行开发,通过获取当前人的FID,和委托人的FID,在sa_task表进行setFilter过滤,最终形成的filter为
《sExecutorFID in ('/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/9NTxVQ5InwbA9KgZkW2.pos/f6y6o0HafV1bnb7h6xo@9NTxVQ5InwbA9KgZkW2.psm','/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm') and  sStatusName =  '正在处理'》
通过这个过滤在sql中执行,能够正确查询出代理人和委托人的待办任务,但是在页面中setFilter加refreshData()完后,始终只过滤出代理人的待办任务,无报错,弄的我有点迷糊,
帮忙解答一下,我看加载页面的时候是先加载了waitActivity.w,又加载了submitActivity.w,代码是一样的,我的代码应该在哪个地方才能正确过滤?或者在后台过滤时多出了什么限制导致我的过滤被覆盖了?

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36067
发表于 2019-11-7 17:18:03 | 显示全部楼层
把sql语句打出来看最终执行的sql语句
http://bbs.wex5.com/forum.php?mo ... 4&pid=165004035
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

50

主题

188

帖子

734

积分

高级会员

Rank: 4

积分
734
QQ
 楼主| 发表于 2019-11-8 11:43:36 | 显示全部楼层
本帖最后由 zangwill 于 2019-11-8 11:46 编辑

输出了好多:
  1. 2019-11-08 11:34:58
  2. exec KSQL: SELECT SA_Task.*  FROM SA_Task SA_Task WHERE (((sExecutorFID in ('/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/9NTxVQ5InwbA9KgZkW2.pos/f6y6o0HafV1bnb7h6xo@9NTxVQ5InwbA9KgZkW2.psm','/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm') and  sStatusName =  '正在处理')) and (SA_Task.sStatusID='tesReady' or SA_Task.sStatusID='tesExecuting')  and (:_efid0 like concat(SA_Task.sExecutorFID, '%')) and SA_Task.sExecutorFID like '/%' ) ORDER BY sCreateTime DESC LIMIT 0, -1
  3.   --> sql:SELECT  SA_Task.sID AS SA_Task, SA_Task.SACTIVITY AS sActivity, SA_Task.SCREATETIME AS sCreateTime, SA_Task.SCREATORFNAME AS sCreatorFName, SA_Task.SDATA1 AS sData1, SA_Task.SDATA2 AS sData2, SA_Task.SDATA3 AS sData3, SA_Task.SDATA4 AS sData4, SA_Task.SESFIELD01 AS sESField01, SA_Task.SEURL AS sEURL, SA_Task.SEXECUTORFID AS sExecutorFID, SA_Task.SEXECUTORFNAME AS sExecutorFName, SA_Task.SEXECUTORNAMES AS sExecutorNames, SA_Task.SKINDID AS sKindID, SA_Task.SNAME AS sName, SA_Task.SPROCESS AS sProcess, SA_Task.SSTATUSID AS sStatusID FROM SA_Task SA_Task  WHERE  ( ( sExecutorFID IN (?, ?) ) AND (sStatusName = ?) ) AND ( (SA_Task.SSTATUSID = ?) OR (SA_Task.SSTATUSID = ?) ) AND ( ?  LIKE SA_Task.SEXECUTORFID || ?) AND (SA_Task.SEXECUTORFID LIKE ?)   ORDER BY sCreateTime DESC
  4. --> binds:[/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/9NTxVQ5InwbA9KgZkW2.pos/f6y6o0HafV1bnb7h6xo@9NTxVQ5InwbA9KgZkW2.psm, /Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm, 正在处理, tesReady, tesExecuting, /Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm, %, /%]
  5. 2019-11-08 11:34:58
  6. exec KSQL: SELECT SA_Task.*  FROM SA_Task SA_Task WHERE (((sExecutorFID in ('/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/9NTxVQ5InwbA9KgZkW2.pos/f6y6o0HafV1bnb7h6xo@9NTxVQ5InwbA9KgZkW2.psm','/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm') and  sStatusName =  '正在处理')) and (SA_Task.sStatusID='tesReady' or SA_Task.sStatusID='tesExecuting')  and (:_efid0 like concat(SA_Task.sExecutorFID, '%')) and SA_Task.sExecutorFID like '/%' ) ORDER BY sCreateTime DESC LIMIT 0, -1
  7.   --> sql:SELECT  SA_Task.sID AS SA_Task, SA_Task.SACTIVITY AS sActivity, SA_Task.SCREATETIME AS sCreateTime, SA_Task.SCREATORFNAME AS sCreatorFName, SA_Task.SDATA1 AS sData1, SA_Task.SDATA2 AS sData2, SA_Task.SDATA3 AS sData3, SA_Task.SDATA4 AS sData4, SA_Task.SESFIELD01 AS sESField01, SA_Task.SEURL AS sEURL, SA_Task.SEXECUTORFID AS sExecutorFID, SA_Task.SEXECUTORFNAME AS sExecutorFName, SA_Task.SEXECUTORNAMES AS sExecutorNames, SA_Task.SKINDID AS sKindID, SA_Task.SNAME AS sName, SA_Task.SPROCESS AS sProcess, SA_Task.SSTATUSID AS sStatusID FROM SA_Task SA_Task  WHERE  ( ( sExecutorFID IN (?, ?) ) AND (sStatusName = ?) ) AND ( (SA_Task.SSTATUSID = ?) OR (SA_Task.SSTATUSID = ?) ) AND ( ?  LIKE SA_Task.SEXECUTORFID || ?) AND (SA_Task.SEXECUTORFID LIKE ?)   ORDER BY sCreateTime DESC
  8. --> binds:[/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/9NTxVQ5InwbA9KgZkW2.pos/f6y6o0HafV1bnb7h6xo@9NTxVQ5InwbA9KgZkW2.psm, /Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm, 正在处理, tesReady, tesExecuting, /Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm, %, /%]
  9. 2019-11-08 11:34:58 sql 执行时间:5ms
  10. 2019-11-08 11:34:58 sql 执行时间:5ms
复制代码
ksql中(:_efid0 like concat(SA_Task.sExecutorFID, '%')   :_efid0是什么值
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36067
发表于 2019-11-8 13:23:51 | 显示全部楼层
最终执行的sql

SELECT  SA_Task.sID AS SA_Task, SA_Task.SACTIVITY AS sActivity, SA_Task.SCREATETIME AS sCreateTime, SA_Task.SCREATORFNAME AS sCreatorFName, SA_Task.SDATA1 AS sData1, SA_Task.SDATA2 AS sData2, SA_Task.SDATA3 AS sData3, SA_Task.SDATA4 AS sData4, SA_Task.SESFIELD01 AS sESField01, SA_Task.SEURL AS sEURL, SA_Task.SEXECUTORFID AS sExecutorFID, SA_Task.SEXECUTORFNAME AS sExecutorFName, SA_Task.SEXECUTORNAMES AS sExecutorNames, SA_Task.SKINDID AS sKindID, SA_Task.SNAME AS sName, SA_Task.SPROCESS AS sProcess, SA_Task.SSTATUSID AS sStatusID FROM SA_Task SA_Task  WHERE  ( ( sExecutorFID IN ('/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/9NTxVQ5InwbA9KgZkW2.pos/f6y6o0HafV1bnb7h6xo@9NTxVQ5InwbA9KgZkW2.psm', '/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm') ) AND (sStatusName = '正在处理') ) AND ( (SA_Task.SSTATUSID = 'tesReady') OR (SA_Task.SSTATUSID = 'tesExecuting') ) AND ( '/Vdwe3TfL1Z4sVEDsxpv.ogn/5otvmvgk7G3nZ1xsPGL.dpt/gCjieMohdQdD7YAwAl4.pos/W89siOxNJh3RdfQNMF6@gCjieMohdQdD7YAwAl4.psm'  LIKE SA_Task.SEXECUTORFID || '%') AND (SA_Task.SEXECUTORFID LIKE '/%')   ORDER BY sCreateTime DESC


远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-23 09:46 , Processed in 0.093040 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表