add parameter dates

This commit is contained in:
kochetkov 2024-11-21 12:57:06 +03:00
parent 601846594c
commit afd252f83b
3 changed files with 7413 additions and 0 deletions

View file

@ -1,11 +1,16 @@
package dto;
import java.time.LocalDate;
import java.util.List;
public class ExportDataRequest {
public String type;
public List<String> ids;
public LocalDate startDate;
public LocalDate endDate;
public String getType() {
return type;
}
@ -21,4 +26,20 @@ public class ExportDataRequest {
public void setIds(List<String> 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

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@ import {
MessagesService,
NotNull,
ObjectRef,
DateTimePicker,
TextArea
} from "@webbpm/base-package";
import {ExportDataRpcService} from "../generated/rpc/ExportDataRpcService";
@ -31,6 +32,12 @@ export class ExportDataBtn extends AbstractButton {
@NotNull()
public ervuIdsField: TextArea;
@ObjectRef()
public startDate: DateTimePicker;
@ObjectRef()
public endDate: DateTimePicker;
private rpc: ExportDataRpcService;
private messagesService: MessagesService;
@ -55,6 +62,8 @@ export class ExportDataBtn extends AbstractButton {
let exportDataRequest = new ExportDataRequest();
exportDataRequest.ids = ids;
exportDataRequest.type = type;
exportDataRequest.startDate = this.startDate ? this.startDate.getDateValue() : null;
exportDataRequest.endDate = this.endDate ? this.endDate.getDateValue() : null;
return this.rpc.exportData(exportDataRequest)
.then((data: FileModel) => {
FileUtils.downloadFile(data.fileName, data.fileContent);