|
|
@@ -185,8 +185,7 @@ public class PurchaseManage { |
|
|
|
query.eq(Project::getNewest, Boolean.TRUE); |
|
|
|
query.orderByAsc(Project::getApprovalDate); |
|
|
|
Page<Project> page = projectService.page(req.page(), query); |
|
|
|
long total; |
|
|
|
if ((total = page.getTotal()) == 0) { |
|
|
|
if (page.getTotal() == 0) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<Long> projectIds = CollUtils.fieldList(page.getRecords(), Project::getId); |
|
|
@@ -209,10 +208,11 @@ public class PurchaseManage { |
|
|
|
item.setInstCode(w.getInstCode()); |
|
|
|
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg()); |
|
|
|
item.setApprovedAmount(w.getApprovalAmount()); |
|
|
|
item.setReviewAmount(w.getReviewAmount()); |
|
|
|
item.setApprovalDate(w.getApprovalDate()); |
|
|
|
List<Purchase> currPurchases = purchaseMap.get(w.getId()); |
|
|
|
if (currPurchases != null) { |
|
|
|
List<TenderListInfoVO> tmpPurchases = CollUtils.convert(currPurchases, x -> { |
|
|
|
item.setTenders(CollUtils.convert(currPurchases, x -> { |
|
|
|
TenderListInfoVO tender = new TenderListInfoVO(); |
|
|
|
tender.setBidName(x.getBidName()); |
|
|
|
tender.setBidId(x.getId()); |
|
|
@@ -223,12 +223,11 @@ public class PurchaseManage { |
|
|
|
tender.setConstructionAmount(contract.getTotalAmount()); |
|
|
|
} |
|
|
|
return tender; |
|
|
|
}); |
|
|
|
item.setTenders(tmpPurchases); |
|
|
|
})); |
|
|
|
} |
|
|
|
return item; |
|
|
|
}); |
|
|
|
return PageVo.of(records, total); |
|
|
|
return PageVo.of(records, page.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
public void exportList(HttpServletResponse response, ProjectListReq param) { |
|
|
|