Displaying differences for changeset
 
display as  

src/java/m/wqm/nutappmgtscores/V1_0.java

@@ -55,7 +55,6 @@
             Map<String, JSONObject> mgtCropId = JSONUtils.preprocess(cropIds.getJSONArray(i));
 
             int cropId = JSONUtils.getIntParam(mgtCropId, "mgt_crop_id", 0);
-            boolean lmod = JSONUtils.getBooleanParam(mgtCropId, "from_lmod", false);
             String cropPlantDate = JSONUtils.getStringParam(mgtCropId, "crop_plant_date", "err");
             double cropYield = JSONUtils.getDoubleParam(mgtCropId, "crop_yield", 0);
             String cropYieldUnits = JSONUtils.getStringParam(mgtCropId, "crop_yield_units", "err");
@@ -75,7 +74,7 @@
                 }
                 nutrientApplicationList.add(new Nutrient(nutrient_application_date, incorporated, nutrientAppliedList));
             }
-            cropList.add(new Crop(cropId, lmod, cropPlantDate, cropYield, cropYieldUnits, nutrientApplicationList));
+            cropList.add(new Crop(cropId, cropPlantDate, cropYield, cropYieldUnits, nutrientApplicationList));
         }
         input.add(new m.wqm.nutappmgtscores.Input(AoAId, cropList, p_soil_test_result));
     }
@@ -103,16 +102,7 @@
                 ArrayList<Crop> cropList = ip.getCropList();
                 for (Crop crop : cropList) {
                     ArrayList<Nutrient> nutrientApplicationList = crop.getNutrientApplicationList();
-                    //#If request payload crop is an LMOD vegetation, then convert it to a wqm_crop using the link table
-                    if (crop.getLmod()) {
-                        query = "SELECT wqm_crop_id FROM wqm_lmod_crop_link WHERE lmod_crop_id=" + crop.getMgtCropId() + ";";
-                        resultSet = statement.executeQuery(query);
-                        while (resultSet.next()) {
-                            this_crop_id = resultSet.getInt("wqm_crop_id");
-                        }
-                    } else {
-                        this_crop_id = crop.getMgtCropId();
-                    }
+                    this_crop_id = crop.getMgtCropId();
 
                     //#Determine crop type of the crop
                     query = "SELECT wqm_crop_type FROM wqm_crops WHERE wqm_crop_id=" + this_crop_id + ";";

src/java/m/wqm/nutappmgtscores/V1_0.json

@@ -23,11 +23,6 @@
                         "value": 121
                     },
                     {
-                        "name": "from_lmod",
-                        "value": false,
-                        "Description": "LMOD Source Indicator, True means the source of the mgt_crop_id is from LMOD"
-                    },
-                    {
                         "name": "crop_plant_date",
                         "value": "2015-09-10",
                         "Description": "Crop Planting Date (Year-Month-Day), null if fallow “crop” period"
@@ -122,11 +117,6 @@
                         "value": 89
                     },
                     {
-                        "name": "from_lmod",
-                        "value": false,
-                        "Description": "LMOD Source Indicator, True means the source of the mgt_crop_id is from LMOD"
-                    },
-                    {
                         "name": "crop_plant_date",
                         "value": "2017-05-25",
                         "Description": "Crop Planting Date (Year-Month-Day), null if fallow “crop” period"