Skip to content
Snippets Groups Projects
Commit a19b48ce authored by Andreas Schindlbeck's avatar Andreas Schindlbeck
Browse files

Merge origin/master

Conflicts:
	entity/Pers_entity/Pers_entity.aod
	preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod
parents c76fa83a d45aee86
No related branches found
No related tags found
No related merge requests found
Showing
with 163 additions and 17 deletions
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
/data /data
/others/db_changes/jdbc/ /others/db_changes/jdbc/
/others/db_changes/liquibase/ /others/db_changes/liquibase/
/others/db_changes/liqui_update.bat /others/db_changes/liqui_update.bat
\ No newline at end of file /others/db_changes/liqui_reset.ps1
\ No newline at end of file
...@@ -1189,6 +1189,7 @@ ...@@ -1189,6 +1189,7 @@
<titleColumn>TITLECOLUMN</titleColumn> <titleColumn>TITLECOLUMN</titleColumn>
<descriptionColumn>DESCCOLUMN</descriptionColumn> <descriptionColumn>DESCCOLUMN</descriptionColumn>
<query>%aditoprj%/aliasDefinition/Data_alias/indexsearchgroups/org/query.js</query> <query>%aditoprj%/aliasDefinition/Data_alias/indexsearchgroups/org/query.js</query>
<subQueries>%aditoprj%/aliasDefinition/Data_alias/indexsearchgroups/org/subQueries.js</subQueries>
<resultContextNeon>Org_context</resultContextNeon> <resultContextNeon>Org_context</resultContextNeon>
<affectedTables> <affectedTables>
<element>ADDRESS</element> <element>ADDRESS</element>
...@@ -1206,6 +1207,7 @@ ...@@ -1206,6 +1207,7 @@
<titleColumn>TITLECOLUMN</titleColumn> <titleColumn>TITLECOLUMN</titleColumn>
<descriptionColumn>DESCCOLUMN</descriptionColumn> <descriptionColumn>DESCCOLUMN</descriptionColumn>
<query>%aditoprj%/aliasDefinition/Data_alias/indexsearchgroups/pers/query.js</query> <query>%aditoprj%/aliasDefinition/Data_alias/indexsearchgroups/pers/query.js</query>
<subQueries>%aditoprj%/aliasDefinition/Data_alias/indexsearchgroups/pers/subQueries.js</subQueries>
<resultContextNeon>Pers_context</resultContextNeon> <resultContextNeon>Pers_context</resultContextNeon>
<affectedTables> <affectedTables>
<element>ADDRESS</element> <element>ADDRESS</element>
......
import("system.logging");
import("system.result"); import("system.result");
import("system.vars"); import("system.vars");
import("system.calendars"); import("system.calendars");
...@@ -10,11 +11,14 @@ if (vars.exists("$local.idvalue")) { ...@@ -10,11 +11,14 @@ if (vars.exists("$local.idvalue")) {
queryCondition = "where RELATION.RELATIONID in ('" + affectedIds.map(function (v){return db.quote(v);}).join("', '") + "')"; queryCondition = "where RELATION.RELATIONID in ('" + affectedIds.map(function (v){return db.quote(v);}).join("', '") + "')";
//TODO: refactor this for incremental indexer (injections?) //TODO: refactor this for incremental indexer (injections?)
} }
sqlHelper = new SqlUtils(); sqlHelper = new LegacySqlUtils();
sqlQuery = "select RELATION.RELATIONID " sqlQuery = "select RELATION.RELATIONID "
+ "," + sqlHelper.concat(["ORG.NAME", "ORG.CUSTOMERCODE", "defaultAddress.COUNTRY", "defaultAddress.ZIP", "defaultAddress.CITY"]) + "," + sqlHelper.concat(["ORG.NAME", "ORG.CUSTOMERCODE"])
+ " as TITLECOLUMN " + " as TITLECOLUMN "
+ "," + sqlHelper.concat(["ADDRESS", "BUILDINGNO", "', '", "COUNTRY", "'-'", "ZIP", "CITY"], ' ') + " as DESCCOLUMN " + "," + sqlHelper.concat([
sqlHelper.concat(["defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO"])
,sqlHelper.concat(["defaultAddress.ZIP", "defaultAddress.CITY"])
,"defaultAddress.COUNTRY"], ", ") + " as DESCCOLUMN "
//additional indexed fields //additional indexed fields
+ ",ORG.NAME, COMM.ADDR " + ",ORG.NAME, COMM.ADDR "
+ " from ORG " + " from ORG "
......
import("system.result");
result.string("select ADDRESS.ZIP, ADDRESS.CITY, ADDRESS.COUNTRY, ADDRESS.ADDRESS from ADDRESS where ADDRESS.RELATION_ID = '@@@'");
\ No newline at end of file
...@@ -10,11 +10,14 @@ if (vars.exists("$local.idvalue")) { ...@@ -10,11 +10,14 @@ if (vars.exists("$local.idvalue")) {
queryCondition = "where RELATION.RELATIONID in ('" + affectedIds.map(function (v){return db.quote(v);}).join("', '") + "')"; queryCondition = "where RELATION.RELATIONID in ('" + affectedIds.map(function (v){return db.quote(v);}).join("', '") + "')";
//TODO: refactor this for incremental indexer (injections?) //TODO: refactor this for incremental indexer (injections?)
} }
sqlHelper = new SqlUtils(); sqlHelper = new LegacySqlUtils();
sqlQuery = "select RELATION.RELATIONID " sqlQuery = "select RELATION.RELATIONID "
+ "," + sqlHelper.concat(["PERS.SALUTATION", "PERS.FIRSTNAME", "PERS.LASTNAME", "ORG.NAME"]) + "," + sqlHelper.concat(["PERS.SALUTATION", "PERS.FIRSTNAME", "PERS.LASTNAME", "ORG.NAME"])
+ " as TITLECOLUMN " + " as TITLECOLUMN "
+ "," + sqlHelper.concat(["ADDRESS", "BUILDINGNO", "', '", "COUNTRY", "'-'", "ZIP", "CITY"], ' ') + " as DESCCOLUMN " + "," + sqlHelper.concat([
sqlHelper.concat(["defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO"])
,sqlHelper.concat(["defaultAddress.ZIP", "defaultAddress.CITY"])
,"defaultAddress.COUNTRY"], ", ") + " as DESCCOLUMN "
//additional indexed fields //additional indexed fields
+ ",ORG.NAME, COMM.ADDR " + ",ORG.NAME, COMM.ADDR "
+ " from PERS " + " from PERS "
......
import("system.result");
result.string("select ADDRESS.ZIP, ADDRESS.CITY, ADDRESS.COUNTRY, ADDRESS.ADDRESS from ADDRESS where ADDRESS.RELATION_ID = '@@@'");
\ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<node name="CONTACTS" kind="123" title="Contactmanagement"> <node name="CONTACTS" kind="123" title="Contactmanagement">
<icon>VAADIN:STAR</icon> <icon>VAADIN:STAR</icon>
<node name="Group1" kind="123" title=""> <node name="Group1" kind="123" title="">
<node name="_test_clientProcess" kind="103" />
<node name="Vertriebsdashboard" kind="10090" /> <node name="Vertriebsdashboard" kind="10090" />
<node name="Calendar_context" kind="10077" /> <node name="Calendar_context" kind="10077" />
<node name="Org_context" kind="10077" /> <node name="Org_context" kind="10077" />
......
...@@ -120,6 +120,12 @@ ...@@ -120,6 +120,12 @@
<fieldName>OrgAddress_dfo</fieldName> <fieldName>OrgAddress_dfo</fieldName>
<isOutgoing v="false" /> <isOutgoing v="false" />
</entityDependency> </entityDependency>
<entityDependency>
<name>aa44f6ec-2b9b-43f8-902d-92490480413f</name>
<entityName>Pers_entity</entityName>
<fieldName>OrgAddress_dfo</fieldName>
<isOutgoing v="false" />
</entityDependency>
</dependencies> </dependencies>
</entityIncomingField> </entityIncomingField>
<entityParameter> <entityParameter>
...@@ -139,6 +145,21 @@ ...@@ -139,6 +145,21 @@
</entityDependency> </entityDependency>
</dependencies> </dependencies>
</entityIncomingField> </entityIncomingField>
<entityParameter>
<name>StandardAddressId_param</name>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityField>
<name>IS_STANDARD</name>
<contentType>BOOLEAN</contentType>
<possibleItemsProcess>%aditoprj%/entity/Address_entity/entityfields/is_standard/possibleItemsProcess.js</possibleItemsProcess>
<valueProcess>%aditoprj%/entity/Address_entity/entityfields/is_standard/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/Address_entity/entityfields/is_standard/onValueChange.js</onValueChange>
<onValueChangeTypes>
<element>MASK</element>
</onValueChangeTypes>
</entityField>
</entityFields> </entityFields>
<linkInformation> <linkInformation>
<linkInformation> <linkInformation>
......
import("system.neon");
import("system.logging");
import("system.vars");
vars.set("$image.EditedStandardAddressId", vars.get("$field.ADDRESSID"));
neon.refresh("$sys.currentimage", "$field.OrgAddress_dfo");//TODO: refresh the correct DFO
//TODO: store in database via onUpdate
\ No newline at end of file
import("system.translate");
import("system.result");
result.object([
["true", translate.text("Standardadresse")]
,["false", ""]
]);
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.result");
var currentAddressId, changedAddressId;
currentAddressId = vars.get("$field.ADDRESSID");
if (vars.exists("$image.EditedStandardAddressId")){
changedAddressId = vars.get("$image.EditedStandardAddressId");
}
result.string((changedAddressId ? changedAddressId : vars.get("$param.StandardAddressId_param")) == currentAddressId);
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<alias>Data_alias</alias> <alias>Data_alias</alias>
<conditionProcess>%aditoprj%/entity/Comm_entity/conditionProcess.js</conditionProcess> <conditionProcess>%aditoprj%/entity/Comm_entity/conditionProcess.js</conditionProcess>
<orderClauseProcess>%aditoprj%/entity/Comm_entity/orderClauseProcess.js</orderClauseProcess>
<recordContainerType>DB</recordContainerType> <recordContainerType>DB</recordContainerType>
<caption>Communication</caption> <caption>Communication</caption>
<entityFields> <entityFields>
...@@ -91,6 +92,11 @@ ...@@ -91,6 +92,11 @@
</entityDependency> </entityDependency>
</dependencies> </dependencies>
</entityIncomingField> </entityIncomingField>
<entityField>
<name>IS_STANDARD</name>
<contentType>BOOLEAN</contentType>
<valueProcess>%aditoprj%/entity/Comm_entity/entityfields/is_standard/valueProcess.js</valueProcess>
</entityField>
</entityFields> </entityFields>
<linkInformation> <linkInformation>
<linkInformation> <linkInformation>
......
import("system.vars");
import("system.result");
result.string(vars.get("$field.STANDARD") == "1");
\ No newline at end of file
import("system.result");
import("system.db");
result.object({"COMM.MEDIUM_ID": db.ASCENDING});
\ No newline at end of file
...@@ -8,7 +8,7 @@ var rowId, conditionStr, preparedValues ...@@ -8,7 +8,7 @@ var rowId, conditionStr, preparedValues
,sqlHelper; ,sqlHelper;
conditionStr = ""; conditionStr = "";
preparedValues = []; preparedValues = [];
sqlHelper = new SqlUtils(); sqlHelper = new LegacySqlUtils();
if ((rowId = vars.getString("$param.RowId_param"))){ if ((rowId = vars.getString("$param.RowId_param"))){
conditionStr += " and HISTORYLINK.ROW_ID = ? "; conditionStr += " and HISTORYLINK.ROW_ID = ? ";
......
...@@ -183,6 +183,14 @@ ...@@ -183,6 +183,14 @@
<entityIncomingField> <entityIncomingField>
<name>Org_dfi</name> <name>Org_dfi</name>
<fieldType>DEPENDENCY_IN</fieldType> <fieldType>DEPENDENCY_IN</fieldType>
<dependencies>
<entityDependency>
<name>11f8e13a-d801-4bd6-829c-d334c49e9a4c</name>
<entityName>Pers_entity</entityName>
<fieldName>PersOrg_dfo</fieldName>
<isOutgoing v="false" />
</entityDependency>
</dependencies>
</entityIncomingField> </entityIncomingField>
<entityOutgoingField> <entityOutgoingField>
<name>OrgAddress_dfo</name> <name>OrgAddress_dfo</name>
...@@ -200,6 +208,11 @@ ...@@ -200,6 +208,11 @@
<code>%aditoprj%/entity/Org_entity/entityfields/orgaddress_dfo/children/relid_param/code.js</code> <code>%aditoprj%/entity/Org_entity/entityfields/orgaddress_dfo/children/relid_param/code.js</code>
<triggerRecalculation v="true" /> <triggerRecalculation v="true" />
</entityParameter> </entityParameter>
<entityParameter>
<name>StandardAddressId_param</name>
<code>%aditoprj%/entity/Org_entity/entityfields/orgaddress_dfo/children/standardaddressid_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
</children> </children>
</entityOutgoingField> </entityOutgoingField>
<entityField> <entityField>
......
import("system.vars");
import("system.result");
var addressId = vars.get("$field.ADDRESS_ID");
result.string(addressId);
\ No newline at end of file
...@@ -198,12 +198,6 @@ ...@@ -198,12 +198,6 @@
<contentType>DATE</contentType> <contentType>DATE</contentType>
<valueProcess>%aditoprj%/entity/Pers_entity/entityfields/rel_date_edit/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Pers_entity/entityfields/rel_date_edit/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField>
<name>ORGNAME</name>
<caption>Company</caption>
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/Pers_entity/entityfields/orgname/valueProcess.js</valueProcess>
</entityField>
<entityOutgoingField> <entityOutgoingField>
<name>PersAddress_dfo</name> <name>PersAddress_dfo</name>
<title>Addresses</title> <title>Addresses</title>
...@@ -240,25 +234,66 @@ ...@@ -240,25 +234,66 @@
</entityParameter> </entityParameter>
</children> </children>
</entityOutgoingField> </entityOutgoingField>
<entityField>
<name>ORGNAME</name>
<tableName>ORG</tableName>
<columnName>NAME</columnName>
<caption>Company</caption>
<linkedContextProcess>%aditoprj%/entity/Pers_entity/entityfields/orgname/linkedContextProcess.js</linkedContextProcess>
<mandatory v="true" />
<outgoingField>PersOrg_dfo</outgoingField>
<fieldIdProcess>%aditoprj%/entity/Pers_entity/entityfields/orgname/fieldIdProcess.js</fieldIdProcess>
</entityField>
<entityField>
<name>ORGID</name>
<tableName>ORG</tableName>
<columnName>ORGID</columnName>
</entityField>
<entityOutgoingField> <entityOutgoingField>
<name>PersAppointment_dfo</name> <name>OrgAddress_dfo</name>
<fieldType>DEPENDENCY_OUT</fieldType> <fieldType>DEPENDENCY_OUT</fieldType>
<caption>Company Addresses</caption>
<dependency> <dependency>
<name>dependency</name> <name>dependency</name>
<entityName>Address_entity</entityName>
<fieldName>OrgAddress_dfi</fieldName>
</dependency>
<children>
<entityParameter>
<name>RelId_param</name>
<code>%aditoprj%/entity/Pers_entity/entityfields/orgaddress_dfo/children/relid_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
</children>
</entityOutgoingField>
<entityOutgoingField>
<name>PersOrg_dfo</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<selectionMode>SINGLE</selectionMode>
<dependency>
<name>dependency</name>
<entityName>Org_entity</entityName>
<fieldName>Org_dfi</fieldName>
</dependency> </dependency>
</entityOutgoingField> </entityOutgoingField>
</entityFields> </entityFields>
<linkInformation> <linkInformation>
<linkInformation> <linkInformation>
<name>449dc321-de5a-40da-a96e-23784d830745</name> <name>ffff1758-e84e-47d8-a957-5989d0be7092</name>
<tableName>PERS</tableName> <tableName>PERS</tableName>
<primaryKey>PERSID</primaryKey> <primaryKey>PERSID</primaryKey>
</linkInformation> </linkInformation>
<linkInformation> <linkInformation>
<name>724cb303-ea72-4207-9fc4-52aec17e0c31</name> <name>5547b8d7-5145-4eb7-8698-c92674b4691f</name>
<tableName>RELATION</tableName> <tableName>RELATION</tableName>
<primaryKey>RELATIONID</primaryKey> <primaryKey>RELATIONID</primaryKey>
<isUIDTable v="true" /> <isUIDTable v="true" />
</linkInformation> </linkInformation>
<linkInformation>
<name>dae8e70a-ec76-4c53-9799-ee04bfbe3bd2</name>
<tableName>ORG</tableName>
<primaryKey>ORGID</primaryKey>
<readonly v="true" />
</linkInformation>
</linkInformation> </linkInformation>
</entity> </entity>
...@@ -7,7 +7,7 @@ var orgId, conditionStr, preparedValues ...@@ -7,7 +7,7 @@ var orgId, conditionStr, preparedValues
,sqlHelper; ,sqlHelper;
conditionStr = ""; conditionStr = "";
preparedValues = []; preparedValues = [];
sqlHelper = new SqlUtils(); sqlHelper = new LegacySqlUtils();
if (vars.exists("$param.OrgId_param") && (orgId = vars.getString("$param.OrgId_param"))){ if (vars.exists("$param.OrgId_param") && (orgId = vars.getString("$param.OrgId_param"))){
conditionStr += " and RELATION.ORG_ID = ? "; conditionStr += " and RELATION.ORG_ID = ? ";
......
import("system.result");
import("system.db");
import("system.vars");
import("Sql_lib");
var orgId, orgRelId, sqlHelper;
sqlHelper = new LegacySqlUtils();
orgId = vars.get("$field.ORGID");
if (orgId){
orgRelId = db.cell(["select RELATION.RELATIONID from RELATION where RELATION.PERS_ID is null and RELATION.ORG_ID = ?",
[
[orgId, sqlHelper.getSingleColumnType("RELATION", "ORG_ID")]
]]);
result.string(orgRelId);
}
\ No newline at end of file
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