Browse Source

2025-05-06

master
qiezi 8 months ago
parent
commit
461cd46e1d
  1. 44
      src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java

44
src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java

@ -608,28 +608,28 @@ public class QuotationInformationServiceImpl extends ServiceImpl<QuotationInform
// 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数 // 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数
List<String> quoteList = baseMapper.queryQuoteByQuotationBatchNo(data.getSite(),data.getQuotationBatchNo());
// 查询改询价批次号的询价条数
int count = baseMapper.queryQuotationByQuotationBatchNo(data.getSite(),data.getQuotationBatchNo());
// 不相等即条目不匹配有询价单号未产生报价
if (count != quoteList.size()){
throw new RuntimeException("该询价单的已下达报价明细不全,不能下达");
}
List<QuotationInformationEntity> 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("询价金额不能为空");
}
// List<String> quoteList = baseMapper.queryQuoteByQuotationBatchNo(data.getSite(),data.getQuotationBatchNo());
//
// // 查询改询价批次号的询价条数
// int count = baseMapper.queryQuotationByQuotationBatchNo(data.getSite(),data.getQuotationBatchNo());
//
// // 不相等即条目不匹配有询价单号未产生报价
// if (count != quoteList.size()){
// throw new RuntimeException("该询价单的已下达报价明细不全,不能下达");
// }
// List<QuotationInformationEntity> 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接口时 // 关闭调用OA接口时
if (!dataUrlOa) { if (!dataUrlOa) {
data.setQuotationStatus("审批中"); data.setQuotationStatus("审批中");

Loading…
Cancel
Save