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 9aa87d3..36d7c9e 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 @@ -5,6 +5,8 @@ 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.quot.domain.Quot; +import com.ruoyi.quot.service.IQuotService; import com.ruoyi.technicalConfirm.domain.QuotJsqr; import com.ruoyi.technicalConfirm.domain.QuotJsqrXzDetail; import com.ruoyi.technicalConfirm.service.IQuotJsqrService; @@ -39,6 +41,9 @@ public class QuotJsqrController extends BaseController @Autowired private IQuotJsqrService quotJsqrService; + @Autowired + private IQuotService quotService; + /** * 查询报价单-技术确认单列表 */ @@ -260,4 +265,67 @@ public class QuotJsqrController extends BaseController quotJsqrService.updateQuotJsqr(quotJsqr); return success(quotJsqr); } + + /** + * 获取报价单-技术确认单详细信息 + */ + @PreAuthorize("@ss.hasPermi('jsqr:jsqr:commit')") + @PostMapping("/commitQuot") + public AjaxResult commitQuot(@RequestBody QuotJsqr quotJsqr) + { + String quotJsqrId = quotJsqr.getQuotJsqrId(); + + QuotJsqr info = quotJsqrService.selectQuotJsqrByQuotJsqrId(quotJsqrId); + Quot quot = quotService.selectQuotByQuotJsqrId(quotJsqrId); + String quot_jsxz_group = quot.getQuotJsxzGroup(); + + String quotJsxzConfirmId = quot.getQuotJsxzConfirmId(); + if(StringUtils.isNotEmpty(quotJsxzConfirmId)){ + Boolean tlFlag = true; + if(quot_jsxz_group.indexOf("TL")!=-1) {//校验特缆 操作人、审核人、组长 通过情况 + String quot_jsqr_tl_approval_status = info.getQuotJsqrTlApprovalStatus(); + if ("1".equals(quot_jsqr_tl_approval_status)) { + tlFlag = false; + } + } + if(!tlFlag){ + return error("特缆协助还未完成"); + } + + Boolean dyFlag = true; + if(quot_jsxz_group.indexOf("DY")!=-1) {//校验特缆 操作人、审核人、组长 通过情况 + String quot_jsqr_dy_approval_status = info.getQuotJsqrDyApprovalStatus(); + if ("1".equals(quot_jsqr_dy_approval_status)) { + dyFlag = false; + } + } + if(!dyFlag){ + return error("低压协助还未完成"); + } + + Boolean zyFlag = true; + if(quot_jsxz_group.indexOf("ZY")!=-1) {//校验特缆 操作人、审核人、组长 通过情况 + String quot_jsqr_zy_approval_status = info.getQuotJsqrZyApprovalStatus(); + if ("1".equals(quot_jsqr_zy_approval_status)) { + zyFlag = false; + } + } + if(!zyFlag){ + return error("中压协助还未完成"); + } + + Boolean qtFlag = true; + if(quot_jsxz_group.indexOf("QT")!=-1) {//校验特缆 操作人、审核人、组长 通过情况 + String quot_jsqr_qt_approval_status = info.getQuotJsqrQtApprovalStatus(); + if ("1".equals(quot_jsqr_qt_approval_status)) { + qtFlag = false; + } + } + if(!qtFlag){ + return error("其他协助还未完成"); + } + quot.setQuotJsxzApprovalStatus("2");//报价单-技术协助状态 设置为 已协助 + } + return success(quotService.updateQuot(quot)); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java b/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java index a777995..00c95ea 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java @@ -6,15 +6,15 @@ import com.ruoyi.quot.domain.QuotMaterial; /** * 报价Mapper接口 - * + * * @author ruoyi * @date 2024-04-01 */ -public interface QuotMapper +public interface QuotMapper { /** * 查询报价 - * + * * @param quotId 报价主键 * @return 报价 */ @@ -22,7 +22,7 @@ public interface QuotMapper /** * 查询报价列表 - * + * * @param quot 报价 * @return 报价集合 */ @@ -30,7 +30,7 @@ public interface QuotMapper /** * 新增报价 - * + * * @param quot 报价 * @return 结果 */ @@ -38,7 +38,7 @@ public interface QuotMapper /** * 修改报价 - * + * * @param quot 报价 * @return 结果 */ @@ -46,7 +46,7 @@ public interface QuotMapper /** * 删除报价 - * + * * @param quotId 报价主键 * @return 结果 */ @@ -54,7 +54,7 @@ public interface QuotMapper /** * 批量删除报价 - * + * * @param quotIds 需要删除的数据主键集合 * @return 结果 */ @@ -62,26 +62,33 @@ public interface QuotMapper /** * 批量删除报价单-产品 - * + * * @param quotIds 需要删除的数据主键集合 * @return 结果 */ public int deleteQuotMaterialByQuotIds(String[] quotIds); - + /** * 批量新增报价单-产品 - * + * * @param quotMaterialList 报价单-产品列表 * @return 结果 */ public int batchQuotMaterial(List quotMaterialList); - + /** * 通过报价主键删除报价单-产品信息 - * + * * @param quotId 报价ID * @return 结果 */ public int deleteQuotMaterialByQuotId(String quotId); + + /** + * 技术确认单Id + * @param quotJsqrId + * @return + */ + Quot selectQuotByQuotJsqrId(String quotJsqrId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java b/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java index 923d8ba..f8a46da 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java @@ -5,15 +5,15 @@ import com.ruoyi.quot.domain.Quot; /** * 报价Service接口 - * + * * @author ruoyi * @date 2024-04-01 */ -public interface IQuotService +public interface IQuotService { /** * 查询报价 - * + * * @param quotId 报价主键 * @return 报价 */ @@ -21,7 +21,7 @@ public interface IQuotService /** * 查询报价列表 - * + * * @param quot 报价 * @return 报价集合 */ @@ -29,7 +29,7 @@ public interface IQuotService /** * 新增报价 - * + * * @param quot 报价 * @return 结果 */ @@ -37,7 +37,7 @@ public interface IQuotService /** * 修改报价 - * + * * @param quot 报价 * @return 结果 */ @@ -45,7 +45,7 @@ public interface IQuotService /** * 批量删除报价 - * + * * @param quotIds 需要删除的报价主键集合 * @return 结果 */ @@ -53,9 +53,16 @@ public interface IQuotService /** * 删除报价信息 - * + * * @param quotId 报价主键 * @return 结果 */ public int deleteQuotByQuotId(String quotId); + + /** + * 技术确认单Id + * @param quotJsqrId + * @return + */ + Quot selectQuotByQuotJsqrId(String quotJsqrId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java index 1b05d05..dad5b1d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java @@ -112,6 +112,16 @@ public class QuotServiceImpl implements IQuotService return quotMapper.deleteQuotByQuotId(quotId); } + /** + * 技术确认单Id + * @param quotJsqrId + * @return + */ + @Override + public Quot selectQuotByQuotJsqrId(String quotJsqrId) { + return quotMapper.selectQuotByQuotJsqrId(quotJsqrId); + } + /** * 新增报价单-产品信息 * diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml index e98205a..8826e5e 100644 --- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml @@ -245,4 +245,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ( #{item.matId}, #{item.matXingh}, #{item.matGuig}, #{item.matDiany}, #{item.matDanw}, #{item.matSl}, #{item.quotId}) + + + diff --git a/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js b/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js index 570c7ad..a03d850 100644 --- a/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js +++ b/ruoyi-ui/src/api/technicalConfirm/technicalConfirm.js @@ -51,3 +51,12 @@ export function doOperate(param) { data: param }) } + +//提交报价技术确认单 +export function commitQuot(data) { + return request({ + url: '/jsqr/jsqr/commitQuot', + method: 'post', + data: data + }) +} diff --git a/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue b/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue index bc98bcb..d7c8f94 100644 --- a/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue +++ b/ruoyi-ui/src/views/technicalConfirm/technicalConfirm/index.vue @@ -399,7 +399,7 @@ - + @@ -430,7 +430,7 @@ - + @@ -530,7 +530,7 @@ - + @@ -561,7 +561,7 @@ - + @@ -661,7 +661,7 @@ - + @@ -692,7 +692,7 @@ - + @@ -735,8 +735,8 @@ @@ -764,7 +764,7 @@ }