Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
2cd428e446
@ -182,9 +182,9 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
}
|
||||
|
||||
DataTable dtAnn = dsHead.Tables[1];
|
||||
result.listAnnourcement = new List<T_PF_ANNOURCEMENT>();
|
||||
if (dtAnn != null && dtAnn.Rows.Count > 0)
|
||||
{
|
||||
result.listAnnourcement = new List<T_PF_ANNOURCEMENT>();
|
||||
foreach (DataRow item in dtAnn.Rows)
|
||||
{
|
||||
try
|
||||
@ -203,9 +203,9 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
|
||||
|
||||
DataTable dtVMSet = dsHead.Tables[3];
|
||||
result.playSet = new T_PF_BIPLAY_SET();
|
||||
if (dtVMSet != null && dtVMSet.Rows.Count > 0)
|
||||
{
|
||||
result.playSet = new T_PF_BIPLAY_SET();
|
||||
string colVal = string.Empty;
|
||||
try
|
||||
{
|
||||
@ -235,9 +235,9 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
|
||||
//播放信息
|
||||
DataTable dtVM = dsHead.Tables[2];
|
||||
result.listVideoImg = new List<dynamic>();
|
||||
if (dtVM != null && dtVM.Rows.Count > 0)
|
||||
{
|
||||
result.listVideoImg = new List<dynamic>();
|
||||
FILETYPEEnum TYPE = (FILETYPEEnum)int.Parse(dtVM.Rows[0][0].ToString());
|
||||
string TITLE = dtVM.Rows[0][1].ToString();
|
||||
|
||||
|
||||
@ -767,7 +767,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
//Parameter3 传入 ORGID 如果有
|
||||
Dictionary<string, object> dic = new Dictionary<string, object>();
|
||||
DateTime dtSecrch = DateTime.Now;
|
||||
string ORGID = "";
|
||||
//string ORGID = "";
|
||||
if (!string.IsNullOrEmpty(filter.Parameter2))
|
||||
{
|
||||
try
|
||||
@ -779,21 +779,21 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
dtSecrch = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-01 00:00:00"));
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(filter.Parameter3))
|
||||
{
|
||||
try
|
||||
{
|
||||
ORGID = (new Guid(filter.Parameter3)).ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
ORGID = "";
|
||||
}
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(filter.Parameter3))
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// ORGID = (new Guid(filter.Parameter3)).ToString();
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// ORGID = "";
|
||||
// }
|
||||
//}
|
||||
|
||||
dic.Add("@dtMonthMin", dtSecrch.ToString("yyyy-MM-dd 00:00:00"));
|
||||
dic.Add("@dtMonthMax", dtSecrch.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd HH:mm:ss"));
|
||||
dic.Add("@OrgId", ORGID.ToString());
|
||||
//dic.Add("@OrgId", ORGID.ToString());
|
||||
|
||||
if (!string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
@ -824,49 +824,51 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
|
||||
{
|
||||
List<dynamic> hiddenRanking = new List<dynamic>();
|
||||
int NUM = 1;
|
||||
//int NUM = 1;
|
||||
foreach (DataRow item in ds.Tables[0].Rows)
|
||||
{
|
||||
hiddenRanking.Add(new
|
||||
{
|
||||
NUM = NUM,
|
||||
hiddenName = item[0],
|
||||
qty = item[1],
|
||||
//NUM = NUM,
|
||||
companyName= item["companyName"],
|
||||
ORG_ID = item["ORG_ID"],
|
||||
hiddenName = item["DESCREPTION"],
|
||||
qty = item["dc"],
|
||||
});
|
||||
NUM++;
|
||||
//NUM++;
|
||||
}
|
||||
listResult.hiddenRanking = hiddenRanking;
|
||||
if (string.IsNullOrEmpty(ORGID))
|
||||
//if (string.IsNullOrEmpty(ORGID))
|
||||
//{
|
||||
//全部搜索 3张表
|
||||
List<dynamic> hiddenList = new List<dynamic>();
|
||||
DataTable dt = ds.Tables[1];
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
//全部搜索 3张表
|
||||
List<dynamic> hiddenList = new List<dynamic>();
|
||||
DataTable dt = ds.Tables[1];
|
||||
foreach (DataRow item in dt.Rows)
|
||||
hiddenList.Add(new
|
||||
{
|
||||
hiddenList.Add(new
|
||||
{
|
||||
companyName = item["companyName"],
|
||||
generalCount = item["generalCount"],
|
||||
majorCount = item["majorCount"],
|
||||
});
|
||||
}
|
||||
listResult.hiddenList = hiddenList;
|
||||
|
||||
List<dynamic> hiddenRectifyList = new List<dynamic>();
|
||||
dt = ds.Tables[2];
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
hiddenRectifyList.Add(new
|
||||
{
|
||||
companyName = item["companyName"],
|
||||
generalCount = item["generalCount"],
|
||||
majorCount = item["majorCount"],
|
||||
majorCountNo = item["majorCountNo"],
|
||||
generalCountNo = item["generalCountNo"],
|
||||
});
|
||||
}
|
||||
listResult.hiddenRectifyList = hiddenRectifyList;
|
||||
companyName = item["companyName"],
|
||||
generalCount = item["generalCount"],
|
||||
majorCount = item["majorCount"],
|
||||
});
|
||||
}
|
||||
listResult.hiddenList = hiddenList;
|
||||
|
||||
List<dynamic> hiddenRectifyList = new List<dynamic>();
|
||||
dt = ds.Tables[2];
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
hiddenRectifyList.Add(new
|
||||
{
|
||||
companyName = item["companyName"],
|
||||
generalCount = item["generalCount"],
|
||||
majorCount = item["majorCount"],
|
||||
majorCountNo = item["majorCountNo"],
|
||||
generalCountNo = item["generalCountNo"],
|
||||
});
|
||||
}
|
||||
listResult.hiddenRectifyList = hiddenRectifyList;
|
||||
//}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@ -948,12 +950,12 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
.GroupBy(x => x.companyName)
|
||||
.Select(g => new RiskList
|
||||
{
|
||||
companyName = g.Key,
|
||||
majorCount = g.First(x => x.riskType == SKEvaluateLevelEnum.重大风险.GetDescription()).cnt,
|
||||
largerCount = g.First(x => x.riskType == SKEvaluateLevelEnum.较大风险.GetDescription()).cnt,
|
||||
generalCount = g.First(x => x.riskType == SKEvaluateLevelEnum.一般风险.GetDescription()).cnt,
|
||||
lowCount = g.First(x => x.riskType == SKEvaluateLevelEnum.低风险.GetDescription()).cnt,
|
||||
totalCount = g.Sum(x=>x.cnt)
|
||||
companyName = g.Key,
|
||||
majorCount = g.First(x => x.riskType == SKEvaluateLevelEnum.重大风险.GetDescription()).cnt,
|
||||
largerCount = g.First(x => x.riskType == SKEvaluateLevelEnum.较大风险.GetDescription()).cnt,
|
||||
generalCount = g.First(x => x.riskType == SKEvaluateLevelEnum.一般风险.GetDescription()).cnt,
|
||||
lowCount = g.First(x => x.riskType == SKEvaluateLevelEnum.低风险.GetDescription()).cnt,
|
||||
totalCount = g.Sum(x => x.cnt)
|
||||
}).ToList();
|
||||
if (orgList != null && orgList.Any())
|
||||
{
|
||||
@ -984,7 +986,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
result.Data.riskList = riskList;
|
||||
result.Data.riskTypeList = riskTypeList;
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取子页 危险作业清单
|
||||
|
||||
Loading…
Reference in New Issue
Block a user