Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab Maintenance 11.04.2025 | 20:00 - 23:00 MEZ
Show more breadcrumbs
xrm
basic
Commits
0e7b956c
Commit
0e7b956c
authored
5 years ago
by
Maximilian Hofmann
Browse files
Options
Downloads
Patches
Plain Diff
field VALUE - values
parent
b4c86501
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
entity/DSGVO_entity/DSGVO_entity.aod
+3
-0
3 additions, 0 deletions
entity/DSGVO_entity/DSGVO_entity.aod
neonView/DSGVOEdit_view/DSGVOEdit_view.aod
+8
-8
8 additions, 8 deletions
neonView/DSGVOEdit_view/DSGVOEdit_view.aod
process/DSGVO_lib/process.js
+60
-44
60 additions, 44 deletions
process/DSGVO_lib/process.js
with
71 additions
and
52 deletions
entity/DSGVO_entity/DSGVO_entity.aod
+
3
−
0
View file @
0e7b956c
...
...
@@ -131,6 +131,7 @@
<name>
MEDIUM
</name>
<title>
Type
</title>
<description>
What kind of data is being saved, e.g. Mail, Home address
</description>
<mandatory
v=
"true"
/>
</entityField>
<entityParameter>
<name>
currentPerson_param
</name>
...
...
@@ -175,6 +176,8 @@
<entityField>
<name>
VALUE
</name>
<title>
Value
</title>
<mandatory
v=
"true"
/>
<dropDownProcess>
%aditoprj%/entity/DSGVO_entity/entityfields/value/dropDownProcess.js
</dropDownProcess>
</entityField>
<entityConsumer>
<name>
KeywordTablename
</name>
...
...
This diff is collapsed.
Click to expand it.
neonView/DSGVOEdit_view/DSGVOEdit_view.aod
+
8
−
8
View file @
0e7b956c
...
...
@@ -14,6 +14,14 @@
<editMode
v=
"true"
/>
<entityField>
#ENTITY
</entityField>
<fields>
<entityFieldLink>
<name>
a646ddb9-59b6-4773-af79-9f159fa5e6c9
</name>
<entityField>
TABLENAME
</entityField>
</entityFieldLink>
<entityFieldLink>
<name>
732a0a8a-4db3-4ff9-b4a2-c7ab6f2cf144
</name>
<entityField>
VALUE
</entityField>
</entityFieldLink>
<entityFieldLink>
<name>
191e8712-abf8-42d8-89d5-649dd0164f56
</name>
<entityField>
STATUORITYSOURCE
</entityField>
...
...
@@ -26,14 +34,6 @@
<name>
a9e1245c-7798-4170-9f2f-2e33f61cd6aa
</name>
<entityField>
VALID_TO
</entityField>
</entityFieldLink>
<entityFieldLink>
<name>
a646ddb9-59b6-4773-af79-9f159fa5e6c9
</name>
<entityField>
TABLENAME
</entityField>
</entityFieldLink>
<entityFieldLink>
<name>
732a0a8a-4db3-4ff9-b4a2-c7ab6f2cf144
</name>
<entityField>
VALUE
</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
...
...
This diff is collapsed.
Click to expand it.
process/DSGVO_lib/process.js
+
60
−
44
View file @
0e7b956c
...
...
@@ -6,30 +6,46 @@ import("system.db");
import
(
"
system.neon
"
);
import
(
"
system.result
"
);
function
get
DSGVO
Data
(
pContactId
)
function
new
DSGVO
Entry
(
pContactId
)
{
var
addresses
=
db
.
table
(
SqlCondition
.
begin
().
andPrepare
(
"
ADDRESS.CONTACT_ID
"
,
pContactId
).
buildSql
(
"
select * from ADDRESS
"
,
"
1 = 1
"
));
var
comm
=
db
.
table
(
SqlCondition
.
begin
().
andPrepare
(
"
COMMUNICATION.CONTACT_ID
"
,
pContactId
).
buildSql
(
"
select * from COMMUNICATION
"
,
"
1 = 1
"
));
var
attributes
=
db
.
table
(
SqlCondition
.
begin
().
andPrepare
(
"
ATTRIBUTE.CONTACT_ID
"
,
pContactId
).
buildSql
(
"
select * from ATTRIBUTE
"
,
"
1 = 1
"
));
var
pers
=
db
.
table
(
SqlCondition
.
begin
().
andPrepare
(
"
PERSON.PERSONID
"
,
pContactId
).
buildSql
(
"
select * from PERSON
"
,
"
1 = 1
"
));
// Anzeige Adressen: Straße, Stadt
// Anzeige Comm: Medium, ADDR
var
contact
=
vars
.
get
(
"
$field.CONTACT_ID
"
);
var
res
=
new
Object
();
var
addrData
=
db
.
table
(
SqlCondition
.
begin
()
.
andPrepare
(
"
ADDRESS.CONTACT_ID
"
,
vars
.
get
(
"
$field.CONTACT_ID
"
))
.
buildSql
(
"
select ADDRESSID, ADDRESS, ADDRESSADDITION, ADDRINTENTIFIER, BUILDINGNO,
"
+
"
CITY, COUNTRY, DISTRICT, REGION, STATE, ZIP, CONTACT_ID from ADDRESS
"
,
"
1 = 1
"
));
var
persData
=
db
.
table
(
SqlCondition
.
begin
()
.
andPrepare
(
"
PERSON.PERSONID
"
,
vars
.
get
(
"
$field.CONTACT_ID
"
))
.
buildSql
(
"
select PERSONID, DATEOFBIRTH, FIRSTNAME, MIDDLENAME, LASTNAME, GENDER,
"
+
"
SALUTATION, TITLE, TITLESUFFIX, PICTURE from PERSON
"
,
"
1 = 1
"
));
var
commData
=
db
.
table
(
SqlCondition
.
begin
()
.
andPrepare
(
"
COMMUNICATION.CONTACT_ID
"
,
vars
.
get
(
"
$field.CONTACT_ID
"
))
.
buildSql
(
"
select COMMUNICATIONID, MEDIUM_ID, ADDR from COMMUNICATION
"
,
"
1 = 1
"
));
// ATTR : ??
// for each entry
// insert into DSGVO (DSGVOID, USER_NEW, DATE_NEW, USER_EDIT, DATE_EDIT, ROW_ID, RIGHT, USE, TABLENAME, VALID_TO, CONTACT_ID)
// DSGVOID if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) result.string(util.getNewUUID());
// USER_NEW if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) result.string(vars.get("$sys.user"));
// DATE_NEW if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) result.string(vars.get("$sys.date"));
// USER_EDIT null
// DATE_EDIT null
// ROW_ID -entspr. Tablename&ID raussuchen
// RIGHT -Auswahl
// USE -Auswahl
// TABLENAME -von Auswahl schließen
// VALID_TO -Auswahl
// CONTACT_ID pContactId
res
[
""
]
=
""
;
// for each entry
// insert into DSGVO (DSGVOID, USER_NEW, DATE_NEW, USER_EDIT, DATE_EDIT, ROW_ID, RIGHT, USE, TABLENAME, VALID_TO, CONTACT_ID)
// DSGVOID if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) result.string(util.getNewUUID());
// USER_NEW if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) result.string(vars.get("$sys.user"));
// DATE_NEW if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) result.string(vars.get("$sys.date"));
// USER_EDIT null
// DATE_EDIT null
// ROW_ID -entspr. Tablename&ID raussuchen
// RIGHT -Auswahl
// USE -Auswahl
// TABLENAME -von Auswahl schließen
// VALID_TO -Auswahl
// CONTACT_ID pContactId
...
...
@@ -51,8 +67,8 @@ function insertUpdatePrivacyData(pTableData, pPersRelId){
var
updTypes
=
db
.
getColumnTypes
(
"
DATA_PRIVACY
"
,
updCols
);
var
updateIds
=
SqlCondition
.
begin
()
.
andPrepare
(
"
DSGVO.CONTACT_ID
"
,
pPersRelId
)
.
buildSql
(
"
select ROW_ID, DSGVOID from DSGVO
"
,
"
1=2
"
);
.
andPrepare
(
"
DSGVO.CONTACT_ID
"
,
pPersRelId
)
.
buildSql
(
"
select ROW_ID, DSGVOID from DSGVO
"
,
"
1=2
"
);
var
updateIdMap
=
new
Object
();
for
(
let
i
=
0
;
i
<
updateIds
.
length
;
i
++
)
{
...
...
@@ -94,10 +110,10 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
//Hat die Privat-Person auch eine Funktion an einer Firma
var
hasFunction
=
db
.
cell
(
SqlCondition
.
begin
()
.
andPrepare
(
"
CONTACT.PERSON_ID
"
,
pPersId
)
.
andPrepare
(
"
CONTACT.ORGANISATION_ID
"
,
"
0
"
,
"
# != ?
"
)
// TODO ungleich 0, stimmt das so?
.
build
(
"
select count(*) from CONTACT
"
,
"
1=2
"
));
// db.cell(" select count(*) from RELATION where PERS_ID = '" + pPersId + "' and ORGANISATION != '0' ");
.
andPrepare
(
"
CONTACT.PERSON_ID
"
,
pPersId
)
.
andPrepare
(
"
CONTACT.ORGANISATION_ID
"
,
"
0
"
,
"
# != ?
"
)
// TODO ungleich 0, stimmt das so?
.
build
(
"
select count(*) from CONTACT
"
,
"
1=2
"
));
// db.cell(" select count(*) from RELATION where PERS_ID = '" + pPersId + "' and ORGANISATION != '0' ");
var
prompts
=
new
Array
();
prompts
[
"
PERSREL
"
]
=
hasFunction
;
...
...
@@ -114,9 +130,9 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
if
((
jsonResult
[
"
comp.chb_Names
"
]
==
"
true
"
))
{
data
=
db
.
array
(
db
.
ROW
,
SqlCondition
.
begin
()
.
andPrepare
(
"
CONTACT.PERSON_ID
"
,
pPersId
)
.
build
(
"
select SALUTATION, TITLE, FIRSTNAME, MIDDLENAME, LASTNAME from PERS
"
,
"
1=2
"
)
);
.
andPrepare
(
"
CONTACT.PERSON_ID
"
,
pPersId
)
.
build
(
"
select SALUTATION, TITLE, FIRSTNAME, MIDDLENAME, LASTNAME from PERS
"
,
"
1=2
"
)
);
/*data = db.array(db.ROW, "select SALUTATION, TITLE, FIRSTNAME, MIDDLENAME, LASTNAME "
+ " from PERS "
+ " where PERSID = '" + pPersId + "'");*/
...
...
@@ -125,7 +141,7 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
columns
=
[
"
SALUTATION
"
,
"
TITLE
"
,
"
FIRSTNAME
"
,
"
MIDDLENAME
"
,
"
LASTNAME
"
];
columnTypes
=
db
.
getColumnTypes
(
"
PERSON
"
,
columns
);
condition
=
SqlCondition
.
andPrepare
(
"
PERSONID
"
,
pPersId
)
.
and
(
"
1=2
"
);
.
and
(
"
1=2
"
);
//condition = "PERSONID = '" + pPersId + "'";
updArray
.
push
([
"
PERSON
"
,
columns
,
columnTypes
,
values
,
condition
])
...
...
@@ -136,8 +152,8 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
if
(
jsonResult
[
"
comp.chb_others
"
]
==
"
true
"
)
{
data
=
db
.
array
(
db
.
ROW
,
SqlCondition
.
begin
()
.
andPrepare
(
"
CONTACT.PERSON_ID
"
,
pPersId
)
.
build
(
"
select DOB, GENDER, SUFFIX, PERSINFO from PERS
"
,
"
1=2
"
));
.
andPrepare
(
"
CONTACT.PERSON_ID
"
,
pPersId
)
.
build
(
"
select DOB, GENDER, SUFFIX, PERSINFO from PERS
"
,
"
1=2
"
));
/*, "select DOB, GENDER, SUFFIX, PERSINFO "
+ " from PERS "
...
...
@@ -147,7 +163,7 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
columns
=
[
"
DOB
"
,
"
GENDER
"
,
"
SUFFIX
"
,
"
PERSINFO
"
];
columnTypes
=
db
.
getColumnTypes
(
"
PERS
"
,
columns
);
condition
=
SqlCondition
.
andPrepare
(
"
PERSONID
"
,
pPersId
)
.
and
(
"
1=2
"
);
.
and
(
"
1=2
"
);
//condition = "PERSID = '" + pPersId + "'";
updArray
.
push
([
"
PERS
"
,
columns
,
columnTypes
,
values
,
condition
])
...
...
@@ -158,9 +174,9 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
if
(
jsonResult
[
"
comp.chb_Address
"
]
==
"
true
"
)
{
data
=
db
.
table
(
SqlCondition
.
begin
()
.
andPrepare
(
"
CONTACT_ID
"
,
pContactId
)
.
build
(
"
select ADDRESS, STATE, CITY, COUNTRY, REGION, BUILDINGNO, ADDRESSADDITION, ZIP, DISTRICT, ADDRESSID
"
+
"
from ADDRESS
"
,
"
1=2
"
));
.
andPrepare
(
"
CONTACT_ID
"
,
pContactId
)
.
build
(
"
select ADDRESS, STATE, CITY, COUNTRY, REGION, BUILDINGNO, ADDRESSADDITION, ZIP, DISTRICT, ADDRESSID
"
+
"
from ADDRESS
"
,
"
1=2
"
));
/*" select ADDRESS, STATE, CITY, COUNTRY, REGION, BUILDINGNO, ADDRESSADDITION, ZIP, DISTRICT, ADDRESSID "
+ " from ADDRESS "
...
...
@@ -179,8 +195,8 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
// TODO prüfen
condition
=
SqlCondition
.
andPrepare
(
"
CONTACT_ID
"
,
pContactId
)
.
andPrepare
(
"
ADDRESSID
"
,
data
[
i
][
9
])
.
and
(
"
1=2
"
);
.
andPrepare
(
"
ADDRESSID
"
,
data
[
i
][
9
])
.
and
(
"
1=2
"
);
//condition = " CONTACT_ID = '" + pContactId + "' and ADDRESSID = '" + data[i][9] + "' ";
updArray
.
push
([
"
ADDRESS
"
,
columns
,
columnTypes
,
values
,
condition
]);
}
...
...
@@ -191,8 +207,8 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
if
(
jsonResult
[
"
comp.chb_Comm
"
]
==
"
true
"
)
{
data
=
db
.
table
(
SqlCondition
.
begin
()
.
andPrepare
(
"
CONTACT_ID
"
,
pContactId
)
.
build
(
"
select ADDRESS, SEARCHADDR, COMMUNICATIONID from COMMUNICATION
"
,
"
1=2
"
));
.
andPrepare
(
"
CONTACT_ID
"
,
pContactId
)
.
build
(
"
select ADDRESS, SEARCHADDR, COMMUNICATIONID from COMMUNICATION
"
,
"
1=2
"
));
//data = db.table("select ADDR, SEARCHADDR, COMMID from COMM where RELATION_ID = '" + pContactId + "'");
columns
=
[
"
ADDR
"
,
"
SEARCHADDR
"
];
...
...
@@ -202,8 +218,8 @@ function dsgvoMkDataAnonymous(pPersId, pContactId)
values
=
[
dsgvoMkTextAnonymous
(
data
[
i
][
0
]),
dsgvoMkTextAnonymous
(
data
[
i
][
1
])];
condition
=
SqlCondition
.
andPrepare
(
"
CONTACT_ID
"
,
pContactId
)
.
andPrepare
(
"
COMMUNICATIONID
"
,
data
[
i
][
2
]).
and
(
"
1=2
"
);
// TODO prüfen
.
andPrepare
(
"
COMMUNICATIONID
"
,
data
[
i
][
2
]).
and
(
"
1=2
"
);
// TODO prüfen
//"RELATION_ID = '" + pContactId + "' and COMMID = '" + data[i][2] + "' ";
updArray
.
push
([
"
COMM
"
,
columns
,
columnTypes
,
values
,
condition
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment