Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/OperationTousseOperationRepartHelper.java =================================================================== diff -u -r37692 -r37719 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/OperationTousseOperationRepartHelper.java (.../OperationTousseOperationRepartHelper.java) (revision 37692) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/util/OperationTousseOperationRepartHelper.java (.../OperationTousseOperationRepartHelper.java) (revision 37719) @@ -894,9 +894,9 @@ +" sri where sri.status='存入')) lastIntoSto on lastIntoSto.tousseInstanceId=ti.id " + "left join (select t.id,t.tousseInstanceId,t.operator,t.operationTime from " + TousseOperation.class.getSimpleName() - +" t where id =(select max(id) from " + +" t where id in (select max(ot.id) from " + TousseOperation.class.getSimpleName() - + " where operation='发货')) lastInvoiceOpe on lastInvoiceOpe.tousseInstanceId=ti.id " + + " ot where ot.operation='发货' group by ot.tousseInstanceId)) lastInvoiceOpe on lastInvoiceOpe.tousseInstanceId=ti.id " + " left join (select t.tousseInstanceId,t.nextOperationTime,t.nextOperationLimitTime,t.storageRecordId from " + TousseOperation.class.getSimpleName() +" t where t.id =(select max(tn.id) id from " + TousseOperation.class.getSimpleName() +" tn where "