From 34900a30dd091b3b4ee24ebfcc8b80276ce1f265 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Thu, 17 Apr 2025 09:18:44 +0800 Subject: [PATCH] 2025-04-17 --- .../spring/modules/quotation/vo/QuotationInformationVo.java | 2 ++ .../spring/modules/quote/service/impl/QuoteServiceImpl.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/spring/modules/quotation/vo/QuotationInformationVo.java b/src/main/java/com/spring/modules/quotation/vo/QuotationInformationVo.java index 26f5215d..59fed9f0 100644 --- a/src/main/java/com/spring/modules/quotation/vo/QuotationInformationVo.java +++ b/src/main/java/com/spring/modules/quotation/vo/QuotationInformationVo.java @@ -94,4 +94,6 @@ public class QuotationInformationVo extends QuotationInformationEntity { private String approvalUsername; + private String currency; + } diff --git a/src/main/java/com/spring/modules/quote/service/impl/QuoteServiceImpl.java b/src/main/java/com/spring/modules/quote/service/impl/QuoteServiceImpl.java index fefc72f6..025c26b3 100644 --- a/src/main/java/com/spring/modules/quote/service/impl/QuoteServiceImpl.java +++ b/src/main/java/com/spring/modules/quote/service/impl/QuoteServiceImpl.java @@ -210,6 +210,9 @@ public class QuoteServiceImpl extends ServiceImpl implements public List batchSaveQuoteByQuotation(List list) { List ids = new ArrayList<>();// 获取保存成功的报价单ID for (QuotationInformationVo quotation : list) { + if (Objects.isNull(quotation.getCurrency())){ + throw new RuntimeException("币种不能为空"); + } if (Objects.isNull(quotation.getQty())){ throw new RuntimeException("数量不能为空"); } @@ -313,7 +316,7 @@ public class QuoteServiceImpl extends ServiceImpl implements detail.setCalculatedItems("工具,测试,其他,包装,运输"); detail.setMoq(""); // 添加币种字段 - + detail.setCurrency1(quotation.getCurrency()); // 复制detail到Group QuoteGroupDetail groupDetail = new QuoteGroupDetail(); BeanUtils.copyProperties(detail, groupDetail);