|
@@ -13,12 +13,15 @@ import com.ozs.common.core.controller.BaseController;
|
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
import com.ozs.common.enums.BusinessType;
|
|
|
import com.ozs.common.enums.NameListType;
|
|
|
+import com.ozs.common.enums.PmProjectStatus;
|
|
|
import com.ozs.common.enums.SysFileRefEnum;
|
|
|
import com.ozs.common.utils.RandomUtil;
|
|
|
+import com.ozs.pm.doman.PmBidWinning;
|
|
|
import com.ozs.pm.doman.PmDemand;
|
|
|
import com.ozs.pm.doman.vo.requestVo.*;
|
|
|
import com.ozs.pm.doman.vo.responseVo.PmDemandResVo;
|
|
|
import com.ozs.pm.service.IPmDemandService;
|
|
|
+import com.ozs.pm.service.PmBidWinningService;
|
|
|
import com.ozs.system.domain.SysFileRef;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -50,6 +53,8 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
private BaseAgencyService baseAgencyService;
|
|
|
@Autowired
|
|
|
private BaseExpertService baseExpertService;
|
|
|
+ @Autowired
|
|
|
+ private PmBidWinningService pmBidWinningService;
|
|
|
|
|
|
/**
|
|
|
* 采购执行查询列表
|
|
@@ -99,6 +104,7 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
}
|
|
|
PmDemand pmDemandUpdate = new PmDemand();
|
|
|
pmDemandUpdate.setDemandId(demandId);
|
|
|
+ pmDemandUpdate.setProjectStatus(Long.parseLong(PmProjectStatus.WAIT_UPLOAD_BID_FILE.getCode()));
|
|
|
pmDemandUpdate.setAgencyId(agencyId);
|
|
|
pmDemandUpdate.setExtractAgencyTime(new Date());
|
|
|
pmDemandUpdate.setUpdateTime(pmDemandUpdate.getExtractAgencyTime());
|
|
@@ -130,6 +136,7 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
|
|
|
PmDemand pmDemandUpdate = new PmDemand();
|
|
|
pmDemandUpdate.setDemandId(demandId);
|
|
|
+ pmDemandUpdate.setProjectStatus(Long.parseLong(PmProjectStatus.WAIT_UPLOAD_BID_FILE.getCode()));
|
|
|
pmDemandUpdate.setAgencyId(any.getId());
|
|
|
pmDemandUpdate.setExtractAgencyTime(new Date());
|
|
|
pmDemandUpdate.setUpdateTime(pmDemandUpdate.getExtractAgencyTime());
|
|
@@ -138,8 +145,8 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "上传招标文件",notes = "采购需求ID和上传附件必传")
|
|
|
- @PostMapping("/upLoadBidFile")
|
|
|
- public AjaxResult upLoadBidFile(@NotEmpty(message = "数据为空") @RequestBody PmPurchaseExecutionReqVo pmPurchaseExecutionReqVo) {
|
|
|
+ @PostMapping("/uploadBidFile")
|
|
|
+ public AjaxResult uploadBidFile(@NotEmpty(message = "数据为空") @RequestBody PmPurchaseExecutionReqVo pmPurchaseExecutionReqVo) {
|
|
|
Long demandId = pmPurchaseExecutionReqVo.getDemandId();
|
|
|
if(ObjectUtils.isEmpty(demandId)){
|
|
|
return error("参数错误");
|
|
@@ -155,9 +162,14 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
return error("参数错误");
|
|
|
}
|
|
|
if (pmDemandService.uploadFile(demandId, SysFileRefEnum.PM_BID_FILE.getType(),sysFileRefs,getUserId().toString())) {
|
|
|
- return AjaxResult.success();
|
|
|
+ PmDemand pmDemandUpdate = new PmDemand();
|
|
|
+ pmDemandUpdate.setDemandId(demandId);
|
|
|
+ pmDemandUpdate.setProjectStatus(Long.parseLong(PmProjectStatus.WAIT_ANNOUNCEMENT.getCode()));
|
|
|
+ pmDemandUpdate.setUpdateTime(new Date());
|
|
|
+ pmDemandUpdate.setUpdateBy(getUserId().toString());
|
|
|
+ return success(pmDemandService.updateById(pmDemandUpdate));
|
|
|
} else {
|
|
|
- return error("上传失败");
|
|
|
+ return error("保存上传附件失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -165,11 +177,20 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
@PostMapping("/insertPmReleaseAnnouncement")
|
|
|
public AjaxResult insertPmReleaseAnnouncement(@NotEmpty(message = "数据为空")
|
|
|
@RequestBody PmReleaseAnnouncementReqVo pmReleaseAnnouncementReqVo) {
|
|
|
- pmReleaseAnnouncementReqVo.setCreateBy(getUserId().toString());
|
|
|
- pmReleaseAnnouncementReqVo.setCreateTime(new Date());
|
|
|
- pmReleaseAnnouncementReqVo.setUpdateBy(pmReleaseAnnouncementReqVo.getCreateBy());
|
|
|
- pmReleaseAnnouncementReqVo.setUpdateTime(pmReleaseAnnouncementReqVo.getCreateTime());
|
|
|
- return toAjax(pmDemandService.insertPmReleaseAnnouncement(pmReleaseAnnouncementReqVo));
|
|
|
+ try {
|
|
|
+ Long demandId = pmReleaseAnnouncementReqVo.getDemandId();
|
|
|
+ if(ObjectUtils.isEmpty(demandId)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ pmReleaseAnnouncementReqVo.setCreateBy(getUserId().toString());
|
|
|
+ pmReleaseAnnouncementReqVo.setCreateTime(new Date());
|
|
|
+ pmReleaseAnnouncementReqVo.setUpdateBy(pmReleaseAnnouncementReqVo.getCreateBy());
|
|
|
+ pmReleaseAnnouncementReqVo.setUpdateTime(pmReleaseAnnouncementReqVo.getCreateTime());
|
|
|
+ return toAjax(pmDemandService.insertPmReleaseAnnouncement(pmReleaseAnnouncementReqVo));
|
|
|
+ } catch (Exception e) {
|
|
|
+ return error(e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取专家身份证号列表")
|
|
@@ -225,16 +246,17 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
@PreAuthorize("@ss.hasPermi('pm:purchaseExecution:insertExpertBatch')")
|
|
|
@Log(title = ModularConstans.purchaseExecution, businessType = BusinessType.INSERT)
|
|
|
public AjaxResult insertExpertBatch(@NotEmpty(message = "参数不能为空") @RequestBody PmBaseExpertFillReqVo pmBaseExpertFillReqVo) {
|
|
|
- if (ObjectUtils.isEmpty(pmBaseExpertFillReqVo)
|
|
|
- || ObjectUtils.isEmpty(pmBaseExpertFillReqVo.getDemandId())
|
|
|
- || ObjectUtils.isEmpty(pmBaseExpertFillReqVo.getAccessTime())
|
|
|
- || ObjectUtils.isEmpty(pmBaseExpertFillReqVo.getBaseExpertList())) {
|
|
|
- return error("参数错误");
|
|
|
- }
|
|
|
- pmBaseExpertFillReqVo.setCreateBy(getUserId().toString());
|
|
|
- pmBaseExpertFillReqVo.setUpdateBy(pmBaseExpertFillReqVo.getCreateBy());
|
|
|
|
|
|
try {
|
|
|
+ if (ObjectUtils.isEmpty(pmBaseExpertFillReqVo)
|
|
|
+ || ObjectUtils.isEmpty(pmBaseExpertFillReqVo.getDemandId())
|
|
|
+ || ObjectUtils.isEmpty(pmBaseExpertFillReqVo.getAccessTime())
|
|
|
+ || ObjectUtils.isEmpty(pmBaseExpertFillReqVo.getBaseExpertList())) {
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ pmBaseExpertFillReqVo.setCreateBy(getUserId().toString());
|
|
|
+ pmBaseExpertFillReqVo.setUpdateBy(pmBaseExpertFillReqVo.getCreateBy());
|
|
|
+
|
|
|
return toAjax(pmDemandService.insertExpertBatch(pmBaseExpertFillReqVo));
|
|
|
} catch (Exception e) {
|
|
|
return error(e.getMessage());
|
|
@@ -248,15 +270,166 @@ public class PmPurchaseExecutionController extends BaseController {
|
|
|
@PostMapping("/extractExpertBatch")
|
|
|
public AjaxResult extractExpertBatch(@NotEmpty(message = "参数不能为空")
|
|
|
@RequestBody PmBaseExpertExtractReqVo pmBaseExpertExtractReqVo) {
|
|
|
- if (ObjectUtils.isEmpty(pmBaseExpertExtractReqVo)
|
|
|
- || ObjectUtils.isEmpty(pmBaseExpertExtractReqVo.getDemandId())
|
|
|
- || ObjectUtils.isEmpty(pmBaseExpertExtractReqVo.getAccessTime())) {
|
|
|
- return error("参数错误");
|
|
|
- }
|
|
|
+
|
|
|
try {
|
|
|
+ if (ObjectUtils.isEmpty(pmBaseExpertExtractReqVo)
|
|
|
+ || ObjectUtils.isEmpty(pmBaseExpertExtractReqVo.getDemandId())
|
|
|
+ || ObjectUtils.isEmpty(pmBaseExpertExtractReqVo.getAccessTime())) {
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
return toAjax(pmDemandService.extractExpertBatch(pmBaseExpertExtractReqVo));
|
|
|
} catch (Exception e) {
|
|
|
return error(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "填写开标信息",notes = "采购需求ID必传")
|
|
|
+ @PostMapping("/insertBidOpeningBatch")
|
|
|
+ public AjaxResult insertBidOpeningBatch(@NotEmpty(message = "数据为空")
|
|
|
+ @RequestBody PmBidOpeningFillReqVo pmBidOpeningFillReqVo) {
|
|
|
+
|
|
|
+ try {
|
|
|
+ if (ObjectUtils.isEmpty(pmBidOpeningFillReqVo)
|
|
|
+ || ObjectUtils.isEmpty(pmBidOpeningFillReqVo.getDemandId())
|
|
|
+ || ObjectUtils.isEmpty(pmBidOpeningFillReqVo.getPmBidOpeningList())) {
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ pmBidOpeningFillReqVo.setCreateBy(getUserId().toString());
|
|
|
+ pmBidOpeningFillReqVo.setUpdateBy(getUserId().toString());
|
|
|
+ return toAjax(pmDemandService.insertBidOpeningBatch(pmBidOpeningFillReqVo));
|
|
|
+ } catch (Exception e) {
|
|
|
+ return error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "中标情况填制",notes = "采购需求ID必传")
|
|
|
+ @PostMapping("/insertPmBidWinning")
|
|
|
+ public AjaxResult insertPmBidWinning(@NotEmpty(message = "数据为空")
|
|
|
+ @RequestBody PmBidWinningReqVo pmBidWinningReqVo) {
|
|
|
+ try {
|
|
|
+ Long demandId = pmBidWinningReqVo.getDemandId();
|
|
|
+ if(ObjectUtils.isEmpty(demandId)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ pmBidWinningReqVo.setCreateBy(getUserId().toString());
|
|
|
+ pmBidWinningReqVo.setCreateTime(new Date());
|
|
|
+ pmBidWinningReqVo.setUpdateBy(pmBidWinningReqVo.getCreateBy());
|
|
|
+ pmBidWinningReqVo.setUpdateTime(pmBidWinningReqVo.getCreateTime());
|
|
|
+ return toAjax(pmDemandService.insertPmBidWinning(pmBidWinningReqVo));
|
|
|
+ } catch (Exception e) {
|
|
|
+ return error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "流标情况填制",notes = "采购需求ID必传")
|
|
|
+ @PostMapping("/insertPmBidFailure")
|
|
|
+ public AjaxResult insertPmBidFailure(@NotEmpty(message = "数据为空")
|
|
|
+ @RequestBody PmBidFailureReqVo pmBidFailureReqVo) {
|
|
|
+ try {
|
|
|
+ Long demandId = pmBidFailureReqVo.getDemandId();
|
|
|
+ if(ObjectUtils.isEmpty(demandId)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ pmBidFailureReqVo.setCreateBy(getUserId().toString());
|
|
|
+ pmBidFailureReqVo.setCreateTime(new Date());
|
|
|
+ pmBidFailureReqVo.setUpdateBy(pmBidFailureReqVo.getCreateBy());
|
|
|
+ pmBidFailureReqVo.setUpdateTime(pmBidFailureReqVo.getCreateTime());
|
|
|
+ return toAjax(pmDemandService.insertPmBidFailure(pmBidFailureReqVo));
|
|
|
+ } catch (Exception e) {
|
|
|
+ return error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "质疑处理",notes = "采购需求ID必传")
|
|
|
+ @PostMapping("/handleCallQuestion")
|
|
|
+ public AjaxResult handleCallQuestion(@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("参数错误");
|
|
|
+ }
|
|
|
+ List<SysFileRef> sysFileRefs = pmCallQuestionReqVo.getSysFileRefs();
|
|
|
+ if(ObjectUtils.isEmpty(sysFileRefs)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ if(pmDemandService.uploadFile(demandId, SysFileRefEnum.PM_BID_CALL_QEUSTION_FILE.getType(),sysFileRefs,getUserId().toString())){
|
|
|
+ pmDemand.setCallQuestion(pmCallQuestionReqVo.getCallQuestion());
|
|
|
+ pmDemand.setUpdateBy(getUserId().toString());
|
|
|
+ pmDemand.setUpdateTime(new Date());
|
|
|
+ return toAjax(pmDemandService.updateById(pmDemand));
|
|
|
+ } else {
|
|
|
+ return error("保存上传附件失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ return error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "更换中标人",notes = "采购需求ID必传")
|
|
|
+ @PostMapping("/updatePmBidWinning")
|
|
|
+ public AjaxResult updatePmBidWinning(@NotEmpty(message = "数据为空")
|
|
|
+ @RequestBody PmBidWinningReqVo pmBidWinningReqVo) {
|
|
|
+ try {
|
|
|
+ Long demandId = pmBidWinningReqVo.getDemandId();
|
|
|
+ if(ObjectUtils.isEmpty(demandId)){
|
|
|
+ return error("缺少需求ID");
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isEmpty(pmBidWinningReqVo.getBidOpeningId())){
|
|
|
+ return error("缺少开标信息ID bidOpeningId");
|
|
|
+ }
|
|
|
+ if(ObjectUtils.isEmpty(pmBidWinningReqVo.getBidWinningAmount())){
|
|
|
+ return error("缺少中标金额");
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<PmBidWinning> lw = new LambdaQueryWrapper<>();
|
|
|
+ lw.eq(PmBidWinning::getDemandId,demandId);
|
|
|
+ PmBidWinning pmBidWinning = pmBidWinningService.getOne(lw);
|
|
|
+ if(pmBidWinning == null){
|
|
|
+ return error("原中标信息不存在");
|
|
|
+ }
|
|
|
+ pmBidWinning.setBidOpeningId(pmBidWinningReqVo.getBidOpeningId());
|
|
|
+ pmBidWinning.setBidWinningAmount(pmBidWinningReqVo.getBidWinningAmount());
|
|
|
+ pmBidWinning.setUpdateBy(getUserId().toString());
|
|
|
+ pmBidWinning.setUpdateTime(new Date());
|
|
|
+
|
|
|
+ return toAjax(pmBidWinningService.updateById(pmBidWinning));
|
|
|
+ } catch (Exception e) {
|
|
|
+ return error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "上传中标通知书",notes = "采购需求ID和上传附件必传")
|
|
|
+ @PostMapping("/uploadBidWinningNotification")
|
|
|
+ public AjaxResult uploadBidWinningNotification(@NotEmpty(message = "数据为空") @RequestBody PmPurchaseExecutionReqVo pmPurchaseExecutionReqVo) {
|
|
|
+ Long demandId = pmPurchaseExecutionReqVo.getDemandId();
|
|
|
+ if(ObjectUtils.isEmpty(demandId)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+
|
|
|
+ PmDemand pmDemand = pmDemandService.getById(demandId);
|
|
|
+ if(ObjectUtils.isEmpty(pmDemand)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<SysFileRef> sysFileRefs = pmPurchaseExecutionReqVo.getSysFileRefs();
|
|
|
+ if(ObjectUtils.isEmpty(sysFileRefs)){
|
|
|
+ return error("参数错误");
|
|
|
+ }
|
|
|
+ if (pmDemandService.uploadFile(demandId, SysFileRefEnum.PM_BID_WINNING_NOTIFICATION.getType(),sysFileRefs,getUserId().toString())) {
|
|
|
+ PmDemand pmDemandUpdate = new PmDemand();
|
|
|
+ pmDemandUpdate.setDemandId(demandId);
|
|
|
+ pmDemandUpdate.setProjectStatus(Long.parseLong(PmProjectStatus.CONTRACT_WAIT_FILL.getCode()));
|
|
|
+ pmDemandUpdate.setUpdateTime(new Date());
|
|
|
+ pmDemandUpdate.setUpdateBy(getUserId().toString());
|
|
|
+ return success(pmDemandService.updateById(pmDemandUpdate));
|
|
|
+ } else {
|
|
|
+ return error("保存上传附件失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|