|
|
@ -2182,7 +2182,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl |
|
|
|
|
|
|
|
|
|
|
|
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId); |
|
|
|
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId); |
|
|
|
String jsonToVersioning = dettPratica.serializeToVersioning(); |
|
|
|
String jsonToVersioning = dettPratica.serializeToVersioning(); |
|
|
|
|
|
|
|
|
|
|
|
JSONObject response = HttpServiceUtil.postJson(url, jsonToVersioning); |
|
|
|
JSONObject response = HttpServiceUtil.postJson(url, jsonToVersioning); |
|
|
|
int version = response.getInt("version"); |
|
|
|
int version = response.getInt("version"); |
|
|
|
dettPratica.setVersion(version); |
|
|
|
dettPratica.setVersion(version); |
|
|
@ -2216,7 +2216,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl |
|
|
|
JSONObject snapshot = jsonObjectResponse.getJSONObject("Snapshot"); |
|
|
|
JSONObject snapshot = jsonObjectResponse.getJSONObject("Snapshot"); |
|
|
|
int responseVersion = snapshot.getInt("version"); |
|
|
|
int responseVersion = snapshot.getInt("version"); |
|
|
|
if (responseVersion != version) { |
|
|
|
if (responseVersion != version) { |
|
|
|
_log.error("Le versioni non corrispondono"); |
|
|
|
_log.error("Le versioni non corrispondono " + responseVersion + "/" + version); |
|
|
|
} |
|
|
|
} |
|
|
|
JSONObject jsonFields = snapshot.getJSONObject("fields"); |
|
|
|
JSONObject jsonFields = snapshot.getJSONObject("fields"); |
|
|
|
for (String hiddenField : PraticaUtil.getDettPraticaHiddenFields()) { |
|
|
|
for (String hiddenField : PraticaUtil.getDettPraticaHiddenFields()) { |
|
|
@ -2239,6 +2239,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
_log.error(options.getLocation() + ": " + options.getResponse().getResponseCode()); |
|
|
|
_log.error(options.getLocation() + ": " + options.getResponse().getResponseCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// return "{\"values\":[],\"Snapshot\":{\"version\":0,\"fields\":{}}}";
|
|
|
|
return StringPool.BLANK; |
|
|
|
return StringPool.BLANK; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|