SVRZ#57585 bugfix; API2 treatmentteams (behandelteams) toegevoegd

svn path=/Website/branches/v2019.1/; revision=42624
This commit is contained in:
2019-05-21 15:50:25 +00:00
parent bbaf9a8181
commit 0324a97199

View File

@@ -317,13 +317,24 @@ function model_issues(mld_key, params)
// Zijn behandelteams toegestaan bij deze melding, en is de gekozen discipline een behandelteam?
if ("treatmentteam" in jsondata && jsondata.treatmentteam > 0)
{
var mld_key = jsondata.id;
var sql = " SELECT ''"
+ " FROM mld_melding m, mld_stdmelding stdm, mld_disc_params mdp"
+ " WHERE m.mld_melding_key = " + mld_key
+ " AND stdm.mld_stdmelding_key = m.mld_stdmelding_key"
+ " AND mdp.mld_ins_discipline_key = stdm.mld_ins_discipline_key"
+ " AND BITAND (mdp.mld_disc_params_srtgroep, 4) = 4";
var sql;
if ("issuetype" in jsondata) // Insert MLD
{
sql = " SELECT ''"
+ " FROM mld_stdmelding stdm, mld_disc_params mdp"
+ " WHERE stdm.mld_stdmelding_key = " + jsondata.issuetype
+ " AND mdp.mld_ins_discipline_key = stdm.mld_ins_discipline_key"
+ " AND BITAND (mdp.mld_disc_params_srtgroep, 4) = 4";
}
else if ("id" in jsondata) // Update MLD
{
sql = " SELECT ''"
+ " FROM mld_melding m, mld_stdmelding stdm, mld_disc_params mdp"
+ " WHERE m.mld_melding_key = " + jsondata.id
+ " AND stdm.mld_stdmelding_key = m.mld_stdmelding_key"
+ " AND mdp.mld_ins_discipline_key = stdm.mld_ins_discipline_key"
+ " AND BITAND (mdp.mld_disc_params_srtgroep, 4) = 4";
}
var oRs = Oracle.Execute(sql);
if (oRs.eof)
{