OAccflow集成sql
SELECT * FROM PORT_EMP WHERE NO='18336309966'
SELECT * FROM PORT_DEPT WHERE no='42DBAF50712C4046B09BC561C26FAE7E'
SELECT * FROM PORT_STATIONTYPE
SELECT * FROM PORT_STATION
SELECT * FROM PORT_DEPTEMP
SELECT * FROM PORT_DEPTSTATION
SELECT * FROM PORT_DEPTEMPSTATION
EXEC SP_RENAME 'PORT_EMP', 'TEST_PORT_EMP'
EXEC SP_RENAME 'PORT_DEPT', 'TEST_PORT_DEPT'
EXEC SP_RENAME 'PORT_STATIONTYPE', 'TEST_PORT_STATIONTYPE'
EXEC SP_RENAME 'PORT_STATION', 'TEST_PORT_STATION'
EXEC SP_RENAME 'PORT_DEPTEMP', 'TEST_DEPTEMP'
EXEC SP_RENAME 'PORT_DEPTSTATION', 'TEST_PORT_DEPTSTATION'
EXEC SP_RENAME 'PORT_DEPTEMPSTATION', 'TEST_DEPTEMPSTATION'
--http://ccbpm.mydoc.io/
--http://demo.ccflow.org/
/*
* 1/岗位类型
*/
CREATE VIEW [DBO].[PORT_STATIONTYPE]
AS
SELECT No,Name,0 Idx,'' ORGNO FROM BAS_SysRoleType
/*
* 2/--岗位
*/
CREATE VIEW [DBO].[PORT_STATION]
AS
SELECT R.Roles_ID AS No,R.Roles_Name AS Name, R.FK_STATIONTYPE,'' DUTYREQ,''MAKINGS,0 ORGNO
FROM BAS_Roles R where R.DeleteMark !=0
/** 3 --部门
* --部门
* -- 组织机构表 类别 = 1, 机构 = 0 ,1
-- 删除 = 1,
--未删除 = 0
drop view [PORT_DEPT]
*
*/
CREATE VIEW [DBO].[PORT_DEPT]
AS
SELECT OID AS NO,ORGNAME AS NAME, PARENTOID AS ParentNo,
'' NAMEOFPATH, '' TREENO,'' LEADER,'' TEL,0 IDX,0 ISDIR ,ORDERNO AS ORGNO
FROM BAS_ORG where ISDEL =0 AND ISCATEGORY=0
--4--部门岗位【参考自己的业务表,多表联合查询】,一个部门可以有多个岗位
/*******************************************
* select * from BAS_ORG_STATION
* drop view [PORT_DEPTSTATION]
*******************************************/
CREATE VIEW [DBO].[PORT_DEPTSTATION]
AS
SELECT FK_Dept as FK_DEPT,FK_Station AS FK_STATION FROM BAS_ORG_STATION WHERE DELETEMARK !=0
--5--人员
/*******************************************
* SELECT * FROM TEST_PORT_EMP
select * from sys_persondefine
SELECT * FROM BAS_PERSON
SELECT * FROM BAS_ORG
drop view [PORT_EMP]
*******************************************/
CREATE VIEW [DBO].[PORT_EMP]
AS
SELECT SP.USERNAMEDecryp as NO,SP.USERNAME as ecrypname,BP.PERSONNAME as NAME,SP.PASSWORD as PASS,SP.DEPTOID as FK_DEPT,'' SID,
'' Tel,'' Email,'' PinYin,0 Idx
FROM sys_persondefine SP LEFT JOIN BAS_PERSON BP ON SP.USEROID = BP.OID
where SP.ISDEL =0 AND BP.ISDEL=0
-- --6部门人员
/*******************************************
* SELECT * FROM TEST_DEPTEMP
* DROP VIEW [PORT_DEPTEMP]
*******************************************/
CREATE VIEW [DBO].[PORT_DEPTEMP]
AS
SELECT DEPTOID+'-'+USEROID as MYPK,DEPTOID as FK_DEPT,USERNAMEDecryp as FK_EMP,USERNAME as ecrypname,'' FK_DUTY,'' DUTYLEVEL,'' LEADER
FROM sys_persondefine
--7--部门人员岗位【参考自己的业务表,多表联合查询】
/*******************************************
* SELECT * FROM BAS_ORG
select * from sys_persondefine where USEROID='01A9D3CC5EB64FC683FBEB13AF19374C'
SELECT * FROM BAS_PERSON
SELECT * FROM BAS_UserRole where User_ID='7907c44a14a949eeb6a4d6d1f4ca5dfe'
SELECT * FROM TEST_DEPTEMPSTATION
drop view [PORT_DEPTEMPSTATION]
*******************************************/
CREATE VIEW [DBO].[PORT_DEPTEMPSTATION]
AS
SELECT UR.UserRole_ID as MYPK,SP.DEPTOID as FK_DEPT,UR.Roles_ID as FK_STATION,SP.USERNAMEDecryp as FK_EMP,SP.USERNAME as ecrypname
FROM BAS_UserRole UR INNER JOIN sys_persondefine SP ON SP.USEROID = UR.User_ID AND SP.USERNAME = UR.UserAccount
select * from sys_persondefine where USEROID='7907c44a14a949eeb6a4d6d1f4ca5dfe'
SELECT * FROM BAS_UserRole where User_ID='7907c44a14a949eeb6a4d6d1f4ca5dfe'
4eJRh9QGSewr2ABqugfXjw==
/*******************************************
*
*******************************************/
SELECT OID as Organization_ID,ORGSHORTNAME as Organization_Name,PARENTOID as ParentId,'0' AS isUser,'1' AS DeleteMark FROM BAS_ORG
SELECT USEROID AS Organization_ID ,USERNAME AS User_Name,DEPTOID as Organization_ID,'1' AS isUser,ISDEL AS DeleteMark FROM sys_persondefine
sELECT OID as Organization_ID,ORGSHORTNAME as Organization_Name,PARENTOID as ParentId,'0' AS isUser,'1' AS DeleteMark FROM BAS_ORG UNION ALL
SELECT USEROID AS Organization_ID ,USERNAME AS User_Name,DEPTOID as Organization_ID,'1' AS isUser,ISDEL AS DeleteMark FROM sys_persondefine
SELECT OID as Organization_ID,ORGSHORTNAME as Organization_Name,PARENTOID as ParentId,'0' AS isUser,'0' AS DeleteMark,'0' AS PERSONNAME FROM BAS_ORG UNION ALL
SELECT SP.USEROID AS Organization_ID ,SP.USERNAME AS User_Name,SP.DEPTOID as Organization_ID,'1' AS isUser,SP.ISDEL AS DeleteMark,BP.PERSONNAME FROM sys_persondefine SP
LEFT JOIN BAS_PERSON BP ON SP.USEROID=BP.OID
SELECT * FROM BAS_ORG
SELECT * FROM sys_roledefine
SELECT * FROM SYS_ROLEMEMBERDEFINE
SELECT * FROM SYS_PHONEUSER
SELECT * FROM BAS_UserRole
SELECT * FROM BAS_RoleRight
SELECT * FROM BAS_UserRight
OAccflow集成sql的更多相关文章
- Sphinx 的介绍和原理探索——不存储原始数据,原始数据来源于SQL,而生成索引放在内存或者磁盘中
摘自:http://blog.jobbole.com/101672/ What/Sphinx是什么 定义:Sphinx是一个全文检索引擎. 特性: 索引和性能优异 易于集成SQL和XML数据源,并可使 ...
- sql server和my sql 命令(语句)的差别,sql server与mysql的比較
sql与mysql的比較 1.连接字符串 sql :Initial Catalog(database)=x; --数据库名称 Data Source(source)=x; ...
- Sprk SQL
一.Spark SQL概述 1.Spark SQL的前生今世 Shark是一个为Spark设计的大规模数据仓库系统,它与Hive兼容.Shark建立在Hive的代码基础上,并通过将Hive的部分物理 ...
- SQL Server Management Studio (SSMS)
最新的SQLServer数据库已经不集成SQL Server Management Studio需要单独下载安装. https://docs.microsoft.com/zh-cn/sql/ssms/ ...
- 前世今生:Hive、Shark、spark SQL
Hive (http://en.wikipedia.org/wiki/Apache_Hive )(非严格的原文顺序翻译) Apache Hive是一个构建在Hadoop上的数据仓库框架,它提供数据的 ...
- sql server和my sql 命令(语句)的区别,sql server与mysql的比较
sql与mysql的比较 1.连接字符串sql :Initial Catalog(database)=x; --数据库名称 Data Source(source)=x; - ...
- [搜索引擎]Sphinx的介绍和原理探索
What/Sphinx是什么 定义 Sphinx是一个全文检索引擎. 特性 索引和性能优异 易于集成SQL和XML数据源,并可使用SphinxAPI.SphinxQL或者SphinxSE搜索接口 易于 ...
- Atitit.attilax重要案例 项目与解决方案与成果 v6 qa15
Atitit.attilax重要案例 项目与解决方案与成果 v6 qa15 1. attilax重要案例的分类(atiuse,auBackTech,bizImp)3 1.1. 两个book3 1.2. ...
- Sphinx的介绍和原理探索
What/Sphinx是什么 定义 Sphinx是一个全文检索引擎. 特性 索引和性能优异 易于集成SQL和XML数据源,并可使用SphinxAPI.SphinxQL或者SphinxSE搜索接口 易于 ...
随机推荐
- 【Jmeter基础】 Linux上运行Jmeter
Jmeter 是一个强大的并发压测工具,常用于性能测试,压力测试,接口测试等领域.本文将介绍如下内容: 1. Jmeter 执行阶梯式压测 2. Jmeter 如何压测网站的js,css 等资源 3. ...
- 建站手册-网站建设:Web 安全
ylbtech-建站手册-网站建设:Web 安全 1.返回顶部 1. http://www.w3school.com.cn/site/site_security.asp 2. 2.返回顶部 1. 此刻 ...
- play framework 在idea简单运行配置(mac为例)
文章目录 play 最基本的构建 在idea中配置 配置jdk相关 配置play 运行 运行 play 最基本的构建 https://blog.csdn.net/dataiyangu/article/ ...
- CENTER OS7关闭防火墙
CentOS 7.0默认使用的是firewall作为防火墙,之前版本是使用iptables. 所以在CentOS 7执行下面命令是无法查看防火墙状态的. [root@localhost ~]# ser ...
- day 90 RBAC
参考博客 -陈晓梅 http://www.cnblogs.com/c-x-m/p/9025478.html 登录view from django.shortcuts import render,red ...
- build temu error about SDL
1. 安装sdl2 sudo apt-get install libsdl2-dev 2. 将configure文件中与SDL有关的地方改成SDL2 if test -z "$sdl&quo ...
- BPT(Business Process Testing)
- ORCAL 数据库的约束以及SQL语言的四种类型
oracle数据库约束: 定义:要输入的这个值是一个什么样的值, 或者是哪个范围内的值 作用: 确保完整性, 确保精确性 1, 非空约束(not null) 记录一条信息的时候如果用户名和密码没有被记 ...
- ingress-nginx配置https文件访问
1.先将证书文件上传至服务器特定目录.比如:/root/ssl 假设证书名称为:server.crt和server.key 2.现在主节点后台创建私密文件. kubectl create secret ...
- Centos 进入recovery模式,单用户模式
1.重启服务器,在选择内核界面使用上下箭头移动 2.选择内核并按“e” 3.找到下面这行 4.修改 这里要删除掉rhgb quiet,如下图 5.使用“ctrl + x” 来重启服务器就可以了,重启后 ...