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搜索接口 易于 ...
随机推荐
- 查看IOS-app证书到期时间
参照: iOS企业版证书到期 https://www.jianshu.com/p/44b0dc46ef37 如果不能十分确定每一个打出来的ipa的有效期(过期时间),而又需要关注它具体什么时候需要强制 ...
- nlp学习笔记
https://mp.weixin.qq.com/s/-w4gENfBt2gKOPvghenw9w
- Python 进阶_闭包 & 装饰器
目录 目录 闭包 函数的实质和属性 闭包有什么好处 小结 装饰器 更加深入的看看装饰器的执行过程 带参数的装饰器 装饰器的叠加 小结 装饰器能解决什么问题 小结 闭包 Closure: 如果内层函数引 ...
- 使用Excel表格的记录单功能轻松处理工作表中数据的方法
使用Excel表格的记录单功能轻松处理工作表中数据的方法 记录单是将一条记录分别存储在同一行的几个单元格中,在同一列中分别存储所有记录的相似信息段.使用记录单功能可以轻松地对工作表中的数据进行查看.查 ...
- 正则split的使用
import re #\s 空格 +号表示至少出现一次 # path = 'C:\\Users\\cz\Desktop\py06\\PY6_Day01\\爬虫作业\\2018_03_07\\05_sp ...
- CSDN如何转载别人的博客
前言 对于喜欢逛CSDN的人来说,看别人的博客确实能够对自己有不小的提高,有时候看到特别好的博客想转载下载,但是不能一个字一个字的敲了,这时候我们就想快速转载别人的博客,把别人的博客移到自己的空间 ...
- Scrapy框架: Request回调函数
Request回调函数 def parse_page1(self, response): return scrapy.Request("http://www.example.com/some ...
- getCss函数
var box=document.getElementById('box'); function getCss(curEle,attr){ var val=null; //去单位 var reg=/^ ...
- Nginx Web 基础入门
目录 Nginx Web 基础入门 Nginx快速安装 两种方式部署Nginx 如何升级nginx或者添加功能 使用systemd管理nginx nginx相关配置文件 nginx的配置文件详解 虚拟 ...
- docker学习---搭建Docker私有库及删除库内镜像
环境准备系统: cat /etc/redhat-release CentOS Linux release (Core) 主机两台,分别是docker私有库服务器(IP 192.168.121.121) ...