Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java =================================================================== diff -u -r29134 -r29149 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 29134) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 29149) @@ -434,7 +434,7 @@ String barcodeStr = StrutsParamUtils.getPraramValue("barcode",null); BarcodeDevice barcodeDevice = barcodeManager .getBarcodeByBarcode(barcodeStr); - + JSONObject jsonObject = new JSONObject(); if (barcodeDevice != null){ TousseInstance tousseInstance = null; @@ -520,8 +520,18 @@ } } } + }else{ + InvoicePlan invoicePlan = invoicePlanManager.getInvoicePlanBySerialNumber(barcodeStr); + if(invoicePlan != null){ + message = ""; + RecyclingRecord recyclingRecord = invoicePlan.getRecyclingRecord(objectDao); + if(recyclingRecord != null){ + jsonObject.put("recyclingRecordId", recyclingRecord.getId()); + }else{ + id = invoicePlan.getId().toString(); + } + } } - JSONObject jsonObject = new JSONObject(); jsonObject.put("success", true); jsonObject.put("message", message); jsonObject.put("id", id);