From 4e9d72f353baf9bb80235b7eeeea56761c149f55 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Sun, 14 Jul 2024 17:21:26 +0800 Subject: [PATCH] '123' --- .../web/controller/bid/BidController.java | 38 ++++++- .../main/java/com/ruoyi/bid/domain/Bid.java | 104 +++++------------- .../main/resources/mapper/bid/BidMapper.xml | 8 +- ruoyi-ui/src/api/bid/bid.js | 8 ++ ruoyi-ui/src/views/bid/bid/index.vue | 51 ++++++++- 5 files changed, 127 insertions(+), 82 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bid/BidController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bid/BidController.java index f60e0fe..6e56d35 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bid/BidController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bid/BidController.java @@ -14,6 +14,7 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.MinioUtil; import com.ruoyi.common.utils.uuid.UUID; +import com.ruoyi.quot.domain.Quot; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -43,6 +44,27 @@ public class BidController extends BaseController @Autowired private IBidFileService bidFileService; + /** + * 分派 + */ + @PreAuthorize("@ss.hasPermi('bid:bid:assign')") + @Log(title = "分派投标信息", businessType = BusinessType.EXPORT) + @PostMapping("/bidAssign") + public AjaxResult bidAssign(@RequestBody Bid bid) + { + String[] bidIds = bid.getBidIds(); + String receiveUserName = bid.getReceiveUserName(); + for(String bidId:bidIds){ + Bid entity = bidService.selectBidByBidId(bidId); + if(StringUtils.isNotEmpty(entity.getReceiveUserName())){ + return error("投标信息:"+entity.getBidCode()+" 已分派"); + } + entity.setReceiveUserName(receiveUserName); + bidService.updateBid(entity); + } + return success(); + } + /** * 查询投标信息列表 */ @@ -51,6 +73,20 @@ public class BidController extends BaseController public TableDataInfo list(Bid bid) { startPage(); + + // 获取用户角色 --判断是否是投标小组经理角色 + Boolean tbbRoleFlag = false; + List roles = SecurityUtils.getLoginUser().getUser().getRoles(); + for(SysRole sysRole:roles){ + String roleKey = sysRole.getRoleKey(); + if("BID".equals(roleKey)){ + tbbRoleFlag = true; + break; + } + } + if(!tbbRoleFlag){ + bid.setReceiveUserName(getUsername()); + } List list = bidService.selectBidList(bid); return getDataTable(list); } @@ -188,7 +224,7 @@ public class BidController extends BaseController public AjaxResult commitTbxx(@RequestBody Bid bid) { try{ - // 获取用户角色 --判断是否是核价组角色 + // 获取用户角色 --判断是否是投标小组经理角色 Boolean tbbRoleFlag = false; List roles = SecurityUtils.getLoginUser().getUser().getRoles(); for(SysRole sysRole:roles){ diff --git a/ruoyi-system/src/main/java/com/ruoyi/bid/domain/Bid.java b/ruoyi-system/src/main/java/com/ruoyi/bid/domain/Bid.java index 73f2206..12250a1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/bid/domain/Bid.java +++ b/ruoyi-system/src/main/java/com/ruoyi/bid/domain/Bid.java @@ -17,6 +17,7 @@ public class Bid extends BaseEntity /** */ private String bidId; + private String[] bidIds; /** 标书编号 */ @Excel(name = "标书编号") @@ -180,6 +181,9 @@ public class Bid extends BaseEntity /** 创建人 */ private String createName; + /** 分派接收人 */ + private String receiveUserName; + public void setBidId(String bidId) { this.bidId = bidId; @@ -189,6 +193,9 @@ public class Bid extends BaseEntity { return bidId; } + public String[] getBidIds() { return bidIds; } + + public void setBidIds(String[] bidIds) { this.bidIds = bidIds; } public void setBidCode(String bidCode) { this.bidCode = bidCode; @@ -243,10 +250,7 @@ public class Bid extends BaseEntity public String getBidTenderingUnitBm() { return bidTenderingUnitBm; } public void setBidTenderingUnitBm(String bidTenderingUnitBm) { this.bidTenderingUnitBm = bidTenderingUnitBm; } - public void setBidTenderingUnit(String bidTenderingUnit) - { - this.bidTenderingUnit = bidTenderingUnit; - } + public void setBidTenderingUnit(String bidTenderingUnit) { this.bidTenderingUnit = bidTenderingUnit; } public String getBidTenderingUnit() { @@ -270,10 +274,7 @@ public class Bid extends BaseEntity { return bidProject; } - public void setBidAuthorizedRepresentative(String bidAuthorizedRepresentative) - { - this.bidAuthorizedRepresentative = bidAuthorizedRepresentative; - } + public void setBidAuthorizedRepresentative(String bidAuthorizedRepresentative) { this.bidAuthorizedRepresentative = bidAuthorizedRepresentative; } public String getBidAuthorizedRepresentative() { @@ -288,10 +289,7 @@ public class Bid extends BaseEntity { return bidAuthorizedPhone; } - public void setBidFilePaymentMethod(String bidFilePaymentMethod) - { - this.bidFilePaymentMethod = bidFilePaymentMethod; - } + public void setBidFilePaymentMethod(String bidFilePaymentMethod) { this.bidFilePaymentMethod = bidFilePaymentMethod; } public String getBidFilePaymentMethod() { @@ -306,19 +304,13 @@ public class Bid extends BaseEntity { return bidPaymentDeviation; } - public void setBidCopperPriceLinkage(String bidCopperPriceLinkage) - { - this.bidCopperPriceLinkage = bidCopperPriceLinkage; - } + public void setBidCopperPriceLinkage(String bidCopperPriceLinkage) { this.bidCopperPriceLinkage = bidCopperPriceLinkage; } public String getBidCopperPriceLinkage() { return bidCopperPriceLinkage; } - public void setBidPriceLinkageMethod(String bidPriceLinkageMethod) - { - this.bidPriceLinkageMethod = bidPriceLinkageMethod; - } + public void setBidPriceLinkageMethod(String bidPriceLinkageMethod) { this.bidPriceLinkageMethod = bidPriceLinkageMethod; } public String getBidPriceLinkageMethod() { @@ -333,28 +325,19 @@ public class Bid extends BaseEntity { return bidOtherRequire; } - public void setBidWinningAmount(String bidWinningAmount) - { - this.bidWinningAmount = bidWinningAmount; - } + public void setBidWinningAmount(String bidWinningAmount) { this.bidWinningAmount = bidWinningAmount; } public String getBidWinningAmount() { return bidWinningAmount; } - public void setBidCopperCableAmount(String bidCopperCableAmount) - { - this.bidCopperCableAmount = bidCopperCableAmount; - } + public void setBidCopperCableAmount(String bidCopperCableAmount) { this.bidCopperCableAmount = bidCopperCableAmount; } public String getBidCopperCableAmount() { return bidCopperCableAmount; } - public void setBidAluminumCableAmount(String bidAluminumCableAmount) - { - this.bidAluminumCableAmount = bidAluminumCableAmount; - } + public void setBidAluminumCableAmount(String bidAluminumCableAmount) { this.bidAluminumCableAmount = bidAluminumCableAmount; } public String getBidAluminumCableAmount() { @@ -369,15 +352,9 @@ public class Bid extends BaseEntity { return bidOpenClose; } - public void setBidPriceAdjustmentNotice(String bidPriceAdjustmentNotice) - { - this.bidPriceAdjustmentNotice = bidPriceAdjustmentNotice; - } + public void setBidPriceAdjustmentNotice(String bidPriceAdjustmentNotice) { this.bidPriceAdjustmentNotice = bidPriceAdjustmentNotice; } - public String getBidPriceAdjustmentNotice() - { - return bidPriceAdjustmentNotice; - } + public String getBidPriceAdjustmentNotice() { return bidPriceAdjustmentNotice; } public void setBidValidityPeriod(String bidValidityPeriod) { this.bidValidityPeriod = bidValidityPeriod; @@ -432,10 +409,7 @@ public class Bid extends BaseEntity { return bidPrice; } - public void setBidBusinessSettlement(String bidBusinessSettlement) - { - this.bidBusinessSettlement = bidBusinessSettlement; - } + public void setBidBusinessSettlement(String bidBusinessSettlement) { this.bidBusinessSettlement = bidBusinessSettlement; } public String getBidBusinessSettlement() { @@ -450,10 +424,7 @@ public class Bid extends BaseEntity { return bidBond; } - public void setBidWinningServiceFee(String bidWinningServiceFee) - { - this.bidWinningServiceFee = bidWinningServiceFee; - } + public void setBidWinningServiceFee(String bidWinningServiceFee) { this.bidWinningServiceFee = bidWinningServiceFee; } public String getBidWinningServiceFee() { @@ -522,10 +493,7 @@ public class Bid extends BaseEntity { return bidPriceLinkage; } - public void setBidPaymentMethod(String bidPaymentMethod) - { - this.bidPaymentMethod = bidPaymentMethod; - } + public void setBidPaymentMethod(String bidPaymentMethod) { this.bidPaymentMethod = bidPaymentMethod; } public String getBidPaymentMethod() { @@ -536,28 +504,19 @@ public class Bid extends BaseEntity this.bidOtherMatters = bidOtherMatters; } - public String getBidOtherMatters() - { - return bidOtherMatters; - } + public String getBidOtherMatters() { return bidOtherMatters; } public void setBidZbr(String bidZbr) { this.bidZbr = bidZbr; } - public String getBidZbr() - { - return bidZbr; - } + public String getBidZbr() { return bidZbr; } public void setBidJdr(String bidJdr) { this.bidJdr = bidJdr; } - public String getBidJdr() - { - return bidJdr; - } + public String getBidJdr() { return bidJdr; } public void setBidShr(String bidShr) { this.bidShr = bidShr; @@ -576,16 +535,12 @@ public class Bid extends BaseEntity { return bidApprovalStatus; } - public void setBidNotificationAward(String bidNotificationAward) - { - this.bidNotificationAward = bidNotificationAward; - } + public void setBidNotificationAward(String bidNotificationAward) { this.bidNotificationAward = bidNotificationAward; } public String getBidNotificationAward() { return bidNotificationAward; } - public String getBidRemark() { return bidRemark; } @@ -593,7 +548,6 @@ public class Bid extends BaseEntity public void setBidRemark(String bidRemark) { this.bidRemark = bidRemark; } - public String getBidReturnRemark() { return bidReturnRemark; } @@ -601,12 +555,10 @@ public class Bid extends BaseEntity public void setBidReturnRemark(String bidReturnRemark) { this.bidReturnRemark = bidReturnRemark; } + public String getCreateName() { return createName; } - public String getCreateName() { - return createName; - } + public void setCreateName(String createName) { this.createName = createName; } + public String getReceiveUserName() { return receiveUserName; } - public void setCreateName(String createName) { - this.createName = createName; - } + public void setReceiveUserName(String receiveUserName) { this.receiveUserName = receiveUserName; } } diff --git a/ruoyi-system/src/main/resources/mapper/bid/BidMapper.xml b/ruoyi-system/src/main/resources/mapper/bid/BidMapper.xml index 83a68db..7498da0 100644 --- a/ruoyi-system/src/main/resources/mapper/bid/BidMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/bid/BidMapper.xml @@ -55,6 +55,7 @@ + @@ -82,7 +83,7 @@ a.bid_warranty_period, a.bid_bidding, a.bid_evaluation_method, a.bid_technical_require, a.bid_price_linkage, a.bid_payment_method, a.bid_other_matters, a.bid_zbr, a.bid_jdr, a.bid_shr, a.bid_approval_status, a.bid_notification_award, a.bid_remark,a.bid_returnRemark, - a.create_by,u.nick_name create_name, a.create_time, + a.receive_user_name,a.create_by,u.nick_name create_name, a.create_time, a.update_by, a.update_time from bid a @@ -97,6 +98,8 @@ and bid_project like concat('%', #{bidProject}, '%') and bid_authorized_representative like concat('%', #{bidAuthorizedRepresentative}, '%') and bid_approval_status = #{bidApprovalStatus} + + and receive_user_name = #{receiveUserName} ${params.dataScope} @@ -160,6 +163,7 @@ bid_notification_award, bid_remark, bid_returnRemark, + receive_user_name, create_by, create_time, @@ -217,6 +221,7 @@ #{bidNotificationAward}, #{bidRemark}, #{bidReturnRemark}, + #{receiveUserName}, #{createBy}, #{createTime}, @@ -277,6 +282,7 @@ bid_notification_award = #{bidNotificationAward}, bid_remark = #{bidRemark}, bid_returnRemark = #{bidReturnRemark}, + receive_user_name = #{receiveUserName}, create_by = #{createBy}, create_time = #{createTime}, diff --git a/ruoyi-ui/src/api/bid/bid.js b/ruoyi-ui/src/api/bid/bid.js index ce9ed21..67f53c1 100644 --- a/ruoyi-ui/src/api/bid/bid.js +++ b/ruoyi-ui/src/api/bid/bid.js @@ -1,5 +1,13 @@ import request from '@/utils/request' +// 分派 +export function bidAssign(query) { + return request({ + url: '/bid/bid/bidAssign', + method: 'post', + data: query + }) +} // 查询投标信息列表 export function listBid(query) { return request({ diff --git a/ruoyi-ui/src/views/bid/bid/index.vue b/ruoyi-ui/src/views/bid/bid/index.vue index 25822d4..9a0a54f 100644 --- a/ruoyi-ui/src/views/bid/bid/index.vue +++ b/ruoyi-ui/src/views/bid/bid/index.vue @@ -103,6 +103,17 @@ v-hasPermi="['bid:bid:export']" >导出 + + 分派 +
@@ -331,7 +342,6 @@ -
投标信息 @@ -528,6 +538,7 @@ +