根据班组 ,产线 和日期获取all工单
This commit is contained in:
parent
d535887c41
commit
6800b2cc51
@ -38,6 +38,21 @@ namespace DOAN.WebApi.Controllers.JobKanban
|
||||
|
||||
}
|
||||
|
||||
//TODO 根据班组 ,产线 和日期获取all工单
|
||||
[HttpGet("get_workorder_list")]
|
||||
public IActionResult GetWorkOrderList(string group_code,string line_code,DateTime handleDate)
|
||||
{
|
||||
if(string.IsNullOrEmpty(group_code)||string.IsNullOrEmpty(line_code)||handleDate==DateTime.MinValue)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = workorderProgressService.GetWorkOrderList(group_code, line_code, handleDate);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DOAN.Model.MES.base_;
|
||||
using DOAN.Model.MES.product;
|
||||
namespace DOAN.Service.JobKanban.IService
|
||||
{
|
||||
public interface IWorkorderProgressService
|
||||
@ -11,5 +12,8 @@ namespace DOAN.Service.JobKanban.IService
|
||||
|
||||
List<BaseWorkRoute> GetRoutes();
|
||||
List<BaseGroup> GetGroups();
|
||||
|
||||
|
||||
List<ProWorkorder> GetWorkOrderList(string group_code, string line_code, DateTime handleDate);
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,6 +23,17 @@ namespace DOAN.Service.JobKanban
|
||||
{
|
||||
return Context.Queryable<BaseGroup>().Where(it => it.Status == 1).ToList();
|
||||
}
|
||||
|
||||
|
||||
public List<ProWorkorder> GetWorkOrderList(string group_code, string line_code, DateTime handleDate)
|
||||
{
|
||||
handleDate = handleDate.ToLocalTime().Date;
|
||||
|
||||
return Context.Queryable<ProWorkorder>().Where(it => it.GroupCode == group_code)
|
||||
.Where(it => it.LineCode == line_code)
|
||||
.Where(it => it.WorkorderDate == handleDate)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user