1
This commit is contained in:
@@ -53,6 +53,19 @@ namespace FineUIPro.Web.common
|
||||
endDays = (project.EndDate.Value - DateTime.Now).Days;
|
||||
}
|
||||
|
||||
string proImg = "../res/images/01.png";
|
||||
var proFile = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == projectId);
|
||||
if (proFile != null && !string.IsNullOrWhiteSpace(proFile.AttachUrl))
|
||||
{
|
||||
string httpUrl = string.Empty;
|
||||
var sysSet6 = (from x in Funs.DB.Sys_Set where x.SetName == "程序访问地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet6 != null)
|
||||
{
|
||||
httpUrl = sysSet6.SetValue;
|
||||
}
|
||||
proImg = $"{httpUrl}{proFile.AttachUrl.Split(',')[0]}";
|
||||
}
|
||||
|
||||
//事故事件
|
||||
var list = AccidentWarningService.GetYearsTodayList();
|
||||
// 构造返回数据
|
||||
@@ -61,13 +74,14 @@ namespace FineUIPro.Web.common
|
||||
success = true,
|
||||
data = new
|
||||
{
|
||||
proImg = proImg,
|
||||
accidentWarning = (from x in list select new { Title = x.Title, AccidentDate = x.AccidentDate.ToString("yyyy-MM-dd") }).ToList(),
|
||||
projectInfo = new
|
||||
{
|
||||
participateInNum = hsseData.JoinConstructionPersonNum ?? 0,
|
||||
dangerousProject = hsseData.MajorProjectsUnderConstructionNum ?? 0,
|
||||
projectDays = projectDays,//项目总工期
|
||||
projectEndDate = string.Format("{0:yyyy-MM-dd}", project.EndDate),//项目到期时间
|
||||
projectEndDate = project.EndDate != null ? string.Format("{0:yyyy-MM-dd}", project.EndDate) : string.Empty,//项目到期时间
|
||||
projectEndDays = endDays > 0 ? endDays : 0,//合同倒计时
|
||||
},
|
||||
//meetAnEmergency = new
|
||||
|
||||
Reference in New Issue
Block a user