@@ -459,17 +459,18 @@ private static int updateBibs(SierraInstanceInformation sierraInstanceInformatio
459
459
private static void getBibsWithHoldings (Connection sierraConn ) {
460
460
bibsWithHoldings .clear ();
461
461
try {
462
- PreparedStatement bibHoldingsStmt = sierraConn .prepareStatement ("select distinct(record_num) as record_num from sierra_view.bib_record_holding_record_link INNER JOIN sierra_view.record_metadata ON bib_record_id = record_metadata.id where record_type_code = 'b'" , ResultSet .TYPE_FORWARD_ONLY , ResultSet .CONCUR_READ_ONLY );
463
- ResultSet bibHoldingsRS = bibHoldingsStmt .executeQuery ();
464
- while (bibHoldingsRS .next ()){
465
- String bibId = bibHoldingsRS .getString ("record_num" );
466
- //Don't need the .b and checksum for this
467
- bibsWithHoldings .add (bibId );
468
- }
462
+ PreparedStatement bibHoldingsStmt = sierraConn .prepareStatement ("select distinct(record_num) as record_num from sierra_view.bib_record_holding_record_link INNER JOIN sierra_view.record_metadata ON bib_record_id = record_metadata.id where record_type_code = 'b'" , ResultSet .TYPE_FORWARD_ONLY , ResultSet .CONCUR_READ_ONLY );
463
+ ResultSet bibHoldingsRS = bibHoldingsStmt .executeQuery ();
464
+ while (bibHoldingsRS .next ()){
465
+ String bibId = bibHoldingsRS .getString ("record_num" );
466
+ //Don't need the .b and checksum for this
467
+ bibsWithHoldings .add (bibId );
468
+ }
469
469
bibHoldingsRS .close ();
470
470
} catch (Exception e ) {
471
471
logger .error ("Unable to get bibs with holdings from Sierra" , e );
472
472
}
473
+
473
474
logEntry .addNote ("Finished getting bibs with holdings " + dateTimeFormatter .format (new Date ()));
474
475
}
475
476
@@ -1064,6 +1065,11 @@ private static boolean updateMarcAndRegroupRecordId(SierraInstanceInformation si
1064
1065
holdingField .addSubfield (marcFactory .newSubfield (subfield .getString ("tag" ).charAt (0 ), subfield .getString ("content" )));
1065
1066
}
1066
1067
holdingField .addSubfield (marcFactory .newSubfield ('6' , Integer .toString (holdingId )));
1068
+ }else if (curVarField .has ("fieldTag" ) && curVarField .get ("fieldTag" ).equals ("h" )) {
1069
+ DataField holdingField = marcFactory .newDataField ("866" , ' ' , ' ' );
1070
+ marcRecord .addVariableField (holdingField );
1071
+ holdingField .addSubfield (marcFactory .newSubfield ('a' , curVarField .getString ("content" )));
1072
+ holdingField .addSubfield (marcFactory .newSubfield ('6' , Integer .toString (holdingId )));
1067
1073
}
1068
1074
}
1069
1075
//Location is in the fixed fields
0 commit comments