Produced by Araxis Merge on 6/20/2018 10:23:35 AM Central 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 | CCRS.zip\CCRS\PMPM-2.5.1.zip\PMPM-2.5.1-db98f2053b5f36f95a4e40e0a06f50f6e3a4883b\demo20180308 | InvoiceLoader.java | Fri Mar 30 18:22:39 2018 UTC |
2 | CCRS.zip\CCRS\PMPM-2.5.1.zip\PMPM-2.5.1-db98f2053b5f36f95a4e40e0a06f50f6e3a4883b\demo20180308 | InvoiceLoader.java | Tue Jun 19 17:14:16 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 4 | 882 |
Changed | 3 | 8 |
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 | import jav a.sql.Conn ection; | |
2 | import jav a.sql.Date ; | |
3 | import jav a.sql.Driv erManager; | |
4 | import jav a.sql.Prep aredStatem ent; | |
5 | import jav a.sql.Resu ltSet; | |
6 | import jav a.sql.SQLE xception; | |
7 | import jav a.sql.Stat ement; | |
8 | import jav a.sql.Time stamp; | |
9 | import jav a.text.Dat eFormat; | |
10 | import jav a.text.Par seExceptio n; | |
11 | import jav a.text.Sim pleDateFor mat; | |
12 | import jav a.util.Arr ayList; | |
13 | import jav a.util.Lis t; | |
14 | ||
15 | /** | |
16 | * A small class to load into the PMPM_I NVOICE and PMPM_HIST ORY tables . Document | |
17 | * Referen ce should be set by the main p rocessor. | |
18 | * | |
19 | * Right n ow writing directly to JDBC, t hough Kyle can chang e this to a | |
20 | * Hiberna te pattern . | |
21 | * | |
22 | * @author PII | |
23 | * | |
24 | */ | |
25 | ||
26 | /* | |
27 | * Targeti ng the PMP M_HISTORY and PMPM_I NVOICE tab les | |
28 | * | |
29 | * CREATE TABLE [das ].[PMPM_HI STORY]( [p mpm_histor y_key] [bi gint] IDEN TITY(1,1) | |
30 | * NOT NUL L, [docref ] [varchar ](200) NUL L, [record _serial] [ int] NULL, | |
31 | * [receiv ed_timesta mp] [datet ime2](7) N ULL, [stat us] [varch ar](10) NU LL, | |
32 | * [transm it_line] [ varchar](m ax) NULL, [update_ti mestamp] [ datetime2] (7) NULL, | |
33 | * [update _userid] [ varchar](5 0) NULL, C ONSTRAINT [pk_pmpm_h istory_key ] PRIMARY | |
34 | * KEY) | |
35 | * | |
36 | * CREATE TABLE [das ].[PMPM_IN VOICE]( [p mpm_invoic e_key] [bi gint] IDEN TITY(1,1) | |
37 | * NOT NUL L, [referr al_number] [varchar] (50) NULL, [prior_au thorizatio n_number] | |
38 | * [varcha r](50) NUL L, [icn] [ varchar](2 5) NULL, [ date_of_se rvice] [da te] NULL, | |
39 | * [edipi] [varchar] (50) NULL, [date_pai d] [date] NULL, [Amo untPaid] | |
40 | * [decima l](18, 2) NULL, [bil led_amount ] [decimal ](18, 2) N ULL, | |
41 | * [ccn_pr ovider_nam e] [varcha r](500) NU LL, [ccn_p rovider_np i] [varcha r](20) | |
42 | * NULL, [ clin_code] [varchar] (10) NULL, [status] [varchar]( 10) NULL, | |
43 | * [pay_re quest_date ] [date] N ULL, [hist ory_id] [b igint] NUL L, [docref ] | |
44 | * [varcha r](200) NU LL, [updat e_timestam p] [dateti me2](7) NU LL, [updat e_userid] | |
45 | * [varcha r](50) NUL L, CONSTRA INT [pk_pm pm_invoice _key] PRIM ARY KEY ) | |
46 | * | |
47 | */ | |
48 | ||
49 | public cla ss Invoice Loader { | |
50 | ||
51 | /* * | |
52 | * A functio n to accep t the full invoice p acket. Thi s will bre ak up the | |
53 | * transmiss ion to sep arate line s and call loadInvoi ceLine to process ea ch line. | |
54 | * | |
55 | * @param in FullInvoic e | |
56 | * @return f rom invoic e line pro cessing; t his should return ze ro at the end but | |
57 | * i ntermediat e return c ode would indicate a n error 0 = Trailer record | |
58 | * s een and to tals match -1 = Inte rmediate r ecord seen ; continue | |
59 | * p rocessing -2 = Heade r record s een; conti nue proces sing >0 = Trailer | |
60 | * r ecord seen and total s error de tected. Se e bitmap f or additio nal | |
61 | * i nformation : +1 = Rec ord count mismatch + 2 = Paid a mount mism atch +4 | |
62 | * = Billed am ount misma tch +8 = D ocRef not set | |
63 | * / | |
64 | in t loadFull Invoice(St ring inFul lInvoice) { | |
65 | // s plit up in put string by NewLin es. Filter out other control c haracters | |
66 | int startIndex = 0; | |
67 | int endIndex = 0; | |
68 | int lastRC = - 999; | |
69 | Stri ng thisLin e; | |
70 | whil e (startIn dex < inFu llInvoice. length()) { | |
71 | endInd ex = inFul lInvoice.i ndexOf('\n ', startIn dex); | |
72 | if (en dIndex < 0 ) | |
73 | endIndex = inFullI nvoice.len gth() + 1; | |
74 | thisLi ne = inFul lInvoice.s ubstring(s tartIndex, endIndex) ; | |
75 | // str ip out obv ious contr ol charact ers. | |
76 | thisLi ne = thisL ine.replac eAll("\r", ""); | |
77 | lastRC = loadInv oiceLine(t hisLine); | |
78 | startI ndex = end Index + 1; | |
79 | } | |
80 | ||
81 | retu rn lastRC; | |
82 | } | |
83 | ||
84 | in t loadFull Invoice(Li st<String> inFullInv oice) { | |
85 | // s imilar to above, but uses read AllLines m ethod outp ut | |
86 | int lastRC = - 999; | |
87 | ||
88 | for (String th isLine : i nFullInvoi ce) { | |
89 | lastRC = loadInv oiceLine(t hisLine); | |
90 | } | |
91 | ||
92 | retu rn lastRC; | |
93 | ||
94 | } | |
95 | ||
96 | ||
97 | // email add ress | |
98 | pr ivate Stri ng gEmail = " PII "; | |
99 | ||
100 | // Document Reference should be set by the main proc essor. | |
101 | pr ivate Stri ng docRef = null; | |
102 | ||
103 | vo id setDocR ef(String inDocRef) { | |
104 | this .docRef = inDocRef; | |
105 | } | |
106 | ||
107 | // Update us erid shoul d be set b y main pro cessor | |
108 | pr ivate Stri ng updateU serid = "= =UNKNOWN== "; | |
109 | ||
110 | vo id setUpda teUserid(S tring inUp dateUserid ) { | |
111 | this .updateUse rid = inUp dateUserid ; | |
112 | } | |
113 | ||
114 | // Connectio n string: initially set for FT C developm ent setup | |
115 | pr ivate Stri ng connect ionUrl = " jdbc:sqlse rver:// DNS . PORT ;" | |
116 | + "databas eName= AI ;user= AI ;password= " AI + ";"; | |
117 | ||
118 | vo id setConn ectionUrl( String inC onnectionU rl) { | |
119 | this .connectio nUrl = inC onnectionU rl; | |
120 | } | |
121 | ||
122 | // flag to i ndicate wh ether we'r e between the header and trail er lines | |
123 | pr ivate bool ean inInvo iceLines = false; | |
124 | // flag to i ndicate tr ailer reco rd seen | |
125 | pr ivate bool ean footer Detected = false; | |
126 | // totals to track for trailer. Note we st ore CENTS in a long. TODO Cons ider | |
127 | // using Cur rency. | |
128 | pr ivate int invoiceRec ordCount = 0; | |
129 | pr ivate int recordSeri alNumber = 0; | |
130 | ||
131 | // check tot als. Store d as penni es to avoi d floating -point fuz z | |
132 | pr ivate long totalBill edCents = 0; | |
133 | pr ivate long totalPaid Cents = 0; | |
134 | ||
135 | pr ivate bool ean dbConn ected = fa lse; | |
136 | pr ivate Conn ection sql SrvConn; | |
137 | pr ivate Prep aredStatem ent insHis tory; | |
138 | pr ivate Prep aredStatem ent insInv oice; | |
139 | pr ivate Prep aredStatem ent updInv oiceStatus ; | |
140 | pr ivate Stat ement repo sStatement = null; | |
141 | ||
142 | // field sep arator cha racter. Do cumented a s caret, b ut sometim es these c hange | |
143 | // when we s ee real da ta. In reg ular expre ssion form at | |
144 | st atic final String FI ELD_SEP = "\\^"; | |
145 | ||
146 | // Hibernate mock-up; map these into the t ransmissio n object. History ta ble | |
147 | // started " h_" and in voice star ts "i_" | |
148 | // We need S QL Server to return IDENTITY v alues. | |
149 | lo ng h_pmpm_ history_ke y; | |
150 | St ring h_doc ref; | |
151 | in t h_record _serial; | |
152 | Da te h_recei ved_timest amp; | |
153 | St ring h_sta tus; | |
154 | St ring h_tra nsmit_line ; | |
155 | Ti mestamp h_ update_tim estamp; | |
156 | St ring h_upd ate_userid ; | |
157 | ||
158 | lo ng i_pmpm_ invoice_ke y; | |
159 | St ring i_ref erral_numb er; | |
160 | St ring i_pri or_authori zation_num ber; | |
161 | St ring i_icn ; | |
162 | Da te i_date_ of_service ; | |
163 | St ring i_edi pi; | |
164 | Da te i_date_ paid; | |
165 | do uble i_amo unt_paid; | |
166 | do uble i_bil led_amount ; | |
167 | St ring i_ccn _provider_ name; | |
168 | St ring i_ccn _provider_ npi; | |
169 | St ring i_cli n_code; | |
170 | St ring i_sta tus; | |
171 | // no longer needed? D ate i_pay_ request_da te; | |
172 | lo ng i_histo ry_id; | |
173 | St ring i_doc ref; | |
174 | Ti mestamp i_ update_tim estamp; | |
175 | St ring i_upd ate_userid ; | |
176 | ||
177 | Si mpleDateFo rmat df01 = null; | |
178 | Ti mestamp cu rrentUpdat eTimestamp = null; | |
179 | ||
180 | // keep trac k of Invoi ce lines s o we can u pdate stat us | |
181 | pr ivate Arra yList<Long > invoiceP Ks = null; | |
182 | ||
183 | in t loadInvo iceLine(St ring inInv oiceLine) { | |
184 | bool ean thisLi neInvoice; // true i f this is not a head er/footer line | |
185 | Resu ltSet rs01 ; | |
186 | long historyKe y; // gene rated PK f rom Histor y table | |
187 | long invoiceKe y; // gene rated PK f rom Invoic e table | |
188 | ||
189 | Stri ng temp001 ; // littl e temp str ing | |
190 | ||
191 | int retCode = 0; | |
192 | ||
193 | // v ariables t o track re cord parsi ng | |
194 | Stri ng[] field Split; | |
195 | ||
196 | Syst em.out.pri ntln(">>-- > " + inIn voiceLine) ; | |
197 | ||
198 | try { | |
199 | ||
200 | // thi s routine will be ca lled once for each l ine. | |
201 | // Set up some g lobal sett ings durin g first en counter. | |
202 | ||
203 | if (df 01 == null ) | |
204 | df01 = n ew SimpleD ateFormat( "yyyyMMdd" ); | |
205 | ||
206 | if (cu rrentUpdat eTimestamp == null) | |
207 | currentU pdateTimes tamp = new Timestamp (System.cu rrentTimeM illis()); | |
208 | ||
209 | if (in voicePKs = = null) | |
210 | invoiceP Ks = new A rrayList() ; | |
211 | ||
212 | // con nect to da tabase if needed | |
213 | if (!d bConnected ) { | |
214 | Class.fo rName("com .microsoft .sqlserver .jdbc.SQLS erverDrive r"); | |
215 | ||
216 | sqlSrvCo nn = Drive rManager.g etConnecti on(connect ionUrl); | |
217 | ||
218 | System.o ut.println ("Connecte d to SQL s erver " + sqlSrvConn .toString( )); | |
219 | ||
220 | insHisto ry = sqlSr vConn.prep areStateme nt( | |
221 | "I NSERT INTO das.PMPM_ HISTORY (d ocref, rec ord_serial , received _timestamp , status, transmit_l ine, updat e_timestam p, update_ userid)" | |
222 | + " VA LUES (?, ? , ?, ?, ?, ?, ?)", | |
223 | Pr eparedStat ement.RETU RN_GENERAT ED_KEYS); | |
224 | ||
225 | // we do NOT load pay_reques t_date sin ce we don' t make pay ment reque sts | |
226 | insInvoi ce = sqlSr vConn.prep areStateme nt( | |
227 | "I NSERT INTO das.PMPM_ INVOICE (r eferral_nu mber, prio r_authoriz ation_numb er, icn, d ate_of_ser vice, edip i, date_pa id, amount _paid, " | |
228 | + "bil led_amount , ccn_prov ider_name, ccn_provi der_npi, c lin_code, status, hi story_id, docref, up date_times tamp, upda te_userid) " | |
229 | + " VA LUES (?, ? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?)", | |
230 | Pr eparedStat ement.RETU RN_GENERAT ED_KEYS); | |
231 | ||
232 | updInvoi ceStatus = sqlSrvCon n | |
233 | .p repareStat ement("UPD ATE das.PM PM_INVOICE SET statu s = ? WHER E pmpm_inv oice_key = ?"); | |
234 | ||
235 | reposSta tement = s qlSrvConn. createStat ement(); | |
236 | ||
237 | dbConnec ted = true ; | |
238 | } | |
239 | ||
240 | // Set up load in to PMPM_HI STORY | |
241 | // NOT E: I do th is in two steps to h elp make t his look m ore Hibern ate-ish | |
242 | ||
243 | h_docr ef = ((doc Ref == nul l) ? "==UN SPECIFIED= =" : docRe f); | |
244 | h_reco rd_serial = ++record SerialNumb er; | |
245 | h_rece ived_times tamp = new Date(Syst em.current TimeMillis ()); // as sume we do n't span d ays during execution ! | |
246 | h_tran smit_line = inInvoic eLine; | |
247 | h_upda te_timesta mp = curre ntUpdateTi mestamp; | |
248 | h_upda te_userid = updateUs erid; | |
249 | ||
250 | // che ck format: is this h eader/trai ler? In sa mple, a RE GION indic ator | |
251 | if (in InvoiceLin e.startsWi th("REG")) { | |
252 | thisLine Invoice = false; | |
253 | if (inIn voiceLines ) { | |
254 | // TODO ch eck if we have extra header li ne! (foote r line sho uld be las t of | |
255 | // transmi ssion) | |
256 | h_status = "Footer"; | |
257 | inInvoiceL ines = fal se; | |
258 | footerDete cted = tru e; | |
259 | } else { | |
260 | h_status = "Header"; | |
261 | inInvoiceL ines = tru e; | |
262 | } | |
263 | } else { | |
264 | thisLine Invoice = true; | |
265 | h_status = "PMPM_I nv"; | |
266 | } | |
267 | ||
268 | // fin ish load i nto PMPM_H ISTORY | |
269 | // doc ref = 1?, record_ser ial = 2?,r eceived_ti mestamp = 3?, status = 4?, | |
270 | // tra nsmit_line = 5? | |
271 | // upd ate_timest amp = 6?, update_use rid = 7? | |
272 | insHis tory.setSt ring(1, h_ docref); | |
273 | insHis tory.setIn t(2, h_rec ord_serial ); | |
274 | insHis tory.setDa te(3, h_re ceived_tim estamp); | |
275 | insHis tory.setSt ring(4, h_ status); | |
276 | insHis tory.setSt ring(5, h_ transmit_l ine); | |
277 | insHis tory.setTi mestamp(6, h_update_ timestamp) ; | |
278 | insHis tory.setSt ring(7, h_ update_use rid); | |
279 | ||
280 | // Ins ert record ; this wil l return g enerated k ey. | |
281 | // not e this req uires tabl e DDL to b e right an d we're us ing SQL Se rver | |
282 | rs01 = insHistor y.executeQ uery(); | |
283 | rs01.n ext(); | |
284 | histor yKey = rs0 1.getLong( "GENERATED _KEYS"); / / SQL Serv er uses th is pseudoc olumn name | |
285 | System .out.print ln(" his toryKey = " + histor yKey); | |
286 | rs01.c lose(); | |
287 | ||
288 | if (th isLineInvo ice) { | |
289 | // load into PMPM_ INVOICE | |
290 | ||
291 | // chop input line s by FIELD _SEP | |
292 | fieldSpl it = inInv oiceLine.s plit(FIELD _SEP); | |
293 | ||
294 | // WARNI NG NO FULL SYNTAX CH ECK YET TO DO | |
295 | // simul ate Hibern ate. | |
296 | i_referr al_number = fieldSpl it[0].subs tring(3); // assumed to start 9F*, per I CD | |
297 | temp001 = fieldSpl it[1]; | |
298 | if (temp 001.starts With("G1*" ) && (temp 001.length () > 3)) | |
299 | i_prior_au thorizatio n_number = temp001.s ubstring(3 ); | |
300 | else | |
301 | i_prior_au thorizatio n_number = ""; // if no PRIOR number use blank | |
302 | i_icn = fieldSplit [2]; | |
303 | i_date_o f_service = new Date (df01.pars e(fieldSpl it[3]).get Time()); | |
304 | i_edipi = fieldSpl it[4]; | |
305 | i_date_p aid = new Date(df01. parse(fiel dSplit[5]) .getTime() ); | |
306 | i_amount _paid = Do uble.parse Double(fie ldSplit[6] ); | |
307 | i_billed _amount = Double.par seDouble(f ieldSplit[ 7]); | |
308 | i_ccn_pr ovider_nam e = fieldS plit[8]; | |
309 | i_ccn_pr ovider_npi = fieldSp lit[9]; | |
310 | i_clin_c ode = fiel dSplit[10] ; | |
311 | ||
312 | i_status = "Loadin g"; | |
313 | i_histor y_id = his toryKey; | |
314 | i_update _timestamp = current UpdateTime stamp; | |
315 | i_update _userid = updateUser id; | |
316 | i_docref = ((docRe f == null) ? "==UNSP ECIFIED==" : docRef) ; | |
317 | ||
318 | // (refe rral_numbe r 1, prior _authoriza tion_numbe r 2, icn 3 , date_of_ service 4, | |
319 | // edipi 5, date_p aid 6, amo unt_paid 7 , billed_a mount 8, | |
320 | // ccn_p rovider_na me 9, ccn_ provider_n pi 10, cli n_code 11, status 12 , history_ id | |
321 | // 13, d ocref 14, update_tim estamp 15, update_us erid 16) | |
322 | ||
323 | insInvoi ce.setStri ng(1, i_re ferral_num ber); | |
324 | insInvoi ce.setStri ng(2, i_pr ior_author ization_nu mber); | |
325 | insInvoi ce.setStri ng(3, i_ic n); | |
326 | insInvoi ce.setDate (4, i_date _of_servic e); | |
327 | insInvoi ce.setStri ng(5, i_ed ipi); | |
328 | insInvoi ce.setDate (6, i_date _paid); | |
329 | insInvoi ce.setDoub le(7, i_am ount_paid) ; | |
330 | insInvoi ce.setDoub le(8, i_bi lled_amoun t); | |
331 | insInvoi ce.setStri ng(9, i_cc n_provider _name); | |
332 | insInvoi ce.setStri ng(10, i_c cn_provide r_npi); | |
333 | insInvoi ce.setStri ng(11, i_c lin_code); | |
334 | insInvoi ce.setStri ng(12, i_s tatus); | |
335 | insInvoi ce.setLong (13, i_his tory_id); | |
336 | insInvoi ce.setStri ng(14, i_d ocref); | |
337 | insInvoi ce.setTime stamp(15, i_update_t imestamp); | |
338 | insInvoi ce.setStri ng(16, i_u pdate_user id); | |
339 | ||
340 | // Inser t record; this will return gen erated key . | |
341 | // note this requi res table DDL to be right and we're usin g SQL Serv er | |
342 | rs01 = i nsInvoice. executeQue ry(); | |
343 | rs01.nex t(); | |
344 | invoiceK ey = rs01. getLong("G ENERATED_K EYS"); // SQL Server uses this pseudocol umn name | |
345 | System.o ut.println (" invoi ceKey = " + invoiceK ey); | |
346 | rs01.clo se(); | |
347 | invoiceP Ks.add(new Long(invo iceKey)); // we'll u pdate STAT US for thi s record | |
348 | ||
349 | // add i n simple c hecks that we are do ing | |
350 | invoiceR ecordCount ++; | |
351 | totalPai dCents += (int) (100 .0 * i_amo unt_paid); | |
352 | totalBil ledCents + = (int) (1 00.0 * i_b illed_amou nt); | |
353 | ||
354 | retCode = -1; // i ntermediat e record s een | |
355 | ||
356 | } else { | |
357 | fieldSpl it = inInv oiceLine.s plit(FIELD _SEP); | |
358 | ||
359 | // This is a heade r/footer. Do simple checks | |
360 | // FOR N OW: no hea der checks | |
361 | if (foot erDetected ) { | |
362 | // see if totals (am t_paid, am t_billed, record_num ber) agree with foot er data | |
363 | // TODO | |
364 | if (totalP aidCents = = ((int) ( (Double.pa rseDouble( fieldSplit [1]) * 100 .00)))) { | |
365 | Sy stem.out.p rintln("Pa id total m atches " + fieldSpli t[1]); | |
366 | } else { | |
367 | Sy stem.out.p rintln("WA RNING : Pa id total m ismatch; f ooter is " + fieldSp lit[1] | |
368 | + ", c alculation is " + (t otalPaidCe nts / 100. 0d)); | |
369 | re tCode += 2 ; | |
370 | } | |
371 | ||
372 | if (totalB illedCents == ((int) ((Double. parseDoubl e(fieldSpl it[2]) * 1 00.00)))) { | |
373 | Sy stem.out.p rintln("Bi lled total matches " + fieldSp lit[2]); | |
374 | } else { | |
375 | Sy stem.out.p rintln("WA RNING : Bi lled total mismatch; footer is " + field Split[2] | |
376 | + ", c alculation is " + (t otalBilled Cents / 10 0.0d)); | |
377 | re tCode += 4 ; | |
378 | } | |
379 | ||
380 | if (invoic eRecordCou nt == Inte ger.parseI nt(fieldSp lit[3])) { | |
381 | Sy stem.out.p rintln("In voice reco rd count m atches " + fieldSpli t[3]); | |
382 | } else { | |
383 | Sy stem.out.p rintln("WA RNING : In voice reco rd count m ismatch; f ooter is " + fieldSp lit[3] | |
384 | + ", c alculation is " + in voiceRecor dCount); | |
385 | re tCode += 1 ; | |
386 | } | |
387 | ||
388 | if (docRef != null) { | |
389 | Sy stem.out.p rintln("Do cRef is " + docRef); | |
390 | } else { | |
391 | Sy stem.out.p rintln("WA RNING : Do cRef never set."); | |
392 | re tCode += 8 ; | |
393 | } | |
394 | ||
395 | // now upd ate status of the re cently loa ded record s in the d atabase; | |
396 | String rec ordStatus; | |
397 | if (retCod e == 0) | |
398 | re cordStatus = "LoadOK "; | |
399 | else | |
400 | re cordStatus = "loadFa il" + retC ode; | |
401 | updInvoice Status.set String(2, recordStat us); // sh ould combi ne last 4 statements to 2 | |
402 | ||
403 | for (Long thisPK : i nvoicePKs) { | |
404 | up dInvoiceSt atus.setIn t(1, thisP K.intValue ()); | |
405 | // THIS GETT ING ERROR updInvoice Status.exe cuteQuery( ); | |
406 | // TODO fix kludge: | |
407 | re posStateme nt.execute Update("UP DATE das.P MPM_INVOIC E SET stat us = '" + recordStat us | |
408 | + "' W HERE pmpm_ invoice_ke y = " + th isPK.longV alue()); | |
409 | } | |
410 | ||
411 | } else { | |
412 | // header record; no complex c hecks yet | |
413 | retCode = -2; // hea der record seen | |
414 | } | |
415 | } | |
416 | ||
417 | } ca tch (Class NotFoundEx ception e) { | |
418 | System .out.print ln("ClassN otFoundExc eption " + e); | |
419 | e.prin tStackTrac e(); | |
420 | retCod e = -9; | |
421 | } ca tch (SQLEx ception e) { | |
422 | System .out.print ln("SQLExc eption " + e); | |
423 | e.prin tStackTrac e(); | |
424 | retCod e = -9; | |
425 | } ca tch (Parse Exception e) { | |
426 | System .out.print ln("ParseE xception " + e); | |
427 | e.prin tStackTrac e(); | |
428 | retCod e = -9; | |
429 | } | |
430 | retu rn retCode ; | |
431 | } | |
432 | ||
433 | in t closeSql Connection () { | |
434 | try { | |
435 | System .out.print ln("commit /close to SQL Server "); | |
436 | sqlSrv Conn.commi t(); | |
437 | sqlSrv Conn.close (); | |
438 | } ca tch (SQLEx ception e) { | |
439 | System .out.print ln("SQLExc eption dur ing commit /close pro cessing " + e); | |
440 | e.prin tStackTrac e(); | |
441 | } | |
442 | retu rn 0; | |
443 | } | |
444 | ||
445 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.