Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanOptimizeManagerImpl.java =================================================================== diff -u -r29356 -r29376 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanOptimizeManagerImpl.java (.../InvoicePlanOptimizeManagerImpl.java) (revision 29356) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanOptimizeManagerImpl.java (.../InvoicePlanOptimizeManagerImpl.java) (revision 29376) @@ -589,7 +589,7 @@ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s and %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , SqlUtils.getNonStringFieldInLargeCollectionsPredicate("tousseGroupID", tousseGroupIdList), - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList)); }else{ if(CollectionUtils.isNotEmpty(tousseGroupIdList)){ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s)", @@ -598,7 +598,7 @@ }else if(CollectionUtils.isNotEmpty(sterilingMethodList)){ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList)); } } }else{ @@ -623,7 +623,7 @@ tousseItemCondition = String.format("%s and ("+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s and %s) or %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , SqlUtils.getNonStringFieldInLargeCollectionsPredicate("tousseGroupID", tousseGroupIdList), - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList), + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList), SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"disposableGoodsType", disposableGoodsTypeList)); }else if(CollectionUtils.isNotEmpty(disposableGoodsTypeList) && CollectionUtils.isNotEmpty(tousseGroupIdList)){ @@ -635,14 +635,14 @@ && CollectionUtils.isNotEmpty(sterilingMethodList)){ tousseItemCondition = String.format("%s and ("+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s) or %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList), + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList), SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"disposableGoodsType", disposableGoodsTypeList)); }else if(CollectionUtils.isNotEmpty(tousseGroupIdList) && CollectionUtils.isNotEmpty(sterilingMethodList)){ tousseItemCondition = String.format("%s and ("+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s and %s) or "+ tableColumnAliasPre +"disposableGoodsId is not null)", tousseItemCondition , TousseDefinition.class.getSimpleName() , SqlUtils.getNonStringFieldInLargeCollectionsPredicate("tousseGroupID", tousseGroupIdList), - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList)); }else if(CollectionUtils.isNotEmpty(disposableGoodsTypeList)){ tousseItemCondition = String.format("%s and (%s or "+ tableColumnAliasPre +"tousseDefinitionId is not null)", tousseItemCondition , SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"disposableGoodsType", disposableGoodsTypeList)); @@ -653,7 +653,7 @@ }else if(CollectionUtils.isNotEmpty(sterilingMethodList)){ tousseItemCondition = String.format("%s and ("+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s) or "+ tableColumnAliasPre +"disposableGoodsId is not null)", tousseItemCondition , TousseDefinition.class.getSimpleName() , - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList)); } } }else{ @@ -675,7 +675,7 @@ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s and %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , SqlUtils.getNonStringFieldInLargeCollectionsPredicate("tousseGroupID", tousseGroupIdList), - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList)); }else{ if(CollectionUtils.isNotEmpty(tousseGroupIdList)){ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s)", @@ -684,7 +684,7 @@ }else if(CollectionUtils.isNotEmpty(sterilingMethodList)){ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList)); } } } @@ -706,7 +706,7 @@ tousseItemCondition = String.format("%s and ("+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s and %s) or %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , SqlUtils.getNonStringFieldInLargeCollectionsPredicate("tousseGroupID", tousseGroupIdList), - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList), + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList), SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"disposableGoodsType", disposableGoodsTypeList)); }else if(CollectionUtils.isNotEmpty(disposableGoodsTypeList) && CollectionUtils.isNotEmpty(tousseGroupIdList)){ @@ -718,25 +718,25 @@ && CollectionUtils.isNotEmpty(sterilingMethodList)){ tousseItemCondition = String.format("%s and ("+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s) or %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList), + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList), SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"disposableGoodsType", disposableGoodsTypeList)); }else if(CollectionUtils.isNotEmpty(tousseGroupIdList) && CollectionUtils.isNotEmpty(sterilingMethodList)){ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s and %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , SqlUtils.getNonStringFieldInLargeCollectionsPredicate("tousseGroupID", tousseGroupIdList), - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList)); }else if(CollectionUtils.isNotEmpty(disposableGoodsTypeList)){ tousseItemCondition = String.format("%s and %s", tousseItemCondition , - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"disposableGoodsType", disposableGoodsTypeList)); }else if(CollectionUtils.isNotEmpty(tousseGroupIdList)){ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , SqlUtils.getNonStringFieldInLargeCollectionsPredicate("tousseGroupID", tousseGroupIdList)); }else if(CollectionUtils.isNotEmpty(sterilingMethodList)){ tousseItemCondition = String.format("%s and "+ tableColumnAliasPre +"tousseDefinitionId in (select id from %s where %s)", tousseItemCondition , TousseDefinition.class.getSimpleName() , - SqlUtils.getStringFieldInLargeCollectionsPredicate(tableColumnAliasPre +"sterilingMethod", sterilingMethodList)); + SqlUtils.getStringFieldInLargeCollectionsPredicate("sterilingMethod", sterilingMethodList)); } } }