Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java =================================================================== diff -u -r32082 -r32089 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 32082) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 32089) @@ -1476,11 +1476,11 @@ } } if(departCodes.size() > 0){ - orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("orgUnitCoding", departCodes, " 1=1 "); + orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("departCode", departCodes, " 1=1 "); } } }else{ - orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("orgUnitCoding", recyDepartmentGroupDepartCodes, ";"); + orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("departCode", recyDepartmentGroupDepartCodes, ";"); } } String sql = "where po.recyclingTime between " + fromTime @@ -1586,11 +1586,11 @@ } } if(departCodes.size() > 0){ - orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("po.orgUnitCoding", departCodes, " 1=1 "); + orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("po.departCode", departCodes, " 1=1 "); } } }else{ - orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("po.orgUnitCoding", recyDepartmentGroupDepartCodes, ";"); + orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("po.departCode", recyDepartmentGroupDepartCodes, ";"); } } if(CollectionUtils.isNotEmpty(departGroups)){ @@ -1708,11 +1708,11 @@ } } if(departCodes.size() > 0){ - orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("po.orgUnitCoding", departCodes, " 1=1 "); + orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("po.departCode", departCodes, " 1=1 "); } } }else{ - orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("po.orgUnitCoding", recyDepartmentGroupDepartCodes, ";"); + orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("po.departCode", recyDepartmentGroupDepartCodes, ";"); } } String sql = String @@ -1859,11 +1859,11 @@ } } if(departCodes.size() > 0){ - orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("rr.orgUnitCoding", departCodes, " 1=1 "); + orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("rr.departCode", departCodes, " 1=1 "); } } }else{ - orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("rr.orgUnitCoding", recyDepartmentGroupDepartCodes, ";"); + orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("rr.departCode", recyDepartmentGroupDepartCodes, ";"); } } @@ -2071,11 +2071,11 @@ } } if(departCodes.size() > 0){ - orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("rr.orgUnitCoding", departCodes, " 1=1 "); + orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("rr.departCode", departCodes, " 1=1 "); } } }else{ - orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("rr.orgUnitCoding", recyDepartmentGroupDepartCodes, ";"); + orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("rr.departCode", recyDepartmentGroupDepartCodes, ";"); } } //1.按条件查询符合条件的内容 @@ -2189,8 +2189,8 @@ tousseGroupIdsSql = ""; } String tdSql = taskGroupsSql + tousseGroupIdsSql; - String orgUnitCodingSql = ""; - String handleDepartCoding = ""; + String departCodeSqlSql = ""; + String departCodingSql = ""; if(StringUtils.isNotBlank(recyDepartmentGroupDepartCodes)){ if(recyDepartmentGroupDepartCodes.contains("all") || recyDepartmentGroupDepartCodes.contains("全部")){ List departmentGroups = objectDao.findAllObjects(DepartmentGroup.class.getSimpleName()); @@ -2210,13 +2210,13 @@ } } if(departCodes.size() > 0){ - orgUnitCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("po.orgUnitCoding", departCodes, " 1=1 "); - handleDepartCoding = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("po.handleDepartCoding", departCodes, " 1=1 "); + departCodeSqlSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("po.departCode", departCodes, " 1=1 "); + departCodingSql = " and " + SqlUtils.getStringFieldInLargeCollectionsPredicate("po.departCoding", departCodes, " 1=1 "); } } }else{ - orgUnitCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("po.orgUnitCoding", recyDepartmentGroupDepartCodes, ";"); - handleDepartCoding = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("po.handleDepartCoding", recyDepartmentGroupDepartCodes, ";"); + departCodeSqlSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("po.departCode", recyDepartmentGroupDepartCodes, ";"); + departCodingSql = SqlUtils.getWhereSqlByfilterFieldAndStringValueAndSeparator("po.departCoding", recyDepartmentGroupDepartCodes, ";"); } } @@ -2242,15 +2242,15 @@ + "where po.submitTime between %s and %s and po.handleDepartCoding = '%s' %s %s %s and td.tousseType = '%s' " + "group by po.departCoding, td.ancestorID,td.id", RecyclingRecord.class.getSimpleName(), RecyclingItem.class.getSimpleName(), - TousseDefinition.class.getSimpleName(),fromTime, toTime, handlerDepartCoding,orOrgUnitNameSQL,tdSql,orgUnitCodingSql, + TousseDefinition.class.getSimpleName(),fromTime, toTime, handlerDepartCoding,orOrgUnitNameSQL,tdSql,departCodeSqlSql, InvoicePlan.class.getSimpleName(), TousseItem.class.getSimpleName(), - TousseDefinition.class.getSimpleName(),fromTime, toTime, handlerDepartCoding,orOrgUnitNameSQL,tdSql,handleDepartCoding, + TousseDefinition.class.getSimpleName(),fromTime, toTime, handlerDepartCoding,orOrgUnitNameSQL,tdSql,departCodingSql, TousseDefinition.PACKAGE_TYPE_DRESSING); ResultSet rs = objectDao.executeSql(sql); JSONObject json = tousseItemClassification(rs); String invoicePlanHql = String.format("id in(select recyclingApplication.id from %s po where po.recyclingTime between %s and %s and po.orgUnitCoding = '%s' %s %s) and %s order by depart,recyclingTime", - RecyclingRecord.class.getSimpleName(),fromTime,toTime,handlerDepartCoding,orOrgUnitNameSQL,orgUnitCodingSql,sqlFunctionsAdapter.strNotBlank("remark")); + RecyclingRecord.class.getSimpleName(),fromTime,toTime,handlerDepartCoding,orOrgUnitNameSQL,departCodeSqlSql,sqlFunctionsAdapter.strNotBlank("remark")); List invoicePlans = invoicePlanManager.getByHql(invoicePlanHql); Map> maps = invoicePlanManager.groupByDepartCoding(invoicePlans); JsonConfig jsonConfig = new JsonConfig();