|
@@ -28,6 +28,7 @@ import com.fjhx.wms.entity.stock.po.StockWait;
|
|
|
import com.fjhx.wms.entity.stock.po.StockWaitDetails;
|
|
|
import com.fjhx.wms.service.stock.StockWaitDetailsService;
|
|
|
import com.fjhx.wms.service.stock.StockWaitService;
|
|
|
+import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -165,7 +166,15 @@ public class ExcessGoodsDetailsServiceImpl extends ServiceImpl<ExcessGoodsDetail
|
|
|
|
|
|
@Override
|
|
|
public void delete(Long id) {
|
|
|
- this.removeById(id);
|
|
|
+ ExcessGoodsDetails byId = this.getById(id);
|
|
|
+ if (ObjectUtil.notEqual(byId.getProcessingMethod(), 0)) {
|
|
|
+ throw new ServiceException("该数据已被处理禁止删除!");
|
|
|
+ }
|
|
|
+
|
|
|
+ this.remove(q -> q
|
|
|
+ .eq(ExcessGoodsDetails::getId, id)
|
|
|
+ .eq(ExcessGoodsDetails::getProcessingMethod, 0)
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
/**
|