Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java =================================================================== diff -u -r34861 -r34863 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 34861) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 34863) @@ -7253,6 +7253,23 @@ RecyclingRecord recyclingRecord = get(id); String json = ""; try { + if(recyclingRecord != null + && InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION.equals(recyclingRecord.getRecyclingApplicationType()) + && !MathTools.equals(recyclingRecord.getRecyclingTimes(), RecyclingRecord.RECYCLINGTIMES_TWO) + ){ + InvoicePlan ip = recyclingRecord.getRecyclingApplication(); + if(ip != null){ + List twoRecyclingRecords = objectDao.findByHql("select po from " + + RecyclingRecord.class.getSimpleName() + + " po where recyclingTimes=" + + RecyclingRecord.RECYCLINGTIMES_TWO + + " and po.recyclingApplication.id=" + + ip.getId()); + if(CollectionUtils.isNotEmpty(twoRecyclingRecords)){ + recyclingRecord = twoRecyclingRecords.get(0); + } + } + } JSONObject obj = recyclingRecordToJson(recyclingRecord); setLastTousseBarcode(recyclingRecord, obj); boolean enableUrgentFunction = CssdUtils.getSystemSetConfigByNameBool("enableUrgentFunction", false);