|
|
@@ -496,7 +496,13 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
public void decideQuote(Long id, Short status) {
|
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
|
// 验证是否重复操作
|
|
|
- validateInquiry(item);
|
|
|
+ if (null != item.getAgreed()) {
|
|
|
+ if (item.getAgreed().equals(Constant.YES)) {
|
|
|
+ throw new IllegalOperatorException("该报价已被采纳,请勿重复处理");
|
|
|
+ } else if (item.getAgreed().equals(Constant.NO)) {
|
|
|
+ throw new IllegalOperatorException("该报价已被拒绝,请勿重复处理");
|
|
|
+ }
|
|
|
+ }
|
|
|
item.setAgreed(status);
|
|
|
itemDao.save(item);
|
|
|
// 更新询价推荐表相关信息
|
|
|
@@ -524,7 +530,13 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
public void adpotQuote(Long id, Short status) {
|
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
|
// 验证是否重复操作
|
|
|
- validateInquiry(item);
|
|
|
+ if (null != item.getAgreed()) {
|
|
|
+ if (item.getAgreed().equals(Constant.YES)) {
|
|
|
+ throw new IllegalOperatorException("该报价已被采纳,请勿重复处理");
|
|
|
+ } else if (item.getAgreed().equals(Constant.NO)) {
|
|
|
+ throw new IllegalOperatorException("该报价已被拒绝,请勿重复处理");
|
|
|
+ }
|
|
|
+ }
|
|
|
item.setAgreed(status);
|
|
|
itemDao.save(item);
|
|
|
// 更新询价推荐表相关信息
|
|
|
@@ -565,7 +577,13 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
public void refuseQuote(Long id, Short status,String refusereason) {
|
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
|
// 验证是否重复操作
|
|
|
- validateInquiry(item);
|
|
|
+ if (null != item.getAgreed()) {
|
|
|
+ if (item.getAgreed().equals(Constant.YES)) {
|
|
|
+ throw new IllegalOperatorException("该报价已被采纳,请勿重复处理");
|
|
|
+ } else if (item.getAgreed().equals(Constant.NO)) {
|
|
|
+ throw new IllegalOperatorException("该报价已被拒绝,请勿重复处理");
|
|
|
+ }
|
|
|
+ }
|
|
|
item.setAgreed(status);
|
|
|
item.setRefusereason(refusereason);
|
|
|
itemDao.save(item);
|