班组建设 班前会及时完成率
This commit is contained in:
parent
7d0a6b78bf
commit
379ec7b5dd
@ -56,7 +56,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
//当日工作票排名前三
|
||||
public List<JobTodayTop3> jobTodayTop3 { get; set; }
|
||||
//当日工作票统计数量
|
||||
public List<JobTodayQty> jobTodayQty { get; set; }
|
||||
public List<JobTodayQty> jobTodayQty { get; set; }
|
||||
//隐患整改率
|
||||
public HiddenRectify hiddenRectify { get; set; }
|
||||
|
||||
@ -692,5 +692,60 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
return dtInfo;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取子页 班前会 及时完成率
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
[HttpPost, Route("TeamDoneInTimePercent")]
|
||||
public JsonActionResult<List<dynamic>> TeamDoneInTimePercent([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
Dictionary<string, object> dic = new Dictionary<string, object>();
|
||||
DateTime dtSecrch = DateTime.Now;
|
||||
if (string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
filter.Parameter1 = dtSecrch.ToString("yyyy-MM-dd");
|
||||
}
|
||||
//年度查询
|
||||
if (!string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
try
|
||||
{
|
||||
dtSecrch = Convert.ToDateTime(filter.Parameter1);
|
||||
}
|
||||
catch
|
||||
{
|
||||
dtSecrch = DateTime.Now;
|
||||
}
|
||||
}
|
||||
dtSecrch = Convert.ToDateTime(dtSecrch.ToString("yyyy-MM-01 00:00:00"));
|
||||
dic.Add("@dtMin", dtSecrch.ToString("yyyy-MM-dd 00:00:00"));
|
||||
dic.Add("@dtMax", dtSecrch.AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd 23:59:59"));
|
||||
|
||||
List<dynamic> listResult = new List<dynamic>();
|
||||
try
|
||||
{
|
||||
string strConn = OPTenantDBConnService.GetConnByORGID(filter.OrgId.Value);
|
||||
DataSet ds = DBHelper.ExecProcedure(strConn, "proc_HomeTeamMeetingRecord", dic, HttpContext.Request.Path);
|
||||
double percent = 0;
|
||||
if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
|
||||
{
|
||||
foreach (DataRow item in ds.Tables[0].Rows)
|
||||
{
|
||||
percent = Convert.ToDouble(item[0].ToString());
|
||||
listResult.Add(new
|
||||
{
|
||||
CNAME = item["CNAME"],
|
||||
Per = percent
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return listResult;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user