This commit is contained in:
dirgantarasiahaan
2023-06-03 18:40:21 +07:00
parent 37a06b00f1
commit dbbde49f59
15 changed files with 351 additions and 6 deletions

View File

@@ -24,6 +24,7 @@ public class ApprovalDrpController {
private PostDrpApprovalExecutionService postDrpApprovalExecutionService;
private GetApprovalService getApprovalService;
private GetListRekomendasiService getListRekomendasiService;
private GetHistoryApprovalService getHistoryApprovalService;
public ApprovalDrpController(GetListUserVpService getListUserVpService,
GetListUserDirekturKomiteService getListUserDirekturKomiteService,
PostCreateDrpApprovalService postCreateDrpApprovalService,
@@ -31,7 +32,8 @@ public class ApprovalDrpController {
PostDrpRekomendasiService postDrpRekomendasiService,
PostDrpApprovalExecutionService postDrpApprovalExecutionService,
GetApprovalService getApprovalService,
GetListRekomendasiService getListRekomendasiService) {
GetListRekomendasiService getListRekomendasiService,
GetHistoryApprovalService getHistoryApprovalService) {
this.getListUserVpService = getListUserVpService;
this.getListUserDirekturKomiteService = getListUserDirekturKomiteService;
this.postCreateDrpApprovalService = postCreateDrpApprovalService;
@@ -40,6 +42,7 @@ public class ApprovalDrpController {
this.postDrpApprovalExecutionService = postDrpApprovalExecutionService;
this.getApprovalService = getApprovalService;
this.getListRekomendasiService = getListRekomendasiService;
this.getHistoryApprovalService = getHistoryApprovalService;
}
@GetMapping("/vp")
@@ -101,4 +104,11 @@ public class ApprovalDrpController {
return getListRekomendasiService.execute(drpRekomendasiRequest);
}
@GetMapping("/{id}/history")
public GetListDrpApprovalHistoryResponse getListDrpApprovalResponse(@PathVariable(name = "id") Long id) {
return getHistoryApprovalService.execute(DrpApprovalRequest.builder()
.drpId(id)
.build());
}
}