Browse Source

物料明细只有在待提交状态才可以删除

master
yanyan 2 months ago
parent
commit
9f54530161
  1. 5
      src/main/java/com/xujie/modules/supplier/service/impl/PurQuotationServiceImpl.java

5
src/main/java/com/xujie/modules/supplier/service/impl/PurQuotationServiceImpl.java

@ -152,6 +152,11 @@ public class PurQuotationServiceImpl implements PurQuotationService {
if(model.getId() == null){
return;
}
//只有待提交状态才可以删除
PurQuotationDetail purDetailData = purQuotationDetailMapper.selectById(model.getId());
if(!Objects.equals("待提交", purDetailData.getStatus())){
throw new RuntimeException("物料明细只有在待提交状态才可以删除");
}
purQuotationDetailMapper.deleteById(model.getId());
}

Loading…
Cancel
Save