Produced by Araxis Merge on 6/11/2019 10:54:08 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\ccht\persistent\hibernate | PssDistributionReportDAOImpl.java | Wed May 29 15:26:38 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\ccht\persistent\hibernate | PssDistributionReportDAOImpl.java | Mon Jun 10 19:25:56 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 842 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | package go v.va.med.c cht.persis tent.hiber nate; | |
| 2 | ||
| 3 | import jav a.text.Par seExceptio n; | |
| 4 | import jav a.text.Sim pleDateFor mat; | |
| 5 | import jav a.util.Arr ayList; | |
| 6 | import jav a.util.Cal endar; | |
| 7 | import jav a.util.Dat e; | |
| 8 | import jav a.util.Lin kedList; | |
| 9 | import jav a.util.Lis t; | |
| 10 | ||
| 11 | import jav ax.persist ence.Query ; | |
| 12 | import jav ax.transac tion.Trans actional; | |
| 13 | ||
| 14 | import org .hibernate .Session; | |
| 15 | import org .hibernate .SessionFa ctory; | |
| 16 | import org .springfra mework.bea ns.factory .annotatio n.Autowire d; | |
| 17 | import org .springfra mework.ste reotype.Re pository; | |
| 18 | ||
| 19 | import gov .va.med.cc ht.model.p ssreport.D istributio nOfSurveys Report; | |
| 20 | import gov .va.med.cc ht.model.p ssreport.S urveyTrend ChartResul t; | |
| 21 | import gov .va.med.cc ht.persist ent.PssDis tributionR eportDAO; | |
| 22 | import gov .va.med.cc ht.persist ent.Report sDAO; | |
| 23 | import gov .va.med.cc ht.service .htreports .PssReport Service; | |
| 24 | import gov .va.med.cc ht.ui.mode l.PSSRepor tForm; | |
| 25 | import gov .va.med.fw .util.Date Utils; | |
| 26 | ||
| 27 | /** | |
| 28 | * | |
| 29 | * @author D N S | |
| 30 | * | |
| 31 | */ | |
| 32 | ||
| 33 | @Repositor y | |
| 34 | @Transacti onal | |
| 35 | public cla ss PssDist ributionRe portDAOImp l impleme nts PssDis tributionR eportDAO{ | |
| 36 | ||
| 37 | pr ivate stat ic final i nt ALL_SUR VEYS = 1; | |
| 38 | pr ivate stat ic final i nt PSS_V1 = 2; | |
| 39 | pr ivate stat ic final i nt PSS_V2 = 3; | |
| 40 | ||
| 41 | pu blic stati c final in t NATIONAL _SELECTION = 1; | |
| 42 | pu blic stati c final in t VISN_SEL ECTION = 2 ; | |
| 43 | pu blic stati c final in t FACILITY _SELECTION = 3; | |
| 44 | ||
| 45 | pr ivate stat ic final S tring DO_N OT_INCLUDE = "-2"; | |
| 46 | pr ivate stat ic final S tring ALL_ MODALITIES = "-1"; | |
| 47 | pr ivate stat ic final S tring BROW SER = "115 03"; | |
| 48 | pr ivate stat ic final S tring IVR = "11502"; | |
| 49 | pr ivate stat ic final S tring HOME _DEVICE = "11501"; | |
| 50 | ||
| 51 | pr ivate stat ic final S tring BROW SER_DATA = "Browser" ; | |
| 52 | pr ivate stat ic final S tring IVR_ DATA = "IV R"; | |
| 53 | pr ivate stat ic final S tring HOME _DEVICE_DA TA = "Home Device"; | |
| 54 | ||
| 55 | pr ivate stat ic final S tring ALL_ VISNS = "- 1"; | |
| 56 | pr ivate stat ic final S tring ALL_ FACILITIES = "-1"; | |
| 57 | ||
| 58 | pr ivate stat ic final i nt BREAKOU T_COL = 0; | |
| 59 | pr ivate stat ic final i nt VENDOR_ NAME = 1; | |
| 60 | pr ivate stat ic final i nt NUM_OF_ SURVEYS = 2; | |
| 61 | pr ivate stat ic final i nt MODALIT Y = 3; | |
| 62 | ||
| 63 | pr ivate stat ic final i nt NATIONA L = 1; | |
| 64 | pr ivate stat ic final i nt VISN = 2; | |
| 65 | pr ivate stat ic final i nt FACILIT Y = 3; | |
| 66 | ||
| 67 | @A utowired | |
| 68 | pr ivate Repo rtsDAO rep ortsDao; | |
| 69 | ||
| 70 | @A utowired | |
| 71 | pr ivate PssR eportServi ce pssRepo rtService; | |
| 72 | ||
| 73 | @A utowired | |
| 74 | pr ivate Sess ionFactory sessionFa ctory; | |
| 75 | ||
| 76 | pu blic PssDi stribution ReportDAOI mpl() { | |
| 77 | } | |
| 78 | ||
| 79 | pu blic PssDi stribution ReportDAOI mpl(Sessio nFactory f actory, Re portsDAO r eportsDao) { | |
| 80 | sess ionFactory = factory ; | |
| 81 | this .reportsDa o = report sDao; | |
| 82 | } | |
| 83 | ||
| 84 | pr otected Se ssion getS ession() { | |
| 85 | retu rn this.se ssionFacto ry.getCurr entSession (); | |
| 86 | } | |
| 87 | ||
| 88 | @O verride | |
| 89 | public Distribut ionOfSurve ysReport g etNational Report(PSS ReportForm form) thr ows ParseE xception | |
| 90 | { | |
| 91 | Stri ngBuilder sql = new StringBuil der(); | |
| 92 | ||
| 93 | sql. append("SE LECT 'na' AS [Breako ut], "); | |
| 94 | sql. append("v. vendor_nam e, COUNT(* ) AS [NumS urveys] ") ; | |
| 95 | ||
| 96 | if(f orm.getMod alityName( ).equals(A LL_MODALIT IES)) { | |
| 97 | sql.ap pend(addMo dalityBrea kout()); | |
| 98 | } | |
| 99 | ||
| 100 | sql. append("FR OM Surveye d_Activity AS sa "); | |
| 101 | sql. append("IN NER JOIN S urveyed_Ac tivity_Res ponse AS s ar ON sa.S urveyed_Ac tivity_ID = sar.Surv eyed_Activ ity_ID "); | |
| 102 | sql. append("IN NER JOIN V endor AS v ON sa.Ven dor_ID = v .Vendor_ID "); | |
| 103 | sql. append("IN NER JOIN D evice ON s a.Device_I D = Device .Device_ID "); | |
| 104 | sql. append(get CommonCOCJ oin()); | |
| 105 | ||
| 106 | sql. append("WH ERE sar.co mpleted_da te >= :fro mDate "); | |
| 107 | sql. append("AN D sar.comp leted_date <= :toDat e "); | |
| 108 | ||
| 109 | sql. append(rep ortsDao.ge tCategoryO fCare(form )); | |
| 110 | ||
| 111 | sql. append("AN D sar.surv ey_accepte d_status = 1 "); | |
| 112 | sql. append(add ReportVers ion(form.g etReportVe rsionButto nSelection ())); | |
| 113 | sq l.append(a ddModality ((form.get ModalityNa me()))); | |
| 114 | sql. append("GR OUP BY v.v endor_name "); | |
| 115 | ||
| 116 | if(f orm.getMod alityName( ).equals(A LL_MODALIT IES)) { | |
| 117 | sql.ap pend(addMo dalityBrea kout()); | |
| 118 | } | |
| 119 | ||
| 120 | sql. append("OR DER BY v.v endor_name ASC"); | |
| 121 | ||
| 122 | fina l Query qu ery = getS ession().c reateNativ eQuery(sql .toString( )); | |
| 123 | ||
| 124 | retu rn generat eReport(qu ery, NATIO NAL_SELECT ION, form) ; | |
| 125 | ||
| 126 | } | |
| 127 | ||
| 128 | @O verride | |
| 129 | public Distribut ionOfSurve ysReport g etVisnRepo rt(PSSRepo rtForm for m) throws ParseExcep tion | |
| 130 | { | |
| 131 | Stri ngBuilder sql = new StringBuil der(); | |
| 132 | ||
| 133 | sql. append("SE LECT sa.VI SN_ID AS [ Breakout], "); | |
| 134 | sql. append("v. vendor_nam e, COUNT(* ) AS [NumS urveys] ") ; | |
| 135 | ||
| 136 | if(f orm.getMod alityName( ).equals(A LL_MODALIT IES)) { | |
| 137 | sql.ap pend(addMo dalityBrea kout()); | |
| 138 | } | |
| 139 | ||
| 140 | sql. append("FR OM Surveye d_Activity AS sa "); | |
| 141 | sql. append("IN NER JOIN S urveyed_Ac tivity_Res ponse AS s ar ON sa.S urveyed_Ac tivity_ID = sar.Surv eyed_Activ ity_ID "); | |
| 142 | sql. append("IN NER JOIN V endor AS v ON sa.Ven dor_ID = v .Vendor_ID "); | |
| 143 | sql. append("IN NER JOIN D evice ON s a.Device_I D = Device .Device_ID "); | |
| 144 | sql. append(get CommonCOCJ oin()); | |
| 145 | ||
| 146 | sql. append("WH ERE sar.co mpleted_da te >= :fro mDate "); | |
| 147 | sql. append("AN D sar.comp leted_date <= :toDat e "); | |
| 148 | ||
| 149 | sql. append(rep ortsDao.ge tCategoryO fCare(form )); | |
| 150 | ||
| 151 | sql. append("AN D sar.surv ey_accepte d_status = 1 "); | |
| 152 | ||
| 153 | if(! form.getVi snId().equ als(ALL_VI SNS)) { | |
| 154 | ||
| 155 | sql.ap pend("AND sa.VISN_ID = " + for m.getVisnI d()); | |
| 156 | } | |
| 157 | ||
| 158 | sql. append(add ReportVers ion(form.g etReportVe rsionButto nSelection ())); | |
| 159 | sql. append(add Modality(( form.getMo dalityName ()))); | |
| 160 | sql. append("GR OUP BY sa. VISN_ID, v .vendor_na me "); | |
| 161 | ||
| 162 | if(f orm.getMod alityName( ).equals(A LL_MODALIT IES)) { | |
| 163 | sql.ap pend(addMo dalityBrea kout()); | |
| 164 | } | |
| 165 | ||
| 166 | sql. append("OR DER BY sa. VISN_ID, v .vendor_na me ASC"); | |
| 167 | ||
| 168 | fina l Query qu ery = getS ession().c reateNativ eQuery(sql .toString( )); | |
| 169 | ||
| 170 | retu rn generat eReport(qu ery, VISN_ SELECTION, form); | |
| 171 | } | |
| 172 | ||
| 173 | @O verride | |
| 174 | public Distribut ionOfSurve ysReport g etFacility Report(PSS ReportForm form) thr ows ParseE xception | |
| 175 | { | |
| 176 | Stri ngBuilder sql = new StringBuil der(); | |
| 177 | ||
| 178 | sql. append("SE LECT fac.f acility_id + ' ' + f ac.facilit y_name AS [Breakout] , v.vendor _name, COU NT(*) AS [ NumSurveys ] "); | |
| 179 | ||
| 180 | if(f orm.getMod alityName( ).equals(A LL_MODALIT IES)) { | |
| 181 | sql.ap pend(addMo dalityBrea kout()); | |
| 182 | } | |
| 183 | ||
| 184 | sql. append("FR OM Surveye d_Activity AS sa "); | |
| 185 | sql. append("IN NER JOIN S urveyed_Ac tivity_Res ponse AS s ar ON sa.S urveyed_Ac tivity_ID = sar.Surv eyed_Activ ity_ID "); | |
| 186 | sql. append("IN NER JOIN V endor AS v ON sa.Ven dor_ID = v .Vendor_ID "); | |
| 187 | sql. append("IN NER JOIN D evice ON s a.Device_I D = Device .Device_ID "); | |
| 188 | sql. append("IN NER JOIN F acilities as fac ON fac.ID = s a.facility _ID "); | |
| 189 | sql. append(get CommonCOCJ oin()); | |
| 190 | ||
| 191 | sql. append("WH ERE sar.co mpleted_da te >= :fro mDate "); | |
| 192 | sql. append("AN D sar.comp leted_date <= :toDat e "); | |
| 193 | ||
| 194 | sql. append(rep ortsDao.ge tCategoryO fCare(form )); | |
| 195 | ||
| 196 | sql. append("AN D sar.surv ey_accepte d_status = 1 "); | |
| 197 | ||
| 198 | if(! form.getFa cilityId() .equals(AL L_FACILITI ES)) { | |
| 199 | sql.ap pend("AND fac.facili ty_id = '" + form.ge tFacilityI d() + "' " ); | |
| 200 | } | |
| 201 | ||
| 202 | sql. append(add ReportVers ion(form.g etReportVe rsionButto nSelection ())); | |
| 203 | sql. append(add Modality(( form.getMo dalityName ()))); | |
| 204 | sql. append("GR OUP BY fac .facility_ id, fac.fa cility_nam e, v.vendo r_name "); | |
| 205 | ||
| 206 | if(f orm.getMod alityName( ).equals(A LL_MODALIT IES)) { | |
| 207 | sql.ap pend(addMo dalityBrea kout()); | |
| 208 | } | |
| 209 | ||
| 210 | sql. append("OR DER BY fac .facility_ id, fac.fa cility_nam e, v.vendo r_name ASC "); | |
| 211 | ||
| 212 | fina l Query qu ery = getS ession().c reateNativ eQuery(sql .toString( )); | |
| 213 | ||
| 214 | retu rn generat eReport(qu ery, FACIL ITY_SELECT ION, form) ; | |
| 215 | } | |
| 216 | ||
| 217 | pr ivate Dist ributionOf SurveysRep ort genera teReport(Q uery repor tQuery, in t typeOfRe port, PSSR eportForm form) thro ws ParseEx ception { | |
| 218 | ||
| 219 | addD ateParams( reportQuer y, form); | |
| 220 | ||
| 221 | List <Object[]> reportDat a = report Query.getR esultList( ); | |
| 222 | ||
| 223 | Dist ributionOf SurveysRep ort report = new Dis tributionO fSurveysRe port(); | |
| 224 | Stri ng modalit y = form.g etModality Name(); | |
| 225 | ||
| 226 | if ( reportData .isEmpty() ) { | |
| 227 | return report; | |
| 228 | } | |
| 229 | if(! modality.e quals(ALL_ MODALITIES )){ | |
| 230 | for(Ob ject[] rep ortRow : r eportData) { | |
| 231 | ||
| 232 | report.a ddRow(repo rtRow, typ eOfReport, form); | |
| 233 | } | |
| 234 | } el se { | |
| 235 | String vendor = ""; | |
| 236 | String facility = ""; | |
| 237 | String previousF acility = ""; | |
| 238 | // get vendor na me of firs t entry in data set. | |
| 239 | String previousV endor = (S tring) rep ortData.ge t(0)[VENDO R_NAME]; | |
| 240 | if(typ eOfReport == FACILIT Y) { | |
| 241 | previo usFacility = String .valueOf(r eportData. get(0)[BRE AKOUT_COL] ); | |
| 242 | } | |
| 243 | String row[] = n ew String[ 6]; | |
| 244 | row[2] = "0"; | |
| 245 | row[3] = "0"; | |
| 246 | row[4] = "0"; | |
| 247 | row[5] = "0"; | |
| 248 | ArrayL ist<String []> report Builder = new ArrayL ist<String []>(); | |
| 249 | int to talNumSurv eysPerVend or = 0; | |
| 250 | for(Ob ject[] rep ortRow : r eportData) { | |
| 251 | vendor = (String) reportRow[ VENDOR_NAM E]; | |
| 252 | facility = String. valueOf(re portRow[BR EAKOUT_COL ]); | |
| 253 | if(!vend or.equals( previousVe ndor) && t ypeOfRepor t != FACIL ITY) { | |
| 254 | reportBuil der.add(ro w); | |
| 255 | totalNumSu rveysPerVe ndor = 0; | |
| 256 | row = new String[6]; | |
| 257 | row[2] = " 0"; | |
| 258 | row[3] = " 0"; | |
| 259 | row[4] = " 0"; | |
| 260 | row[5] = " 0"; | |
| 261 | } | |
| 262 | else if( (!vendor.e quals(prev iousVendor ) || !faci lity.equal s(previous Facility)) && typeOf Report == FACILITY) { | |
| 263 | reportBuil der.add(ro w); | |
| 264 | totalNumSu rveysPerVe ndor = 0; | |
| 265 | row = new String[6]; | |
| 266 | row[2] = " 0"; | |
| 267 | row[3] = " 0"; | |
| 268 | row[4] = " 0"; | |
| 269 | row[5] = " 0"; | |
| 270 | } | |
| 271 | switch(typ eOfReport) { | |
| 272 | ca se NATIONA L: | |
| 273 | brea k; | |
| 274 | ca se VISN: | |
| 275 | row[ 0] = "VISN " + Strin g.valueOf( reportRow[ BREAKOUT_C OL]); | |
| 276 | brea k; | |
| 277 | ca se FACILIT Y: | |
| 278 | row[ 0] = "Faci lity " + S tring.valu eOf(report Row[BREAKO UT_COL]); | |
| 279 | brea k; | |
| 280 | } // end s witch | |
| 281 | ||
| 282 | row[1] = ( String)rep ortRow[VEN DOR_NAME]; | |
| 283 | totalNumSu rveysPerVe ndor += (i nt) report Row[NUM_OF _SURVEYS]; | |
| 284 | row[2] = I nteger.toS tring(tota lNumSurvey sPerVendor ); | |
| 285 | ||
| 286 | String mod alityType = (String) reportRow [MODALITY] ; | |
| 287 | ||
| 288 | switch(mod alityType) { | |
| 289 | // not all c ases will be hit, so rows also set to ze ro above. | |
| 290 | ca se IVR_DAT A: | |
| 291 | row[ 3] = Integ er.toStrin g((int)rep ortRow[NUM _OF_SURVEY S]); | |
| 292 | brea k; | |
| 293 | ca se BROWSER _DATA: | |
| 294 | row[ 4] = Integ er.toStrin g((int)rep ortRow[NUM _OF_SURVEY S]); | |
| 295 | brea k; | |
| 296 | ca se HOME_DE VICE_DATA: | |
| 297 | row[ 5] = Integ er.toStrin g((int)rep ortRow[NUM _OF_SURVEY S]); | |
| 298 | brea k; | |
| 299 | } | |
| 300 | ||
| 301 | previous Vendor = v endor; | |
| 302 | previous Facility = facility; | |
| 303 | } // e nd for | |
| 304 | report Builder.ad d(row); | |
| 305 | report .setReport (reportBui lder); | |
| 306 | // onc e all rows are added , create t otals row. | |
| 307 | report .createTot alsRow(6); | |
| 308 | return report; | |
| 309 | } // end else | |
| 310 | // o nce all ro ws are add ed, create totals ro w. | |
| 311 | repo rt.createT otalsRow(3 ); | |
| 312 | ||
| 313 | retu rn report; | |
| 314 | } | |
| 315 | ||
| 316 | // pr ivate void addRowAnd Reset() { | |
| 317 | // repo rtBuilder. add(row); | |
| 318 | // tota lNumSurvey sPerVendor = 0; | |
| 319 | // row = new Stri ng[6]; | |
| 320 | // row[ 2] = "0"; | |
| 321 | // row[ 3] = "0"; | |
| 322 | // row[ 4] = "0"; | |
| 323 | // row[ 5] = "0"; | |
| 324 | // } | |
| 325 | ||
| 326 | pr ivate Stri ng addRepo rtVersion( int report Selection) { | |
| 327 | ||
| 328 | Stri ng sql = " "; | |
| 329 | ||
| 330 | swit ch (report Selection) | |
| 331 | { | |
| 332 | case ALL _SURVEYS: | |
| 333 | //sq l set up t o not incl ude vr-12 data | |
| 334 | sql = "AND sar .survey_id != 1 "; | |
| 335 | brea k; | |
| 336 | case PSS _V1: | |
| 337 | sql = "AND sar .survey_id = 2 "; | |
| 338 | brea k; | |
| 339 | case PSS _V2: | |
| 340 | sql = "AND sar .survey_id = 3 "; | |
| 341 | brea k; | |
| 342 | default: | |
| 343 | sql = "AND sar .survey_id != 1 "; | |
| 344 | brea k; | |
| 345 | } | |
| 346 | retu rn sql; | |
| 347 | } | |
| 348 | ||
| 349 | pr ivate Stri ng addModa lity(Strin g selected Modality) { | |
| 350 | ||
| 351 | Stri ng sql = " "; | |
| 352 | ||
| 353 | swit ch (select edModality ) | |
| 354 | { | |
| 355 | case BROWSER: | |
| 356 | sql = "AND devic e_name = ' BROWSER' " ; | |
| 357 | break; | |
| 358 | case IVR: | |
| 359 | sql = "AND devic e_name = ' IVR' "; | |
| 360 | break; | |
| 361 | case HOME_DEVI CE: | |
| 362 | sql = "AND devic e_name NOT IN ('IVR' , 'BROWSER ') "; | |
| 363 | break; | |
| 364 | case DO_ NOT_INCLUD E: | |
| 365 | brea k; | |
| 366 | case ALL _MODALITIE S: | |
| 367 | sql = "AND dev ice_name I S NOT NULL "; | |
| 368 | brea k; | |
| 369 | } | |
| 370 | retu rn sql; | |
| 371 | } | |
| 372 | ||
| 373 | pr ivate Stri ng addModa lityBreako ut() { | |
| 374 | ||
| 375 | retu rn ",CASE Device.dev ice_name W HEN 'IVR' THEN Devic e.device_n ame " + | |
| 376 | "WH EN 'BROWSE R' THEN De vice.devic e_name " + | |
| 377 | "EL SE 'Home D evice' END "; | |
| 378 | } | |
| 379 | ||
| 380 | pr ivate Stri ng getComm onCOCJoin( ){ | |
| 381 | Stri ngBuilder sql = new StringBuil der(); | |
| 382 | sql. append("IN NER JOIN ( select cp. patient_id , cp.level _of_care f rom census patient cp "); | |
| 383 | sql. append("in ner join ( select dis tinct MAX( census_id) as census id, patien t_id, dise nrollment_ date "); | |
| 384 | sql. append("fr om censusp atient whe re disenro llment_dat e is null group by p atient_id, disenroll ment_date) as lcpe " ); | |
| 385 | sql. append("on cp.census _id = lcpe .censusid and cp.pat ient_id = lcpe.patie nt_id) f " ); | |
| 386 | sql. append("on sa.patien t_id = f.p atient_id "); | |
| 387 | retu rn sql.toS tring(); | |
| 388 | } | |
| 389 | ||
| 390 | pr ivate Quer y addDateP arams(Quer y query, P SSReportFo rm form) t hrows Pars eException { | |
| 391 | swit ch (form.g etDateType Selection( )) { | |
| 392 | case 2: | |
| 393 | String [] quarter Date = pss ReportServ ice.parseQ uarterSele cted(form) ; | |
| 394 | form.s etReportFr omDate(Dat eUtils.par seDate(qua rterDate[0 ], DateUti ls.MMDDYYY Y)); | |
| 395 | form.s etReportTo Date(DateU tils.parse Date(quart erDate[1], DateUtils .MMDDYYYY) ); | |
| 396 | break; | |
| 397 | case 3: | |
| 398 | String [] fiscalD ate = pssR eportServi ce.parseFi scalSelect ed(form); | |
| 399 | form.s etReportFr omDate(Dat eUtils.par seDate(fis calDate[0] , DateUtil s.MMDDYYYY )); | |
| 400 | form.s etReportTo Date(DateU tils.parse Date(fisca lDate[1], DateUtils. MMDDYYYY)) ; | |
| 401 | break; | |
| 402 | defa ult: | |
| 403 | break; | |
| 404 | } | |
| 405 | quer y.setParam eter("from Date", for m.getRepor tFromDate( )); | |
| 406 | ||
| 407 | //Ca lendar def aults to t he 1st of the month so adding an additio nal month minus 1 da y | |
| 408 | //to include t he entire month in t he report and settin g the time to the la st millise cond | |
| 409 | //of the last day in the month | |
| 410 | Cale ndar toDat e = Calend ar.getInst ance(); | |
| 411 | toDa te.setTime (form.getR eportToDat e()); | |
| 412 | ||
| 413 | toDa te.set(Cal endar.MILL ISECOND, 9 99); | |
| 414 | toDa te.set(Cal endar.SECO ND, 59); | |
| 415 | toDa te.set(Cal endar.MINU TE, 59); | |
| 416 | toDa te.set(Cal endar.HOUR _OF_DAY, 2 3); | |
| 417 | ||
| 418 | quer y.setParam eter("toDa te", toDat e.getTime( )); | |
| 419 | ||
| 420 | retu rn query; | |
| 421 | } | |
| 422 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.