applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
Avoid deeply nested control flow statements. Open
Open
if ("SALES_ORDER_SHIP".equals(inventoryEventForMRP.getString("mrpEventTypeId"))) {
daysToShip = (productFacility.getLong("daysToShip") != null? productFacility.getLong("daysToShip").intValue(): 0);
}
Method processBomComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static void processBomComponent(String mrpId, GenericValue product, BigDecimal eventQuantity, Timestamp startDate, Map<String, Object> routingTaskStartDate, List<BOMNode> listComponent) {
Avoid deeply nested control flow statements. Open
Open
if (UtilValidate.isEmpty(requiredByDate)) {
requiredByDate = genericResult.getTimestamp("oiEstimatedDeliveryDate");
if (requiredByDate == null) {
requiredByDate = notAssignedDate;
}
Method logMrpError
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static void logMrpError(String mrpId, String productId, Timestamp eventDate, String errorMessage, Delegator delegator) {
Method findProductMrpQoh
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static BigDecimal findProductMrpQoh(String mrpId, String productId, String facilityId, LocalDispatcher dispatcher, Delegator delegator) {
Method findProductMrpQoh
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static BigDecimal findProductMrpQoh(String mrpId, GenericValue product, String facilityId, LocalDispatcher dispatcher, Delegator delegator) {
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventProblemInitializing", UtilMisc.toMap("mrpEventTypeId", "MANUF_ORDER_RECP"), locale) + " " + e.getMessage());
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventRemoveError", locale));
Avoid too many return
statements within this method. Open
Open
return result;
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(serviceResponse));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCreateOrUpdateEvent", UtilMisc.toMap("parameters", parameters), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventProblemInitializing", UtilMisc.toMap("mrpEventTypeId", "PUR_ORDER_RECP"), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventProblemInitializing", UtilMisc.toMap("mrpEventTypeId", "SALES_ORDER_SHIP"), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventProblemInitializing", UtilMisc.toMap("mrpEventTypeId", "SALES_FORECAST"), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindSalesForecasts", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpFacilityOrManufacturingFacilityNotAvailable", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventProblemInitializing", UtilMisc.toMap("mrpEventTypeId", "MANUF_ORDER_REQ"), locale) + " " + e.getMessage());
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
Avoid too many return
statements within this method. Open
Open
return result;
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindSalesForecastDetails", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventProblemInitializing", UtilMisc.toMap("mrpEventTypeId", "REQUIRED_MRP"), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpErrorExplodingProduct", UtilMisc.toMap("productId", product.getString("productId")), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindProductForEvent", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindProductFacility", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventProblemInitializing", UtilMisc.toMap("mrpEventTypeId", "PROD_REQ_RECP"), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpErrorRunningInitMrpEvents", UtilMisc.toMap("errorString", e.getMessage()), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpErrorForBomLevel", UtilMisc.toMap("bomLevel", bomLevelToString.toString(), "errorString", e.getMessage()), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindProductForEvent", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCreateOrUpdateEvent", UtilMisc.toMap("parameters", parameters), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpErrorExplodingProduct", UtilMisc.toMap("productId", product.getString("productId")), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotCountRecords", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(ServiceUtil.getErrorMessage(serviceResponse));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpErrorExplodingProduct", UtilMisc.toMap("productId", product.getString("productId")), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpErrorExplodingProduct", UtilMisc.toMap("productId", product.getString("productId")), locale));
Avoid too many return
statements within this method. Open
Open
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindCustomTimePeriod", locale));