根据班组 ,产线 和日期获取all工单

This commit is contained in:
qianhao.xu 2024-09-19 09:42:54 +08:00
parent d535887c41
commit 6800b2cc51
3 changed files with 30 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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();
}
}
}