using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BLL { /// /// 企业安全文件上报 /// public static class SubUnitReportService { /// /// 根据主键获取企业安全文件上报信息 /// /// /// public static Model.Supervise_SubUnitReport GetSubUnitReportById(string subUnitReportId) { return Funs.DB.Supervise_SubUnitReport.FirstOrDefault(e => e.SubUnitReportId == subUnitReportId); } /// /// 是否未上报 /// /// /// true-已上报,false-未上报 public static bool IsUpLoadSubUnitReport(string subUnitReportId) { bool isUpLoad = true; var SubUnitReport = BLL.SubUnitReportService.GetSubUnitReportById(subUnitReportId); if (SubUnitReport != null) { if (SubUnitReport.IsEndLever == true) { var detailCout = Funs.DB.Supervise_SubUnitReportItem.FirstOrDefault(x => x.SubUnitReportId == subUnitReportId && x.UpState == Const.UpState_3); if (detailCout != null) { isUpLoad = false; } } else { isUpLoad = false; } } return isUpLoad; } } }