Skip to content
Snippets Groups Projects
Commit abf4a50a authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

classification validierungen

parent 04703901
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<title>Possible Values</title>
<contentTitleProcess>%aditoprj%/entity/ClassificationScore_entity/contentTitleProcess.js</contentTitleProcess>
<onValidation>%aditoprj%/entity/ClassificationScore_entity/onValidation.js</onValidation>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
......@@ -28,6 +29,7 @@
<entityField>
<name>SCORE</name>
<title>Score</title>
<onValidation>%aditoprj%/entity/ClassificationScore_entity/entityfields/score/onValidation.js</onValidation>
</entityField>
<entityProvider>
<name>ClassificationScores</name>
......@@ -53,6 +55,10 @@
<triggerRecalculation v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityField>
<name>MaxValue</name>
<valueProcess>%aditoprj%/entity/ClassificationScore_entity/entityfields/maxvalue/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.logging");
import("system.vars");
import("system.result");
import("system.db");
import("Sql_lib");
if (!vars.get("$this.value"))
{
var scoreType = vars.get("$param.Scoretype_param");
result.string(db.cell(
SqlCondition.begin()
.andPrepare("CLASSIFICATIONTYPE.SCORETYPE", scoreType, "# <> ?")
.and("CLASSIFICATIONTYPE.CLASSIFICATIONNUMBER = " + db.translateStatement(SqlCondition.begin()
.andPrepare("CLASSIFICATIONTYPE.SCORETYPE", scoreType, "# = ?")
.buildSql("(select CLASSIFICATIONNUMBER from CLASSIFICATIONTYPE", "1=2", ")")))
.buildSql("select 100.0 - sum(maxScore) from ( \n\
select max(SCORE) maxScore from CLASSIFICATIONTYPE \n\
join CLASSIFICATIONSCORE on CLASSIFICATIONSCORE.scoretype = CLASSIFICATIONTYPE.scoretype", "1=2", "group by CLASSIFICATIONTYPE.scoretype) maxScores")))
}
\ No newline at end of file
import("Entity_lib");
import("system.translate");
import("system.result");
import("system.vars");
var max = parseFloat(vars.getString("$field.MaxValue"));
if (parseFloat(ProcessHandlingUtils.getOnValidationValue(vars.get("$field.SCORE"))) > max)
result.string(translate.withArguments("${HIGHER_THAN_MAX} max: %0", [max]));
\ No newline at end of file
import("system.vars");
import("system.logging");
logging.log("aaaaaaaaaaaaaa")
logging.log(vars.get("$param.Scoretype_param"))
logging.log(vars.get("$sys.recordstate"))
/*select CLASSIFICATIONTYPE.scoretype, max(score) from CLASSIFICATIONTYPE
join CLASSIFICATIONSCORE on CLASSIFICATIONSCORE.scoretype = CLASSIFICATIONTYPE.scoretype where CLASSIFICATIONNUMBER = 2 group by CLASSIFICATIONTYPE.scoretype;*/
\ No newline at end of file
......@@ -159,7 +159,7 @@
</entityParameter>
<entityField>
<name>Info</name>
<title>Rating: </title>
<title>Rating</title>
<contentType>HTML</contentType>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Classification_entity/entityfields/info/valueProcess.js</valueProcess>
......
......@@ -75,6 +75,9 @@
<entry>
<key>Office address</key>
</entry>
<entry>
<key>${HIGHER_THAN_MAX} max: %0</key>
</entry>
<entry>
<key>Contact</key>
</entry>
......
......@@ -4736,6 +4736,7 @@
</entry>
<entry>
<key>Scoretype</key>
<value>Bewertungstyp</value>
</entry>
<entry>
<key>aaaaaaaaaaaaa</key>
......@@ -4755,6 +4756,7 @@
</entry>
<entry>
<key>Classification number</key>
<value>Klassifizierungsnummer</value>
</entry>
<entry>
<key>dasgf</key>
......@@ -4763,6 +4765,33 @@
<key>Possible values</key>
<value>Mögliche Werte</value>
</entry>
<entry>
<key>ARCHIEVED</key>
</entry>
<entry>
<key>e</key>
</entry>
<entry>
<key>${HIGHER_THAN_MAX} max: %0</key>
<value>Der eingegebene Wert ist über dem Maximalwert %0.</value>
</entry>
<entry>
<key>huhu</key>
</entry>
<entry>
<key>Rating</key>
<value>Bewertung</value>
</entry>
<entry>
<key>sum</key>
<value>Summe</value>
</entry>
<entry>
<key>A: 75 &lt; </key>
</entry>
<entry>
<key>Possible Values</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
</language>
......@@ -3854,6 +3854,40 @@
<entry>
<key>Possible values</key>
</entry>
<entry>
<key>ARCHIVE</key>
</entry>
<entry>
<key>archieve</key>
</entry>
<entry>
<key>setUnread</key>
</entry>
<entry>
<key>setRead</key>
</entry>
<entry>
<key>e</key>
</entry>
<entry>
<key>${HIGHER_THAN_MAX} max: %0</key>
<value>The value is greater than the allowed max-value %0.</value>
</entry>
<entry>
<key>huhu</key>
</entry>
<entry>
<key>Rating</key>
</entry>
<entry>
<key>sum</key>
</entry>
<entry>
<key>A: 75 &lt; </key>
</entry>
<entry>
<key>Possible Values</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
</language>
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