diff --git a/src/main/java/stockManagement/push/Shipping.java b/src/main/java/stockManagement/push/Shipping.java index e7ab527..0fd2f0b 100644 --- a/src/main/java/stockManagement/push/Shipping.java +++ b/src/main/java/stockManagement/push/Shipping.java @@ -21,15 +21,15 @@ @State private Map.Entry value; @PUT - @Message("deriver") - public void updateDeriver(@FormParam("deriver") String deriver_json) throws JsonProcessingException { - Map.Entry> deriver; + @Message("handling") + public void updateHandling(@FormParam("handling") String handling_json) throws JsonProcessingException { + Map.Entry> handling; { - Map> i = new ObjectMapper().readValue(deriver_json, HashMap.class); - deriver = new AbstractMap.SimpleEntry<>(i.entrySet().iterator().next().getKey(), + Map> i = new ObjectMapper().readValue(handling_json, HashMap.class); + handling = new AbstractMap.SimpleEntry<>(i.entrySet().iterator().next().getKey(), new AbstractMap.SimpleEntry<>(Integer.parseInt(i.entrySet().iterator().next().getValue().entrySet().iterator().next().getKey()), i.entrySet().iterator().next().getValue().entrySet().iterator().next().getValue())); } - this.value = new AbstractMap.SimpleEntry<>(deriver.getKey(), deriver.getValue().getKey()); + this.value = new AbstractMap.SimpleEntry<>(handling.getKey(), handling.getValue().getKey()); } @Produces(MediaType.APPLICATION_JSON) @GET