Merge branch 'feature/SUPPORT-8810_fix' into develop
This commit is contained in:
commit
74ce6e2229
3 changed files with 15 additions and 9 deletions
|
|
@ -21,7 +21,8 @@ public class ConfigExecutorRpcService extends Behavior {
|
||||||
}
|
}
|
||||||
|
|
||||||
@RpcCall
|
@RpcCall
|
||||||
public String callConfigExecutor(String methodPath, ConfigExecuteRequest configExecuteRequest) {
|
public String callConfigExecutor(String methodPath, ConfigExecuteRequest configExecuteRequest,
|
||||||
return configExecutorService.call(methodPath, configExecuteRequest);
|
boolean withDate) {
|
||||||
|
return configExecutorService.call(methodPath, configExecuteRequest, withDate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,15 +63,16 @@ public class ConfigExecutorService {
|
||||||
return fileModel;
|
return fileModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String call(String methodPath, ConfigExecuteRequest configExecuteRequest) {
|
public String call(String methodPath, ConfigExecuteRequest configExecuteRequest,
|
||||||
|
boolean withDate) {
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||||
HttpEntity<?> entity;
|
HttpEntity<?> entity;
|
||||||
if (configExecuteRequest.getStartDate() == null && configExecuteRequest.getStartDate() == null) {
|
if (withDate) {
|
||||||
entity = new HttpEntity<>(configExecuteRequest.getIds(), headers);
|
entity = new HttpEntity<>(configExecuteRequest, headers);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
entity = new HttpEntity<>(configExecuteRequest, headers);
|
entity = new HttpEntity<>(configExecuteRequest.getIds(), headers);
|
||||||
}
|
}
|
||||||
LOGGER.info("Starts call config executor service with method: {}, for request: {}", methodPath,
|
LOGGER.info("Starts call config executor service with method: {}, for request: {}", methodPath,
|
||||||
configExecuteRequest
|
configExecuteRequest
|
||||||
|
|
|
||||||
|
|
@ -51,11 +51,15 @@ export class ConfigExecuteBtn extends AbstractButton {
|
||||||
.map(id => id.trim().replace(/"/g, ''));
|
.map(id => id.trim().replace(/"/g, ''));
|
||||||
|
|
||||||
let configExecuteRequest: ConfigExecuteRequest = new ConfigExecuteRequest();
|
let configExecuteRequest: ConfigExecuteRequest = new ConfigExecuteRequest();
|
||||||
|
let withDate = false;
|
||||||
configExecuteRequest.ids = ids;
|
configExecuteRequest.ids = ids;
|
||||||
configExecuteRequest.startDate = this.startDate ? this.startDate.getDateValue() : null;
|
if (this.startDate || this.endDate) {
|
||||||
configExecuteRequest.endDate = this.endDate ? this.endDate.getDateValue() : null;
|
withDate = true;
|
||||||
|
configExecuteRequest.startDate = this.startDate ? this.startDate.getDateValue() : null;
|
||||||
|
configExecuteRequest.endDate = this.endDate ? this.endDate.getDateValue() : null;
|
||||||
|
}
|
||||||
|
|
||||||
return this.script.callConfigExecutor(this.methodPath, configExecuteRequest, true)
|
return this.script.callConfigExecutor(this.methodPath, configExecuteRequest, withDate, true)
|
||||||
.then(successMsg => this.messagesService.success(successMsg))
|
.then(successMsg => this.messagesService.success(successMsg))
|
||||||
.catch(error => Promise.reject(error));
|
.catch(error => Promise.reject(error));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue