根据工艺路线查工位
This commit is contained in:
parent
7f3b46c6e8
commit
52ef3a4f6a
@ -154,7 +154,29 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
return ToResponse(response);
|
||||
}
|
||||
#region 工艺路线 ---》工序---》工位---》技能
|
||||
//TODO 获取工艺路线与工序父子表
|
||||
|
||||
|
||||
|
||||
//TODO 获取工艺路线
|
||||
[HttpPost("get_route")]
|
||||
public IActionResult GetWorkRouteList([FromBody] BaseWorkRouteQueryDto query)
|
||||
{
|
||||
if (query == null) { return SUCCESS(null); }
|
||||
var response = _GroupPersonSkillService.GetWorkRouteList(query);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
//TODO 获取工艺路线绑定的工位
|
||||
[HttpGet("get_workstation_by_route")]
|
||||
public IActionResult GetWorkstationbyRoute(int route_id)
|
||||
{
|
||||
var response = _GroupPersonSkillService.GetWorkstationbyRoute(route_id);
|
||||
return SUCCESS(response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//TODO 获取工艺路线与工序父子表(废弃)
|
||||
[HttpPost("route_process_parent_son")]
|
||||
public IActionResult RouteProcessParentSon([FromBody] BaseWorkRouteQueryDto query)
|
||||
{
|
||||
@ -163,7 +185,7 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
return SUCCESS(response);
|
||||
|
||||
}
|
||||
//TODO 根据工序查工位
|
||||
//TODO 根据工序查工位(废弃)
|
||||
[HttpGet("workstation_by_process")]
|
||||
public IActionResult GetWorkstationList_byProccess(int workProcess_id)
|
||||
{
|
||||
|
||||
@ -15,6 +15,7 @@ using Aliyun.OSS;
|
||||
using DOAN.Model.MES.base_.Dto;
|
||||
using DOAN.Model.MES.base_;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace DOAN.Service.group
|
||||
{
|
||||
@ -142,6 +143,39 @@ namespace DOAN.Service.group
|
||||
.Where(it => it.FkPersonId == person_id && it.FkSkillId == skill_id)
|
||||
.ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取工艺路线
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
public List<BaseWorkRoute> GetWorkRouteList([FromBody] BaseWorkRouteQueryDto query)
|
||||
{
|
||||
List<BaseWorkRoute> workRouteList = Context.Queryable<BaseWorkRoute>()
|
||||
.WhereIF(!string.IsNullOrEmpty(query.Name), it => it.Name.Contains(query.Name))
|
||||
.WhereIF(!string.IsNullOrEmpty(query.Code), it => it.Code.Contains(query.Code))
|
||||
.WhereIF(query.Status > 0, it => it.Status == query.Status)
|
||||
.ToList();
|
||||
|
||||
return workRouteList;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据工艺路线查工位
|
||||
/// </summary>
|
||||
/// <param name="route_id"></param>
|
||||
/// <returns></returns>
|
||||
public List<BaseWorkStation> GetWorkstationbyRoute(int route_id)
|
||||
{
|
||||
var query1 = Context.Queryable<BaseRelWorkRouteProcesses>()
|
||||
.Where(it => it.FkWorkRoute == route_id);
|
||||
List<BaseWorkProcesses> workProcesses = Context.Queryable(query1).LeftJoin<BaseWorkProcesses>((q, p) => q.FkWorkProcesses == p.Id)
|
||||
.Select((q, p) => p)
|
||||
.ToList();
|
||||
int?[] filters= workProcesses.Select(it=>it.Id).ToArray();
|
||||
|
||||
return Context.Queryable<BaseWorkStation>().Where(it => filters.Contains(it.FkWorkProcesses)).ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取工艺路线与工序父子表
|
||||
/// </summary>
|
||||
|
||||
@ -33,6 +33,12 @@ namespace DOAN.Service.group.IService
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
List<BaseWorkRoute> GetWorkRouteList([FromBody] BaseWorkRouteQueryDto query);
|
||||
|
||||
List<BaseWorkStation> GetWorkstationbyRoute(int route_id);
|
||||
|
||||
List<RouteANDprocess> RouteProcessParentSon(BaseWorkRouteQueryDto query);
|
||||
|
||||
List<BaseWorkStation> GetWorkstationList_byProccess(int workProcess_id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user