Author: doogie
Date: Mon May 14 21:00:57 2012 New Revision: 1338408 URL: http://svn.apache.org/viewvc?rev=1338408&view=rev Log: DEPRECATION: applications/manufacturing: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter. Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsStacks.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java Mon May 14 21:00:57 2012 @@ -65,8 +65,8 @@ public class BOMHelper { // If the date is null, set it to today. if (inDate == null) inDate = new Date(); int maxDepth = 0; - List<GenericValue> productNodesList = delegator.findByAndCache("ProductAssoc", - UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", bomType)); + List<GenericValue> productNodesList = delegator.findByAnd("ProductAssoc", + UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", bomType), null, true); productNodesList = EntityUtil.filterByDate(productNodesList, inDate); int depth = 0; for (GenericValue oneNode : productNodesList) { @@ -108,8 +108,8 @@ public class BOMHelper { productIdKeys = tree.getAllProductsId(); productIdKeys.add(productIdKey); } - List<GenericValue> productNodesList = delegator.findByAndCache("ProductAssoc", - UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", bomType)); + List<GenericValue> productNodesList = delegator.findByAnd("ProductAssoc", + UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", bomType), null, true); productNodesList = EntityUtil.filterByDate(productNodesList, inDate); GenericValue duplicatedNode = null; Iterator<GenericValue> nodesIterator = productNodesList.iterator(); @@ -135,11 +135,11 @@ public class BOMHelper { String shipmentId = request.getParameter("shipmentId"); try { - List<GenericValue> shipmentPlans = delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId)); + List<GenericValue> shipmentPlans = delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId), null, false); for(GenericValue shipmentPlan : shipmentPlans) { GenericValue orderItem = shipmentPlan.getRelatedOne("OrderItem"); - List<GenericValue> productionRuns = delegator.findByAndCache("WorkOrderItemFulfillment", UtilMisc.toMap("orderId", shipmentPlan.getString("orderId"), "orderItemSeqId", shipmentPlan.getString("orderItemSeqId"), "shipGroupSeqId", shipmentPlan.getString("shipGroupSeqId"))); + List<GenericValue> productionRuns = delegator.findByAnd("WorkOrderItemFulfillment", UtilMisc.toMap("orderId", shipmentPlan.getString("orderId"), "orderItemSeqId", shipmentPlan.getString("orderItemSeqId"), "shipGroupSeqId", shipmentPlan.getString("shipGroupSeqId")), null, true); if (UtilValidate.isNotEmpty(productionRuns)) { Debug.logError("Production Run for order item (" + orderItem.getString("orderId") + "/" + orderItem.getString("orderItemSeqId") + ") not created.", module); continue; Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java Mon May 14 21:00:57 2012 @@ -100,7 +100,7 @@ public class BOMNode { List<GenericValue> rows = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", product.get("productId"), "productAssocTypeId", partBomTypeId), - UtilMisc.toList("sequenceNum","productIdTo ASC")); + UtilMisc.toList("sequenceNum","productIdTo ASC"), false); rows = EntityUtil.filterByDate(rows, inDate); if ((UtilValidate.isEmpty(rows)) && substitutedNode != null) { // If no child is found and this is a substituted node @@ -108,7 +108,7 @@ public class BOMNode { rows = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", substitutedNode.getProduct().get("productId"), "productAssocTypeId", partBomTypeId), - UtilMisc.toList("sequenceNum")); + UtilMisc.toList("sequenceNum"), false); rows = EntityUtil.filterByDate(rows, inDate); } children = FastList.newInstance(); @@ -229,12 +229,12 @@ public class BOMNode { List<GenericValue> productPartRules = delegator.findByAnd("ProductManufacturingRule", UtilMisc.toMap("productId", productIdForRules, "productIdFor", node.get("productId"), - "productIdIn", node.get("productIdTo"))); + "productIdIn", node.get("productIdTo")), null, false); if (substitutedNode != null) { productPartRules.addAll(delegator.findByAnd("ProductManufacturingRule", UtilMisc.toMap("productId", productIdForRules, "productIdFor", substitutedNode.getProduct().getString("productId"), - "productIdIn", node.get("productIdTo")))); + "productIdIn", node.get("productIdTo")), null, false)); } productPartRules = EntityUtil.filterByDate(productPartRules, inDate); newNode = substituteNode(oneChildNode, productFeatures, productPartRules); @@ -243,11 +243,11 @@ public class BOMNode { // we try to search for a generic link-rule List<GenericValue> genericLinkRules = delegator.findByAnd("ProductManufacturingRule", UtilMisc.toMap("productIdFor", node.get("productId"), - "productIdIn", node.get("productIdTo"))); + "productIdIn", node.get("productIdTo")), null, false); if (substitutedNode != null) { genericLinkRules.addAll(delegator.findByAnd("ProductManufacturingRule", UtilMisc.toMap("productIdFor", substitutedNode.getProduct().getString("productId"), - "productIdIn", node.get("productIdTo")))); + "productIdIn", node.get("productIdTo")), null, false)); } genericLinkRules = EntityUtil.filterByDate(genericLinkRules, inDate); newNode = substituteNode(oneChildNode, productFeatures, genericLinkRules); @@ -256,7 +256,7 @@ public class BOMNode { // we try to search for a generic node-rule List<GenericValue> genericNodeRules = delegator.findByAnd("ProductManufacturingRule", UtilMisc.toMap("productIdIn", node.get("productIdTo")), - UtilMisc.toList("ruleSeqId")); + UtilMisc.toList("ruleSeqId"), false); genericNodeRules = EntityUtil.filterByDate(genericNodeRules, inDate); newNode = null; newNode = substituteNode(oneChildNode, productFeatures, genericNodeRules); @@ -325,7 +325,7 @@ public class BOMNode { List<GenericValue> rows = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productIdTo", product.get("productId"), "productAssocTypeId", partBomTypeId), - UtilMisc.toList("sequenceNum")); + UtilMisc.toList("sequenceNum"), false); rows = EntityUtil.filterByDate(rows, inDate); if ((UtilValidate.isEmpty(rows)) && substitutedNode != null) { // If no parent is found and this is a substituted node @@ -333,7 +333,7 @@ public class BOMNode { rows = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productIdTo", substitutedNode.getProduct().get("productId"), "productAssocTypeId", partBomTypeId), - UtilMisc.toList("sequenceNum")); + UtilMisc.toList("sequenceNum"), false); rows = EntityUtil.filterByDate(rows, inDate); } children = FastList.newInstance(); Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java Mon May 14 21:00:57 2012 @@ -83,7 +83,7 @@ public class BOMServices { List<String> bomTypes = FastList.newInstance(); if (bomType == null) { try { - List<GenericValue> bomTypesValues = delegator.findByAnd("ProductAssocType", UtilMisc.toMap("parentTypeId", "PRODUCT_COMPONENT")); + List<GenericValue> bomTypesValues = delegator.findByAnd("ProductAssocType", UtilMisc.toMap("parentTypeId", "PRODUCT_COMPONENT"), null, false); for(GenericValue bomTypesValue : bomTypesValues) { bomTypes.add(bomTypesValue.getString("productAssocTypeId")); } @@ -143,7 +143,7 @@ public class BOMServices { // If the product is a variant of a virtual, then the billOfMaterialLevel cannot be // lower than the billOfMaterialLevel of the virtual product. List<GenericValue> virtualProducts = delegator.findByAnd("ProductAssoc", - UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "PRODUCT_VARIANT")); + UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "PRODUCT_VARIANT"), null, false); virtualProducts = EntityUtil.filterByDate(virtualProducts); int virtualMaxDepth = 0; for(GenericValue oneVirtualProductAssoc : virtualProducts) { @@ -183,7 +183,7 @@ public class BOMServices { } if (alsoVariants.booleanValue()) { List<GenericValue> variantProducts = delegator.findByAnd("ProductAssoc", - UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT")); + UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT"), null, false); variantProducts = EntityUtil.filterByDate(variantProducts, true); for(GenericValue oneVariantProductAssoc : variantProducts) { GenericValue variantProduct = delegator.findOne("Product", UtilMisc.toMap("productId", oneVariantProductAssoc.getString("productId")), false); @@ -474,7 +474,7 @@ public class BOMServices { String shipmentId = (String) context.get("shipmentId"); try { - List<GenericValue> packages = delegator.findByAnd("ShipmentPackage", UtilMisc.toMap("shipmentId", shipmentId)); + List<GenericValue> packages = delegator.findByAnd("ShipmentPackage", UtilMisc.toMap("shipmentId", shipmentId), null, false); if (!UtilValidate.isEmpty(packages)) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingBomPackageAlreadyFound", locale)); } @@ -484,7 +484,7 @@ public class BOMServices { // ShipmentItems are loaded List<GenericValue> shipmentItems = null; try { - shipmentItems = delegator.findByAnd("ShipmentItem", UtilMisc.toMap("shipmentId", shipmentId)); + shipmentItems = delegator.findByAnd("ShipmentItem", UtilMisc.toMap("shipmentId", shipmentId), null, false); } catch (GenericEntityException gee) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingBomErrorLoadingShipmentItems", locale)); } @@ -494,7 +494,7 @@ public class BOMServices { // Get the OrderShipments List<GenericValue> orderShipments = null; try { - orderShipments = delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId, "shipmentItemSeqId", shipmentItem.getString("shipmentItemSeqId"))); + orderShipments = delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId, "shipmentItemSeqId", shipmentItem.getString("shipmentItemSeqId")), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingPackageConfiguratorError", locale)); } Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMTree.java Mon May 14 21:00:57 2012 @@ -102,7 +102,7 @@ public class BOMTree { String productIdForRules = productId; // The selected product features are loaded List<GenericValue> productFeaturesAppl = delegator.findByAnd("ProductFeatureAppl", - UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "STANDARD_FEATURE")); + UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "STANDARD_FEATURE"), null, false); List<GenericValue> productFeatures = FastList.newInstance(); GenericValue oneProductFeatureAppl = null; for (int i = 0; i < productFeaturesAppl.size(); i++) { @@ -164,7 +164,7 @@ public class BOMTree { private GenericValue manufacturedAsProduct(String productId, Date inDate) throws GenericEntityException { List<GenericValue> manufacturedAsProducts = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, - "productAssocTypeId", "PRODUCT_MANUFACTURED")); + "productAssocTypeId", "PRODUCT_MANUFACTURED"), null, false); manufacturedAsProducts = EntityUtil.filterByDate(manufacturedAsProducts, inDate); GenericValue manufacturedAsProduct = null; if (UtilValidate.isNotEmpty(manufacturedAsProducts)) { Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java Mon May 14 21:00:57 2012 @@ -80,14 +80,14 @@ public class ProductionRunHelper { List<GenericValue> tasks = delegator.findByAnd("WorkEffort", UtilMisc.toMap("workEffortParentId", workEffortId, "workEffortTypeId", "PROD_ORDER_TASK", - "workEffortName", taskName)); + "workEffortName", taskName), null, false); return (UtilValidate.isNotEmpty(tasks)); } public static void getLinkedProductionRuns(Delegator delegator, LocalDispatcher dispatcher, String productionRunId, List<ProductionRun> productionRuns) throws GenericEntityException { productionRuns.add(new ProductionRun(productionRunId, delegator, dispatcher)); List<GenericValue> linkedWorkEfforts = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", - UtilMisc.toMap("workEffortIdTo", productionRunId, "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY"))); + UtilMisc.toMap("workEffortIdTo", productionRunId, "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY"), null, false)); for (int i = 0; i < linkedWorkEfforts.size(); i++) { GenericValue link = linkedWorkEfforts.get(i); getLinkedProductionRuns(delegator, dispatcher, link.getString("workEffortIdFrom"), productionRuns); @@ -95,7 +95,7 @@ public class ProductionRunHelper { } public static String getRootProductionRun(Delegator delegator, String productionRunId) throws GenericEntityException { - List<GenericValue> linkedWorkEfforts = delegator.findByAnd("WorkEffortAssoc", UtilMisc.toMap("workEffortIdFrom", productionRunId, "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY")); + List<GenericValue> linkedWorkEfforts = delegator.findByAnd("WorkEffortAssoc", UtilMisc.toMap("workEffortIdFrom", productionRunId, "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY"), null, false); GenericValue linkedWorkEffort = EntityUtil.getFirst(linkedWorkEfforts); if (linkedWorkEffort != null) { productionRunId = getRootProductionRun(delegator, linkedWorkEffort.getString("workEffortIdTo")); Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Mon May 14 21:00:57 2012 @@ -123,7 +123,7 @@ public class ProductionRunServices { // Cancel the product promised List<GenericValue> products = delegator.findByAnd("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", productionRunId, "workEffortGoodStdTypeId", "PRUN_PROD_DELIV", - "statusId", "WEGS_CREATED")); + "statusId", "WEGS_CREATED"), null, false); if (!UtilValidate.isEmpty(products)) { for(GenericValue product : products) { product.set("statusId", "WEGS_CANCELLED"); @@ -144,7 +144,7 @@ public class ProductionRunServices { // cancel all the components List<GenericValue> components = delegator.findByAnd("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", taskId, "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED", - "statusId", "WEGS_CREATED")); + "statusId", "WEGS_CREATED"), null, false); if (!UtilValidate.isEmpty(components)) { for(GenericValue component : components) { component.set("statusId", "WEGS_CANCELLED"); @@ -416,7 +416,7 @@ public class ProductionRunServices { List<GenericValue> workEffortPartyAssignments = null; try { workEffortPartyAssignments = EntityUtil.filterByDate( - dctx.getDelegator().findByAnd("WorkEffortPartyAssignment", UtilMisc.toMap("workEffortId", routingTaskId))); + dctx.getDelegator().findByAnd("WorkEffortPartyAssignment", UtilMisc.toMap("workEffortId", routingTaskId), null, false)); } catch (GenericEntityException e) { Debug.logError(e.getMessage(), module); } @@ -448,7 +448,7 @@ public class ProductionRunServices { List<GenericValue> workEffortCostCalcs = null; try { workEffortCostCalcs = EntityUtil.filterByDate( - dctx.getDelegator().findByAnd("WorkEffortCostCalc", UtilMisc.toMap("workEffortId", routingTaskId))); + dctx.getDelegator().findByAnd("WorkEffortCostCalc", UtilMisc.toMap("workEffortId", routingTaskId), null, false)); } catch (GenericEntityException e) { Debug.logError(e.getMessage(), module); } @@ -642,7 +642,7 @@ public class ProductionRunServices { // change only the production run (header) status to PRUN_RUNNING // First check if there are production runs with precedence not still completed try { - List<GenericValue> mandatoryWorkEfforts = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", UtilMisc.toMap("workEffortIdTo", productionRunId, "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY"))); + List<GenericValue> mandatoryWorkEfforts = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", UtilMisc.toMap("workEffortIdTo", productionRunId, "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY"), null, false)); for (int i = 0; i < mandatoryWorkEfforts.size(); i++) { GenericValue mandatoryWorkEffortAssoc = mandatoryWorkEfforts.get(i); GenericValue mandatoryWorkEffort = mandatoryWorkEffortAssoc.getRelatedOne("FromWorkEffort"); @@ -828,7 +828,7 @@ public class ProductionRunServices { if (issueAllComponents.booleanValue()) { // Issue all the components, if this task needs components and they still need to be issued try { - List<GenericValue> inventoryAssigned = delegator.findByAnd("WorkEffortInventoryAssign", UtilMisc.toMap("workEffortId", taskId)); + List<GenericValue> inventoryAssigned = delegator.findByAnd("WorkEffortInventoryAssign", UtilMisc.toMap("workEffortId", taskId), null, false); if (UtilValidate.isEmpty(inventoryAssigned)) { serviceContext.clear(); serviceContext.put("workEffortId", taskId); @@ -921,7 +921,7 @@ public class ProductionRunServices { List<GenericValue> productCostComponentCalcs = delegator.findByAnd("ProductCostComponentCalc", UtilMisc.toMap("productId", productionRun.getProductProduced().getString("productId")), - UtilMisc.toList("sequenceNum")); + UtilMisc.toList("sequenceNum"), false); for (int i = 0; i < productCostComponentCalcs.size(); i++) { GenericValue productCostComponentCalc = productCostComponentCalcs.get(i); GenericValue costComponentCalc = productCostComponentCalc.getRelatedOne("CostComponentCalc"); @@ -975,7 +975,7 @@ public class ProductionRunServices { } // Get all the valid CostComponents entries List<GenericValue> costComponents = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", - UtilMisc.toMap("workEffortId", workEffortId))); + UtilMisc.toMap("workEffortId", workEffortId), null, false)); result.put("costComponents", costComponents); // TODO: before doing these totals we should convert the cost components' costs to the // base currency uom of the owner of the facility in which the task is running @@ -1005,7 +1005,7 @@ public class ProductionRunServices { Locale locale = (Locale) context.get("locale"); try { List<GenericValue> tasks = delegator.findByAnd("WorkEffort", - UtilMisc.toMap("workEffortParentId", workEffortId), UtilMisc.toList("workEffortId")); + UtilMisc.toMap("workEffortParentId", workEffortId), UtilMisc.toList("workEffortId"), false); BigDecimal totalCost = ZERO; Map<String, Object> outputMap = dispatcher.runSync("getWorkEffortCosts", UtilMisc.<String, Object>toMap("userLogin", userLogin, "workEffortId", workEffortId)); @@ -1051,7 +1051,7 @@ public class ProductionRunServices { // Get the template (aka routing task) of the work effort GenericValue routingTaskAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", UtilMisc.toMap("workEffortIdTo", productionRunTaskId, - "workEffortAssocTypeId", "WORK_EFF_TEMPLATE")))); + "workEffortAssocTypeId", "WORK_EFF_TEMPLATE"), null, false))); GenericValue routingTask = null; if (UtilValidate.isNotEmpty(routingTaskAssoc)) { routingTask = routingTaskAssoc.getRelatedOne("FromWorkEffort"); @@ -1059,7 +1059,7 @@ public class ProductionRunServices { // Get all the valid CostComponentCalc entries List<GenericValue> workEffortCostCalcs = delegator.findByAnd("WorkEffortCostCalc", - UtilMisc.toMap("workEffortId", productionRunTaskId)); + UtilMisc.toMap("workEffortId", productionRunTaskId), null, false); workEffortCostCalcs = EntityUtil.filterByDate(workEffortCostCalcs); for (GenericValue workEffortCostCalc : workEffortCostCalcs) { @@ -1141,7 +1141,7 @@ public class ProductionRunServices { try { Map<String, BigDecimal> materialsCostByCurrency = FastMap.newInstance(); for(GenericValue inventoryConsumed : delegator.findByAnd("WorkEffortAndInventoryAssign", - UtilMisc.toMap("workEffortId", productionRunTaskId))) { + UtilMisc.toMap("workEffortId", productionRunTaskId), null, false)) { BigDecimal quantity = inventoryConsumed.getBigDecimal("quantity"); BigDecimal unitCost = inventoryConsumed.getBigDecimal("unitCost"); if (UtilValidate.isEmpty(unitCost) || UtilValidate.isEmpty(quantity)) { @@ -1505,7 +1505,7 @@ public class ProductionRunServices { List<GenericValue> workEffortPartyAssignments = null; try { workEffortPartyAssignments = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortPartyAssignment", - UtilMisc.toMap("workEffortId", routingTaskId))); + UtilMisc.toMap("workEffortId", routingTaskId), null, false)); } catch (GenericEntityException e) { Debug.logError(e.getMessage(), module); } @@ -1951,7 +1951,7 @@ public class ProductionRunServices { try { BigDecimal totalIssued = BigDecimal.ZERO; for(GenericValue issuance : delegator.findByAnd("WorkEffortAndInventoryAssign", - UtilMisc.toMap("workEffortId", productionRunTaskId, "productId", productId))) { + UtilMisc.toMap("workEffortId", productionRunTaskId, "productId", productId), null, false)) { BigDecimal issued = issuance.getBigDecimal("quantity"); if (issued != null) { totalIssued = totalIssued.add(issued); @@ -1959,8 +1959,8 @@ public class ProductionRunServices { } BigDecimal totalReturned = BigDecimal.ZERO; for(GenericValue returned : delegator.findByAnd("WorkEffortAndInventoryProduced", - UtilMisc.toMap("workEffortId", productionRunTaskId, "productId", productId))) { - GenericValue returnDetail = EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail", UtilMisc.toMap("inventoryItemId", returned.getString("inventoryItemId")), UtilMisc.toList("inventoryItemDetailSeqId"))); + UtilMisc.toMap("workEffortId", productionRunTaskId, "productId", productId), null, false)) { + GenericValue returnDetail = EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail", UtilMisc.toMap("inventoryItemId", returned.getString("inventoryItemId")), UtilMisc.toList("inventoryItemDetailSeqId"), false)); if (returnDetail != null) { BigDecimal qtyReturned = returnDetail.getBigDecimal("quantityOnHandDiff"); if (qtyReturned != null) { @@ -2082,7 +2082,7 @@ public class ProductionRunServices { for (GenericValue component : components) { BigDecimal totalRequiredMaterialQuantity = component.getBigDecimal("estimatedQuantity").multiply(totalQuantityProduced).divide(quantityToProduce, rounding); // now get the units that have been already issued and subtract them - List<GenericValue> issuances = delegator.findByAnd("WorkEffortAndInventoryAssign", UtilMisc.toMap("workEffortId", workEffortId, "productId", component.getString("productId"))); + List<GenericValue> issuances = delegator.findByAnd("WorkEffortAndInventoryAssign", UtilMisc.toMap("workEffortId", workEffortId, "productId", component.getString("productId")), null, false); BigDecimal totalIssued = BigDecimal.ZERO; for (GenericValue issuance : issuances) { BigDecimal issued = issuance.getBigDecimal("quantity"); @@ -2335,7 +2335,7 @@ public class ProductionRunServices { List<GenericValue> bomList = null; try { bomList = delegator.findByAnd("ProductAssoc", - UtilMisc.toMap("productId", componentProductId, "productAssocTypeId", "MANUF_COMPONENT")); + UtilMisc.toMap("productId", componentProductId, "productAssocTypeId", "MANUF_COMPONENT"), null, false); bomList = EntityUtil.filterByDate(bomList, UtilDateTime.nowTimestamp()); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunTryToGetBomListError", locale)); @@ -2574,7 +2574,7 @@ public class ProductionRunServices { } } else { try { - orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId)); + orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId), null, false); if (orderItems == null) { return ServiceUtil.returnError(UtilProperties.getMessage(resourceOrder, "OrderErrorOrderItemNotFound", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", ""), locale)); } @@ -2616,13 +2616,13 @@ public class ProductionRunServices { try { List<GenericValue> existingProductionRuns = null; if (UtilValidate.isNotEmpty(shipGroupSeqId)) { - existingProductionRuns = delegator.findByAndCache("WorkOrderItemFulfillment", + existingProductionRuns = delegator.findByAnd("WorkOrderItemFulfillment", UtilMisc.toMap("orderId", orderItemOrShipGroupAssoc.getString("orderId"), - "orderItemSeqId", orderItemOrShipGroupAssoc.getString("orderItemSeqId"), "shipGroupSeqId", shipGroupSeqId)); + "orderItemSeqId", orderItemOrShipGroupAssoc.getString("orderItemSeqId"), "shipGroupSeqId", shipGroupSeqId), null, true); } else { - existingProductionRuns = delegator.findByAndCache("WorkOrderItemFulfillment", + existingProductionRuns = delegator.findByAnd("WorkOrderItemFulfillment", UtilMisc.toMap("orderId", orderItemOrShipGroupAssoc.getString("orderId"), - "orderItemSeqId", orderItemOrShipGroupAssoc.getString("orderItemSeqId"))); + "orderItemSeqId", orderItemOrShipGroupAssoc.getString("orderItemSeqId")), null, true); } if (UtilValidate.isNotEmpty(existingProductionRuns)) { Debug.logWarning("Production Run for order item [" + orderItemOrShipGroupAssoc.getString("orderId") + "/" + orderItemOrShipGroupAssoc.getString("orderItemSeqId") + "] and ship group [" + shipGroupSeqId + "] already exists.", module); @@ -3078,7 +3078,7 @@ public class ProductionRunServices { try { List<GenericValue> resultList = delegator.findByAnd("WorkEffortAndGoods", UtilMisc.toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV", - "statusId", "WEGS_CREATED", "workEffortTypeId", "PROD_ORDER_HEADER")); + "statusId", "WEGS_CREATED", "workEffortTypeId", "PROD_ORDER_HEADER"), null, false); for(GenericValue genericResult : resultList) { if ("PRUN_CLOSED".equals(genericResult.getString("currentStatusId")) || "PRUN_CREATED".equals(genericResult.getString("currentStatusId"))) { @@ -3119,7 +3119,7 @@ public class ProductionRunServices { // Approved purchase orders resultList = delegator.findByAnd("OrderHeaderAndItems", UtilMisc.toMap("orderTypeId", "PURCHASE_ORDER", - "itemStatusId", "ITEM_APPROVED"), UtilMisc.toList("orderId")); + "itemStatusId", "ITEM_APPROVED"), UtilMisc.toList("orderId"), false); String orderId = null; GenericValue orderDeliverySchedule = null; for(GenericValue genericResult : resultList) { Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Mon May 14 21:00:57 2012 @@ -97,7 +97,7 @@ public class MrpServices { listResult = null; List<GenericValue> listResultRoles = FastList.newInstance(); try { - listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "PRODUCT_REQUIREMENT", "statusId", "REQ_PROPOSED")); + listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "PRODUCT_REQUIREMENT", "statusId", "REQ_PROPOSED"), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale)); } @@ -115,7 +115,7 @@ public class MrpServices { } listResult = null; try { - listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "INTERNAL_REQUIREMENT", "statusId", "REQ_PROPOSED")); + listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "INTERNAL_REQUIREMENT", "statusId", "REQ_PROPOSED"), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale)); } @@ -146,7 +146,7 @@ public class MrpServices { parameters = UtilMisc.<String, Object>toMap("orderTypeId", "SALES_ORDER", "oiStatusId", "ITEM_APPROVED"); parameters.put("facilityId", facilityId); try { - resultList = delegator.findByAnd("OrderHeaderItemAndShipGroup", parameters, UtilMisc.toList("orderId")); + resultList = delegator.findByAnd("OrderHeaderItemAndShipGroup", parameters, UtilMisc.toList("orderId"), false); } catch (GenericEntityException e) { Debug.logError(e, "Error : findByAnd(\"OrderItem\", parameters\")", module); Debug.logError(e, "Error : parameters = "+parameters,module); @@ -207,7 +207,7 @@ public class MrpServices { parameters = UtilMisc.<String, Object>toMap("requirementTypeId", "PRODUCT_REQUIREMENT", "statusId", "REQ_APPROVED", "facilityId", facilityId); try { - resultList = delegator.findByAnd("Requirement", parameters); + resultList = delegator.findByAnd("Requirement", parameters, null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale)); } @@ -237,7 +237,7 @@ public class MrpServices { String orderId = null; GenericValue orderDeliverySchedule = null; try { - List<GenericValue> facilityContactMechs = EntityUtil.filterByDate(delegator.findByAnd("FacilityContactMech", UtilMisc.toMap("facilityId", facilityId))); + List<GenericValue> facilityContactMechs = EntityUtil.filterByDate(delegator.findByAnd("FacilityContactMech", UtilMisc.toMap("facilityId", facilityId), null, false)); List<String> facilityContactMechIds = EntityUtil.getFieldListFromEntityList(facilityContactMechs, "contactMechId", true); List<EntityExpr> searchConditions = UtilMisc.toList(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "PURCHASE_ORDER"), EntityCondition.makeCondition("oiStatusId", EntityOperator.EQUALS, "ITEM_APPROVED"), @@ -311,7 +311,7 @@ public class MrpServices { parameters = UtilMisc.<String, Object>toMap("workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED", "statusId", "WEGS_CREATED", "facilityId", facilityId); try { - resultList = delegator.findByAnd("WorkEffortAndGoods", parameters); + resultList = delegator.findByAnd("WorkEffortAndGoods", parameters, null, false); for(GenericValue genericResult : resultList) { if ("PRUN_CLOSED".equals(genericResult.getString("currentStatusId")) || "PRUN_COMPLETED".equals(genericResult.getString("currentStatusId")) || @@ -321,7 +321,7 @@ public class MrpServices { String productId = genericResult.getString("productId"); // get the inventory already consumed BigDecimal consumedInventoryTotal = BigDecimal.ZERO; - List<GenericValue> consumedInventoryItems = delegator.findByAnd("WorkEffortAndInventoryAssign", UtilMisc.toMap("workEffortId", genericResult.getString("workEffortId"), "productId", productId)); + List<GenericValue> consumedInventoryItems = delegator.findByAnd("WorkEffortAndInventoryAssign", UtilMisc.toMap("workEffortId", genericResult.getString("workEffortId"), "productId", productId), null, false); for (GenericValue consumedInventoryItem : consumedInventoryItems) { consumedInventoryTotal = consumedInventoryTotal.add(consumedInventoryItem.getBigDecimal("quantity")); } @@ -346,7 +346,7 @@ public class MrpServices { parameters = UtilMisc.<String, Object>toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV", "statusId", "WEGS_CREATED", "workEffortTypeId", "PROD_ORDER_HEADER", "facilityId", facilityId); try { - resultList = delegator.findByAnd("WorkEffortAndGoods", parameters); + resultList = delegator.findByAnd("WorkEffortAndGoods", parameters, null, false); for(GenericValue genericResult : resultList) { if ("PRUN_CLOSED".equals(genericResult.getString("currentStatusId")) || "PRUN_COMPLETED".equals(genericResult.getString("currentStatusId")) || @@ -385,7 +385,7 @@ public class MrpServices { resultList = null; parameters = UtilMisc.<String, Object>toMap("facilityId", facilityId); try { - resultList = delegator.findByAnd("ProductFacility", parameters); + resultList = delegator.findByAnd("ProductFacility", parameters, null, false); } catch (GenericEntityException e) { Debug.logError(e, "Unable to retrieve ProductFacility records.", module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindProductFacility", locale)); @@ -430,7 +430,7 @@ public class MrpServices { } String partyId = (String)facility.get("ownerPartyId"); try { - resultList = delegator.findByAnd("SalesForecast", UtilMisc.toMap("organizationPartyId", partyId)); + resultList = delegator.findByAnd("SalesForecast", UtilMisc.toMap("organizationPartyId", partyId), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindSalesForecasts", locale)); } @@ -448,7 +448,7 @@ public class MrpServices { } else { List<GenericValue> salesForecastDetails = null; try { - salesForecastDetails = delegator.findByAnd("SalesForecastDetail", UtilMisc.toMap("salesForecastId", genericResult.getString("salesForecastId"))); + salesForecastDetails = delegator.findByAnd("SalesForecastDetail", UtilMisc.toMap("salesForecastId", genericResult.getString("salesForecastId")), null, false); } catch (GenericEntityException e) { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindSalesForecastDetails", locale)); } Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original) +++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Mon May 14 21:00:57 2012 @@ -125,7 +125,7 @@ public class TechDataServices { List<GenericValue> listRoutingTaskAssoc = null; try { - listRoutingTaskAssoc = delegator.findByAnd("WorkEffortAssoc",UtilMisc.toMap("workEffortIdFrom", workEffortIdFrom,"sequenceNum",sequenceNum), UtilMisc.toList("fromDate")); + listRoutingTaskAssoc = delegator.findByAnd("WorkEffortAssoc",UtilMisc.toMap("workEffortIdFrom", workEffortIdFrom,"sequenceNum",sequenceNum), UtilMisc.toList("fromDate"), false); } catch (GenericEntityException e) { Debug.logWarning(e, module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingTechDataWorkEffortAssocNotExist", UtilMisc.toMap("errorString", e.toString()), locale)); Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy Mon May 14 21:00:57 2012 @@ -58,10 +58,10 @@ if (!productAssoc) useValues = false; context.useValues = useValues; -Collection assocTypes = delegator.findByAnd("ProductAssocType", [parentTypeId : "PRODUCT_COMPONENT"], ["productAssocTypeId", "description"]); +Collection assocTypes = delegator.findByAnd("ProductAssocType", [parentTypeId : "PRODUCT_COMPONENT"], ["productAssocTypeId", "description"], false); context.assocTypes = assocTypes; -Collection formulae = delegator.findByAnd("CustomMethod", [customMethodTypeId : "BOM_FORMULA"], ["customMethodId", "description"]); +Collection formulae = delegator.findByAnd("CustomMethod", [customMethodTypeId : "BOM_FORMULA"], ["customMethodId", "description"], false); context.formulae = formulae; if (product) { Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy Mon May 14 21:00:57 2012 @@ -22,9 +22,9 @@ import org.ofbiz.widget.html.HtmlFormWra productionRunId = parameters.productionRunId ?: parameters.workEffortId; taskInfos = []; -tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"]); +tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false); tasks.each { task -> - records = delegator.findByAnd("InventoryItemDetail", [workEffortId : task.workEffortId]); + records = delegator.findByAnd("InventoryItemDetail", [workEffortId : task.workEffortId], null, false); HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskActualComponents", request, response); taskForm.putInContext("records", records); taskInfos.add([task : task, taskForm : taskForm]); Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy Mon May 14 21:00:57 2012 @@ -22,9 +22,9 @@ import org.ofbiz.widget.html.HtmlFormWra productionRunId = parameters.productionRunId ?: parameters.workEffortId; taskInfos = []; -tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"]); +tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false); tasks.each { task -> - records = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : task.workEffortId]); + records = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : task.workEffortId], null, false); HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskComponents", request, response); taskForm.putInContext("records", records); taskInfos.add([task : task, taskForm : taskForm]); Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy Mon May 14 21:00:57 2012 @@ -23,12 +23,12 @@ import org.ofbiz.entity.util.EntityUtil; productionRunId = parameters.productionRunId ?: parameters.workEffortId; context.productionRunId = productionRunId; -delivGoodStandard = EntityUtil.getFirst(delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunId, workEffortGoodStdTypeId : "PRUN_PROD_DELIV", statusId : "WEGS_CREATED"], ["-fromDate"])); +delivGoodStandard = EntityUtil.getFirst(delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunId, workEffortGoodStdTypeId : "PRUN_PROD_DELIV", statusId : "WEGS_CREATED"], ["-fromDate"], false)); if (delivGoodStandard) { context.delivProductId = delivGoodStandard.productId; } if (context.delivProductId && (parameters.partyId || parameters.contentLocale)) { - delivProductContents = EntityUtil.filterByDate(delegator.findByAnd("ProductContentAndInfo", [productId : context.delivProductId], ["-fromDate"])); + delivProductContents = EntityUtil.filterByDate(delegator.findByAnd("ProductContentAndInfo", [productId : context.delivProductId], ["-fromDate"], false)); context.delivProductContents = delivProductContents; Locale contentLocale = null; @@ -38,7 +38,7 @@ if (context.delivProductId && (parameter delivProductContentsForLocaleAndUser = []; delivProductContents.each { delivProductContent -> GenericValue content = ContentWorker.findContentForRendering(delegator, delivProductContent.contentId, contentLocale, parameters.partyId, parameters.roleTypeId, true); - delivProductContentsForLocaleAndUser.add(EntityUtil.getFirst(delegator.findByAnd("ContentDataResourceView", [contentId : content.contentId]))); + delivProductContentsForLocaleAndUser.add(EntityUtil.getFirst(delegator.findByAnd("ContentDataResourceView", [contentId : content.contentId], null, false))); } context.delivProductContentsForLocaleAndUser = delivProductContentsForLocaleAndUser; } Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy Mon May 14 21:00:57 2012 @@ -22,16 +22,16 @@ import org.ofbiz.widget.html.HtmlFormWra productionRunId = parameters.productionRunId ?: parameters.workEffortId; taskCosts = []; -tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"]); +tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false); tasks.each { task -> - costs = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", [workEffortId : task.workEffortId])); + costs = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", [workEffortId : task.workEffortId], null, false)); HtmlFormWrapper taskCostsForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskCosts", request, response); taskCostsForm.putInContext("taskCosts", costs); taskCosts.add([task : task ,costsForm : taskCostsForm]); } // get the costs directly associated to the production run (e.g. overhead costs) productionRun = delegator.findOne("WorkEffort", [workEffortId: productionRunId], true); -costs = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", [workEffortId : productionRunId])); +costs = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", [workEffortId : productionRunId], null, false)); HtmlFormWrapper taskCostsForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskCosts", request, response); taskCostsForm.putInContext("taskCosts", costs); taskCosts.add([task : productionRun ,costsForm : taskCostsForm]); Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy Mon May 14 21:00:57 2012 @@ -36,7 +36,7 @@ if (productionRunId) { context.productionRun = productionRun.getGenericValue(); // Find all the order items to which this production run is linked. - orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId]); + orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId], null, false); if (orderItems) { context.orderItems = orderItems; } @@ -44,7 +44,7 @@ if (productionRunId) { quantityToProduce = productionRun.getGenericValue().get("quantityToProduce") ?: 0.0; // Find the inventory items produced - inventoryItems = delegator.findByAnd("WorkEffortInventoryProduced", [workEffortId : productionRunId]); + inventoryItems = delegator.findByAnd("WorkEffortInventoryProduced", [workEffortId : productionRunId], null, false); context.inventoryItems = inventoryItems; if (inventoryItems) { lastWorkEffortInventoryProduced = (GenericValue)inventoryItems.get(inventoryItems.size() - 1); @@ -104,7 +104,7 @@ if (productionRunId) { // Get the list of deliverable products, i.e. the WorkEffortGoodStandard entries // with workEffortGoodStdTypeId = "PRUNT_PROD_DELIV": // first of all we get the template task (the routing task) - templateTaskAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", [workEffortIdTo : routingTask.workEffortId, workEffortAssocTypeId : "WORK_EFF_TEMPLATE"]))); + templateTaskAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", [workEffortIdTo : routingTask.workEffortId, workEffortAssocTypeId : "WORK_EFF_TEMPLATE"], null, false))); templateTask = [:]; if (templateTaskAssoc) { templateTask = templateTaskAssoc.getRelatedOne("FromWorkEffort"); @@ -115,7 +115,7 @@ if (productionRunId) { } context.delivProducts = delivProducts; // Get the list of delivered products, i.e. inventory items - prunInventoryProduced = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : routingTaskId]); + prunInventoryProduced = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : routingTaskId], null, false); context.prunInventoryProduced = prunInventoryProduced; } @@ -129,7 +129,7 @@ if (productionRunId) { if ("PRUN_RUNNING".equals(task.currentStatusId)) { // Use WorkEffortGoodStandard to figure out if there are products which are needed for this task (PRUNT_PRODNEEDED) and which have not been issued (ie, WEGS_CREATED). // If so this task should have products issued - components = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : task.workEffortId, workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"]); + components = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : task.workEffortId, workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], null, false); List notIssued = EntityUtil.filterByAnd(components, [statusId : "WEGS_CREATED"]); if (components && notIssued) { issueTaskId = task.workEffortId; @@ -169,7 +169,7 @@ if (productionRunId) { componentData.internalName = componentName; componentData.workEffortName = workEffortName; componentData.facilityId = productionRunTask.facilityId; - issuances = delegator.findByAnd("WorkEffortAndInventoryAssign", [workEffortId : component.workEffortId, productId : product.productId]); + issuances = delegator.findByAnd("WorkEffortAndInventoryAssign", [workEffortId : component.workEffortId, productId : product.productId], null, false); totalIssued = 0.0; issuances.each { issuance -> issued = issuance.quantity; @@ -177,10 +177,10 @@ if (productionRunId) { totalIssued += issued; } } - returns = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : component.workEffortId , productId : product.productId]); + returns = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : component.workEffortId , productId : product.productId], null, false); totalReturned = 0.0; returns.each { returned -> - returnDetail = EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail", [inventoryItemId : returned.inventoryItemId], ["inventoryItemDetailSeqId"])); + returnDetail = EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail", [inventoryItemId : returned.inventoryItemId], ["inventoryItemDetailSeqId"], false)); if (returnDetail) { qtyReturned = returnDetail.quantityOnHandDiff; if (qtyReturned) { @@ -205,7 +205,7 @@ if (productionRunId) { } } // Content - productionRunContents = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortContentAndInfo", [workEffortId : productionRunId], ["-fromDate"])); + productionRunContents = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortContentAndInfo", [workEffortId : productionRunId], ["-fromDate"], false)); context.productionRunContents = productionRunContents; context.productionRunComponentsData = productionRunComponentsData; context.productionRunComponentsDataReadyForIssuance = productionRunComponentsDataReadyForIssuance; Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy Mon May 14 21:00:57 2012 @@ -22,7 +22,7 @@ import org.ofbiz.widget.html.HtmlFormWra productionRunId = parameters.productionRunId ?: parameters.workEffortId; taskInfos = []; -tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"]); +tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false); tasks.each { task -> records = task.getRelated("WorkEffortFixedAssetAssign"); HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskFixedAssets", request, response); Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy Mon May 14 21:00:57 2012 @@ -44,7 +44,7 @@ if (productionRunId) { context.productionRunData = productionRunData; // Find all the order items to which this production run is linked. - orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId]); + orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId], null, false); if (orderItems) { context.orderItems = orderItems; } @@ -55,7 +55,7 @@ if (productionRunId) { context.productionRunComponents = productionRun.getProductionRunComponents();; // Find all the notes linked to this production run. - productionRunNoteData = delegator.findByAnd("WorkEffortNoteAndData", [workEffortId : productionRunId]); + productionRunNoteData = delegator.findByAnd("WorkEffortNoteAndData", [workEffortId : productionRunId], null, false); if (productionRunNoteData) { context.productionRunNoteData = productionRunNoteData; } Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy Mon May 14 21:00:57 2012 @@ -25,7 +25,7 @@ import org.ofbiz.manufacturing.jobshopmg shipmentPlans = []; rows = []; if (shipment && shipment.shipmentId) { - shipmentPlans = delegator.findByAnd("OrderShipment", [shipmentId : shipment.shipmentId]); + shipmentPlans = delegator.findByAnd("OrderShipment", [shipmentId : shipment.shipmentId], null, false); } if (shipmentPlans) { workInProgress = "false"; @@ -67,7 +67,7 @@ if (shipmentPlans) { // Total quantity planned not issued plannedQuantity = 0.0; qtyPlannedInShipment = [:]; - plans = delegator.findByAnd("OrderShipment", [orderId : orderItem.orderId ,orderItemSeqId : orderItem.orderItemSeqId]); + plans = delegator.findByAnd("OrderShipment", [orderId : orderItem.orderId ,orderItemSeqId : orderItem.orderItemSeqId], null, false); plans.each { plan -> if (plan.quantity) { netPlanQty = plan.quantity; @@ -147,7 +147,7 @@ if (shipmentPlans) { } rows.add(oneRow); // Select the production runs, if available - productionRuns = delegator.findByAnd("WorkOrderItemFulfillment", [orderId : shipmentPlan.orderId, orderItemSeqId : shipmentPlan.orderItemSeqId, shipGroupSeqId : shipmentPlan.shipGroupSeqId],["workEffortId"]); // TODO: add shipmentId + productionRuns = delegator.findByAnd("WorkOrderItemFulfillment", [orderId : shipmentPlan.orderId, orderItemSeqId : shipmentPlan.orderItemSeqId, shipGroupSeqId : shipmentPlan.shipGroupSeqId],["workEffortId"], null, false); // TODO: add shipmentId if (productionRuns) { workInProgress = "true"; productionRunsId = ""; Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy Mon May 14 21:00:57 2012 @@ -32,7 +32,7 @@ if (productFeatureTypeIdPar) { context.featureType = featureType; } -allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName],["productId"]); +allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName],["productId"], false); productionRuns = []; features = [:]; // each entry is a productFeatureId|{productFeature,products} products = [:]; // each entry is a productId|{product,quantity} @@ -43,7 +43,7 @@ if (!productFeatureTypeIdPar) { if (allProductionRuns) { allProductionRuns.each { productionRun -> // select the production run's task of a given name (i.e. type) if any (based on the report's parameter) - productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar]); + productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false); productionRunTask = EntityUtil.getFirst(productionRunTasks); if (!productionRunTask) { // the production run doesn't include the given task, skip it @@ -51,7 +51,7 @@ if (allProductionRuns) { } // select the task's components, if any - allProductionRunComponents = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunTask.workEffortId,workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"]); + allProductionRunComponents = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunTask.workEffortId,workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], null, false); allProductionRunComponents.each { productionRunComponent -> // verify if the product is a member of the given category (based on the report's parameter) if (productCategoryIdPar) { @@ -64,13 +64,13 @@ if (allProductionRuns) { location = null; if (productionRunProduct) { - locations = delegator.findByAnd("ProductFacilityLocation", [facilityId : productionRun.facilityId, productId : productionRunProduct.productId]); + locations = delegator.findByAnd("ProductFacilityLocation", [facilityId : productionRun.facilityId, productId : productionRunProduct.productId], null, false); location = EntityUtil.getFirst(locations); } // group by standard feature of type productFeatureTypeIdPar if (productFeatureTypeIdPar) { - standardFeatures = delegator.findByAnd("ProductFeatureAndAppl", [productFeatureTypeId : productFeatureTypeIdPar, productId : productionRunComponent.productId, productFeatureApplTypeId : "STANDARD_FEATURE"]); + standardFeatures = delegator.findByAnd("ProductFeatureAndAppl", [productFeatureTypeId : productFeatureTypeIdPar, productId : productionRunComponent.productId, productFeatureApplTypeId : "STANDARD_FEATURE"], null, false); standardFeatures = EntityUtil.filterByDate(standardFeatures); standardFeature = EntityUtil.getFirst(standardFeatures); standardFeatureId = null; Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy Mon May 14 21:00:57 2012 @@ -29,7 +29,7 @@ if (productCategoryIdPar) { context.category = category; } -allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName, statusId : "WEGS_CREATED", workEffortGoodStdTypeId : "PRUN_PROD_DELIV"], ["productId"]); +allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName, statusId : "WEGS_CREATED", workEffortGoodStdTypeId : "PRUN_PROD_DELIV"], ["productId"], false); productionRuns = []; if (allProductionRuns) { @@ -44,12 +44,12 @@ if (allProductionRuns) { productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false); String rootProductionRunId = ProductionRunHelper.getRootProductionRun(delegator, productionRun.workEffortId); - productionRunOrders = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : rootProductionRunId]); + productionRunOrders = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : rootProductionRunId], null, false); productionRunOrder = EntityUtil.getFirst(productionRunOrders); OrderReadHelper orh = new OrderReadHelper(delegator, productionRunOrder.orderId); // select the production run's task of a given name (i.e. type) if any (based on the report's parameter) - productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar]); + productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false); productionRunTask = EntityUtil.getFirst(productionRunTasks); if (!productionRunTask) { // the production run doesn't include the given task, skip it @@ -62,7 +62,7 @@ if (allProductionRuns) { productionRunOrder : productionRunOrder, customer : orh.getPlacingParty(), address : orh.getShippingAddress()]; - allProductionComponents = delegator.findByAnd("WorkEffortAndGoods", [workEffortId : productionRunTask.workEffortId, statusId : "WEGS_CREATED", workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], ["productId"]); + allProductionComponents = delegator.findByAnd("WorkEffortAndGoods", [workEffortId : productionRunTask.workEffortId, statusId : "WEGS_CREATED", workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], ["productId"], false); componentList = []; if (allProductionComponents) { Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy Mon May 14 21:00:57 2012 @@ -29,7 +29,7 @@ if (productCategoryIdPar) { context.category = category; } -allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", UtilMisc.toMap("workEffortName", planName, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUN_PROD_DELIV"), UtilMisc.toList("productId")); +allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", UtilMisc.toMap("workEffortName", planName, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUN_PROD_DELIV"), UtilMisc.toList("productId"), false); productionRuns = []; if (allProductionRuns) { @@ -44,10 +44,10 @@ if (allProductionRuns) { productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false); String rootProductionRunId = ProductionRunHelper.getRootProductionRun(delegator, productionRun.workEffortId); - productionRunOrders = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : rootProductionRunId]); + productionRunOrders = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : rootProductionRunId], null, false); productionRunOrder = EntityUtil.getFirst(productionRunOrders); OrderReadHelper orh = new OrderReadHelper(delegator, productionRunOrder.orderId); - locations = delegator.findByAnd("ProductFacilityLocation", [productId : productionRun.productId, facilityId : productionRun.facilityId]); + locations = delegator.findByAnd("ProductFacilityLocation", [productId : productionRun.productId, facilityId : productionRun.facilityId], null, false); location = EntityUtil.getFirst(locations); productionRunMap = [productionRun : productionRun, Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy Mon May 14 21:00:57 2012 @@ -31,7 +31,7 @@ if (productFeatureTypeIdPar) { context.featureType = featureType; } -allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName], ["productId"]); +allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName], ["productId"], false); productionRuns = [:]; features = []; if (!productFeatureTypeIdPar) { @@ -51,7 +51,7 @@ if (allProductionRuns) { // group by standard feature of type productFeatureTypeIdPar if (productFeatureTypeIdPar) { - standardFeatures = delegator.findByAnd("ProductFeatureAndAppl", [productFeatureTypeId : productFeatureTypeIdPar, productId : productionRun.productId, productFeatureApplTypeId : "STANDARD_FEATURE"]); + standardFeatures = delegator.findByAnd("ProductFeatureAndAppl", [productFeatureTypeId : productFeatureTypeIdPar, productId : productionRun.productId, productFeatureApplTypeId : "STANDARD_FEATURE"], null, false); standardFeatures = EntityUtil.filterByDate(standardFeatures); standardFeature = EntityUtil.getFirst(standardFeatures); standardFeatureId = null; @@ -66,7 +66,7 @@ if (allProductionRuns) { } // select the production run's task of a given name (i.e. type) if any (based on the report's parameter) - productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar]); + productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false); productionRunTask = EntityUtil.getFirst(productionRunTasks); if (!productionRunTask) { // the production run doesn't include the given task, skip it Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsStacks.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsStacks.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsStacks.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsStacks.groovy Mon May 14 21:00:57 2012 @@ -31,7 +31,7 @@ if (productFeatureTypeIdPar) { context.featureType = featureType; } -allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName], ["productId"]); +allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName], ["productId"], false); productionRuns = []; features = [:]; products = [:]; @@ -48,12 +48,12 @@ if (allProductionRuns) { productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false); location = [:]; if (productionRunProduct) { - locations = delegator.findByAnd("ProductFacilityLocation", [facilityId : productionRun.facilityId, productId : productionRun.productId]); + locations = delegator.findByAnd("ProductFacilityLocation", [facilityId : productionRun.facilityId, productId : productionRun.productId], null, false); location = EntityUtil.getFirst(locations); } if (taskNamePar) { // select the production run's task of a given name (i.e. type) if any (based on the report's parameter) - productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId , workEffortName : taskNamePar]); + productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId , workEffortName : taskNamePar], null, false); productionRunTask = EntityUtil.getFirst(productionRunTasks); if (!productionRunTask) { // the production run doesn't include the given task, skip it Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy Mon May 14 21:00:57 2012 @@ -32,12 +32,12 @@ if (productFeatureTypeIdPar) { featureType = delegator.findOne("ProductFeatureType", [productFeatureTypeId : productFeatureTypeIdPar], false); context.featureType = featureType; } -packageContents = delegator.findByAnd("ShipmentPackageContent", [shipmentId : shipmentId]); +packageContents = delegator.findByAnd("ShipmentPackageContent", [shipmentId : shipmentId], null, false); packagesMap = [:]; if (packageContents) { packageContents.each { packageContent -> - orderShipments = delegator.findByAnd("OrderShipment", [shipmentId : shipmentId, shipmentItemSeqId : packageContent.shipmentItemSeqId]); + orderShipments = delegator.findByAnd("OrderShipment", [shipmentId : shipmentId, shipmentItemSeqId : packageContent.shipmentItemSeqId], null, false); orderShipment = EntityUtil.getFirst(orderShipments); orderItem = delegator.findOne("OrderItem", [orderId : orderShipment.orderId, orderItemSeqId : orderShipment.orderItemSeqId], false); product = orderItem.getRelatedOne("Product"); Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy Mon May 14 21:00:57 2012 @@ -26,11 +26,11 @@ shipment = delegator.findOne("Shipment", context.shipmentIdPar = shipment.shipmentId; if (shipment) { - shipmentPackages = delegator.findByAnd("ShipmentPackage", [shipmentId : shipmentId]); + shipmentPackages = delegator.findByAnd("ShipmentPackage", [shipmentId : shipmentId], null, false); records = []; orderReaders = [:]; shipmentPackages.each { shipmentPackage -> - shipmentPackageComponents = delegator.findByAnd("ShipmentPackageContent", [shipmentId : shipmentId, shipmentPackageSeqId : shipmentPackage.shipmentPackageSeqId]); + shipmentPackageComponents = delegator.findByAnd("ShipmentPackageContent", [shipmentId : shipmentId, shipmentPackageSeqId : shipmentPackage.shipmentPackageSeqId], null, false); shipmentPackageComponents.each { shipmentPackageComponent -> shipmentItem = shipmentPackageComponent.getRelatedOne("ShipmentItem"); orderShipments = shipmentItem.getRelated("OrderShipment"); Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy?rev=1338408&r1=1338407&r2=1338408&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentPlanStockReport.groovy Mon May 14 21:00:57 2012 @@ -29,7 +29,7 @@ context.estimatedReadyDatePar = shipment context.estimatedShipDatePar = shipment.estimatedShipDate; records = []; if (shipment) { - shipmentPlans = delegator.findByAnd("OrderShipment", [shipmentId : shipmentId]); + shipmentPlans = delegator.findByAnd("OrderShipment", [shipmentId : shipmentId], null, false); shipmentPlans.each { shipmentPlan -> orderLine = delegator.findOne("OrderItem", [orderId : shipmentPlan.orderId , orderItemSeqId : shipmentPlan.orderItemSeqId], false); recordGroup = [:]; |
Free forum by Nabble | Edit this page |