Applied patch from jira issue - OFBIZ-7857 - Clean up commented out code in Java source for Workeffort.
Thanks Harsh for the contribution. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758022 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
-29
@@ -303,8 +303,6 @@ public class WorkEffortSearch {
|
||||
}
|
||||
dynamicViewEntity.addAlias("WEFF", "workEffortId", null, null, null, Boolean.valueOf(workEffortIdGroupBy), null);
|
||||
|
||||
// Debug.logInfo("WorkEffortSearch, whereCondition = " + whereCondition.toString(), module);
|
||||
|
||||
EntityListIterator eli = null;
|
||||
try {
|
||||
int maxRows = 0;
|
||||
@@ -338,18 +336,6 @@ public class WorkEffortSearch {
|
||||
boolean hasResults = false;
|
||||
Object initialResult = null;
|
||||
|
||||
/* this method has been replaced by the following to address issue with SAP DB and possibly other DBs
|
||||
if (resultOffset != null) {
|
||||
Debug.logInfo("Before relative, current index=" + eli.currentIndex(), module);
|
||||
hasResults = eli.relative(resultOffset.intValue());
|
||||
} else {
|
||||
initialResult = eli.next();
|
||||
if (initialResult != null) {
|
||||
hasResults = true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
initialResult = eli.next();
|
||||
if (initialResult != null) {
|
||||
hasResults = true;
|
||||
@@ -399,21 +385,6 @@ public class WorkEffortSearch {
|
||||
} else {
|
||||
duplicatesFound++;
|
||||
}
|
||||
|
||||
/*
|
||||
StringBuilder lineMsg = new StringBuilder("Got search result line: ");
|
||||
Iterator<String> fieldsToSelectIter = fieldsToSelect.iterator();
|
||||
while (fieldsToSelectIter.hasNext()) {
|
||||
String fieldName = fieldsToSelectIter.next();
|
||||
lineMsg.append(fieldName);
|
||||
lineMsg.append("=");
|
||||
lineMsg.append(searchResult.get(fieldName));
|
||||
if (fieldsToSelectIter.hasNext()) {
|
||||
lineMsg.append(", ");
|
||||
}
|
||||
}
|
||||
Debug.logInfo(lineMsg.toString(), module);
|
||||
*/
|
||||
}
|
||||
|
||||
if (searchResult != null) {
|
||||
|
||||
-11
@@ -504,7 +504,6 @@ public class WorkEffortServices {
|
||||
Collection<String> partyIds = UtilGenerics.checkCollection(context.get("partyIds"));
|
||||
String facilityId = (String) context.get("facilityId");
|
||||
String fixedAssetId = (String) context.get("fixedAssetId");
|
||||
// Debug.logInfo("======by period for fixedAsset: " + fixedAssetId + " facilityId: " + facilityId + "partyId: " + partyId + " entityExprList:" + (List) context.get("entityExprList"));
|
||||
String workEffortTypeId = (String) context.get("workEffortTypeId");
|
||||
Boolean filterOutCanceledEvents = (Boolean) context.get("filterOutCanceledEvents");
|
||||
if (filterOutCanceledEvents == null) {
|
||||
@@ -527,7 +526,6 @@ public class WorkEffortServices {
|
||||
|
||||
// get a timestamp (date) for the beginning of today and for beginning of numDays+1 days from now
|
||||
// Commenting this out because it interferes with periods that do not start at the beginning of the day
|
||||
// Timestamp startStamp = UtilDateTime.getDayStart(startDay, timeZone, locale);
|
||||
Timestamp startStamp = startDay;
|
||||
Timestamp endStamp = UtilDateTime.adjustTimestamp(startStamp, periodType, 1, timeZone, locale);
|
||||
long periodLen = endStamp.getTime() - startStamp.getTime();
|
||||
@@ -613,18 +611,9 @@ public class WorkEffortServices {
|
||||
|
||||
entityExprList.addAll(periodCheckAndlList);
|
||||
|
||||
// (non cancelled) recurring events
|
||||
/* Commenting this out. This condition adds ALL recurring events to ALL calendars.
|
||||
List<EntityCondition> recurringEvents = UtilMisc.<EntityCondition>toList(EntityCondition.makeCondition("tempExprId", EntityOperator.NOT_EQUAL, null));
|
||||
if (filterOutCanceledEvents.booleanValue()) {
|
||||
recurringEvents.addAll(cancelledCheckAndList);
|
||||
}
|
||||
*/
|
||||
|
||||
try {
|
||||
List<GenericValue> tempWorkEfforts = null;
|
||||
if (UtilValidate.isNotEmpty(partyIdsToUse)) {
|
||||
// Debug.logInfo("=====conditions for party: " + eclTotal);
|
||||
tempWorkEfforts = EntityQuery.use(delegator).from("WorkEffortAndPartyAssignAndType").where(entityExprList).orderBy("estimatedStartDate").filterByDate().queryList();
|
||||
} else {
|
||||
tempWorkEfforts = EntityQuery.use(delegator).from("WorkEffort").where(entityExprList).orderBy("estimatedStartDate").queryList();
|
||||
|
||||
Reference in New Issue
Block a user