Skip to content

Commit

Permalink
Merge pull request #1189 from GIRISANKAR/develop
Browse files Browse the repository at this point in the history
OLE-9333    request_history table cannot archive requests with ITEM ID and no barcode
  • Loading branch information
GIRISANKAR authored Feb 26, 2018
2 parents 676d0d8 + 771ec0b commit 7880b56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public Collection<PatronBillPayment> getPatronBills(String patronId) {

public Collection<OleDeliverRequestHistoryRecord> getDeliverRequestHistoryRecords(String itemBarcode) {
Criteria criteria = new Criteria();
criteria.addEqualTo(OLEConstants.OleDeliverRequest.ITEM_BARCODE, itemBarcode);
criteria.addEqualTo(OLEConstants.ITEM_BARCODE, itemBarcode);
QueryByCriteria query = QueryFactory.newQuery(OleDeliverRequestHistoryRecord.class, criteria);
query.addOrderByDescending(OLEConstants.ARCHIVE_DATE);
Collection results = getPersistenceBrokerTemplate().getCollectionByQuery(query);
Expand Down Expand Up @@ -580,7 +580,7 @@ public List<OleDeliverRequestHistoryRecord> getExpiredRequest(String itemBarcode
List<OleDeliverRequestHistoryRecord> oleDeliverRequestHistoryRecords = new ArrayList<>();
if(loanCreatedDate != null) {
Criteria criteria = new Criteria();
criteria.addEqualTo(OLEConstants.OleDeliverRequest.ITEM_BARCODE, itemBarcode);
criteria.addEqualTo(OLEConstants.ITEM_BARCODE, itemBarcode);
criteria.addEqualTo(OLEConstants.OleDeliverRequest.REQUEST_OUTCOME_STATUS, ConfigContext.getCurrentContextConfig().getProperty(OLEConstants.REQUEST_EXPIRED));
java.sql.Date loanCreateDate = new java.sql.Date(loanCreatedDate.getTime());
criteria.addBetween(OLEConstants.ARCHIVE_DATE, loanCreateDate, new java.sql.Date(System.currentTimeMillis()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@
<field-descriptor name="requestHistoryId" column="OLE_RQST_HSTRY_ID" jdbc-type="VARCHAR" primarykey="true" autoincrement="true" sequence-name="OLE_DLVR_RQST_HSTRY_REC_S"/>
<field-descriptor name="requestId" column="OLE_RQST_ID" jdbc-type="VARCHAR" />
<field-descriptor name="itemId" column="OLE_ITEM_ID" jdbc-type="VARCHAR" />
<field-descriptor name="itemBarCode" column="OLE_ITEM_BARCODE" jdbc-type="VARCHAR" />
<field-descriptor name="itemBarcode" column="OLE_ITEM_BARCODE" jdbc-type="VARCHAR" />
<field-descriptor name="loanTransactionId" column="OLE_LOAN_ID" jdbc-type="VARCHAR" />
<field-descriptor name="patronId" column="OLE_PTRN_ID" jdbc-type="VARCHAR" />
<field-descriptor name="poLineItemNumber" column="OLE_LN_ITM_NUM" jdbc-type="VARCHAR" />
Expand Down

0 comments on commit 7880b56

Please sign in to comment.