From a16a6398f0ea49e1df1fb47f028c0cdbebf96a9c Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 9 Apr 2024 16:29:20 +0800 Subject: [PATCH] '123' --- .../technicalConfirm/QuotJsqrController.java | 86 +++++++++++- .../domain/QuotJsqrXzDetail.java | 115 ++++++++++++++++ .../api/technicalConfirm/technicalConfirm.js | 4 +- .../technicalConfirm/index.vue | 129 ++++++++++++++---- 4 files changed, 299 insertions(+), 35 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/domain/QuotJsqrXzDetail.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java index 2b2e881..7d44614 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java @@ -3,8 +3,10 @@ package com.ruoyi.web.controller.technicalConfirm; import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.technicalConfirm.domain.QuotJsqr; +import com.ruoyi.technicalConfirm.domain.QuotJsqrXzDetail; import com.ruoyi.technicalConfirm.service.IQuotJsqrService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -100,77 +102,151 @@ public class QuotJsqrController extends BaseController @PreAuthorize("@ss.hasPermi('jsqr:jsqr:query')") @Log(title = "报价单-技术确认单协助操作", businessType = BusinessType.UPDATE) @PostMapping("/doOperate") - public AjaxResult doOperate(HttpServletResponse response, String quotJsxzGroup,String type,String state, String quotJsqrId) + public AjaxResult doOperate(HttpServletResponse response, @RequestBody QuotJsqrXzDetail info) { QuotJsqr quotJsqr = new QuotJsqr(); + String quotJsqrId = info.getQuotJsqrId(); quotJsqr.setQuotJsqrId(quotJsqrId); + + String quotJsxzGroup = info.getQuotJsxzGroup(); + String type = info.getType(); + String state = info.getState(); + if("TL".equals(quotJsxzGroup)){ if("operater".equals(type)){ quotJsqr.setQuotJsqrTlOperateUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrTlOperateTime(DateUtils.getTime()); quotJsqr.setQuotJsqrTlOperateState(state); + if("3".equals(state)){//驳回 + quotJsqr.setQuotJsqrTlApprovalStatus("3");//特缆协助状态 设置为 驳回 + } } if("checker".equals(type)){ quotJsqr.setQuotJsqrTlCheckUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrTlCheckTime(DateUtils.getTime()); quotJsqr.setQuotJsqrTlCheckState(state); + if("3".equals(state)){//驳回 + String quotJsqrTlCheckRemark = info.getQuotJsqrTlCheckRemark(); + if(StringUtils.isEmpty(quotJsqrTlCheckRemark)){ + return error("特缆审核意见不能为空"); + } + quotJsqr.setQuotJsqrTlOperateState("0");//特缆操作状态 设置为 待通过 + } } if("leader".equals(type)){ quotJsqr.setQuotJsqrTlLeaderUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrTlLeaderTime(DateUtils.getTime()); quotJsqr.setQuotJsqrTlLeaderState(state); - //TODO 协助状态更新 + if("3".equals(state)){//驳回 + String quotJsqrTlLeaderRemark = info.getQuotJsqrTlLeaderRemark(); + if(StringUtils.isEmpty(quotJsqrTlLeaderRemark)){ + return error("特缆组长确认意见不能为空"); + } + quotJsqr.setQuotJsqrTlOperateState("0");//特缆操作状态 设置为 待通过 + quotJsqr.setQuotJsqrTlCheckState("0");//特缆审核状态 设置为 待通过 + } } }else if("DY".equals(quotJsxzGroup)){ if("operater".equals(type)){ quotJsqr.setQuotJsqrDyOperateUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrDyOperateTime(DateUtils.getTime()); quotJsqr.setQuotJsqrDyOperateState(state); + if("3".equals(state)){//驳回 + quotJsqr.setQuotJsqrDyApprovalStatus("3");//低压协助状态 设置为 驳回 + } } if("checker".equals(type)){ quotJsqr.setQuotJsqrDyCheckUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrDyCheckTime(DateUtils.getTime()); quotJsqr.setQuotJsqrDyCheckState(state); + if("3".equals(state)){//驳回 + String quotJsqrDyCheckRemark = info.getQuotJsqrDyCheckRemark(); + if(StringUtils.isEmpty(quotJsqrDyCheckRemark)){ + return error("低压审核意见不能为空"); + } + quotJsqr.setQuotJsqrDyOperateState("0");//低压操作状态 设置为 待通过 + } } if("leader".equals(type)){ quotJsqr.setQuotJsqrDyLeaderUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrDyLeaderTime(DateUtils.getTime()); quotJsqr.setQuotJsqrDyLeaderState(state); - //TODO 协助状态更新 + if("3".equals(state)){//驳回 + String quotJsqrDyLeaderRemark = info.getQuotJsqrDyLeaderRemark(); + if(StringUtils.isEmpty(quotJsqrDyLeaderRemark)){ + return error("低压组长确认意见不能为空"); + } + quotJsqr.setQuotJsqrDyOperateState("0");//低压操作状态 设置为 待通过 + quotJsqr.setQuotJsqrDyCheckState("0");//低压审核状态 设置为 待通过 + } } }else if("ZY".equals(quotJsxzGroup)){ if("operater".equals(type)){ quotJsqr.setQuotJsqrZyOperateUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrZyOperateTime(DateUtils.getTime()); quotJsqr.setQuotJsqrZyOperateState(state); + if("3".equals(state)){//驳回 + quotJsqr.setQuotJsqrZyApprovalStatus("3");//中压协助状态 设置为 驳回 + } } if("checker".equals(type)){ quotJsqr.setQuotJsqrZyCheckUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrZyCheckTime(DateUtils.getTime()); quotJsqr.setQuotJsqrZyCheckState(state); + if("3".equals(state)){//驳回 + String quotJsqrZyCheckRemark = info.getQuotJsqrZyCheckRemark(); + if(StringUtils.isEmpty(quotJsqrZyCheckRemark)){ + return error("中压审核意见不能为空"); + } + quotJsqr.setQuotJsqrZyOperateState("0");//中压操作状态 设置为 待通过 + } } if("leader".equals(type)){ quotJsqr.setQuotJsqrZyLeaderUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrZyLeaderTime(DateUtils.getTime()); quotJsqr.setQuotJsqrZyLeaderState(state); - //TODO 协助状态更新 + if("3".equals(state)){//驳回 + String quotJsqrZyLeaderRemark = info.getQuotJsqrZyLeaderRemark(); + if(StringUtils.isEmpty(quotJsqrZyLeaderRemark)){ + return error("中压组长确认意见不能为空"); + } + quotJsqr.setQuotJsqrZyOperateState("0");//中压操作状态 设置为 待通过 + quotJsqr.setQuotJsqrZyCheckState("0");//中压审核状态 设置为 待通过 + } } }else if("QT".equals(quotJsxzGroup)){ if("operater".equals(type)){ quotJsqr.setQuotJsqrQtOperateUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrQtOperateTime(DateUtils.getTime()); quotJsqr.setQuotJsqrQtOperateState(state); + if("3".equals(state)){//驳回 + quotJsqr.setQuotJsqrQtApprovalStatus("3");//其他协助状态 设置为 驳回 + } } if("checker".equals(type)){ quotJsqr.setQuotJsqrQtCheckUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrQtCheckTime(DateUtils.getTime()); quotJsqr.setQuotJsqrQtCheckState(state); + if("3".equals(state)){//驳回 + String quotJsqrQtCheckRemark = info.getQuotJsqrQtCheckRemark(); + if(StringUtils.isEmpty(quotJsqrQtCheckRemark)){ + return error("其他审核意见不能为空"); + } + quotJsqr.setQuotJsqrQtOperateState("0");//其他操作状态 设置为 待通过 + } } if("leader".equals(type)){ quotJsqr.setQuotJsqrQtLeaderUserName(getLoginUser().getUser().getNickName()); quotJsqr.setQuotJsqrQtLeaderTime(DateUtils.getTime()); quotJsqr.setQuotJsqrQtLeaderState(state); - //TODO 协助状态更新 + if("3".equals(state)){//驳回 + String quotJsqrQtLeaderRemark = info.getQuotJsqrQtLeaderRemark(); + if(StringUtils.isEmpty(quotJsqrQtLeaderRemark)){ + return error("其他确认意见不能为空"); + } + quotJsqr.setQuotJsqrQtOperateState("0");//其他操作状态 设置为 待通过 + quotJsqr.setQuotJsqrQtCheckState("0");//其他审核状态 设置为 待通过 + } } } quotJsqrService.updateQuotJsqr(quotJsqr); diff --git a/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/domain/QuotJsqrXzDetail.java b/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/domain/QuotJsqrXzDetail.java new file mode 100644 index 0000000..88d2e16 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/technicalConfirm/domain/QuotJsqrXzDetail.java @@ -0,0 +1,115 @@ +package com.ruoyi.technicalConfirm.domain; + +public class QuotJsqrXzDetail { + private String quotJsqrId; + private String quotJsxzGroup; + private String type; + private String state; + private String quotJsqrTlCheckRemark; + private String quotJsqrTlLeaderRemark; + + private String quotJsqrDyCheckRemark; + private String quotJsqrDyLeaderRemark; + + private String quotJsqrZyCheckRemark; + private String quotJsqrZyLeaderRemark; + + private String quotJsqrQtCheckRemark; + private String quotJsqrQtLeaderRemark; + + public String getQuotJsqrId() { + return quotJsqrId; + } + + public void setQuotJsqrId(String quotJsqrId) { + this.quotJsqrId = quotJsqrId; + } + + public String getQuotJsxzGroup() { + return quotJsxzGroup; + } + + public void setQuotJsxzGroup(String quotJsxzGroup) { + this.quotJsxzGroup = quotJsxzGroup; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getQuotJsqrTlCheckRemark() { + return quotJsqrTlCheckRemark; + } + + public void setQuotJsqrTlCheckRemark(String quotJsqrTlCheckRemark) { + this.quotJsqrTlCheckRemark = quotJsqrTlCheckRemark; + } + + public String getQuotJsqrTlLeaderRemark() { + return quotJsqrTlLeaderRemark; + } + + public void setQuotJsqrTlLeaderRemark(String quotJsqrTlLeaderRemark) { + this.quotJsqrTlLeaderRemark = quotJsqrTlLeaderRemark; + } + + public String getQuotJsqrDyCheckRemark() { + return quotJsqrDyCheckRemark; + } + + public void setQuotJsqrDyCheckRemark(String quotJsqrDyCheckRemark) { + this.quotJsqrDyCheckRemark = quotJsqrDyCheckRemark; + } + + public String getQuotJsqrDyLeaderRemark() { + return quotJsqrDyLeaderRemark; + } + + public void setQuotJsqrDyLeaderRemark(String quotJsqrDyLeaderRemark) { + this.quotJsqrDyLeaderRemark = quotJsqrDyLeaderRemark; + } + + public String getQuotJsqrZyCheckRemark() { + return quotJsqrZyCheckRemark; + } + + public void setQuotJsqrZyCheckRemark(String quotJsqrZyCheckRemark) { + this.quotJsqrZyCheckRemark = quotJsqrZyCheckRemark; + } + + public String getQuotJsqrZyLeaderRemark() { + return quotJsqrZyLeaderRemark; + } + + public void setQuotJsqrZyLeaderRemark(String quotJsqrZyLeaderRemark) { + this.quotJsqrZyLeaderRemark = quotJsqrZyLeaderRemark; + } + + public String getQuotJsqrQtCheckRemark() { + return quotJsqrQtCheckRemark; + } + + public void setQuotJsqrQtCheckRemark(String quotJsqrQtCheckRemark) { + this.quotJsqrQtCheckRemark = quotJsqrQtCheckRemark; + } + + public String getQuotJsqrQtLeaderRemark() { + return quotJsqrQtLeaderRemark; + } + + public void setQuotJsqrQtLeaderRemark(String quotJsqrQtLeaderRemark) { + this.quotJsqrQtLeaderRemark = quotJsqrQtLeaderRemark; + } +} diff --git a/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js b/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js index ac9e46c..570c7ad 100644 --- a/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js +++ b/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js @@ -44,10 +44,10 @@ export function delJsqr(quotJsqrId) { } //操作人、审核人、组长 确认事件 -export function doOperate(quotJsxzGroup,type,state,quotJsqrId) { +export function doOperate(param) { return request({ url: '/jsqr/jsqr/doOperate', method: 'post', - params: {quotJsxzGroup:quotJsxzGroup,type:type,state:state,quotJsqrId:quotJsqrId} + data: param }) } diff --git a/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue b/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue index c07833a..9133b1b 100644 --- a/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue +++ b/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue @@ -173,12 +173,18 @@