看板接口
This commit is contained in:
parent
4ad414a142
commit
5e65cd0c60
@ -986,6 +986,58 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取子页 危险作业清单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filter"></param>
|
||||||
|
[HttpPost, Route("JobManage")]
|
||||||
|
public JsonActionResult<List<JobManage>> JobManage([FromBody] KeywordFilter filter)
|
||||||
|
{
|
||||||
|
JsonActionResult<List<JobManage>> result = new JsonActionResult<List<JobManage>>();
|
||||||
|
var list = new List <JobManage>();
|
||||||
|
DataTable tableList = new DataTable();
|
||||||
|
string strConn = OPTenantDBConnService.GetConnByORGID(filter.OrgId.Value);//获取数据库链接
|
||||||
|
using (SqlConnection connection = new SqlConnection(strConn))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
connection.Open();
|
||||||
|
//当日危险作业清单
|
||||||
|
string sql = "select * from vhome_jobTodayList";
|
||||||
|
SqlCommand com = new SqlCommand(sql, connection);
|
||||||
|
SqlDataAdapter data = new SqlDataAdapter(com);
|
||||||
|
data.Fill(tableList);
|
||||||
|
if (tableList != null && tableList.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (DataRow item in tableList.Rows)
|
||||||
|
{
|
||||||
|
JobManage job = new JobManage();
|
||||||
|
job.companyName = item["companyName"] != null ? item["companyName"].ToString() : null;
|
||||||
|
job.startDate = item["JOB_DATE"] != null ? item["JOB_DATE"].ToString() : null;
|
||||||
|
job.endDate = item["JOB_END_DATE"] != null ? item["JOB_END_DATE"].ToString() : null;
|
||||||
|
job.jobName = item["stepName"] != null ? item["stepName"].ToString() : null;
|
||||||
|
job.areaName = item["areaName"] != null ? item["areaName"].ToString() : null;
|
||||||
|
job.place = item["JOB_LOCATION"] != null ? item["JOB_LOCATION"].ToString() : null;
|
||||||
|
job.users = item["userNames"] != null ? item["userNames"].ToString() : null;
|
||||||
|
job.monitor = item["monitorName"] != null ? item["monitorName"].ToString() : null;
|
||||||
|
job.approveUsers = item["approveNames"] != null ? item["approveNames"].ToString() : null;
|
||||||
|
list.Add(job);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
connection.Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(ex.StackTrace))
|
||||||
|
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
|
||||||
|
else
|
||||||
|
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.Data = list;
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -1073,4 +1125,43 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? qty { get; set; }
|
public int? qty { get; set; }
|
||||||
}
|
}
|
||||||
|
public class JobManage
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 公司名称
|
||||||
|
/// </summary>
|
||||||
|
public string companyName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 开始时间
|
||||||
|
/// </summary>
|
||||||
|
public string startDate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
public string endDate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 作业名称
|
||||||
|
/// </summary>
|
||||||
|
public string jobName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 作业区域
|
||||||
|
/// </summary>
|
||||||
|
public string areaName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 作业地点
|
||||||
|
/// </summary>
|
||||||
|
public string place { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 作业人员
|
||||||
|
/// </summary>
|
||||||
|
public string users { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 监护人
|
||||||
|
/// </summary>
|
||||||
|
public string monitor { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 审批领导
|
||||||
|
/// </summary>
|
||||||
|
public string approveUsers { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user