提交代码

This commit is contained in:
高飞 2025-02-14 15:21:20 +08:00
parent d7098ea006
commit 8039877553
4 changed files with 88 additions and 59 deletions

View File

@ -19357,7 +19357,7 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@ -11,7 +11,7 @@
<FineUIPro DebugMode="true" Theme="Cupertino"/>
<appSettings>
<!--连接字符串-->
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>

View File

@ -481,7 +481,7 @@ namespace FineUIPro.Web.common
/// <returns></returns>
protected int GetSuperCompletedNum()
{
var result = Project_HSSEData_HSSEService.GetSuperCompletedNum(ProjectId);
var result = Project_HSSEData_HSSEService.GetSuperFinishedNum(ProjectId);
return result;
}

View File

@ -24,7 +24,8 @@ namespace FineUIPro.Web.common
{
pids = CurrUser.CompanyProjectId.Split(',');
}
else {
else
{
//加载所有在建项目的数据
var pidArray = Funs.DB.Base_Project.Where(x => x.ProjectState == "1").Select(x => x.ProjectId).ToArray();
if (pidArray.Length > 0)
@ -52,7 +53,8 @@ namespace FineUIPro.Web.common
{
countAqrgsSum = CountAqrgs();
}
else {
else
{
countAqrgsSum = CountAqrgs(null, null, pids);
}
@ -62,7 +64,8 @@ namespace FineUIPro.Web.common
this.divSafeWorkTime.InnerHtml = Math.Round(countAqrgsSum, 2).ToString() + "万";
}
else {
else
{
this.divSafeWorkTime.InnerHtml = countAqrgsSum.ToString().Split('.')[0];
}
@ -93,7 +96,8 @@ namespace FineUIPro.Web.common
this.divSafeWorkTimeMonth.InnerHtml = Math.Round(countMonthAqrgs, 2).ToString() + "万";
}
else {
else
{
this.divSafeWorkTimeMonth.InnerHtml = CountAqrgs(d1, d2).ToString().Split('.')[0];
}
@ -113,7 +117,8 @@ namespace FineUIPro.Web.common
boShengCount = db.Bo_Sheng_TrainPerson.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null)).ToList().Count;
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
}
else {
else
{
getTrainRecord = db.EduTrain_TrainRecord.Where(x => pids.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum) ?? 0;
//修改:增加博晟教育中的人数
boShengCount = db.Bo_Sheng_TrainPerson.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null)
@ -137,7 +142,8 @@ namespace FineUIPro.Web.common
select x;
this.divSafeManagePersonNum.InnerText = glAllPerson.Count().ToString();
}
else {
else
{
//安全管理人员
var allSum = from x in Funs.DB.SitePerson_Person
where x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now)
@ -174,7 +180,8 @@ namespace FineUIPro.Web.common
select x).Count();
divCqmsPxNum.InnerText = CqmsPxNum.ToString();
}
else {
else
{
CqmsManageNum = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.IsUsed == true && y.IsCQMS == true && pids.Contains(x.ProjectId)
@ -193,7 +200,8 @@ namespace FineUIPro.Web.common
{
allProjects = ProjectService.GetAllProjectDropDownList();
}
else {
else
{
allProjects = ProjectService.GetAllProjectDropDownList(pids);
}
@ -205,10 +213,12 @@ namespace FineUIPro.Web.common
{
pcount1 = allProjects.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).Count();
var pidzjsg = string.Join(",", allProjects.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).Select(x => x.ProjectId)).Split(',');
if (pids == null) {
if (pids == null)
{
pcount2 = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && pidzjsg.Contains(x.ProjectId) select x).Count();
}
else {
else
{
pidzjsg = pids;
pcount2 = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && pids.Contains(x.ProjectId) select x).Count();
}
@ -288,7 +298,8 @@ namespace FineUIPro.Web.common
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
select x;
if (pids != null) {
if (pids != null)
{
getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
where pids.Contains(x.ProjectId)
select x;
@ -305,7 +316,16 @@ namespace FineUIPro.Web.common
}
if (getAllPersonInOutList.Count() > 0)
{
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
//cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
foreach (var pid in pids)
{
var q1 = getAllPersonInOutList.Where(x => x.ProjectId == pid).OrderByDescending(x => x.InOutDate);
var q2 = getAllPersonInOutList.Where(x => x.ProjectId == pid).OrderBy(x => x.InOutDate);
if (q1.Count() > 0)
{
cout1 += (q1.First().WorkHours ?? 0) - (q2.First().WorkHours ?? 0);
}
}
}
}
@ -716,7 +736,8 @@ namespace FineUIPro.Web.common
zgzglDataValue = (100 - (100.0 * num2 / (num2 + num3))).ToString();
}
else {
else
{
zlallNumber = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId)
select x).Count().ToString();
@ -764,7 +785,8 @@ namespace FineUIPro.Web.common
zlgjzgl = zgl.ToString();
zggjzglDataValue = (100 - (100.0 * num2 / num1)).ToString();
}
else {
else
{
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
where pids.Contains(x.ProjectId)
select x).Count();
@ -886,7 +908,8 @@ namespace FineUIPro.Web.common
select x).Count();
gjsxZdl = Math.Round((100.0 * ywcnum / znum), 2).ToString();
}
else {
else
{
//Check_JointCheck
var znum = (from x in Funs.DB.GJSX
where pids.Contains(x.ProjectId)
@ -928,7 +951,8 @@ namespace FineUIPro.Web.common
{
getallin = APIPageDataService.getPersonNumByCompany(DateTime.Now);
}
else {
else
{
getallin = APIPageDataService.getPersonNumByCompany(DateTime.Now, pids);
}
AllCount = getallin.Count();
@ -956,7 +980,8 @@ namespace FineUIPro.Web.common
{
list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
}
else {
else
{
list = Funs.DB.Base_Project.Where(x => pids.Contains(x.ProjectId)).ToList();
}
@ -981,7 +1006,8 @@ namespace FineUIPro.Web.common
{
list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null) && x.Progress != null).ToList();
}
else {
else
{
list = Funs.DB.Base_Project.Where(x => pids.Contains(x.ProjectId) && x.Progress != null).ToList();
}
if (list.Count > 0)
@ -1020,7 +1046,8 @@ namespace FineUIPro.Web.common
where x.States == "3"
select x).Count();
}
else {
else
{
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.States == "3" && pids.Contains(x.ProjectId)
select x).Count();
@ -1041,7 +1068,8 @@ namespace FineUIPro.Web.common
where x.States != "3"
select x).Count();
}
else {
else
{
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.States != "3" && pids.Contains(x.ProjectId)
select x).Count();
@ -1202,7 +1230,8 @@ namespace FineUIPro.Web.common
select x).Count();
return result;
}
else {
else
{
var result = (from x in Funs.DB.Accident_AccidentPersonRecord
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
where x.IsAttempt == "1" && x.CompileDate > Const.DtmarkTime