Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java =================================================================== diff -u -r34838 -r34867 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java (.../InvoicePlanManagerImpl.java) (revision 34838) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java (.../InvoicePlanManagerImpl.java) (revision 34867) @@ -3753,7 +3753,18 @@ InvoicePlan.RECYCLINGSTATUS_TALLIED }; whereSql += " and po.recyclingStatus in('" + StringUtils.join(recycleStatus, "','") + "')"; - + //外来器械申请单需要细到单里的包,有待接收和待二次回收时才显示 + whereSql += " and (po.type<>'" + + InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION + +"' or po.type='" + + InvoicePlan.TYPE_FOREIGNTOUSSEAPPLIACTION + +"' and exists (select 1 from "+ + TousseItem.class.getSimpleName() + +" where packageStatus in('"+ + InvoicePlan.RECYCLINGSTATUS_AWAITRECEIVE + +"','"+ + InvoicePlan.RECYCLINGSTATUS_AWAIT_SECOND_RECEIVE + +"') and recyclingApplication_ID=po.id)) "; if (StringUtils.isNotBlank(handleDepartCoding)) { whereSql += String.format(" and po.handleDepartCoding='%s'", handleDepartCoding); }