diff --git a/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs index cbf38d3..b16de0d 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs @@ -1,6 +1,7 @@ using BLL.CNCECHSSEService; using FineUIPro; using Model; +using Model.Customization; using Newtonsoft.Json; using NPOI.POIFS.Crypt.Dsig; using System; @@ -8,6 +9,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using System.Web.UI.WebControls; namespace BLL { @@ -52,50 +54,52 @@ namespace BLL // q= q.Take(Grid1.PageSize * Grid1.PageIndex).Skip(Grid1.PageSize * (Grid1.PageIndex)).ToList(); // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q - select new - { - x.Id, - x.UnitId, - x.CollCropCode, - x.UnitName, - x.ReportDate, - x.TrainPersonNum, - x.TechnicalDisclosePersonNum, - x.UseNum, - x.OKNum, - x.CompanyPersonNum, - x.BranchPersonNum, - x.ProjectPersonNum, - x.ProblemNum, - x.ProblemCompletedNum, - x.ProblemNotCompletedNum, - x.SNum, - x.ANum, - x.BNum, - x.CNum, - x.KeyProcessNum, - x.KeyProcessOKNum, - x.SpecialProcessNum, - x.SpecialProcessOKNum, - x.ConcealedWorksNum, - x.ConcealedWorksOKNum, - x.UnitProjectOnesNum, - x.UnitProjectOnesOKNum, - x.MaterialInRecheckNum, - x.MaterialInRecheckOKNum, - x.SingleProjectNum, - x.UnitProjectNum, - x.SubProjectNum, - x.SubdivisionalWorksNum, - x.InspectionLotNum, - x.State, - x.CreateDate, - x.CreateMan - }; + select new + { + x.Id, + x.UnitId, + x.CollCropCode, + x.UnitName, + x.ReportDate, + x.TrainPersonNum, + x.TechnicalDisclosePersonNum, + x.UseNum, + x.OKNum, + x.CompanyPersonNum, + x.BranchPersonNum, + x.ProjectPersonNum, + x.ProblemNum, + x.ProblemCompletedNum, + x.ProblemNotCompletedNum, + x.SNum, + x.ANum, + x.BNum, + x.CNum, + x.KeyProcessNum, + x.KeyProcessOKNum, + x.SpecialProcessNum, + x.SpecialProcessOKNum, + x.ConcealedWorksNum, + x.ConcealedWorksOKNum, + x.UnitProjectOnesNum, + x.UnitProjectOnesOKNum, + x.MaterialInRecheckNum, + x.MaterialInRecheckOKNum, + x.SingleProjectNum, + x.UnitProjectNum, + x.SubProjectNum, + x.SubdivisionalWorksNum, + x.InspectionLotNum, + x.State, + x.CreateDate, + x.CreateMan + }; } #endregion 获取列表 + #region 新增、编辑、删除 + public static void AddCQMSData_CQMS(CQMSData_CQMS newtable) { using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) @@ -136,6 +140,25 @@ namespace BLL SubProjectNum = newtable.SubProjectNum, SubdivisionalWorksNum = newtable.SubdivisionalWorksNum, InspectionLotNum = newtable.InspectionLotNum, + EquipmentInspectionNum = newtable.EquipmentInspectionNum, + EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum, + MachineInspectionNum = newtable.MachineInspectionNum, + MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum, + PersonInspectionNum = newtable.PersonInspectionNum, + PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum, + MaterialInspectionNum = newtable.MaterialInspectionNum, + MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum, + ConstructSolutionNum = newtable.ConstructSolutionNum, + ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum, + ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum, + SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum, + DesignDetailsNum = newtable.DesignDetailsNum, + UnitProjectAcceptNum = newtable.UnitProjectAcceptNum, + UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum, + SubProjectAcceptNum = newtable.SubProjectAcceptNum, + SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum, + SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum, + SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum, State = newtable.State, CreateDate = newtable.CreateDate, CreateMan = newtable.CreateMan @@ -144,6 +167,7 @@ namespace BLL db.SubmitChanges(); } } + public static void UpdateCQMSData_CQMS(CQMSData_CQMS newtable) { using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) @@ -185,6 +209,25 @@ namespace BLL table.SubProjectNum = newtable.SubProjectNum; table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum; table.InspectionLotNum = newtable.InspectionLotNum; + table.EquipmentInspectionNum = newtable.EquipmentInspectionNum; + table.EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum; + table.MachineInspectionNum = newtable.MachineInspectionNum; + table.MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum; + table.PersonInspectionNum = newtable.PersonInspectionNum; + table.PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum; + table.MaterialInspectionNum = newtable.MaterialInspectionNum; + table.MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum; + table.ConstructSolutionNum = newtable.ConstructSolutionNum; + table.ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum; + table.ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum; + table.SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum; + table.DesignDetailsNum = newtable.DesignDetailsNum; + table.UnitProjectAcceptNum = newtable.UnitProjectAcceptNum; + table.UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum; + table.SubProjectAcceptNum = newtable.SubProjectAcceptNum; + table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum; + table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum; + table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum; table.State = newtable.State; table.CreateMan = newtable.CreateMan; table.CreateDate = newtable.CreateDate; @@ -206,6 +249,8 @@ namespace BLL } } + #endregion + public static CQMSData_CQMS GetCQMSData_CQMSById(string id) { var db = Funs.DB; @@ -258,6 +303,25 @@ namespace BLL item.SubProjectNum = model.SubProjectNum; item.SubdivisionalWorksNum = model.SubdivisionalWorksNum; item.InspectionLotNum = model.InspectionLotNum; + item.EquipmentInspectionNum = model.EquipmentInspectionNum; + item.EquipmentInspectionQualifiedNum = model.EquipmentInspectionQualifiedNum; + item.MachineInspectionNum = model.MachineInspectionNum; + item.MachineInspectionQualifiedNum = model.MachineInspectionQualifiedNum; + item.PersonInspectionNum = model.PersonInspectionNum; + item.PersonInspectionQualifiedNum = model.PersonInspectionQualifiedNum; + item.MaterialInspectionNum = model.MaterialInspectionNum; + item.MaterialInspectionQualifiedNum = model.MaterialInspectionQualifiedNum; + item.ConstructSolutionNum = model.ConstructSolutionNum; + item.ConstructSolutionProjectApproveNum = model.ConstructSolutionProjectApproveNum; + item.ConstructSolutionUnitApproveNum = model.ConstructSolutionUnitApproveNum; + item.SpecialEquipmentQualityAssuranceSystemNum = model.SpecialEquipmentQualityAssuranceSystemNum; + item.DesignDetailsNum = model.DesignDetailsNum; + item.UnitProjectAcceptNum = model.UnitProjectAcceptNum; + item.UnitProjectAcceptOKNum = model.UnitProjectAcceptOKNum; + item.SubProjectAcceptNum = model.SubProjectAcceptNum; + item.SubProjectAcceptOKNum = model.SubProjectAcceptOKNum; + item.SubdivisionalWorksAcceptNum = model.SubdivisionalWorksAcceptNum; + item.SubdivisionalWorksAcceptOKNum = model.SubdivisionalWorksAcceptOKNum; } var cqmsDataItems = new List(); @@ -266,34 +330,29 @@ namespace BLL return data; } - public static CQMSData GetTodayCQMSData_CQMS() + public static async Task GetTodayCQMSData_CQMS() { - // var q = GetTodayData(); - var data = new CQMSData(); - data = StatisticalData(); + // var data = new CQMSData(); + // data = StatisticalData(); - //if (q != null && q.State == Const.CNCEC_State_S) - //{ - // // data = GetDataByCQMSData_CQMS(q); - // data = StatisticalData(); - //} - //else - //{ - // data = StatisticalData(); - //} + // return data; + + var modelTask = StatisitcalDataAsync(); + var model = await modelTask; + CQMSData data = model; return data; } public static CQMSData_CQMS GetTodayData() { var q = (from x in Funs.DB.CQMSData_CQMS - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - select x).FirstOrDefault(); + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date + select x).FirstOrDefault(); return q; } public static CQMSData_CQMS GetSubUnitCqmsDataByDate(string Unitid, DateTime? reportdate) { - + var result = new Model.CQMSData_CQMS(); if (reportdate == null) { @@ -303,7 +362,7 @@ namespace BLL var base_Unit = UnitService.GetUnitByUnitId(Unitid); var ProjectData = (from x in Funs.DB.Project_CQMSData_CQMS where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId) - select x).ToList(); + select x).ToList(); result = new CQMSData_CQMS { UnitId = Unitid, @@ -358,8 +417,8 @@ namespace BLL { var result = false; var q = (from x in Funs.DB.CQMSData_CQMS - where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date - select x).ToList(); + where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date + select x).ToList(); if (q.Count > 0) result = true; return result; } @@ -372,8 +431,8 @@ namespace BLL { var result = false; var q = (from x in Funs.DB.CQMSData_CQMS - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - select x).ToList(); + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date + select x).ToList(); if (q.Count > 0) result = true; return result; } @@ -396,8 +455,8 @@ namespace BLL Project_CQMSDataService.StatisticalAllProjectData(); var ProjectData = (from x in Funs.DB.Project_CQMSData_CQMS - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - select x).ToList(); + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date + select x).ToList(); var table = new CQMSData_CQMS { UnitId = thisUnitId, @@ -433,6 +492,25 @@ namespace BLL SubProjectNum = ProjectData.Sum(x => x.SubProjectNum), SubdivisionalWorksNum = ProjectData.Sum(x => x.SubdivisionalWorksNum), InspectionLotNum = ProjectData.Sum(x => x.InspectionLotNum), + EquipmentInspectionNum = ProjectData.Sum(x => x.EquipmentInspectionNum), + EquipmentInspectionQualifiedNum = ProjectData.Sum(x => x.EquipmentInspectionQualifiedNum), + MachineInspectionNum = ProjectData.Sum(x => x.MachineInspectionNum), + MachineInspectionQualifiedNum = ProjectData.Sum(x => x.MachineInspectionQualifiedNum), + PersonInspectionNum = ProjectData.Sum(x => x.PersonInspectionNum), + PersonInspectionQualifiedNum = ProjectData.Sum(x => x.PersonInspectionQualifiedNum), + MaterialInspectionNum = ProjectData.Sum(x => x.MaterialInspectionNum), + MaterialInspectionQualifiedNum = ProjectData.Sum(x => x.MaterialInspectionQualifiedNum), + ConstructSolutionNum = ProjectData.Sum(x => x.ConstructSolutionNum), + ConstructSolutionProjectApproveNum = ProjectData.Sum(x => x.ConstructSolutionProjectApproveNum), + ConstructSolutionUnitApproveNum = ProjectData.Sum(x => x.ConstructSolutionUnitApproveNum), + SpecialEquipmentQualityAssuranceSystemNum = ProjectData.Sum(x => x.SpecialEquipmentQualityAssuranceSystemNum), + DesignDetailsNum = ProjectData.Sum(x => x.DesignDetailsNum), + UnitProjectAcceptNum = ProjectData.Sum(x => x.UnitProjectAcceptNum), + UnitProjectAcceptOKNum = ProjectData.Sum(x => x.UnitProjectAcceptOKNum), + SubProjectAcceptNum = ProjectData.Sum(x => x.SubProjectAcceptNum), + SubProjectAcceptOKNum = ProjectData.Sum(x => x.SubProjectAcceptOKNum), + SubdivisionalWorksAcceptNum = ProjectData.Sum(x => x.SubdivisionalWorksAcceptNum), + SubdivisionalWorksAcceptOKNum = ProjectData.Sum(x => x.SubdivisionalWorksAcceptOKNum), CreateMan = Const.sysglyId, CreateDate = DateTime.Now }; @@ -454,6 +532,241 @@ namespace BLL return data; } + /// + /// 获取质量统计数据 + /// + public static async Task StatisitcalDataAsync() + { + var thisUnitId = string.Empty; + var thisUnit = CommonService.GetIsThisUnit(); + if (thisUnit != null) thisUnitId = thisUnit.UnitId; + var baseUnit = UnitService.GetUnitByUnitId(thisUnitId); + + // 并行执行异步方法 + var companyPersonNumTask = CQMSDataService.GetCompanyPersonNumAsync(); //获取企业总部人数 + var branchPersonNumTask = CQMSDataService.GetBranchPersonNumAsync(); //获取分支机构人数 + var projectPersonNumTask = CQMSDataService.GetProjectPersonNumAsync(); //获取项目专职人数 + var trainPersonNumTask = CQMSDataService.GetTrainPersonNumAsync(); //获取质量培训人次数 + var technicalDisclosePersonTask = CQMSDataService.GetTechnicalDisclosePersonNumAsync(); //获取技术交底人次数 + + var inspectionEquipmentTask = CQMSDataService.GetComprehensive_InspectionEquipmentAsync(); //获取设备报验 + var inspectionPersonTask = CQMSDataService.GetComprehensive_InspectionPersonAsync(); //获取人员报验 + var inspectionMachineTask = CQMSDataService.GetComprehensive_InspectionMachineAsync(); //获取机具报验 + var useNumTask = CQMSDataService.GetUseNumAsync(); //获取在用计量器具数 + var okNumTask = CQMSDataService.GetOkNumAsync(); //获取校准合格数 + + var singleProjectNumTask = CQMSDataService.GetSingleProjectNumAsync(); //获取单项工程个数 + var unitProjectNumTask = CQMSDataService.GetUnitProjectNumAsync(); //获取单位工程个数 + var subProjectNuTask = CQMSDataService.GetSubProjectNumAsync(); //获取分部工程个数 + var subdivisionalWorksNuTask = CQMSDataService.GetSubdivisionalWorksNumAsync(); //获取分项工程个数 + var inspectionLotNumTask = CQMSDataService.GetInspectionLotNumAsync(); //获取检验批个数 + var constructSolutionTask = CQMSDataService.GetConstructSolutionAsync(); //施工方案数量 + var cqmsProblemTask = CQMSDataService.GetCQMSProblemAsync(); //获取企业级、项目级质量问题 + + //质量验收数据 + var keyProcessNumTask = CQMSDataService.GetKeyProcessNumAsync(); //获取关键工序验收数 + var keyProcessOKNumTask = CQMSDataService.GetKeyProcessOkNumAsync(); //获取关键工序验收合格数 + var specialProcessNumTask = CQMSDataService.GetSpecialProcessNumAsync(); //获取特殊过程验收数 + var specialProcessOKNumTask = CQMSDataService.GetSpecialProcessOkNumAsync(); //获取特殊过程验收合格数 + var concealedWorksNumTask = CQMSDataService.GetConcealedWorksNumAsync(); //获取隐蔽工程验收数 + var concealedWorksOKNumTask = CQMSDataService.GetConcealedWorksOkNumAsync(); //获取隐蔽工程验收合格数 + + var unitProjectAcceptNumTask = CQMSDataService.GetUnitProjectAcceptNumAsync(); //获取单位工程验收数 + var unitProjectAcceptOKNumTask = CQMSDataService.GetUnitProjectAcceptOKNumAsync(); //获取单位工程验收合格数 + var subProjectAcceptNumTask = CQMSDataService.GetSubProjectAcceptNumAsync(); //获取分部工程验收数 + var subProjectAcceptOKNumTask = CQMSDataService.GetSubProjectAcceptOKNumAsync(); //获取分部工程验收合格数 + var subdivisionalWorksAcceptNumTask = CQMSDataService.GetSubdivisionalWorksAcceptNumAsync(); //获取分项工程验收数 + var subdivisionalWorksAcceptOKNumTask = CQMSDataService.GetSubdivisionalWorksAcceptOKNumAsync(); //获取分项工程验收合格数 + var materialInRecheckNumTask = CQMSDataService.GetMaterialInRecheckNumAsync(); //获取复核材料数 + var materialInRecheckOKNumTask = CQMSDataService.GetMaterialInRecheckOKNumAsync(); //获取复核材料合格数 + + // 等待所有异步方法执行完成 + await Task.WhenAll( + companyPersonNumTask, branchPersonNumTask, projectPersonNumTask, + trainPersonNumTask, technicalDisclosePersonTask, + inspectionEquipmentTask, inspectionPersonTask, inspectionMachineTask, + useNumTask, okNumTask, + singleProjectNumTask, unitProjectNumTask, subProjectNuTask, subdivisionalWorksNuTask, inspectionLotNumTask, + constructSolutionTask, + cqmsProblemTask, + keyProcessNumTask, keyProcessOKNumTask, specialProcessNumTask, specialProcessOKNumTask, concealedWorksNumTask, concealedWorksOKNumTask, + unitProjectAcceptNumTask, unitProjectAcceptOKNumTask, subProjectAcceptNumTask, subProjectAcceptOKNumTask, subdivisionalWorksAcceptNumTask, subdivisionalWorksAcceptOKNumTask, + materialInRecheckNumTask, materialInRecheckOKNumTask + ); + + // 统一获取异步方法的返回值 + var companyPersonNum = await companyPersonNumTask; + var branchPersonNum = await branchPersonNumTask; + var projectPersonNumList = await projectPersonNumTask; + var trainPersonNumList = await trainPersonNumTask; + var technicalDisclosePersonList = await technicalDisclosePersonTask; + + var inspectionEquipmentList = await inspectionEquipmentTask; + var inspectionPersonList = await inspectionPersonTask; + var inspectionMachineList = await inspectionMachineTask; + var useNum = await useNumTask; + var okNum = await okNumTask; + var singleProjectNum = await singleProjectNumTask; + var unitProjectNum = await unitProjectNumTask; + var subProjectNum = await subProjectNuTask; + var subdivisionalWorksNum = await subdivisionalWorksNuTask; + var inspectionLotNum = await inspectionLotNumTask; + + var constructSolutionList = await constructSolutionTask; + var cqmsProblemList = await cqmsProblemTask; + + var keyProcessNum = await keyProcessNumTask; + var keyProcessOKNum = await keyProcessOKNumTask; + var specialProcessNum = await specialProcessNumTask; + var specialProcessOKNum = await specialProcessOKNumTask; + var concealedWorksNum = await concealedWorksNumTask; + var concealedWorksOKNum = await concealedWorksOKNumTask; + + var unitProjectAcceptNum = await unitProjectAcceptNumTask; + var unitProjectAcceptOKNum = await unitProjectAcceptOKNumTask; + var subProjectAcceptNum = await subProjectAcceptNumTask; + var subProjectAcceptOKNum = await subProjectAcceptOKNumTask; + var subdivisionalWorksAcceptNum = await subdivisionalWorksAcceptNumTask; + var subdivisionalWorksAcceptOKNum = await subdivisionalWorksAcceptOKNumTask; + var materialInRecheckNum = await materialInRecheckNumTask; + var materialInRecheckOKNum = await materialInRecheckOKNumTask; + + // 构造结果对象 + var table = new CQMSData_CQMS + { + UnitId = thisUnitId, + CollCropCode = baseUnit.CollCropCode, + UnitName = baseUnit.UnitName, + ReportDate = DateTime.Now.Date, + CompanyPersonNum = companyPersonNum,// + BranchPersonNum = branchPersonNum,// + ProjectPersonNum = projectPersonNumList.Count(), + TrainPersonNum = trainPersonNumList.Count(), + TechnicalDisclosePersonNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum), + EquipmentInspectionNum = inspectionEquipmentList.Count(), + EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(), + PersonInspectionNum = inspectionPersonList.Count(), + PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(), + MachineInspectionNum = inspectionMachineList.Count(), + MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(), + MaterialInspectionNum = 0, + MaterialInspectionQualifiedNum = 0, + UseNum = useNum.Count(), + OKNum = okNum.Count(), + SingleProjectNum = singleProjectNum.Count(), + UnitProjectNum = unitProjectNum.Count(), + SubProjectNum = subProjectNum.Count(), + SubdivisionalWorksNum = subdivisionalWorksNum.Count(), + InspectionLotNum = inspectionLotNum.Sum(x => x.Sum), + + ConstructSolutionNum = constructSolutionList.Count(), + ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1").Count(), + ConstructSolutionUnitApproveNum = 0,// + SpecialEquipmentQualityAssuranceSystemNum = 0,// + DesignDetailsNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum), + + ProblemNum = cqmsProblemList.Count(), + ProblemCompletedNum = cqmsProblemList.Where(x => x.State == "7").Count(), + ProblemNotCompletedNum = cqmsProblemList.Where(x => x.State != "7").Count(), + + KeyProcessNum = keyProcessNum.Count(), + KeyProcessOKNum = keyProcessOKNum.Count(), + SpecialProcessNum = specialProcessNum.Count(), + SpecialProcessOKNum = specialProcessOKNum.Count(), + ConcealedWorksNum = concealedWorksNum.Count(), + ConcealedWorksOKNum = concealedWorksOKNum.Count(), + UnitProjectAcceptNum = unitProjectAcceptNum.Count(), + UnitProjectAcceptOKNum = unitProjectAcceptOKNum.Count(), + SubProjectAcceptNum = subProjectAcceptNum.Count(), + SubProjectAcceptOKNum = subProjectAcceptOKNum.Count(), + SubdivisionalWorksAcceptNum = subdivisionalWorksAcceptNum.Count(), + SubdivisionalWorksAcceptOKNum = subdivisionalWorksAcceptOKNum.Count(), + MaterialInRecheckNum = materialInRecheckNum.Count(), + MaterialInRecheckOKNum = materialInRecheckOKNum.Count() + }; + #region 添加项目统计数据 + + Project_CQMSDataService.DeleteProject_CQMSData_CQMByDate(DateTime.Now.Date); + foreach (var projectid in BeUnderConstructionList) + { + var projectCqmsData = new Project_CQMSData_CQMS + { + Id = SQLHelper.GetNewID(), + ProjectId = projectid, + UnitId = thisUnitId, + CollCropCode = baseUnit.CollCropCode, + UnitName = baseUnit.UnitName, + ReportDate = DateTime.Now.Date, + CompanyPersonNum = companyPersonNum,// + BranchPersonNum = branchPersonNum,// + ProjectPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid), + TrainPersonNum = trainPersonNumList.Count(x => x.ProjectId == projectid), + TechnicalDisclosePersonNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), + EquipmentInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid), + EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1" && x.ProjectId == projectid).Count(), + PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid), + PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true && x.ProjectId == projectid).Count(), + MachineInspectionNum = inspectionMachineList.Count(x => x.ProjectId == projectid), + MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true && x.ProjectId == projectid).Count(), + MaterialInspectionNum = 0, + MaterialInspectionQualifiedNum = 0, + UseNum = useNum.Count(x => x.ProjectId == projectid), + OKNum = okNum.Count(x => x.ProjectId == projectid), + SingleProjectNum = singleProjectNum.Count(x => x.ProjectId == projectid), + UnitProjectNum = unitProjectNum.Count(x => x.ProjectId == projectid), + SubProjectNum = subProjectNum.Count(x => x.ProjectId == projectid), + SubdivisionalWorksNum = subdivisionalWorksNum.Count(x => x.ProjectId == projectid), + InspectionLotNum = inspectionLotNum.Where(x => x.ProjectId == projectid).Sum(x => x.Sum), + + ConstructSolutionNum = constructSolutionList.Count(x => x.ProjectId == projectid), + ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1" && x.ProjectId == projectid).Count(), + ConstructSolutionUnitApproveNum = 0,// + SpecialEquipmentQualityAssuranceSystemNum = 0,// + DesignDetailsNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), + + ProblemNum = cqmsProblemList.Count(x => x.ProjectId == projectid), + ProblemCompletedNum = cqmsProblemList.Where(x => x.State == "7" && x.ProjectId == projectid).Count(), + ProblemNotCompletedNum = cqmsProblemList.Where(x => x.State != "7" && x.ProjectId == projectid).Count(), + + KeyProcessNum = keyProcessNum.Count(x => x.ProjectId == projectid), + KeyProcessOKNum = keyProcessOKNum.Count(x => x.ProjectId == projectid), + SpecialProcessNum = specialProcessNum.Count(x => x.ProjectId == projectid), + SpecialProcessOKNum = specialProcessOKNum.Count(x => x.ProjectId == projectid), + ConcealedWorksNum = concealedWorksNum.Count(x => x.ProjectId == projectid), + ConcealedWorksOKNum = concealedWorksOKNum.Count(x => x.ProjectId == projectid), + UnitProjectAcceptNum = unitProjectAcceptNum.Count(x => x.ProjectId == projectid), + UnitProjectAcceptOKNum = unitProjectAcceptOKNum.Count(x => x.ProjectId == projectid), + SubProjectAcceptNum = subProjectAcceptNum.Count(x => x.ProjectId == projectid), + SubProjectAcceptOKNum = subProjectAcceptOKNum.Count(x => x.ProjectId == projectid), + SubdivisionalWorksAcceptNum = subdivisionalWorksAcceptNum.Count(x => x.ProjectId == projectid), + SubdivisionalWorksAcceptOKNum = subdivisionalWorksAcceptOKNum.Count(x => x.ProjectId == projectid), + MaterialInRecheckNum = materialInRecheckNum.Count(x => x.ProjectId == projectid), + MaterialInRecheckOKNum = materialInRecheckOKNum.Count(x => x.ProjectId == projectid) + }; + Project_CQMSDataService.AddProject_CQMSData_CQMS(projectCqmsData); + } + + #endregion + + + if (IsReportByToday()) + { + table.Id = GetTodayData().Id; + table.State = Const.CNCEC_State_1; + UpdateCQMSData_CQMS(table); + } + else + { + table.Id = SQLHelper.GetNewID(); + table.State = Const.CNCEC_State_0; + AddCQMSData_CQMS(table); + } + var data = new CQMSData(); + data = GetDataByCQMSData_CQMS(table); + return data; + + } + public static CQMSData GetDataByCQMSData_CQMS(CQMSData_CQMS table) { var data = new CQMSData(); @@ -497,13 +810,31 @@ namespace BLL item.SubProjectNum = table.SubProjectNum; item.SubdivisionalWorksNum = table.SubdivisionalWorksNum; item.InspectionLotNum = table.InspectionLotNum; + item.EquipmentInspectionNum = table.EquipmentInspectionNum; + item.EquipmentInspectionQualifiedNum = table.EquipmentInspectionQualifiedNum; + item.MachineInspectionNum = table.MachineInspectionNum; + item.MachineInspectionQualifiedNum = table.MachineInspectionQualifiedNum; + item.PersonInspectionNum = table.PersonInspectionNum; + item.PersonInspectionQualifiedNum = table.PersonInspectionQualifiedNum; + item.MaterialInspectionNum = table.MaterialInspectionNum; + item.MaterialInspectionQualifiedNum = table.MaterialInspectionQualifiedNum; + item.ConstructSolutionNum = table.ConstructSolutionNum; + item.ConstructSolutionProjectApproveNum = table.ConstructSolutionProjectApproveNum; + item.ConstructSolutionUnitApproveNum = table.ConstructSolutionUnitApproveNum; + item.SpecialEquipmentQualityAssuranceSystemNum = table.SpecialEquipmentQualityAssuranceSystemNum; + item.DesignDetailsNum = table.DesignDetailsNum; + item.UnitProjectAcceptNum = table.UnitProjectAcceptNum; + item.UnitProjectAcceptOKNum = table.UnitProjectAcceptOKNum; + item.SubProjectAcceptNum = table.SubProjectAcceptNum; + item.SubProjectAcceptOKNum = table.SubProjectAcceptOKNum; + item.SubdivisionalWorksAcceptNum = table.SubdivisionalWorksAcceptNum; + item.SubdivisionalWorksAcceptOKNum = table.SubdivisionalWorksAcceptOKNum; var cqmsDataItems = new List(); cqmsDataItems.Add(item); data.CQMSDataItems = cqmsDataItems; return data; } - /// /// 获取企业总部人数 /// @@ -514,9 +845,9 @@ namespace BLL var thisUnit = CommonService.GetIsThisUnit(); if (thisUnit != null) unitId = thisUnit.UnitId; var result = (from x in Funs.DB.Person_CompanyBranchPerson - join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId - where x.IsOnJob == true && y.IsCQMS == true && x.UnitId == unitId - select x).Count(); + join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + where x.IsOnJob == true && y.IsCQMS == true && x.UnitId == unitId + select x).Count(); return result; } @@ -539,9 +870,9 @@ namespace BLL var thisUnit = CommonService.GetIsThisUnit(); if (thisUnit != null) unitId = thisUnit.UnitId; var result = (from x in Funs.DB.Person_CompanyBranchPerson - join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId - where x.IsOnJob == true && y.IsCQMS == true && x.UnitId != unitId - select x).Count(); + join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + where x.IsOnJob == true && y.IsCQMS == true && x.UnitId != unitId + select x).Count(); return result; } @@ -558,15 +889,15 @@ namespace BLL /// 获取项目专职人数 /// /// - public static List GetProjectPersonNum() + public static IEnumerable GetProjectPersonNum() { var result = (from x in Funs.DB.SitePerson_Person + join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup from p in pGroup.DefaultIfEmpty() join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() - join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId - where BeUnderConstructionList.Contains(p.ProjectId) && y.IsCQMS == true && x.IsUsed == true && x.IdentityCard != null + where BeUnderConstructionList.Contains(p.ProjectId) && y.IsCQMS == true && x.IsUsed == true select new Model.OfSafetySupervisorsOutput { ProjectId = x.ProjectId, @@ -576,7 +907,7 @@ namespace BLL Name = x.PersonName, Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"), IdentityCard = x.IdentityCard, - WorkPostName = PostService.GetPostNameById(x.WorkPostId), + WorkPostName = y.WorkPostName == null ? "" : y.WorkPostName, Phone = x.Telephone }).ToList(); result = result @@ -589,7 +920,7 @@ namespace BLL /// 获取项目专职人数(异步) /// /// - public static async Task> GetProjectPersonNumAsync() + public static async Task> GetProjectPersonNumAsync() { return await Task.Run(GetProjectPersonNum); } @@ -605,8 +936,10 @@ namespace BLL from p in pGroup.DefaultIfEmpty() join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() - join y in Funs.DB.SitePerson_Person on x.InspectionPersonId equals y.PersonId - join z in Funs.DB.Base_WorkPost on y.WorkPostId equals z.WorkPostId + join y in Funs.DB.SitePerson_Person on x.InspectionPersonId equals y.PersonId into yGroup + from y in yGroup.DefaultIfEmpty() + join m in Funs.DB.Base_WorkPost on y.WorkPostId equals m.WorkPostId into mGroup + from m in mGroup.DefaultIfEmpty() where BeUnderConstructionList.Contains(p.ProjectId) && x.IsTrain == true && x.CompileDate > Const.DtmarkTime select new Model.OfSafetySupervisorsOutput { @@ -617,7 +950,7 @@ namespace BLL Name = x.PersonName, Sex = y.Sex == null ? "" : (y.Sex == "1" ? "男" : "女"), IdentityCard = y.IdentityCard, - WorkPostName = PostService.GetPostNameById(y.WorkPostId), + WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName, Phone = y.Telephone }).ToList(); return result; @@ -870,11 +1203,16 @@ namespace BLL /// 获取检验批个数 /// /// - public static List GetInspectionLotNum() + public static List GetInspectionLotNum() { var result = (from x in Funs.DB.WBS_BreakdownProject where BeUnderConstructionList.Contains(x.ProjectId) && x.IsSelected == true - select x).ToList(); + group x by x.ProjectId into g + select new Model.WBSBreakdownProjectOutput() + { + ProjectId = g.Key, + Sum = g.Count(), + }).ToList() ; return result; } @@ -882,7 +1220,7 @@ namespace BLL /// 获取检验批个数(异步) /// /// - public static async Task> GetInspectionLotNumAsync() + public static async Task> GetInspectionLotNumAsync() { return await Task.Run(GetInspectionLotNum); } @@ -1204,6 +1542,68 @@ namespace BLL } + /// 获取材料进场复验数 + /// + /// + public static List GetMaterialInRecheckNum() + { + var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail + join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId + join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId + where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && x.CreateDate > Const.DtmarkTime + select new Model.InspectionManagementOutput() + { + ProjectId = y.ProjectId, + //ProjectName = p.ProjectName, + //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), + Id = x.InspectionDetailId, + BreakdownCode = y.BreakdownCode, + BreakdownName = y.BreakdownName, + Basis = y.Basis, + CheckPoints = y.CheckPoints, + }).ToList(); + return result; + } + /// + /// 获取材料进场复验数(异步) + /// + /// + public static async Task> GetMaterialInRecheckNumAsync() + { + return await Task.Run(GetMaterialInRecheckNum); + } + /// + /// 获取材料进场复验数合格数 + /// + /// + public static List GetMaterialInRecheckOKNum() + { + var result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail + join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId + join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId + where BeUnderConstructionList.Contains(y.ProjectId) && y.CheckAcceptType == "5" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime + select new Model.InspectionManagementOutput() + { + ProjectId = y.ProjectId, + //ProjectName = p.ProjectName, + //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), + Id = x.InspectionDetailId, + BreakdownCode = y.BreakdownCode, + BreakdownName = y.BreakdownName, + Basis = y.Basis, + CheckPoints = y.CheckPoints, + }).ToList(); + return result; + } + /// + /// 获取材料进场复验数合格数(异步) + /// + /// + public static async Task> GetMaterialInRecheckOKNumAsync() + { + return await Task.Run(GetMaterialInRecheckOKNum); + } + /// /// 获取分部工程验收数 /// @@ -1328,7 +1728,6 @@ namespace BLL { return await Task.Run(GetSubdivisionalWorksAcceptOKNum); } - #endregion } diff --git a/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs b/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs index de58415..2a03e36 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs @@ -52,22 +52,22 @@ namespace BLL if (count == 0) return null; // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in q - select new - { - x.Id, - x.UnitId, - x.CollCropCode, - x.UnitName, - x.ReportDate, - x.WelderNum, - x.TotalDineNum, - x.CompleteDineNum, - x.TotalFilmNum, - x.OKFilmNum, - x.State, - x.CreateDate, - x.CreateMan - }; + select new + { + x.Id, + x.UnitId, + x.CollCropCode, + x.UnitName, + x.ReportDate, + x.WelderNum, + x.TotalDineNum, + x.CompleteDineNum, + x.TotalFilmNum, + x.OKFilmNum, + x.State, + x.CreateDate, + x.CreateMan + }; } #endregion 获取列表 @@ -94,8 +94,8 @@ namespace BLL }; db.HJGLData_HJGL.InsertOnSubmit(table); db.SubmitChanges(); - } - + } + } public static void DeleteHJGLData_HJGLById(string Id) @@ -109,7 +109,7 @@ namespace BLL db.SubmitChanges(); } } - + } public static HJGLData_HJGL GetHJGLData_HJGLById(string Id) @@ -158,23 +158,27 @@ namespace BLL return data; } - public static HJGLData GetTodayHJGLData_HJGL() + public static async Task GetTodayHJGLData_HJGLAsync() { var data = new HJGLData(); - if (CommonService.GetIsThisUnit().CollCropCode== "91410200170644116B") + if (CommonService.GetIsThisUnit().CollCropCode == "91410200170644116B") { - return GetELECLTodayHJGLData_HJGL(); + return GetELECLTodayHJGLData_HJGL(); } - if (CommonService.GetIsThisUnit().CollCropCode == "914200001775697881") + if (CommonService.GetIsThisUnit().CollCropCode == "914200001775697881") { return GetCNCEC_16TodayHJGLData_HJGL(); } - var q = GetTodayData(); + /* var q = GetTodayData(); if (q != null && q.State == Const.CNCEC_State_S) data = StatisticalData(); else - data = StatisticalData(); + data = StatisticalData();*/ + + var modelTask = StatisticalDataAsync(); + var model = await modelTask; + data = model; return data; } /// @@ -188,11 +192,11 @@ namespace BLL string token = Const.sysglyId; string response = Funs.RequestPost(baseurl, token, ""); var json = JsonConvert.DeserializeObject(response) as JObject; - if (json != null && json["code"]?.ToString()=="1") + if (json != null && json["code"]?.ToString() == "1") { var str = json["data"]?.ToString(); - if (str != null) data = JsonConvert.DeserializeObject(str); - } + if (str != null) data = JsonConvert.DeserializeObject(str); + } return data; } @@ -216,9 +220,9 @@ namespace BLL catch (Exception e) { APICommonService.SaveSysHttpLog("GetCNCEC_16TodayHJGLData_HJGL", baseurl, e.ToString(), "Request|Post"); - + } - + } var json = JsonConvert.DeserializeObject(response) as JObject; if (json != null && json["code"]?.ToString() == "1") @@ -226,14 +230,14 @@ namespace BLL var str = json["data"]?.ToString(); if (str != null) data = JsonConvert.DeserializeObject(str); } - APICommonService.SaveSysHttpLog("GetCNCEC_16TodayHJGLData_HJGL", baseurl, response, "Request|Post" ); + APICommonService.SaveSysHttpLog("GetCNCEC_16TodayHJGLData_HJGL", baseurl, response, "Request|Post"); return data; } public static HJGLData_HJGL GetTodayData() { var q = (from x in Funs.DB.HJGLData_HJGL - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - select x).FirstOrDefault(); + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date + select x).FirstOrDefault(); return q; } public static HJGLData_HJGL GetSubUnitHjglDataByDate(string Unitid, DateTime? reportdate) @@ -247,7 +251,7 @@ namespace BLL var baseUnit = UnitService.GetUnitByUnitId(Unitid); var ProjectData = (from x in Funs.DB.Project_HJGLData_HJGL where x.ReportDate == reportdate && projectlist.Select(e => e.ProjectId).Contains(x.ProjectId) - select x).ToList(); + select x).ToList(); result = new HJGLData_HJGL { UnitId = Unitid, @@ -262,7 +266,7 @@ namespace BLL CreateMan = Const.sysglyId, CreateDate = DateTime.Now }; - return result; + return result; } public static void UpdateTodyData_State() { @@ -278,8 +282,8 @@ namespace BLL { var result = false; var q = (from x in Funs.DB.HJGLData_HJGL - where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date - select x).ToList(); + where x.ReportDate >= dateTime.Date && x.ReportDate < dateTime.Date.AddDays(1).Date + select x).ToList(); if (q != null && q.Count > 0) result = true; return result; } @@ -292,8 +296,8 @@ namespace BLL { var result = false; var q = (from x in Funs.DB.HJGLData_HJGL - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - select x).ToList(); + where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date + select x).ToList(); if (q.Count > 0) result = true; return result; } @@ -307,33 +311,101 @@ namespace BLL return responeData; } - public static HJGLData StatisticalData() + public static async Task StatisticalDataAsync() { var data = new HJGLData(); var thisUnitId = string.Empty; var thisUnit = CommonService.GetIsThisUnit(); if (thisUnit != null) thisUnitId = thisUnit.UnitId; var baseUnit = UnitService.GetUnitByUnitId(thisUnitId); - var ProjectData = (from x in Funs.DB.Project_HJGLData_HJGL - where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date - select x).ToList(); - Project_HJGLData_HJGLService.StatisticalAllProjectData(); Project_HJGLData_DefectService.StatisticalAllProjectData(); + // 并行执行异步方法 + var welderNumTask = HJGLData_HJGLService.GetWelderNumAsync(); //获取焊工总数 + var dineInfoListTask = HJGLData_HJGLService.GetDineInfoAsync(); //获达因数信息 + var chCheckItemListTask = HJGLData_HJGLService.GetCHCheckItemAsync(); //获取焊接检查信息 + // 等待所有异步方法执行完成 + await Task.WhenAll( + welderNumTask, + dineInfoListTask, + chCheckItemListTask + ); + + // 统一获取异步方法的返回值 + var welderNum = await welderNumTask; + var dineInfoList = await dineInfoListTask; + var chCheckItemList = await chCheckItemListTask; + + var table = new HJGLData_HJGL { UnitId = thisUnitId, CollCropCode = baseUnit.CollCropCode, UnitName = baseUnit.UnitName, ReportDate = DateTime.Now.Date, - WelderNum = ProjectData.Sum(x => x.WelderNum), - TotalDineNum = ProjectData.Sum(x => x.TotalDineNum), - CompleteDineNum = ProjectData.Sum(x => x.CompleteDineNum), - TotalFilmNum = ProjectData.Sum(x => x.TotalFilmNum), - OKFilmNum = ProjectData.Sum(x => x.OKFilmNum), + WelderNum = welderNum.Count(), + TotalDineNum = Convert.ToInt32(dineInfoList.Sum(x => x.Size)), + CompleteDineNum = Convert.ToInt32(dineInfoList.Sum(x => x.DoneDin)), + TotalFilmNum = Convert.ToInt32(chCheckItemList.Sum(x => x.CHT_TotalFilm)), + OKFilmNum = Convert.ToInt32(chCheckItemList.Sum(x => x.CHT_PassFilm)), CreateMan = Const.sysglyId, CreateDate = DateTime.Now }; + + Project_HJGLData_HJGLService.DeleteProject_HJGLData_HJGLByDate(DateTime.Now.Date); + // 预先对 dineInfoList 和 chCheckItemList 按 ProjectId 进行分组 + var dineInfoDict = dineInfoList + .Where(x => BeUnderConstructionList.Contains(x.ProjectId)) + .GroupBy(x => x.ProjectId) + .ToDictionary(g => g.Key, g => new + { + TotalDineNum = g.Sum(x => x.Size), + CompleteDineNum = g.Sum(x => x.DoneDin) + }); + + var chCheckItemDict = chCheckItemList + .Where(x => BeUnderConstructionList.Contains(x.ProjectId)) + .GroupBy(x => x.ProjectId) + .ToDictionary(g => g.Key, g => new + { + TotalFilmNum = g.Sum(x => x.CHT_TotalFilm), + OKFilmNum = g.Sum(x => x.CHT_PassFilm) + }); + + foreach (var projectid in BeUnderConstructionList) + { + // 获取焊工数量 + int welderCount = welderNum.Count(x => x.ProjectId == projectid); + + // 获取达因信息 + var dineInfo = dineInfoDict.TryGetValue(projectid, out var dineData) + ? dineData + : new { TotalDineNum = (decimal ?)0, CompleteDineNum = (decimal?)0 }; + + // 获取拍片信息 + var chCheckItem = chCheckItemDict.TryGetValue(projectid, out var checkData) + ? checkData + : new { TotalFilmNum = (int?)0, OKFilmNum = (int?)0 }; + + var projectCqmsData = new Project_HJGLData_HJGL() + { + Id = SQLHelper.GetNewID(), + ProjectId = projectid, + UnitId = thisUnitId, + CollCropCode = baseUnit.CollCropCode, + UnitName = baseUnit.UnitName, + ReportDate = DateTime.Now.Date, + WelderNum = welderCount, + TotalDineNum = Convert.ToInt32 (dineInfo.TotalDineNum), + CompleteDineNum = Convert.ToInt32(dineInfo.CompleteDineNum), + TotalFilmNum = chCheckItem.TotalFilmNum, + OKFilmNum = chCheckItem.OKFilmNum, + }; + + Project_HJGLData_HJGLService.AddProject_HJGLData_HJGL(projectCqmsData); + } + + if (IsReportByToday()) { table.Id = GetTodayData().Id; @@ -367,7 +439,7 @@ namespace BLL } public static void UpdateHJGLData_HJGL(HJGLData_HJGL newtable) - { + { using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString)) { var table = db.HJGLData_HJGL.FirstOrDefault(x => x.Id == newtable.Id); @@ -388,11 +460,11 @@ namespace BLL table.CreateDate = newtable.CreateDate; db.SubmitChanges(); } - } - + } + } - + /// /// 获取焊工总数 /// @@ -424,29 +496,23 @@ namespace BLL /// 获取总达因数和完成达因数 /// /// - public static List GetDineInfo() + public static IEnumerable GetDineInfo() { var result = (from x in Funs.DB.PW_JointInfo where BeUnderConstructionList.Contains(x.ProjectId) + group x by x.ProjectId into g select new Model.WeldDineOutput() { - Id = x.JOT_ID, - ProjectId = x.ProjectId, - Size = x.JOT_Size, - DoneDin = x.JOT_DoneDin - //UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds), - }).ToList(); + ProjectId = g.Key, + Size = g.Sum(x => x.JOT_Size), + DoneDin = g.Sum(x => x.JOT_DoneDin) + }); return result; - } - /// - /// 获取总达因数(异步) - /// - /// - public static async Task> GetDineInfoAsync() + } + public static async Task> GetDineInfoAsync() { return await Task.Run(GetDineInfo); } - /// /// 获取焊接检查信息 /// diff --git a/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs index 8b72318..359c130 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs @@ -41,6 +41,7 @@ namespace BLL SafeTrainNum = newtable.SafeTrainNum, SpecialTrainNum = newtable.SpecialTrainNum, SpecialOperationTrainNum = newtable.SpecialOperationTrainNum, + HseTechnicalNum = newtable.HseTechnicalNum, EnvironmentalTrainNum = newtable.EnvironmentalTrainNum, TotalEnergyConsumption = newtable.TotalEnergyConsumption, IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption, @@ -76,10 +77,12 @@ namespace BLL CompanySpecialPlanNum = newtable.CompanySpecialPlanNum, CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan, CompanyDrillNum = newtable.CompanyDrillNum, + CompanyDrillPersonNum = newtable.CompanyDrillPersonNum, ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum, ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum, ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan, ProjectDrillNum = newtable.ProjectDrillNum, + ProjectDrillPersonNum = newtable.ProjectDrillPersonNum, CostExtract = newtable.CostExtract, CostUse = newtable.CostUse, UseEquipmentNum = newtable.UseEquipmentNum, @@ -98,10 +101,12 @@ namespace BLL TrainPersonNum = newtable.TrainPersonNum, ConstructionNum = newtable.ConstructionNum, FinishedNum = newtable.FinishedNum, + ArgumentNum = newtable.ArgumentNum, SuperCompletedNum = newtable.SuperCompletedNum, SuperTrainPersonNum = newtable.SuperTrainPersonNum, SuperConstructionNum = newtable.SuperConstructionNum, SuperFinishedNum = newtable.SuperFinishedNum, + SuperArgumentNum = newtable.SuperArgumentNum, State = newtable.State, CreateDate = newtable.CreateDate, CreateMan = newtable.CreateMan @@ -149,6 +154,7 @@ namespace BLL item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum; item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum; item.CompanyDrillNum = dataHsse.CompanyDrillNum; + item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum; item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum; item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan; item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum; @@ -159,6 +165,7 @@ namespace BLL item.CostUse = dataHsse.CostUse; item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum; item.FinishedNum = dataHsse.FinishedNum; + item.ArgumentNum = dataHsse.ArgumentNum; item.GeneralAccidentNum = dataHsse.GeneralAccidentNum; item.GeneralClosedNum = dataHsse.GeneralClosedNum; item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum; @@ -184,6 +191,7 @@ namespace BLL item.NewWaterConsumption = dataHsse.NewWaterConsumption; item.ProjectComprehensivePlanNum = dataHsse.ProjectComprehensivePlanNum; item.ProjectDrillNum = dataHsse.ProjectDrillNum; + item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum; item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum; item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum; item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum; @@ -204,6 +212,7 @@ namespace BLL item.ShutdownNum = dataHsse.ShutdownNum; item.SpecialEquipmentNum = dataHsse.SpecialEquipmentNum; item.SpecialOperationTrainNum = dataHsse.SpecialOperationTrainNum; + item.HseTechnicalNum = dataHsse.HseTechnicalNum; item.EnvironmentalTrainNum = dataHsse.EnvironmentalTrainNum; item.SpecialSeriousAccidentNum = dataHsse.SpecialSeriousAccidentNum; item.SpecialTrainNum = dataHsse.SpecialTrainNum; @@ -211,6 +220,7 @@ namespace BLL item.SuperConstructionNum = dataHsse.SuperConstructionNum; item.SuperFinishedNum = dataHsse.SuperFinishedNum; item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum; + item.SuperArgumentNum = dataHsse.SuperArgumentNum; item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption; item.TotalWorkingHour = dataHsse.TotalWorkingHour; item.TrainPersonNum = dataHsse.TrainPersonNum; @@ -254,6 +264,7 @@ namespace BLL item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum; item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum; item.CompanyDrillNum = dataHsse.CompanyDrillNum; + item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum; item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum; item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan; item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum; @@ -264,6 +275,7 @@ namespace BLL item.CostUse = dataHsse.CostUse; item.EnterpriseTopicsMeetingNum = dataHsse.EnterpriseTopicsMeetingNum; item.FinishedNum = dataHsse.FinishedNum; + item.ArgumentNum = dataHsse.ArgumentNum; item.GeneralAccidentNum = dataHsse.GeneralAccidentNum; item.GeneralClosedNum = dataHsse.GeneralClosedNum; item.GeneralNotClosedNum = dataHsse.GeneralNotClosedNum; @@ -289,6 +301,7 @@ namespace BLL item.NewWaterConsumption = dataHsse.NewWaterConsumption; item.ProjectComprehensivePlanNum = dataHsse.ProjectComprehensivePlanNum; item.ProjectDrillNum = dataHsse.ProjectDrillNum; + item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum; item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum; item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum; item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum; @@ -309,12 +322,14 @@ namespace BLL item.ShutdownNum = dataHsse.ShutdownNum; item.SpecialEquipmentNum = dataHsse.SpecialEquipmentNum; item.SpecialOperationTrainNum = dataHsse.SpecialOperationTrainNum; + item.HseTechnicalNum = dataHsse.HseTechnicalNum; item.EnvironmentalTrainNum = dataHsse.EnvironmentalTrainNum; item.SpecialSeriousAccidentNum = dataHsse.SpecialSeriousAccidentNum; item.SpecialTrainNum = dataHsse.SpecialTrainNum; item.SuperCompletedNum = dataHsse.SuperCompletedNum; item.SuperConstructionNum = dataHsse.SuperConstructionNum; item.SuperFinishedNum = dataHsse.SuperFinishedNum; + item.SuperArgumentNum = dataHsse.SuperArgumentNum; item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum; item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption; item.TotalWorkingHour = dataHsse.TotalWorkingHour; @@ -647,6 +662,7 @@ namespace BLL var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync(); var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync(); var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync(); + var hseTechnicalNumTask = HSSEData_HSSEService.GetHseTechnicalNumAsync(); var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync(); var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync(); var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync(); @@ -704,7 +720,7 @@ namespace BLL safeWorkingHourTask, safeTrainTask, specialTrainTask, - specialOperationTrainTask, + specialOperationTrainTask, hseTechnicalNumTask, headOfficeInspectorGeneralTask, headOfficeFullTimeTask, branchInspectorGeneralTask, @@ -765,6 +781,7 @@ namespace BLL var safeTrainList = await safeTrainTask; var specialTrainList = await specialTrainTask; var specialOperationTrainList = await specialOperationTrainTask; + var hseTechnicalNum = await hseTechnicalNumTask; var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask; var headOfficeFullTimeList = await headOfficeFullTimeTask; var branchInspectorGeneralList = await branchInspectorGeneralTask; @@ -826,6 +843,7 @@ namespace BLL SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum), SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum), SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum), + HseTechnicalNum = hseTechnicalNum, EnvironmentalTrainNum = 0, TotalEnergyConsumption = totalEnergyConsumption, IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption, @@ -857,10 +875,12 @@ namespace BLL CompanySpecialPlanNum = companySpecialPlanList.Count(), CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(), CompanyDrillNum = companyDrillList.Count(), + CompanyDrillPersonNum = companyDrillList.Sum(x => x.JointPersonNum), ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(), ProjectSpecialPlanNum = projectSpecialPlanList.Count(), ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(), ProjectDrillNum = projectDrillList.Count(), + ProjectDrillPersonNum = projectDrillList.Sum(x => x.JointPersonNum), CostExtract = Convert.ToInt32(costExtract.Sum(x => x.SUMCost)), CostUse = Convert.ToInt32(costUseList.Sum(x => x.SUMCost)), UseEquipmentNum = useEquipmentList.Count(), @@ -879,16 +899,67 @@ namespace BLL TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum), ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum), FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum), + ArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.ArgumentNum), SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum), SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum), - SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum) + SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum), + SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum), + SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum) }; #region 添加项目统计数据 Project_HSSEData_HSSEService.DeleteProject_HSSEData_HSSEByDate(DateTime.Now.Date); + + var generalHiddenRectificationOutputsDict = generalHiddenRectificationOutputsList + .GroupBy(x => x.ProjectId) + .ToDictionary( + g => g.Key, + g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) } + ); + var majorHiddenRectificationOutputsDict = majorHiddenRectificationOutputsList + .GroupBy(x => x.ProjectId) + .ToDictionary( + g => g.Key, + g => new { ClosedNum = g.Sum(x => x.RecNum), NotClosedNum = g.Sum(x => x.NoRecNum) } + ); + var securityRiskOutputList = securityRiskOutputListTask.Result; + var securityRiskOutputDict = securityRiskOutputList + .GroupBy(x => x.ProjectId) + .ToDictionary( + g => g.Key, + g => new + { + LowRiskNum = g.Sum(x => x.LowRiskNum), + GeneralRiskNum = g.Sum(x => x.GeneralRiskNum), + MediumRiskNum = g.Sum(x => x.MediumRiskNum), + HighRiskNum = g.Sum(x => x.HighRiskNum) + } + ); + var largeEngineeringOutputList = largeEngineeringOutputsTask.Result; + var largeEngineeringOutputsDict = largeEngineeringOutputList + .GroupBy(x => x.ProjectId) + .ToDictionary( + g => g.Key, + g => new + { + CompletedNum = g.Sum(x => x.CompletedNum), + TrainPersonNum = g.Sum(x => x.TrainPersonNum), + ConstructionNum = g.Sum(x => x.ConstructionNum), + FinishedNum = g.Sum(x => x.FinishedNum), + ArgumentNum = g.Sum(x => x.ArgumentNum), + SuperCompletedNum = g.Sum(x => x.SuperCompletedNum), + SuperTrainPersonNum = g.Sum(x => x.SuperTrainPersonNum), + SuperConstructionNum = g.Sum(x => x.SuperConstructionNum), + SuperArgumentNum = g.Sum(x => x.SuperArgumentNum) + } + ); foreach (var projectid in BeUnderConstructionList) { + generalHiddenRectificationOutputsDict.TryGetValue(projectid, out var generalHiddenRectificationOutputs); + majorHiddenRectificationOutputsDict.TryGetValue(projectid, out var majorHiddenRectificationOutputs); + securityRiskOutputDict.TryGetValue(projectid, out var securityRiskOutputs); + largeEngineeringOutputsDict.TryGetValue(projectid, out var largeEngineeringOutputs); var projectHsseData = new Project_HSSEData_HSSE { Id = SQLHelper.GetNewID(), @@ -905,6 +976,7 @@ namespace BLL SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), SpecialTrainNum = specialTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), + HseTechnicalNum = hseTechnicalNum, EnvironmentalTrainNum = 0, TotalEnergyConsumption = 0, IncomeComprehensiveEnergyConsumption = 0, @@ -939,31 +1011,35 @@ namespace BLL CompanySpecialPlanNum = 0, CompanyOnSiteDisposalPlan = 0, CompanyDrillNum = 0, + CompanyDrillPersonNum = 0, ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => x.ProjectId == projectid), ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => x.ProjectId == projectid), ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => x.ProjectId == projectid), ProjectDrillNum = projectDrillList.Count(x => x.ProjectId == projectid), + ProjectDrillPersonNum = projectDrillList.Where(x => x.ProjectId == projectid).Sum(x => x.JointPersonNum), CostExtract = Convert.ToInt32(costExtract.Where(x => x.ProjectId == projectid).Sum(x => x.SUMCost)), CostUse = Convert.ToInt32(costUseList.Where(x => x.ProjectId == projectid).Sum(x => x.SUMCost)), UseEquipmentNum = useEquipmentList.Count(x => x.ProjectId == projectid), SpecialEquipmentNum = specialEquipmentList.Count(x => x.ProjectId == projectid), LicensesNum = licensesList.Count(x => x.ProjectId == projectid), LicensesCloseNum = licensesCloseList.Count(x => x.ProjectId == projectid), - GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.RecNum), - GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.NoRecNum), - MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.RecNum), - MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => x.ProjectId == projectid).Sum(x => x.NoRecNum), - LowRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.LowRiskNum), - GeneralRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.GeneralRiskNum), - MediumRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.MediumRiskNum), - HighRiskNum = securityRiskOutputListTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.HighRiskNum), - CompletedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.CompletedNum), - TrainPersonNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), - ConstructionNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.ConstructionNum), - FinishedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.FinishedNum), - SuperCompletedNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperCompletedNum), - SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperTrainPersonNum), - SuperConstructionNum = largeEngineeringOutputsTask.Result.Where(x => x.ProjectId == projectid).Sum(x => x.SuperConstructionNum) + GeneralClosedNum = generalHiddenRectificationOutputs?.ClosedNum ?? 0, + GeneralNotClosedNum = generalHiddenRectificationOutputs?.NotClosedNum ?? 0, + MajorClosedNum = majorHiddenRectificationOutputs?.ClosedNum ?? 0, + MajorNotClosedNum = majorHiddenRectificationOutputs?.NotClosedNum ?? 0, + LowRiskNum = securityRiskOutputs?.LowRiskNum ?? 0, + GeneralRiskNum = securityRiskOutputs?.GeneralRiskNum ?? 0, + MediumRiskNum = securityRiskOutputs?.MediumRiskNum ?? 0, + HighRiskNum = securityRiskOutputs?.HighRiskNum ?? 0, + CompletedNum = largeEngineeringOutputs?.CompletedNum ?? 0, + TrainPersonNum = largeEngineeringOutputs?.TrainPersonNum ?? 0, + ConstructionNum = largeEngineeringOutputs?.ConstructionNum ?? 0, + FinishedNum = largeEngineeringOutputs?.FinishedNum ?? 0, + ArgumentNum = largeEngineeringOutputs?.ArgumentNum ?? 0, + SuperCompletedNum = largeEngineeringOutputs?.SuperCompletedNum ?? 0, + SuperTrainPersonNum = largeEngineeringOutputs?.SuperTrainPersonNum ?? 0, + SuperConstructionNum = largeEngineeringOutputs?.SuperConstructionNum ?? 0, + SuperArgumentNum = largeEngineeringOutputs?.SuperArgumentNum ?? 0 }; Project_HSSEData_HSSEService.AddProject_HSSEData_HSSE(projectHsseData); } @@ -1123,6 +1199,7 @@ namespace BLL table.SafeTrainNum = newtable.SafeTrainNum; table.SpecialTrainNum = newtable.SpecialTrainNum; table.SpecialOperationTrainNum = newtable.SpecialOperationTrainNum; + table.HseTechnicalNum = newtable.HseTechnicalNum; table.EnvironmentalTrainNum = newtable.EnvironmentalTrainNum; table.TotalEnergyConsumption = newtable.TotalEnergyConsumption; table.IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption; @@ -1158,10 +1235,12 @@ namespace BLL table.CompanySpecialPlanNum = newtable.CompanySpecialPlanNum; table.CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan; table.CompanyDrillNum = newtable.CompanyDrillNum; + table.CompanyDrillPersonNum = newtable.CompanyDrillPersonNum; table.ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum; table.ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum; table.ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan; table.ProjectDrillNum = newtable.ProjectDrillNum; + table.ProjectDrillPersonNum = newtable.ProjectDrillPersonNum; table.CostExtract = newtable.CostExtract; table.CostUse = newtable.CostUse; table.UseEquipmentNum = newtable.UseEquipmentNum; @@ -1180,10 +1259,12 @@ namespace BLL table.TrainPersonNum = newtable.TrainPersonNum; table.ConstructionNum = newtable.ConstructionNum; table.FinishedNum = newtable.FinishedNum; + table.ArgumentNum = newtable.ArgumentNum; table.SuperCompletedNum = newtable.SuperCompletedNum; table.SuperTrainPersonNum = newtable.SuperTrainPersonNum; table.SuperConstructionNum = newtable.SuperConstructionNum; table.SuperFinishedNum = newtable.SuperFinishedNum; + table.SuperArgumentNum = newtable.SuperArgumentNum; table.State = newtable.State; table.CreateMan = newtable.CreateMan; table.CreateDate = newtable.CreateDate; @@ -1192,6 +1273,28 @@ namespace BLL } } + /// + /// 获取安全技术交底数 + /// + /// + public static int GetHseTechnicalNum() + { + var list = (from x in Funs.DB.License_HSETechnical + where BeUnderConstructionList.Contains(x.ProjectId) + select x).Distinct().ToList(); + var result = list.ToList().Count(); + return result; + + } + /// + /// 获取安全技术交底数(异步) + /// + /// + public static async Task GetHseTechnicalNumAsync() + { + return await Task.Run(GetHseTechnicalNum); + + } @@ -3623,11 +3726,12 @@ namespace BLL TrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == false).Sum(x => x.TrainPersonNum) ?? 0, ConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == false), FinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == false), + ArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == false), SuperCompletedNum = gg.Count(x => x.States == "1" && x.IsSuperLargerHazard == true), SuperTrainPersonNum = gg.Where(x => x.IsSuperLargerHazard == true).Sum(x => x.TrainPersonNum) ?? 0, SuperConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == true), SuperFinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == true), - + SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true), }).ToList(); return query; } @@ -3800,6 +3904,7 @@ namespace BLL x.SafeTrainNum, x.SpecialTrainNum, x.SpecialOperationTrainNum, + x.HseTechnicalNum, x.EnvironmentalTrainNum, x.TotalEnergyConsumption, x.IncomeComprehensiveEnergyConsumption, @@ -3835,10 +3940,12 @@ namespace BLL x.CompanySpecialPlanNum, x.CompanyOnSiteDisposalPlan, x.CompanyDrillNum, + x.CompanyDrillPersonNum, x.ProjectComprehensivePlanNum, x.ProjectSpecialPlanNum, x.ProjectOnSiteDisposalPlan, x.ProjectDrillNum, + x.ProjectDrillPersonNum, x.CostExtract, x.CostUse, x.UseEquipmentNum, @@ -3857,10 +3964,12 @@ namespace BLL x.TrainPersonNum, x.ConstructionNum, x.FinishedNum, + x.ArgumentNum, x.SuperCompletedNum, x.SuperTrainPersonNum, x.SuperConstructionNum, x.SuperFinishedNum, + x.SuperArgumentNum, x.State, x.CreateDate, x.CreateMan diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs index fff2906..5daa6f2 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs @@ -48,6 +48,18 @@ namespace BLL /// ProjectDivision, /// + /// 报验数据 + /// + Inspection, + /// + /// 施工方案数据 + /// + ConstructSolution, + /// + /// 特种设备质保体系和图纸会审/设计交底 + /// + SpecialEquipmentAndDesignDetails, + /// /// 全部数据 /// All @@ -195,6 +207,25 @@ namespace BLL SubProjectNum = newtable.SubProjectNum, SubdivisionalWorksNum = newtable.SubdivisionalWorksNum, InspectionLotNum = newtable.InspectionLotNum, + EquipmentInspectionNum = newtable.EquipmentInspectionNum, + EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum, + MachineInspectionNum = newtable.MachineInspectionNum, + MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum, + PersonInspectionNum = newtable.PersonInspectionNum, + PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum, + MaterialInspectionNum = newtable.MaterialInspectionNum, + MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum, + ConstructSolutionNum = newtable.ConstructSolutionNum, + ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum, + ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum, + SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum, + DesignDetailsNum = newtable.DesignDetailsNum, + UnitProjectAcceptNum = newtable.UnitProjectAcceptNum, + UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum, + SubProjectAcceptNum = newtable.SubProjectAcceptNum, + SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum, + SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum, + SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum }; db.Project_CQMSData_CQMS.InsertOnSubmit(table); db.SubmitChanges(); @@ -247,6 +278,25 @@ namespace BLL table.SubProjectNum = newtable.SubProjectNum; table.SubdivisionalWorksNum = newtable.SubdivisionalWorksNum; table.InspectionLotNum = newtable.InspectionLotNum; + table.EquipmentInspectionNum = newtable.EquipmentInspectionNum; + table.EquipmentInspectionQualifiedNum = newtable.EquipmentInspectionQualifiedNum; + table.MachineInspectionNum = newtable.MachineInspectionNum; + table.MachineInspectionQualifiedNum = newtable.MachineInspectionQualifiedNum; + table.PersonInspectionNum = newtable.PersonInspectionNum; + table.PersonInspectionQualifiedNum = newtable.PersonInspectionQualifiedNum; + table.MaterialInspectionNum = newtable.MaterialInspectionNum; + table.MaterialInspectionQualifiedNum = newtable.MaterialInspectionQualifiedNum; + table.ConstructSolutionNum = newtable.ConstructSolutionNum; + table.ConstructSolutionProjectApproveNum = newtable.ConstructSolutionProjectApproveNum; + table.ConstructSolutionUnitApproveNum = newtable.ConstructSolutionUnitApproveNum; + table.SpecialEquipmentQualityAssuranceSystemNum = newtable.SpecialEquipmentQualityAssuranceSystemNum; + table.DesignDetailsNum = newtable.DesignDetailsNum; + table.UnitProjectAcceptNum = newtable.UnitProjectAcceptNum; + table.UnitProjectAcceptOKNum = newtable.UnitProjectAcceptOKNum; + table.SubProjectAcceptNum = newtable.SubProjectAcceptNum; + table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum; + table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum; + table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum; db.SubmitChanges(); } } @@ -269,6 +319,20 @@ namespace BLL } } + + + public static void DeleteProject_CQMSData_CQMByDate(DateTime? reportDate) + { + using (var db = new SUBQHSEDB(Funs.ConnString)) + { + var table = db.Project_CQMSData_CQMS.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); + if (table != null) + { + db.Project_CQMSData_CQMS.DeleteAllOnSubmit(table); + db.SubmitChanges(); + } + } + } /// /// 根据projectid判断当天项目是否已统计数据 /// @@ -322,6 +386,7 @@ namespace BLL StatisticalData(item.ProjectId, CQMSDateType.All); } } + /// /// 统计数据 /// @@ -392,6 +457,13 @@ namespace BLL table.UnitProjectOnesOKNum = GetUnitProjectOnesOKNum(projectid); table.MaterialInRecheckNum = GetMaterialInRecheckNum(projectid); table.MaterialInRecheckOKNum = GetMaterialInRecheckOKNum(projectid); + + table.UnitProjectAcceptNum = GetUnitProjectOnesNum(projectid); + table.UnitProjectAcceptOKNum = GetUnitProjectOnesOKNum(projectid); + table.SubProjectAcceptNum = GetMaterialInRecheckNum(projectid); + table.SubProjectAcceptOKNum = GetMaterialInRecheckOKNum(projectid); + table.SubdivisionalWorksAcceptNum = GetSubdivisionalWorksAcceptNum(projectid); + table.SubdivisionalWorksAcceptOKNum = GetSubdivisionalWorksAcceptOKNum(projectid); } if (cQMSDateType == CQMSDateType.ProjectDivision || cQMSDateType == CQMSDateType.All) { @@ -401,6 +473,28 @@ namespace BLL table.SubdivisionalWorksNum = GetSubdivisionalWorksNum(projectid); table.InspectionLotNum = GetInspectionLotNum(projectid); } + if (cQMSDateType == CQMSDateType.Inspection || cQMSDateType == CQMSDateType.All) + { + table.EquipmentInspectionNum = GetComprehensiveInspectionEquipmentNum(projectid); + table.EquipmentInspectionQualifiedNum = GetComprehensiveInspectionEquipmentOKNum(projectid); + table.MachineInspectionNum = GetComprehensiveInspectionMachineNum(projectid); + table.MachineInspectionQualifiedNum = GetComprehensiveInspectionMachineOKNum(projectid); + table.PersonInspectionNum = GetComprehensiveInspectionPersonNum(projectid); + table.PersonInspectionQualifiedNum = GetComprehensiveInspectionPersonOKNum(projectid); + table.MaterialInspectionNum = GetComprehensiveInspectionMaterialNum(projectid); + table.MaterialInspectionQualifiedNum = GetComprehensiveInspectionMaterialOKNum(projectid); + } + if (cQMSDateType == CQMSDateType.ConstructSolution || cQMSDateType == CQMSDateType.All) + { + table.ConstructSolutionNum = GetConstructSolutionNum(projectid); + table.ConstructSolutionProjectApproveNum = GetConstructSolutionProjectApproveNum(projectid); + table.ConstructSolutionUnitApproveNum = GetConstructSolutionUnitApproveNum(projectid); + } + if (cQMSDateType == CQMSDateType.SpecialEquipmentAndDesignDetails || cQMSDateType == CQMSDateType.All) + { + table.SpecialEquipmentQualityAssuranceSystemNum = GetSpecialEquipmentQualityAssuranceSystemNum(projectid); + table.DesignDetailsNum = GetTechnicalDisclosePersonNum(projectid); + } if (IsReportByToday(projectid)) { @@ -691,6 +785,32 @@ namespace BLL select x).Count(); return result; } + /// + /// 获取分项工程验收数 + /// + /// + public static int GetSubdivisionalWorksAcceptNum(string projectid) + { + int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail + join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId + where y.ProjectId == projectid && y.CheckAcceptType == "6" && x.CreateDate > Const.DtmarkTime + select x).Count(); + return result; + } + /// + /// 获取分项工程验收合格数 + /// + /// + public static int GetSubdivisionalWorksAcceptOKNum(string projectid) + { + int result = (from x in Funs.DB.ProcessControl_InspectionManagementDetail + join y in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals y.BreakdownProjectId + join z in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals z.InspectionId + where y.ProjectId == projectid && y.CheckAcceptType == "6" && z.IsOnceQualified == true && x.CreateDate > Const.DtmarkTime + select x).Count(); + return result; + } + /// /// 获取单项工程个数 /// @@ -747,6 +867,148 @@ namespace BLL return result; } + /// + /// 设备报验-报检数 + /// + /// + /// + public static int GetComprehensiveInspectionEquipmentNum(string projectid) + { + int result = (from x in Funs.DB.Comprehensive_InspectionEquipment + where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + select x).Count(); + return result; + } + /// + /// 设备报验-报检合格数 + /// + /// + /// + public static int GetComprehensiveInspectionEquipmentOKNum(string projectid) + { + int result = (from x in Funs.DB.Comprehensive_InspectionEquipment + where x.ProjectId == projectid && x.SamplingResult == "1" && x.CompileDate > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取机具报验-报检数 + /// + /// + /// + public static int GetComprehensiveInspectionMachineNum(string projectid) + { + int result = (from x in Funs.DB.Comprehensive_InspectionMachine + where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取机具报验-报检合格数 + /// + /// + /// + public static int GetComprehensiveInspectionMachineOKNum(string projectid) + { + int result = (from x in Funs.DB.Comprehensive_InspectionMachine + where x.ProjectId == projectid && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取人员报验-报检数 + /// + /// + public static int GetComprehensiveInspectionPersonNum(string projectid) + { + var result = (from x in Funs.DB.Comprehensive_InspectionPerson + where x.ProjectId == projectid && x.IsOnSite.HasValue && x.CompileDate > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取人员报验-报检合格数 + /// + /// + public static int GetComprehensiveInspectionPersonOKNum(string projectid) + { + var result = (from x in Funs.DB.Comprehensive_InspectionPerson + where x.ProjectId == projectid && x.IsOnSite == true && x.CompileDate > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取材料报验-报检数 + /// + /// + public static int GetComprehensiveInspectionMaterialNum(string projectid) + { + var result = 0; + return result; + } + + /// + /// 获取材料报验-报检合格数 + /// + /// + public static int GetComprehensiveInspectionMaterialOKNum(string projectid) + { + var result = 0; + return result; + } + + /// + /// 施工方案数量 + /// + /// + /// + public static int GetConstructSolutionNum(string projectid) + { + var result = (from x in Funs.DB.Solution_CQMSConstructSolution + where x.ProjectId == projectid + select x).Count(); + return result; + } + /// + /// 施工方案数量——项目审批数量 + /// + /// + /// + public static int GetConstructSolutionProjectApproveNum(string projectid) + { + var result = (from x in Funs.DB.Solution_CQMSConstructSolution + where x.ProjectId == projectid && x.State == "1" + select x).Count(); + return result; + } + /// + /// 施工方案数量——项目审批数量 + /// + /// + /// + public static int GetConstructSolutionUnitApproveNum(string projectid) + { + var result = 0; + return result; + } + + /// + /// 特种设备质保体系 + /// + /// + /// + public static int GetSpecialEquipmentQualityAssuranceSystemNum(string projectid) + { + var result = 0; + return result; + } + + #region 推送项目质量数据 @@ -756,7 +1018,7 @@ namespace BLL /// public static ReturnData PushProjectCQMSData() { - var items = (from x in db.Project_CQMSData_CQMS + var items = (from x in Funs.DB.Project_CQMSData_CQMS where x.ReportDate == DateTime.Now.Date select x).ToList(); Model.ReturnData responeData = new Model.ReturnData(); diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs index 6ef976d..c30691e 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs @@ -355,12 +355,12 @@ namespace BLL /// public static ReturnData PushProjectHJGLData() { - var items = (from x in db.Project_HJGLData_HJGL - where x.ReportDate == DateTime.Now.Date - select x).ToList(); - var defectItems = (from x in db.Project_HJGLData_Defect - where x.ReportDate == DateTime.Now.Date - select x).ToList(); + var items = (from x in Funs.DB.Project_HJGLData_HJGL + where x.ReportDate == DateTime.Now.Date + select x).ToList(); + var defectItems = (from x in Funs.DB.Project_HJGLData_Defect + where x.ReportDate == DateTime.Now.Date + select x).ToList(); Model.ReturnData responeData = new Model.ReturnData(); if (items.Count() > 0 || defectItems.Count() > 0) { @@ -379,5 +379,20 @@ namespace BLL } #endregion + + + public static void DeleteProject_HJGLData_HJGLByDate(DateTime? reportDate) + { + using (var db = new SUBQHSEDB(Funs.ConnString)) + { + var table = db.Project_HJGLData_HJGL.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0); + if (table != null) + { + db.Project_HJGLData_HJGL.DeleteAllOnSubmit(table); + db.SubmitChanges(); + } + } + } + } } \ No newline at end of file diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs index b8454d0..67de1e3 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs @@ -129,6 +129,7 @@ namespace BLL SafeTrainNum = newtable.SafeTrainNum, SpecialTrainNum = newtable.SpecialTrainNum, SpecialOperationTrainNum = newtable.SpecialOperationTrainNum, + HseTechnicalNum = newtable.HseTechnicalNum, TotalEnergyConsumption = newtable.TotalEnergyConsumption, IncomeComprehensiveEnergyConsumption = newtable.IncomeComprehensiveEnergyConsumption, NewWaterConsumption = newtable.NewWaterConsumption, @@ -163,10 +164,12 @@ namespace BLL CompanySpecialPlanNum = newtable.CompanySpecialPlanNum, CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan, CompanyDrillNum = newtable.CompanyDrillNum, + CompanyDrillPersonNum = newtable.CompanyDrillPersonNum, ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum, ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum, ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan, ProjectDrillNum = newtable.ProjectDrillNum, + ProjectDrillPersonNum = newtable.ProjectDrillPersonNum, CostExtract = newtable.CostExtract, CostUse = newtable.CostUse, UseEquipmentNum = newtable.UseEquipmentNum, @@ -185,16 +188,19 @@ namespace BLL TrainPersonNum = newtable.TrainPersonNum, ConstructionNum = newtable.ConstructionNum, FinishedNum = newtable.FinishedNum, + ArgumentNum = newtable.ArgumentNum, SuperCompletedNum = newtable.SuperCompletedNum, SuperTrainPersonNum = newtable.SuperTrainPersonNum, SuperConstructionNum = newtable.SuperConstructionNum, - SuperFinishedNum = newtable.SuperFinishedNum + SuperFinishedNum = newtable.SuperFinishedNum, + SuperArgumentNum = newtable.SuperArgumentNum }; db.Project_HSSEData_HSSE.InsertOnSubmit(table); db.SubmitChanges(); } } + /// /// 删除实体 /// diff --git a/SUBQHSE/FineUIPro.Web/HSSE/EduTrain/WorkPostTestTrainingItemIn.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/EduTrain/WorkPostTestTrainingItemIn.aspx.cs index cd03398..47b814c 100644 --- a/SUBQHSE/FineUIPro.Web/HSSE/EduTrain/WorkPostTestTrainingItemIn.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/HSSE/EduTrain/WorkPostTestTrainingItemIn.aspx.cs @@ -175,10 +175,10 @@ namespace FineUIPro.Web.HSSE.EduTrain BItem = pds.Rows[i][7].ToString().Trim(), }; - if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) - { - newViewTrainingItem.Score = int.Parse(pds.Rows[i][12].ToString().Trim()); - } + // if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) + // { + // newViewTrainingItem.Score = int.Parse(pds.Rows[i][12].ToString().Trim()); + // } ////试题类型 string col1 = pds.Rows[i][1].ToString().Trim(); @@ -331,7 +331,7 @@ namespace FineUIPro.Web.HSSE.EduTrain CItem = newViewTrainingItem.CItem, DItem = newViewTrainingItem.DItem, EItem = newViewTrainingItem.EItem, - Score = newViewTrainingItem.Score, + // Score = newViewTrainingItem.Score, AnswerItems = newViewTrainingItem.AnswerItems, }; if (newViewTrainingItem.Abstracts.Contains("(") || newViewTrainingItem.Abstracts.Contains(")") diff --git a/SUBQHSE/FineUIPro.Web/HSSE/Emergency/EmergencyList.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/Emergency/EmergencyList.aspx.cs index 19497cd..0850ed5 100644 --- a/SUBQHSE/FineUIPro.Web/HSSE/Emergency/EmergencyList.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/HSSE/Emergency/EmergencyList.aspx.cs @@ -35,13 +35,17 @@ namespace FineUIPro.Web.HSSE.Emergency if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - ////权限按钮方法 - this.GetButtonPower(); this.ProjectId = this.CurrUser.LoginProjectId; if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId) { this.ProjectId = Request.Params["projectId"]; } + if (!string.IsNullOrEmpty(this.ProjectId)) + { + this.panelLeftRegion.Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); + } this.InitDropDownList(); this.btnNew.OnClientClick = Window1.GetShowReference("EmergencyListEdit.aspx") + "return false;"; diff --git a/SUBQHSE/FineUIPro.Web/HSSE/Emergency/EmergencySupply.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/Emergency/EmergencySupply.aspx.cs index a5eba02..cda9f53 100644 --- a/SUBQHSE/FineUIPro.Web/HSSE/Emergency/EmergencySupply.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/HSSE/Emergency/EmergencySupply.aspx.cs @@ -37,13 +37,17 @@ namespace FineUIPro.Web.HSSE.Emergency if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - ////权限按钮方法 - this.GetButtonPower(); this.ProjectId = this.CurrUser.LoginProjectId; if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId) { this.ProjectId = Request.Params["projectId"]; } + if (!string.IsNullOrEmpty(this.ProjectId)) + { + this.panelLeftRegion.Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); + } this.InitDropDownList(); this.btnNew.OnClientClick = Window1.GetShowReference("EmergencySupplyEdit.aspx") + "return false;"; if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) diff --git a/SUBQHSE/Model/Model.cs b/SUBQHSE/Model/Model.cs index 092fb70..6daa770 100644 --- a/SUBQHSE/Model/Model.cs +++ b/SUBQHSE/Model/Model.cs @@ -2930,9 +2930,6 @@ namespace Model partial void InsertZJ_Energy(ZJ_Energy instance); partial void UpdateZJ_Energy(ZJ_Energy instance); partial void DeleteZJ_Energy(ZJ_Energy instance); - partial void InsertZJ_EnvironmentalCheck(ZJ_EnvironmentalCheck instance); - partial void UpdateZJ_EnvironmentalCheck(ZJ_EnvironmentalCheck instance); - partial void DeleteZJ_EnvironmentalCheck(ZJ_EnvironmentalCheck instance); partial void InsertZJ_SuperviseCheck(ZJ_SuperviseCheck instance); partial void UpdateZJ_SuperviseCheck(ZJ_SuperviseCheck instance); partial void DeleteZJ_SuperviseCheck(ZJ_SuperviseCheck instance); @@ -8256,6 +8253,14 @@ namespace Model } } + public System.Data.Linq.Table ProjectSitePersonNum + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table ProjectSupervision_Check1 { get @@ -10600,6 +10605,22 @@ namespace Model } } + public System.Data.Linq.Table View_DayPersonReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_DayReport + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_DayRportView { get @@ -10896,6 +10917,30 @@ namespace Model } } + public System.Data.Linq.Table View_HSSEAccidentReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_HSSECheckReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_HSSERiskReport + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_Information_AccidentCauseReport { get @@ -11160,6 +11205,22 @@ namespace Model } } + public System.Data.Linq.Table View_ProjectPictureReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_ProjectqualityReport + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_ProjectStatistics { get @@ -11872,14 +11933,6 @@ namespace Model } } - public System.Data.Linq.Table ZJ_EnvironmentalCheck - { - get - { - return this.GetTable(); - } - } - public System.Data.Linq.Table ZJ_SuperviseCheck { get @@ -19553,6 +19606,8 @@ namespace Model private string _Remark; + private EntitySet _Supervise_SuperviseCheckReport; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -19569,6 +19624,7 @@ namespace Model public Base_CheckType() { + this._Supervise_SuperviseCheckReport = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReport), new Action(this.detach_Supervise_SuperviseCheckReport)); OnCreated(); } @@ -19652,6 +19708,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_CheckType", Storage="_Supervise_SuperviseCheckReport", ThisKey="CheckTypeId", OtherKey="CheckType", DeleteRule="NO ACTION")] + public EntitySet Supervise_SuperviseCheckReport + { + get + { + return this._Supervise_SuperviseCheckReport; + } + set + { + this._Supervise_SuperviseCheckReport.Assign(value); + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -19671,6 +19740,18 @@ namespace Model this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } + + private void attach_Supervise_SuperviseCheckReport(Supervise_SuperviseCheckReport entity) + { + this.SendPropertyChanging(); + entity.Base_CheckType = this; + } + + private void detach_Supervise_SuperviseCheckReport(Supervise_SuperviseCheckReport entity) + { + this.SendPropertyChanging(); + entity.Base_CheckType = null; + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_CNProfessional")] @@ -141688,8 +141769,6 @@ namespace Model private string _Remark; - private string _DriverDataTypeId; - private EntityRef _Base_Project; #region 可扩展性方法定义 @@ -141708,8 +141787,6 @@ namespace Model partial void OnAttachUrlChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); - partial void OnDriverDataTypeIdChanging(string value); - partial void OnDriverDataTypeIdChanged(); #endregion public DriverPrepare_DriverData() @@ -141842,26 +141919,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverDataTypeId", DbType="NVarChar(50)")] - public string DriverDataTypeId - { - get - { - return this._DriverDataTypeId; - } - set - { - if ((this._DriverDataTypeId != value)) - { - this.OnDriverDataTypeIdChanging(value); - this.SendPropertyChanging(); - this._DriverDataTypeId = value; - this.SendPropertyChanged("DriverDataTypeId"); - this.OnDriverDataTypeIdChanged(); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DriverPrepare_DriverData_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -142784,7 +142841,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyName", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] public string DutyName { get @@ -142804,7 +142861,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyCode", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] public string DutyCode { get @@ -198862,6 +198919,8 @@ namespace Model private string _ControlId; + private System.Nullable _IsUpdate; + private EntityRef _Base_Unit; private EntityRef _HSSE_Hazard_HazardRegisterTypes; @@ -198958,6 +199017,8 @@ namespace Model partial void OnRisk_LevelChanged(); partial void OnControlIdChanging(string value); partial void OnControlIdChanged(); + partial void OnIsUpdateChanging(System.Nullable value); + partial void OnIsUpdateChanged(); #endregion public HSSE_Hazard_HazardRegister() @@ -199855,6 +199916,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this.OnIsUpdateChanging(value); + this.SendPropertyChanging(); + this._IsUpdate = value; + this.SendPropertyChanged("IsUpdate"); + this.OnIsUpdateChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_Base_Unit", Storage="_Base_Unit", ThisKey="ResponsibleUnit", OtherKey="UnitId", IsForeignKey=true)] public Base_Unit Base_Unit { @@ -202984,6 +203065,16 @@ namespace Model private System.Nullable _EnvironmentalTrainNum; + private System.Nullable _HseTechnicalNum; + + private System.Nullable _ArgumentNum; + + private System.Nullable _SuperArgumentNum; + + private System.Nullable _ProjectDrillPersonNum; + + private System.Nullable _CompanyDrillPersonNum; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -203146,6 +203237,16 @@ namespace Model partial void OnCreateDateChanged(); partial void OnEnvironmentalTrainNumChanging(System.Nullable value); partial void OnEnvironmentalTrainNumChanged(); + partial void OnHseTechnicalNumChanging(System.Nullable value); + partial void OnHseTechnicalNumChanged(); + partial void OnArgumentNumChanging(System.Nullable value); + partial void OnArgumentNumChanged(); + partial void OnSuperArgumentNumChanging(System.Nullable value); + partial void OnSuperArgumentNumChanged(); + partial void OnProjectDrillPersonNumChanging(System.Nullable value); + partial void OnProjectDrillPersonNumChanged(); + partial void OnCompanyDrillPersonNumChanging(System.Nullable value); + partial void OnCompanyDrillPersonNumChanged(); #endregion public HSSEData_HSSE() @@ -204733,6 +204834,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HseTechnicalNum", DbType="Int")] + public System.Nullable HseTechnicalNum + { + get + { + return this._HseTechnicalNum; + } + set + { + if ((this._HseTechnicalNum != value)) + { + this.OnHseTechnicalNumChanging(value); + this.SendPropertyChanging(); + this._HseTechnicalNum = value; + this.SendPropertyChanged("HseTechnicalNum"); + this.OnHseTechnicalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArgumentNum", DbType="Int")] + public System.Nullable ArgumentNum + { + get + { + return this._ArgumentNum; + } + set + { + if ((this._ArgumentNum != value)) + { + this.OnArgumentNumChanging(value); + this.SendPropertyChanging(); + this._ArgumentNum = value; + this.SendPropertyChanged("ArgumentNum"); + this.OnArgumentNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperArgumentNum", DbType="Int")] + public System.Nullable SuperArgumentNum + { + get + { + return this._SuperArgumentNum; + } + set + { + if ((this._SuperArgumentNum != value)) + { + this.OnSuperArgumentNumChanging(value); + this.SendPropertyChanging(); + this._SuperArgumentNum = value; + this.SendPropertyChanged("SuperArgumentNum"); + this.OnSuperArgumentNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDrillPersonNum", DbType="Int")] + public System.Nullable ProjectDrillPersonNum + { + get + { + return this._ProjectDrillPersonNum; + } + set + { + if ((this._ProjectDrillPersonNum != value)) + { + this.OnProjectDrillPersonNumChanging(value); + this.SendPropertyChanging(); + this._ProjectDrillPersonNum = value; + this.SendPropertyChanged("ProjectDrillPersonNum"); + this.OnProjectDrillPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyDrillPersonNum", DbType="Int")] + public System.Nullable CompanyDrillPersonNum + { + get + { + return this._CompanyDrillPersonNum; + } + set + { + if ((this._CompanyDrillPersonNum != value)) + { + this.OnCompanyDrillPersonNumChanging(value); + this.SendPropertyChanging(); + this._CompanyDrillPersonNum = value; + this.SendPropertyChanged("CompanyDrillPersonNum"); + this.OnCompanyDrillPersonNumChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -206018,7 +206219,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] public string ProjectId { get @@ -228058,7 +228259,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description1", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description1", DbType="NVarChar(500)")] public string Description1 { get @@ -228078,7 +228279,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description2", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description2", DbType="NVarChar(500)")] public string Description2 { get @@ -228098,7 +228299,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description3", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description3", DbType="NVarChar(500)")] public string Description3 { get @@ -228118,7 +228319,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description4", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description4", DbType="NVarChar(500)")] public string Description4 { get @@ -228138,7 +228339,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description5", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description5", DbType="NVarChar(500)")] public string Description5 { get @@ -228158,7 +228359,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description6", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description6", DbType="NVarChar(500)")] public string Description6 { get @@ -228178,7 +228379,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description7", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description7", DbType="NVarChar(500)")] public string Description7 { get @@ -228198,7 +228399,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description8", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description8", DbType="NVarChar(500)")] public string Description8 { get @@ -228218,7 +228419,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description9", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description9", DbType="NVarChar(500)")] public string Description9 { get @@ -238006,7 +238207,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyObjectives", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyObjectives", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string SafetyObjectives { get @@ -238026,7 +238227,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentSituation", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentSituation", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string AccidentSituation { get @@ -238046,7 +238247,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Awards", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Awards", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Awards { get @@ -238066,7 +238267,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkDevelopment", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkDevelopment", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string WorkDevelopment { get @@ -238086,7 +238287,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonnelTraining", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonnelTraining", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string PersonnelTraining { get @@ -238106,7 +238307,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GovernanceSituation", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GovernanceSituation", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string GovernanceSituation { get @@ -238126,7 +238327,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ManagementActivity", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ManagementActivity", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string ManagementActivity { get @@ -238146,7 +238347,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkExperience", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkExperience", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string WorkExperience { get @@ -238166,7 +238367,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Countermeasures", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Countermeasures", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Countermeasures { get @@ -238186,7 +238387,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NextYearWorkPlan", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NextYearWorkPlan", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string NextYearWorkPlan { get @@ -238206,7 +238407,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobSuggestion", DbType="NVarChar(4000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobSuggestion", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string JobSuggestion { get @@ -291965,8 +292166,6 @@ namespace Model private EntityRef _ProjectData_TeamGroup; - private EntityRef _SitePerson_Person; - private EntityRef _Sys_User; #region 可扩展性方法定义 @@ -292058,7 +292257,6 @@ namespace Model this._Base_Project = default(EntityRef); this._Base_Unit = default(EntityRef); this._ProjectData_TeamGroup = default(EntityRef); - this._SitePerson_Person = default(EntityRef); this._Sys_User = default(EntityRef); OnCreated(); } @@ -292186,10 +292384,6 @@ namespace Model { if ((this._PersonId != value)) { - if (this._SitePerson_Person.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnPersonIdChanging(value); this.SendPropertyChanging(); this._PersonId = value; @@ -292965,40 +293159,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Perfomance_PersonPerfomance_SitePerson_Person", Storage="_SitePerson_Person", ThisKey="PersonId", OtherKey="PersonId", IsForeignKey=true)] - public SitePerson_Person SitePerson_Person - { - get - { - return this._SitePerson_Person.Entity; - } - set - { - SitePerson_Person previousValue = this._SitePerson_Person.Entity; - if (((previousValue != value) - || (this._SitePerson_Person.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._SitePerson_Person.Entity = null; - previousValue.Perfomance_PersonPerfomance.Remove(this); - } - this._SitePerson_Person.Entity = value; - if ((value != null)) - { - value.Perfomance_PersonPerfomance.Add(this); - this._PersonId = value.PersonId; - } - else - { - this._PersonId = default(string); - } - this.SendPropertyChanged("SitePerson_Person"); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Perfomance_PersonPerfomance_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] public Sys_User Sys_User { @@ -311064,6 +311224,16 @@ namespace Model private System.Nullable _EnvironmentalTrainNum; + private System.Nullable _HseTechnicalNum; + + private System.Nullable _ArgumentNum; + + private System.Nullable _SuperArgumentNum; + + private System.Nullable _ProjectDrillPersonNum; + + private System.Nullable _CompanyDrillPersonNum; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -311222,6 +311392,16 @@ namespace Model partial void OnSuperFinishedNumChanged(); partial void OnEnvironmentalTrainNumChanging(System.Nullable value); partial void OnEnvironmentalTrainNumChanged(); + partial void OnHseTechnicalNumChanging(System.Nullable value); + partial void OnHseTechnicalNumChanged(); + partial void OnArgumentNumChanging(System.Nullable value); + partial void OnArgumentNumChanged(); + partial void OnSuperArgumentNumChanging(System.Nullable value); + partial void OnSuperArgumentNumChanged(); + partial void OnProjectDrillPersonNumChanging(System.Nullable value); + partial void OnProjectDrillPersonNumChanged(); + partial void OnCompanyDrillPersonNumChanging(System.Nullable value); + partial void OnCompanyDrillPersonNumChanged(); #endregion public Project_HSSEData_HSSE() @@ -312769,6 +312949,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HseTechnicalNum", DbType="Int")] + public System.Nullable HseTechnicalNum + { + get + { + return this._HseTechnicalNum; + } + set + { + if ((this._HseTechnicalNum != value)) + { + this.OnHseTechnicalNumChanging(value); + this.SendPropertyChanging(); + this._HseTechnicalNum = value; + this.SendPropertyChanged("HseTechnicalNum"); + this.OnHseTechnicalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArgumentNum", DbType="Int")] + public System.Nullable ArgumentNum + { + get + { + return this._ArgumentNum; + } + set + { + if ((this._ArgumentNum != value)) + { + this.OnArgumentNumChanging(value); + this.SendPropertyChanging(); + this._ArgumentNum = value; + this.SendPropertyChanged("ArgumentNum"); + this.OnArgumentNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperArgumentNum", DbType="Int")] + public System.Nullable SuperArgumentNum + { + get + { + return this._SuperArgumentNum; + } + set + { + if ((this._SuperArgumentNum != value)) + { + this.OnSuperArgumentNumChanging(value); + this.SendPropertyChanging(); + this._SuperArgumentNum = value; + this.SendPropertyChanged("SuperArgumentNum"); + this.OnSuperArgumentNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDrillPersonNum", DbType="Int")] + public System.Nullable ProjectDrillPersonNum + { + get + { + return this._ProjectDrillPersonNum; + } + set + { + if ((this._ProjectDrillPersonNum != value)) + { + this.OnProjectDrillPersonNumChanging(value); + this.SendPropertyChanging(); + this._ProjectDrillPersonNum = value; + this.SendPropertyChanged("ProjectDrillPersonNum"); + this.OnProjectDrillPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyDrillPersonNum", DbType="Int")] + public System.Nullable CompanyDrillPersonNum + { + get + { + return this._CompanyDrillPersonNum; + } + set + { + if ((this._CompanyDrillPersonNum != value)) + { + this.OnCompanyDrillPersonNumChanging(value); + this.SendPropertyChanging(); + this._CompanyDrillPersonNum = value; + this.SendPropertyChanged("CompanyDrillPersonNum"); + this.OnCompanyDrillPersonNumChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -313566,6 +313846,10 @@ namespace Model private string _OrganizationPic; + private string _CQMS_OrganizationPic; + + private string _QRCodeAttachUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -313602,6 +313886,10 @@ namespace Model partial void OnIsSynchroChanged(); partial void OnOrganizationPicChanging(string value); partial void OnOrganizationPicChanged(); + partial void OnCQMS_OrganizationPicChanging(string value); + partial void OnCQMS_OrganizationPicChanged(); + partial void OnQRCodeAttachUrlChanging(string value); + partial void OnQRCodeAttachUrlChanged(); #endregion public Project_ProjectUnit() @@ -313899,6 +314187,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CQMS_OrganizationPic", DbType="NVarChar(100)")] + public string CQMS_OrganizationPic + { + get + { + return this._CQMS_OrganizationPic; + } + set + { + if ((this._CQMS_OrganizationPic != value)) + { + this.OnCQMS_OrganizationPicChanging(value); + this.SendPropertyChanging(); + this._CQMS_OrganizationPic = value; + this.SendPropertyChanged("CQMS_OrganizationPic"); + this.OnCQMS_OrganizationPicChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QRCodeAttachUrl", DbType="NVarChar(200)")] + public string QRCodeAttachUrl + { + get + { + return this._QRCodeAttachUrl; + } + set + { + if ((this._QRCodeAttachUrl != value)) + { + this.OnQRCodeAttachUrlChanging(value); + this.SendPropertyChanging(); + this._QRCodeAttachUrl = value; + this.SendPropertyChanged("QRCodeAttachUrl"); + this.OnQRCodeAttachUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Project_ProjectUnit_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -319098,6 +319426,231 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ProjectSitePersonNum")] + public partial class ProjectSitePersonNum + { + + private string _ProjectName; + + private string _ProjectCode; + + private System.Nullable _GenManagerCount; + + private System.Nullable _ManagerSystemOutChinaCount; + + private System.Nullable _ManagerSystemOutForeignCount; + + private System.Nullable _ManagerSystemInChinaCount; + + private System.Nullable _ManagerSystemInForeignCount; + + private System.Nullable _OperManSystemOutChinaCount; + + private System.Nullable _OperManSystemOutForeignCount; + + private System.Nullable _OperManSystemInChinaCount; + + private System.Nullable _OperManSystemInForeignCount; + + private string _IsRealName; + + public ProjectSitePersonNum() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")] + public string ProjectCode + { + get + { + return this._ProjectCode; + } + set + { + if ((this._ProjectCode != value)) + { + this._ProjectCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GenManagerCount", DbType="Int")] + public System.Nullable GenManagerCount + { + get + { + return this._GenManagerCount; + } + set + { + if ((this._GenManagerCount != value)) + { + this._GenManagerCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ManagerSystemOutChinaCount", DbType="Int")] + public System.Nullable ManagerSystemOutChinaCount + { + get + { + return this._ManagerSystemOutChinaCount; + } + set + { + if ((this._ManagerSystemOutChinaCount != value)) + { + this._ManagerSystemOutChinaCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ManagerSystemOutForeignCount", DbType="Int")] + public System.Nullable ManagerSystemOutForeignCount + { + get + { + return this._ManagerSystemOutForeignCount; + } + set + { + if ((this._ManagerSystemOutForeignCount != value)) + { + this._ManagerSystemOutForeignCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ManagerSystemInChinaCount", DbType="Int")] + public System.Nullable ManagerSystemInChinaCount + { + get + { + return this._ManagerSystemInChinaCount; + } + set + { + if ((this._ManagerSystemInChinaCount != value)) + { + this._ManagerSystemInChinaCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ManagerSystemInForeignCount", DbType="Int")] + public System.Nullable ManagerSystemInForeignCount + { + get + { + return this._ManagerSystemInForeignCount; + } + set + { + if ((this._ManagerSystemInForeignCount != value)) + { + this._ManagerSystemInForeignCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperManSystemOutChinaCount", DbType="Int")] + public System.Nullable OperManSystemOutChinaCount + { + get + { + return this._OperManSystemOutChinaCount; + } + set + { + if ((this._OperManSystemOutChinaCount != value)) + { + this._OperManSystemOutChinaCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperManSystemOutForeignCount", DbType="Int")] + public System.Nullable OperManSystemOutForeignCount + { + get + { + return this._OperManSystemOutForeignCount; + } + set + { + if ((this._OperManSystemOutForeignCount != value)) + { + this._OperManSystemOutForeignCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperManSystemInChinaCount", DbType="Int")] + public System.Nullable OperManSystemInChinaCount + { + get + { + return this._OperManSystemInChinaCount; + } + set + { + if ((this._OperManSystemInChinaCount != value)) + { + this._OperManSystemInChinaCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperManSystemInForeignCount", DbType="Int")] + public System.Nullable OperManSystemInForeignCount + { + get + { + return this._OperManSystemInForeignCount; + } + set + { + if ((this._OperManSystemInForeignCount != value)) + { + this._OperManSystemInForeignCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsRealName", DbType="VarChar(2) NOT NULL", CanBeNull=false)] + public string IsRealName + { + get + { + return this._IsRealName; + } + set + { + if ((this._IsRealName != value)) + { + this._IsRealName = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ProjectSupervision_Check1")] public partial class ProjectSupervision_Check1 : INotifyPropertyChanging, INotifyPropertyChanged { @@ -364456,6 +365009,10 @@ namespace Model private string _PersonSpecialtyId; + private System.Nullable _BlackList; + + private string _BlackReason; + private string _Major; private string _Languages; @@ -364488,8 +365045,6 @@ namespace Model private EntitySet _HJGL_WeldJoint_SitePerson_Person_CoverWelder; - private EntitySet _Perfomance_PersonPerfomance; - private EntitySet _QualityAudit_EquipmentPersonQuality; private EntitySet _QualityAudit_PersonQuality; @@ -364662,6 +365217,10 @@ namespace Model partial void OnSafeWorkingYearsChanged(); partial void OnPersonSpecialtyIdChanging(string value); partial void OnPersonSpecialtyIdChanged(); + partial void OnBlackListChanging(System.Nullable value); + partial void OnBlackListChanged(); + partial void OnBlackReasonChanging(string value); + partial void OnBlackReasonChanged(); partial void OnMajorChanging(string value); partial void OnMajorChanged(); partial void OnLanguagesChanging(string value); @@ -364687,7 +365246,6 @@ namespace Model this._HJGL_RepairRecord = new EntitySet(new Action(this.attach_HJGL_RepairRecord), new Action(this.detach_HJGL_RepairRecord)); this._HJGL_WeldJoint = new EntitySet(new Action(this.attach_HJGL_WeldJoint), new Action(this.detach_HJGL_WeldJoint)); this._HJGL_WeldJoint_SitePerson_Person_CoverWelder = new EntitySet(new Action(this.attach_HJGL_WeldJoint_SitePerson_Person_CoverWelder), new Action(this.detach_HJGL_WeldJoint_SitePerson_Person_CoverWelder)); - this._Perfomance_PersonPerfomance = new EntitySet(new Action(this.attach_Perfomance_PersonPerfomance), new Action(this.detach_Perfomance_PersonPerfomance)); this._QualityAudit_EquipmentPersonQuality = new EntitySet(new Action(this.attach_QualityAudit_EquipmentPersonQuality), new Action(this.detach_QualityAudit_EquipmentPersonQuality)); this._QualityAudit_PersonQuality = new EntitySet(new Action(this.attach_QualityAudit_PersonQuality), new Action(this.detach_QualityAudit_PersonQuality)); this._QualityAudit_SafePersonQuality = new EntitySet(new Action(this.attach_QualityAudit_SafePersonQuality), new Action(this.detach_QualityAudit_SafePersonQuality)); @@ -364750,7 +365308,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")] public string PersonName { get @@ -366042,6 +366600,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BlackList", DbType="Bit")] + public System.Nullable BlackList + { + get + { + return this._BlackList; + } + set + { + if ((this._BlackList != value)) + { + this.OnBlackListChanging(value); + this.SendPropertyChanging(); + this._BlackList = value; + this.SendPropertyChanged("BlackList"); + this.OnBlackListChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BlackReason", DbType="NVarChar(500)")] + public string BlackReason + { + get + { + return this._BlackReason; + } + set + { + if ((this._BlackReason != value)) + { + this.OnBlackReasonChanging(value); + this.SendPropertyChanging(); + this._BlackReason = value; + this.SendPropertyChanged("BlackReason"); + this.OnBlackReasonChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Major", DbType="NVarChar(100)")] public string Major { @@ -366285,19 +366883,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Perfomance_PersonPerfomance_SitePerson_Person", Storage="_Perfomance_PersonPerfomance", ThisKey="PersonId", OtherKey="PersonId", DeleteRule="NO ACTION")] - public EntitySet Perfomance_PersonPerfomance - { - get - { - return this._Perfomance_PersonPerfomance; - } - set - { - this._Perfomance_PersonPerfomance.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityAudit_EquipmentPersonQuality_SitePerson_Person", Storage="_QualityAudit_EquipmentPersonQuality", ThisKey="PersonId", OtherKey="PersonId", DeleteRule="NO ACTION")] public EntitySet QualityAudit_EquipmentPersonQuality { @@ -366865,18 +367450,6 @@ namespace Model entity.CoverWelder = null; } - private void attach_Perfomance_PersonPerfomance(Perfomance_PersonPerfomance entity) - { - this.SendPropertyChanging(); - entity.SitePerson_Person = this; - } - - private void detach_Perfomance_PersonPerfomance(Perfomance_PersonPerfomance entity) - { - this.SendPropertyChanging(); - entity.SitePerson_Person = null; - } - private void attach_QualityAudit_EquipmentPersonQuality(QualityAudit_EquipmentPersonQuality entity) { this.SendPropertyChanging(); @@ -376972,6 +377545,8 @@ namespace Model private EntitySet _Supervise_SubUnitCheckRectify; + private EntityRef _Base_CheckType; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -377007,6 +377582,7 @@ namespace Model public Supervise_SuperviseCheckReport() { this._Supervise_SubUnitCheckRectify = new EntitySet(new Action(this.attach_Supervise_SubUnitCheckRectify), new Action(this.detach_Supervise_SubUnitCheckRectify)); + this._Base_CheckType = default(EntityRef); this._Base_Project = default(EntityRef); this._Base_Unit = default(EntityRef); this._Supervise_SuperviseCheckReportItem = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReportItem), new Action(this.detach_Supervise_SuperviseCheckReportItem)); @@ -377212,6 +377788,10 @@ namespace Model { if ((this._CheckType != value)) { + if (this._Base_CheckType.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnCheckTypeChanging(value); this.SendPropertyChanging(); this._CheckType = value; @@ -377234,6 +377814,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_CheckType", Storage="_Base_CheckType", ThisKey="CheckType", OtherKey="CheckTypeId", IsForeignKey=true)] + public Base_CheckType Base_CheckType + { + get + { + return this._Base_CheckType.Entity; + } + set + { + Base_CheckType previousValue = this._Base_CheckType.Entity; + if (((previousValue != value) + || (this._Base_CheckType.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_CheckType.Entity = null; + previousValue.Supervise_SuperviseCheckReport.Remove(this); + } + this._Base_CheckType.Entity = value; + if ((value != null)) + { + value.Supervise_SuperviseCheckReport.Add(this); + this._CheckType = value.CheckTypeId; + } + else + { + this._CheckType = default(string); + } + this.SendPropertyChanged("Base_CheckType"); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -394325,10 +394939,6 @@ namespace Model private System.Nullable _ReportDate; - private System.Nullable _CreateDate; - - private string _CreateMan; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -394349,10 +394959,6 @@ namespace Model partial void OnGreatRiskNumChanged(); partial void OnReportDateChanging(System.Nullable value); partial void OnReportDateChanged(); - partial void OnCreateDateChanging(System.Nullable value); - partial void OnCreateDateChanged(); - partial void OnCreateManChanging(string value); - partial void OnCreateManChanged(); #endregion public SYHSEData_Data() @@ -394520,46 +395126,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateDate", DbType="DateTime")] - public System.Nullable CreateDate - { - get - { - return this._CreateDate; - } - set - { - if ((this._CreateDate != value)) - { - this.OnCreateDateChanging(value); - this.SendPropertyChanging(); - this._CreateDate = value; - this.SendPropertyChanged("CreateDate"); - this.OnCreateDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateMan", DbType="NVarChar(50)")] - public string CreateMan - { - get - { - return this._CreateMan; - } - set - { - if ((this._CreateMan != value)) - { - this.OnCreateManChanging(value); - this.SendPropertyChanging(); - this._CreateMan = value; - this.SendPropertyChanged("CreateMan"); - this.OnCreateManChanged(); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -407760,7 +408326,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] public string Remark { get @@ -437299,7 +437865,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyTrainingItemId", DbType="NVarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyTrainingItemId", DbType="NVarChar(50)")] public string CompanyTrainingItemId { get @@ -457228,6 +457794,276 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_DayPersonReport")] + public partial class View_DayPersonReport + { + + private string _ProjectId; + + private string _ProjectName; + + private string _ProjectCode; + + private string _UnitTypeName; + + private string _YearMonth; + + private System.Nullable _MonthTotalPersonNum; + + private System.Nullable _AccumulatedPersonNum; + + public View_DayPersonReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")] + public string ProjectCode + { + get + { + return this._ProjectCode; + } + set + { + if ((this._ProjectCode != value)) + { + this._ProjectCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitTypeName", DbType="NVarChar(100)")] + public string UnitTypeName + { + get + { + return this._UnitTypeName; + } + set + { + if ((this._UnitTypeName != value)) + { + this._UnitTypeName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearMonth", DbType="VarChar(7)")] + public string YearMonth + { + get + { + return this._YearMonth; + } + set + { + if ((this._YearMonth != value)) + { + this._YearMonth = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthTotalPersonNum", DbType="Decimal(38,2)")] + public System.Nullable MonthTotalPersonNum + { + get + { + return this._MonthTotalPersonNum; + } + set + { + if ((this._MonthTotalPersonNum != value)) + { + this._MonthTotalPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccumulatedPersonNum", DbType="Decimal(38,2)")] + public System.Nullable AccumulatedPersonNum + { + get + { + return this._AccumulatedPersonNum; + } + set + { + if ((this._AccumulatedPersonNum != value)) + { + this._AccumulatedPersonNum = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_DayReport")] + public partial class View_DayReport + { + + private string _ProjectId; + + private string _ProjectName; + + private string _ProjectCode; + + private string _UnitTypeName; + + private string _YearMonth; + + private System.Nullable _MonthTotalPersonWorkTime; + + private System.Nullable _AccumulatedPersonWorkTime; + + public View_DayReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")] + public string ProjectCode + { + get + { + return this._ProjectCode; + } + set + { + if ((this._ProjectCode != value)) + { + this._ProjectCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitTypeName", DbType="NVarChar(100)")] + public string UnitTypeName + { + get + { + return this._UnitTypeName; + } + set + { + if ((this._UnitTypeName != value)) + { + this._UnitTypeName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearMonth", DbType="VarChar(7)")] + public string YearMonth + { + get + { + return this._YearMonth; + } + set + { + if ((this._YearMonth != value)) + { + this._YearMonth = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthTotalPersonWorkTime", DbType="Decimal(38,2)")] + public System.Nullable MonthTotalPersonWorkTime + { + get + { + return this._MonthTotalPersonWorkTime; + } + set + { + if ((this._MonthTotalPersonWorkTime != value)) + { + this._MonthTotalPersonWorkTime = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccumulatedPersonWorkTime", DbType="Decimal(38,2)")] + public System.Nullable AccumulatedPersonWorkTime + { + get + { + return this._AccumulatedPersonWorkTime; + } + set + { + if ((this._AccumulatedPersonWorkTime != value)) + { + this._AccumulatedPersonWorkTime = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_DayRportView")] public partial class View_DayRportView { @@ -461635,6 +462471,8 @@ namespace Model private System.Nullable _SafeSupervisionIsOK; + private System.Nullable _IsUpdate; + private string _ProjectName; private string _CheckCycle; @@ -461643,6 +462481,8 @@ namespace Model private string _ResponsibilityUnitName; + private string _ResponsibilityUnitCollCropCode; + private string _ResponsibilityManName; private string _ResponsibilityManTel; @@ -462271,6 +463111,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUpdate", DbType="Bit")] + public System.Nullable IsUpdate + { + get + { + return this._IsUpdate; + } + set + { + if ((this._IsUpdate != value)) + { + this._IsUpdate = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] public string ProjectName { @@ -462335,6 +463191,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityUnitCollCropCode", DbType="NVarChar(50)")] + public string ResponsibilityUnitCollCropCode + { + get + { + return this._ResponsibilityUnitCollCropCode; + } + set + { + if ((this._ResponsibilityUnitCollCropCode != value)) + { + this._ResponsibilityUnitCollCropCode = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityManName", DbType="NVarChar(50)")] public string ResponsibilityManName { @@ -470809,6 +471681,411 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HSSEAccidentReport")] + public partial class View_HSSEAccidentReport + { + + private string _ProjectId; + + private string _ProjectName; + + private string _ProjectCode; + + private string _YearMonth; + + private string _AccidentTypeName; + + private System.Nullable _MonthTotal; + + private System.Nullable _Accumulated; + + public View_HSSEAccidentReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")] + public string ProjectCode + { + get + { + return this._ProjectCode; + } + set + { + if ((this._ProjectCode != value)) + { + this._ProjectCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearMonth", DbType="VarChar(7)")] + public string YearMonth + { + get + { + return this._YearMonth; + } + set + { + if ((this._YearMonth != value)) + { + this._YearMonth = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentTypeName", DbType="NVarChar(100)")] + public string AccidentTypeName + { + get + { + return this._AccidentTypeName; + } + set + { + if ((this._AccidentTypeName != value)) + { + this._AccidentTypeName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthTotal", DbType="Int")] + public System.Nullable MonthTotal + { + get + { + return this._MonthTotal; + } + set + { + if ((this._MonthTotal != value)) + { + this._MonthTotal = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Accumulated", DbType="Int")] + public System.Nullable Accumulated + { + get + { + return this._Accumulated; + } + set + { + if ((this._Accumulated != value)) + { + this._Accumulated = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HSSECheckReport")] + public partial class View_HSSECheckReport + { + + private string _ProjectId; + + private string _ProjectName; + + private string _ProjectCode; + + private string _YearMonth; + + private string _CheckTypeName; + + private System.Nullable _MonthTotal; + + private System.Nullable _Accumulated; + + public View_HSSECheckReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")] + public string ProjectCode + { + get + { + return this._ProjectCode; + } + set + { + if ((this._ProjectCode != value)) + { + this._ProjectCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearMonth", DbType="VarChar(7)")] + public string YearMonth + { + get + { + return this._YearMonth; + } + set + { + if ((this._YearMonth != value)) + { + this._YearMonth = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTypeName", DbType="VarChar(16) NOT NULL", CanBeNull=false)] + public string CheckTypeName + { + get + { + return this._CheckTypeName; + } + set + { + if ((this._CheckTypeName != value)) + { + this._CheckTypeName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthTotal", DbType="Int")] + public System.Nullable MonthTotal + { + get + { + return this._MonthTotal; + } + set + { + if ((this._MonthTotal != value)) + { + this._MonthTotal = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Accumulated", DbType="Int")] + public System.Nullable Accumulated + { + get + { + return this._Accumulated; + } + set + { + if ((this._Accumulated != value)) + { + this._Accumulated = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HSSERiskReport")] + public partial class View_HSSERiskReport + { + + private string _ProjectName; + + private string _ProjectCode; + + private System.Nullable _ALLCount; + + private System.Nullable _MajorRisksCount; + + private System.Nullable _SignificantRiskCount; + + private System.Nullable _NorMalRiskCount; + + private System.Nullable _LowRiskCount; + + public View_HSSERiskReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")] + public string ProjectCode + { + get + { + return this._ProjectCode; + } + set + { + if ((this._ProjectCode != value)) + { + this._ProjectCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ALLCount", DbType="Int")] + public System.Nullable ALLCount + { + get + { + return this._ALLCount; + } + set + { + if ((this._ALLCount != value)) + { + this._ALLCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorRisksCount", DbType="Int")] + public System.Nullable MajorRisksCount + { + get + { + return this._MajorRisksCount; + } + set + { + if ((this._MajorRisksCount != value)) + { + this._MajorRisksCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignificantRiskCount", DbType="Int")] + public System.Nullable SignificantRiskCount + { + get + { + return this._SignificantRiskCount; + } + set + { + if ((this._SignificantRiskCount != value)) + { + this._SignificantRiskCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NorMalRiskCount", DbType="Int")] + public System.Nullable NorMalRiskCount + { + get + { + return this._NorMalRiskCount; + } + set + { + if ((this._NorMalRiskCount != value)) + { + this._NorMalRiskCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LowRiskCount", DbType="Int")] + public System.Nullable LowRiskCount + { + get + { + return this._LowRiskCount; + } + set + { + if ((this._LowRiskCount != value)) + { + this._LowRiskCount = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_AccidentCauseReport")] public partial class View_Information_AccidentCauseReport { @@ -483797,7 +485074,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")] public string PersonName { get @@ -483958,6 +485235,186 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_ProjectPictureReport")] + public partial class View_ProjectPictureReport + { + + private string _ProjectCode; + + private string _ProjectName; + + private string _Title; + + private string _Name; + + private string _AttachUrl; + + private System.Nullable _UploadDate; + + public View_ProjectPictureReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")] + public string ProjectCode + { + get + { + return this._ProjectCode; + } + set + { + if ((this._ProjectCode != value)) + { + this._ProjectCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Title", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string Title + { + get + { + return this._Title; + } + set + { + if ((this._Title != value)) + { + this._Title = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this._Name = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this._AttachUrl = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UploadDate", DbType="DateTime")] + public System.Nullable UploadDate + { + get + { + return this._UploadDate; + } + set + { + if ((this._UploadDate != value)) + { + this._UploadDate = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_ProjectqualityReport")] + public partial class View_ProjectqualityReport + { + + private string _ProjectName; + + private string _ProjectCode; + + private string _HJPassRate; + + public View_ProjectqualityReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(100)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCode", DbType="NVarChar(50)")] + public string ProjectCode + { + get + { + return this._ProjectCode; + } + set + { + if ((this._ProjectCode != value)) + { + this._ProjectCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HJPassRate", DbType="NVarChar(4000)")] + public string HJPassRate + { + get + { + return this._HJPassRate; + } + set + { + if ((this._HJPassRate != value)) + { + this._HJPassRate = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_ProjectStatistics")] public partial class View_ProjectStatistics { @@ -487557,7 +489014,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")] public string PersonName { get @@ -493413,8 +494870,6 @@ namespace Model private string _EItemEng; - private System.Nullable _Score; - private string _AnswerItems; public View_Training_TestTrainingItem() @@ -493789,22 +495244,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Score", DbType="Int")] - public System.Nullable Score - { - get - { - return this._Score; - } - set - { - if ((this._Score != value)) - { - this._Score = value; - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AnswerItems", DbType="NVarChar(50)")] public string AnswerItems { @@ -495874,7 +497313,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")] public string PersonName { get @@ -518097,308 +519536,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZJ_EnvironmentalCheck")] - public partial class ZJ_EnvironmentalCheck : INotifyPropertyChanging, INotifyPropertyChanged - { - - private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); - - private string _Id; - - private string _ProjectId; - - private System.Nullable _Tsp; - - private System.Nullable _Temp; - - private System.Nullable _Noise; - - private System.Nullable _Humid; - - private System.Nullable _PmTwoPointFive; - - private System.Nullable _WindSpeed; - - private System.Nullable _PmTen; - - private System.Nullable _Time; - - private System.Nullable _CreateTime; - - #region 可扩展性方法定义 - partial void OnLoaded(); - partial void OnValidate(System.Data.Linq.ChangeAction action); - partial void OnCreated(); - partial void OnIdChanging(string value); - partial void OnIdChanged(); - partial void OnProjectIdChanging(string value); - partial void OnProjectIdChanged(); - partial void OnTspChanging(System.Nullable value); - partial void OnTspChanged(); - partial void OnTempChanging(System.Nullable value); - partial void OnTempChanged(); - partial void OnNoiseChanging(System.Nullable value); - partial void OnNoiseChanged(); - partial void OnHumidChanging(System.Nullable value); - partial void OnHumidChanged(); - partial void OnPmTwoPointFiveChanging(System.Nullable value); - partial void OnPmTwoPointFiveChanged(); - partial void OnWindSpeedChanging(System.Nullable value); - partial void OnWindSpeedChanged(); - partial void OnPmTenChanging(System.Nullable value); - partial void OnPmTenChanged(); - partial void OnTimeChanging(System.Nullable value); - partial void OnTimeChanged(); - partial void OnCreateTimeChanging(System.Nullable value); - partial void OnCreateTimeChanged(); - #endregion - - public ZJ_EnvironmentalCheck() - { - OnCreated(); - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] - public string Id - { - get - { - return this._Id; - } - set - { - if ((this._Id != value)) - { - this.OnIdChanging(value); - this.SendPropertyChanging(); - this._Id = value; - this.SendPropertyChanged("Id"); - this.OnIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] - public string ProjectId - { - get - { - return this._ProjectId; - } - set - { - if ((this._ProjectId != value)) - { - this.OnProjectIdChanging(value); - this.SendPropertyChanging(); - this._ProjectId = value; - this.SendPropertyChanged("ProjectId"); - this.OnProjectIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tsp", DbType="Float")] - public System.Nullable Tsp - { - get - { - return this._Tsp; - } - set - { - if ((this._Tsp != value)) - { - this.OnTspChanging(value); - this.SendPropertyChanging(); - this._Tsp = value; - this.SendPropertyChanged("Tsp"); - this.OnTspChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Temp", DbType="Float")] - public System.Nullable Temp - { - get - { - return this._Temp; - } - set - { - if ((this._Temp != value)) - { - this.OnTempChanging(value); - this.SendPropertyChanging(); - this._Temp = value; - this.SendPropertyChanged("Temp"); - this.OnTempChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Noise", DbType="Float")] - public System.Nullable Noise - { - get - { - return this._Noise; - } - set - { - if ((this._Noise != value)) - { - this.OnNoiseChanging(value); - this.SendPropertyChanging(); - this._Noise = value; - this.SendPropertyChanged("Noise"); - this.OnNoiseChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Humid", DbType="Float")] - public System.Nullable Humid - { - get - { - return this._Humid; - } - set - { - if ((this._Humid != value)) - { - this.OnHumidChanging(value); - this.SendPropertyChanging(); - this._Humid = value; - this.SendPropertyChanged("Humid"); - this.OnHumidChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PmTwoPointFive", DbType="Float")] - public System.Nullable PmTwoPointFive - { - get - { - return this._PmTwoPointFive; - } - set - { - if ((this._PmTwoPointFive != value)) - { - this.OnPmTwoPointFiveChanging(value); - this.SendPropertyChanging(); - this._PmTwoPointFive = value; - this.SendPropertyChanged("PmTwoPointFive"); - this.OnPmTwoPointFiveChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WindSpeed", DbType="Float")] - public System.Nullable WindSpeed - { - get - { - return this._WindSpeed; - } - set - { - if ((this._WindSpeed != value)) - { - this.OnWindSpeedChanging(value); - this.SendPropertyChanging(); - this._WindSpeed = value; - this.SendPropertyChanged("WindSpeed"); - this.OnWindSpeedChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PmTen", DbType="Float")] - public System.Nullable PmTen - { - get - { - return this._PmTen; - } - set - { - if ((this._PmTen != value)) - { - this.OnPmTenChanging(value); - this.SendPropertyChanging(); - this._PmTen = value; - this.SendPropertyChanged("PmTen"); - this.OnPmTenChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Time", DbType="DateTime")] - public System.Nullable Time - { - get - { - return this._Time; - } - set - { - if ((this._Time != value)) - { - this.OnTimeChanging(value); - this.SendPropertyChanging(); - this._Time = value; - this.SendPropertyChanged("Time"); - this.OnTimeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] - public System.Nullable CreateTime - { - get - { - return this._CreateTime; - } - set - { - if ((this._CreateTime != value)) - { - this.OnCreateTimeChanging(value); - this.SendPropertyChanging(); - this._CreateTime = value; - this.SendPropertyChanged("CreateTime"); - this.OnCreateTimeChanged(); - } - } - } - - public event PropertyChangingEventHandler PropertyChanging; - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void SendPropertyChanging() - { - if ((this.PropertyChanging != null)) - { - this.PropertyChanging(this, emptyChangingEventArgs); - } - } - - protected virtual void SendPropertyChanged(String propertyName) - { - if ((this.PropertyChanged != null)) - { - this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - } - } - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZJ_SuperviseCheck")] public partial class ZJ_SuperviseCheck : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SUBQHSE/Model/Model.csproj b/SUBQHSE/Model/Model.csproj index 60b264e..51c469e 100644 --- a/SUBQHSE/Model/Model.csproj +++ b/SUBQHSE/Model/Model.csproj @@ -346,6 +346,7 @@ + diff --git a/SUBQHSE/Model/ZHGL/DataSync/CHCheckItemOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/CHCheckItemOutput.cs index c3a4b03..a167534 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/CHCheckItemOutput.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/CHCheckItemOutput.cs @@ -7,7 +7,7 @@ namespace Model /// public class CHCheckItemOutput : BaseEntities { - public string Id { get; set; } + public string Id { get; set; } /// /// 总片数 /// diff --git a/SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs b/SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs index 32f33e1..8d4b0ba 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/CQMSDataItem.cs @@ -54,6 +54,25 @@ namespace Model public int? UnitProjectOnesOKNum { get; set; } public string UnitProjectOnesRate { get; set; } public int? UseNum { get; set; } + public int? EquipmentInspectionNum { get; set; } + public int? EquipmentInspectionQualifiedNum { get; set; } + public int? MachineInspectionNum { get; set; } + public int? MachineInspectionQualifiedNum { get; set; } + public int? PersonInspectionNum { get; set; } + public int? PersonInspectionQualifiedNum { get; set; } + public int? MaterialInspectionNum { get; set; } + public int? MaterialInspectionQualifiedNum { get; set; } + public int? ConstructSolutionNum { get; set; } + public int? ConstructSolutionProjectApproveNum { get; set; } + public int? ConstructSolutionUnitApproveNum { get; set; } + public int? SpecialEquipmentQualityAssuranceSystemNum { get; set; } + public int? DesignDetailsNum { get; set; } + public int? UnitProjectAcceptNum { get; set; } + public int? UnitProjectAcceptOKNum { get; set; } + public int? SubProjectAcceptNum { get; set; } + public int? SubProjectAcceptOKNum { get; set; } + public int? SubdivisionalWorksAcceptNum { get; set; } + public int? SubdivisionalWorksAcceptOKNum { get; set; } } } diff --git a/SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs b/SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs index dfd1a9d..9f5e917 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/HSSEDataItem.cs @@ -29,6 +29,8 @@ namespace Model public int? CompanyComprehensiveCheckNum { get; set; } public int? CompanyComprehensivePlanNum { get; set; } public int? CompanyDrillNum { get; set; } + public int? CompanyDrillPersonNum { get; set; } + public int? CompanyLeadShiftCheckNum { get; set; } public int? CompanyOnSiteDisposalPlan { get; set; } public int? CompanySpecialCheckNum { get; set; } @@ -39,6 +41,8 @@ namespace Model public int? CostUse { get; set; } public int? EnterpriseTopicsMeetingNum { get; set; } public int? FinishedNum { get; set; } + public int? ArgumentNum { get; set; } + public int? SuperArgumentNum { get; set; } public int? GeneralAccidentNum { get; set; } public int? GeneralClosedNum { get; set; } public int? GeneralNotClosedNum { get; set; } @@ -64,6 +68,8 @@ namespace Model public decimal? NewWaterConsumption { get; set; } public int? ProjectComprehensivePlanNum { get; set; } public int? ProjectDrillNum { get; set; } + public int? ProjectDrillPersonNum { get; set; } + public int? ProjectFullTimeNum { get; set; } public int? ProjectInspectorGeneralNum { get; set; } public int? ProjectLeadShiftCheckNum { get; set; } @@ -84,6 +90,8 @@ namespace Model public int? ShutdownNum { get; set; } public int? SpecialEquipmentNum { get; set; } public int? SpecialOperationTrainNum { get; set; } + public int? HseTechnicalNum { get; set; } + public int? EnvironmentalTrainNum { get; set; } public int? SpecialSeriousAccidentNum { get; set; } public int? SpecialTrainNum { get; set; } diff --git a/SUBQHSE/Model/ZHGL/DataSync/InspectionManagementOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/InspectionManagementOutput.cs index 5bbe6e7..a4d6eaf 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/InspectionManagementOutput.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/InspectionManagementOutput.cs @@ -7,7 +7,7 @@ namespace Model /// public class InspectionManagementOutput : BaseEntities { - public string Id { get; set; } + public string Id { get; set; } public string BreakdownCode { get; set; } public string BreakdownName { get; set; } public string Basis { get; set; } diff --git a/SUBQHSE/Model/ZHGL/DataSync/LargeEngineeringOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/LargeEngineeringOutput.cs index d12d0cd..ed306c7 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/LargeEngineeringOutput.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/LargeEngineeringOutput.cs @@ -1,6 +1,6 @@ namespace Model { - public class LargeEngineeringOutput:BaseEntities + public class LargeEngineeringOutput : BaseEntities { /// /// 危大工程审批完成数 @@ -34,5 +34,13 @@ /// 超危大工程完工个数 /// public int SuperFinishedNum { get; set; } + /// + /// 危大工程论证个数 + /// + public int ArgumentNum { get; set; } + /// + /// 超危大工程论证个数 + /// + public int SuperArgumentNum { get; set; } } } \ No newline at end of file diff --git a/SUBQHSE/Model/ZHGL/DataSync/WBSBreakdownProjectOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/WBSBreakdownProjectOutput.cs new file mode 100644 index 0000000..695b15e --- /dev/null +++ b/SUBQHSE/Model/ZHGL/DataSync/WBSBreakdownProjectOutput.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class WBSBreakdownProjectOutput :BaseEntities + { + /// + /// 主键 + /// + public string Id { get; set; } + /// + /// 数量 + /// + public int Sum { get; set; } +} +} diff --git a/SUBQHSE/Model/ZHGL/DataSync/WeldDineOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/WeldDineOutput.cs index 0c831a1..a3caa52 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/WeldDineOutput.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/WeldDineOutput.cs @@ -7,7 +7,7 @@ namespace Model /// public class WeldDineOutput : BaseEntities { - public string Id { get; set; } + public string Id { get; set; } /// /// 达因数 /// diff --git a/SUBQHSE/Model/ZHGL/DataSync/WelderOutput.cs b/SUBQHSE/Model/ZHGL/DataSync/WelderOutput.cs index c1795d5..da79172 100644 --- a/SUBQHSE/Model/ZHGL/DataSync/WelderOutput.cs +++ b/SUBQHSE/Model/ZHGL/DataSync/WelderOutput.cs @@ -7,7 +7,7 @@ namespace Model /// public class WelderOutput : BaseEntities { - public string Id { get; set; } + public string Id { get; set; } public string WEDCode { get; set; } public string WEDName { get; set; } } diff --git a/SUBQHSE/WebAPI/Controllers/DataSync/CNCECServerController.cs b/SUBQHSE/WebAPI/Controllers/DataSync/CNCECServerController.cs index 39d7285..a918bed 100644 --- a/SUBQHSE/WebAPI/Controllers/DataSync/CNCECServerController.cs +++ b/SUBQHSE/WebAPI/Controllers/DataSync/CNCECServerController.cs @@ -70,7 +70,7 @@ namespace WebAPI.Controllers /// 获取焊接统计数据 /// /// - public Model.ReturnData PostGetHJGLData() + public async Task PostGetHJGLData() { var returnData = new Model.ReturnData(); returnData.type = "HJGL"; @@ -80,7 +80,7 @@ namespace WebAPI.Controllers returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime; if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now) { - returnData.data = HJGLData_HJGLService.GetTodayHJGLData_HJGL(); + returnData.data = await HJGLData_HJGLService.GetTodayHJGLData_HJGLAsync(); } else { diff --git a/SUBQHSE/WebAPI/Filter/TestPermissionAttribute.cs b/SUBQHSE/WebAPI/Filter/TestPermissionAttribute.cs index bd5079d..9b71ca9 100644 --- a/SUBQHSE/WebAPI/Filter/TestPermissionAttribute.cs +++ b/SUBQHSE/WebAPI/Filter/TestPermissionAttribute.cs @@ -161,6 +161,7 @@ namespace WebAPI.Filter , "TestRecord*getTestRecordItemAnswerBySelectedItem" , "TestRecord*postSubmitTestRecord" , "TestRecord*getTestScoreByPersonId" + , "ShouYe*GetRectificationOutputs " }; ///