diff --git a/B3QingDaoWanFu/TypeIOCs/WeightBillTypeIoc.cs b/B3QingDaoWanFu/TypeIOCs/WeightBillTypeIoc.cs index 490363c..2c6a197 100644 --- a/B3QingDaoWanFu/TypeIOCs/WeightBillTypeIoc.cs +++ b/B3QingDaoWanFu/TypeIOCs/WeightBillTypeIoc.cs @@ -17,6 +17,8 @@ namespace BWP.B3QingDaoWanFu.TypeIOCs { if (dmo.PayTarget == null) throw new Exception("付款对象不能为空"); + if (dmo.BuyNum != dmo.FarmerDetails.Sum(x => x.Number ?? 0)) + throw new Exception("收购头数与养殖户明细头数不相等"); } }