fix total pengadaan in response
This commit is contained in:
parent
d30a8ca6be
commit
b648b3d7bf
@ -23,6 +23,10 @@ public interface DrpView {
|
|||||||
Date getPrintDate();
|
Date getPrintDate();
|
||||||
void setPrintDate(Date printDate);
|
void setPrintDate(Date printDate);
|
||||||
|
|
||||||
|
Integer getTotalPengadaan();
|
||||||
|
void setTotalPengadaan(Integer totalPengadaan);
|
||||||
|
|
||||||
|
|
||||||
Boolean getIsActive();
|
Boolean getIsActive();
|
||||||
void setIsActive(Boolean isActive);
|
void setIsActive(Boolean isActive);
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ public class DrpResponse extends BaseResponse {
|
|||||||
private Date approveDate;
|
private Date approveDate;
|
||||||
private Boolean isActive;
|
private Boolean isActive;
|
||||||
private Boolean isDelete;
|
private Boolean isDelete;
|
||||||
|
private Integer totalPengadaan;
|
||||||
|
|
||||||
private List<DrpDokumenResponse> dataDrpDokumen;
|
private List<DrpDokumenResponse> dataDrpDokumen;
|
||||||
|
|
||||||
|
@ -25,10 +25,12 @@ public interface DrpRepository extends JpaRepository<Drp, Long> {
|
|||||||
"d.approveStatus as approveStatus, " +
|
"d.approveStatus as approveStatus, " +
|
||||||
"d.approveDate as approveDate, " +
|
"d.approveDate as approveDate, " +
|
||||||
"d.isActive as isActive, " +
|
"d.isActive as isActive, " +
|
||||||
"d.isDelete as isDelete " +
|
"d.isDelete as isDelete, " +
|
||||||
|
"count(dp.drpId) as totalPengadaan " +
|
||||||
"FROM Drp d " +
|
"FROM Drp d " +
|
||||||
|
"LEFT JOIN DrpPengadaan dp ON dp.drpId = d.id " +
|
||||||
"WHERE d.isDelete = false " +
|
"WHERE d.isDelete = false " +
|
||||||
// "AND (:approveDate = '' or DATE(d.approveDate) = DATE(approveDate)) " +
|
"GROUP BY d.id " +
|
||||||
"ORDER BY d.id")
|
"ORDER BY d.id")
|
||||||
Page<DrpView> findByIsDeleteFalse(Timestamp approveDate,
|
Page<DrpView> findByIsDeleteFalse(Timestamp approveDate,
|
||||||
Pageable pageable);
|
Pageable pageable);
|
||||||
|
@ -33,6 +33,7 @@ public class GetListDrpService implements BaseService<DrpRequest, GetListDrpResp
|
|||||||
.tahun(drpView.getTahun())
|
.tahun(drpView.getTahun())
|
||||||
.approveStatus(drpView.getApproveStatus())
|
.approveStatus(drpView.getApproveStatus())
|
||||||
.approveDate(drpView.getApproveDate())
|
.approveDate(drpView.getApproveDate())
|
||||||
|
.totalPengadaan(drpView.getTotalPengadaan())
|
||||||
.isActive(drpView.getIsActive())
|
.isActive(drpView.getIsActive())
|
||||||
.isDelete(drpView.getIsDelete())
|
.isDelete(drpView.getIsDelete())
|
||||||
.build();
|
.build();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user