diff --git a/entity/ClassificationGroupAnalyses_entity/ClassificationGroupAnalyses_entity.aod b/entity/ClassificationGroupAnalyses_entity/ClassificationGroupAnalyses_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..0330196cf9add7b4919be04dfcf755c8b5117554 --- /dev/null +++ b/entity/ClassificationGroupAnalyses_entity/ClassificationGroupAnalyses_entity.aod @@ -0,0 +1,71 @@ +<?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.9" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.9"> + <name>ClassificationGroupAnalyses_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <contentTitleProcess>%aditoprj%/entity/ClassificationGroupAnalyses_entity/contentTitleProcess.js</contentTitleProcess> + <recordContainer>jdito</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>UID</name> + </entityField> + <entityParameter> + <name>ClassificationType_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ObjectRowid_param</name> + <expose v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityProvider> + <name>GroupAnalyses</name> + <dependencies> + <entityDependency> + <name>c20a7d8b-00ab-4edf-adf5-89fc94385e65</name> + <entityName>Salesproject_entity</entityName> + <fieldName>ClassificationGroupChart</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>SCORE</name> + </entityField> + <entityField> + <name>GROUP</name> + </entityField> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>jdito</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <contentProcess>%aditoprj%/entity/ClassificationGroupAnalyses_entity/recordcontainers/jdito/contentProcess.js</contentProcess> + <recordFieldMappings> + <jDitoRecordFieldMapping> + <name>UID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>GROUP.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>GROUP.displayValue</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>SCORE.value</name> + </jDitoRecordFieldMapping> + </recordFieldMappings> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/ClassificationGroupAnalyses_entity/contentTitleProcess.js b/entity/ClassificationGroupAnalyses_entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ce766e6646d01313ec7914dd4c9a2d110db92ef1 --- /dev/null +++ b/entity/ClassificationGroupAnalyses_entity/contentTitleProcess.js @@ -0,0 +1,3 @@ +import("system.vars"); +import("system.result"); +result.string(vars.get("$field.UID")) \ No newline at end of file diff --git a/entity/ClassificationGroupAnalyses_entity/recordcontainers/jdito/contentProcess.js b/entity/ClassificationGroupAnalyses_entity/recordcontainers/jdito/contentProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a700eb1a2e5ce3f02ff141471af827a4e8fe2a43 --- /dev/null +++ b/entity/ClassificationGroupAnalyses_entity/recordcontainers/jdito/contentProcess.js @@ -0,0 +1,15 @@ +import("system.result"); +import("system.vars"); +import("Classification_lib"); + +var scores = ClassificationUtils.getScore(vars.get("$param.ClassificationType_param"), vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowid_param")); +var data = []; + +for (group in scores) +{ + logging.log(group); + + data.push([group, group, group, scores[group]]); +} + +result.object(data); \ No newline at end of file diff --git a/entity/Classification_entity/recordcontainers/jdito/contentProcess.js b/entity/Classification_entity/recordcontainers/jdito/contentProcess.js index 1229456ff30baa01cc756147427c85d4d04aecfd..1fc228180126c76ef7ffa696dd0323d8995d87e9 100644 --- a/entity/Classification_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Classification_entity/recordcontainers/jdito/contentProcess.js @@ -7,8 +7,6 @@ import("system.result"); var scores = JSON.stringify(ClassificationUtils.getScore(vars.get("$param.ClassificationType_param"), vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowid_param"))); - - var classificationId; var classificationTypeId; diff --git a/neonContext/ClassificationGroupAnalyses/ClassificationGroupAnalyses.aod b/neonContext/ClassificationGroupAnalyses/ClassificationGroupAnalyses.aod new file mode 100644 index 0000000000000000000000000000000000000000..8943099824a34c54b2d5310cce656814c75ee7c2 --- /dev/null +++ b/neonContext/ClassificationGroupAnalyses/ClassificationGroupAnalyses.aod @@ -0,0 +1,12 @@ +<?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>ClassificationGroupAnalyses</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>ClassificationGroupAnalyses_entity</entity> + <references> + <neonViewReference> + <name>7f1a88f1-c5de-4657-aa44-8309a61422be</name> + <view>ClassificationGroupAnalysesChart_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonView/ClassificationGroupAnalysesChart_view/ClassificationGroupAnalysesChart_view.aod b/neonView/ClassificationGroupAnalysesChart_view/ClassificationGroupAnalysesChart_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..4f26cdda56cf4c521841a413e1275ad54fe74a1e --- /dev/null +++ b/neonView/ClassificationGroupAnalysesChart_view/ClassificationGroupAnalysesChart_view.aod @@ -0,0 +1,20 @@ +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>ClassificationGroupAnalysesChart_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <singleDataChartViewTemplate> + <name>Groups</name> + <chartTitle></chartTitle> + <chartType>PIE</chartType> + <xAxis>GROUP</xAxis> + <yAxis>SCORE</yAxis> + <entityField>#ENTITY</entityField> + </singleDataChartViewTemplate> + </children> +</neonView> diff --git a/process/Classification_lib/process.js b/process/Classification_lib/process.js index cb22a4d300ddb1e1f827dbcde5a0c0d04eb1cb3a..89c19121cdb6ab1b75363049ebeba1bb940c6ddf 100644 --- a/process/Classification_lib/process.js +++ b/process/Classification_lib/process.js @@ -1,3 +1,4 @@ +import("system.logging"); import("system.vars"); import("system.db"); import("Sql_lib"); @@ -18,7 +19,7 @@ function ClassificationUtils() {} * @param {String} pObjectRowid the rowid * @param {String} [pClassificationGroup=undefined] the classification group. If it is undefined, the classification for all groups are returned as Object(-map) * - * @return {Object} return all scores as Object-map. E.g. {"scoreGroup1": "A", "scoreGroup2": "C"} + * @return {Object} return all scores as Object-map. E.g. {"scoreGroup1": 0, "scoreGroup2": 20} */ ClassificationUtils.getScore = function(pClassificationType, pObjectType, pObjectRowid, pClassificationGroup) { @@ -37,6 +38,7 @@ ClassificationUtils.getScore = function(pClassificationType, pObjectType, pObjec { scores[pRow[0]] = pRow[1]; }); + logging.log(JSON.stringify(scores, null, "\t")) return scores; }