From 88f8bed74816c2fa223e81921715711e0416aee8 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Tue, 29 Apr 2025 18:01:14 +0800 Subject: [PATCH] 2025-04-29 --- .../impl/QuotationInformationServiceImpl.java | 25 +++++++++++++++++++ .../TechnicalSpecificationServiceImpl.java | 4 +++ 2 files changed, 29 insertions(+) diff --git a/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java b/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java index a09a77a7..b1b1b58b 100644 --- a/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java @@ -605,6 +605,31 @@ public class QuotationInformationServiceImpl extends ServiceImpl updateInformationWrapper = new UpdateWrapper<>(); updateInformationWrapper.eq("site", data.getSite()); updateInformationWrapper.eq("quotation_batch_no", data.getQuotationBatchNo()); + + + // 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数 + List quoteList = baseMapper.queryQuoteByQuotationBatchNo(data.getSite(),data.getQuotationBatchNo()); + + // 查询改询价批次号的询价条数 + int count = baseMapper.queryQuotationByQuotationBatchNo(data.getSite(),data.getQuotationBatchNo()); + + // 不相等即条目不匹配,有询价单号未产生报价 + if (count != quoteList.size()){ + throw new RuntimeException("该询价单的已下达报价明细不全,不能下达"); + } + List list = lambdaQuery() + .eq(QuotationInformationEntity::getSite, data.getSite()) + .eq(QuotationInformationEntity::getQuotationBatchNo, data.getQuotationBatchNo()) + .list(); + QuotationInformationEntity entity = list.get(0); + if (Objects.isNull(entity)) { + throw new RuntimeException("询价单不存在"); + } +// if (Objects.isNull(entity.getQuotationAmount()) || entity.getQuotationAmount().compareTo(BigDecimal.ZERO) <= 0) { + if (Objects.isNull(entity.getQuotationAmount()) ) { +// throw new RuntimeException("询价金额不能为空或者小于等于0!"); + throw new RuntimeException("询价金额不能为空"); + } // 关闭调用OA接口时 if (!dataUrlOa) { data.setQuotationStatus("审批中"); diff --git a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java index af6ec334..b15a5f6a 100644 --- a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java +++ b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java @@ -1158,6 +1158,8 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification public void issueChange(PlmTechnicalSpecificationSheetData data) { SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); data.setUserName(sysUserEntity.getUsername()); + // 修改 + updateBMBasicInformation(data); // 关闭调用OA接口时 if (!dataUrlOa) { data.setStatus("spz"); @@ -1285,6 +1287,8 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification public void submitChange(PlmTechnicalSpecificationSheetData data) { SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); data.setUserName(sysUserEntity.getUsername()); + // 修改 + updateBMBasicInformation(data); // 获取提交基础数据 Map baseData = changeManagementService.getSubmitBaseData(data.getSite(), data.getUserName(), data.getCodeNo()); // 4、 接口:流程提交接口(同意) / 流程退回接口(驳回)