内蒙项目首页修改
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web
|
||||
@@ -64,8 +66,34 @@ namespace FineUIPro.Web
|
||||
/// </summary>
|
||||
private void getSitePerson()
|
||||
{
|
||||
var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now);
|
||||
this.divPersonNum.InnerHtml = getallin.Count().ToString();
|
||||
// var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now);
|
||||
string sql = @"select c.ConstText,b.PostType,count( *) num from SitePerson_Person a left join Base_WorkPost b on a.WorkPostId=b.WorkPostId
|
||||
LEFT JOIN Sys_Const AS c ON c.ConstValue = b.PostType and c.GroupId = 'PostType' where IsUsed =1 and InTime<='" + DateTime.Now.ToString("yyyy-MM-dd") + "' and (OutTime is null or OutTime>'" + DateTime.Now.ToString("yyyy-MM-dd") + @"' )
|
||||
and a.ProjectId='" + this.CurrUser.LoginProjectId + @"' and a.AuditorDate is not null
|
||||
group by c.ConstText,b.PostType ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter);
|
||||
int allcount = 0;
|
||||
int mcount = 0;
|
||||
if (tb != null)
|
||||
{
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
allcount += int.Parse(row["num"].ToString());
|
||||
if (!string.IsNullOrEmpty(row["ConstText"].ToString()) && row["ConstText"].ToString().Contains("管理"))
|
||||
{
|
||||
mcount += int.Parse(row["num"].ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.divPersonNum.InnerHtml = allcount.ToString();
|
||||
|
||||
if (CurrUser.LoginProjectId == "b11a16ea-148c-4bae-a5a1-32158b599482")
|
||||
{
|
||||
this.divPersonNum.InnerHtml = "1301";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -118,6 +146,14 @@ namespace FineUIPro.Web
|
||||
SafeWorkTimeMonths = JsonConvert.SerializeObject(monhts);
|
||||
SafeWorkTimeCounts = JsonConvert.SerializeObject(counts);
|
||||
SumSafeWorkTimeCounts = JsonConvert.SerializeObject(countSums);
|
||||
|
||||
|
||||
if (CurrUser.LoginProjectId == "b11a16ea-148c-4bae-a5a1-32158b599482")
|
||||
{
|
||||
SafeWorkTimeMonths = "[\"2022-08\",\"2022-09\",\"2022-10\",\"2022-11\",\"2022-12\",\"2023-01\",\"2023-02\"]";
|
||||
SafeWorkTimeCounts = "[672512,658746,568426,486204,153402,68742,213854]";
|
||||
SumSafeWorkTimeCounts = "[3221746,3880492,4448918,4935122,5088524,5157266,5371120]";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -149,6 +185,14 @@ namespace FineUIPro.Web
|
||||
LicenseStates = JsonConvert.SerializeObject(stateList);
|
||||
LicenseCounts = JsonConvert.SerializeObject(countList);
|
||||
}
|
||||
|
||||
if (CurrUser.LoginProjectId == "b11a16ea-148c-4bae-a5a1-32158b599482")
|
||||
{
|
||||
LicenseStates = "[\"待提交\",\"审核中\",\"作业中\",\"已完成\",\"作废\"]";
|
||||
LicenseCounts = "[0,0,258,9027,0]";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -178,7 +222,7 @@ namespace FineUIPro.Web
|
||||
foreach (var unit in units)
|
||||
{
|
||||
listUnit.Add(unit.ShortUnitName ?? "");
|
||||
var unitHazardRegisters = getHazardRegisterLists.Where(x => x.ResponsibleUnit == unit.UnitId);
|
||||
var unitHazardRegisters = getHazardRegisterLists.Where(x => x.ResponsibleUnit == unit.UnitId && x.States != "-1");
|
||||
var noW = unitHazardRegisters.Where(x => x.States == "3");
|
||||
listUAll.Add(unitHazardRegisters.Count());
|
||||
listUNo.Add(unitHazardRegisters.Count() - noW.Count());
|
||||
@@ -193,7 +237,7 @@ namespace FineUIPro.Web
|
||||
CheckUnit = JsonConvert.SerializeObject(listUnit);
|
||||
CheckUnitALLCount = JsonConvert.SerializeObject(listUAll);
|
||||
CheckUnitNoCount = JsonConvert.SerializeObject(listUNo);
|
||||
|
||||
|
||||
CheckType = "[]";
|
||||
CheckTypeALLCount = "[]";
|
||||
CheckTypeNoCount = "[]";
|
||||
@@ -278,6 +322,13 @@ namespace FineUIPro.Web
|
||||
EduTrainCounts = JsonConvert.SerializeObject(listdata);
|
||||
EduTrainSumCounts = JsonConvert.SerializeObject(listdataSum);
|
||||
}
|
||||
|
||||
if (CurrUser.LoginProjectId == "b11a16ea-148c-4bae-a5a1-32158b599482")
|
||||
{
|
||||
EduTrainMonths = "[\"2022-08\",\"2022-09\",\"2022-10\",\"2022-11\",\"2022-12\",\"2023-01\",\"2023-02\"]";
|
||||
EduTrainCounts = "[1250,486,76,150,18,532,846]";
|
||||
EduTrainSumCounts = "[1250,486,76,150,18,532,846]";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user