Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java =================================================================== diff -u -r27509 -r27514 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java (.../InvoicePlanManagerImpl.java) (revision 27509) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java (.../InvoicePlanManagerImpl.java) (revision 27514) @@ -1479,7 +1479,7 @@ } //只查询包含有申请项的隐藏回收字段为空或者隐藏回收字段不为是的申请单 - whereSql += " and po.id in (select po.id from " + TousseItem.class.getSimpleName() + whereSql += " and po.id in (select invoicePlan.id from " + TousseItem.class.getSimpleName() + " where hideRecycling is null or hideRecycling <> '"+ Constants.STR_YES +"')"; String orderBySql = null; if(StringUtils.isBlank(applyTimeOrder)){ @@ -1490,7 +1490,7 @@ JSONObject obj = new JSONObject(); Map> map = new HashMap>(); if(isQuerySum){ - getDepartAmountAndInvoicePlanAmount("select count(*) invoicePlanAmount,count(distinct po.depart) departAmount from InvoicePlan po " + whereSql,obj); + getDepartAmountAndInvoicePlanAmount("select count(*) invoicePlanAmount,count(distinct po.depart) departAmount from InvoicePlan po " + whereSql.replaceAll("invoicePlan.id", "recyclingApplication_ID"),obj); } List list = objectDao.findByHql(queryColumnSql + whereSql + orderBySql, (pageIndex - 1) * pageSize, pageSize); map.put(obj, list);