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);