From df91a6fa0cc89e9d930956d6496188dae18aebca Mon Sep 17 00:00:00 2001 From: girisankar Date: Wed, 6 Dec 2017 15:59:45 +0530 Subject: [PATCH] Location and Item Type description values missing in Lost Notices --- .../kuali/ole/deliver/controller/CircController.java | 2 ++ .../OleDeliverRequestDocumentHelperServiceImpl.java | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/ole-app/olefs/src/main/java/org/kuali/ole/deliver/controller/CircController.java b/ole-app/olefs/src/main/java/org/kuali/ole/deliver/controller/CircController.java index 9352013a0d..1ca80b1663 100644 --- a/ole-app/olefs/src/main/java/org/kuali/ole/deliver/controller/CircController.java +++ b/ole-app/olefs/src/main/java/org/kuali/ole/deliver/controller/CircController.java @@ -1075,7 +1075,9 @@ public ModelAndView applyItemLost(@ModelAttribute("KualiForm") UifFormBase form, String itemFullLocation = getItemFullLocation(oleLoanDocument.getItemId()); if(itemFullLocation != null) { oleLoanDocument.setItemFullLocation(itemFullLocation); + oleLoanDocument.setItemLocation(itemFullLocation); } + oleLoanDocument.setItemTypeDesc(new OleDeliverRequestDocumentHelperServiceImpl().getItemTypeDescByCode(oleLoanDocument.getItemType())); oleDeliverNotice = getLostNotice(oleLoanDocument.getDeliverNotices()); if(oleDeliverNotice!=null) oleLoanDocument.setItemLostNote(itemLostDescription); diff --git a/ole-app/olefs/src/main/java/org/kuali/ole/deliver/service/OleDeliverRequestDocumentHelperServiceImpl.java b/ole-app/olefs/src/main/java/org/kuali/ole/deliver/service/OleDeliverRequestDocumentHelperServiceImpl.java index 55cc775b58..b7282a3512 100644 --- a/ole-app/olefs/src/main/java/org/kuali/ole/deliver/service/OleDeliverRequestDocumentHelperServiceImpl.java +++ b/ole-app/olefs/src/main/java/org/kuali/ole/deliver/service/OleDeliverRequestDocumentHelperServiceImpl.java @@ -4288,6 +4288,18 @@ public String getItemTypeDescByName(String itemTypeName) { return itemTypeDesc; } + public String getItemTypeDescByCode(String itemType) { + String itemTypeDesc = ""; + List instanceItemTypeList = null; + Map instanceItemTypeMap = new HashMap(); + instanceItemTypeMap.put("instanceItemTypeCode", itemType); + instanceItemTypeList = (List) getBusinessObjectService().findMatching(OleInstanceItemType.class, instanceItemTypeMap); + if (instanceItemTypeList != null && instanceItemTypeList.size() > 0) { + itemTypeDesc = instanceItemTypeList.get(0).getInstanceItemTypeDesc(); + } + return itemTypeDesc; + } + /** * This method is to update the item *