add parameter dates
This commit is contained in:
parent
601846594c
commit
afd252f83b
3 changed files with 7413 additions and 0 deletions
|
|
@ -1,11 +1,16 @@
|
||||||
package dto;
|
package dto;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ExportDataRequest {
|
public class ExportDataRequest {
|
||||||
public String type;
|
public String type;
|
||||||
public List<String> ids;
|
public List<String> ids;
|
||||||
|
|
||||||
|
public LocalDate startDate;
|
||||||
|
|
||||||
|
public LocalDate endDate;
|
||||||
|
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
@ -21,4 +26,20 @@ public class ExportDataRequest {
|
||||||
public void setIds(List<String> ids) {
|
public void setIds(List<String> ids) {
|
||||||
this.ids = ids;
|
this.ids = ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDate getStartDate() {
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartDate(LocalDate startDate) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getEndDate() {
|
||||||
|
return endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndDate(LocalDate endDate) {
|
||||||
|
this.endDate = endDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
7383
frontend/package-lock.json
generated
Normal file
7383
frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -7,6 +7,7 @@ import {
|
||||||
MessagesService,
|
MessagesService,
|
||||||
NotNull,
|
NotNull,
|
||||||
ObjectRef,
|
ObjectRef,
|
||||||
|
DateTimePicker,
|
||||||
TextArea
|
TextArea
|
||||||
} from "@webbpm/base-package";
|
} from "@webbpm/base-package";
|
||||||
import {ExportDataRpcService} from "../generated/rpc/ExportDataRpcService";
|
import {ExportDataRpcService} from "../generated/rpc/ExportDataRpcService";
|
||||||
|
|
@ -31,6 +32,12 @@ export class ExportDataBtn extends AbstractButton {
|
||||||
@NotNull()
|
@NotNull()
|
||||||
public ervuIdsField: TextArea;
|
public ervuIdsField: TextArea;
|
||||||
|
|
||||||
|
@ObjectRef()
|
||||||
|
public startDate: DateTimePicker;
|
||||||
|
|
||||||
|
@ObjectRef()
|
||||||
|
public endDate: DateTimePicker;
|
||||||
|
|
||||||
private rpc: ExportDataRpcService;
|
private rpc: ExportDataRpcService;
|
||||||
private messagesService: MessagesService;
|
private messagesService: MessagesService;
|
||||||
|
|
||||||
|
|
@ -55,6 +62,8 @@ export class ExportDataBtn extends AbstractButton {
|
||||||
let exportDataRequest = new ExportDataRequest();
|
let exportDataRequest = new ExportDataRequest();
|
||||||
exportDataRequest.ids = ids;
|
exportDataRequest.ids = ids;
|
||||||
exportDataRequest.type = type;
|
exportDataRequest.type = type;
|
||||||
|
exportDataRequest.startDate = this.startDate ? this.startDate.getDateValue() : null;
|
||||||
|
exportDataRequest.endDate = this.endDate ? this.endDate.getDateValue() : null;
|
||||||
return this.rpc.exportData(exportDataRequest)
|
return this.rpc.exportData(exportDataRequest)
|
||||||
.then((data: FileModel) => {
|
.then((data: FileModel) => {
|
||||||
FileUtils.downloadFile(data.fileName, data.fileContent);
|
FileUtils.downloadFile(data.fileName, data.fileContent);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue