Maj Vers 7.10
This commit is contained in:
parent
7a3881ea4c
commit
9650ba55e9
4 changed files with 17 additions and 5 deletions
|
|
@ -34,12 +34,14 @@ public class QuoteController {
|
||||||
@Resource
|
@Resource
|
||||||
private UsedRestAPI serviceCalculate;
|
private UsedRestAPI serviceCalculate;
|
||||||
|
|
||||||
@RequestMapping(value = "/calculate/{containerId}", method = RequestMethod.PUT)
|
@RequestMapping(value = "/calculate/{containerId:.+}/{className:.+}", method = RequestMethod.PUT)
|
||||||
public Quote storeTicket(@PathVariable("containerId") String containerid,
|
public Quote storeTicket(@PathVariable("containerId") String containerid,
|
||||||
|
@PathVariable("className") String className,
|
||||||
@RequestBody Quote quoteRequest) {
|
@RequestBody Quote quoteRequest) {
|
||||||
Quote response = null;
|
Quote response = null;
|
||||||
try {
|
try {
|
||||||
response = (Quote) serviceCalculate.runSession(containerid, "swimmingpool.P000", Quote.class.getCanonicalName(), quoteRequest);
|
// response = (Quote) serviceCalculate.runSession(containerid, "swimmingpool.P000", Quote.class.getCanonicalName(), quoteRequest);
|
||||||
|
response = (Quote) serviceCalculate.runSession(containerid, "swimmingpool.P000", className, quoteRequest);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ productManagerModule.controller('quoteManagerController', function ($scope, $htt
|
||||||
$http.defaults.headers.post["Content-Type"] = "application/json";
|
$http.defaults.headers.post["Content-Type"] = "application/json";
|
||||||
$scope.allSessionExecutionDetails = [];
|
$scope.allSessionExecutionDetails = [];
|
||||||
$scope.containerid = "dev";
|
$scope.containerid = "dev";
|
||||||
|
$scope.aClassName = "org.training.leisure.swimmingpool.Quote";
|
||||||
var _lastGoodResult = '';
|
var _lastGoodResult = '';
|
||||||
$scope.toPrettyJSON = function (objStr, tabWidth) {
|
$scope.toPrettyJSON = function (objStr, tabWidth) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -106,7 +107,7 @@ productManagerModule.controller('quoteManagerController', function ($scope, $htt
|
||||||
|
|
||||||
$scope.calculatePrice = function () {
|
$scope.calculatePrice = function () {
|
||||||
var myQuote = $scope.quote;
|
var myQuote = $scope.quote;
|
||||||
$http.put(urlBase + "/swimmingpool-web/quote/calculate/" + $scope.containerid, myQuote).success(function (data) {
|
$http.put(urlBase + "/swimmingpool-web/quote/calculate/" + $scope.containerid + "/" + $scope.aClassName, myQuote).success(function (data) {
|
||||||
$scope.quoteResult = data;
|
$scope.quoteResult = data;
|
||||||
$scope.allSessionExecutionDetails = JSON.parse(data.sessionLogging);
|
$scope.allSessionExecutionDetails = JSON.parse(data.sessionLogging);
|
||||||
$scope.sessionLogging = JSON.stringify($scope.allSessionExecutionDetails, null, 3);
|
$scope.sessionLogging = JSON.stringify($scope.allSessionExecutionDetails, null, 3);
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,16 @@
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="containerid" class="control-label">Container id :</label></td>
|
<td><label for="containerid" class="control-label">Container id :</label></td>
|
||||||
<td><input id="containerid" type="text" ng-model="containerid" ng-maxlength="10"/></td>
|
<td><input id="containerid" type="text" ng-model="containerid" ng-maxlength="30"/></td>
|
||||||
|
|
||||||
|
<td><label for="aClassName" class="control-label">Class name :</label></td>
|
||||||
|
<td><input id="aClassName" type="text" ng-model="aClassName" ng-maxlength="50"/></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
<td><label for="quote-date" class="control-label">Quote date :</label></td>
|
<td><label for="quote-date" class="control-label">Quote date :</label></td>
|
||||||
<td><input id="quote-date" type="date" ng-model="quote.quoteDate" ng-maxlength="10"/></td>
|
<td><input id="quote-date" type="date" ng-model="quote.quoteDate" ng-maxlength="10"/></td>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@ public class GenericRestAPIImpl implements UsedRestAPI {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (responseJson != null) {
|
||||||
response = mapper.readValue(responseJson, objectRequest.getClass());
|
response = mapper.readValue(responseJson, objectRequest.getClass());
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("GenericRestAPIImpl.runSession.readValue", e);
|
logger.error("GenericRestAPIImpl.runSession.readValue", e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue