首页 > 其他分享 >获取指定用户的所有待办流程

获取指定用户的所有待办流程

时间:2023-12-21 14:37:05浏览次数:28  
标签:takisremark isremark userid 流程 t2 t1 获取 待办 requestid

SELECT
	( CASE requestlevel WHEN 0 THEN 0 WHEN 1 THEN 1 WHEN 2 THEN 2 ELSE - 1 END ) AS requestlevelorder,
	requestid,
	requestmark,
	createdate,
	createtime,
	creater,
	creatertype,
	workflowid,
	requestname,
	requestnamenew,
	STATUS,
	requestlevel,
	currentnodeid,
	viewtype,
	userid,
	receivedate,
	receivetime,
	isremark,
	nodeid,
	agentorbyagentid,
	agenttype,
	isprocessed,
	systype,
	workflowtype,
	isbereject,
	takisremark,
	requestnamehtmlnew,
	viewDate,
	viewTime,
	lastFeedBackDate,
	lastFeedBackTime,
	needwfback,
	lastFeedBackOperator 
FROM
	(
SELECT
	requestid,
	requestmark,
	createdate,
	createtime,
	creater,
	creatertype,
	workflowid,
	requestname,
	requestnamenew,
	STATUS,
	requestlevel,
	currentnodeid,
	viewtype,
	userid,
	receivedate,
	receivetime,
	isremark,
	nodeid,
	agentorbyagentid,
	agenttype,
	isprocessed,
	systype,
	workflowtype,
	isbereject,
	takisremark,
	requestnamehtmlnew,
	viewDate,
	viewTime,
	lastFeedBackDate,
	lastFeedBackTime,
	needwfback,
	lastFeedBackOperator 
FROM
	(
SELECT
	t1.requestid,
	t1.requestmark,
	t1.createdate,
	t1.createtime,
	t1.creater,
	t1.creatertype,
	t1.workflowid,
	t1.requestname,
	t1.requestnamenew,
	t1.STATUS,
	t1.requestlevel,
	t1.currentnodeid,
	t2.viewtype,
	t2.userid,
	t2.receivedate,
	t2.receivetime,
	t2.isremark,
	t2.nodeid,
	t2.agentorbyagentid,
	t2.agenttype,
	t2.isprocessed,
	t1.seclevel,
	'0' AS systype,
	t2.workflowtype,
	t2.isbereject,
	t2.takisremark,
	t1.requestnamehtmlnew,
	t2.viewDate,
	t2.viewTime,
	t1.lastFeedBackDate,
	t1.lastFeedBackTime,
	t2.needwfback,
	t1.lastFeedBackOperator 
FROM
	workflow_requestbase t1,
	workflow_currentoperator t2,
	workflow_base t3 
WHERE
	t1.requestid = t2.requestid 
	AND t1.workflowid = t3.id 
	AND t2.userid IN ( 1 ) 
	AND t2.usertype = 0 
	AND (
	isnull( t1.currentstatus,- 1 ) = - 1 
	OR ( isnull( t1.currentstatus,- 1 ) = 0 AND t1.creater IN ( 1 ) ) 
	) 
	AND ( t1.deleted <> 1 OR t1.deleted IS NULL OR t1.deleted = '' ) 
	AND (
	( t2.isremark = '0' AND ( t2.takisremark IS NULL OR t2.takisremark = 0 ) ) 
	OR t2.isremark IN ( '1', '5', '8', '9', '7', '11' ) 
	) 
	AND t2.islasttimes = 1 
	AND ( isprocessing = '' OR isprocessing IS NULL ) 
	AND t3.isvalid IN ( '1', '3' ) UNION
	(
SELECT DISTINCT
	requestid,
	'' AS requestmark,
	createdate,
	createtime,
	creatorid AS creater,
	0 AS creatertype,
	workflowid,
	requestname,
	requestname AS requestnamenew,
	'' AS STATUS,
	requestlevel,- 1 AS currentnodeid,
	viewtype,
	userid,
	receivedate,
	receivetime,
	isremark,
	0 AS nodeid,
	- 1 AS agentorbyagentid,
	'0' AS agenttype,
	'0' AS isprocessed,
	'4' AS secLevel,
	'1' AS systype,
	sysid AS workflowtype,
	'' AS isbereject,
	0 AS takisremark,
	'' AS requestnamehtmlnew,
	'' AS viewDate,
	'' AS viewTime,
	'' AS lastFeedBackDate,
	'' AS lastFeedBackTime,
	'' AS needwfback,
	0 AS lastFeedBackOperator 
FROM
	ofs_todo_data 
WHERE
	1 = 1 
	AND userid IN ( 1 ) 
	AND islasttimes = 1 
	AND isremark IN ( 0, 8, 9 ) 
	AND ofs_todo_data.pcurl IS NOT NULL 
	AND ofs_todo_data.pcurl <> '' 
	) 
	) t1 
	) t1 
ORDER BY
	receivedate DESC,
	receivetime DESC

标签:takisremark,isremark,userid,流程,t2,t1,获取,待办,requestid
From: https://www.cnblogs.com/20200109-zwh/p/17918944.html

相关文章

  • 通过指定日期获取本周五,上周五 本周一上周一
    通过指定日期获取本周五,上周五 周一,周二,周三,周四,周五,周六,周日,对应0,1,2,3,4,5,6 --本周五SELECTDATE_FORMAT(DATE_SUB('2023-12-28',INTERVALWEEKDAY('2023-12-28')-4DAY),'%Y%m%d')ASmonday--上周五selectDATE_SUB(DATE_SUB('2023-12-21'......
  • 原生、复杂流程操作、融合专家系统,澜码科技发布企业级Agent平台AskXBOT
    AI原生企业级Agent构建平台具备哪些特性?澜码AskXBOT平台揭晓答案澜码科技正式发布了AI原生企业级Agent平台AskXBOT,怎么看待这个产品?原生、复杂流程操作、融合专家系统,澜码科技发布企业级Agent平台AskXBOT企业真正需要的企业级AIAgent构建平台来了,澜码科技正式发布AskXBOT当......
  • 原生、复杂流程操作、融合专家系统,详解企业级Agent平台澜码AskXBOT
    文/王吉伟就在ChatGPT上线一年后的第一周,谷歌发布了其最强大模型Gemni,一度被称作GPT-4杀手锏,也被视作谷歌挣回面子的“雪耻”之作。然而没过几天,Gemini就被曝夸大营销,所谓的碾压GPT-4仅是嘴上功夫,通过与GPT-4不一致的测试标准混淆跑分,更被嘲讽是在趁OpenAI内部动荡搞事情。紧接着就......
  • 一键在线获取APP公钥、包名、签名及备案信息方法介绍
    ​目录一键在线获取APP公钥、包名、签名及备案信息方法介绍摘要引言一键获取APP包信息操作步骤​编辑解析报告总结致谢关键词参考资料声明 摘要本文介绍了一款在线APP解析工具,可以一键获取APP的公钥、包名、签名等基础信息,同时提供了详细的操作步骤和使用示例,帮......
  • Flutter Key 以及通过Key获取子组件的状态和方法
    import'package:flutter/material.dart';classColorItem{GlobalKeykey;Colorcolor;//设置子组件的key,这里用的GlobalKey,用来后面获取子组件//如果不用获取子组件,也可以用ValuekeyColorItem({requiredthis.color}):key=GlobalKey();}classFlutterKe......
  • 21.获取App包和启动页
    1.adb连接模拟机adbconnect127.0.0.1:75552.查看连接状态adbdevices3.查看模拟器上所有的app包adbshellpmlistpackages4.查看要启动app的包名adbshellpmlistpackages|findstrwework5.抓取详细日志(1代表次数)adbshellmonkey-p"com.tencent.wework"-v......
  • python+excel接口自动化获取token并作为请求参数进行传参操作
    1、登录接口登录后返回对应token封装:importjsonimportrequestsfromutil.operation_jsonimportOperationJsonfrombase.runmethodimportRunMethodclassOperationHeader:def__init__(self,response):self.response=json.loads(response)defget_response_token(......
  • java基础之“获取系统类型,区分Windows和Linux系统”
    一、获取系统类型,区分Windows和Linux系统//判断是否是windows系统System.getProperties().getProperty("os.name").contains("Windows") 二、案例@TestpublicvoidtestWindows(){Stringproperty=System.getProperties().getProperty("os.name");......
  • 单点登录业务场景和使用流程
    单点登录:己方系统(a)域名链接单点登录提供方(b)的登录在b页面上进行账号密码的登录操作,将登录信息转发到a系统的登录接口,而后a系统发送请求前往b系统的登录获取token在获取token的时候a方便可将用户信息和token一起返回,也可多写一个使用token换取用户身份信息的接口进行返回,b系统......
  • MySQL 获取日期、时间、时间戳
    MySQL获取当前日期、时间、时间戳函数_mysqldate_sub时间戳-CSDN博客#获取当前时间curtime()mysql>selectcurtime();+-----------+|curtime()|+-----------+|10:39:25|+-----------+#获取当前日期curdate()mysql>selectcurdate();+------------+|cur......