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