Skip to content
Snippets Groups Projects
Commit e2583556 authored by David Büchler's avatar David Büchler
Browse files

Grundgerüst des Allgemeinen Dublettenübersichts-Contextes. Dieser lädt alle...

Grundgerüst des Allgemeinen Dublettenübersichts-Contextes. Dieser lädt alle Dublettenarten über den gleichen JDito Recordcontainer über diverse Provider/Consumer Paare im gleichen Entity.
Entfernen des ursprünglichen Duplicates_entity, dieses wurde im alten Umfang nicht mehr benötigt.
parent e32e3d77
No related branches found
No related tags found
No related merge requests found
Showing
with 198 additions and 112 deletions
......@@ -231,6 +231,11 @@
<name>Salutation</name>
<kind v="10077" />
</entityNode>
<entityNode>
<name>Duplicates</name>
<kind v="10077" />
<title></title>
</entityNode>
<entityNode>
<name>DuplicateScan</name>
<kind v="10077" />
......
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.11" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.11">
<name>Duplicates_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainer>jditoRecordContainer</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
<dependencies>
<entityDependency>
<name>d92fb732-c99d-40ae-a7f6-baf239f83b78</name>
<entityName>Duplicates_entity</entityName>
<fieldName>SelfPersonDuplicatesConsumer</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityField>
<name>UID</name>
</entityField>
<entityField>
<name>targetContext</name>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
<name>jditoRecordContainer</name>
<jDitoRecordAlias>Data_alias</jDitoRecordAlias>
<contentProcess>%aditoprj%/entity/Duplicates_entity/recordcontainers/jditorecordcontainer/contentProcess.js</contentProcess>
<recordFieldMappings>
<jDitoRecordFieldMapping>
<name>UID.value</name>
</jDitoRecordFieldMapping>
</recordFieldMappings>
</jDitoRecordContainer>
</recordContainers>
</entity>
......@@ -2,135 +2,91 @@
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.11" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.11">
<name>Duplicates_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainer>jditoRecordContainer</recordContainer>
<title>Duplicates</title>
<recordContainer>recordContainer</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityParameter>
<name>filterName_param</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityParameter>
<name>targetEntity_param</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityParameter>
<name>valuesToScan_param</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityParameter>
<name>resultFields_param</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityField>
<name>VALUE1</name>
<name>CLUSTER_DESCRIPTION</name>
</entityField>
<entityField>
<name>VALUE2</name>
<name>COUNT_DUPLICATES_IN_CLUSTER</name>
</entityField>
<entityField>
<name>VALUE3</name>
</entityField>
<entityProvider>
<name>DuplicatesProvider</name>
<targetContextField>targetContext</targetContextField>
<targetIdField>UID</targetIdField>
<titlePlural>Duplicates</titlePlural>
<dependencies>
<entityDependency>
<name>4d787122-cc91-4afa-a85a-dd0265cb289e</name>
<entityName>Organisation_entity</entityName>
<fieldName>OrganisationDuplicates</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>d27771c1-1302-46dc-b285-76c345532e80</name>
<entityName>Person_entity</entityName>
<fieldName>PersonDuplicates</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityField>
<name>targetContext</name>
<name>TARGET_ENTITY</name>
</entityField>
<entityField>
<name>UID</name>
</entityField>
<entityParameter>
<name>resultFieldsIdFieldName_param</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityField>
<name>maxReturnValueCount</name>
<valueProcess>%aditoprj%/entity/Duplicates_entity/entityfields/maxreturnvaluecount/valueProcess.js</valueProcess>
</entityField>
<entityParameter>
<name>recordIdToIgnore_param</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityParameter>
<name>targetContext_param</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityActionGroup>
<name>ActionGroup</name>
<entityProvider>
<name>SelfPersonDuplicatesProvider</name>
<titlePlural>Person duplicates</titlePlural>
<children>
<entityActionField>
<name>IntegrateSelectedIntoCurrentAction</name>
<title>Integrate selected into current contact</title>
<onActionProcess>%aditoprj%/entity/Duplicates_entity/entityfields/actiongroup/children/integrateselectedintocurrentaction/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
</entityActionField>
<entityActionField>
<name>IntegrateCurrentIntoSelectedAction</name>
<title>Integrate current into selected contact</title>
<onActionProcess>%aditoprj%/entity/Duplicates_entity/entityfields/actiongroup/children/integratecurrentintoselectedaction/onActionProcess.js</onActionProcess>
<isSelectionAction v="true" />
</entityActionField>
<entityParameter>
<name>TargetEntity</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
</children>
</entityActionGroup>
</entityProvider>
<entityConsumer>
<name>SelfPersonDuplicatesConsumer</name>
<dependency>
<name>dependency</name>
<entityName>Duplicates_entity</entityName>
<fieldName>SelfPersonDuplicatesProvider</fieldName>
</dependency>
<children>
<entityParameter>
<name>TargetEntity</name>
<valueProcess>%aditoprj%/entity/Duplicates_entity/entityfields/selfpersonduplicatesconsumer/children/targetentity/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
<name>sourceContactId_param</name>
<name>TargetEntity</name>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
<entityConsumer>
<name>PersonConsumer</name>
<name>SelfOrganisationDuplicatesConsumer</name>
<dependency>
<name>dependency</name>
<entityName>Person_entity</entityName>
<fieldName>Contacts</fieldName>
<entityName>Duplicates_entity</entityName>
<fieldName>SelfOrganisationDuplicatesProvider</fieldName>
</dependency>
<children>
<entityParameter>
<name>OnlyShowContactIds_param</name>
<valueProcess>%aditoprj%/entity/Duplicates_entity/entityfields/personconsumer/children/onlyshowcontactids_param/valueProcess.js</valueProcess>
<name>TargetEntity</name>
<valueProcess>%aditoprj%/entity/Duplicates_entity/entityfields/selforganisationduplicatesconsumer/children/targetentity/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
<name>contactIdToCheckForCachedDuplicates_param</name>
<expose v="true" />
</entityParameter>
<entityProvider>
<name>SelfOrganisationDuplicatesProvider</name>
<titlePlural>Organisation duplicates</titlePlural>
</entityProvider>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
<name>jditoRecordContainer</name>
<name>recordContainer</name>
<jDitoRecordAlias>Data_alias</jDitoRecordAlias>
<contentProcess>%aditoprj%/entity/Duplicates_entity/recordcontainers/jditorecordcontainer/contentProcess.js</contentProcess>
<contentProcess>%aditoprj%/entity/Duplicates_entity/recordcontainers/recordcontainer/contentProcess.js</contentProcess>
<recordFieldMappings>
<jDitoRecordFieldMapping>
<name>UID.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>CLUSTER_DESCRIPTION.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>COUNT_DUPLICATES_IN_CLUSTER.value</name>
</jDitoRecordFieldMapping>
<jDitoRecordFieldMapping>
<name>TARGET_ENTITY.value</name>
</jDitoRecordFieldMapping>
</recordFieldMappings>
</jDitoRecordContainer>
</recordContainers>
......
import("system.vars");
import("DuplicateScanner_lib");
import("system.result");
var contactIdToCheck = vars.get("$param.contactIdToCheckForCachedDuplicates_param");
result.string(DuplicateScannerUtils.GetCachedDuplicatesForContactId(contactIdToCheck));
\ No newline at end of file
import("system.result");
result.string("Organisation_entity");
\ No newline at end of file
import("system.result");
result.string("5");
\ No newline at end of file
result.string("Person_entity");
\ No newline at end of file
import("system.vars");
import("system.result");
let targetEntity = vars.get("$param.TargetEntity");
let duplicates = [];
if(targetEntity == "Person_entity")
{
duplicates.push([123, "Description of person cluster", 4, "Person_entity"]);
}
else if(targetEntity == "Organisation_entity")
{
duplicates.push([124, "Description of org cluster", 2, "Organisation_entity"]);
}
result.object(duplicates);
\ No newline at end of file
......@@ -902,8 +902,6 @@
<name>OrganisationDuplicates</name>
<dependency>
<name>dependency</name>
<entityName>Duplicates_entity</entityName>
<fieldName>DuplicatesProvider</fieldName>
</dependency>
<children>
<entityParameter>
......
......@@ -699,12 +699,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<fieldName>Contacts</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>75587569-821b-45bc-9771-34f254313cdc</name>
<entityName>Duplicates_entity</entityName>
<fieldName>PersonConsumer</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......@@ -958,8 +952,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<name>PersonDuplicates</name>
<dependency>
<name>dependency</name>
<entityName>Duplicates_entity</entityName>
<fieldName>DuplicatesProvider</fieldName>
</dependency>
<children>
<entityParameter>
......
<?xml version="1.0" encoding="UTF-8"?>
<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
<name>Duplicates</name>
<title>Duplicates</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<filterview>DuplicatesOverview_view</filterview>
<entity>Duplicates_entity</entity>
<references>
<neonViewReference>
<name>fe767c88-a869-4fe6-b61d-8727faad7a12</name>
<view>DuplicatesFilter_view</view>
<name>d8994f4c-3abf-4ff1-8bdb-f12e527df655</name>
<view>PersonDuplicatesFilter_view</view>
</neonViewReference>
<neonViewReference>
<name>de287a3b-1d6a-435c-b65e-d833c1751edf</name>
<view>DuplicatesOverview_view</view>
</neonViewReference>
<neonViewReference>
<name>89fb0738-6d12-4bc1-9c4f-bb27c19ae9a3</name>
<view>OrganisationDuplicatesFilter_view</view>
</neonViewReference>
</references>
</neonContext>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.2">
<name>DuplicatesOverview_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<masterSlaveLayout>
<name>layout</name>
</masterSlaveLayout>
</layout>
<children>
<neonViewReference>
<name>a858aa7c-a751-4e99-87df-08ae3d1ea1b9</name>
<entityField>SelfPersonDuplicatesConsumer</entityField>
<view>PersonDuplicatesFilter_view</view>
</neonViewReference>
<neonViewReference>
<name>98f44c67-4371-45bf-9458-b41ec28753b3</name>
<entityField>SelfOrganisationDuplicatesConsumer</entityField>
<view>OrganisationDuplicatesFilter_view</view>
</neonViewReference>
</children>
</neonView>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.2">
<name>DuplicatesFilter_view</name>
<title>Duplicates</title>
<name>OrganisationDuplicatesFilter_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
......@@ -10,26 +9,16 @@
</layout>
<children>
<tableViewTemplate>
<name>DuplicatesTable</name>
<favoriteActionGroup2>ActionGroup</favoriteActionGroup2>
<name>OrganisationDuplicatesTable</name>
<entityField>#ENTITY</entityField>
<isCreatable v="false" />
<isEditable v="false" />
<isDeletable v="false" />
<showHeader v="true" />
<linkedFrame></linkedFrame>
<columns>
<neonTableColumn>
<name>6d6aef18-53c9-4a43-8929-c421ea2d1889</name>
<entityField>VALUE1</entityField>
<name>7508e984-6a0b-4126-ab49-452e2b54f76d</name>
<entityField>CLUSTER_DESCRIPTION</entityField>
</neonTableColumn>
<neonTableColumn>
<name>24e1bc96-a1a4-4923-a3a6-816009f68276</name>
<entityField>VALUE2</entityField>
</neonTableColumn>
<neonTableColumn>
<name>b90994bf-7398-4f27-b303-4326a30f8fad</name>
<entityField>VALUE3</entityField>
<name>8615259b-de5b-493a-945d-2ff934ae1b8c</name>
<entityField>COUNT_DUPLICATES_IN_CLUSTER</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
......
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.2">
<name>PersonDuplicatesFilter_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<tableViewTemplate>
<name>PersonDuplicatesTable</name>
<entityField>#ENTITY</entityField>
<columns>
<neonTableColumn>
<name>7508e984-6a0b-4126-ab49-452e2b54f76d</name>
<entityField>CLUSTER_DESCRIPTION</entityField>
</neonTableColumn>
<neonTableColumn>
<name>8615259b-de5b-493a-945d-2ff934ae1b8c</name>
<entityField>COUNT_DUPLICATES_IN_CLUSTER</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
</children>
</neonView>
......@@ -55,7 +55,7 @@ DuplicateScannerUtils.DeleteCachedDuplicate = function(pContactId)
DuplicateScannerUtils.DeleteAllUnrelatedDuplicateRelations(pContactId);
}
DuplicateScannerUtils.CreateUnrelatedDuplicateRelation = function(pSourceContactId, pUnrelatedContactId)
DuplicateScannerUtils.CreateUnrelatedDuplicateRelation = function(dd, pUnrelatedContactId)
{
let newUid = util.getNewUUID();
let columns = ["ID", "SOURCEDUPLICATEID", "UNRELATEDDUPLICATEID"];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment