|
@@ -63,6 +63,10 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
private PmExpertFeedbackService pmExpertFeedbackService;
|
|
|
@Autowired
|
|
|
private PmProcurementDocumentsReviewService pmProcurementDocumentsReviewService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private PmBidFailureService pmBidFailureService;
|
|
|
+
|
|
|
/**
|
|
|
* 采购执行查询列表
|
|
|
*/
|
|
@@ -269,9 +273,13 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
if(ObjectUtils.isEmpty(pmDemand)){
|
|
|
return error("参数错误");
|
|
|
}
|
|
|
- List<SysFileRef> sysFileRefs = pmCallQuestionReqVo.getSysFileRefs();
|
|
|
- pmDemandService.uploadFile(demandId, SysFileRefEnum.PM_PRE_BID_CALL_QUESTION.getType(),sysFileRefs,getUserId().toString());
|
|
|
- pmDemand.setCallQuestion(pmCallQuestionReqVo.getCallQuestion());
|
|
|
+
|
|
|
+ pmDemand.setPreBidCallQuestion(pmCallQuestionReqVo.getCallQuestion());
|
|
|
+ if("1".equals(pmDemand.getPreBidCallQuestion())) { //有质疑
|
|
|
+ pmDemand.setPreBidCallQuestionTime(pmCallQuestionReqVo.getCallQuestionTime());
|
|
|
+ List<SysFileRef> sysFileRefs = pmCallQuestionReqVo.getSysFileRefs();
|
|
|
+ pmDemandService.uploadFile(demandId, SysFileRefEnum.PM_PRE_BID_CALL_QUESTION.getType(),sysFileRefs,getUserId().toString());
|
|
|
+ }
|
|
|
pmDemand.setProjectStatus(PmProjectStatus.WAIT_OPEN_BID.getCode());
|
|
|
pmDemand.setUpdateBy(getUserId().toString());
|
|
|
pmDemand.setUpdateTime(new Date());
|
|
@@ -503,6 +511,51 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "流废标处置-质疑处理",notes = "采购需求ID必传")
|
|
|
+ @PostMapping("/handleBidFailureCallQuestion")
|
|
|
+ @PreAuthorize("@ss.hasPermi('pm:purchaseExecution:handleBidFailureCallQuestion')")
|
|
|
+ @Log(title = ModularConstans.purchaseExecution, businessType = BusinessType.UPDATE)
|
|
|
+ public AjaxResult handleBidFailureCallQuestion(@NotEmpty(message = "数据为空")
|
|
|
+ @RequestBody PmCallQuestionReqVo pmCallQuestionReqVo) {
|
|
|
+ try {
|
|
|
+ Long demandId = pmCallQuestionReqVo.getDemandId();
|
|
|
+ if(ObjectUtils.isEmpty(demandId)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ PmDemand pmDemand = pmDemandService.getById(demandId);
|
|
|
+ if(ObjectUtils.isEmpty(pmDemand)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<PmBidFailure> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.eq(PmBidFailure::getDemandId,pmDemand.getDemandId())
|
|
|
+ .orderByDesc(PmBidFailure::getBidFailureTime)
|
|
|
+ .last(" limit 1");
|
|
|
+ PmBidFailure bidFailure = this.pmBidFailureService.getOne(lambdaQueryWrapper);
|
|
|
+ if (ObjectUtils.isEmpty(bidFailure)) {
|
|
|
+ return error("没有流标信息");
|
|
|
+ }
|
|
|
+ PmBidFailure bidFailureUpdate = new PmBidFailure();
|
|
|
+ bidFailureUpdate.setId(bidFailure.getId());
|
|
|
+ bidFailureUpdate.setCallQuestion(pmCallQuestionReqVo.getCallQuestion());
|
|
|
+ if("1".equals(bidFailureUpdate.getCallQuestion())){ //有质疑
|
|
|
+ if(!ObjectUtils.isEmpty(pmCallQuestionReqVo.getCallQuestionTime())){
|
|
|
+ bidFailureUpdate.setCallQuestionTime(pmCallQuestionReqVo.getCallQuestionTime());
|
|
|
+ } else {
|
|
|
+ bidFailureUpdate.setCallQuestionTime(new Date());
|
|
|
+ }
|
|
|
+ List<SysFileRef> sysFileRefs = pmCallQuestionReqVo.getSysFileRefs();
|
|
|
+ pmDemandService.uploadFile(bidFailureUpdate.getId(), SysFileRefEnum.PM_BID_FAILURE_CALL_QUESTION.getType(),sysFileRefs,getUserId().toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ bidFailureUpdate.setUpdateBy(getUserId().toString());
|
|
|
+ bidFailureUpdate.setUpdateTime(new Date());
|
|
|
+ return toAjax(pmBidFailureService.updateById(bidFailureUpdate));
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ return error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "标后质疑",notes = "采购需求ID必传")
|
|
|
@PostMapping("/handleCallQuestion")
|
|
|
@PreAuthorize("@ss.hasPermi('pm:purchaseExecution:handleCallQuestion')")
|
|
@@ -518,10 +571,18 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
if(ObjectUtils.isEmpty(pmDemand)){
|
|
|
return error("参数错误");
|
|
|
}
|
|
|
- List<SysFileRef> sysFileRefs = pmCallQuestionReqVo.getSysFileRefs();
|
|
|
- pmDemandService.uploadFile(demandId, SysFileRefEnum.PM_BID_CALL_QEUSTION_FILE.getType(),sysFileRefs,getUserId().toString());
|
|
|
+
|
|
|
pmDemand.setCallQuestion(pmCallQuestionReqVo.getCallQuestion());
|
|
|
- pmDemand.setCallQuestionTime(new Date());
|
|
|
+ if("1".equals(pmDemand.getCallQuestion())) { //有质疑
|
|
|
+ if (!ObjectUtils.isEmpty(pmCallQuestionReqVo.getCallQuestionTime())) {
|
|
|
+ pmDemand.setCallQuestionTime(pmCallQuestionReqVo.getCallQuestionTime());
|
|
|
+ } else {
|
|
|
+ pmDemand.setCallQuestionTime(new Date());
|
|
|
+ }
|
|
|
+ List<SysFileRef> sysFileRefs = pmCallQuestionReqVo.getSysFileRefs();
|
|
|
+ pmDemandService.uploadFile(demandId, SysFileRefEnum.PM_BID_CALL_QEUSTION_FILE.getType(),sysFileRefs,getUserId().toString());
|
|
|
+ }
|
|
|
+
|
|
|
pmDemand.setUpdateBy(getUserId().toString());
|
|
|
pmDemand.setUpdateTime(new Date());
|
|
|
return toAjax(pmDemandService.updateById(pmDemand));
|