From 64760555010d56df31885b621631ef7becff3b62 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 23 Jul 2024 08:22:26 +0800 Subject: [PATCH] '123' --- .../web/controller/bid/BidController.java | 15 ++-- .../web/controller/zgys/ZgysController.java | 46 +++++++++++- ruoyi-ui/src/api/zgys/zgys.js | 9 +++ ruoyi-ui/src/views/zgys/zgys/index.vue | 72 ++++++++++++++++--- 4 files changed, 128 insertions(+), 14 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 4e8eae0..01a73f0 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 @@ -20,6 +20,7 @@ import com.ruoyi.quot.domain.Quot; import com.ruoyi.redBook.domain.OAQuot; import com.ruoyi.redBook.domain.RbVersionDateResult; import com.ruoyi.system.service.ISysDeptService; +import com.ruoyi.system.service.ISysUserService; import com.ruoyi.technicalConfirm.domain.BidJsqr; import com.ruoyi.technicalConfirm.service.IBidJsqrService; import com.ruoyi.technicalConfirm.service.IQuotJsqrService; @@ -56,6 +57,9 @@ public class BidController extends BaseController @Autowired private IBidJsqrService bidJsqrService; + @Autowired + private ISysUserService userService; + @Autowired private ISysDeptService deptService; @@ -244,13 +248,19 @@ public class BidController extends BaseController @ChangeRecordLog(serviceImplclass = "com.ruoyi.bid.service.impl.BidServiceImpl", serviceImplMethod="selectBidByBidId", tableId = "bidId",codeName = "bidCode") - @Log(title = "提交投标办", businessType = BusinessType.OTHER) + @Log(title = "投标信息提交投标办", businessType = BusinessType.OTHER) @PostMapping("/commitTbxx") public AjaxResult commitTbxx(@RequestBody Bid bid) { try{ // TODO 如果是事业部、直营店 则提交OA审核, 如果是业务员则提交投标办审批(1-直营店,2-事业部) Long deptId = getLoginUser().getUser().getDeptId(); + // 获取用户角色 --判断是否是投标小组经理角色 + Boolean bidJlRoleFlag = SecurityUtils.hasRole("BID"); + if(bidJlRoleFlag){ + deptId = userService.selectUserByUserName(bid.getBidSalesmanCode()).getDeptId(); + } + SysDept sysDept = deptService.selectDeptById(deptId); String zydSyb = sysDept.getZydSyb(); if("1".equals(zydSyb)||"2".equals(zydSyb)){ @@ -310,9 +320,6 @@ 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()); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zgys/ZgysController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zgys/ZgysController.java index c349b73..610d9f1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zgys/ZgysController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zgys/ZgysController.java @@ -2,9 +2,8 @@ package com.ruoyi.web.controller.zgys; import java.util.List; import javax.servlet.http.HttpServletResponse; - -import com.ruoyi.bid.domain.Bid; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.MinioUtil; @@ -107,6 +106,49 @@ public class ZgysController extends BaseController return toAjax(zgysService.updateZgys(zgys)); } + /** + * 提交投标办按钮 + */ + @PreAuthorize("@ss.hasPermi('zgys:zgys:commit')") + @ChangeRecordLog(serviceImplclass = "com.ruoyi.zgys.service.impl.ZgysServiceImpl", + serviceImplMethod="selectZgysByPqId", + tableId = "pqId",codeName = "pqCode") + @Log(title = "资格预审提交投标办", businessType = BusinessType.OTHER) + @PostMapping("/commitZgys") + public AjaxResult commitZgys(@RequestBody Zgys zgys) + { + try{ + zgys.setPqApprovalStatus("1"); + // 获取用户角色 --判断是否是投标小组经理角色 + Boolean bidJlRoleFlag = SecurityUtils.hasRole("BID"); + + String pq_id = zgys.getPqId(); + if(StringUtils.isEmpty(pq_id)){ + zgys.setPqId(UUID.fastUUID().toString()); + String pqCode = zgysService.getCode("ZGYS"); + zgys.setPqCode(pqCode); + + if(bidJlRoleFlag){ + zgys.setCreateBy(zgys.getPqSalesmanCode()); + }else{ + zgys.setCreateBy(getUsername()); + } + zgysService.insertZgys(zgys); + return success(); + }else{ + if(bidJlRoleFlag){ + zgys.setUpdateBy(zgys.getPqSalesmanCode()); + }else{ + zgys.setUpdateBy(getUsername()); + } + zgysService.updateZgys(zgys); + return success(); + } + }catch (Exception e){ + return error("系统异常"); + } + } + /** * 删除资格预审 */ diff --git a/ruoyi-ui/src/api/zgys/zgys.js b/ruoyi-ui/src/api/zgys/zgys.js index 34a2dfb..e21d0c8 100644 --- a/ruoyi-ui/src/api/zgys/zgys.js +++ b/ruoyi-ui/src/api/zgys/zgys.js @@ -60,3 +60,12 @@ export function zgysFileDelete(fileId) { params: {fileId:fileId} }) } + +//提交投标办按钮 +export function commitZgys(data) { + return request({ + url: '/zgys/zgys/commitZgys', + method: 'post', + data: data + }) +} diff --git a/ruoyi-ui/src/views/zgys/zgys/index.vue b/ruoyi-ui/src/views/zgys/zgys/index.vue index 3f42229..c3b69bb 100644 --- a/ruoyi-ui/src/views/zgys/zgys/index.vue +++ b/ruoyi-ui/src/views/zgys/zgys/index.vue @@ -163,7 +163,7 @@ /> - + 当前协助情况 @@ -195,7 +195,8 @@ - + + @@ -346,9 +347,11 @@ + @@ -372,17 +375,27 @@ }