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
Show more breadcrumbs
xrm
basic
Commits
ccc77af3
Commit
ccc77af3
authored
5 years ago
by
Maximilian Hofmann
Browse files
Options
Downloads
Patches
Plain Diff
displayvalue TYPE
parent
be6df859
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
entity/DSGVO_entity/entityfields/type/displayValueProcess.js
+17
-6
17 additions, 6 deletions
entity/DSGVO_entity/entityfields/type/displayValueProcess.js
entity/DSGVO_entity/recordcontainers/jdito/contentProcess.js
+16
-67
16 additions, 67 deletions
entity/DSGVO_entity/recordcontainers/jdito/contentProcess.js
with
33 additions
and
73 deletions
entity/DSGVO_entity/entityfields/type/displayValueProcess.js
+
17
−
6
View file @
ccc77af3
import
(
"
system.db
"
);
import
(
"
KeywordRegistry_basic
"
);
import
(
"
system.result
"
);
import
(
"
Keyword_lib
"
);
import
(
"
Keyword_lib
"
);
import
(
"
system.vars
"
);
var
tablename
=
KeywordUtils
.
getResolvedTitleSqlPart
(
$KeywordRegistry
.
DSGVOTablename
(),
"
DSGVO.TABLENAME
"
);
if
(
tablename
==
"
Adressen
"
)
var
res
;
if
(
tablename
==
"
Adressen
"
)
{
var
addrAdd
=
innerCond
.
andPrepare
(
vars
.
get
(
"
$field.ROW_ID
"
),
"
ADDRESSID
"
)
// RowId
.
buildSql
(
"
select ADDRESSADDITION
"
+
"
from ADDRESS
"
,
"
1 = 1
"
);
if
(
addrAdd
)
result
.
string
(
vars
.
get
(
"
$field.TYPE
"
)
+
"
|
"
+
addrAdd
);
var
addrIdent
=
db
.
cell
(
innerCond
.
andPrepare
(
vars
.
get
(
"
$field.ROW_ID
"
),
"
ADDRESSID
"
)
.
buildSql
(
"
select ADDRESSIDENTIFIER
"
+
"
from ADDRESS
"
,
"
1 = 1
"
));
if
(
addrIdent
)
res
=
KeywordUtils
.
getViewValue
(
$KeywordRegistry
.
addressType
(),
vars
.
get
(
"
$field.TYPE
"
))
+
"
|
"
+
addrIdent
;
}
else
if
(
tablename
==
"
Kommunikationsdaten
"
)
{
res
=
KeywordUtils
.
getViewValue
(
$KeywordRegistry
.
communicationMedium
(),
vars
.
get
(
"
$field.TYPE
"
));
}
else
// Pers. Daten und Attribute
{
res
=
KeywordUtils
.
getViewValue
(
$KeywordRegistry
.
DSGVOType
(),
vars
.
get
(
"
$field.TYPE
"
));
}
result
.
string
(
res
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
entity/DSGVO_entity/recordcontainers/jdito/contentProcess.js
+
16
−
67
View file @
ccc77af3
...
...
@@ -6,19 +6,25 @@ import("system.db");
import
(
"
system.result
"
);
import
(
"
Sql_lib
"
);
import
(
"
Address_lib
"
);
import
(
"
Attribute_lib
"
);
var
recordCond
=
SqlCondition
.
begin
();
if
(
vars
.
exists
(
"
$param.currentPerson_param
"
)
&&
vars
.
get
(
"
$param.currentPerson_param
"
))
var
person
=
vars
.
get
(
"
$param.currentPerson_param
"
);
if
(
vars
.
exists
(
"
$param.currentPerson_param
"
)
&&
person
)
recordCond
.
andPrepareVars
(
"
DSGVO.CONTACT_ID
"
,
"
$param.currentPerson_param
"
);
if
(
vars
.
exists
(
"
$local.idvalues
"
)
&&
vars
.
get
(
"
$local.idvalues
"
)
&&
vars
.
get
(
"
$local.idvalues
"
).
length
>
0
)
recordCond
.
andIn
(
"
DSGVO.DSGVOID
"
,
vars
.
get
(
"
$local.idvalues
"
));
{
recordCond
.
andIn
(
"
DSGVO.DSGVOID
"
,
vars
.
get
(
"
$local.idvalues
"
));
// TODO JH fragen
// person = vars.get("$local.idvalues");
}
var
data
=
db
.
table
(
recordCond
.
buildSql
(
"
select DSGVOID, ROW_ID, TABLENAME, TYPE, STATUORITYSOURCE, PURPOSE, VALID_TO, CONTACT_ID, DATE_NEW, DATE_EDIT, USER_NEW, USER_EDIT from DSGVO
"
,
"
1 = 2
"
));
var
res
=
_groupData
(
data
);
var
res
=
_groupData
(
data
,
person
);
//logging.log(JSON.stringify(res, null, "\t"));
result
.
object
(
res
);
...
...
@@ -26,7 +32,7 @@ result.object(res);
// ,[DSGVOID, ROW_ID, STATUORITYSOURCE, PURPOSE, TABLENAME, TYPE, VALUE, VALID_TO, CONTACT_ID]]
function
_groupData
(
pData
)
function
_groupData
(
pData
,
pPerson
)
{
if
(
pData
.
length
==
0
)
return
[];
...
...
@@ -45,10 +51,7 @@ function _groupData(pData)
.
buildSql
(
"
select ADDRESSID, ADDRESS, ADDRESSADDITION, ADDRIDENTIFIER,
"
+
"
BUILDINGNO, CITY, COUNTRY, DISTRICT, REGION, CONTACT_ID, STATE, ZIP, ADDR_TYPE
"
+
"
from ADDRESS
"
,
"
1 = 1
"
));
// nur Daten: ADDRESS, ADDRESSADDITION, ADDRIDENTIFIER, BUILDINGNO, CITY, COUNTRY, DISTRICT, REGION, STATE, ZIP
// ADDRESSID, ADDRESS, ADDRESSADDITION, ADDRIDENTIFIER, "
// + "BUILDINGNO, CITY, COUNTRY, DISTRICT, REGION, CONTACT_ID, STATE, ZIP, ADDR_TYPE "
//logging.log(JSON.stringify(addrData, null, "\t"));
if
(
addrData
.
length
==
1
)
{
// TODO Addresse formatiert
...
...
@@ -58,27 +61,13 @@ function _groupData(pData)
var
addrVal
=
""
;
addrData
[
0
].
forEach
(
function
(
entry
)
{
logging
.
log
(
entry
);
addrVal
+=
entry
+
"
"
;
});
logging
.
log
(
addrVal
);
//var addrType = KeywordUtils.getViewValue($KeywordRegistry.addressType(), pData[i][3]);
//if(addrData[i][2])
// addrType = addrType + " | " + addrData[i][2];
/*res.push(["DSGVOID", pData[i][0]],
["ROW_ID", pData[i][1]],
["TABLENAME", pData[i][2]],
["TYPE", addrType],
["VALUE", addrVal],
["STATUORITYSOURCE", pData[i][4]],
["PURPOSE", pData[i][5]],
["VALID_TO", pData[i][6]],
["CONTACT_ID", pData[i][7]]
["DATE_NEW", pData[i][8]],
["DATE_EDIT", pData[i][9]],
["USER_NEW", pData[i][10]],
["USER_EDIT", pData[i][11]]);*/
res
.
push
([
pData
[
i
][
0
],
pData
[
i
][
1
],
pData
[
i
][
2
],
...
...
@@ -92,7 +81,7 @@ function _groupData(pData)
pData
[
i
][
9
],
pData
[
i
][
10
],
pData
[
i
][
11
]]);
}
// CONTACT_ID, DATE_NEW, DATE_EDIT, USER_NEW, USER_EDIT
}
break
;
case
"
Kommunikationsdaten
"
:
var
comm
=
db
.
table
(
SqlCondition
.
begin
()
...
...
@@ -100,20 +89,6 @@ function _groupData(pData)
.
buildSql
(
"
select COMMUNICATIONID, ADDR, MEDIUM_ID from COMMUNICATION join CONTACT on COMMUNICATION.CONTACT_ID = CONTACTID
"
,
"
1 = 1
"
));
if
(
comm
.
length
==
1
)
{
//var commType = KeywordUtils.getViewValue($KeywordRegistry.communicationMedium(), pData[i][3]);
/*res.push(["DSGVOID", pData[i][0]],
["ROW_ID", pData[i][1]],
["TABLENAME", pData[i][2]],
["TYPE", commType],
["VALUE", comm[1]],
["STATUORITYSOURCE", pData[i][4]],
["PURPOSE", pData[i][5]],
["VALID_TO", pData[i][6]],
["CONTACT_ID", pData[i][7]]
["DATE_NEW", pData[i][8]],
["DATE_EDIT", pData[i][9]],
["USER_NEW", pData[i][10]],
["USER_EDIT", pData[i][11]]);*/
res
.
push
([
pData
[
i
][
0
],
pData
[
i
][
1
],
pData
[
i
][
2
],
...
...
@@ -130,7 +105,7 @@ function _groupData(pData)
}
break
;
case
"
Attribute
"
:
var
attr
=
AttributeRelationUtils
.
getAllAttributes
(
pPerson
,
pObjectType
,
pUseAttributeIds
,
pUseIdValues
)
break
;
case
"
Persönliche Daten
"
:
var
pers
=
db
.
table
(
SqlCondition
.
begin
()
...
...
@@ -144,20 +119,7 @@ function _groupData(pData)
{
case
"
Namen
"
:
var
names
=
pers
[
6
]
+
"
"
+
pers
[
7
]
+
"
"
+
pers
[
8
]
+
"
"
+
pers
[
2
]
+
"
"
+
pers
[
3
]
+
"
"
+
pers
[
4
];
//var nameType = KeywordUtils.getViewValue($KeywordRegistry.DSGVOType(), pData[i][3]);
/*res.push(["DSGVOID", pData[i][0]],
["ROW_ID", pData[i][1]],
["TABLENAME", pData[i][2]],
["TYPE", nameType],
["VALUE", names],
["STATUORITYSOURCE", pData[i][4]],
["PURPOSE", pData[i][5]],
["VALID_TO", pData[i][6]],
["CONTACT_ID", pData[i][7]]
["DATE_NEW", pData[i][8]],
["DATE_EDIT", pData[i][9]],
["USER_NEW", pData[i][10]],
["USER_EDIT", pData[i][11]]);*/
res
.
push
([
pData
[
i
][
0
],
pData
[
i
][
1
],
pData
[
i
][
2
],
...
...
@@ -174,20 +136,7 @@ function _groupData(pData)
break
;
case
"
sonstige Persönliche Daten
"
:
var
otherPersData
=
pers
[
9
]
+
pers
[
1
]
+
"
,
"
+
pers
[
5
];
//var persDataType = KeywordUtils.getViewValue($KeywordRegistry.DSGVOType(), pData[i][3]);
/*res.push(["DSGVOID", pData[i][0]],
["ROW_ID", pData[i][1]],
["TABLENAME", pData[i][2]],
["TYPE", persDataType],
["VALUE", otherPersData],
["STATUORITYSOURCE", pData[i][4]],
["PURPOSE", pData[i][5]],
["VALID_TO", pData[i][6]],
["CONTACT_ID", pData[i][7]]
["DATE_NEW", pData[i][8]],
["DATE_EDIT", pData[i][9]],
["USER_NEW", pData[i][10]],
["USER_EDIT", pData[i][11]]);*/
res
.
push
([
pData
[
i
][
0
],
pData
[
i
][
1
],
pData
[
i
][
2
],
...
...
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