|
@@ -493,16 +493,10 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
* @param status 状态
|
|
* @param status 状态
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public void decideQuote(Long id, Short status) {
|
|
|
|
|
|
|
+ public void decideQuote(Long id, Short status) throws Exception{
|
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
|
// 验证是否重复操作
|
|
// 验证是否重复操作
|
|
|
- if (null != item.getAgreed()) {
|
|
|
|
|
- if (item.getAgreed().equals(Constant.YES)) {
|
|
|
|
|
- throw new IllegalOperatorException("该报价已被采纳,请勿重复处理");
|
|
|
|
|
- } else if (item.getAgreed().equals(Constant.NO)) {
|
|
|
|
|
- throw new IllegalOperatorException("该报价已被拒绝,请勿重复处理");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ validateInquiry(item);
|
|
|
item.setAgreed(status);
|
|
item.setAgreed(status);
|
|
|
itemDao.save(item);
|
|
itemDao.save(item);
|
|
|
// 更新询价推荐表相关信息
|
|
// 更新询价推荐表相关信息
|
|
@@ -527,16 +521,10 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
* @param status 状态
|
|
* @param status 状态
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public void adpotQuote(Long id, Short status) {
|
|
|
|
|
|
|
+ public void adpotQuote(Long id, Short status) throws Exception{
|
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
|
// 验证是否重复操作
|
|
// 验证是否重复操作
|
|
|
- if (null != item.getAgreed()) {
|
|
|
|
|
- if (item.getAgreed().equals(Constant.YES)) {
|
|
|
|
|
- throw new IllegalOperatorException("该报价已被采纳,请勿重复处理");
|
|
|
|
|
- } else if (item.getAgreed().equals(Constant.NO)) {
|
|
|
|
|
- throw new IllegalOperatorException("该报价已被拒绝,请勿重复处理");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ validateInquiry(item);
|
|
|
item.setAgreed(status);
|
|
item.setAgreed(status);
|
|
|
itemDao.save(item);
|
|
itemDao.save(item);
|
|
|
// 更新询价推荐表相关信息
|
|
// 更新询价推荐表相关信息
|
|
@@ -574,16 +562,10 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
* @param status 状态
|
|
* @param status 状态
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public void refuseQuote(Long id, Short status,String refusereason) {
|
|
|
|
|
|
|
+ public void refuseQuote(Long id, Short status,String refusereason) throws Exception{
|
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
PublicInquiryItem item = itemDao.findOne(id);
|
|
|
// 验证是否重复操作
|
|
// 验证是否重复操作
|
|
|
- if (null != item.getAgreed()) {
|
|
|
|
|
- if (item.getAgreed().equals(Constant.YES)) {
|
|
|
|
|
- throw new IllegalOperatorException("该报价已被采纳,请勿重复处理");
|
|
|
|
|
- } else if (item.getAgreed().equals(Constant.NO)) {
|
|
|
|
|
- throw new IllegalOperatorException("该报价已被拒绝,请勿重复处理");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ validateInquiry(item);
|
|
|
item.setAgreed(status);
|
|
item.setAgreed(status);
|
|
|
item.setRefusereason(refusereason);
|
|
item.setRefusereason(refusereason);
|
|
|
itemDao.save(item);
|
|
itemDao.save(item);
|