作业清单
This commit is contained in:
parent
483f416e9f
commit
21e3451b3c
@ -1008,6 +1008,24 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
[HttpPost, Route("JobManage")]
|
||||
public JsonActionResult<List<JobManage>> JobManage([FromBody] KeywordFilter filter)
|
||||
{
|
||||
DateTime startDate = DateTime.Now.Date;
|
||||
DateTime endDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
|
||||
if (!string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
startDate = Convert.ToDateTime(filter.Parameter1).Date;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(filter.Parameter2))
|
||||
{
|
||||
endDate = Convert.ToDateTime(Convert.ToDateTime(filter.Parameter2).Date.ToString("yyyy-MM-dd 23:59:59"));
|
||||
}
|
||||
if (startDate.Year != DateTime.Now.Year)
|
||||
{
|
||||
throw new Exception("只能查询本年度数据,请修改开始时间!");
|
||||
}
|
||||
if (endDate.Year != DateTime.Now.Year)
|
||||
{
|
||||
throw new Exception("只能查询本年度数据,请修改结束时间!");
|
||||
}
|
||||
JsonActionResult<List<JobManage>> result = new JsonActionResult<List<JobManage>>();
|
||||
var list = new List<JobManage>();
|
||||
DataTable tableList = new DataTable();
|
||||
@ -1016,9 +1034,10 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
connection.Open();
|
||||
//当日危险作业清单
|
||||
string sql = "select * from vhome_jobTodayList";
|
||||
string sql = "select * from vhome_jobTodayList where create_time >="+ startDate + "and create_time<="+ endDate;
|
||||
SqlCommand com = new SqlCommand(sql, connection);
|
||||
SqlDataAdapter data = new SqlDataAdapter(com);
|
||||
data.Fill(tableList);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user