# # # ITSV GmbH # CCDB - Command and Control Database # # FILE: dquerymfile_genpersworkplan.txt # DESCRIPTION: DQUERY Definition of DQUERY genpersworkplan # # QUERY_DESCRIPTION: genpersworkplan generates a work plan for the person with USKURZZ in # generating a work plan is done by generating daily entries in CCILVPLAN # for each work day in the range including until including # work days are all days except: # - day is saturday or sunday # - day is holiday: has an entry in CCRW of type HOLIDAY # @querytitle Arbeitsplan für Person erzeugen @querydescription erzeugt einen Arbeits-Auslastungsplan für eine Person @group ILVPLAN @attributenames kurzz:uskurzz,fromday:serialdate:{{fromdayopts}},untilday:serialdate:{{untildayopts}},opts:string:{{optsopts}} @fromdayopts {"labeltext":"Beginntag","typedesc":"erster Tag der Periode, für die der Arbeitsplan erstellt werden soll, in der Form YYYYMMDD"} @untildayopts {"labeltext":"Endetag","typedesc":"letzter Tag der Periode, für die der Arbeitsplan erstellt werden soll, in der Form YYYYMMDD"} @optsopts { labeltext: "Weitere Optionen", typedesc: "zusätzliche Steuer-Optionen für die Berechnung in JSON- oder JS-Form" } @querytype function @function seqtrans.seqtrans ~query.tsteps # # 0: initialize # qexpression this.copyqvars("kurzz,fromday,untilday"); this.qopts = aux.txtObjDecode(this.query.opts); # # 1: verify person by USKURZZ # sql select * from CCVUS where uskurzz=::kurzz:: named_params kurzz result_varname usres post_qexpression if (this.usres.getRowCount()<1) { this.errcoll.collect(null,"User with Kurzzeichen "+this.kurzz+" is unknown",this.usres); } else { this.userinfo = {}; let cr; for (let ri=0; ri