From 643867033929910211ef5af7d0c827623017b158 Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Thu, 26 Jun 2025 21:22:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=B9=E7=A7=8D?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=BA=BA=E5=91=98=E6=B1=87=E6=80=BB=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E8=B0=83=E6=95=B4=EF=BC=9B=E4=BF=AE=E6=94=B9pu?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vs/SGGL_SeDin_New/v17/.wsuo | Bin 74752 -> 74752 bytes .../v17/DocumentLayout.backup.json | 4 +++ .vs/SGGL_SeDin_New/v17/DocumentLayout.json | 32 ++++++++---------- SGGL/BLL/HSSE/CostGoods/CostManageService.cs | 2 +- .../BLL/ZHGL/DataSync/HSSEData_HSSEService.cs | 22 +++++++----- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- 6 files changed, 33 insertions(+), 29 deletions(-) diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index 6382df2c8691b7361151bf8966e6a1636516e255..2b6a9900abb81318654938ff248b0207d9fb8e8d 100644 GIT binary patch delta 1305 zcmc(eOKTHR6vuOK9lwxD#}N z25as|ed_oO;ua7EyMWRGYoulRN?ON`1m~ocJhB>T7_@RpYqY0S#6w^hC?Ey~KpX^t zT{jB9RhWj|ud z+h(hL0{MTga;sx8Qn|?y|9_P${VoRhW=|Pv+)LSzwP?Pb3GhJ;%n$Z=s6{}Zw zWZYt(t7bJQF{7K8JLekR&OSX`WaUVTYJ?tnD^d}R(PCLn1sJ^$I=kB1Z9RkLefcRX z2lsz}FvPu&P;gXQo-}8A_m~mlm6pk^ClJNJ;q&F?vdo6qu{O!(GsGz>2+PN?xw@i{-t z<74$9Dc-LQiS@z~8;5sZqI0EVBNHFi&Y52e&CJ;JLpekDiPuZ*X8ZORuknD3y(h9M IKmPRmCpu}neE34a1TG$Z_JL1M9YkHUJ zJ+Wjybn+3X6m?J5XCc8@Y$Z)*x8S3ndT14C%28%A;g zwBhCMMI>Y35=el{U>sZlSHU$f0g_-6q`(w7+|w=vrsdI42stT%vx8XJ}gm z&%q1u60CuB@Cv*JMVz{Pf=vd=$AXfU5 zbQn_`C^|}AF+J9egLPF8*j>cwj3756+>p63%F9YjJiO+qpDW{<=RdN;RfdbK>`yQk zjo*I~uW@;TpW=!z%%(y3_W}{J6&PZx76qe+W zsz{lLnvwFMY$&Z{LvkpP5d?-0pg1`{A_z@-VX08g`MK#|e#3{XUzY0fy?j2MmgHza zk>qq*m6WiWlTBf diff --git a/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json b/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json index 81a66a8a..290e6c8a 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json @@ -74,6 +74,10 @@ { "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" } ] } diff --git a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json index 290e6c8a..4cf91a0b 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json @@ -8,21 +8,13 @@ "VerticalTabListWidth": 256, "DocumentGroups": [ { - "DockedWidth": 386, + "DockedWidth": 200, "SelectedChildIndex": -1, "Children": [ { "$type": "Bookmark", "Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}" }, - { - "$type": "Bookmark", - "Name": "ST:130:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" - }, - { - "$type": "Bookmark", - "Name": "ST:132:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" - }, { "$type": "Bookmark", "Name": "ST:133:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" @@ -51,14 +43,6 @@ "$type": "Bookmark", "Name": "ST:3:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}" }, - { - "$type": "Bookmark", - "Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" - }, - { - "$type": "Bookmark", - "Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" - }, { "$type": "Bookmark", "Name": "ST:0:0:{1a46fd64-28d5-434c-8eb3-17a02d419b53}" @@ -67,6 +51,18 @@ "$type": "Bookmark", "Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}" }, + { + "$type": "Bookmark", + "Name": "ST:137:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:138:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:136:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, { "$type": "Bookmark", "Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}" @@ -77,7 +73,7 @@ }, { "$type": "Bookmark", - "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + "Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" } ] } diff --git a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs index f0f9faef..5ba8d146 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs @@ -407,7 +407,7 @@ namespace BLL var jsonBody = JsonConvert.SerializeObject(requestBody); // 调用HSE接口推送数据 - var url = "http://172.29.60.33:8080"; + var url = "http://172.29.60.33:9037"; var requestGetTokenUrl = url + "/auth/getToken"; string requestGetTokenBody = "{\"username\": \"coadmin\",\"password\": \"coadminPu@2025\"}"; var response = Funs.RequestPost(requestGetTokenUrl, "", requestGetTokenBody); diff --git a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs index b42ef590..33a28f18 100644 --- a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs @@ -4191,19 +4191,22 @@ namespace BLL /// public static List GetQualityPersonNum() { - var result = (from x in Funs.DB.QualityAudit_PersonQuality - join p in Funs.DB.SitePerson_Person on x.PersonId equals p.PersonId into pGroup - from p in pGroup.DefaultIfEmpty() - join pp in Funs.DB.Person_Persons on p.PersonId equals pp.PersonId into ppGroup - from pp in ppGroup.DefaultIfEmpty() + var result = (from p in Funs.DB.SitePerson_Person join bp in Funs.DB.Base_Project on p.ProjectId equals bp.ProjectId into bpGroup from bp in bpGroup.DefaultIfEmpty() join u in Funs.DB.Base_Unit on p.UnitId equals u.UnitId into uGroup from u in uGroup.DefaultIfEmpty() - join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId + join q in Funs.DB.QualityAudit_PersonQuality on p.PersonId equals q.PersonId into qGroup + from q in qGroup.DefaultIfEmpty() join m in Funs.DB.Base_WorkPost on p.WorkPostId equals m.WorkPostId into mGroup from m in mGroup.DefaultIfEmpty() - where BeUnderConstructionList.Contains(p.ProjectId) && m.PostType == Const.PostType_2 && (x.LimitDate == null || x.LimitDate < DateTime.Now) + join su in Funs.DB.Person_Persons on q.CompileMan equals su.PersonId into suGroup + from su in suGroup.DefaultIfEmpty() + join bc in Funs.DB.Base_Certificate on q.CertificateId equals bc.CertificateId into bcGroup + from bc in bcGroup.DefaultIfEmpty() + join su1 in Funs.DB.Person_Persons on q.AuditorId equals su1.PersonId into su1Group + from su1 in su1Group.DefaultIfEmpty() + where BeUnderConstructionList.Contains(p.ProjectId) && m.PostType == Const.PostType_2 select new Model.OfSafetySupervisorsOutput { ProjectId = p.ProjectId, @@ -4211,12 +4214,13 @@ namespace BLL UnitId = u.UnitId, UnitName = u.UnitName, Name = p.PersonName, - Sex = pp.Sex == null ? "" : (pp.Sex == "1" ? "男" : "女"), + Sex = su.Sex == null ? "" : (su.Sex == "1" ? "男" : "女"), IdentityCard = p.IdentityCard, WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName, - Phone = pp.Telephone + Phone = su.Telephone }).ToList(); return result; + } /// /// 获取在岗特种作业人员数量(异步) diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index bfe75920..84bdce65 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -16769,7 +16769,7 @@ - + From 0c5cbe821ac0db5eab523e898b2a87ed1cf995d4 Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Fri, 27 Jun 2025 09:53:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8A=BD=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLL/ZHGL/DataSync/HSSEData_HSSEService.cs | 262 ++---------------- 1 file changed, 20 insertions(+), 242 deletions(-) diff --git a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs index 33a28f18..6c050f2d 100644 --- a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs @@ -547,117 +547,6 @@ namespace BLL }; return result; } - - public static HSSEData StatisticalData() - { - var thisUnitId = string.Empty; - var thisUnit = CommonService.GetIsThisUnit(); - if (thisUnit != null) thisUnitId = thisUnit.UnitId; - var baseUnit = UnitService.GetUnitByUnitId(thisUnitId); - Project_HSSEData_HiddenDangerDetailService.StatisticalAllProjectData(); - - var totalEnergyConsumption = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption(); - var incomeComprehensiveEnergyConsumption = - ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption(); - var newWaterConsumption = ChemicalReportItemService.GetLatstTimeNewWaterConsumption(); - - var table = new HSSEData_HSSE - { - UnitId = thisUnitId, - CollCropCode = baseUnit.CollCropCode, - UnitName = baseUnit.UnitName, - ReportDate = DateTime.Now.Date, - BeUnderConstructionNum = GetBeUnderConstruction().Count, - ShutdownNum = GetShutdown().Count, - JoinConstructionPersonNum = GetJoinConstructionPerson().Count, - MajorProjectsUnderConstructionNum = GetMajorProjectsUnderConstruction().Count, - TotalWorkingHour = GetTotalWorkingHour(), - LostWorkingHour = GetLostWorkingHour(), - SafeWorkingHour = GetSafeWorkingHour(), - SafeTrainNum = GetSafeTrain().Sum(x => x.TrainPersonNum), - SpecialTrainNum = GetSpecialTrain().Sum(x => x.TrainPersonNum), - SpecialOperationTrainNum = GetSpecialOperationTrain().Sum(x => x.TrainPersonNum), - EnvironmentalTrainNum = 0, - TotalEnergyConsumption = totalEnergyConsumption, - IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption, - NewWaterConsumption = newWaterConsumption, - HeadOfficeInspectorGeneralNum = GetHeadOfficeInspectorGeneral().Count, - HeadOfficeFullTimeNum = GetHeadOfficeFullTime().Count, - BranchInspectorGeneralNum = GetBranchInspectorGeneral().Count, - BranchFullTimeNum = GetBranchFullTime().Count, - ProjectInspectorGeneralNum = GetProjectInspectorGeneral().Count, - ProjectFullTimeNum = GetProjectFullTime().Count, - ProjectSafetyMonitorNum = GetProjectSafetyMonitor().Count, - SafetyInjectionEngineer = GetSafetyInjectionEngineer().Count, - CertificateANum = GetCertificateA().Count, - CertificateBNum = GetCertificateB().Count, - CertificateCNum = GetCertificateC().Count, - SafetyCommitteeMeetingNum = GetSafetyCommitteeMeeting().Count, - EnterpriseTopicsMeetingNum = GetEnterpriseTopicsMeeting().Count, - ProjectSafetyLeadingGroupMeetingNum = GetProjectSafetyLeadingGroupMeeting().Count, - ProjectSafetyMeetingNum = GetProjectSafetyMeeting().Count, - CompanyLeadShiftCheckNum = GetCompanyLeadShiftCheck().Count, - CompanyComprehensiveCheckNum = GetCompanyComprehensiveCheck().Count, - CompanySpecialCheckNum = GetCompanySpecialCheck().Count, - ProjectLeadShiftCheckNum = GetProjectLeadShiftCheck().Count, - ProjectSpecialCheckNum = GetProjectSpecialCheck().Count, - ProjectMajorCheckNum = GetProjectMajorCheck().Count, - NearMissNum = GetNearMiss().Count, - RecordableEventNum = GetRecordableEvent().Count, - GeneralAccidentNum = GetGeneralAccident().Count, - MajorAccidentNum = GetMajorAccident().Count, - SeriousAccidentNum = GetSeriousAccident().Count, - SpecialSeriousAccidentNum = GetSpecialSeriousAccident().Count, - CompanyComprehensivePlanNum = GetCompanyComprehensivePlan().Count, - CompanySpecialPlanNum = GetCompanySpecialPlan().Count, - CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan().Count, - CompanyDrillNum = GetCompanyDrill().Count, - ProjectComprehensivePlanNum = GetProjectComprehensivePlan().Count, - ProjectSpecialPlanNum = GetProjectSpecialPlan().Count, - ProjectOnSiteDisposalPlan = GetProjectOnSiteDisposalPlan().Count, - ProjectDrillNum = GetProjectDrill().Count, - CostExtract = Convert.ToInt32(GetCostExtract().Sum(x => x.SUMCost)), - CostUse = Convert.ToInt32(GetCostUse().Sum(x => x.SUMCost)), - UseEquipmentNum = GetUseEquipment().Count, - SpecialEquipmentNum = GetSpecialEquipment().Count, - LicensesNum = GetLicenses().Count, - LicensesCloseNum = GetLicensesClose().Count, - GeneralClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.RecNum), - GeneralNotClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.NoRecNum), - MajorClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.RecNum), - MajorNotClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.NoRecNum), - GeneralRiskNum = GetSecurityRiskOutputs().Sum(x => x.GeneralRiskNum), - LowRiskNum = GetSecurityRiskOutputs().Sum(x => x.LowRiskNum), - MediumRiskNum = GetSecurityRiskOutputs().Sum(x => x.MediumRiskNum), - HighRiskNum = GetSecurityRiskOutputs().Sum(x => x.HighRiskNum), - CompletedNum = GetLargeEngineeringOutputs().Sum(x => x.CompletedNum), - TrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.TrainPersonNum), - ConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.ConstructionNum), - FinishedNum = GetLargeEngineeringOutputs().Sum(x => x.FinishedNum), - SuperCompletedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperCompletedNum), - SuperTrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.SuperTrainPersonNum), - SuperConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.SuperConstructionNum), - SuperFinishedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperFinishedNum), - CreateMan = Const.sysglyId, - CreateDate = DateTime.Now - }; - if (IsReportByToday()) - { - table.Id = GetTodayData().Id; - table.State = Const.CNCEC_State_1; - UpdateHSSEData_HSSE(table); - } - else - { - table.Id = SQLHelper.GetNewID(); - table.State = Const.CNCEC_State_0; - AddHSSEData_HSSE(table); - } - - var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel()); - return data; - } - public static async Task StatisticalDataAsync() { var thisUnitId = string.Empty; @@ -870,6 +759,7 @@ namespace BLL var licensesCloseList = await licensesCloseTask; var generalHiddenRectificationOutputsList = await generalHiddenRectificationOutputsTask; var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask; + var largeEngineerinOutputOutputsList = await largeEngineeringOutputsTask; // 构造结果对象 var table = new HSSEData_HSSE @@ -954,18 +844,18 @@ namespace BLL GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum), MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum), HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum), - CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum), - TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum), - OperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.OperativesNum), - 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), - SuperOperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperOperativesNum), - SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum), - SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum), - SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum) + CompletedNum = largeEngineerinOutputOutputsList.Sum(x => x.CompletedNum), + TrainPersonNum = largeEngineerinOutputOutputsList.Sum(x => x.TrainPersonNum), + OperativesNum = largeEngineerinOutputOutputsList.Sum(x => x.OperativesNum), + ConstructionNum = largeEngineerinOutputOutputsList.Sum(x => x.ConstructionNum), + FinishedNum = largeEngineerinOutputOutputsList.Sum(x => x.FinishedNum), + ArgumentNum = largeEngineerinOutputOutputsList.Sum(x => x.ArgumentNum), + SuperCompletedNum = largeEngineerinOutputOutputsList.Sum(x => x.SuperCompletedNum), + SuperTrainPersonNum = largeEngineerinOutputOutputsList.Sum(x => x.SuperTrainPersonNum), + SuperOperativesNum = largeEngineerinOutputOutputsList.Sum(x => x.SuperOperativesNum), + SuperConstructionNum = largeEngineerinOutputOutputsList.Sum(x => x.SuperConstructionNum), + SuperFinishedNum = largeEngineerinOutputOutputsList.Sum(x => x.SuperFinishedNum), + SuperArgumentNum = largeEngineerinOutputOutputsList.Sum(x => x.SuperArgumentNum) }; #region 添加项目统计数据 @@ -2981,36 +2871,8 @@ namespace BLL /// public static List GetBeUnderConstruction() { - var projectInfos = from project in Funs.DB.Base_Project - join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin - from unit in unitJoin.DefaultIfEmpty() - join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin - from projectType in projectTypeJoin.DefaultIfEmpty() - join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = "", GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin - from sysConst in sysConstJoin.DefaultIfEmpty() - where project.ProjectState == "1" - select new ProjectOutput - { - ProjectId = project.ProjectId, - ProjectCode = project.ProjectCode, - ProjectName = project.ProjectName, - UnitId = project.UnitId, - UnitName = unit.UnitName, - StartDate = project.StartDate, - EndDate = project.EndDate, - ProjectAddress = project.ProjectAddress, - ShortName = project.ShortName, - ConstructionMoney = project.ConstructionMoney, - ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), - ProjectState = project.ProjectState, - ProjectAttributeName = "工程", - ProjectMoney = project.ProjectMoney, - DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, - ProjectTypeName = projectType.ProjectTypeName, - ProjectStateName2 = sysConst.ConstText - }; - var result = projectInfos.ToList(); - return result; + return BaseDataService.GetBeUnderConstruction(); + } /// /// 获取在建项目数(异步) @@ -3028,36 +2890,8 @@ namespace BLL /// public static List GetShutdown() { - var projectInfos = from project in Funs.DB.Base_Project - join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin - from unit in unitJoin.DefaultIfEmpty() - join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin - from projectType in projectTypeJoin.DefaultIfEmpty() - join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = "", GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin - from sysConst in sysConstJoin.DefaultIfEmpty() - where project.ProjectState == "2" - select new ProjectOutput - { - ProjectId = project.ProjectId, - ProjectCode = project.ProjectCode, - ProjectName = project.ProjectName, - UnitId = project.UnitId, - UnitName = unit.UnitName, - StartDate = project.StartDate, - EndDate = project.EndDate, - ProjectAddress = project.ProjectAddress, - ShortName = project.ShortName, - ConstructionMoney = project.ConstructionMoney, - ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), - ProjectState = project.ProjectState, - ProjectAttributeName = "工程", - ProjectMoney = project.ProjectMoney, - DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, - ProjectTypeName = projectType.ProjectTypeName, - ProjectStateName2 = sysConst.ConstText - }; - var result = projectInfos.ToList(); - return result; + return BaseDataService.GetShutdown(); + } /// /// 获取停工项目数(异步) @@ -3073,36 +2907,8 @@ namespace BLL /// public static List GetCompletedProject() { - var projectInfos = from project in Funs.DB.Base_Project - join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin - from unit in unitJoin.DefaultIfEmpty() - join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin - from projectType in projectTypeJoin.DefaultIfEmpty() - join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = "", GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin - from sysConst in sysConstJoin.DefaultIfEmpty() - where project.ProjectState == "3" - select new ProjectOutput - { - ProjectId = project.ProjectId, - ProjectCode = project.ProjectCode, - ProjectName = project.ProjectName, - UnitId = project.UnitId, - UnitName = unit.UnitName, - StartDate = project.StartDate, - EndDate = project.EndDate, - ProjectAddress = project.ProjectAddress, - ShortName = project.ShortName, - ConstructionMoney = project.ConstructionMoney, - ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), - ProjectState = project.ProjectState, - ProjectAttributeName = "工程", - ProjectMoney = project.ProjectMoney, - DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, - ProjectTypeName = projectType.ProjectTypeName, - ProjectStateName2 = sysConst.ConstText - }; - var result = projectInfos.ToList(); - return result; + return BaseDataService.GetCompletedProject(); + } /// /// 获取所有项目数 @@ -3110,35 +2916,7 @@ namespace BLL /// public static List GetALLProject() { - var projectInfos = from project in Funs.DB.Base_Project - join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin - from unit in unitJoin.DefaultIfEmpty() - join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin - from projectType in projectTypeJoin.DefaultIfEmpty() - join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = "", GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin - from sysConst in sysConstJoin.DefaultIfEmpty() - select new ProjectOutput - { - ProjectId = project.ProjectId, - ProjectCode = project.ProjectCode, - ProjectName = project.ProjectName, - UnitId = project.UnitId, - UnitName = unit.UnitName, - StartDate = project.StartDate, - EndDate = project.EndDate, - ProjectAddress = project.ProjectAddress, - ShortName = project.ShortName, - ConstructionMoney = project.ConstructionMoney, - ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), - ProjectState = project.ProjectState, - ProjectAttributeName = "工程", - ProjectMoney = project.ProjectMoney, - DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, - ProjectTypeName = projectType.ProjectTypeName, - ProjectStateName2 = sysConst.ConstText - }; - var result = projectInfos.ToList(); - return result; + return BaseDataService.GetALLProject(); } ///