|
...
|
...
|
@@ -104,6 +104,7 @@ public class SupplierQuotationProjectQuoteServiceImpl |
|
104
|
104
|
data.setBidStatus(null);
|
|
105
|
105
|
getBaseMapper().insert(data);
|
|
106
|
106
|
} else {
|
|
|
107
|
+ validateQuoteCanRequote(exist.getBidStatus());
|
|
107
|
108
|
LambdaUpdateWrapper<SupplierQuotationProjectQuote> updateWrapper = Wrappers.lambdaUpdate(SupplierQuotationProjectQuote.class)
|
|
108
|
109
|
.set(SupplierQuotationProjectQuote::getSupplierName, currentUser.getName())
|
|
109
|
110
|
.set(SupplierQuotationProjectQuote::getQuoteTime, now)
|
|
...
|
...
|
@@ -217,6 +218,21 @@ public class SupplierQuotationProjectQuoteServiceImpl |
|
217
|
218
|
}
|
|
218
|
219
|
}
|
|
219
|
220
|
|
|
|
221
|
+ private void validateQuoteCanRequote(String bidStatus) {
|
|
|
222
|
+ if (StringUtils.isBlank(bidStatus)) {
|
|
|
223
|
+ return;
|
|
|
224
|
+ }
|
|
|
225
|
+ if (BID_STATUS_WIN.equalsIgnoreCase(bidStatus)) {
|
|
|
226
|
+ throw new DefaultClientException("该报价已中标,不允许再次报价!");
|
|
|
227
|
+ }
|
|
|
228
|
+ if (BID_STATUS_LOSE.equalsIgnoreCase(bidStatus)) {
|
|
|
229
|
+ throw new DefaultClientException("该报价已未中标,不允许再次报价!");
|
|
|
230
|
+ }
|
|
|
231
|
+ if (BID_STATUS_ABORT.equalsIgnoreCase(bidStatus)) {
|
|
|
232
|
+ throw new DefaultClientException("该报价已废标,不允许再次报价!");
|
|
|
233
|
+ }
|
|
|
234
|
+ }
|
|
|
235
|
+
|
|
220
|
236
|
private void validateProduct(String productId) {
|
|
221
|
237
|
BreedRelationship breedRelationship = breedRelationshipService.findById(productId);
|
|
222
|
238
|
if (breedRelationship == null) {
|
...
|
...
|
|