|
|
@@ -39,6 +39,7 @@ import com.hz.pm.api.projectdeclared.model.req.*; |
|
|
|
import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseNoticeReq.PurchaseNoticeTenderDTO; |
|
|
|
import com.hz.pm.api.projectdeclared.model.vo.*; |
|
|
|
import com.hz.pm.api.projectdeclared.service.*; |
|
|
|
import com.hz.pm.api.projectlib.entity.PurchaseStatusChange; |
|
|
|
import com.hz.pm.api.projectlib.helper.ProjectManageUtil; |
|
|
|
import com.hz.pm.api.projectlib.model.entity.Project; |
|
|
|
import com.hz.pm.api.projectlib.model.entity.ProjectInst; |
|
|
@@ -49,6 +50,7 @@ import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; |
|
|
|
import com.hz.pm.api.projectlib.model.vo.TenderListInfoVO; |
|
|
|
import com.hz.pm.api.projectlib.service.IProjectInstService; |
|
|
|
import com.hz.pm.api.projectlib.service.IProjectService; |
|
|
|
import com.hz.pm.api.projectlib.service.IPurchaseStatusChangeService; |
|
|
|
import com.hz.pm.api.sys.manage.ProcessModelManage; |
|
|
|
import com.hz.pm.api.user.helper.MhUnitCache; |
|
|
|
import com.hz.pm.api.user.security.model.UserFullInfoDTO; |
|
|
@@ -120,6 +122,7 @@ public class PurchaseManage { |
|
|
|
private final EnvironmentUtil environmentUtil; |
|
|
|
private final IXinchuangService xinchuangService; |
|
|
|
private final MhXchxFileHelper mhXchxFileHelper; |
|
|
|
private final IPurchaseStatusChangeService purchaseStatusChangeService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 待采购的-项目列表 |
|
|
@@ -577,10 +580,24 @@ public class PurchaseManage { |
|
|
|
List<Project> projects = projectService.list(projectQuery); |
|
|
|
Map<Long, Project> projectMap = CollUtils.listToMap(projects, Project::getId); |
|
|
|
Map<Long, Contract> contractMap = contractService.listByProjectIds(projectIds); |
|
|
|
List<Long> finishOrgConfirmBidIds = new ArrayList<>(); |
|
|
|
if (req.getStatus() == null) { |
|
|
|
List<Long> bidIds = CollUtils.fieldList(records, Purchase::getId); |
|
|
|
Wrapper<PurchaseStatusChange> pscQuery = Wrappers.lambdaQuery(PurchaseStatusChange.class) |
|
|
|
.select(PurchaseStatusChange::getBidId) |
|
|
|
.eq(PurchaseStatusChange::getEvent, TenderStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM) |
|
|
|
.in(PurchaseStatusChange::getBidId, bidIds); |
|
|
|
List<PurchaseStatusChange> changes = purchaseStatusChangeService.list(pscQuery); |
|
|
|
changes.forEach(c -> finishOrgConfirmBidIds.add(c.getBidId())); |
|
|
|
} |
|
|
|
List<PurchaseAdaptionListVO> data = records.stream().map(w -> { |
|
|
|
PurchaseAdaptionListVO adaption = new PurchaseAdaptionListVO(); |
|
|
|
adaption.setBidId(w.getId()); |
|
|
|
adaption.setStatus(w.getStatus()); |
|
|
|
if (finishOrgConfirmBidIds.contains(w.getId())) { |
|
|
|
adaption.setStatus(TenderMainStatus.ORG_CONFIRM_PASSED.getCode()); |
|
|
|
} else { |
|
|
|
adaption.setStatus(w.getStatus()); |
|
|
|
} |
|
|
|
adaption.setBizName(w.getBidName()); |
|
|
|
adaption.setProjectId(w.getProjectId()); |
|
|
|
Project project = projectMap.get(w.getProjectId()); |
|
|
|