中标流程发起

new
Agoni 1 year ago
parent 55e0897633
commit 9a8ca73132

@ -144,7 +144,7 @@ public class QuotationSheetController {
@PostMapping("/approvalBidding") @PostMapping("/approvalBidding")
@Operation(summary = "中标审批发起接口") @Operation(summary = "中标审批发起接口")
// @PreAuthorize("@ss.hasPermission('bs:quotation-sheet:approvalBidding')") // @PreAuthorize("@ss.hasPermission('bs:quotation-sheet:approvalBidding')")
public CommonResult<String> approvalBidding(QuotationSheetUpdateReqVO pageVO) { public CommonResult<String> approvalBidding(@RequestBody QuotationSheetUpdateReqVO pageVO) {
return success(quotationSheetService.approvalBidding(pageVO)); return success(quotationSheetService.approvalBidding(pageVO));
} }

@ -66,5 +66,7 @@ public class QuotationSheetRespVO extends QuotationSheetBaseVO {
private Long tenantId; private Long tenantId;
private String tenantName; private String tenantName;
private String applicantName;
private String processId; private String processId;
} }

@ -30,6 +30,8 @@ public class QuotationSheetUpdateReqVO extends QuotationSheetBaseVO {
// @NotEmpty(message = "物料不能为空") // @NotEmpty(message = "物料不能为空")
private List<QuotationSheetBiddingDO> quotationSheetBiddingDOList; private List<QuotationSheetBiddingDO> quotationSheetBiddingDOList;
private List<Long> approvalBiddingIdList;
@Schema(description = "是否中标") @Schema(description = "是否中标")
private Integer isWin; private Integer isWin;

@ -5,6 +5,8 @@ import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.bpm.controller.admin.quotationsheetbidding.vo.QuotationSheetBiddingExportReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.quotationsheetbidding.vo.QuotationSheetBiddingPageReqVO;
import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding.QuotationSheetBiddingDO; import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding.QuotationSheetBiddingDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -33,6 +35,7 @@ public interface QuotationSheetBiddingMapper extends BaseMapperX<QuotationSheetB
.eqIfPresent(QuotationSheetBiddingDO::getIsWin, reqVO.getIsWin()) .eqIfPresent(QuotationSheetBiddingDO::getIsWin, reqVO.getIsWin())
.eqIfPresent(QuotationSheetBiddingDO::getFiles, reqVO.getFiles()) .eqIfPresent(QuotationSheetBiddingDO::getFiles, reqVO.getFiles())
.eqIfPresent(QuotationSheetBiddingDO::getProcessInstanceId, reqVO.getProcessInstanceId()) .eqIfPresent(QuotationSheetBiddingDO::getProcessInstanceId, reqVO.getProcessInstanceId())
.eqIfPresent(QuotationSheetBiddingDO::getQuotationId, reqVO.getQuotationId())
.orderByDesc(QuotationSheetBiddingDO::getId)); .orderByDesc(QuotationSheetBiddingDO::getId));
} }
@ -52,6 +55,7 @@ public interface QuotationSheetBiddingMapper extends BaseMapperX<QuotationSheetB
.betweenIfPresent(QuotationSheetBiddingDO::getQuotationTime, reqVO.getQuotationTime()) .betweenIfPresent(QuotationSheetBiddingDO::getQuotationTime, reqVO.getQuotationTime())
.eqIfPresent(QuotationSheetBiddingDO::getIsWin, reqVO.getIsWin()) .eqIfPresent(QuotationSheetBiddingDO::getIsWin, reqVO.getIsWin())
.eqIfPresent(QuotationSheetBiddingDO::getFiles, reqVO.getFiles()) .eqIfPresent(QuotationSheetBiddingDO::getFiles, reqVO.getFiles())
// .eqIfPresent(QuotationSheetBiddingDO::getQuotationId, reqVO.getQuotationId())
.eqIfPresent(QuotationSheetBiddingDO::getProcessInstanceId, reqVO.getProcessInstanceId()) .eqIfPresent(QuotationSheetBiddingDO::getProcessInstanceId, reqVO.getProcessInstanceId())
.orderByDesc(QuotationSheetBiddingDO::getId)); .orderByDesc(QuotationSheetBiddingDO::getId));
} }

@ -181,6 +181,9 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl<QuotationSheet
@Override @Override
public QuotationSheetDO getQuotationSheet(Long id) { public QuotationSheetDO getQuotationSheet(Long id) {
QuotationSheetDO quotationSheetDO = quotationSheetMapper.selectById(id); QuotationSheetDO quotationSheetDO = quotationSheetMapper.selectById(id);
if (null==quotationSheetDO){
return quotationSheetDO;
}
List<QuotationSheetDetailDO> quotationSheetDetailDOList = quotationSheetDetailService.list(new QueryWrapper<QuotationSheetDetailDO>().eq("company_id", id)); List<QuotationSheetDetailDO> quotationSheetDetailDOList = quotationSheetDetailService.list(new QueryWrapper<QuotationSheetDetailDO>().eq("company_id", id));
if (null==quotationSheetDetailDOList){ if (null==quotationSheetDetailDOList){
quotationSheetDetailDOList = new ArrayList<>(); quotationSheetDetailDOList = new ArrayList<>();
@ -211,6 +214,10 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl<QuotationSheet
quotationSheetDO.setIsWin(2); quotationSheetDO.setIsWin(2);
} }
} }
AdminUserRespDTO user = adminUserApi.getUser(quotationSheetDO.getApplicant());
if (null!=user){
quotationSheetDO.setApplicantName(user.getNickname());
}
quotationSheetDO.setSupplierList(supplierCompanyService.listByIds(JSON.parseArray(quotationSheetDO.getSupplierIdAll(),Long.class))); quotationSheetDO.setSupplierList(supplierCompanyService.listByIds(JSON.parseArray(quotationSheetDO.getSupplierIdAll(),Long.class)));
quotationSheetDO.setQuotationDetails(quotationSheetDetailDOList); quotationSheetDO.setQuotationDetails(quotationSheetDetailDOList);
return quotationSheetDO; return quotationSheetDO;
@ -443,7 +450,7 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl<QuotationSheet
public String approvalBidding(QuotationSheetUpdateReqVO pageVO) { public String approvalBidding(QuotationSheetUpdateReqVO pageVO) {
QuotationSheetDO questionDO = this.getById(pageVO.getId()); QuotationSheetDO questionDO = this.getById(pageVO.getId());
//发起实例 //发起实例
if (questionDO.getBiddingStatus().equals(QuotationSheetBiddingEnum.NO_CONFIRM.getValue())) { if (questionDO.getBiddingStatus().equals(QuotationSheetBiddingEnum.PRIMED_FOR_ACTION.getValue())) {
Map<String, Object> variables = new HashMap<>(); Map<String, Object> variables = new HashMap<>();
variables.put("bidding", JSON.toJSONString(pageVO.getQuotationSheetBiddingDOList())); variables.put("bidding", JSON.toJSONString(pageVO.getQuotationSheetBiddingDOList()));
//variables.put("name", quotationSheet.getProductName()); //variables.put("name", quotationSheet.getProductName());

@ -1,5 +1,9 @@
package cn.iocoder.yudao.module.bpm.service.quotationsheetbidding; package cn.iocoder.yudao.module.bpm.service.quotationsheetbidding;
import cn.iocoder.yudao.module.bpm.controller.admin.quotationsheetbidding.vo.QuotationSheetBiddingCreateReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.quotationsheetbidding.vo.QuotationSheetBiddingExportReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.quotationsheetbidding.vo.QuotationSheetBiddingPageReqVO;
import cn.iocoder.yudao.module.bpm.controller.admin.quotationsheetbidding.vo.QuotationSheetBiddingUpdateReqVO;
import cn.iocoder.yudao.module.bs.dal.dataobject.suppliercompany.SupplierCompanyDO; import cn.iocoder.yudao.module.bs.dal.dataobject.suppliercompany.SupplierCompanyDO;
import cn.iocoder.yudao.module.bs.service.suppliercompany.SupplierCompanyService; import cn.iocoder.yudao.module.bs.service.suppliercompany.SupplierCompanyService;
import com.github.yulichang.base.MPJBaseServiceImpl; import com.github.yulichang.base.MPJBaseServiceImpl;

@ -13,6 +13,7 @@ public enum QuotationSheetBiddingEnum {
CONFIRM("1", "中标"), CONFIRM("1", "中标"),
NO_CONFIRM("2", "未中标"), NO_CONFIRM("2", "未中标"),
PRIMED_FOR_ACTION("0", "待发起"),
ABANDON("3", "流标"), ABANDON("3", "流标"),
; ;

@ -209,4 +209,7 @@ public class QuotationSheetDO extends TenantBaseDO {
private String nickname; private String nickname;
@TableField(exist = false) @TableField(exist = false)
private String deptName; private String deptName;
@TableField(exist = false)
private String applicantName;
} }

Loading…
Cancel
Save