|
@@ -82,7 +82,8 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
|
|
|
@Autowired
|
|
|
private PmBookBuildingService pmBookBuildingService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private PmCallQuestionService pmCallQuestionService;
|
|
|
@Autowired
|
|
|
private PmBidWinningService pmBidWinningService;
|
|
|
@Autowired
|
|
@@ -127,7 +128,10 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
private PmAuditDeptRefService pmAuditDeptRefService;
|
|
|
@Autowired
|
|
|
private ProvisionalPlanMapper provisionalPlanMapper;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private PmExpertFeedbackService pmExpertFeedbackService;
|
|
|
+ @Autowired
|
|
|
+ private PmProcurementDocumentsReviewService pmProcurementDocumentsReviewService;
|
|
|
/**
|
|
|
* 查询采购需求
|
|
|
*
|
|
@@ -249,17 +253,48 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
}
|
|
|
} else if ("4".equals(detailType)) { //中标信息
|
|
|
PmPurchaseExecutionResVo pmPurchaseExecutionResVo = new PmPurchaseExecutionResVo();
|
|
|
- List<SysFileInfo> fileInfosAll = new ArrayList<>();
|
|
|
+
|
|
|
//代理商信息
|
|
|
BaseAgency baseAgency = this.baseAgencyService.getById(pmDemand.getAgencyId());
|
|
|
pmPurchaseExecutionResVo.setBaseAgency(baseAgency);
|
|
|
|
|
|
- //发布公告列表
|
|
|
+ //专家意见反馈
|
|
|
+ LambdaQueryWrapper<PmExpertFeedback> pmExpertFeedbackLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ pmExpertFeedbackLambdaQueryWrapper.eq(PmExpertFeedback::getDemandId,demandId);
|
|
|
+ PmExpertFeedback pmExpertFeedback = pmExpertFeedbackService.getOne(pmExpertFeedbackLambdaQueryWrapper);
|
|
|
+ if(!ObjectUtils.isEmpty(pmExpertFeedback)){
|
|
|
+ PmExpertFeedbackResVo pmExpertFeedbackResVo = new PmExpertFeedbackResVo();
|
|
|
+ BeanUtils.copyProperties(pmExpertFeedback,pmExpertFeedbackResVo);
|
|
|
+
|
|
|
+ List<SysFileInfo> fileInfos = getSysFileInfoList(pmExpertFeedbackResVo.getId(), SysFileRefEnum.PM_EXPERT_FEEDBACK.getType());
|
|
|
+ if (!ObjectUtils.isEmpty(fileInfos)) {
|
|
|
+ pmExpertFeedbackResVo.setFileInfos(fileInfos);
|
|
|
+ }
|
|
|
+ pmPurchaseExecutionResVo.setPmExpertFeedbackResVo(pmExpertFeedbackResVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ //采购文件编制审核
|
|
|
+ LambdaQueryWrapper<PmProcurementDocumentsReview> pmProcurementDocumentsReviewLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ pmProcurementDocumentsReviewLambdaQueryWrapper.eq(PmProcurementDocumentsReview::getDemandId,demandId);
|
|
|
+ PmProcurementDocumentsReview pmProcurementDocumentsReview = pmProcurementDocumentsReviewService.getOne(pmProcurementDocumentsReviewLambdaQueryWrapper);
|
|
|
+ if(!ObjectUtils.isEmpty(pmProcurementDocumentsReview)){
|
|
|
+ PmProcurementDocumentsReviewResVo pmProcurementDocumentsReviewResVo = new PmProcurementDocumentsReviewResVo();
|
|
|
+ BeanUtils.copyProperties(pmProcurementDocumentsReview,pmProcurementDocumentsReviewResVo);
|
|
|
+
|
|
|
+ List<SysFileInfo> fileInfos = getSysFileInfoList(pmProcurementDocumentsReviewResVo.getId(), SysFileRefEnum.PM_BID_FILE.getType());
|
|
|
+ if (!ObjectUtils.isEmpty(fileInfos)) {
|
|
|
+ pmProcurementDocumentsReviewResVo.setFileInfos(fileInfos);
|
|
|
+ }
|
|
|
+ pmPurchaseExecutionResVo.setPmProcurementDocumentsReviewResVo(pmProcurementDocumentsReviewResVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ //采购公告列表
|
|
|
LambdaQueryWrapper<PmReleaseAnnouncement> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
lambdaQueryWrapper.eq(PmReleaseAnnouncement::getDemandId, demandId);
|
|
|
List<PmReleaseAnnouncement> pmReleaseAnnouncementList = this.pmReleaseAnnouncementService.list(lambdaQueryWrapper);
|
|
|
if (!ObjectUtils.isEmpty(pmReleaseAnnouncementList)) {
|
|
|
List<PmReleaseAnnouncementResVo> pmReleaseAnnouncementResVoList = new ArrayList<>();
|
|
|
+ List<SysFileInfo> fileInfosAll = new ArrayList<>();
|
|
|
for (PmReleaseAnnouncement pmReleaseAnnouncement : pmReleaseAnnouncementList) {
|
|
|
PmReleaseAnnouncementResVo pmReleaseAnnouncementResVo = new PmReleaseAnnouncementResVo();
|
|
|
BeanUtils.copyProperties(pmReleaseAnnouncement, pmReleaseAnnouncementResVo);
|
|
@@ -270,9 +305,31 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
}
|
|
|
pmReleaseAnnouncementResVoList.add(pmReleaseAnnouncementResVo);
|
|
|
}
|
|
|
+ pmPurchaseExecutionResVo.setPmReleaseAnnouncementFileInfos(fileInfosAll);
|
|
|
pmPurchaseExecutionResVo.setPmReleaseAnnouncementResVoList(pmReleaseAnnouncementResVoList);
|
|
|
}
|
|
|
|
|
|
+ //标前质疑投诉
|
|
|
+ LambdaQueryWrapper<PmCallQuestion> pmCallQuestionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ pmCallQuestionLambdaQueryWrapper.eq(PmCallQuestion::getDemandId,demandId)
|
|
|
+ .eq(PmCallQuestion::getType,'0').orderByDesc(PmCallQuestion::getCallQuestionTime);
|
|
|
+ List<PmCallQuestion> pmCallQuestionList = pmCallQuestionService.list(pmCallQuestionLambdaQueryWrapper);
|
|
|
+ if(!ObjectUtils.isEmpty(pmCallQuestionList)){
|
|
|
+ List<PmCallQuestionResVo> pmCallQuestionResVoList = new ArrayList<>();
|
|
|
+ List<SysFileInfo> fileInfosAll = new ArrayList<>();
|
|
|
+ for(PmCallQuestion pmCallQuestion : pmCallQuestionList){
|
|
|
+ PmCallQuestionResVo pmCallQuestionResVo = new PmCallQuestionResVo();
|
|
|
+ BeanUtils.copyProperties(pmCallQuestion,pmCallQuestionResVo);
|
|
|
+ List<SysFileInfo> fileInfos = getSysFileInfoList(pmCallQuestionResVo.getId(), SysFileRefEnum.PM_PRE_BID_CALL_QUESTION.getType());
|
|
|
+ if (!ObjectUtils.isEmpty(fileInfos)) {
|
|
|
+ fileInfosAll.addAll(fileInfos);
|
|
|
+ }
|
|
|
+ pmCallQuestionResVoList.add(pmCallQuestionResVo);
|
|
|
+ }
|
|
|
+ pmPurchaseExecutionResVo.setPmCallQuestionPreResVoList(pmCallQuestionResVoList);
|
|
|
+ pmPurchaseExecutionResVo.setPmCallQuestionPreFileInfos(fileInfosAll);
|
|
|
+ }
|
|
|
+
|
|
|
//专家信息列表
|
|
|
List<PmBaseExpertResVo> pmBaseExpertResVoList = this.pmDemandExpertRefService.getPmBaseExpertResVoList(demandId);
|
|
|
pmPurchaseExecutionResVo.setPmBaseExpertResVoList(pmBaseExpertResVoList);
|
|
@@ -281,7 +338,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
List<PmBidOpeningResVo> pmBidOpeningResVoList = this.pmBidOpeningService.getPmBidOpeningResVoList(demandId);
|
|
|
pmPurchaseExecutionResVo.setPmBidOpeningResVoList(pmBidOpeningResVoList);
|
|
|
|
|
|
- //中标信息列表
|
|
|
+ //评标结果公告列表
|
|
|
LambdaQueryWrapper<PmBidWinning> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
lambdaQueryWrapper1.eq(PmBidWinning::getDemandId, demandId)
|
|
|
.eq(PmBidWinning::getStatus, BidWinningStatus.NORMAL.getCode());
|
|
@@ -293,6 +350,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
List<PmBidWinningOpeningRef> pmBidWinningOpeningRefList = this.pmBidWinningOpeningRefService.list(lambdaQueryWrapper2);
|
|
|
if (!ObjectUtils.isEmpty(pmBidWinningOpeningRefList)) {
|
|
|
List<PmBidWinningResVo> pmBidWinningResVoList = new ArrayList<>();
|
|
|
+ List<SysFileInfo> fileInfosAll = new ArrayList<>();
|
|
|
for (PmBidWinningOpeningRef pmBidWinningOpeningRef : pmBidWinningOpeningRefList) {
|
|
|
PmBidOpening pmBidOpening = this.pmBidOpeningService.getById(pmBidWinningOpeningRef.getOpeningId());
|
|
|
if (pmBidOpening != null) {
|
|
@@ -309,23 +367,40 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
|
|
|
}
|
|
|
pmPurchaseExecutionResVo.setPmBidWinningResVoList(pmBidWinningResVoList);
|
|
|
+ pmPurchaseExecutionResVo.setPmBidWinningFileInfos(fileInfosAll);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- pmPurchaseExecutionResVo.setCallQuestion(pmDemand.getCallQuestion());
|
|
|
-
|
|
|
- //质疑情况
|
|
|
- List<SysFileInfo> callRequestFileInfos = getSysFileInfoList(vo.getDemandId(), SysFileRefEnum.PM_BID_CALL_QEUSTION_FILE.getType());
|
|
|
- if (!ObjectUtils.isEmpty(callRequestFileInfos)) {
|
|
|
- pmPurchaseExecutionResVo.setCallRequestFileInfos(callRequestFileInfos);
|
|
|
+ //标后质疑
|
|
|
+ LambdaQueryWrapper<PmCallQuestion> pmCallQuestionLambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
+ pmCallQuestionLambdaQueryWrapper2.eq(PmCallQuestion::getDemandId,demandId)
|
|
|
+ .eq(PmCallQuestion::getType,'1').orderByDesc(PmCallQuestion::getCallQuestionTime);
|
|
|
+ List<PmCallQuestion> pmCallQuestionList2 = pmCallQuestionService.list(pmCallQuestionLambdaQueryWrapper2);
|
|
|
+ if(!ObjectUtils.isEmpty(pmCallQuestionList2)){
|
|
|
+ List<PmCallQuestionResVo> pmCallQuestionResVoList = new ArrayList<>();
|
|
|
+ List<SysFileInfo> fileInfosAll = new ArrayList<>();
|
|
|
+ for(PmCallQuestion pmCallQuestion : pmCallQuestionList2){
|
|
|
+ PmCallQuestionResVo pmCallQuestionResVo = new PmCallQuestionResVo();
|
|
|
+ BeanUtils.copyProperties(pmCallQuestion,pmCallQuestionResVo);
|
|
|
+ List<SysFileInfo> fileInfos = getSysFileInfoList(pmCallQuestionResVo.getId(), SysFileRefEnum.PM_BID_CALL_QEUSTION_FILE.getType());
|
|
|
+ if (!ObjectUtils.isEmpty(fileInfos)) {
|
|
|
+ fileInfosAll.addAll(fileInfos);
|
|
|
+ }
|
|
|
+ pmCallQuestionResVoList.add(pmCallQuestionResVo);
|
|
|
+ }
|
|
|
+ pmPurchaseExecutionResVo.setPmCallQuestionPostResVoList(pmCallQuestionResVoList);
|
|
|
+ pmPurchaseExecutionResVo.setPmCallRequestPostFileInfos(fileInfosAll);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
//流标情况
|
|
|
LambdaQueryWrapper<PmBidFailure> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
lambdaQueryWrapper2.eq(PmBidFailure::getDemandId, demandId).orderByDesc(PmBidFailure::getBidFailureTime);
|
|
|
List<PmBidFailure> pmBidFailureList = this.pmBidFailureService.list(lambdaQueryWrapper2);
|
|
|
if (!ObjectUtils.isEmpty(pmBidFailureList)) {
|
|
|
List<PmBidFailureResVo> pmBidFailureResVoList = new ArrayList<>();
|
|
|
+ List<SysFileInfo> fileInfosAll = new ArrayList<>();
|
|
|
for (PmBidFailure pmBidFailure : pmBidFailureList) {
|
|
|
PmBidFailureResVo pmBidFailureResVo = new PmBidFailureResVo();
|
|
|
BeanUtils.copyProperties(pmBidFailure, pmBidFailureResVo);
|
|
@@ -335,16 +410,15 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
}
|
|
|
pmBidFailureResVoList.add(pmBidFailureResVo);
|
|
|
}
|
|
|
+
|
|
|
pmPurchaseExecutionResVo.setPmBidFailureResVoList(pmBidFailureResVoList);
|
|
|
+ pmPurchaseExecutionResVo.setPmBidFailureFileInfos(fileInfosAll);
|
|
|
}
|
|
|
|
|
|
//中标通知书
|
|
|
List<SysFileInfo> pmBidWinningNotificationFileInfos = getSysFileInfoList(vo.getDemandId(), SysFileRefEnum.PM_BID_WINNING_NOTIFICATION.getType());
|
|
|
- if (!ObjectUtils.isEmpty(pmBidWinningNotificationFileInfos)) {
|
|
|
- fileInfosAll.addAll(pmBidWinningNotificationFileInfos);
|
|
|
- }
|
|
|
+ pmPurchaseExecutionResVo.setFileInfos(pmBidWinningNotificationFileInfos);
|
|
|
|
|
|
- pmPurchaseExecutionResVo.setFileInfos(fileInfosAll);
|
|
|
vo.setPmPurchaseExecutionResVo(pmPurchaseExecutionResVo);
|
|
|
|
|
|
} else if ("5".equals(detailType)) { //合同信息
|
|
@@ -440,11 +514,11 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
} else if (reqType == 2) { //任务下达列表
|
|
|
lw.apply("(project_status = 8 or project_status = 9 )");
|
|
|
} else if (reqType == 3) { //采购执行列表
|
|
|
- lw.apply("(project_status = 9 or project_status = 10 or project_status = 11 or project_status = 12 or project_status = 13 or project_status = 14 or project_status = 15)");
|
|
|
+ lw.apply("(project_status in (9,10,11,12,13,14,15,16,17,19))");
|
|
|
} else if (reqType == 4) { //合同信息列表
|
|
|
- lw.apply("(project_status = 15 or project_status = 16 )");
|
|
|
+ lw.apply("(project_status = 19 or project_status = 20 )");
|
|
|
} else if (reqType == 5) { //项目建设列表
|
|
|
- lw.apply("(project_status = 16 or project_status = 17 )");
|
|
|
+ lw.apply("(project_status = 20 or project_status = 21 )");
|
|
|
}
|
|
|
|
|
|
lw.last(" order by project_status, plan_demand_sub_time");
|
|
@@ -488,6 +562,45 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
vo.setFlay(flay);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ LambdaQueryWrapper<PmExpertFeedback> pmExpertFeedbackLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ pmExpertFeedbackLambdaQueryWrapper.eq(PmExpertFeedback::getDemandId,vo.getDemandId());
|
|
|
+ PmExpertFeedback pmExpertFeedback = this.pmExpertFeedbackService.getOne(pmExpertFeedbackLambdaQueryWrapper);
|
|
|
+ if(pmExpertFeedback != null){
|
|
|
+ vo.setProjectNumber(pmExpertFeedback.getProjectNumber());
|
|
|
+ vo.setDocumentReviewTime(pmExpertFeedback.getDocumentReviewTime());
|
|
|
+ }
|
|
|
+
|
|
|
+ LambdaQueryWrapper<PmProcurementDocumentsReview> pmProcurementDocumentsReviewLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ pmProcurementDocumentsReviewLambdaQueryWrapper.eq(PmProcurementDocumentsReview::getDemandId,vo.getDemandId());
|
|
|
+ PmProcurementDocumentsReview pmProcurementDocumentsReview = this.pmProcurementDocumentsReviewService.getOne(pmProcurementDocumentsReviewLambdaQueryWrapper);
|
|
|
+ if(pmProcurementDocumentsReview != null){
|
|
|
+ vo.setProcurementOfficeApprovalTime(pmProcurementDocumentsReview.getProcurementOfficeApprovalTime());
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Integer.parseInt(vo.getProjectStatus()) > 12 && Integer.parseInt(vo.getProjectStatus()) != 18){
|
|
|
+ LambdaQueryWrapper<PmReleaseAnnouncement> pmReleaseAnnouncementLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ pmReleaseAnnouncementLambdaQueryWrapper.eq(PmReleaseAnnouncement::getDemandId,vo.getDemandId())
|
|
|
+ .orderByDesc(PmReleaseAnnouncement::getReleaseTime)
|
|
|
+ .last(" limit 1");
|
|
|
+ PmReleaseAnnouncement pmReleaseAnnouncement = this.pmReleaseAnnouncementService.getOne(pmReleaseAnnouncementLambdaQueryWrapper);
|
|
|
+ if(pmReleaseAnnouncement != null){
|
|
|
+ vo.setAnnouncementReleaseTime(pmReleaseAnnouncement.getReleaseTime());
|
|
|
+ vo.setTenderOpenTime(pmReleaseAnnouncement.getTenderOpenTime());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Integer.parseInt(vo.getProjectStatus()) > 15 && Integer.parseInt(vo.getProjectStatus()) != 16 && Integer.parseInt(vo.getProjectStatus()) != 18){
|
|
|
+ LambdaQueryWrapper<PmBidWinning> pmBidWinningLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ pmBidWinningLambdaQueryWrapper.eq(PmBidWinning::getDemandId,vo.getDemandId())
|
|
|
+ .orderByDesc(PmBidWinning::getBidAnnouncementTime)
|
|
|
+ .last(" limit 1");
|
|
|
+ PmBidWinning pmBidWinning = this.pmBidWinningService.getOne(pmBidWinningLambdaQueryWrapper);
|
|
|
+ if(pmBidWinning != null){
|
|
|
+ vo.setBidAnnouncementTime(pmBidWinning.getBidAnnouncementTime());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
results.setRecords(pmDemandResVos);
|
|
|
}
|