|
|
@@ -592,6 +592,13 @@ public class SaleInquiryController {
|
|
|
public ResponseEntity<String> replyInquiryItem(@RequestBody String json,
|
|
|
@PathVariable("inquiryItemId") Long inquiryItemId, String token) {
|
|
|
PurchaseInquiryItem item = FlexJsonUtils.fromJson(json, PurchaseInquiryItem.class);
|
|
|
+ if (item.getReplies().size() == 1) {
|
|
|
+ item.getReplies().forEach(reply -> {
|
|
|
+ if (null != reply.getLapQty() && reply.getLapQty() > 0) {
|
|
|
+ throw new IllegalOperatorException("报价分段数量格式不正确,请从0开始报价");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
boolean flag = tokenService.enabled(token);
|
|
|
if (flag) {
|
|
|
item = purchaseInquiryService.reply(item);
|
|
|
@@ -614,6 +621,13 @@ public class SaleInquiryController {
|
|
|
public ResponseEntity<String> saveInquiryItem(@RequestBody String json,
|
|
|
@PathVariable("inquiryItemId") Long inquiryItemId, String token) {
|
|
|
PurchaseInquiryItem item = FlexJsonUtils.fromJson(json, PurchaseInquiryItem.class);
|
|
|
+ if (item.getReplies().size() == 1) {
|
|
|
+ item.getReplies().forEach(reply -> {
|
|
|
+ if (null != reply.getLapQty() && reply.getLapQty() > 0) {
|
|
|
+ throw new IllegalOperatorException("报价分段数量格式不正确,请从0开始报价");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
boolean flag = tokenService.enabled(token);
|
|
|
if (flag) {
|
|
|
item = purchaseInquiryService.save(item);
|