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