diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination index cce2c99..184244c 100644 --- a/ABAP_AS_WITH_POOL.jcoDestination +++ b/ABAP_AS_WITH_POOL.jcoDestination @@ -1,5 +1,5 @@ #for tests only ! -#Mon Jul 15 16:53:18 CST 2024 +#Tue Jul 16 09:48:52 CST 2024 jco.destination.pool_capacity=10 jco.client.lang=ZH jco.client.ashost=172.19.0.125 @@ -7,5 +7,5 @@ jco.client.saprouter= jco.client.user=RFC jco.client.sysnr=00 jco.destination.peak_limit=10 -jco.client.passwd=654321 +jco.client.passwd=fIIvwvEBHbcBvFB_tS(Vu[3tV[6as:m0)kkAT/TIkq(z)5~9 jco.client.client=800 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 763c7c5..e3c69f5 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 @@ -1,5 +1,6 @@ package com.ruoyi.web.controller.bid; import java.util.List; +import javax.security.auth.Subject; import javax.servlet.http.HttpServletResponse; import com.ruoyi.bid.domain.BidFile; import com.ruoyi.bid.domain.SysOaBid; @@ -55,12 +56,15 @@ public class BidController extends BaseController { String[] bidIds = bid.getBidIds(); String receiveUserName = bid.getReceiveUserName(); + String receiveUserNickName = bid.getReceiveUserNickName(); for(String bidId:bidIds){ Bid entity = bidService.selectBidByBidId(bidId); -/* if(StringUtils.isNotEmpty(entity.getReceiveUserName())){ - return error("投标信息:"+entity.getBidCode()+" 已分派"); - }*/ + if(!"1".equals(entity.getBidApprovalStatus())){ + return error("投标信息:"+entity.getBidCode()+" 当前状态不是协助中"); + } + entity.setSetReceiveUser("0");//更新 是否已分派 为已分派 entity.setReceiveUserName(receiveUserName); + entity.setReceiveUserNickName(receiveUserNickName); bidService.updateBid(entity); } return success(); @@ -76,16 +80,10 @@ public class BidController extends BaseController startPage(); // 获取用户角色 --判断是否是投标小组-标书制作员角色 - Boolean bidBszzYRoleFlag = false; - List roles = SecurityUtils.getLoginUser().getUser().getRoles(); - for(SysRole sysRole:roles){ - String roleKey = sysRole.getRoleKey(); - if("BID_BSZZY".equals(roleKey)){ - bidBszzYRoleFlag = true; - break; - } - } - if(bidBszzYRoleFlag){ + Boolean bidBszzYRoleFlag = SecurityUtils.hasRole("BID_BSZZY"); + Boolean adminRoleFlag = SecurityUtils.hasRole("admin"); + if(bidBszzYRoleFlag&&!adminRoleFlag){ + bid.setSetReceiveUser("0"); bid.setReceiveUserName(getUsername()); } List list = bidService.selectBidList(bid); @@ -220,24 +218,11 @@ public class BidController extends BaseController * 提交OA事业部经理、店长/投标办按钮 */ @PreAuthorize("@ss.hasPermi('bid:bid:commit')") - @Log(title = "提交OA事业部经理、店长/投标办按钮", businessType = BusinessType.OTHER) + @Log(title = "提交投标办", businessType = BusinessType.OTHER) @PostMapping("/commitTbxx") public AjaxResult commitTbxx(@RequestBody Bid bid) { try{ - // 获取用户角色 --判断是否是投标小组经理角色 - Boolean tbbRoleFlag = false; - List roles = SecurityUtils.getLoginUser().getUser().getRoles(); - for(SysRole sysRole:roles){ - String roleKey = sysRole.getRoleKey(); - if("BID".equals(roleKey)){ - tbbRoleFlag = true; - break; - } - } - String bid_id = bid.getBidId(); - bid.setUpdateBy(getUsername()); - // TODO 如果是事业部、直营店 则提交OA审核, 如果是业务员则提交投标办审批(1-直营店,2-事业部) Long deptId = getLoginUser().getUser().getDeptId(); SysDept sysDept = deptService.selectDeptById(deptId); @@ -289,7 +274,7 @@ public class BidController extends BaseController } } - sysOaBid.setBidYwyFile(fileString); + sysOaBid.setBidYwyFile(fileString);// 上传附件 sysOaBid.setCreateTime(DateUtils.getNowDate()); sysOaBid.setIsFinish("0");// 投标信息已提交OA审批中 bidService.insertSysOABid(sysOaBid); @@ -299,12 +284,16 @@ public class BidController extends BaseController bid.setBidApprovalStatus("1"); } + // 获取用户角色 --判断是否是投标小组经理角色 + Boolean bidJlRoleFlag = SecurityUtils.hasRole("BID"); + + String bid_id = bid.getBidId(); if(StringUtils.isEmpty(bid_id)){ bid.setBidId(UUID.fastUUID().toString()); String bidCode = bidService.getCode("TBXX"); bid.setBidCode(bidCode); - if(tbbRoleFlag){ + if(bidJlRoleFlag){ bid.setCreateBy(bid.getBidSalesmanCode()); }else{ bid.setCreateBy(getUsername()); @@ -312,7 +301,7 @@ public class BidController extends BaseController bidService.insertBid(bid); return success(); }else{ - if(tbbRoleFlag){ + if(bidJlRoleFlag){ bid.setUpdateBy(bid.getBidSalesmanCode()); }else{ bid.setUpdateBy(getUsername()); 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 547eab6..9ebc698 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 @@ -53,6 +53,7 @@ public class Bid extends BaseEntity private String bidOpeningDate; /** 是否网上报价(0-是/1-否) */ + @Excel(name = "是否网上报价",dictType = "bid_online_quotation") private String bidOnlineQuotation; /** 报价平台网址 */ @@ -177,7 +178,7 @@ public class Bid extends BaseEntity private String bidShr; /** 提交状态 */ - @Excel(name = "提交状态") + @Excel(name = "提交状态",dictType = "bid_approval_status") private String bidApprovalStatus; /** 有无中标通知书(0-是/1-否) */ @@ -192,8 +193,12 @@ public class Bid extends BaseEntity /** 创建人 */ private String createName; + /** 分派情况 0-已分派/1-未分派 */ + private String setReceiveUser; + /** 分派接收人 */ private String receiveUserName; + private String receiveUserNickName; public void setBidId(String bidId) { @@ -578,7 +583,13 @@ public class Bid extends BaseEntity public String getCreateName() { return createName; } public void setCreateName(String createName) { this.createName = createName; } + public String getSetReceiveUser() { return setReceiveUser; } + + public void setSetReceiveUser(String setReceiveUser) { this.setReceiveUser = setReceiveUser; } public String getReceiveUserName() { return receiveUserName; } public void setReceiveUserName(String receiveUserName) { this.receiveUserName = receiveUserName; } + public String getReceiveUserNickName() { return receiveUserNickName; } + + public void setReceiveUserNickName(String receiveUserNickName) { this.receiveUserNickName = receiveUserNickName; } } diff --git a/ruoyi-system/src/main/resources/mapper/bid/BidMapper.xml b/ruoyi-system/src/main/resources/mapper/bid/BidMapper.xml index db38634..003b2c1 100644 --- a/ruoyi-system/src/main/resources/mapper/bid/BidMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/bid/BidMapper.xml @@ -58,7 +58,10 @@ + + + @@ -86,7 +89,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.receive_user_name,a.create_by,u.nick_name create_name, a.create_time, + a.set_receive_user,a.receive_user_name,a.receive_user_nick_name,a.create_by,u.nick_name create_name, a.create_time, a.update_by, a.update_time from bid a @@ -102,10 +105,12 @@ and bid_authorized_representative like concat('%', #{bidAuthorizedRepresentative}, '%') and bid_approval_status = #{bidApprovalStatus} + and set_receive_user = #{setReceiveUser} and receive_user_name = #{receiveUserName} ${params.dataScope} + order by a.bidCode desc