Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java =================================================================== diff -u -r23462 -r23476 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java (.../InvoicePlanManagerImpl.java) (revision 23462) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java (.../InvoicePlanManagerImpl.java) (revision 23476) @@ -3270,9 +3270,10 @@ invoicePlanList = objectDao.findBySql(InvoicePlan.class.getSimpleName(),sql); }else{ //获得类型为高值耗材且审核结束且不为已终止的申请单 - String sql = String.format("where po.type = '%s' and po.processStatus = '%s' and (po.endStatus <> '%s' or po.endStatus is null)", + String whereSql = String.format("where po.type = '%s' and po.processStatus = '%s' and (po.endStatus <> '%s' or po.endStatus is null) ", InvoicePlan.TYPE_EXPENSIVEGOODS_FORM,InvoicePlan.PROCESSSTATUS_BE_THROUGH_WITH,InvoicePlan.STATUS_END); - invoicePlanList = objectDao.findBySql(InvoicePlan.class.getSimpleName(),sql); + String orderSql = " order by applicationTime desc"; + invoicePlanList = objectDao.findBySql(InvoicePlan.class.getSimpleName(),whereSql + orderSql); if(CollectionUtils.isNotEmpty(invoicePlanList)){ //若申请单已被绑定入库单且绑定的实例已有使用记录或已结算则:不显示该申请单 for (int i = invoicePlanList.size()-1; i >= 0; i--) {