From de8214f83e8a11ff37f2e0acaacc7ca73d6612f0 Mon Sep 17 00:00:00 2001 From: Koen Reefman Date: Fri, 10 Nov 2017 14:28:29 +0000 Subject: [PATCH] HCAS#41381 Object(en) veld toegevoegd aan mld_list en opdr_list svn path=/Website/trunk/; revision=35957 --- APPL/MLD/mld.inc | 11 +++++++++++ APPL/MLD/mld_list.inc | 29 ++++++++++++++++++++++++++++- APPL/MLD/opdr_list.inc | 24 ++++++++++++++++++++---- 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/APPL/MLD/mld.inc b/APPL/MLD/mld.inc index 46fa5eca5e..fe22c03ff6 100644 --- a/APPL/MLD/mld.inc +++ b/APPL/MLD/mld.inc @@ -5085,6 +5085,17 @@ mld = {setmeldingstatus: + " AND BITAND(skm.mld_srtkenmerk_systeem,2) = 2" + " AND skm.mld_srtkenmerk_key = k.mld_srtkenmerk_key) flex" : "") + + ", (SELECT LISTAGG ( " + + " s.ins_srtdeel_omschrijving " + + " || ' ' " + + " || ins_deel_omschrijving, " + + " '{0}') " + + " WITHIN GROUP (ORDER BY ins_deel_omschrijving) " + + " deel " + + " FROM ins_v_aanwezigdeel d, ins_srtdeel s, mld_melding_object mo " + + " WHERE mo.mld_melding_key = m.mld_melding_key " + + " AND d.ins_deel_key = mo.ins_deel_key " + + " AND d.ins_srtdeel_key = s.ins_srtdeel_key) object" + " FROM mld_opdr o" + " , cnt_v_aanwezigcontract c" + " , mld_stdmelding std" diff --git a/APPL/MLD/mld_list.inc b/APPL/MLD/mld_list.inc index f2d08f9640..ab98a42122 100644 --- a/APPL/MLD/mld_list.inc +++ b/APPL/MLD/mld_list.inc @@ -254,6 +254,19 @@ function mld_list (pautfunction, params) ? ", di.alg_district_omschrijving" : ""); + // Object(en) + sqln += ", (SELECT LISTAGG ( " + + " s.ins_srtdeel_omschrijving " + + " || ' ' " + + " || ins_deel_omschrijving, " + + " '{0}') " + + " WITHIN GROUP (ORDER BY ins_deel_omschrijving) " + + " deel " + + " FROM ins_v_aanwezigdeel d, ins_srtdeel s, mld_melding_object mo " + + " WHERE mo.mld_melding_key = m.mld_melding_key " + + " AND d.ins_deel_key = mo.ins_deel_key " + + " AND d.ins_srtdeel_key = s.ins_srtdeel_key) object"; + if (S("mld_num_prefix_mode") == 1) // kostenplaats of afdeling { sqln += ", COALESCE((SELECT prs_kostenplaats_nr" @@ -618,10 +631,22 @@ function mld_list (pautfunction, params) function fncolNote(oRs) { if (oRs("notitie").Value != null) - return (outputmode == 0? I("fa-comment"): oRs("notitie").Value); + return (outputmode == 0 ? I("fa-comment"): oRs("notitie").Value); else return ""; } + function fncolObject(oRs) + { + if (oRs("object").Value == null) + return ""; + + var obj = oRs("object").Value; + var ret = (outputmode == 0 ? I("fa-hand-o-right") + " " : "") + obj.format(", "); + if (obj.indexOf("{0}") == -1) // single object + return "" + ret + ""; + else return ret; + } + function fncolNoteTooltip(oRs) { if (oRs("notitie").Value != null) @@ -883,6 +908,8 @@ function mld_list (pautfunction, params) if (anygeo) { rst.addColumn(new Column({caption: L("lcl_place"), content: "plaatsmelding"})); } + rst.addColumn(new Column({caption: L("lcl_mld_nr_objects"), content: fncolObject, combine: anygeo})); + // even 2 printonly kolommen tussendoor if (S("mld_print_loc_address") == 1) rst.addColumn(new Column({caption: L("lcl_location_address"), content: "alg_locatie_adres", purpose: PRINTING_ONLY})); diff --git a/APPL/MLD/opdr_list.inc b/APPL/MLD/opdr_list.inc index 20ca24870b..b9f3b995b3 100644 --- a/APPL/MLD/opdr_list.inc +++ b/APPL/MLD/opdr_list.inc @@ -396,6 +396,18 @@ function opdr_list(params) return txt; } + function fncolObject(oRs) + { + if (oRs("object").Value == null) + return ""; + + var obj = oRs("object").Value; + var ret = (outputmode == 0 ? I("fa-hand-o-right") + " " : "") + obj.format(", "); + if (obj.indexOf("{0}") == -1) // single object + return "" + ret + ""; + else return ret; + } + var summaryParams = { status_oms: new Array(), status_cnt : new Array() }; @@ -590,13 +602,17 @@ function opdr_list(params) { rst.addColumn(new Column({caption: L("lcl_district"), content: "alg_district_omschrijving", purpose: PRINTING_ONLY})); rst.addColumn(new Column({caption: L("lcl_place"), content: "plaatsmelding"})); + } + rst.addColumn(new Column({caption: L("lcl_mld_nr_objects"), content: fncolObject, combine: anyalg})); + if (anyalg) + { if (S("mld_print_loc_address") == 1) rst.addColumn(new Column({caption: L("lcl_location_address"), content: "alg_locatie_adres", purpose: PRINTING_ONLY})); if (S("mld_print_loc_address") == 2) - { - rst.addColumn(new Column({caption: L("lcl_location_address"), content: "alg_locatie_adres", combine: false})); - rst.addColumn(new Column({caption: L("lcl_estate_gebouw_man_name"), content: "alg_gebouw_naam", combine: true})); - } + { + rst.addColumn(new Column({caption: L("lcl_location_address"), content: "alg_locatie_adres", combine: false})); + rst.addColumn(new Column({caption: L("lcl_estate_gebouw_man_name"), content: "alg_gebouw_naam", combine: true})); + } } if (excel) {