Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java =================================================================== diff -u -r35648 -r35677 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 35648) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 35677) @@ -2628,14 +2628,6 @@ JSONObject resultObj = new JSONObject(); JSONArray tableArr = new JSONArray(); try { - //手术室不用统计 - String orOrgUnitNameSQL = ""; - GoodsOption goodsOption = goodsOptionManager.getGoodsOption(GoodsOption.MODEL_SURGICALINSTRUMENTS_DEPT, ""); - if(goodsOption != null){ - if(StringUtils.isNotBlank(goodsOption.getValue())){ - orOrgUnitNameSQL = " and po.depart not in ('" + goodsOption.getValue().replace(";", "','") + "')"; - } - } for (Object tableObj : tables) { JSONObject table = (JSONObject)tableObj; String tableName = table.optString("tableName"); @@ -2692,7 +2684,7 @@ if(includeOtherTousses){//包含其他器械,则不需要过滤包定义id includeTousseIds.clear(); } - sql = getRecyclingDetailSqlForhandleResultSetByRecyclingDetailPrintConfig(fromTime, toTime, handlerDepartCoding, orOrgUnitNameSQL, departGroupIds, includeTousseIds, extraSql); + sql = getRecyclingDetailSqlForhandleResultSetByRecyclingDetailPrintConfig(fromTime, toTime, handlerDepartCoding, departGroupIds, includeTousseIds, extraSql); try { Map>> orgUnitGroupNameMap = new HashMap>>();//回收科室分组对应更详细的map Map sumAmountMap = new HashMap();//各列的汇总map @@ -2834,7 +2826,7 @@ } } } - sql = getRecyclingDetailSqlForhandleResultSetByRecyclingDetailPrintConfig(fromTime, toTime, handlerDepartCoding, orOrgUnitNameSQL, departGroupIds2, null, extraSql); + sql = getRecyclingDetailSqlForhandleResultSetByRecyclingDetailPrintConfig(fromTime, toTime, handlerDepartCoding, departGroupIds2, null, extraSql); try { rs = objectDao.executeSql(sql); Map>> orgUnitGroupNameMap = new HashMap>>();//回收科室分组对应更详细信息的map @@ -2897,13 +2889,12 @@ * @param fromTime 开始时间 * @param toTime 结束时间 * @param handlerDepartCoding 所属科室 - * @param orOrgUnitNameSQL 不查询的科室的sql * @param departGroupIds 科室分组ids * @param includeTousseIds 只查询的包定义ids * @param extraSql 额外的查询条件 * @return 装配界面的打印回收清单格式的查询语句 */ - private String getRecyclingDetailSqlForhandleResultSetByRecyclingDetailPrintConfig(String fromTime, String toTime, String handlerDepartCoding, String orOrgUnitNameSQL, Set departGroupIds, Set includeTousseIds, String extraSql){ + private String getRecyclingDetailSqlForhandleResultSetByRecyclingDetailPrintConfig(String fromTime, String toTime, String handlerDepartCoding, Set departGroupIds, Set includeTousseIds, String extraSql){ String includeTousseIdsSql = CollectionUtils.isEmpty(includeTousseIds)?"": " and " + SqlUtils.getNonStringFieldInLargeCollectionsPredicate("td.ancestorID", includeTousseIds); String joinRecyclingRecordSql = ""; String joinInvoicePlanSql = ""; @@ -2936,7 +2927,7 @@ .format("select min(po.depart) depart,po.departCode,td.ancestorID,min(bo.tousseName) tousseName,sum(bo.amount) amount,td.id from %s po " + "join %s bo on po.id = bo.recyclingRecord_id join %s td on td.id = bo.tousseDefinitionId " + joinRecyclingRecordSql - + "where po.recyclingTime between %s and %s and po.orgUnitCoding = '%s' %s " + + "where po.recyclingTime between %s and %s and po.orgUnitCoding = '%s' " + departGroupIdsSql + includeTousseIdsSql + extraSql @@ -2946,15 +2937,15 @@ + "select min(po.depart) depart,po.departCoding,td.ancestorID,min(bo.tousseName) tousseName,sum(bo.amount) amount,td.id from %s po " + "join %s bo on po.id = bo.recyclingApplication_ID join %s td on td.id = bo.tousseDefinitionId " + joinInvoicePlanSql - + "where po.submitTime between %s and %s and po.handleDepartCoding = '%s' %s and td.tousseType = '%s' " + + "where po.submitTime between %s and %s and po.handleDepartCoding = '%s' and td.tousseType = '%s' " + departGroupIdsSql + includeTousseIdsSql + extraSql + "group by po.departCoding, td.ancestorID,td.id", RecyclingRecord.class.getSimpleName(), RecyclingItem.class.getSimpleName(), - TousseDefinition.class.getSimpleName(),fromTime, toTime, handlerDepartCoding,orOrgUnitNameSQL, + TousseDefinition.class.getSimpleName(),fromTime, toTime, handlerDepartCoding, InvoicePlan.class.getSimpleName(), TousseItem.class.getSimpleName(), - TousseDefinition.class.getSimpleName(),fromTime, toTime, handlerDepartCoding,orOrgUnitNameSQL, + TousseDefinition.class.getSimpleName(),fromTime, toTime, handlerDepartCoding, TousseDefinition.PACKAGE_TYPE_DRESSING); return sql; }