From 6fc3a3587a8597d25995be8aca526c268b669392 Mon Sep 17 00:00:00 2001
From: Agoni <791536664@qq.com>
Date: Mon, 28 Aug 2023 08:07:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yudao-module-bs/yudao-module-bs-biz/pom.xml | 13 +++
.../QuotationSheetController.java | 21 +++-
.../vo/QuotationSheetBaseVO.java | 3 +
.../vo/QuotationSheetExcelVO.java | 3 +
.../vo/QuotationSheetPageReqVO.java | 5 +
.../vo/QuotationSheetRespVO.java | 15 +++
.../vo/QuotationSheetUpdateReqVO.java | 2 +
.../vo/QuotationSheetBiddingBaseVO.java | 6 +-
.../quotationsheet/QuotationSheetDO.java | 7 +-
.../suppliercompany/SupplierCompanyDO.java | 3 +
.../quotationsheet/QuotationSheetMapper.java | 34 ++++++
.../quotationsheet/QuotationSheetService.java | 8 ++
.../QuotationSheetServiceImpl.java | 100 ++++++++++++++++--
13 files changed, 205 insertions(+), 15 deletions(-)
diff --git a/yudao-module-bs/yudao-module-bs-biz/pom.xml b/yudao-module-bs/yudao-module-bs-biz/pom.xml
index 2f3f197d..2f4d6c7a 100644
--- a/yudao-module-bs/yudao-module-bs-biz/pom.xml
+++ b/yudao-module-bs/yudao-module-bs-biz/pom.xml
@@ -18,6 +18,13 @@
+
+
+ cn.iocoder.boot
+ yudao-module-bpm-api
+ ${revision}
+
+
cn.iocoder.boot
yudao-spring-boot-starter-biz-tenant
@@ -61,6 +68,12 @@
cn.iocoder.boot
yudao-spring-boot-starter-excel
+
+ cn.iocoder.boot
+ yudao-module-bpm-api
+ 1.7.3-snapshot
+ compile
+
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/QuotationSheetController.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/QuotationSheetController.java
index 854da082..e1690738 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/QuotationSheetController.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/QuotationSheetController.java
@@ -114,9 +114,26 @@ public class QuotationSheetController {
@PostMapping("/approvalBidding")
@Operation(summary = "中标审批发起接口")
- @PreAuthorize("@ss.hasPermission('bs:quotation-sheet:approvalBidding')")
- public CommonResult approvalBidding(@Valid QuotationSheetPageReqVO pageVO) {
+// @PreAuthorize("@ss.hasPermission('bs:quotation-sheet:approvalBidding')")
+ public CommonResult approvalBidding(QuotationSheetPageReqVO pageVO) {
return success(quotationSheetService.approvalBidding(pageVO));
}
+ @PutMapping("/releaseFlag")
+ @Operation(summary = "是否流标")
+ @PreAuthorize("@ss.hasPermission('bs:quotation-sheet:releaseFlag')")
+ public CommonResult releaseFlag( @RequestBody QuotationSheetUpdateReqVO updateReqVO) {
+ updateReqVO.setIsWin(3);
+ quotationSheetService.updateQuotationReleaseFlag(updateReqVO);
+ return success(true);
+ }
+
+
+ @GetMapping("/tendereeQuery")
+ @Operation(summary = "报价单中标管理列表接口")
+ @PreAuthorize("@ss.hasPermission('bs:quotation-sheet:tendereeQuery')")
+ public CommonResult> tendereeQuery(@Valid QuotationSheetPageReqVO pageVO) {
+ PageResult pageResult = quotationSheetService.tendereeQuery(pageVO);
+ return success(QuotationSheetConvert.INSTANCE.convertPage(pageResult));
+ }
}
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetBaseVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetBaseVO.java
index 364ef3e9..f196d069 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetBaseVO.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetBaseVO.java
@@ -104,4 +104,7 @@ public class QuotationSheetBaseVO {
@Schema(description = "申请人部门id", example = "10907")
private Long deptId;
+ @Schema(description = "采购预算")
+ private String money;
+
}
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExcelVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExcelVO.java
index 8938b617..ad03b5ca 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExcelVO.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExcelVO.java
@@ -105,4 +105,7 @@ public class QuotationSheetExcelVO {
@ExcelProperty("申请人部门id")
private Long deptId;
+ @Schema(description = "采购预算")
+ private String money;
+
}
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetPageReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetPageReqVO.java
index 3e6aaf77..d6721223 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetPageReqVO.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetPageReqVO.java
@@ -19,6 +19,9 @@ public class QuotationSheetPageReqVO extends PageParam {
@Schema(description = "备注", example = "你猜")
private String remark;
+ @Schema(description = "id")
+ private Long id;
+
@Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED)
private List files;
@@ -108,6 +111,8 @@ public class QuotationSheetPageReqVO extends PageParam {
@Schema(description = "申请人部门id", example = "10907")
private Long deptId;
+ private Integer isWin;
+
@Schema(description = "供应商中标id集合发起审批的时候添加此参数")
private List approvalBiddingIdList;
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetRespVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetRespVO.java
index 8b38abcd..9909b7fa 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetRespVO.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetRespVO.java
@@ -41,6 +41,15 @@ public class QuotationSheetRespVO extends QuotationSheetBaseVO {
@Schema(description = "是否中标")
private Integer isWin;
+ @Schema(description = "采购预算")
+ private String money;
+
+ /**
+ * 中标审批状态
+ */
+ @Schema(description = "中标审批状态")
+ private Integer biddingStatus;
+
/**
* 供应商中标id
*/
@@ -49,4 +58,10 @@ public class QuotationSheetRespVO extends QuotationSheetBaseVO {
@Schema(description = "中标供应商名称")
private String biddingSupplierName;
+
+ /**
+ * 多租户编号
+ */
+ private Long tenantId;
+ private String tenantName;
}
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetUpdateReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetUpdateReqVO.java
index 5d7ec158..7fdc3293 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetUpdateReqVO.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetUpdateReqVO.java
@@ -23,4 +23,6 @@ public class QuotationSheetUpdateReqVO extends QuotationSheetBaseVO {
@NotEmpty(message = "物料不能为空")
private List quotationDetails;
+ @Schema(description = "是否中标")
+ private Integer isWin;
}
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingBaseVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingBaseVO.java
index f70c9baf..611527a0 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingBaseVO.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingBaseVO.java
@@ -22,25 +22,21 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
public class QuotationSheetBiddingBaseVO {
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
- @NotNull(message = "状态不能为空")
private Integer status;
@Schema(description = "备注", example = "随便")
private String remark;
@Schema(description = "物料明细", example = "27461")
- @NotNull(message = "物料明细不能为空")
private Long quotationDetailId;
@Schema(description = "物料编码")
- @NotBlank(message = "物料编码不能为空")
private String materialCode;
@Schema(description = "物料id", example = "18066")
private Long materialId;
@Schema(description = "物料名称", example = "芋艿")
- @NotBlank(message = "物料名称不能为空")
private String materialName;
@Schema(description = "供应商id", example = "2920")
@@ -51,9 +47,11 @@ public class QuotationSheetBiddingBaseVO {
private String companyName;
@Schema(description = "产品单价", example = "32067")
+ @NotNull(message = "供应商不能为空")
private BigDecimal productPrice;
@Schema(description = "产品模具费")
+ @NotNull(message = "供应商不能为空")
private BigDecimal moldCost;
@Schema(description = "报价时间")
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheet/QuotationSheetDO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheet/QuotationSheetDO.java
index 9cfa2644..49643829 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheet/QuotationSheetDO.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheet/QuotationSheetDO.java
@@ -165,7 +165,6 @@ public class QuotationSheetDO extends TenantBaseDO {
@TableField(exist = false)
private List quotationDetails;
- @TableField(exist = false)
private Integer isWin;
/**
* 供应商中标id
@@ -183,4 +182,10 @@ public class QuotationSheetDO extends TenantBaseDO {
*/
@TableField(exist = false)
private List quotationSheetBiddingDOList;
+ /**
+ * 中标审批状态
+ */
+ private Integer biddingStatus;
+
+ private String money;
}
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/suppliercompany/SupplierCompanyDO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/suppliercompany/SupplierCompanyDO.java
index 3676bd58..5bd6c232 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/suppliercompany/SupplierCompanyDO.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/suppliercompany/SupplierCompanyDO.java
@@ -117,4 +117,7 @@ public class SupplierCompanyDO extends TenantBaseDO {
@TableField(typeHandler = JacksonTypeHandler.class)
private List files;
+ @TableField(exist = false)
+ private Integer isWin;
+
}
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheet/QuotationSheetMapper.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheet/QuotationSheetMapper.java
index 2fdcfd4d..de56f445 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheet/QuotationSheetMapper.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheet/QuotationSheetMapper.java
@@ -50,6 +50,40 @@ public interface QuotationSheetMapper extends BaseMapperX {
.likeIfPresent(QuotationSheetDO::getSupplierBiddingId, reqVO.getSupplierBiddingId())
.orderByDesc(QuotationSheetDO::getId));
}
+ default PageResult selectPages(QuotationSheetPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .eqIfPresent(QuotationSheetDO::getRemark, reqVO.getRemark())
+// .eqIfPresent(QuotationSheetDO::getFiles, reqVO.getFiles())
+ .betweenIfPresent(QuotationSheetDO::getCreateTime, reqVO.getCreateTime())
+ .eqIfPresent(QuotationSheetDO::getNumber, reqVO.getNumber())
+ .eqIfPresent(QuotationSheetDO::getType, reqVO.getType())
+ .likeIfPresent(QuotationSheetDO::getProductName, reqVO.getProductName())
+ .betweenIfPresent(QuotationSheetDO::getCutoffTime, reqVO.getCutoffTime())
+ .eqIfPresent(QuotationSheetDO::getProjectId, reqVO.getProjectId())
+ .likeIfPresent(QuotationSheetDO::getProjectName, reqVO.getProjectName())
+ .eqIfPresent(QuotationSheetDO::getReleaseStatus, reqVO.getReleaseStatus())
+ .eqIfPresent(QuotationSheetDO::getQuotationStatus, reqVO.getQuotationStatus())
+ .eqIfPresent(QuotationSheetDO::getStatus, reqVO.getStatus())
+ .eqIfPresent(QuotationSheetDO::getProcessInstanceId, reqVO.getProcessInstanceId())
+ .eqIfPresent(QuotationSheetDO::getAuditProgress, reqVO.getAuditProgress())
+ .eqIfPresent(QuotationSheetDO::getProcurementSchedule, reqVO.getProcurementSchedule())
+ .eqIfPresent(QuotationSheetDO::getProductQuantity, reqVO.getProductQuantity())
+ .eqIfPresent(QuotationSheetDO::getPurchasingCategoriesId, reqVO.getPurchasingCategoriesId())
+ .betweenIfPresent(QuotationSheetDO::getBeginTime, reqVO.getBeginTime())
+ .betweenIfPresent(QuotationSheetDO::getEndTime, reqVO.getEndTime())
+ .eqIfPresent(QuotationSheetDO::getSectionId, reqVO.getSectionId())
+ .eqIfPresent(QuotationSheetDO::getDeliveryAddress, reqVO.getDeliveryAddress())
+ .eqIfPresent(QuotationSheetDO::getDeliverer, reqVO.getDeliverer())
+ .eqIfPresent(QuotationSheetDO::getDeliveryPhone, reqVO.getDeliveryPhone())
+ .eqIfPresent(QuotationSheetDO::getPurchaseContent, reqVO.getPurchaseContent())
+ .betweenIfPresent(QuotationSheetDO::getApplyTime, reqVO.getApplyTime())
+ .eqIfPresent(QuotationSheetDO::getApplicant, reqVO.getApplicant())
+ .likeIfPresent(QuotationSheetDO::getSupplierIdAll,reqVO.getSupplierCompanyId())
+ .eqIfPresent(QuotationSheetDO::getDeptId, reqVO.getDeptId())
+ .likeIfPresent(QuotationSheetDO::getSupplierBiddingId, reqVO.getSupplierBiddingId())
+ .isNull(QuotationSheetDO::getIsWin)
+ .orderByDesc(QuotationSheetDO::getId));
+ }
default List selectList(QuotationSheetExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX()
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheet/QuotationSheetService.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheet/QuotationSheetService.java
index 0d52d5aa..f9f456c4 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheet/QuotationSheetService.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheet/QuotationSheetService.java
@@ -33,6 +33,7 @@ public interface QuotationSheetService extends MPJBaseService
* @param updateReqVO 更新信息
*/
void updateQuotationSheet(@Valid QuotationSheetUpdateReqVO updateReqVO);
+ void updateQuotationReleaseFlag( QuotationSheetUpdateReqVO updateReqVO);
/**
* 删除报价单
@@ -86,4 +87,11 @@ public interface QuotationSheetService extends MPJBaseService
* @return
*/
String approvalBidding(QuotationSheetPageReqVO pageVO);
+
+ /**
+ * 供应商招标列表
+ * @param pageVO
+ * @return
+ */
+ PageResult tendereeQuery(QuotationSheetPageReqVO pageVO);
}
diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheet/QuotationSheetServiceImpl.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheet/QuotationSheetServiceImpl.java
index 51139320..2207e21b 100644
--- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheet/QuotationSheetServiceImpl.java
+++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheet/QuotationSheetServiceImpl.java
@@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
import cn.iocoder.yudao.framework.security.core.LoginUser;
+import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
import cn.iocoder.yudao.module.bs.dal.dataobject.expenseapplytrip.ExpenseApplyTripDO;
import cn.iocoder.yudao.module.bs.dal.dataobject.materiel.MaterielDO;
import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding.QuotationSheetBiddingDO;
@@ -24,6 +25,8 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
+import javax.validation.Valid;
+
import org.springframework.validation.annotation.Validated;
import java.util.*;
@@ -69,6 +72,9 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl supplierCompanyDO = supplierCompanyService.listByIds(JSON.parseArray(quotationSheetDO.getSupplierBiddingId(), Long.class));
+ if (null!=supplierCompanyDO){
+ quotationSheetDO.setBiddingSupplierName(supplierCompanyDO.stream().map(SupplierCompanyDO::getCompanyAme).collect(Collectors.toList()).stream().collect(Collectors.joining(",")));
+ }
+ quotationSheetDO.setIsWin(1);
+ }else {
+ quotationSheetDO.setIsWin(2);
+ }
+ }
quotationSheetDO.setSupplierList(supplierCompanyService.listByIds(JSON.parseArray(quotationSheetDO.getSupplierIdAll(),Long.class)));
quotationSheetDO.setQuotationDetails(quotationSheetDetailDOList);
return quotationSheetDO;
@@ -215,7 +242,36 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl supplierCompanyDO =new ArrayList<>();
+ if (a.getIsWin()==null){
+ if (null!=a.getSupplierBiddingId()&&!"".equals(a.getSupplierBiddingId())){
+ supplierCompanyDO = supplierCompanyService.listByIds(JSON.parseArray(a.getSupplierBiddingId(), Long.class));
+ if (null!=supplierCompanyDO){
+ a.setBiddingSupplierName(supplierCompanyDO.stream().map(SupplierCompanyDO::getCompanyAme).collect(Collectors.toList()).stream().collect(Collectors.joining(",")));
+ }
+ a.setIsWin(1);
+ }else {
+ a.setIsWin(2);
+ }
+ }
a.setSupplierList(supplierCompanyDOList);
+ if (a.getSupplierList()!=null){
+ if (supplierCompanyDO.size()>0){
+ Map map3= supplierCompanyDO.stream().collect(Collectors.toMap(SupplierCompanyDO::getId, x ->x));
+ a.getSupplierList().forEach(s->{
+ if (map3!=null &&map3.size()>0){
+ SupplierCompanyDO supplierCompanyDO1 = map3.get(s.getId());
+ if (null!=supplierCompanyDO1){
+ s.setIsWin(1);
+ }else {
+ s.setIsWin(2);
+ }
+ }
+
+ });
+ }
+
+ }
a.setQuotationDetails(quotationSheetDetailDOList);
});
}
@@ -269,6 +325,7 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl getQuotationSheetPageBidding(QuotationSheetPageReqVO pageVO) {
+ pageVO.setStatus(2);
PageResult sheetDOPageResult = quotationSheetMapper.selectPage(pageVO);
if (sheetDOPageResult.getList()!=null&&sheetDOPageResult.getList().size()>0){
List materielDOList = materielService.list(new QueryWrapper().eq("tenant_id",sheetDOPageResult.getList().get(0).getTenantId()));
@@ -314,14 +371,34 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl supplierCompanyDO = supplierCompanyService.listByIds(JSON.parseArray(a.getSupplierBiddingId(), Long.class));
- if (null!=supplierCompanyDO){
- a.setBiddingSupplierName(supplierCompanyDO.stream().map(SupplierCompanyDO::getCompanyAme).collect(Collectors.toList()).stream().collect(Collectors.joining(",")));
+ List supplierCompanyDO =new ArrayList<>();
+ if (a.getIsWin()==null){
+ if (null!=a.getSupplierBiddingId()&&!"".equals(a.getSupplierBiddingId())){
+ supplierCompanyDO = supplierCompanyService.listByIds(JSON.parseArray(a.getSupplierBiddingId(), Long.class));
+ if (null!=supplierCompanyDO){
+ a.setBiddingSupplierName(supplierCompanyDO.stream().map(SupplierCompanyDO::getCompanyAme).collect(Collectors.toList()).stream().collect(Collectors.joining(",")));
+ }
+ a.setIsWin(1);
+ }else {
+ a.setIsWin(2);
}
- a.setIsWin(1);
- }else {
- a.setIsWin(2);
+ }
+ if (a.getSupplierList()!=null){
+ if (supplierCompanyDO.size()>0){
+ Map map3= supplierCompanyDO.stream().collect(Collectors.toMap(SupplierCompanyDO::getId, x ->x));
+ a.getSupplierList().forEach(s->{
+ if (map3!=null &&map3.size()>0){
+ SupplierCompanyDO supplierCompanyDO1 = map3.get(s.getId());
+ if (null!=supplierCompanyDO1){
+ s.setIsWin(1);
+ }else {
+ s.setIsWin(2);
+ }
+ }
+
+ });
+ }
+
}
a.setSupplierList(supplierCompanyDOList);
a.setQuotationDetails(quotationSheetDetailDOList);
@@ -335,6 +412,13 @@ public class QuotationSheetServiceImpl extends MPJBaseServiceImpl tendereeQuery(QuotationSheetPageReqVO pageVO) {
+ pageVO.setStatus(2);
+ PageResult sheetDOPageResult = quotationSheetMapper.selectPages(pageVO);
+ return sheetDOPageResult;
+ }
+
/**
* 编号生成方法
* @return