|
|
@ -891,16 +891,23 @@ public class QuotationInformationServiceImpl extends ServiceImpl<QuotationInform |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void checkProcessControl(Integer roleId, String site, String quotationBatchNo, BigDecimal quotationAmount) { |
|
|
private void checkProcessControl(Integer roleId, String site, String quotationBatchNo, BigDecimal quotationAmount) { |
|
|
|
|
|
// 查询改询价批次号的询价条数 |
|
|
|
|
|
int count = baseMapper.queryQuotationByQuotationBatchNo(site,quotationBatchNo); |
|
|
if (roleId.equals(3)){ |
|
|
if (roleId.equals(3)){ |
|
|
// 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数 |
|
|
// 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数 |
|
|
List<String> quoteList = baseMapper.queryQuoteByQuotationBatchNo(site,quotationBatchNo); |
|
|
List<String> quoteList = baseMapper.queryQuoteByQuotationBatchNo(site,quotationBatchNo); |
|
|
|
|
|
|
|
|
// 查询改询价批次号的询价条数 |
|
|
|
|
|
int count = baseMapper.queryQuotationByQuotationBatchNo(site,quotationBatchNo); |
|
|
|
|
|
|
|
|
// 不相等即条目不匹配,有询价单号未产生报价 |
|
|
|
|
|
if (count != quoteList.size() && quotationAmount.compareTo(BigDecimal.ZERO) <= 0) { |
|
|
|
|
|
throw new RuntimeException("必需存在已完成的报价记录或询价金额大于0,才能提交!"); |
|
|
|
|
|
} |
|
|
|
|
|
} else if (roleId.equals(15)) { |
|
|
|
|
|
// 判断是的存在报价明细 通过询价批次号获得报价中询价单号分组条数 |
|
|
|
|
|
List<String> quoteList = baseMapper.queryQuoteByQuotationBatchNo2(site,quotationBatchNo); |
|
|
|
|
|
|
|
|
// 不相等即条目不匹配,有询价单号未产生报价 |
|
|
// 不相等即条目不匹配,有询价单号未产生报价 |
|
|
if (count != quoteList.size() && quotationAmount.compareTo(BigDecimal.ZERO) <= 0) { |
|
|
if (count != quoteList.size() && quotationAmount.compareTo(BigDecimal.ZERO) <= 0) { |
|
|
throw new RuntimeException("必需存在已下达的报价记录或询价金额大于0,才能提交!"); |
|
|
|
|
|
|
|
|
throw new RuntimeException("必需存在已完成/审批中的报价记录或询价金额大于0,才能提交!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|