wecisecode 5 days ago
parent
commit
3d6799d82a

+ 7 - 0
odbctest/mql/basic/98syntax/99jsonquery.mql

@@ -0,0 +1,7 @@
+
+
+select json ("/matrix/ldap", "otype='中国'") from /
+/**
+output()
+**/
+;

+ 17 - 0
odbctest/mql/matrix/icbctest/098.auth.mql

@@ -0,0 +1,17 @@
+
+-- 当前用户
+SELECT otype, fullname, parent, grpset FROM /matrix/ldap WHERE username='wecise1' /** output() **/;
+-- 所属组织...父组织
+SELECT otype, fullname, parent, grpset FROM /matrix/ldap WHERE fullname='/wecise' /** output() **/;
+-- 所有的角色 grpset,tlist中存在 欲访问类相关标签 "/m3event/entity/node": "金信广州"
+SELECT name,sdata,tlist FROM /matrix/group WHERE fullname in ('/wecise', '/wecise_temp1') /** output() **/;
+-- 通过角色找到应用
+SELECT id,name,cnname,_group FROM /matrix/portal/tools WHERE _group["list"]='/wecise_temp1' /** output() **/;
+-- 通过应用和欲访问类 找限制访问规则,找不到则不限制,找到了则查找 tags 权限
+SELECT api_rule,class_rule,owner_class_rule FROM /matrix/system/application 
+WHERE name='信创网管' and class_rule in ('/m3event/entity/node') /** output() **/;
+-- 访问数据 增加 tags 条件
+select id from /m3event/entity/node where tags in ('金信广州') limit -1 /** output() count(248) **/;
+-- 验证用户访问受限数据
+select id from /m3event/entity/node limit -1 /** output() qmeta({"user":"wecise1"}) count(248) **/;
+

+ 93 - 0
odbctest/mql/uino/073.match.mql

@@ -0,0 +1,93 @@
+
+
+MATCH (sales:/aia/sales)-[:sales_grpcont*1..1]->(grpcont:/aia/grpcont WHERE grpcontno in ('G09***889A','G09***029A')),  
+(insuregrp:/aia/insuregrp)-[:insuregrp_grpcont*1..1]->(grpcont:/aia/grpcont WHERE grpcontno in ('G09***889A','G09***029A'))
+-[:grpcont_risk*1..1]->(risk:/aia/risk WHERE id='aia_Risk:308C1') 
+WITH timeout=60m
+/**
+output()
+**/;
+
+-- MATCH (sales:/aia/sales)-[:sales_grpcont*1..1]->(grpcont:/aia/grpcont WHERE grpcontno in ('G09***889A','G09***029A')),  
+-- (insuregrp:/aia/insuregrp)-[:insuregrp_grpcont*1..1]->(grpcont:/aia/grpcont WHERE grpcontno in ('G09***889A','G09***029A'))
+-- RETURN sales.id, grpcont.id, insuregrp.id
+-- /**
+-- output()
+-- match( "grpcont.id", "aia_GrpCont:G09***029A", "sales.id", "aia_Sales:7a45b05b-ec5a-11f0-93a3-b88687bddf52")
+-- **/
+-- ;
+-- MATCH (sales:/aia/sales)-[:sales_grpcont*1..1]->(grpcont:/aia/grpcont WHERE grpcontno in ('G09***889A','G09***029A')),  
+-- (insuregrp:/aia/insuregrp)-[:insuregrp_grpcont*1..1]->(grpcont:/aia/grpcont WHERE grpcontno in ('G09***889A','G09***029A'))
+-- -[:grpcont_risk*1..1]->(risk:/aia/risk WHERE id='aia_Risk:308C1') 
+-- RETURN sales.id, grpcont.id, insuregrp.id, risk.id
+-- /**
+-- output()
+-- match( "grpcont.id", "aia_GrpCont:G09***029A", "sales.id", "aia_Sales:7a45b05b-ec5a-11f0-93a3-b88687bddf52")
+-- **/
+-- ;
+
+
+
+
+-- MATCH 
+-- (sales:/aia/sales)
+-- -[:sales_grpcont*1..1]->
+-- (grpcont:/aia/grpcont WHERE grpcontno = 'G09***029A'), 
+-- (sales:/aia/sales)
+-- -[:sales_agent*1..1]->
+-- (agent:/aia/agent)
+-- /**
+-- output()
+-- **/
+-- ;
+
+-- MATCH
+-- (insuregrp:/aia/insuregrp)
+-- -[:insuregrp_grpcont*1..1]->
+-- (grpcont:/aia/grpcont WHERE grpcontno = 'G09***029A')
+-- -[:grpcont_risk*1..1]->
+-- (risk:/aia/risk)
+-- /**
+-- output()
+-- **/
+-- ;
+
+-- MATCH
+-- (sales:/aia/sales)
+-- -[:sales_grpcont*1..1]->
+-- (grpcont:/aia/grpcont WHERE grpcontno = 'G09***029A'), 
+-- (sales:/aia/sales)
+-- -[:sales_agent*1..1]->
+-- (agent:/aia/agent),
+-- (insuregrp:/aia/insuregrp)
+-- -[:insuregrp_grpcont*1..1]->
+-- (grpcont:/aia/grpcont WHERE grpcontno = 'G09***029A')
+-- -[:grpcont_risk*1..1]->
+-- (risk:/aia/risk)
+-- /**
+-- output()
+-- **/
+-- ;
+
+-- MATCH 
+-- (sales:/aia/sales)
+-- -[:sales_grpcont*1..1]->
+-- (grpcont:/aia/grpcont WHERE comshortname like '%上海%' AND contstate in ('满期终止', '保单退保', '保单中止', '犹豫期退保') AND valdate >= '2020-01-01 00:00:00' AND valdate <= '2025-02-28 23:59:59'), 
+-- (sales:/aia/sales)
+-- -[:sales_agent*1..1]->
+-- (agent:/aia/agent), 
+-- (insuregrp:/aia/insuregrp)
+-- -[:insuregrp_grpcont*1..1]->
+-- (grpcont:/aia/grpcont WHERE comshortname like '%上海%' AND contstate in ('满期终止', '保单退保', '保单中止', '犹豫期退保') AND valdate >= '2020-01-01 00:00:00' AND valdate <= '2025-02-28 23:59:59')
+-- -[:grpcont_risk*1..1]->
+-- (risk:/aia/risk) 
+-- RETURN agent.agentname AS "agentname", grpcont.grpname AS "grpname", grpcont.grpcontno AS "grpcontno", risk.riskname AS "riskname" WITH TIMEOUT = 6m
+
+
+-- MATCH 
+-- (sales:/aia/sales)-[:sales_grpcont*1..1]->(grpcont:/aia/grpcont WHERE grpcontno = 'G09***029A'), 
+-- (sales:/aia/sales)-[:sales_agent*1..1]->(agent:/aia/agent)
+-- RETURN agent.agentname AS "agentname", grpcont.grpname AS "grpname", grpcont.grpcontno AS "grpcontno" WITH TIMEOUT = 6m
+
+-- ;
+

+ 16 - 0
odbctest/mql/uino/074.isnil.mql

@@ -0,0 +1,16 @@
+
+
+
+
+select id,name,main_dept_id from /zfdx_poc2/hr_core_person_st where main_dept_id is not null  limit -1
+/**
+output()
+**/
+;
+
+select id,name,main_dept_id from /zfdx_poc2/hr_core_person_st where main_dept_id is null
+/**
+output()
+**/
+;
+