diff --git a/Ewide.NbzsZheliban/Service/DataService.cs b/Ewide.NbzsZheliban/Service/DataService.cs index d0ffddf..783dd24 100644 --- a/Ewide.NbzsZheliban/Service/DataService.cs +++ b/Ewide.NbzsZheliban/Service/DataService.cs @@ -147,7 +147,7 @@ namespace Ewide.NbzsZheliban.Service { p.FhpgList = list_fhpgs.Where(a => a.PrjId == p.PrjId).ToList(); var bcxy = list_bcxys.Where(a => a.PrjId == p.PrjId).ToList(); - bcxy.ForEach(a => a.countValue = list_fhpgs.Where(b => b.dcbId == a.dcbId).First().countValue); + bcxy.ForEach(a => a.countValue = list_fhpgs.Where(b => b.dcbId == a.dcbId).FirstOrDefault()?.countValue); p.BcxyList = bcxy; listAreas.Add(Guid.Parse(p.AreaID)); }); @@ -398,6 +398,8 @@ namespace Ewide.NbzsZheliban.Service //非住宅 jzlrModel = db.Ado.SqlQuery("select b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,2 Type from NonInvestigateTable_Assessment a inner join NonResidentialInvestigateTable b on a.NonInvestigateTableID=b.ID where a.ID=@ID", new { ID = id }).FirstOrDefault(); } + if (jzlrModel == null) + throw Oops.Oh("ID有误"); switch (jzlrModel.ValuationMethod) { case 0: diff --git a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll index b84476b..54432a2 100644 Binary files a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb index d77697f..0ba9e66 100644 Binary files a/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/bin/Debug/net5.0/Ewide.NbzsZheliban.pdb differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll index b84476b..54432a2 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll and b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.dll differ diff --git a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb index d77697f..0ba9e66 100644 Binary files a/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb and b/Ewide.NbzsZheliban/obj/Debug/net5.0/Ewide.NbzsZheliban.pdb differ